-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 4 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 10 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/kodialogmanager.cpp | 28 | ||||
-rw-r--r-- | korganizer/kodialogmanager.h | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 28 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 9 |
7 files changed, 56 insertions, 25 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 6b62d4e..bb3a00d 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1,1391 +1,1391 @@ | |||
1 | { "10 minutes","10 Minuten" }, | 1 | { "10 minutes","10 Minuten" }, |
2 | { "10th","10." }, | 2 | { "10th","10." }, |
3 | { "11th","11." }, | 3 | { "11th","11." }, |
4 | { "12 pm Format","12 AM/PM Format" }, | 4 | { "12 pm Format","12 AM/PM Format" }, |
5 | { "12th","12." }, | 5 | { "12th","12." }, |
6 | { "13th","13." }, | 6 | { "13th","13." }, |
7 | { "14th","14." }, | 7 | { "14th","14." }, |
8 | { "15th","15." }, | 8 | { "15th","15." }, |
9 | { "16th","16." }, | 9 | { "16th","16." }, |
10 | { "17th","17." }, | 10 | { "17th","17." }, |
11 | { "18th","18." }, | 11 | { "18th","18." }, |
12 | { "19th","19." }, | 12 | { "19th","19." }, |
13 | { "1 Day","1 Tag" }, | 13 | { "1 Day","1 Tag" }, |
14 | { "1 h","1 Std" }, | 14 | { "1 h","1 Std" }, |
15 | { "1 (high)","1 (hoch)" }, | 15 | { "1 (high)","1 (hoch)" }, |
16 | { "5 (low)","5" }, | 16 | { "5 (low)","5" }, |
17 | { "1st","1." }, | 17 | { "1st","1." }, |
18 | { "20th","20." }, | 18 | { "20th","20." }, |
19 | { "21st","21." }, | 19 | { "21st","21." }, |
20 | { "22nd","22." }, | 20 | { "22nd","22." }, |
21 | { "23rd","23." }, | 21 | { "23rd","23." }, |
22 | { "24:00 Hour Format","24:00 Stunden Format" }, | 22 | { "24:00 Hour Format","24:00 Stunden Format" }, |
23 | { "24th","24." }, | 23 | { "24th","24." }, |
24 | { "25th","25." }, | 24 | { "25th","25." }, |
25 | { "26th","26." }, | 25 | { "26th","26." }, |
26 | { "27th","27." }, | 26 | { "27th","27." }, |
27 | { "28th","28." }, | 27 | { "28th","28." }, |
28 | { "29th","29." }, | 28 | { "29th","29." }, |
29 | { "2nd","2." }, | 29 | { "2nd","2." }, |
30 | { "30 minutes","30 Minuten" }, | 30 | { "30 minutes","30 Minuten" }, |
31 | { "30th","30." }, | 31 | { "30th","30." }, |
32 | { "31st","31." }, | 32 | { "31st","31." }, |
33 | { "3rd","3." }, | 33 | { "3rd","3." }, |
34 | { "4th","4." }, | 34 | { "4th","4." }, |
35 | { "5 (lowest)","5 (Niedrigster)" }, | 35 | { "5 (lowest)","5 (Niedrigster)" }, |
36 | { "5th","5." }, | 36 | { "5th","5." }, |
37 | { "6th","6." }, | 37 | { "6th","6." }, |
38 | { "7th","7." }, | 38 | { "7th","7." }, |
39 | { "8th","8." }, | 39 | { "8th","8." }, |
40 | { "9th","9." }, | 40 | { "9th","9." }, |
41 | { "About...","Über..." }, | 41 | { "About...","Über..." }, |
42 | { "&Accept","&Akzeptieren" }, | 42 | { "&Accept","&Akzeptieren" }, |
43 | { "Accept","Akzeptieren" }, | 43 | { "Accept","Akzeptieren" }, |
44 | { "Accept A&ll","A&lles Akzepieren" }, | 44 | { "Accept A&ll","A&lles Akzepieren" }, |
45 | { "Access:","Zugriff:" }, | 45 | { "Access:","Zugriff:" }, |
46 | { "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, | 46 | { "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, |
47 | { "Actions","Aktionen" }, | 47 | { "Actions","Aktionen" }, |
48 | { "Add Filter","Filter Hinzufügen" }, | 48 | { "Add Filter","Filter Hinzufügen" }, |
49 | { "&Add","Hinzufügen" }, | 49 | { "&Add","Hinzufügen" }, |
50 | { "Add","Hinzufügen" }, | 50 | { "Add","Hinzufügen" }, |
51 | { "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, | 51 | { "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, |
52 | { "Additional email address:","Zusätzliche E-Mail Adresse:" }, | 52 | { "Additional email address:","Zusätzliche E-Mail Adresse:" }, |
53 | { "&Addressbook","&Adressbuch" }, | 53 | { "&Addressbook","&Adressbuch" }, |
54 | { "Address &Book...","Adress&buch..." }, | 54 | { "Address &Book...","Adress&buch..." }, |
55 | { "Agenda Size","Agende Größe" }, | 55 | { "Agenda Size","Agende Größe" }, |
56 | { "Agenda Size:","Größe der Agenda:" }, | 56 | { "Agenda Size:","Größe der Agenda:" }, |
57 | { "Agenda view:","Agenda Ansicht:" }, | 57 | { "Agenda view:","Agenda Ansicht:" }, |
58 | { "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, | 58 | { "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, |
59 | { "All attendees","Alle Teilnehmer" }, | 59 | { "All attendees","Alle Teilnehmer" }, |
60 | { "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, | 60 | { "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, |
61 | { "All day event","Ganztägig" }, | 61 | { "All day event","Ganztägig" }, |
62 | { "Anonymous","Anonym" }, | 62 | { "Anonymous","Anonym" }, |
63 | { "Apply","Anwenden" }, | 63 | { "Apply","Anwenden" }, |
64 | { "Apr","Apr" }, | 64 | { "Apr","Apr" }, |
65 | { "April","April" }, | 65 | { "April","April" }, |
66 | {"Ask for every entry on conflict","Frage bei Konflikten nach"}, | 66 | {"Ask for every entry on conflict","Frage bei Konflikten nach"}, |
67 | { "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, | 67 | { "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, |
68 | { "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, | 68 | { "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, |
69 | { "Attendees","Teilnehmer" }, | 69 | { "Attendees","Teilnehmer" }, |
70 | { "Aug","Aug" }, | 70 | { "Aug","Aug" }, |
71 | { "August","August" }, | 71 | { "August","August" }, |
72 | { "Auto-Save","Automatisches Abspeichern" }, | 72 | { "Auto-Save","Automatisches Abspeichern" }, |
73 | { "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, | 73 | { "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, |
74 | { "Auto saving...","Automatische Sicherung..." }, | 74 | { "Auto saving...","Automatische Sicherung..." }, |
75 | { "Begin on:","Starte mit:" }, | 75 | { "Begin on:","Starte mit:" }, |
76 | { "Begins on: %1","Starte mit: %1" }, | 76 | { "Begins on: %1","Starte mit: %1" }, |
77 | { "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, | 77 | { "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, |
78 | { "<b>On:</b> %1","<b>Am:</b> %1" }, | 78 | { "<b>On:</b> %1","<b>Am:</b> %1" }, |
79 | { "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, | 79 | { "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, |
80 | { "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, | 80 | { "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, |
81 | { " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, | 81 | { " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, |
82 | { "Busy","Belegt" }, | 82 | { "Busy","Belegt" }, |
83 | { "&Cancel","Abbre&chen" }, | 83 | { "&Cancel","Abbre&chen" }, |
84 | { "Cancel","Abbrechen" }, | 84 | { "Cancel","Abbrechen" }, |
85 | { "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, | 85 | { "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, |
86 | { "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, | 86 | { "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, |
87 | { "Categories...","Kategorien..." }, | 87 | { "Categories...","Kategorien..." }, |
88 | { "Categories","Kategorien" }, | 88 | { "Categories","Kategorien" }, |
89 | { "Category","Kategorie" }, | 89 | { "Category","Kategorie" }, |
90 | { "Center View","Zentriere Ansicht" }, | 90 | { "Center View","Zentriere Ansicht" }, |
91 | { "Change","Ändere" }, | 91 | { "Change","Ändere" }, |
92 | { "Cinema","Kino" }, | 92 | { "Cinema","Kino" }, |
93 | { "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" }, | 93 | { "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" }, |
94 | { "Clone Item","Klone Eintrag" }, | 94 | { "Clone Item","Klone Eintrag" }, |
95 | { "&Close","S&chließen" }, | 95 | { "&Close","S&chließen" }, |
96 | { "Close","Schließen" }, | 96 | { "Close","Schließen" }, |
97 | { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, | 97 | { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, |
98 | { "Colors","Farben" }, | 98 | { "Colors","Farben" }, |
99 | { "completed","erledigt" }, | 99 | { "completed","erledigt" }, |
100 | { "completed on %1","erledigt am %1" }, | 100 | { "completed on %1","erledigt am %1" }, |
101 | { "Complete","Erledigt" }, | 101 | { "Complete","Erledigt" }, |
102 | { "Confidential","Vertraulich" }, | 102 | { "Confidential","Vertraulich" }, |
103 | { "Configure...","Einstellungen..." }, | 103 | { "Configure...","Einstellungen..." }, |
104 | { "Confirm &deletes","Löschvogang bestätigen" }, | 104 | { "Confirm &deletes","Löschvogang bestätigen" }, |
105 | { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, | 105 | { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, |
106 | { "Counter-event Viewer","Terminzähler Ansicht" }, | 106 | { "Counter-event Viewer","Terminzähler Ansicht" }, |
107 | { "Daily ending hour:","Feierabend:" }, | 107 | { "Daily ending hour:","Feierabend:" }, |
108 | { "Daily starting hour:","Anfangszeit:" }, | 108 | { "Daily starting hour:","Anfangszeit:" }, |
109 | { "Daily","Täglich" }, | 109 | { "Daily","Täglich" }, |
110 | { "Date Format","Datums Format" }, | 110 | { "Date Format","Datums Format" }, |
111 | { "Date Format:","Datums Format:" }, | 111 | { "Date Format:","Datums Format:" }, |
112 | { "DateNavigator:(nr)","Datums Navigator" }, | 112 | { "DateNavigator:(nr)","Datums Navigator" }, |
113 | { "Dates: ","Datum: " }, | 113 | { "Dates: ","Datum: " }, |
114 | { "Date && Time","Datum && Zeit" }, | 114 | { "Date && Time","Datum && Zeit" }, |
115 | { "Day begins at:","Der Tag beginnt um:" }, | 115 | { "Day begins at:","Der Tag beginnt um:" }, |
116 | { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, | 116 | { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, |
117 | { "Days in What's Next:","Tage in What's Next:" }, | 117 | { "Days in What's Next:","Tage in What's Next:" }, |
118 | { "day(s)","Tag(e)" }, | 118 | { "day(s)","Tag(e)" }, |
119 | { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, | 119 | { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, |
120 | { "day","Tag" }, | 120 | { "day","Tag" }, |
121 | { "Dec","Dez" }, | 121 | { "Dec","Dez" }, |
122 | { "December","Dezember" }, | 122 | { "December","Dezember" }, |
123 | { "Default alarm time:","Standard Alarmzeit:" }, | 123 | { "Default alarm time:","Standard Alarmzeit:" }, |
124 | { "Default appointment time:","Standard Termin Startzeit:" }, | 124 | { "Default appointment time:","Standard Termin Startzeit:" }, |
125 | { "Default event color:","Standard Terminfarbe:" }, | 125 | { "Default event color:","Standard Terminfarbe:" }, |
126 | { "Default","Standard" }, | 126 | { "Default","Standard" }, |
127 | { "Def. duration of new app.:","Standard Termin Länge:" }, | 127 | { "Def. duration of new app.:","Standard Termin Länge:" }, |
128 | { "Delete All","Lösche alles" }, | 128 | { "Delete All","Lösche alles" }, |
129 | { "Delete all selected","Lösche alle Selektierten" }, | 129 | { "Delete all selected","Lösche alle Selektierten" }, |
130 | { "Delete Current","Aktuellen löschen" }, | 130 | { "Delete Current","Aktuellen löschen" }, |
131 | { "Delete Event...","Lösche Termin..." }, | 131 | { "Delete Event...","Lösche Termin..." }, |
132 | { "Delete Event","Lösche Termin" }, | 132 | { "Delete Event","Lösche Termin" }, |
133 | { "&Delete","Löschen" }, | 133 | { "&Delete","Löschen" }, |
134 | { "Delete...","Löschen..." }, | 134 | { "Delete...","Löschen..." }, |
135 | { "Delete","Löschen" }, | 135 | { "Delete","Löschen" }, |
136 | { "Delete Todo...","Lösche Todo..." }, | 136 | { "Delete Todo...","Lösche Todo..." }, |
137 | { "Delete To-Do","Lösche Todo" }, | 137 | { "Delete To-Do","Lösche Todo" }, |
138 | { "Deleting item %d ...","Lösche Eintrag %d..." }, | 138 | { "Deleting item %d ...","Lösche Eintrag %d..." }, |
139 | { "Descriptions","Beschreibungen" }, | 139 | { "Descriptions","Beschreibungen" }, |
140 | { "Deselect all","Deselektiere Alle" }, | 140 | { "Deselect all","Deselektiere Alle" }, |
141 | { "Details","Details" }, | 141 | { "Details","Details" }, |
142 | { "Dinner","Abendessen" }, | 142 | { "Dinner","Abendessen" }, |
143 | { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, | 143 | { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, |
144 | { "Due Date","Fällig am" }, | 144 | { "Due Date","Fällig am" }, |
145 | { "Due: ","Fällig: "}, | 145 | { "Due: ","Fällig: "}, |
146 | { "Due Time","Fällig um" }, | 146 | { "Due Time","Fällig um" }, |
147 | { "Due:","Fällig:"}, | 147 | { "Due:","Fällig:"}, |
148 | { "Duration: ","Dauer: " }, | 148 | { "Duration: ","Dauer: " }, |
149 | { "Edit...","Bearbeite..." }, | 149 | { "Edit...","Bearbeite..." }, |
150 | { "Edit","Bearbeite" }, | 150 | { "Edit","Bearbeite" }, |
151 | { "Edit Event...","Bearbeite Termin..." }, | 151 | { "Edit Event...","Bearbeite Termin..." }, |
152 | { "Edit Event","Bearbeite Termin" }, | 152 | { "Edit Event","Bearbeite Termin" }, |
153 | { "Edit exceptions","Bearbeite Ausnahmen" }, | 153 | { "Edit exceptions","Bearbeite Ausnahmen" }, |
154 | { "EditorBox:","Editor Fenster:" }, | 154 | { "EditorBox:","Editor Fenster:" }, |
155 | { "Edit Recurrence Range","Bearbeite Wiederholung" }, | 155 | { "Edit Recurrence Range","Bearbeite Wiederholung" }, |
156 | { "Edit Todo...","Berabeite Todo..." }, | 156 | { "Edit Todo...","Berabeite Todo..." }, |
157 | { "Edit To-Do","Todo bearbeiten" }, | 157 | { "Edit To-Do","Todo bearbeiten" }, |
158 | { "E&mail address:","E&mail Adresse:" }, | 158 | { "E&mail address:","E&mail Adresse:" }, |
159 | { "(EmptyEmail)","(KeineEmail)" }, | 159 | { "(EmptyEmail)","(KeineEmail)" }, |
160 | { "(EmptyName)","(KeinName)" }, | 160 | { "(EmptyName)","(KeinName)" }, |
161 | { "Enable Recurrence","Wiederholung anschalten" }, | 161 | { "Enable Recurrence","Wiederholung anschalten" }, |
162 | { "End after","Endet nach"}, | 162 | { "End after","Endet nach"}, |
163 | { "End by:","Endet am"}, | 163 | { "End by:","Endet am"}, |
164 | { "End Date","End Datum" }, | 164 | { "End Date","End Datum" }, |
165 | { "End:","Ende:" }, | 165 | { "End:","Ende:" }, |
166 | { "End Time","End Zeit" }, | 166 | { "End Time","End Zeit" }, |
167 | { "English","Englisch" }, | 167 | { "English","Englisch" }, |
168 | { "Event","Termin" }, | 168 | { "Event","Termin" }, |
169 | { "Event list","Termin Liste" }, | 169 | { "Event list","Termin Liste" }, |
170 | { "Events","Termine" }, | 170 | { "Events","Termine" }, |
171 | { "Event Viewer:","Termin Übersicht:" }, | 171 | { "Event Viewer:","Termin Übersicht:" }, |
172 | { "every","jede" }, | 172 | { "every","jede" }, |
173 | { "Exceptions...","Ausnahmen..." }, | 173 | { "Exceptions...","Ausnahmen..." }, |
174 | { "Exceptions","Ausnahmen" }, | 174 | { "Exceptions","Ausnahmen" }, |
175 | { "Exclude holidays","Ohne freie Tage" }, | 175 | { "Exclude holidays","Ohne freie Tage" }, |
176 | { "Exclude Saturdays","Ohne Samstage" }, | 176 | { "Exclude Saturdays","Ohne Samstage" }, |
177 | { "Feb","Feb" }, | 177 | { "Feb","Feb" }, |
178 | { "February","Februar" }, | 178 | { "February","Februar" }, |
179 | { "&Find","Suche!" }, | 179 | { "&Find","Suche!" }, |
180 | { "Fonts","Schriftart" }, | 180 | { "Fonts","Schriftart" }, |
181 | { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, | 181 | { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, |
182 | { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, | 182 | { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, |
183 | { "Free","Frei" }, | 183 | { "Free","Frei" }, |
184 | { "Friday","Freitag" }, | 184 | { "Friday","Freitag" }, |
185 | { "Fri","Fr" }, | 185 | { "Fri","Fr" }, |
186 | { "From:","Vom:" }, | 186 | { "From:","Vom:" }, |
187 | { "Full &name:","Vor- und &Nachname:" }, | 187 | { "Full &name:","Vor- und &Nachname:" }, |
188 | { "General","Allgemein" }, | 188 | { "General","Allgemein" }, |
189 | { "German","Deutsch" }, | 189 | { "German","Deutsch" }, |
190 | { "Gifts","Geschenke" }, | 190 | { "Gifts","Geschenke" }, |
191 | { "Go to Today","Heute anzeigen" }, | 191 | { "Go to Today","Heute anzeigen" }, |
192 | { "Help","Hilfe" }, | 192 | { "Help","Hilfe" }, |
193 | { "Hide Dates","Daten ausblenden" }, | 193 | { "Hide Dates","Daten ausblenden" }, |
194 | { "Highlight color:","Markierungen:" }, | 194 | { "Highlight color:","Markierungen:" }, |
195 | { "Holiday color:","Freie Tage:" }, | 195 | { "Holiday color:","Freie Tage:" }, |
196 | { "hour(s)","Stunde(n)" }, | 196 | { "hour(s)","Stunde(n)" }, |
197 | { "In %1 days: ","In %1 Tagen: " }, | 197 | { "In %1 days: ","In %1 Tagen: " }, |
198 | { "Incomplete Todo:","Unerledigte Aufgaben:" }, | 198 | { "Incomplete Todo:","Unerledigte Aufgaben:" }, |
199 | { "Information","Information" }, | 199 | { "Information","Information" }, |
200 | { "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, | 200 | { "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, |
201 | { "Jan","Jan" }, | 201 | { "Jan","Jan" }, |
202 | { "January","Januar" }, | 202 | { "January","Januar" }, |
203 | { "JournalView:","Journal Ansicht:" }, | 203 | { "JournalView:","Journal Ansicht:" }, |
204 | { "Journals","Journale" }, | 204 | { "Journals","Journale" }, |
205 | { "Jul","Jul" }, | 205 | { "Jul","Jul" }, |
206 | { "July","Juli" }, | 206 | { "July","Juli" }, |
207 | { "Jump to date","Springe zum Datum" }, | 207 | { "Jump to date","Springe zum Datum" }, |
208 | { "June","Juni" }, | 208 | { "June","Juni" }, |
209 | { "Jun","Jun" }, | 209 | { "Jun","Jun" }, |
210 | { "Key Bindings...","Tastenzuordnung..." }, | 210 | { "Key Bindings...","Tastenzuordnung..." }, |
211 | { "Kids","Kinder" }, | 211 | { "Kids","Kinder" }, |
212 | { "Known Problems...","Bekannte Probleme..." }, | 212 | { "Known Problems...","Bekannte Probleme..." }, |
213 | { "KO/Pi Find ","KO/Pi Suchdialog " }, | 213 | { "KO/Pi Find ","KO/Pi Suchdialog " }, |
214 | { "KO/Pi Find: ","KO/Pi Suchen: " }, | 214 | { "KO/Pi Find: ","KO/Pi Suchen: " }, |
215 | { "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, | 215 | { "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, |
216 | { "Language:(needs restart)","Sprache (Neustart!)" }, | 216 | { "Language:(needs restart)","Sprache (Neustart!)" }, |
217 | { "Language:","Sprache" }, | 217 | { "Language:","Sprache" }, |
218 | { "Large","Etwas mehr" }, | 218 | { "Large","Etwas mehr" }, |
219 | { "List View:","Listenansicht:" }, | 219 | { "List View:","Listenansicht:" }, |
220 | { "List View","Listenansicht" }, | 220 | { "List View","Listenansicht" }, |
221 | { "Load/Save","Laden/Speichern" }, | 221 | { "Load/Save","Laden/Speichern" }, |
222 | { "Load Template","Lade Vorlage" }, | 222 | { "Load Template","Lade Vorlage" }, |
223 | { "Locale","Localisation" }, | 223 | { "Locale","Localisation" }, |
224 | { "Local temp file:","Lokale temp. Datei:" }, | 224 | { "Local temp file:","Lokale temp. Datei:" }, |
225 | { "Location: ","Ort: " }, | 225 | { "Location: ","Ort: " }, |
226 | { "Location:","Ort:" }, | 226 | { "Location:","Ort:" }, |
227 | { "Mail client","Mail Programm" }, | 227 | { "Mail client","Mail Programm" }, |
228 | { "Mail Client","Mail Programm" }, | 228 | { "Mail Client","Mail Programm" }, |
229 | { "March","März" }, | 229 | { "March","März" }, |
230 | { "Mar","Mär" }, | 230 | { "Mar","Mär" }, |
231 | { "May","Mai" }, | 231 | { "May","Mai" }, |
232 | { "M. Bains line:","M. Bains Linie:" }, | 232 | { "M. Bains line:","M. Bains Linie:" }, |
233 | { "Medium","Medium" }, | 233 | { "Medium","Medium" }, |
234 | { "Method","Methode" }, | 234 | { "Method","Methode" }, |
235 | { "minute(s)","Minute(n)" }, | 235 | { "minute(s)","Minute(n)" }, |
236 | { "Monday","Montag" }, | 236 | { "Monday","Montag" }, |
237 | { "Mon","Mo" }, | 237 | { "Mon","Mo" }, |
238 | { "Monthly","Monatlich" }, | 238 | { "Monthly","Monatlich" }, |
239 | { "Month not long enough","Monat ist nicht lang genug" }, | 239 | { "Month not long enough","Monat ist nicht lang genug" }, |
240 | { "month(s)","Monat(e)" }, | 240 | { "month(s)","Monat(e)" }, |
241 | { "Month view:","Monatsansicht:" }, | 241 | { "Month view:","Monatsansicht:" }, |
242 | { "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, | 242 | { "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, |
243 | { "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" }, | 243 | { "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" }, |
244 | { "Move &Down","Nach unten verschieben" }, | 244 | { "Move &Down","Nach unten verschieben" }, |
245 | { "Move &Up","Nach oben verschieben" }, | 245 | { "Move &Up","Nach oben verschieben" }, |
246 | { "Name:","Name:" }, | 246 | { "Name:","Name:" }, |
247 | { "Name","Name" }, | 247 | { "Name","Name" }, |
248 | { "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, | 248 | { "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, |
249 | { "%n Days","%n Tage" }, | 249 | { "%n Days","%n Tage" }, |
250 | { "Never","Nie" }, | 250 | { "Never","Nie" }, |
251 | { "New event...","Neuer Termin..." }, | 251 | { "New event...","Neuer Termin..." }, |
252 | { "New event","Neuer Termin" }, | 252 | { "New event","Neuer Termin" }, |
253 | { "New Event...","Neuer Termin..." }, | 253 | { "New Event...","Neuer Termin..." }, |
254 | { "New Events/Todos should","Neue Termine/Todos sollten" }, | 254 | { "New Events/Todos should","Neue Termine/Todos sollten" }, |
255 | { "&New","&Neu" }, | 255 | { "&New","&Neu" }, |
256 | { "New","Neu", }, | 256 | { "New","Neu", }, |
257 | { "New Sub-Todo...","Neues Sub-Todo..." }, | 257 | { "New Sub-Todo...","Neues Sub-Todo..." }, |
258 | { "New Todo...","Neues Todo..." }, | 258 | { "New Todo...","Neues Todo..." }, |
259 | { "Next Alarm: ","Nächster Alarm: ", }, | 259 | { "Next Alarm: ","Nächster Alarm: ", }, |
260 | { "&Next Day","&Nächster Tag", }, | 260 | { "&Next Day","&Nächster Tag", }, |
261 | { "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, | 261 | { "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, |
262 | { "Next month","Nächster Monat" }, | 262 | { "Next month","Nächster Monat" }, |
263 | { "&Next Week","&Nächste Woche" }, | 263 | { "&Next Week","&Nächste Woche" }, |
264 | { "Next year","Nächstes Jahr" }, | 264 | { "Next year","Nächstes Jahr" }, |
265 | { "Next Year","Nächstes Jahr" }, | 265 | { "Next Year","Nächstes Jahr" }, |
266 | { "%n h","%n Std" }, | 266 | { "%n h","%n Std" }, |
267 | { "No ending date","Kein End-Datum", }, | 267 | { "No ending date","Kein End-Datum", }, |
268 | { "No event, nothing to do.","Kein Termin, nichts zu tun.", }, | 268 | { "No event, nothing to do.","Kein Termin, nichts zu tun.", }, |
269 | { "No event selected.","Kein Termin selektiert" }, | 269 | { "No event selected.","Kein Termin selektiert" }, |
270 | { "No","Nein" }, | 270 | { "No","Nein" }, |
271 | { "No program set","Kein Programm ausgewählt", }, | 271 | { "No program set","Kein Programm ausgewählt", }, |
272 | { "Normal","Normal" }, | 272 | { "Normal","Normal" }, |
273 | { "[No selection]","Keine Selektion", }, | 273 | { "[No selection]","Keine Selektion", }, |
274 | { "No sound set","Kein Sound ausgewählt", }, | 274 | { "No sound set","Kein Sound ausgewählt", }, |
275 | { "no time ","keine Zeit ", }, | 275 | { "no time ","keine Zeit ", }, |
276 | { "no time","keine Zeit", }, | 276 | { "no time","keine Zeit", }, |
277 | { "No Time","Keine Zeit" }, | 277 | { "No Time","Keine Zeit" }, |
278 | { "November","November" }, | 278 | { "November","November" }, |
279 | { "Nov","Nov", }, | 279 | { "Nov","Nov", }, |
280 | { "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, | 280 | { "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, |
281 | { "occurrence(s)","Vorkommen" }, | 281 | { "occurrence(s)","Vorkommen" }, |
282 | { "October","Oktober" }, | 282 | { "October","Oktober" }, |
283 | { "Oct","Okt", }, | 283 | { "Oct","Okt", }, |
284 | { "O-due!","Ü-fällig! " }, | 284 | { "O-due!","Ü-fällig! " }, |
285 | { "&OK","&OK" }, | 285 | { "&OK","&OK" }, |
286 | { "Ok+Show!","Ok+Anzeigen" }, | 286 | { "Ok+Show!","Ok+Anzeigen" }, |
287 | { "Organizer: %1","Organisator %1" }, | 287 | { "Organizer: %1","Organisator %1" }, |
288 | { "Organizer","Organisator" }, | 288 | { "Organizer","Organisator" }, |
289 | { "Owner: ","Besitzer: " }, | 289 | { "Owner: ","Besitzer: " }, |
290 | { "Owner:","Besitzer:" }, | 290 | { "Owner:","Besitzer:" }, |
291 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, | 291 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, |
292 | { "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, | 292 | { "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, |
293 | { "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, | 293 | { "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, |
294 | { "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, | 294 | { "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, |
295 | { "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, | 295 | { "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, |
296 | { "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, | 296 | { "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, |
297 | { "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, | 297 | { "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, |
298 | { "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, | 298 | { "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, |
299 | { "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, | 299 | { "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, |
300 | { "&Previous Day","Vorheriger Tag" }, | 300 | { "&Previous Day","Vorheriger Tag" }, |
301 | { "Previous month","Vorheriger Monat" }, | 301 | { "Previous month","Vorheriger Monat" }, |
302 | { "Previous Month","Vorheriger Monat" }, | 302 | { "Previous Month","Vorheriger Monat" }, |
303 | { "&Previous Week","Vorherige Woche" }, | 303 | { "&Previous Week","Vorherige Woche" }, |
304 | { "Previous year","Vorheriges Jahr" }, | 304 | { "Previous year","Vorheriges Jahr" }, |
305 | { "Previous Year","Vorheriges Jahr" }, | 305 | { "Previous Year","Vorheriges Jahr" }, |
306 | { "Printing","Drucken" }, | 306 | { "Printing","Drucken" }, |
307 | { "Priority:","Priorität:" }, | 307 | { "Priority:","Priorität:" }, |
308 | { "Private","Privat" }, | 308 | { "Private","Privat" }, |
309 | { "Proceed","Weiter" }, | 309 | { "Proceed","Weiter" }, |
310 | { "Public","Öffentlich" }, | 310 | { "Public","Öffentlich" }, |
311 | { "Purge","Entferne" }, | 311 | { "Purge","Entferne" }, |
312 | { "Purge Completed","Entferne erledigte Todos" }, | 312 | { "Purge Completed","Entferne erledigte Todos" }, |
313 | { "Purge Todos","Todos bereinigen" }, | 313 | { "Purge Todos","Todos bereinigen" }, |
314 | { "read-only","schreibgeschützt" }, | 314 | { "read-only","schreibgeschützt" }, |
315 | { "Recur every","Wiederh. alle" }, | 315 | { "Recur every","Wiederh. alle" }, |
316 | { "Recur in the month of","Wiederh. im Monat" }, | 316 | { "Recur in the month of","Wiederh. im Monat" }, |
317 | { "Recur on the","Wiederh. am" }, | 317 | { "Recur on the","Wiederh. am" }, |
318 | { "Recur on this day","Wiederh. am diesen Tag" }, | 318 | { "Recur on this day","Wiederh. am diesen Tag" }, |
319 | { "Recurrence Range...","Wiederholungs Zeitraum..." }, | 319 | { "Recurrence Range...","Wiederholungs Zeitraum..." }, |
320 | { "Recurrence Range","Wiederholungs Zeitraum" }, | 320 | { "Recurrence Range","Wiederholungs Zeitraum" }, |
321 | { "Recurrence Rule","Wiederholungs Regel" }, | 321 | { "Recurrence Rule","Wiederholungs Regel" }, |
322 | { "Recurrence","Wiederholung" }, | 322 | { "Recurrence","Wiederholung" }, |
323 | { "Recurs","Wiederholung" }, | 323 | { "Recurs","Wiederholung" }, |
324 | {"&Reject","Abweisen"}, | 324 | {"&Reject","Abweisen"}, |
325 | { "Reminder:","Alarm:" }, | 325 | { "Reminder:","Alarm:" }, |
326 | { "Rem.:","Alarm:" }, | 326 | { "Rem.:","Alarm:" }, |
327 | { "Rem.","Alarm:" }, | 327 | { "Rem.","Alarm:" }, |
328 | { "Remote file:","Remote Datei:"}, | 328 | { "Remote file:","Remote Datei:"}, |
329 | { "Remote IP:","Remote (ferne) IP:" }, | 329 | { "Remote IP:","Remote (ferne) IP:" }, |
330 | { "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, | 330 | { "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, |
331 | { "Remote user:","Remote Benutzer"}, | 331 | { "Remote user:","Remote Benutzer"}, |
332 | { "&Remove","Entfe&rnen" }, | 332 | { "&Remove","Entfe&rnen" }, |
333 | { "Remove","Entfernen" }, | 333 | { "Remove","Entfernen" }, |
334 | { "Request response","Bemerkung anfordern" }, | 334 | { "Request response","Bemerkung anfordern" }, |
335 | { "Role:","Rolle:" }, | 335 | { "Role:","Rolle:" }, |
336 | { "Role","Rolle" }, | 336 | { "Role","Rolle" }, |
337 | { "Sat","Sa" }, | 337 | { "Sat","Sa" }, |
338 | { "Saturday","Samstag" }, | 338 | { "Saturday","Samstag" }, |
339 | { "Search for:","Suche nach:" }, | 339 | { "Search for:","Suche nach:" }, |
340 | { "Search In","Suche in" }, | 340 | { "Search In","Suche in" }, |
341 | { "Search...","Suche..." }, | 341 | { "Search...","Suche..." }, |
342 | { "Search","Suche" }, | 342 | { "Search","Suche" }, |
343 | { "Select Addresses","Wähle Adressen" }, | 343 | { "Select Addresses","Wähle Adressen" }, |
344 | { "Select all","Selektiere Alle" }, | 344 | { "Select all","Selektiere Alle" }, |
345 | { "Select a month","Wähle Monat" }, | 345 | { "Select a month","Wähle Monat" }, |
346 | { "Select a week","Wähle Woche" }, | 346 | { "Select a week","Wähle Woche" }, |
347 | { "Select a year","Wähle Jahr" }, | 347 | { "Select a year","Wähle Jahr" }, |
348 | { "Send directly","Sende direkt" }, | 348 | { "Send directly","Sende direkt" }, |
349 | { "&Send Messages","&Sende Nachrichten", }, | 349 | { "&Send Messages","&Sende Nachrichten", }, |
350 | { "Sep","Sep" }, | 350 | { "Sep","Sep" }, |
351 | { "September","September" }, | 351 | { "September","September" }, |
352 | { "Shopping","Einkaufen" }, | 352 | { "Shopping","Einkaufen" }, |
353 | { "Show Dates","Zeige Daten" }, | 353 | { "Show Dates","Zeige Daten" }, |
354 | { "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, | 354 | { "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, |
355 | { "Show Event...","Zeige Termin..." }, | 355 | { "Show Event...","Zeige Termin..." }, |
356 | { "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, | 356 | { "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, |
357 | { "Show Marcus Bains line","Zeige Marcus Bains Linie" }, | 357 | { "Show Marcus Bains line","Zeige Marcus Bains Linie" }, |
358 | { "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, | 358 | { "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, |
359 | { "Show time as:","Zeige Zeit als" }, | 359 | { "Show time as:","Zeige Zeit als" }, |
360 | { "Show Todo...","Zeige To-Do" }, | 360 | { "Show Todo...","Zeige To-Do" }, |
361 | { "Show vertical screen (Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, | 361 | { "Show vertical screen (Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, |
362 | { "&Show","Zeige" }, | 362 | { "&Show","Zeige" }, |
363 | { "Show...","Zeige..." }, | 363 | { "Show...","Zeige..." }, |
364 | { "Show","Zeige" }, | 364 | { "Show","Zeige" }, |
365 | { "Small","Klein" }, | 365 | { "Small","Klein" }, |
366 | { "Sorry","Entschuldigung" }, | 366 | { "Sorry","Entschuldigung" }, |
367 | {"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, | 367 | {"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, |
368 | { "Start:","Start:" }, | 368 | { "Start:","Start:" }, |
369 | { "Start Date","Start Datum" }, | 369 | { "Start Date","Start Datum" }, |
370 | { "Start date: %1","Start Datum: %1" }, | 370 | { "Start date: %1","Start Datum: %1" }, |
371 | { "Start Time","Start Zeit" }, | 371 | { "Start Time","Start Zeit" }, |
372 | { "Status:","Status:" }, | 372 | { "Status:","Status:" }, |
373 | { "Status","Status:" }, | 373 | { "Status","Status:" }, |
374 | { "Summaries","Titel" }, | 374 | { "Summaries","Titel" }, |
375 | { "Summary:","Titel:" }, | 375 | { "Summary:","Titel:" }, |
376 | { "Summary","Titel" }, | 376 | { "Summary","Titel" }, |
377 | { "Sunday","Sonntag" }, | 377 | { "Sunday","Sonntag" }, |
378 | { "Sun","So" }, | 378 | { "Sun","So" }, |
379 | { "Sync preferences:","Sync Einstellungen" }, | 379 | { "Sync preferences:","Sync Einstellungen" }, |
380 | { "Sync Prefs","Sync Einstellungen" }, | 380 | { "Sync Prefs","Sync Einstellungen" }, |
381 | { "Syncronize","Daten abgleich" }, | 381 | { "Syncronize","Daten abgleich" }, |
382 | { "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, | 382 | { "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, |
383 | { "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, | 383 | { "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, |
384 | { "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, | 384 | { "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, |
385 | { "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" }, | 385 | { "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" }, |
386 | { "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, | 386 | { "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, |
387 | { "Template...","Vorlage..." }, | 387 | { "Template...","Vorlage..." }, |
388 | { "This day","Dieser Tag" }, | 388 | { "This day","Dieser Tag" }, |
389 | { "This is an experimental feature. ","Dieses Feature ist experimentel" }, | 389 | { "This is an experimental feature. ","Dieses Feature ist experimentel" }, |
390 | { "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, | 390 | { "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, |
391 | { "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, | 391 | { "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, |
392 | { "Thu","Do" }, | 392 | { "Thu","Do" }, |
393 | { "Thursday","Donnerstag" }, | 393 | { "Thursday","Donnerstag" }, |
394 | { "Time associated","Mit Zeit" }, | 394 | { "Time associated","Mit Zeit" }, |
395 | { "Time bar:","Uhrzeit Zeile:" }, | 395 | { "Time bar:","Uhrzeit Zeile:" }, |
396 | { "Time && Date","Zeit und Datum" }, | 396 | { "Time && Date","Zeit und Datum" }, |
397 | { "Time Format","Zeit Format" }, | 397 | { "Time Format","Zeit Format" }, |
398 | { "Time Format(nr):","Zeit Format(Neustart!)" }, | 398 | { "Time Format(nr):","Zeit Format(Neustart!)" }, |
399 | { "Date Labels:","Datumsleiste:" }, | 399 | { "Date Labels:","Datumsleiste:" }, |
400 | { "Time: ","Zeit: " }, | 400 | { "Time: ","Zeit: " }, |
401 | { "Timezone:","Zeitzone:" }, | 401 | { "Timezone:","Zeitzone:" }, |
402 | { "To: ","Bis: " }, | 402 | { "To: ","Bis: " }, |
403 | { "To:","Bis:" }, | 403 | { "To:","Bis:" }, |
404 | { "Today: ","Heute: " }, | 404 | { "Today: ","Heute: " }, |
405 | { "Todo due today color:","Heute fällige To-Do's" }, | 405 | { "Todo due today color:","Heute fällige To-Do's" }, |
406 | { "To-do items:","To-Do items:" }, | 406 | { "To-do items:","To-Do items:" }, |
407 | { "Todo overdue color:","Überfällige To-Do's" }, | 407 | { "Todo overdue color:","Überfällige To-Do's" }, |
408 | { "Todo","Todo" }, | 408 | { "Todo","Todo" }, |
409 | { "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" }, | 409 | { "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" }, |
410 | { "ToDoView:","Todo Ansicht:" }, | 410 | { "ToDoView:","Todo Ansicht:" }, |
411 | { "Toggle Alarm","Wechsle Alarm" }, | 411 | { "Toggle Alarm","Wechsle Alarm" }, |
412 | { "Toggle Allday","Umschalten Ganztag" }, | 412 | { "Toggle Allday","Umschalten Ganztag" }, |
413 | { "Tomorrow: ","Morgen: " }, | 413 | { "Tomorrow: ","Morgen: " }, |
414 | { "Tue","Di" }, | 414 | { "Tue","Di" }, |
415 | { "Tuesday","Dienstag" }, | 415 | { "Tuesday","Dienstag" }, |
416 | { "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, | 416 | { "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, |
417 | { "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, | 417 | { "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, |
418 | { "Unknown","Unbekannt" }, | 418 | { "Unknown","Unbekannt" }, |
419 | { "Up","Hinauf" }, | 419 | { "Up","Hinauf" }, |
420 | { "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, | 420 | { "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, |
421 | { "User defined","Benutzerdefiniert" }, | 421 | { "User defined","Benutzerdefiniert" }, |
422 | { "User long date:","Format langes Datum:" }, | 422 | { "User long date:","Format langes Datum:" }, |
423 | { "User short date:","Forma kurzes Datum:" }, | 423 | { "User short date:","Forma kurzes Datum:" }, |
424 | { "View","Ansicht" }, | 424 | { "View","Ansicht" }, |
425 | { "View Fonts","Schriftarten Ansichten" }, | 425 | { "View Fonts","Schriftarten Ansichten" }, |
426 | { "Views","Ansichten" }, | 426 | { "Views","Ansichten" }, |
427 | { "Wed","Mi" }, | 427 | { "Wed","Mi" }, |
428 | { "Wednesday","Mittwoch" }, | 428 | { "Wednesday","Mittwoch" }, |
429 | { "Week %1","Woche %1" }, | 429 | { "Week %1","Woche %1" }, |
430 | { "Weekly","Wöchentlich" }, | 430 | { "Weekly","Wöchentlich" }, |
431 | { "Week starts on Sunday","Woche beginnt Sonntags" }, | 431 | { "Week starts on Sunday","Woche beginnt Sonntags" }, |
432 | { "What's Next View:","What's Next Anz." }, | 432 | { "What's Next View:","What's Next Anz." }, |
433 | { "What's next ?","Was kommt als nächstes?(What's Next)" }, | 433 | { "What's next ?","Was kommt als nächstes?(What's Next)" }, |
434 | { "Working Hours","Tägliche Arbeitszeit" }, | 434 | { "Working Hours","Tägliche Arbeitszeit" }, |
435 | { "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, | 435 | { "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, |
436 | { "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, | 436 | { "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, |
437 | { "Write back synced file","Syncronisierte Datei zurückschreiben" }, | 437 | { "Write back synced file","Syncronisierte Datei zurückschreiben" }, |
438 | { "Yearly","Jährlich" }, | 438 | { "Yearly","Jährlich" }, |
439 | { "year(s)","Jahr(e)" }, | 439 | { "year(s)","Jahr(e)" }, |
440 | { "Yes","Ja" }, | 440 | { "Yes","Ja" }, |
441 | { "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, | 441 | { "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, |
442 | { "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, | 442 | { "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, |
443 | { "week(s) on:","Woche(n) am: " }, | 443 | { "week(s) on:","Woche(n) am: " }, |
444 | { "Full menu bar(nr)","Volle Menuleiste(bn)" }, | 444 | { "Full menu bar(nr)","Volle Menuleiste(bn)" }, |
445 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, | 445 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, |
446 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, | 446 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, |
447 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, | 447 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, |
448 | { "Daylight start:","Sommerzeit Start:" }, | 448 | { "Daylight start:","Sommerzeit Start:" }, |
449 | { "Daylight end:","Sommerzeit Ende:" }, | 449 | { "Daylight end:","Sommerzeit Ende:" }, |
450 | { "Time Zone","Zeitzone" }, | 450 | { "Time Zone","Zeitzone" }, |
451 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, | 451 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, |
452 | { "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, | 452 | { "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, |
453 | { "minutely","minütlich" }, | 453 | { "minutely","minütlich" }, |
454 | { "hourly","stündlich" }, | 454 | { "hourly","stündlich" }, |
455 | { "daily","täglich" }, | 455 | { "daily","täglich" }, |
456 | { "weekly","wöchentlich" }, | 456 | { "weekly","wöchentlich" }, |
457 | { "monthly","monatlich" }, | 457 | { "monthly","monatlich" }, |
458 | { "day-monthly","tag-monatlich" }, | 458 | { "day-monthly","tag-monatlich" }, |
459 | { "month-yearly","monat-jährlich" }, | 459 | { "month-yearly","monat-jährlich" }, |
460 | { "day-yearly","tag-jährlich" }, | 460 | { "day-yearly","tag-jährlich" }, |
461 | { "position-yearly","pos-jährlich" }, | 461 | { "position-yearly","pos-jährlich" }, |
462 | { "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, | 462 | { "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, |
463 | { "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, | 463 | { "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, |
464 | { "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, | 464 | { "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, |
465 | { "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, | 465 | { "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, |
466 | { "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, | 466 | { "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, |
467 | { "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, | 467 | { "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, |
468 | { "Event list view uses full window","Listenansicht nutzt Vollbild" }, | 468 | { "Event list view uses full window","Listenansicht nutzt Vollbild" }, |
469 | { "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, | 469 | { "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, |
470 | { "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, | 470 | { "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, |
471 | { "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, | 471 | { "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, |
472 | { "ViewChange","Ansichtswechsel" }, | 472 | { "ViewChange","Ansichtswechsel" }, |
473 | { "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, | 473 | { "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, |
474 | { "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, | 474 | { "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, |
475 | { "File","Datei" }, | 475 | { "File","Datei" }, |
476 | { "Clone...","Dupliziere.." }, | 476 | { "Clone...","Dupliziere.." }, |
477 | { "Move...","Bewege..." }, | 477 | { "Move...","Bewege..." }, |
478 | { "Beam...","Sende via IR..." }, | 478 | { "Beam...","Sende via IR..." }, |
479 | { "&Clone...","Dupliziere.." }, | 479 | { "&Clone...","Dupliziere.." }, |
480 | { "&Move...","Bewege..." }, | 480 | { "&Move...","Bewege..." }, |
481 | { "&Beam...","Sende via IR..." }, | 481 | { "&Beam...","Sende via IR..." }, |
482 | { "Show Completed","Zeige erledigte Todos" }, | 482 | { "Show Completed","Zeige erledigte Todos" }, |
483 | { "Show Quick Todo","Zeige Quick Todo" }, | 483 | { "Show Quick Todo","Zeige Quick Todo" }, |
484 | { "Unparent Todo","Un-sub Todo" }, | 484 | { "Unparent Todo","Un-sub Todo" }, |
485 | { "Save selected to file...","Speichere Selektierte..." }, | 485 | { "Save selected to file...","Speichere Selektierte..." }, |
486 | { "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, | 486 | { "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, |
487 | { "Set Categ. for selected...","Setze Kateg. für Selekt." }, | 487 | { "Set Categ. for selected...","Setze Kateg. für Selekt." }, |
488 | { "Beam selected via IR","Sende Selekt. via IR..." }, | 488 | { "Beam selected via IR","Sende Selekt. via IR..." }, |
489 | { "Search","Suchen" }, | 489 | { "Search","Suchen" }, |
490 | { "Date Picker","Datum auswählen" }, | 490 | { "Date Picker","Datum auswählen" }, |
491 | { "Day View","Tagesansicht" }, | 491 | { "Day View","Tagesansicht" }, |
492 | { "Work Week","Arbeitswoche" }, | 492 | { "Work Week","Arbeitswoche" }, |
493 | { "Week","Wochenansicht" }, | 493 | { "Week","Wochenansicht" }, |
494 | { "Month","Monatsansicht" }, | 494 | { "Month","Monatsansicht" }, |
495 | { "Todo View","Todo Liste" }, | 495 | { "Todo View","Todo Liste" }, |
496 | { "Journal","Journal" }, | 496 | { "Journal","Journal" }, |
497 | { "Next days","Nächste Tage" }, | 497 | { "Next days","Nächste Tage" }, |
498 | { "Print agenda selection...","Drucke Agendaselektion..." }, | 498 | { "Print agenda selection...","Drucke Agendaselektion..." }, |
499 | { "Toggle DateNavigator","Navigator umschalten" }, | 499 | { "Toggle DateNavigator","Navigator umschalten" }, |
500 | { "Toggle FilterView","Filteransicht umschalten" }, | 500 | { "Toggle FilterView","Filteransicht umschalten" }, |
501 | { "Prev. month","Vorheriger Monat" }, | 501 | { "Prev. month","Vorheriger Monat" }, |
502 | { "Go backward","Gehe zurück" }, | 502 | { "Go backward","Gehe zurück" }, |
503 | { "Go forward","Gehe weiter" }, | 503 | { "Go forward","Gehe weiter" }, |
504 | { "Synchronize","Synchronisieren" }, | 504 | { "Synchronize","Synchronisieren" }, |
505 | { "AgendaSize","Agendagröße" }, | 505 | { "AgendaSize","Agendagröße" }, |
506 | { "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, | 506 | { "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, |
507 | { "Import last file","Importiere letzte Datei" }, | 507 | { "Import last file","Importiere letzte Datei" }, |
508 | { "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, | 508 | { "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, |
509 | { "Load Calendar Backup","Lade Kalender Backup" }, | 509 | { "Load Calendar Backup","Lade Kalender Backup" }, |
510 | { "Save Calendar Backup","Speichere Kalender Backup" }, | 510 | { "Save Calendar Backup","Speichere Kalender Backup" }, |
511 | { "Export VCalendar","Exportiere VCalendar" }, | 511 | { "Export VCalendar","Exportiere VCalendar" }, |
512 | { "Manage new categories...","Verwalte neue Kategorien..." }, | 512 | { "Manage new categories...","Verwalte neue Kategorien..." }, |
513 | { "Beam complete calendar...","Sende kompletten Kalender via IR" }, | 513 | { "Beam complete calendar...","Sende kompletten Kalender via IR" }, |
514 | { "Beam filtered calendar...","Sende gefilterten Kalender via IR" }, | 514 | { "Beam filtered calendar...","Sende gefilterten Kalender via IR" }, |
515 | { "Remote via ssh","Über Netzwerk via ssh" }, | 515 | { "Remote via ssh","Über Netzwerk via ssh" }, |
516 | { "With local file","Mit lokaler Datei" }, | 516 | { "With local file","Mit lokaler Datei" }, |
517 | { "With last file","Mit letzter Datei" }, | 517 | { "With last file","Mit letzter Datei" }, |
518 | { "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, | 518 | { "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, |
519 | { "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, | 519 | { "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, |
520 | { "Save filename","Speichern: Dateinamen wählen" }, | 520 | { "Save filename","Speichern: Dateinamen wählen" }, |
521 | { "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, | 521 | { "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, |
522 | { "KO/Pi: Warning!","KO/Pi: Warnung!" }, | 522 | { "KO/Pi: Warning!","KO/Pi: Warnung!" }, |
523 | { "Overwrite!","Überschreibe!" }, | 523 | { "Overwrite!","Überschreibe!" }, |
524 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 524 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
525 | { "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" }, | 525 | { "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" }, |
526 | { "KO/Pi Confirmation","KO/Pi Bestätigung" }, | 526 | { "KO/Pi Confirmation","KO/Pi Bestätigung" }, |
527 | { "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, | 527 | { "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, |
528 | { "Deleting item %d ...","Lösche Eintrag %d ..." }, | 528 | { "Deleting item %d ...","Lösche Eintrag %d ..." }, |
529 | { "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, | 529 | { "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, |
530 | { "Size","Größe" }, | 530 | { "Size","Größe" }, |
531 | { "Date","Datum" }, | 531 | { "Date","Datum" }, |
532 | { "Mime Type","Datei Typ" }, | 532 | { "Mime Type","Datei Typ" }, |
533 | { "All Files","Alle Dateien" }, | 533 | { "All Files","Alle Dateien" }, |
534 | { "Files","Dateien" }, | 534 | { "Files","Dateien" }, |
535 | { "Documents","DoKumente" }, | 535 | { "Documents","DoKumente" }, |
536 | { "Select Categories","Selektiere Kategorien" }, | 536 | { "Select Categories","Selektiere Kategorien" }, |
537 | { " &Deselect All "," Auswahl aufheben " }, | 537 | { " &Deselect All "," Auswahl aufheben " }, |
538 | { "A&dd","Hinzu" }, | 538 | { "A&dd","Hinzu" }, |
539 | { "&Modify","Ändern" }, | 539 | { "&Modify","Ändern" }, |
540 | { "Edit Categories","Editiere Kategorien" }, | 540 | { "Edit Categories","Editiere Kategorien" }, |
541 | { " &Edit Categories "," &Editiere Kategorien " }, | 541 | { " &Edit Categories "," &Editiere Kategorien " }, |
542 | { "Beam Options","Beam Einstellungen" }, | 542 | { "Beam Options","Beam Einstellungen" }, |
543 | { " With timezone "," Mit Zeitzone " }, | 543 | { " With timezone "," Mit Zeitzone " }, |
544 | { " Local time ", " Lokale Zeit " }, | 544 | { " Local time ", " Lokale Zeit " }, |
545 | { "Manage new Categories","Verwalte neue Kategorien" }, | 545 | { "Manage new Categories","Verwalte neue Kategorien" }, |
546 | { "Add to category list","Füge zur Kategorieliste hinzu" }, | 546 | { "Add to category list","Füge zur Kategorieliste hinzu" }, |
547 | { "Remove from Events/Todos","Entferne von Terminen/Todos" }, | 547 | { "Remove from Events/Todos","Entferne von Terminen/Todos" }, |
548 | { "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, | 548 | { "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, |
549 | { "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, | 549 | { "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, |
550 | { "File format","Datei Format" }, | 550 | { "File format","Datei Format" }, |
551 | { "Time format","Zeit Format" }, | 551 | { "Time format","Zeit Format" }, |
552 | { "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, | 552 | { "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, |
553 | { "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, | 553 | { "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, |
554 | { "h","Std" }, | 554 | { "h","Std" }, |
555 | { "min","Min" }, | 555 | { "min","Min" }, |
556 | { "hou","Std" }, | 556 | { "hou","Std" }, |
557 | { "day","Tag" }, | 557 | { "day","Tag" }, |
558 | { "French","Französich" }, | 558 | { "French","Französich" }, |
559 | { "Time","Zeit" }, | 559 | { "Time","Zeit" }, |
560 | { "Event Viewer","Termin Ansicht" }, | 560 | { "Event Viewer","Termin Ansicht" }, |
561 | { "Cancel Sync","Sync Abbrechen" }, | 561 | { "Cancel Sync","Sync Abbrechen" }, |
562 | { "Remote","Fern" }, | 562 | { "Remote","Fern" }, |
563 | { "Local","Lokal" }, | 563 | { "Local","Lokal" }, |
564 | { "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, | 564 | { "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, |
565 | { "Local: ","Lokal: " }, | 565 | { "Local: ","Lokal: " }, |
566 | { "Remote: ","Fern: " }, | 566 | { "Remote: ","Fern: " }, |
567 | { "Last modified: ","Zuletzt geändert: " }, | 567 | { "Last modified: ","Zuletzt geändert: " }, |
568 | { "Location: ","Ort: " }, | 568 | { "Location: ","Ort: " }, |
569 | { "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, | 569 | { "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, |
570 | { "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, | 570 | { "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, |
571 | { "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, | 571 | { "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, |
572 | { "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, | 572 | { "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, |
573 | { "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, | 573 | { "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, |
574 | { "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, | 574 | { "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, |
575 | { "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, | 575 | { "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, |
576 | { "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, | 576 | { "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, |
577 | { "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, | 577 | { "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, |
578 | { "( %1 min before )","( %1 min vorher )" }, | 578 | { "( %1 min before )","( %1 min vorher )" }, |
579 | { "<b>Alarm on: ","<b>Alarm am: " }, | 579 | { "<b>Alarm on: ","<b>Alarm am: " }, |
580 | { "<b>Details: </b>","<b>Details: </b>" }, | 580 | { "<b>Details: </b>","<b>Details: </b>" }, |
581 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, | 581 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, |
582 | { "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, | 582 | { "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, |
583 | { "Organizer","Organisator" }, | 583 | { "Organizer","Organisator" }, |
584 | { "Save","Speichern" }, | 584 | { "Save","Speichern" }, |
585 | { "Exit (+save)","Beenden (+ speichern)" }, | 585 | { "Exit (+save)","Beenden (+ speichern)" }, |
586 | { "Home","Zuhause" }, | 586 | { "Home","Zuhause" }, |
587 | { "Office","Büro" }, | 587 | { "Office","Büro" }, |
588 | { "Libary","Bücherei" }, | 588 | { "Libary","Bücherei" }, |
589 | { "Doctor","Arzt" }, | 589 | { "Doctor","Arzt" }, |
590 | { "Beach","Strand" }, | 590 | { "Beach","Strand" }, |
591 | { "Conference room","Konferenzraum" }, | 591 | { "Conference room","Konferenzraum" }, |
592 | { "Drive Home","Heimfahrt" }, | 592 | { "Drive Home","Heimfahrt" }, |
593 | { "Watch TV","Tv gucken" }, | 593 | { "Watch TV","Tv gucken" }, |
594 | { "Phone call","Telefonanruf" }, | 594 | { "Phone call","Telefonanruf" }, |
595 | { "Pay bill","Rechnung bezahlen" }, | 595 | { "Pay bill","Rechnung bezahlen" }, |
596 | { "Read book","Buch lesen" }, | 596 | { "Read book","Buch lesen" }, |
597 | { "Watering plants","Pflanzen giessen" }, | 597 | { "Watering plants","Pflanzen giessen" }, |
598 | {"Appointment","Verabredung" }, | 598 | {"Appointment","Verabredung" }, |
599 | {"Birthday","Geburtstag" }, | 599 | {"Birthday","Geburtstag" }, |
600 | {"Business","Geschäft" }, | 600 | {"Business","Geschäft" }, |
601 | {"Business Travel","Geschäftsreise" }, | 601 | {"Business Travel","Geschäftsreise" }, |
602 | {"Cinema","Kino" }, | 602 | {"Cinema","Kino" }, |
603 | {"Customer","Kunde" }, | 603 | {"Customer","Kunde" }, |
604 | {"Break","Pause" }, | 604 | {"Break","Pause" }, |
605 | {"Breakfast","Frühstück" }, | 605 | {"Breakfast","Frühstück" }, |
606 | {"Competition","Wettkampf" }, | 606 | {"Competition","Wettkampf" }, |
607 | {"Dinner","Abendessen" }, | 607 | {"Dinner","Abendessen" }, |
608 | {"Education","Erziehung" }, | 608 | {"Education","Erziehung" }, |
609 | {"Family","Familie" }, | 609 | {"Family","Familie" }, |
610 | {"Favorites","Favoriten" }, | 610 | {"Favorites","Favoriten" }, |
611 | {"Festival","Festival" }, | 611 | {"Festival","Festival" }, |
612 | {"Fishing","Angeln" }, | 612 | {"Fishing","Angeln" }, |
613 | {"Flight","Flug" }, | 613 | {"Flight","Flug" }, |
614 | {"Gifts","Geschenk" }, | 614 | {"Gifts","Geschenk" }, |
615 | {"Holiday","Feiertag" }, | 615 | {"Holiday","Feiertag" }, |
616 | {"Holiday Cards","Ansichtskarten" }, | 616 | {"Holiday Cards","Ansichtskarten" }, |
617 | {"Hot Contacts","Heisse Kontakte" }, | 617 | {"Hot Contacts","Heisse Kontakte" }, |
618 | {"Hiking","Wandern" }, | 618 | {"Hiking","Wandern" }, |
619 | {"Hunting","Jagen" }, | 619 | {"Hunting","Jagen" }, |
620 | {"Key Customer","Wichtiger Kunde" }, | 620 | {"Key Customer","Wichtiger Kunde" }, |
621 | {"Kids","Kinder" }, | 621 | {"Kids","Kinder" }, |
622 | {"Lunch","Mittagessen" }, | 622 | {"Lunch","Mittagessen" }, |
623 | {"Meeting","Treffen" }, | 623 | {"Meeting","Treffen" }, |
624 | {"Miscellaneous","Verschiedenes" }, | 624 | {"Miscellaneous","Verschiedenes" }, |
625 | {"Partner","Partner" }, | 625 | {"Partner","Partner" }, |
626 | {"Party","Partie" }, | 626 | {"Party","Partie" }, |
627 | {"Personal","Privat" }, | 627 | {"Personal","Privat" }, |
628 | {"Personal Travel","Privatreise"}, | 628 | {"Personal Travel","Privatreise"}, |
629 | {"PHB","PHB" }, | 629 | {"PHB","PHB" }, |
630 | {"Phone Calls","Telefonanruf" }, | 630 | {"Phone Calls","Telefonanruf" }, |
631 | {"Projects","Projekt" }, | 631 | {"Projects","Projekt" }, |
632 | {"Recurring","Wiederholend" }, | 632 | {"Recurring","Wiederholend" }, |
633 | {"School","Schule" }, | 633 | {"School","Schule" }, |
634 | {"Shopping","Einkaufen" }, | 634 | {"Shopping","Einkaufen" }, |
635 | {"Speach","Rede" }, | 635 | {"Speach","Rede" }, |
636 | {"Special Occasion","Spez.Gelegenheit" }, | 636 | {"Special Occasion","Spez.Gelegenheit" }, |
637 | {"Sports","Sport" }, | 637 | {"Sports","Sport" }, |
638 | {"Talk","Vortrag" }, | 638 | {"Talk","Vortrag" }, |
639 | {"Travel","Reise" }, | 639 | {"Travel","Reise" }, |
640 | {"TV","TV" }, | 640 | {"TV","TV" }, |
641 | {"Germany","Deutschland" }, | 641 | {"Germany","Deutschland" }, |
642 | {"Sweden","Schweden" }, | 642 | {"Sweden","Schweden" }, |
643 | {"Forest","Wald" }, | 643 | {"Forest","Wald" }, |
644 | { "Desert","Wüste" }, | 644 | { "Desert","Wüste" }, |
645 | { "Kitchen","Küche" }, | 645 | { "Kitchen","Küche" }, |
646 | { "Lake","See" }, | 646 | { "Lake","See" }, |
647 | {"University","Universität"}, | 647 | {"University","Universität"}, |
648 | {"Vacation","Urlaub" }, | 648 | {"Vacation","Urlaub" }, |
649 | {"VIP","VIP" }, | 649 | {"VIP","VIP" }, |
650 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, | 650 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, |
651 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, | 651 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, |
652 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, | 652 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, |
653 | { "Cancelled","Gecancelt" }, | 653 | { "Cancelled","Gecancelt" }, |
654 | { "Multiple sync","Mehrfach Sync" }, | 654 | { "Multiple sync","Mehrfach Sync" }, |
655 | { "Local file","Lokale Datei" }, | 655 | { "Local file","Lokale Datei" }, |
656 | { "Last file","Letzte Datei" }, | 656 | { "Last file","Letzte Datei" }, |
657 | { "Keys + Colors...","Tasten + Farben..." }, | 657 | { "Keys + Colors...","Tasten + Farben..." }, |
658 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, | 658 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, |
659 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, | 659 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, |
660 | { "Choose...","Wähle..." }, | 660 | { "Choose...","Wähle..." }, |
661 | { "Use colors for application:","Setze Farben für Programm:" }, | 661 | { "Use colors for application:","Setze Farben für Programm:" }, |
662 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, | 662 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, |
663 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, | 663 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, |
664 | { "Show parent To-Do's","Zeige Ober-Todos" }, | 664 | { "Show parent To-Do's","Zeige Ober-Todos" }, |
665 | { "Show location","Zeige Orte" }, | 665 | { "Show location","Zeige Orte" }, |
666 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, | 666 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, |
667 | { "Show in every cell ","Zeige in jeder Zelle " }, | 667 | { "Show in every cell ","Zeige in jeder Zelle " }, |
668 | { "short month","kurzen Monat" }, | 668 | { "short month","kurzen Monat" }, |
669 | { "icons","Icons" }, | 669 | { "icons","Icons" }, |
670 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, | 670 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, |
671 | { "Category colors are applied to text","Kategorie Farben färben Text" }, | 671 | { "Category colors are applied to text","Kategorie Farben färben Text" }, |
672 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, | 672 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, |
673 | { "Day color odd months","Tagesfarbe ungerade Monate" }, | 673 | { "Day color odd months","Tagesfarbe ungerade Monate" }, |
674 | { "Day color even months","Tagesfarbe gerade Monate" }, | 674 | { "Day color even months","Tagesfarbe gerade Monate" }, |
675 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, | 675 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, |
676 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, | 676 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, |
677 | { "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, | 677 | { "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, |
678 | { "Colors are applied to text","Farben werden auf Text angewendet" }, | 678 | { "Colors are applied to text","Farben werden auf Text angewendet" }, |
679 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, | 679 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, |
680 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, | 680 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, |
681 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, | 681 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, |
682 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, | 682 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, |
683 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, | 683 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, |
684 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, | 684 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, |
685 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, | 685 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, |
686 | { "New profile","Neues Profil" }, | 686 | { "New profile","Neues Profil" }, |
687 | { "Clone profile","Klone Profil" }, | 687 | { "Clone profile","Klone Profil" }, |
688 | { "Delete profile","Lösche Profil" }, | 688 | { "Delete profile","Lösche Profil" }, |
689 | { "Profile:","Profil:" }, | 689 | { "Profile:","Profil:" }, |
690 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, | 690 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, |
691 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, | 691 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, |
692 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, | 692 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, |
693 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, | 693 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, |
694 | { "Write back file","Schreibe Datei zurück" }, | 694 | { "Write back file","Schreibe Datei zurück" }, |
695 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, | 695 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, |
696 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, | 696 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, |
697 | { "Local device name:","Name dieses Gerätes:" }, | 697 | { "Local device name:","Name dieses Gerätes:" }, |
698 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, | 698 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, |
699 | { "Sync preferences","Synchronisations Einstellungen" }, | 699 | { "Sync preferences","Synchronisations Einstellungen" }, |
700 | { "Profile kind","Profil Art" }, | 700 | { "Profile kind","Profil Art" }, |
701 | { "Local file","Lokale Datei" }, | 701 | { "Local file","Lokale Datei" }, |
702 | { "Local file:","Lokale Datei:" }, | 702 | { "Local file:","Lokale Datei:" }, |
703 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, | 703 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, |
704 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, | 704 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, |
705 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, | 705 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, |
706 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, | 706 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, |
707 | { "Device","Gerät:" }, | 707 | { "Device","Gerät:" }, |
708 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, | 708 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, |
709 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, | 709 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, |
710 | { "Synchronization successful","Synchronisation erfolgreich" }, | 710 | { "Synchronization successful","Synchronisation erfolgreich" }, |
711 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, | 711 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, |
712 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, | 712 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, |
713 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, | 713 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, |
714 | { "Enter password","Passwort eingeben" }, | 714 | { "Enter password","Passwort eingeben" }, |
715 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, | 715 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, |
716 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, | 716 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, |
717 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, | 717 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, |
718 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, | 718 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, |
719 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, | 719 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, |
720 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, | 720 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, |
721 | { "Enter filter name:","Neuer Filter Name:" }, | 721 | { "Enter filter name:","Neuer Filter Name:" }, |
722 | { "Add Filter","Filter hinzufügen" }, | 722 | { "Add Filter","Filter hinzufügen" }, |
723 | { "Question","Frage" }, | 723 | { "Question","Frage" }, |
724 | { "Filter position: ","Filter Position: " }, | 724 | { "Filter position: ","Filter Position: " }, |
725 | { "Month View","Monatsansicht" }, | 725 | { "Month View","Monatsansicht" }, |
726 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, | 726 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, |
727 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, | 727 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, |
728 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, | 728 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, |
729 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, | 729 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, |
730 | { "Access: ","Zugriff: " }, | 730 | { "Access: ","Zugriff: " }, |
731 | { "Needs Action","Aktion notwendig" }, | 731 | { "Needs Action","Aktion notwendig" }, |
732 | { "Accepted","Akzeptiert" }, | 732 | { "Accepted","Akzeptiert" }, |
733 | { "Declined","Abgelehnt" }, | 733 | { "Declined","Abgelehnt" }, |
734 | { "Tentative","Vorläufig" }, | 734 | { "Tentative","Vorläufig" }, |
735 | { "Delegated","Beauftragt" }, | 735 | { "Delegated","Beauftragt" }, |
736 | { "Completed","Vollständig" }, | 736 | { "Completed","Vollständig" }, |
737 | { "In Process","In Bearbeitung" }, | 737 | { "In Process","In Bearbeitung" }, |
738 | { "Participant","Teilnehmer" }, | 738 | { "Participant","Teilnehmer" }, |
739 | { "Optional Participant","Möglicher Teilnehmer" }, | 739 | { "Optional Participant","Möglicher Teilnehmer" }, |
740 | { "Observer","Beobachter" }, | 740 | { "Observer","Beobachter" }, |
741 | { "Chair","Vorsitzender" }, | 741 | { "Chair","Vorsitzender" }, |
742 | { "Not supported \non desktop!\n","" }, | 742 | { "Not supported \non desktop!\n","" }, |
743 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, | 743 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, |
744 | { "Date range: ","Datums Zeitspanne: " }, | 744 | { "Date range: ","Datums Zeitspanne: " }, |
745 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, | 745 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, |
746 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, | 746 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, |
747 | { "Add / remove events","Add./entferne Termine" }, | 747 | { "Add / remove events","Add./entferne Termine" }, |
748 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, | 748 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, |
749 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, | 749 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, |
750 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, | 750 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, |
751 | { "Overwrite","Überschreiben" }, | 751 | { "Overwrite","Überschreiben" }, |
752 | { "Sync+save","Syncen+speichern" }, | 752 | { "Sync+save","Syncen+speichern" }, |
753 | { "Default","Standard" }, | 753 | { "Default","Standard" }, |
754 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, | 754 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, |
755 | { " %d items?"," %d Einträge?" }, | 755 | { " %d items?"," %d Einträge?" }, |
756 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, | 756 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, |
757 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, | 757 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, |
758 | { "Current","Aktuelle" }, | 758 | { "Current","Aktuelle" }, |
759 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, | 759 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, |
760 | { "All","Alle" }, | 760 | { "All","Alle" }, |
761 | { "Data Loss Warning","Datenverlust Warnung" }, | 761 | { "Data Loss Warning","Datenverlust Warnung" }, |
762 | { "Proceed","Weitermachen" }, | 762 | { "Proceed","Weitermachen" }, |
763 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, | 763 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, |
764 | { "Filter disabled ","Filter abgeschaltet" }, | 764 | { "Filter disabled ","Filter abgeschaltet" }, |
765 | { "Filter selected: ","Gewählter Filter: " }, | 765 | { "Filter selected: ","Gewählter Filter: " }, |
766 | { "Toggle Cancel","Gecancelt ändern" }, | 766 | { "Toggle Cancel","Gecancelt ändern" }, |
767 | { "&Toggle Cancel","Gecancel&t ändern" }, | 767 | { "&Toggle Cancel","Gecancel&t ändern" }, |
768 | { "Configure Toolbar","Konfiguriere Toolbar" }, | 768 | { "Configure Toolbar","Konfiguriere Toolbar" }, |
769 | { "Stretched TB","Gedehnte TB" }, | 769 | { "Stretched TB","Gedehnte TB" }, |
770 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, | 770 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, |
771 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, | 771 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, |
772 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, | 772 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, |
773 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, | 773 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, |
774 | { "Imported file successfully","Datei erfolgreich importiert" }, | 774 | { "Imported file successfully","Datei erfolgreich importiert" }, |
775 | { "Error importing file","Fehler beim Importieren der Datei" }, | 775 | { "Error importing file","Fehler beim Importieren der Datei" }, |
776 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, | 776 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, |
777 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, | 777 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, |
778 | { "Overwrite!","Überschreiben!" }, | 778 | { "Overwrite!","Überschreiben!" }, |
779 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, | 779 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, |
780 | { "Load backup filename","Lade Backup Dateiname" }, | 780 | { "Load backup filename","Lade Backup Dateiname" }, |
781 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, | 781 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, |
782 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, | 782 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, |
783 | { "Save backup filename","Speichere Backup Dateiname" }, | 783 | { "Save backup filename","Speichere Backup Dateiname" }, |
784 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, | 784 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, |
785 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 785 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
786 | { "Details of attendee","Teilnehmerdetails" }, | 786 | { "Details of attendee","Teilnehmerdetails" }, |
787 | { "Work phone:\n","Telefon Arbeit:\n" }, | 787 | { "Work phone:\n","Telefon Arbeit:\n" }, |
788 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, | 788 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, |
789 | { "Home phone:\n","Telefon privat:\n" }, | 789 | { "Home phone:\n","Telefon privat:\n" }, |
790 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, | 790 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, |
791 | { "Email:\n","Email:\n" }, | 791 | { "Email:\n","Email:\n" }, |
792 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, | 792 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, |
793 | { "Audio Al.: ","Audio Al.: " }, | 793 | { "Audio Al.: ","Audio Al.: " }, |
794 | { "Proc.Al.: ","Proz.Al.: " }, | 794 | { "Proc.Al.: ","Proz.Al.: " }, |
795 | { "No sound set","Kein Sound definiert" }, | 795 | { "No sound set","Kein Sound definiert" }, |
796 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, | 796 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, |
797 | { "No program set","Kein Programm definiert" }, | 797 | { "No program set","Kein Programm definiert" }, |
798 | { "Running '%1'","Ausführen '%1'" }, | 798 | { "Running '%1'","Ausführen '%1'" }, |
799 | { "Playing '%1'","Abspielen '%1'" }, | 799 | { "Playing '%1'","Abspielen '%1'" }, |
800 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, | 800 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, |
801 | { "Load!","Laden!" }, | 801 | { "Load!","Laden!" }, |
802 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, | 802 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, |
803 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, | 803 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, |
804 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, | 804 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, |
805 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, | 805 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, |
806 | { "Features + hints...","Eigenschaften + Tipps..." }, | 806 | { "Features + hints...","Eigenschaften + Tipps..." }, |
807 | { "User translation...","Benutzer Übersetzung..." }, | 807 | { "User translation...","Benutzer Übersetzung..." }, |
808 | { "Sync HowTo...","Synchronisation HowTo..." }, | 808 | { "Sync HowTo...","Synchronisation HowTo..." }, |
809 | { "Print calendar...","Drucke Kalender..." }, | 809 | { "Print calendar...","Drucke Kalender..." }, |
810 | { "Anniversary","Jahrestag" }, | 810 | { "Anniversary","Jahrestag" }, |
811 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, | 811 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, |
812 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, | 812 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, |
813 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, | 813 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, |
814 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, | 814 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, |
815 | { "<b>Access: </b>","<b>Zugriff: </b>" }, | 815 | { "<b>Access: </b>","<b>Zugriff: </b>" }, |
816 | { "(%1 min before)","(%1 min vorher)" }, | 816 | { "(%1 min before)","(%1 min vorher)" }, |
817 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, | 817 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, |
818 | { "Save Journal/Description...","Speichere Journal/Details..." }, | 818 | { "Save Journal/Description...","Speichere Journal/Details..." }, |
819 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, | 819 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, |
820 | { "Continue","Weitermachen" }, | 820 | { "Continue","Weitermachen" }, |
821 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, | 821 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, |
822 | { "Attendee:","Teilnehmer:" }, | 822 | { "Attendee:","Teilnehmer:" }, |
823 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, | 823 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, |
824 | { "On day ","Am Tag " }, | 824 | { "On day ","Am Tag " }, |
825 | { "%1 of ","%1 des Monats" }, | 825 | { "%1 of ","%1 des Monats" }, |
826 | { "%1 of the year","%1 des Jahres" }, | 826 | { "%1 of the year","%1 des Jahres" }, |
827 | { "Anonymous","Anonymo" }, | 827 | { "Anonymous","Anonymo" }, |
828 | { "nobody@nowhere","niemand@nirgendwo" }, | 828 | { "nobody@nowhere","niemand@nirgendwo" }, |
829 | { "calendar.html","calendar.html" }, | 829 | { "calendar.html","calendar.html" }, |
830 | { " Local Time"," Locale Zeit" }, | 830 | { " Local Time"," Locale Zeit" }, |
831 | { "Unknown Name","Unbekannter Name" }, | 831 | { "Unknown Name","Unbekannter Name" }, |
832 | { "unknown@nowhere","unbekannt@nirgendwo" }, | 832 | { "unknown@nowhere","unbekannt@nirgendwo" }, |
833 | { "Beam via IR!","Beam via IR!" }, | 833 | { "Beam via IR!","Beam via IR!" }, |
834 | { "Next Month","Nächster Monat" }, | 834 | { "Next Month","Nächster Monat" }, |
835 | { "Prio","Prio" }, | 835 | { "Prio","Prio" }, |
836 | { "Reparent Todo","Mache Sub-Todo" }, | 836 | { "Reparent Todo","Mache Sub-Todo" }, |
837 | { "tomorrow","morgen" }, | 837 | { "tomorrow","morgen" }, |
838 | { "today","heute" }, | 838 | { "today","heute" }, |
839 | { "yesterday","gestern" }, | 839 | { "yesterday","gestern" }, |
840 | { "Ok","Ok" }, | 840 | { "Ok","Ok" }, |
841 | { "Ok+Agenda","Ok+Agenda" }, | 841 | { "Ok+Agenda","Ok+Agenda" }, |
842 | { "Email","Email" }, | 842 | { "Email","Email" }, |
843 | { "RSVP","RSVP" }, | 843 | { "RSVP","RSVP" }, |
844 | { "Email:","Email:" }, | 844 | { "Email:","Email:" }, |
845 | { "Appointment Time ","Termin Zeit " }, | 845 | { "Appointment Time ","Termin Zeit " }, |
846 | { "2","2" }, | 846 | { "2","2" }, |
847 | { "3","3" }, | 847 | { "3","3" }, |
848 | { "4","4" }, | 848 | { "4","4" }, |
849 | { " 0 %"," 0 %" }, | 849 | { " 0 %"," 0 %" }, |
850 | { " 20 %"," 20 %" }, | 850 | { " 20 %"," 20 %" }, |
851 | { " 40 %"," 40 %" }, | 851 | { " 40 %"," 40 %" }, |
852 | { " 60 %"," 60 %" }, | 852 | { " 60 %"," 60 %" }, |
853 | { " 80 %"," 80 %" }, | 853 | { " 80 %"," 80 %" }, |
854 | { "100 %","100 %" }, | 854 | { "100 %","100 %" }, |
855 | { "Filter","Filter" }, | 855 | { "Filter","Filter" }, |
856 | { "Configure","Konfiguriere" }, | 856 | { "Configure","Konfiguriere" }, |
857 | { "What's Next","What's Next" }, | 857 | { "What's Next","What's Next" }, |
858 | { "Complete calendar...","Kompletten Kalender..." }, | 858 | { "Complete calendar...","Kompletten Kalender..." }, |
859 | { "Filtered calendar...","Gefilterten Kalender..." }, | 859 | { "Filtered calendar...","Gefilterten Kalender..." }, |
860 | { "Export to phone","Exportiere zum Handy" }, | 860 | { "Export to phone","Exportiere zum Handy" }, |
861 | { "Beam receive enabled","Beam Empfang an" }, | 861 | { "Beam receive enabled","Beam Empfang an" }, |
862 | { "What's new?","Was ist neu?" }, | 862 | { "What's new?","Was ist neu?" }, |
863 | { "FAQ...","FAQ..." }, | 863 | { "FAQ...","FAQ..." }, |
864 | { "Licence...","Licence..." }, | 864 | { "Licence...","Licence..." }, |
865 | { "What's This?","What's This?" }, | 865 | { "What's This?","What's This?" }, |
866 | { "&Edit...","&Editiere..." }, | 866 | { "&Edit...","&Editiere..." }, |
867 | { "Oktober","Oktober" }, | 867 | { "Oktober","Oktober" }, |
868 | { "Title","Titel" }, | 868 | { "Title","Titel" }, |
869 | { "%1 %","%1 %" }, | 869 | { "%1 %","%1 %" }, |
870 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, | 870 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, |
871 | { "Import!","Importiere!" }, | 871 | { "Import!","Importiere!" }, |
872 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, | 872 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, |
873 | { "Export to phone options","Export ans Handy Optionen" }, | 873 | { "Export to phone options","Export ans Handy Optionen" }, |
874 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, | 874 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, |
875 | { "I/O device: ","I/O device: " }, | 875 | { "I/O device: ","I/O device: " }, |
876 | { "Connection: ","Connection: " }, | 876 | { "Connection: ","Connection: " }, |
877 | { "Model(opt.): ","Model(opt.): " }, | 877 | { "Model(opt.): ","Model(opt.): " }, |
878 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, | 878 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, |
879 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, | 879 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, |
880 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, | 880 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, |
881 | { "Export to mobile phone!","Exportiere auf das Handy!" }, | 881 | { "Export to mobile phone!","Exportiere auf das Handy!" }, |
882 | { "Export complete calendar","Exportiere kompletten Kalender" }, | 882 | { "Export complete calendar","Exportiere kompletten Kalender" }, |
883 | { "Writing to phone...","Sende Daten ans Handy..." }, | 883 | { "Writing to phone...","Sende Daten ans Handy..." }, |
884 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, | 884 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, |
885 | { "Retry","Nochmal versuchen" }, | 885 | { "Retry","Nochmal versuchen" }, |
886 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, | 886 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, |
887 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, | 887 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, |
888 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, | 888 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, |
889 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, | 889 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, |
890 | { "Preferences","Vorlieben" }, | 890 | { "Preferences","Vorlieben" }, |
891 | { "Global","Global" }, | 891 | { "Global","Global" }, |
892 | { "Phone","Phone" }, | 892 | { "Phone","Phone" }, |
893 | { "SMS","SMS" }, | 893 | { "SMS","SMS" }, |
894 | { "Fax","Fax" }, | 894 | { "Fax","Fax" }, |
895 | { "Pager","Pager" }, | 895 | { "Pager","Pager" }, |
896 | { "SIP","SIP" }, | 896 | { "SIP","SIP" }, |
897 | { "Italian","Italienisch" }, | 897 | { "Italian","Italienisch" }, |
898 | { "24:00","24:00" }, | 898 | { "24:00","24:00" }, |
899 | { "12:00am","12:00am" }, | 899 | { "12:00am","12:00am" }, |
900 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, | 900 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, |
901 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, | 901 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, |
902 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, | 902 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, |
903 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, | 903 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, |
904 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, | 904 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, |
905 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, | 905 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, |
906 | { "Used Mail Client","Benutzter Mail Client" }, | 906 | { "Used Mail Client","Benutzter Mail Client" }, |
907 | { "Channel:","Channel:" }, | 907 | { "Channel:","Channel:" }, |
908 | { "Message:","Message:" }, | 908 | { "Message:","Message:" }, |
909 | { "Parameters:","Parameter:" }, | 909 | { "Parameters:","Parameter:" }, |
910 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, | 910 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, |
911 | { "extra Message:","extra Message:" }, | 911 | { "extra Message:","extra Message:" }, |
912 | { "extra Parameters:","extra Parameter:" }, | 912 | { "extra Parameters:","extra Parameter:" }, |
913 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, | 913 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, |
914 | { "External Apps.","Externe Appl." }, | 914 | { "External Apps.","Externe Appl." }, |
915 | { "24 hours","24 Std." }, | 915 | { "24 hours","24 Std." }, |
916 | { "3 hours","3 Std." }, | 916 | { "3 hours","3 Std." }, |
917 | { "1 hour","1 Std." }, | 917 | { "1 hour","1 Std." }, |
918 | { "15 minutes","15 Min." }, | 918 | { "15 minutes","15 Min." }, |
919 | { "5 minutes","5 Min." }, | 919 | { "5 minutes","5 Min." }, |
920 | { "1 minute","1 Min." }, | 920 | { "1 minute","1 Min." }, |
921 | { "23","23" }, | 921 | { "23","23" }, |
922 | { "Mon 15","Mon 15" }, | 922 | { "Mon 15","Mon 15" }, |
923 | { "Configure KO","Konfiguriere KO" }, | 923 | { "Configure KO","Konfiguriere KO" }, |
924 | { "Event text","Termin Text" }, | 924 | { "Event text","Termin Text" }, |
925 | { "ToDo","Todo" }, | 925 | { "ToDo","Todo" }, |
926 | { "Today","Heute" }, | 926 | { "Today","Heute" }, |
927 | { "What's Next View","What's Next Ansicht" }, | 927 | { "What's Next View","What's Next Ansicht" }, |
928 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, | 928 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, |
929 | { "Alarm","Alarm" }, | 929 | { "Alarm","Alarm" }, |
930 | { "Used %1 Client","Benutzter %1 Client" }, | 930 | { "Used %1 Client","Benutzter %1 Client" }, |
931 | { "No email client installed","Kein Email Klient installiert" }, | 931 | { "No email client installed","Kein Email Klient installiert" }, |
932 | { "Userdefined email client","Benutzerdef. Email Klient" }, | 932 | { "Userdefined email client","Benutzerdef. Email Klient" }, |
933 | { "OM/Pi email client","OM/Pi Email Klient" }, | 933 | { "OM/Pi email client","OM/Pi Email Klient" }, |
934 | { "Include in multiple ","Beziehe in multiple " }, | 934 | { "Include in multiple ","Beziehe in multiple " }, |
935 | { "calendar ","Kalender " }, | 935 | { "calendar ","Kalender " }, |
936 | { "addressbook ","Adressbuch " }, | 936 | { "addressbook ","Adressbuch " }, |
937 | { "pwmanager","PWmanager" }, | 937 | { "pwmanager","PWmanager" }, |
938 | { " sync"," Sync ein" }, | 938 | { " sync"," Sync ein" }, |
939 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, | 939 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, |
940 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, | 940 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, |
941 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, | 941 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, |
942 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, | 942 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, |
943 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, | 943 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, |
944 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, | 944 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, |
945 | { "Help...","Hilfe..." }, | 945 | { "Help...","Hilfe..." }, |
946 | { "Local file Cal:","Lokale Datei Kal:" }, | 946 | { "Local file Cal:","Lokale Datei Kal:" }, |
947 | { "Local file ABook:","Lokale Datei ABuch:" }, | 947 | { "Local file ABook:","Lokale Datei ABuch:" }, |
948 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, | 948 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, |
949 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, | 949 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, |
950 | { "Calendar:","Kalender:" }, | 950 | { "Calendar:","Kalender:" }, |
951 | { "AddressBook:","AdressBuch:" }, | 951 | { "AddressBook:","AdressBuch:" }, |
952 | { "PWManager:","PWManager:" }, | 952 | { "PWManager:","PWManager:" }, |
953 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, | 953 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, |
954 | { "ssh/scp","ssh/scp" }, | 954 | { "ssh/scp","ssh/scp" }, |
955 | { "ftp","ftp" }, | 955 | { "ftp","ftp" }, |
956 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, | 956 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, |
957 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, | 957 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, |
958 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, | 958 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, |
959 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, | 959 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, |
960 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, | 960 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, |
961 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, | 961 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, |
962 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, | 962 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, |
963 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, | 963 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, |
964 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, | 964 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, |
965 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, | 965 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, |
966 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, | 966 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, |
967 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, | 967 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, |
968 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, | 968 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, |
969 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, | 969 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, |
970 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, | 970 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, |
971 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, | 971 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, |
972 | { "KDE-Pim Sync","KDE-Pim Sync" }, | 972 | { "KDE-Pim Sync","KDE-Pim Sync" }, |
973 | { "Multiple profiles","Multi-Sync Profile" }, | 973 | { "Multiple profiles","Multi-Sync Profile" }, |
974 | { "Device: ","Gerät: " }, | 974 | { "Device: ","Gerät: " }, |
975 | { "Multiple sync started.","Multi-Sync gestartet." }, | 975 | { "Multiple sync started.","Multi-Sync gestartet." }, |
976 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, | 976 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, |
977 | { "Turn filter on","Schalte Filter an" }, | 977 | { "Turn filter on","Schalte Filter an" }, |
978 | { "Turn filter off","Schalte Filter aus" }, | 978 | { "Turn filter off","Schalte Filter aus" }, |
979 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, | 979 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, |
980 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, | 980 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, |
981 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, | 981 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, |
982 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, | 982 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, |
983 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, | 983 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, |
984 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, | 984 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, |
985 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, | 985 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, |
986 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, | 986 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, |
987 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, | 987 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, |
988 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, | 988 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, |
989 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, | 989 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, |
990 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, | 990 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, |
991 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, | 991 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, |
992 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, | 992 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, |
993 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, | 993 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, |
994 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, | 994 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, |
995 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, | 995 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, |
996 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, | 996 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, |
997 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, | 997 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, |
998 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, | 998 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, |
999 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, | 999 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, |
1000 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, | 1000 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, |
1001 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, | 1001 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, |
1002 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, | 1002 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, |
1003 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, | 1003 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, |
1004 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, | 1004 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, |
1005 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, | 1005 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, |
1006 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, | 1006 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, |
1007 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, | 1007 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, |
1008 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, | 1008 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, |
1009 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, | 1009 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, |
1010 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, | 1010 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, |
1011 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, | 1011 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, |
1012 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, | 1012 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, |
1013 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, | 1013 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, |
1014 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, | 1014 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, |
1015 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, | 1015 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, |
1016 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, | 1016 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, |
1017 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, | 1017 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, |
1018 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, | 1018 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, |
1019 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, | 1019 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, |
1020 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, | 1020 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, |
1021 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, | 1021 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, |
1022 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, | 1022 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, |
1023 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, | 1023 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, |
1024 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, | 1024 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, |
1025 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, | 1025 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, |
1026 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, | 1026 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, |
1027 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, | 1027 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, |
1028 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, | 1028 | { "<p><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" }, |
1029 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1029 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1030 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, | 1030 | { "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" }, |
1031 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1031 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1032 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1032 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1033 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1033 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1034 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, | 1034 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, |
1035 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, | 1035 | { "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" }, |
1036 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, | 1036 | { "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" }, |
1037 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1037 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1038 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1038 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1039 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, | 1039 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, |
1040 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1040 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1041 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1041 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1042 | { "From: ","Von: " }, | 1042 | { "From: ","Von: " }, |
1043 | { "Remove sync info","Entferne Sync Info" }, | 1043 | { "Remove sync info","Entferne Sync Info" }, |
1044 | { "For all profiles","Für alle Profile" }, | 1044 | { "For all profiles","Für alle Profile" }, |
1045 | { "Hide not Running","Verstecke nicht Laufende" }, | 1045 | { "Hide not Running","Verstecke nicht Laufende" }, |
1046 | { "ME","ME" }, | 1046 | { "ME","ME" }, |
1047 | { "Toolbar","Toolbar" }, | 1047 | { "Toolbar","Toolbar" }, |
1048 | { "Undo Delete...","Löschen rückgängig machen..." }, | 1048 | { "Undo Delete...","Löschen rückgängig machen..." }, |
1049 | { "Undo Delete","Löschen rückgängig machen" }, | 1049 | { "Undo Delete","Löschen rückgängig machen" }, |
1050 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1050 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1051 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1051 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1052 | { "Januar","Januar" }, | 1052 | { "Januar","Januar" }, |
1053 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1053 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1054 | { "No Filter","Kein Filter" }, | 1054 | { "No Filter","Kein Filter" }, |
1055 | { "Multiple Sync options","Multi Sync Optionen" }, | 1055 | { "Multiple Sync options","Multi Sync Optionen" }, |
1056 | { "Sync algo options","Sync Ablauf Optionen" }, | 1056 | { "Sync algo options","Sync Ablauf Optionen" }, |
1057 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1057 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1058 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1058 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1059 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1059 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1060 | { "Write back options","Optionen zum Zurückschreiben" }, | 1060 | { "Write back options","Optionen zum Zurückschreiben" }, |
1061 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1061 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1062 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1062 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1063 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1063 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1064 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1064 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1065 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1065 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1066 | { "Time period","Zeitspanne" }, | 1066 | { "Time period","Zeitspanne" }, |
1067 | { "From ","Von " }, | 1067 | { "From ","Von " }, |
1068 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1068 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1069 | { " weeks in the future "," Wochen in der Zukunft " }, | 1069 | { " weeks in the future "," Wochen in der Zukunft " }, |
1070 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1070 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1071 | { "Local temp file:","Lokale temp Datei:" }, | 1071 | { "Local temp file:","Lokale temp Datei:" }, |
1072 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1072 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1073 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1073 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1074 | { "Language","Sprache" }, | 1074 | { "Language","Sprache" }, |
1075 | { "Time Format","Zeit Format" }, | 1075 | { "Time Format","Zeit Format" }, |
1076 | { "Time Zone","Zeit Zone" }, | 1076 | { "Time Zone","Zeit Zone" }, |
1077 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1077 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1078 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, | 1078 | { "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" }, |
1079 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1079 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1080 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1080 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1081 | { "Save settings","Speichere Einstellungen" }, | 1081 | { "Save settings","Speichere Einstellungen" }, |
1082 | { "Save standard","Speichere Standard" }, | 1082 | { "Save standard","Speichere Standard" }, |
1083 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1083 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1084 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1084 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1085 | { "Data storage path","Daten Speicherpfad" }, | 1085 | { "Data storage path","Daten Speicherpfad" }, |
1086 | { "Language","Sprache" }, | 1086 | { "Language","Sprache" }, |
1087 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1087 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1088 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1088 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1089 | { "Show events that are done","Zeige abgelaufene Termine" }, | 1089 | { "Show events that are done","Zeige abgelaufene Termine" }, |
1090 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1090 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1091 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1091 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1092 | { "KO/Pi","KO/Pi" }, | 1092 | { "KO/Pi","KO/Pi" }, |
1093 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1093 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1094 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1094 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1095 | { "Sound.Al.: ","Sound.Al.: " }, | 1095 | { "Sound.Al.: ","Sound.Al.: " }, |
1096 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1096 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1097 | { "Restore","Wiederherstellen" }, | 1097 | { "Restore","Wiederherstellen" }, |
1098 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1098 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1099 | { "% completed","% erledigt" }, | 1099 | { "% completed","% erledigt" }, |
1100 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1100 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1101 | { "Set complete","Setze auf erledigt" }, | 1101 | { "Set complete","Setze auf erledigt" }, |
1102 | { "(cancelled)","(gecancelt)" }, | 1102 | { "(cancelled)","(gecancelt)" }, |
1103 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1103 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1104 | { " Local time "," Locale Zeit " }, | 1104 | { " Local time "," Locale Zeit " }, |
1105 | { "Form2","Form2" }, | 1105 | { "Form2","Form2" }, |
1106 | { "Filter enabled","Filter angeschaltet" }, | 1106 | { "Filter enabled","Filter angeschaltet" }, |
1107 | { "Edit Filters","Ändere Filter" }, | 1107 | { "Edit Filters","Ändere Filter" }, |
1108 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1108 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1109 | { "Agenda","Agenda" }, | 1109 | { "Agenda","Agenda" }, |
1110 | { " ("," (" }, | 1110 | { " ("," (" }, |
1111 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1111 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1112 | { "Print","Print" }, | 1112 | { "Print","Print" }, |
1113 | { "&Setup Printer...","Drucker &Setup..." }, | 1113 | { "&Setup Printer...","Drucker &Setup..." }, |
1114 | { "View Type","Zeige Typ" }, | 1114 | { "View Type","Zeige Typ" }, |
1115 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1115 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1116 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1116 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1117 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1117 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1118 | { "Portrait","Portrait" }, | 1118 | { "Portrait","Portrait" }, |
1119 | { "Landscape","Landschaft" }, | 1119 | { "Landscape","Landschaft" }, |
1120 | { "Print day","Drucke Tag" }, | 1120 | { "Print day","Drucke Tag" }, |
1121 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1121 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1122 | { "Date && Time Range","Datum && Zeitspanne" }, | 1122 | { "Date && Time Range","Datum && Zeitspanne" }, |
1123 | { "&End date:","&Enddatum:" }, | 1123 | { "&End date:","&Enddatum:" }, |
1124 | { "&Start date:","&Startdatum:" }, | 1124 | { "&Start date:","&Startdatum:" }, |
1125 | { "Start &time:","Startzeit:" }, | 1125 | { "Start &time:","Startzeit:" }, |
1126 | { "End ti&me:","Endzeit:" }, | 1126 | { "End ti&me:","Endzeit:" }, |
1127 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1127 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1128 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1128 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1129 | { "Alt+D","Alt+D" }, | 1129 | { "Alt+D","Alt+D" }, |
1130 | { "&Use colors","Nutze Farben" }, | 1130 | { "&Use colors","Nutze Farben" }, |
1131 | { "Alt+U","Alt+U" }, | 1131 | { "Alt+U","Alt+U" }, |
1132 | { "Print week","Drucke Woche" }, | 1132 | { "Print week","Drucke Woche" }, |
1133 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1133 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1134 | { "Use &colors","Nutze Farben" }, | 1134 | { "Use &colors","Nutze Farben" }, |
1135 | { "Type of View","Typ der Ansicht" }, | 1135 | { "Type of View","Typ der Ansicht" }, |
1136 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1136 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1137 | { "Alt+F","Alt+F" }, | 1137 | { "Alt+F","Alt+F" }, |
1138 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1138 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1139 | { "Alt+T","Alt+T" }, | 1139 | { "Alt+T","Alt+T" }, |
1140 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1140 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1141 | { "Print month","Drucke Monat" }, | 1141 | { "Print month","Drucke Monat" }, |
1142 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1142 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1143 | { "&Start month:","&Startmonat:" }, | 1143 | { "&Start month:","&Startmonat:" }, |
1144 | { "&End month:","&Endmonat:" }, | 1144 | { "&End month:","&Endmonat:" }, |
1145 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1145 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1146 | { "Print todos","Drucke Todos" }, | 1146 | { "Print todos","Drucke Todos" }, |
1147 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1147 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1148 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1148 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1149 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1149 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1150 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1150 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1151 | { "Items to Print","Zu druckende Items" }, | 1151 | { "Items to Print","Zu druckende Items" }, |
1152 | { "&From:","Von:" }, | 1152 | { "&From:","Von:" }, |
1153 | { "&To:","Bis:" }, | 1153 | { "&To:","Bis:" }, |
1154 | { "Print &all todo items","Drucke alle Todo Items" }, | 1154 | { "Print &all todo items","Drucke alle Todo Items" }, |
1155 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1155 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1156 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1156 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1157 | { "Todo List","Todo Liste" }, | 1157 | { "Todo List","Todo Liste" }, |
1158 | { "&Title:","&Titel:" }, | 1158 | { "&Title:","&Titel:" }, |
1159 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, | 1159 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, |
1160 | { "Todo list","Todo Liste" }, | 1160 | { "Todo list","Todo Liste" }, |
1161 | { "&Print...","Drucke..." }, | 1161 | { "&Print...","Drucke..." }, |
1162 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1162 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1163 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1163 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1164 | { "OK","OK" }, | 1164 | { "OK","OK" }, |
1165 | { "FilterEditor","FilterEditor" }, | 1165 | { "FilterEditor","FilterEditor" }, |
1166 | { "Include","Inclusive" }, | 1166 | { "Include","Inclusive" }, |
1167 | { "Exclude","Exclusive" }, | 1167 | { "Exclude","Exclusive" }, |
1168 | { "Edit Selection...","Editiere Auswahl" }, | 1168 | { "Edit Selection...","Editiere Auswahl" }, |
1169 | { "recurring events","wiederholende Termine" }, | 1169 | { "recurring events","wiederholende Termine" }, |
1170 | { "recurr. events","wiederh.Termine" }, | 1170 | { "recurr. events","wiederh.Termine" }, |
1171 | { "completed to-dos","erledigte Todos" }, | 1171 | { "completed to-dos","erledigte Todos" }, |
1172 | { "events","Termine" }, | 1172 | { "events","Termine" }, |
1173 | { "todos","Todos" }, | 1173 | { "todos","Todos" }, |
1174 | { "journals","Journale" }, | 1174 | { "journals","Journale" }, |
1175 | { "public","öffentl." }, | 1175 | { "public","öffentl." }, |
1176 | { "private","privat" }, | 1176 | { "private","privat" }, |
1177 | { "confidential","vertraul." }, | 1177 | { "confidential","vertraul." }, |
1178 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, | 1178 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, |
1179 | { "Yesterday","Gestern" }, | 1179 | { "Yesterday","Gestern" }, |
1180 | { "Day after tomorrow","Übermorgen" }, | 1180 | { "Day after tomorrow","Übermorgen" }, |
1181 | { "Tomorrow","Morgen" }, | 1181 | { "Tomorrow","Morgen" }, |
1182 | { "Day before yesterday","Vorgestern" }, | 1182 | { "Day before yesterday","Vorgestern" }, |
1183 | { "Size %1","Größe %1" }, | 1183 | { "Size %1","Größe %1" }, |
1184 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1184 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1185 | { " (%1 y.)"," (%1 J.)" }, | 1185 | { " (%1 y.)"," (%1 J.)" }, |
1186 | { "Allday:","Ganztägig:" }, | 1186 | { "Allday:","Ganztägig:" }, |
1187 | { "compl.todos","erled.Todos" }, | 1187 | { "compl.todos","erled.Todos" }, |
1188 | { "Day view","Tagesansicht" }, | 1188 | { "Day view","Tagesansicht" }, |
1189 | { "Next days","Nächste Tage" }, | 1189 | { "Next days","Nächste Tage" }, |
1190 | { "Next week","Nächste Woche" }, | 1190 | { "Next week","Nächste Woche" }, |
1191 | { "Next two weeks","Nächste zwei Wochen" }, | 1191 | { "Next two weeks","Nächste zwei Wochen" }, |
1192 | { "This month","Dieser Monat" }, | 1192 | { "This month","Dieser Monat" }, |
1193 | { "Journal view","Journal" }, | 1193 | { "Journal view","Journal" }, |
1194 | { "Display all opened","Zeige alle geöffnet" }, | 1194 | { "Display all opened","Zeige alle geöffnet" }, |
1195 | { "Display all closed","Zeige alle geschlossen" }, | 1195 | { "Display all closed","Zeige alle geschlossen" }, |
1196 | { "Display all flat","Zeige alle flach" }, | 1196 | { "Display all flat","Zeige alle flach" }, |
1197 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1197 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1198 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1198 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1199 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1199 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1200 | { "Select Week","Wähle Woche" }, | 1200 | { "Select Week","Wähle Woche" }, |
1201 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, | 1201 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, |
1202 | { "Set Alarm!","Setze Alarm!" }, | 1202 | { "Set Alarm!","Setze Alarm!" }, |
1203 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, | 1203 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, |
1204 | { " and "," und " }, | 1204 | { " and "," und " }, |
1205 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1205 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1206 | { "Mail to selected","Mail an Ausgewählte" }, | 1206 | { "Mail to selected","Mail an Ausgewählte" }, |
1207 | { "Mail to all","Mail an Alle" }, | 1207 | { "Mail to all","Mail an Alle" }, |
1208 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1208 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1209 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1209 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1210 | { " on"," am" }, | 1210 | { " on"," am" }, |
1211 | { " completed on "," erledigt am " }, | 1211 | { " completed on "," erledigt am " }, |
1212 | { "Save as Event template","Speichere als Vorlage" }, | 1212 | { "Save as Event template","Speichere als Vorlage" }, |
1213 | { "Load Event template","Lade Termin Vorlage" }, | 1213 | { "Load Event template","Lade Termin Vorlage" }, |
1214 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1214 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1215 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1215 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1216 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1216 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1217 | { "Parent todo:<br>","Über Todo:<br>" }, | 1217 | { "Parent todo:<br>","Über Todo:<br>" }, |
1218 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1218 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1219 | { " completed"," erledigt" }, | 1219 | { " completed"," erledigt" }, |
1220 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, | 1220 | { "(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!" }, |
1221 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1221 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1222 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1222 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1223 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1223 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1224 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, | 1224 | { "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?" }, |
1225 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1225 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1226 | { "Error","Fehler" }, | 1226 | { "Error","Fehler" }, |
1227 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1227 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1228 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1228 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1229 | { "Warning","Warnung" }, | 1229 | { "Warning","Warnung" }, |
1230 | { "Select week number","Wähle Wochen Nummer" }, | 1230 | { "Select week number","Wähle Wochen Nummer" }, |
1231 | { "Februar","Februar" }, | 1231 | { "Februar","Februar" }, |
1232 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1232 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1233 | { "W","W" }, | 1233 | { "W","W" }, |
1234 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1234 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1235 | { "T: %1","T: %1" }, | 1235 | { "T: %1","T: %1" }, |
1236 | { "Start: ","Start: " }, | 1236 | { "Start: ","Start: " }, |
1237 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1237 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1238 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1238 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1239 | { "Remote IP address:","Ferne IP Adresse:" }, | 1239 | { "Remote IP address:","Ferne IP Adresse:" }, |
1240 | { "Remote port number:","Ferne Port Nummer:" }, | 1240 | { "Remote port number:","Ferne Port Nummer:" }, |
1241 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1241 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1242 | { "Remote from: ","Fern von: " }, | 1242 | { "Remote from: ","Fern von: " }, |
1243 | { "Local from: ","Lokal von: " }, | 1243 | { "Local from: ","Lokal von: " }, |
1244 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, | 1244 | { "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" }, |
1245 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1245 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1246 | { "Write back","Schreibe zurück" }, | 1246 | { "Write back","Schreibe zurück" }, |
1247 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1247 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1248 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1248 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1249 | { "Received sync request","Sync Anfrage erhalten" }, | 1249 | { "Received sync request","Sync Anfrage erhalten" }, |
1250 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, | 1250 | { "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." }, |
1251 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1251 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1252 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1252 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1253 | { "Sending file...","Sende Datei..." }, | 1253 | { "Sending file...","Sende Datei..." }, |
1254 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1254 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1255 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1255 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1256 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1256 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1257 | { "Writing file to disk...","Speichere Datei..." }, | 1257 | { "Writing file to disk...","Speichere Datei..." }, |
1258 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1258 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1259 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1259 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1260 | { "Synchronize!","Synchronisiere!" }, | 1260 | { "Synchronize!","Synchronisiere!" }, |
1261 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1261 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1262 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1262 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1263 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, | 1263 | { "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!" }, |
1264 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1264 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1265 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1265 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1266 | { "List week view","Listenwochenansicht" }, | 1266 | { "List week view","Listenwochenansicht" }, |
1267 | { "List week","Listenwochenansicht" }, | 1267 | { "List week","Listenwochenansicht" }, |
1268 | { "Next Week","Nächste Woche" }, | 1268 | { "Next Week","Nächste Woche" }, |
1269 | { "Previous Week","Vorherige Woche" }, | 1269 | { "Previous Week","Vorherige Woche" }, |
1270 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, | 1270 | { "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." }, |
1271 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1271 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1272 | { "Details","Details" }, | 1272 | { "Details","Details" }, |
1273 | { "Created time","Erstellt Zeit" }, | 1273 | { "Created time","Erstellt Zeit" }, |
1274 | { "Last modified time","Geändert Zeit" }, | 1274 | { "Last modified time","Geändert Zeit" }, |
1275 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1275 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1276 | { "View Options","Anzeige Optionen" }, | 1276 | { "View Options","Anzeige Optionen" }, |
1277 | { "<b>Created: ","<b>Erstellt am: " }, | 1277 | { "<b>Created: ","<b>Erstellt am: " }, |
1278 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1278 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1279 | { "Journal: ","Journal: " }, | 1279 | { "Journal: ","Journal: " }, |
1280 | { "yearly","jährlich" }, | 1280 | { "yearly","jährlich" }, |
1281 | { "(%1) ","%1-" }, | 1281 | { "(%1) ","%1-" }, |
1282 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1282 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1283 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1283 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1284 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1284 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1285 | { "Summary/Loc.","Titel/Ort" }, | 1285 | { "Summary/Loc.","Titel/Ort" }, |
1286 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1286 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1287 | { "Week Number","Wochennummer" }, | 1287 | { "Week Number","Wochennummer" }, |
1288 | { "Import","Importiere" }, | 1288 | { "Import","Importiere" }, |
1289 | { "Export","Exportiere" }, | 1289 | { "Export","Exportiere" }, |
1290 | { "Beam","Beame" }, | 1290 | { "Beam","Beame" }, |
1291 | { "Export selected","Exportiere Selektierte" }, | 1291 | { "Export selected","Exportiere Selektierte" }, |
1292 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1292 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1293 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1293 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1294 | { "Journal/Details...","Journale/Details..." }, | 1294 | { "Journal/Details...","Journale/Details..." }, |
1295 | { "Agenda View","Agenda Ansicht" }, | 1295 | { "Agenda View","Agenda Ansicht" }, |
1296 | { "Show current time","Zeige aktuelle Zeit" }, | 1296 | { "Show current time","Zeige aktuelle Zeit" }, |
1297 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1297 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1298 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, | 1298 | { "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" }, |
1299 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, | 1299 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, |
1300 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, | 1300 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, |
1301 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, | 1301 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, |
1302 | { "%1 days\n","%1 Tagen\n" }, | 1302 | { "%1 days\n","%1 Tagen\n" }, |
1303 | { "1 day\n","1 Tag\n" }, | 1303 | { "1 day\n","1 Tag\n" }, |
1304 | { "%1 hours\n","%1 Stunden\n" }, | 1304 | { "%1 hours\n","%1 Stunden\n" }, |
1305 | { "1 hour\n","1 Stunde\n" }, | 1305 | { "1 hour\n","1 Stunde\n" }, |
1306 | { "%1 minutes\n","%1 Minuten\n" }, | 1306 | { "%1 minutes\n","%1 Minuten\n" }, |
1307 | { "1 minute\n","1 Minute\n" }, | 1307 | { "1 minute\n","1 Minute\n" }, |
1308 | { "Only one toolbar","Nur eine Toolbar" }, | 1308 | { "Only one toolbar","Nur eine Toolbar" }, |
1309 | { "Print","Drucke" }, | 1309 | { "Print","Drucke" }, |
1310 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, | 1310 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, |
1311 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, | 1311 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, |
1312 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, | 1312 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, |
1313 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, | 1313 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, |
1314 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, | 1314 | { "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" }, |
1315 | { "KO/Pi Printout","KO/Pi Ausdruck" }, | 1315 | { "KO/Pi Printout","KO/Pi Ausdruck" }, |
1316 | { "Print unscaled","Drucke unskaliert" }, | 1316 | { "Print unscaled","Drucke unskaliert" }, |
1317 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, | 1317 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, |
1318 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, | 1318 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, |
1319 | { "Printout Mode","Druck Modus" }, | 1319 | { "Printout Mode","Druck Modus" }, |
1320 | { "Filter menu icon","Filtermenu Icon" }, | 1320 | { "Filter menu icon","Filtermenu Icon" }, |
1321 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, | 1321 | { "<p><b>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" }, |
1322 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, | 1322 | { "<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" }, |
1323 | { "%1d","%1t" }, | 1323 | { "%1d","%1t" }, |
1324 | { "%1h","%1std" }, | 1324 | { "%1h","%1std" }, |
1325 | { "%1min","%1min" }, | 1325 | { "%1min","%1min" }, |
1326 | { "( %1 before )","( %1 vorher )" }, | 1326 | { "( %1 before )","( %1 vorher )" }, |
1327 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, | 1327 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, |
1328 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, | 1328 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, |
1329 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, | 1329 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, |
1330 | { "Show Sync Events","Zeige Sync-Ereignisse" }, | 1330 | { "Show Sync Events","Zeige Sync-Ereignisse" }, |
1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, | 1331 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, |
1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, | 1332 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, |
1333 | { " on "," am " }, | 1333 | { " on "," am " }, |
1334 | { "On: ","Am: " }, | 1334 | { "On: ","Am: " }, |
1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, | 1335 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, |
1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, | 1336 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, |
1337 | { "Color for running todos:","Farbe für laufende Todos:" }, | 1337 | { "Color for running todos:","Farbe für laufende Todos:" }, |
1338 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, | 1338 | { "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?" }, |
1339 | { "Todo is started","Todo ist gestartet" }, | 1339 | { "Todo is started","Todo ist gestartet" }, |
1340 | { "Stop todo","Stoppe Todo" }, | 1340 | { "Stop todo","Stoppe Todo" }, |
1341 | { "Todo is stopped","Todo ist gestoppt" }, | 1341 | { "Todo is stopped","Todo ist gestoppt" }, |
1342 | { "Start todo","Starte Todo" }, | 1342 | { "Start todo","Starte Todo" }, |
1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, | 1343 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, |
1344 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, | 1344 | { "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?" }, |
1345 | { "Todo has subtodos","Todo hat Untertodos" }, | 1345 | { "Todo has subtodos","Todo hat Untertodos" }, |
1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, | 1346 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, |
1347 | { "Colors","Farben" }, | 1347 | { "Colors","Farben" }, |
1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, | 1348 | { "Click on new parent item","Klicke auf neues Übertodo" }, |
1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, | 1349 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, |
1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, | 1350 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, |
1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, | 1351 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, |
1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, | 1352 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, |
1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, | 1353 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, |
1354 | { "times","Zeiten" }, | 1354 | { "times","Zeiten" }, |
1355 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, | 1355 | { "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?" }, |
1356 | { "Backup enabled","Backup angeschaltet" }, | 1356 | { "Backup enabled","Backup angeschaltet" }, |
1357 | { "Use standard backup dir","Standard Backupverzeichnis" }, | 1357 | { "Use standard backup dir","Standard Backupverzeichnis" }, |
1358 | { "Number of Backups:","Anzahl der Backups" }, | 1358 | { "Number of Backups:","Anzahl der Backups" }, |
1359 | { "Make backup every ","Mache ein Backup alle " }, | 1359 | { "Make backup every ","Mache ein Backup alle " }, |
1360 | { " days"," Tage" }, | 1360 | { " days"," Tage" }, |
1361 | { "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, | 1361 | { "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, |
1362 | { "Backup Failed!","Backup Problem!" }, | 1362 | { "Backup Failed!","Backup Problem!" }, |
1363 | { "Try again now","Versuche jetzt nochmal" }, | 1363 | { "Try again now","Versuche jetzt nochmal" }, |
1364 | { "Try again later","Versuche später nochmal" }, | 1364 | { "Try again later","Versuche später nochmal" }, |
1365 | { "Try again tomorrow","Versuche morgen nochmal" }, | 1365 | { "Try again tomorrow","Versuche morgen nochmal" }, |
1366 | { "Disable backup","Schalte Backup ab" }, | 1366 | { "Disable backup","Schalte Backup ab" }, |
1367 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, | 1367 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, |
1368 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, | 1368 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, |
1369 | { "Choose action","Wähle Aktion" }, | 1369 | { "Choose action","Wähle Aktion" }, |
1370 | { "Comment for todo:","Kommentar zum Todo:" }, | 1370 | { "Comment for todo:","Kommentar zum Todo:" }, |
1371 | { "Stop+note","Stop+Notiz" }, | 1371 | { "Stop+note","Stop+Notiz" }, |
1372 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, | 1372 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, |
1373 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, | 1373 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, |
1374 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, | 1374 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, |
1375 | { "Print complete list","Drucke komplette Liste" }, | 1375 | { "Print complete list","Drucke komplette Liste" }, |
1376 | { "Hide all selected","Verstecke Selektierte" }, | 1376 | { "Hide all selected","Verstecke Selektierte" }, |
1377 | { "Add items","hinzufügen" }, | 1377 | { "Add items","hinzufügen" }, |
1378 | { "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, | 1378 | { "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?" }, |
1379 | { "Print List View...","Drucke Listenansicht..." }, | 1379 | { "Print List View...","Drucke Listenansicht..." }, |
1380 | { "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, | 1380 | { "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." }, |
1381 | { "","" }, | 1381 | { "Configure KO/Pi...","Konfiguriere KO/Pi..." }, |
1382 | { "","" }, | 1382 | { "Global Settings...","Globale Einstellungen..." }, |
1383 | { "","" }, | 1383 | { "","" }, |
1384 | { "","" }, | 1384 | { "","" }, |
1385 | { "","" }, | 1385 | { "","" }, |
1386 | { "","" }, | 1386 | { "","" }, |
1387 | { "","" }, | 1387 | { "","" }, |
1388 | { "","" }, | 1388 | { "","" }, |
1389 | { "","" }, | 1389 | { "","" }, |
1390 | { "","" }, | 1390 | { "","" }, |
1391 | { "","" }, \ No newline at end of file | 1391 | { "","" }, \ No newline at end of file |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 7c7466b..4794414 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -987,3093 +987,3095 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b | |||
987 | } | 987 | } |
988 | if ( mode < SYNC_PREF_FORCE_LOCAL ) | 988 | if ( mode < SYNC_PREF_FORCE_LOCAL ) |
989 | return 0; | 989 | return 0; |
990 | 990 | ||
991 | }//else //debug only | 991 | }//else //debug only |
992 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); | 992 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); |
993 | } | 993 | } |
994 | int result; | 994 | int result; |
995 | bool localIsNew; | 995 | bool localIsNew; |
996 | //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() ); | 996 | //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() ); |
997 | 997 | ||
998 | 998 | ||
999 | // ************************************************ | 999 | // ************************************************ |
1000 | // ************************************************ | 1000 | // ************************************************ |
1001 | // ************************************************ | 1001 | // ************************************************ |
1002 | // We may have that lastSync > remoteMod AND lastSync > localMod | 1002 | // We may have that lastSync > remoteMod AND lastSync > localMod |
1003 | // BUT remoteMod != localMod | 1003 | // BUT remoteMod != localMod |
1004 | 1004 | ||
1005 | 1005 | ||
1006 | if ( full && mode < SYNC_PREF_NEWEST ) | 1006 | if ( full && mode < SYNC_PREF_NEWEST ) |
1007 | mode = SYNC_PREF_ASK; | 1007 | mode = SYNC_PREF_ASK; |
1008 | 1008 | ||
1009 | switch( mode ) { | 1009 | switch( mode ) { |
1010 | case SYNC_PREF_LOCAL: | 1010 | case SYNC_PREF_LOCAL: |
1011 | if ( lastSync > remoteMod ) | 1011 | if ( lastSync > remoteMod ) |
1012 | return 1; | 1012 | return 1; |
1013 | if ( lastSync > localMod ) | 1013 | if ( lastSync > localMod ) |
1014 | return 2; | 1014 | return 2; |
1015 | return 1; | 1015 | return 1; |
1016 | break; | 1016 | break; |
1017 | case SYNC_PREF_REMOTE: | 1017 | case SYNC_PREF_REMOTE: |
1018 | if ( lastSync > localMod ) | 1018 | if ( lastSync > localMod ) |
1019 | return 2; | 1019 | return 2; |
1020 | if ( lastSync > remoteMod ) | 1020 | if ( lastSync > remoteMod ) |
1021 | return 1; | 1021 | return 1; |
1022 | return 2; | 1022 | return 2; |
1023 | break; | 1023 | break; |
1024 | case SYNC_PREF_NEWEST: | 1024 | case SYNC_PREF_NEWEST: |
1025 | if ( localMod >= remoteMod ) | 1025 | if ( localMod >= remoteMod ) |
1026 | return 1; | 1026 | return 1; |
1027 | else | 1027 | else |
1028 | return 2; | 1028 | return 2; |
1029 | break; | 1029 | break; |
1030 | case SYNC_PREF_ASK: | 1030 | case SYNC_PREF_ASK: |
1031 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 1031 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
1032 | if ( lastSync > remoteMod && lastSync > localMod) | 1032 | if ( lastSync > remoteMod && lastSync > localMod) |
1033 | return 0; | 1033 | return 0; |
1034 | if ( lastSync > remoteMod ) | 1034 | if ( lastSync > remoteMod ) |
1035 | return 1; | 1035 | return 1; |
1036 | if ( lastSync > localMod ) | 1036 | if ( lastSync > localMod ) |
1037 | return 2; | 1037 | return 2; |
1038 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 1038 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
1039 | localIsNew = localMod >= remoteMod; | 1039 | localIsNew = localMod >= remoteMod; |
1040 | if ( localIsNew ) | 1040 | if ( localIsNew ) |
1041 | getEventViewerDialog()->setColorMode( 1 ); | 1041 | getEventViewerDialog()->setColorMode( 1 ); |
1042 | else | 1042 | else |
1043 | getEventViewerDialog()->setColorMode( 2 ); | 1043 | getEventViewerDialog()->setColorMode( 2 ); |
1044 | getEventViewerDialog()->setIncidence(local); | 1044 | getEventViewerDialog()->setIncidence(local); |
1045 | if ( localIsNew ) | 1045 | if ( localIsNew ) |
1046 | getEventViewerDialog()->setColorMode( 2 ); | 1046 | getEventViewerDialog()->setColorMode( 2 ); |
1047 | else | 1047 | else |
1048 | getEventViewerDialog()->setColorMode( 1 ); | 1048 | getEventViewerDialog()->setColorMode( 1 ); |
1049 | getEventViewerDialog()->addIncidence(remote); | 1049 | getEventViewerDialog()->addIncidence(remote); |
1050 | getEventViewerDialog()->setColorMode( 0 ); | 1050 | getEventViewerDialog()->setColorMode( 0 ); |
1051 | //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() ); | 1051 | //qDebug("local %d remote %d ",local->relatedTo(),remote->relatedTo() ); |
1052 | getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!")); | 1052 | getEventViewerDialog()->setCaption( mCurrentSyncDevice +i18n(" : Conflict! Please choose entry!")); |
1053 | getEventViewerDialog()->showMe(); | 1053 | getEventViewerDialog()->showMe(); |
1054 | result = getEventViewerDialog()->executeS( localIsNew ); | 1054 | result = getEventViewerDialog()->executeS( localIsNew ); |
1055 | return result; | 1055 | return result; |
1056 | 1056 | ||
1057 | break; | 1057 | break; |
1058 | case SYNC_PREF_FORCE_LOCAL: | 1058 | case SYNC_PREF_FORCE_LOCAL: |
1059 | return 1; | 1059 | return 1; |
1060 | break; | 1060 | break; |
1061 | case SYNC_PREF_FORCE_REMOTE: | 1061 | case SYNC_PREF_FORCE_REMOTE: |
1062 | return 2; | 1062 | return 2; |
1063 | break; | 1063 | break; |
1064 | 1064 | ||
1065 | default: | 1065 | default: |
1066 | // SYNC_PREF_TAKE_BOTH not implemented | 1066 | // SYNC_PREF_TAKE_BOTH not implemented |
1067 | break; | 1067 | break; |
1068 | } | 1068 | } |
1069 | return 0; | 1069 | return 0; |
1070 | } | 1070 | } |
1071 | Event* CalendarView::getLastSyncEvent() | 1071 | Event* CalendarView::getLastSyncEvent() |
1072 | { | 1072 | { |
1073 | Event* lse; | 1073 | Event* lse; |
1074 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); | 1074 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); |
1075 | lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); | 1075 | lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); |
1076 | if (!lse) { | 1076 | if (!lse) { |
1077 | lse = new Event(); | 1077 | lse = new Event(); |
1078 | lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); | 1078 | lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); |
1079 | QString sum = ""; | 1079 | QString sum = ""; |
1080 | if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) | 1080 | if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) |
1081 | sum = "E: "; | 1081 | sum = "E: "; |
1082 | lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); | 1082 | lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); |
1083 | lse->setDtStart( mLastCalendarSync ); | 1083 | lse->setDtStart( mLastCalendarSync ); |
1084 | lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); | 1084 | lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); |
1085 | lse->setCategories( i18n("SyncEvent") ); | 1085 | lse->setCategories( i18n("SyncEvent") ); |
1086 | lse->setReadOnly( true ); | 1086 | lse->setReadOnly( true ); |
1087 | mCalendar->addEvent( lse ); | 1087 | mCalendar->addEvent( lse ); |
1088 | } | 1088 | } |
1089 | 1089 | ||
1090 | return lse; | 1090 | return lse; |
1091 | 1091 | ||
1092 | } | 1092 | } |
1093 | 1093 | ||
1094 | // we check, if the to delete event has a id for a profile | 1094 | // we check, if the to delete event has a id for a profile |
1095 | // if yes, we set this id in the profile to delete | 1095 | // if yes, we set this id in the profile to delete |
1096 | void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) | 1096 | void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) |
1097 | { | 1097 | { |
1098 | if ( lastSync.count() == 0 ) { | 1098 | if ( lastSync.count() == 0 ) { |
1099 | //qDebug(" lastSync.count() == 0"); | 1099 | //qDebug(" lastSync.count() == 0"); |
1100 | return; | 1100 | return; |
1101 | } | 1101 | } |
1102 | if ( toDelete->typeID() == journalID ) | 1102 | if ( toDelete->typeID() == journalID ) |
1103 | return; | 1103 | return; |
1104 | 1104 | ||
1105 | Event* eve = lastSync.first(); | 1105 | Event* eve = lastSync.first(); |
1106 | 1106 | ||
1107 | while ( eve ) { | 1107 | while ( eve ) { |
1108 | QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name | 1108 | QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name |
1109 | if ( !id.isEmpty() ) { | 1109 | if ( !id.isEmpty() ) { |
1110 | QString des = eve->description(); | 1110 | QString des = eve->description(); |
1111 | QString pref = "e"; | 1111 | QString pref = "e"; |
1112 | if ( toDelete->typeID() == todoID ) | 1112 | if ( toDelete->typeID() == todoID ) |
1113 | pref = "t"; | 1113 | pref = "t"; |
1114 | des += pref+ id + ","; | 1114 | des += pref+ id + ","; |
1115 | eve->setReadOnly( false ); | 1115 | eve->setReadOnly( false ); |
1116 | eve->setDescription( des ); | 1116 | eve->setDescription( des ); |
1117 | //qDebug("setdes %s ", des.latin1()); | 1117 | //qDebug("setdes %s ", des.latin1()); |
1118 | eve->setReadOnly( true ); | 1118 | eve->setReadOnly( true ); |
1119 | } | 1119 | } |
1120 | eve = lastSync.next(); | 1120 | eve = lastSync.next(); |
1121 | } | 1121 | } |
1122 | 1122 | ||
1123 | } | 1123 | } |
1124 | void CalendarView::checkExternalId( Incidence * inc ) | 1124 | void CalendarView::checkExternalId( Incidence * inc ) |
1125 | { | 1125 | { |
1126 | QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; | 1126 | QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; |
1127 | checkExternSyncEvent( lastSync, inc ); | 1127 | checkExternSyncEvent( lastSync, inc ); |
1128 | 1128 | ||
1129 | } | 1129 | } |
1130 | bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) | 1130 | bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) |
1131 | { | 1131 | { |
1132 | bool syncOK = true; | 1132 | bool syncOK = true; |
1133 | int addedEvent = 0; | 1133 | int addedEvent = 0; |
1134 | int addedEventR = 0; | 1134 | int addedEventR = 0; |
1135 | int deletedEventR = 0; | 1135 | int deletedEventR = 0; |
1136 | int deletedEventL = 0; | 1136 | int deletedEventL = 0; |
1137 | int changedLocal = 0; | 1137 | int changedLocal = 0; |
1138 | int changedRemote = 0; | 1138 | int changedRemote = 0; |
1139 | int filteredIN = 0; | 1139 | int filteredIN = 0; |
1140 | int filteredOUT = 0; | 1140 | int filteredOUT = 0; |
1141 | //QPtrList<Event> el = local->rawEvents(); | 1141 | //QPtrList<Event> el = local->rawEvents(); |
1142 | Event* eventR; | 1142 | Event* eventR; |
1143 | QString uid; | 1143 | QString uid; |
1144 | int take; | 1144 | int take; |
1145 | Event* eventL; | 1145 | Event* eventL; |
1146 | Event* eventRSync; | 1146 | Event* eventRSync; |
1147 | Event* eventLSync; | 1147 | Event* eventLSync; |
1148 | clearAllViews(); | 1148 | clearAllViews(); |
1149 | QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); | 1149 | QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); |
1150 | QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); | 1150 | QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); |
1151 | bool fullDateRange = false; | 1151 | bool fullDateRange = false; |
1152 | local->resetTempSyncStat(); | 1152 | local->resetTempSyncStat(); |
1153 | mLastCalendarSync = QDateTime::currentDateTime(); | 1153 | mLastCalendarSync = QDateTime::currentDateTime(); |
1154 | if ( mSyncManager->syncWithDesktop() ) { | 1154 | if ( mSyncManager->syncWithDesktop() ) { |
1155 | remote->resetPilotStat(1); | 1155 | remote->resetPilotStat(1); |
1156 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { | 1156 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { |
1157 | mLastCalendarSync = KSyncManager::mRequestedSyncEvent; | 1157 | mLastCalendarSync = KSyncManager::mRequestedSyncEvent; |
1158 | qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); | 1158 | qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); |
1159 | } else { | 1159 | } else { |
1160 | qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); | 1160 | qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); |
1161 | } | 1161 | } |
1162 | } | 1162 | } |
1163 | QDateTime modifiedCalendar = mLastCalendarSync; | 1163 | QDateTime modifiedCalendar = mLastCalendarSync; |
1164 | eventLSync = getLastSyncEvent(); | 1164 | eventLSync = getLastSyncEvent(); |
1165 | eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); | 1165 | eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); |
1166 | if ( eventR ) { | 1166 | if ( eventR ) { |
1167 | eventRSync = (Event*) eventR->clone(); | 1167 | eventRSync = (Event*) eventR->clone(); |
1168 | remote->deleteEvent(eventR ); | 1168 | remote->deleteEvent(eventR ); |
1169 | 1169 | ||
1170 | } else { | 1170 | } else { |
1171 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { | 1171 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { |
1172 | eventRSync = (Event*)eventLSync->clone(); | 1172 | eventRSync = (Event*)eventLSync->clone(); |
1173 | } else { | 1173 | } else { |
1174 | fullDateRange = true; | 1174 | fullDateRange = true; |
1175 | eventRSync = new Event(); | 1175 | eventRSync = new Event(); |
1176 | eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); | 1176 | eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); |
1177 | eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); | 1177 | eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); |
1178 | eventRSync->setDtStart( mLastCalendarSync ); | 1178 | eventRSync->setDtStart( mLastCalendarSync ); |
1179 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); | 1179 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); |
1180 | eventRSync->setCategories( i18n("SyncEvent") ); | 1180 | eventRSync->setCategories( i18n("SyncEvent") ); |
1181 | } | 1181 | } |
1182 | } | 1182 | } |
1183 | if ( eventLSync->dtStart() == mLastCalendarSync ) | 1183 | if ( eventLSync->dtStart() == mLastCalendarSync ) |
1184 | fullDateRange = true; | 1184 | fullDateRange = true; |
1185 | 1185 | ||
1186 | if ( ! fullDateRange ) { | 1186 | if ( ! fullDateRange ) { |
1187 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { | 1187 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { |
1188 | 1188 | ||
1189 | // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); | 1189 | // qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); |
1190 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); | 1190 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); |
1191 | fullDateRange = true; | 1191 | fullDateRange = true; |
1192 | } | 1192 | } |
1193 | } | 1193 | } |
1194 | if ( mSyncManager->syncWithDesktop() ) { | 1194 | if ( mSyncManager->syncWithDesktop() ) { |
1195 | fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); | 1195 | fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); |
1196 | } | 1196 | } |
1197 | if ( fullDateRange ) | 1197 | if ( fullDateRange ) |
1198 | mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); | 1198 | mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); |
1199 | else | 1199 | else |
1200 | mLastCalendarSync = eventLSync->dtStart(); | 1200 | mLastCalendarSync = eventLSync->dtStart(); |
1201 | // for resyncing if own file has changed | 1201 | // for resyncing if own file has changed |
1202 | if ( mCurrentSyncDevice == "deleteaftersync" ) { | 1202 | if ( mCurrentSyncDevice == "deleteaftersync" ) { |
1203 | mLastCalendarSync = loadedFileVersion; | 1203 | mLastCalendarSync = loadedFileVersion; |
1204 | //qDebug("setting mLastCalendarSync "); | 1204 | //qDebug("setting mLastCalendarSync "); |
1205 | } | 1205 | } |
1206 | //qDebug("*************************** "); | 1206 | //qDebug("*************************** "); |
1207 | qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); | 1207 | qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); |
1208 | QPtrList<Incidence> er = remote->rawIncidences(); | 1208 | QPtrList<Incidence> er = remote->rawIncidences(); |
1209 | Incidence* inR = er.first(); | 1209 | Incidence* inR = er.first(); |
1210 | Incidence* inL; | 1210 | Incidence* inL; |
1211 | QProgressBar bar( er.count(),0 ); | 1211 | QProgressBar bar( er.count(),0 ); |
1212 | bar.setCaption (i18n("Syncing - close to abort!") ); | 1212 | bar.setCaption (i18n("Syncing - close to abort!") ); |
1213 | 1213 | ||
1214 | // ************** setting up filter ************* | 1214 | // ************** setting up filter ************* |
1215 | CalFilter *filterIN = 0; | 1215 | CalFilter *filterIN = 0; |
1216 | CalFilter *filterOUT = 0; | 1216 | CalFilter *filterOUT = 0; |
1217 | CalFilter *filter = mFilters.first(); | 1217 | CalFilter *filter = mFilters.first(); |
1218 | while(filter) { | 1218 | while(filter) { |
1219 | if ( filter->name() == mSyncManager->mFilterInCal ) | 1219 | if ( filter->name() == mSyncManager->mFilterInCal ) |
1220 | filterIN = filter; | 1220 | filterIN = filter; |
1221 | if ( filter->name() == mSyncManager->mFilterOutCal ) | 1221 | if ( filter->name() == mSyncManager->mFilterOutCal ) |
1222 | filterOUT = filter; | 1222 | filterOUT = filter; |
1223 | filter = mFilters.next(); | 1223 | filter = mFilters.next(); |
1224 | } | 1224 | } |
1225 | int w = 300; | 1225 | int w = 300; |
1226 | if ( QApplication::desktop()->width() < 320 ) | 1226 | if ( QApplication::desktop()->width() < 320 ) |
1227 | w = 220; | 1227 | w = 220; |
1228 | int h = bar.sizeHint().height() ; | 1228 | int h = bar.sizeHint().height() ; |
1229 | int dw = QApplication::desktop()->width(); | 1229 | int dw = QApplication::desktop()->width(); |
1230 | int dh = QApplication::desktop()->height(); | 1230 | int dh = QApplication::desktop()->height(); |
1231 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1231 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1232 | bar.show(); | 1232 | bar.show(); |
1233 | int modulo = (er.count()/10)+1; | 1233 | int modulo = (er.count()/10)+1; |
1234 | int incCounter = 0; | 1234 | int incCounter = 0; |
1235 | while ( inR ) { | 1235 | while ( inR ) { |
1236 | if ( ! bar.isVisible() ) | 1236 | if ( ! bar.isVisible() ) |
1237 | return false; | 1237 | return false; |
1238 | if ( incCounter % modulo == 0 ) | 1238 | if ( incCounter % modulo == 0 ) |
1239 | bar.setProgress( incCounter ); | 1239 | bar.setProgress( incCounter ); |
1240 | ++incCounter; | 1240 | ++incCounter; |
1241 | uid = inR->uid(); | 1241 | uid = inR->uid(); |
1242 | bool skipIncidence = false; | 1242 | bool skipIncidence = false; |
1243 | if ( uid.left(15) == QString("last-syncEvent-") ) | 1243 | if ( uid.left(15) == QString("last-syncEvent-") ) |
1244 | skipIncidence = true; | 1244 | skipIncidence = true; |
1245 | QString idS; | 1245 | QString idS; |
1246 | qApp->processEvents(); | 1246 | qApp->processEvents(); |
1247 | if ( !skipIncidence ) { | 1247 | if ( !skipIncidence ) { |
1248 | inL = local->incidence( uid ); | 1248 | inL = local->incidence( uid ); |
1249 | if ( inL ) { // maybe conflict - same uid in both calendars | 1249 | if ( inL ) { // maybe conflict - same uid in both calendars |
1250 | if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { | 1250 | if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { |
1251 | //qDebug("take %d %s ", take, inL->summary().latin1()); | 1251 | //qDebug("take %d %s ", take, inL->summary().latin1()); |
1252 | if ( take == 3 ) | 1252 | if ( take == 3 ) |
1253 | return false; | 1253 | return false; |
1254 | if ( take == 1 ) {// take local ********************** | 1254 | if ( take == 1 ) {// take local ********************** |
1255 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) | 1255 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) |
1256 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1256 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1257 | else | 1257 | else |
1258 | idS = inR->IDStr(); | 1258 | idS = inR->IDStr(); |
1259 | remote->deleteIncidence( inR ); | 1259 | remote->deleteIncidence( inR ); |
1260 | inR = inL->clone(); | 1260 | inR = inL->clone(); |
1261 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1261 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1262 | if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) | 1262 | if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) |
1263 | inR->setIDStr( idS ); | 1263 | inR->setIDStr( idS ); |
1264 | remote->addIncidence( inR ); | 1264 | remote->addIncidence( inR ); |
1265 | if ( mSyncManager->syncWithDesktop() ) | 1265 | if ( mSyncManager->syncWithDesktop() ) |
1266 | inR->setPilotId( 2 ); | 1266 | inR->setPilotId( 2 ); |
1267 | ++changedRemote; | 1267 | ++changedRemote; |
1268 | } else {// take remote ********************** | 1268 | } else {// take remote ********************** |
1269 | idS = inL->IDStr(); | 1269 | idS = inL->IDStr(); |
1270 | int pid = inL->pilotId(); | 1270 | int pid = inL->pilotId(); |
1271 | local->deleteIncidence( inL ); | 1271 | local->deleteIncidence( inL ); |
1272 | inL = inR->clone(); | 1272 | inL = inR->clone(); |
1273 | if ( mSyncManager->syncWithDesktop() ) | 1273 | if ( mSyncManager->syncWithDesktop() ) |
1274 | inL->setPilotId( pid ); | 1274 | inL->setPilotId( pid ); |
1275 | inL->setIDStr( idS ); | 1275 | inL->setIDStr( idS ); |
1276 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1276 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1277 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1277 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1278 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); | 1278 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); |
1279 | } | 1279 | } |
1280 | local->addIncidence( inL ); | 1280 | local->addIncidence( inL ); |
1281 | ++changedLocal; | 1281 | ++changedLocal; |
1282 | } | 1282 | } |
1283 | } | 1283 | } |
1284 | } else { // no conflict ********** add or delete remote | 1284 | } else { // no conflict ********** add or delete remote |
1285 | if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ | 1285 | if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ |
1286 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1286 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1287 | QString des = eventLSync->description(); | 1287 | QString des = eventLSync->description(); |
1288 | QString pref = "e"; | 1288 | QString pref = "e"; |
1289 | if ( inR->typeID() == todoID ) | 1289 | if ( inR->typeID() == todoID ) |
1290 | pref = "t"; | 1290 | pref = "t"; |
1291 | if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it | 1291 | if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it |
1292 | inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); | 1292 | inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); |
1293 | //remote->deleteIncidence( inR ); | 1293 | //remote->deleteIncidence( inR ); |
1294 | ++deletedEventR; | 1294 | ++deletedEventR; |
1295 | } else { | 1295 | } else { |
1296 | inR->setLastModified( modifiedCalendar ); | 1296 | inR->setLastModified( modifiedCalendar ); |
1297 | inL = inR->clone(); | 1297 | inL = inR->clone(); |
1298 | inL->setIDStr( ":" ); | 1298 | inL->setIDStr( ":" ); |
1299 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1299 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1300 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); | 1300 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); |
1301 | local->addIncidence( inL ); | 1301 | local->addIncidence( inL ); |
1302 | ++addedEvent; | 1302 | ++addedEvent; |
1303 | 1303 | ||
1304 | } | 1304 | } |
1305 | } else { | 1305 | } else { |
1306 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { | 1306 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { |
1307 | inR->setLastModified( modifiedCalendar ); | 1307 | inR->setLastModified( modifiedCalendar ); |
1308 | inL = inR->clone(); | 1308 | inL = inR->clone(); |
1309 | inL->setIDStr( ":" ); | 1309 | inL->setIDStr( ":" ); |
1310 | local->addIncidence( inL ); | 1310 | local->addIncidence( inL ); |
1311 | ++addedEvent; | 1311 | ++addedEvent; |
1312 | 1312 | ||
1313 | } else { | 1313 | } else { |
1314 | checkExternSyncEvent(eventRSyncSharp, inR); | 1314 | checkExternSyncEvent(eventRSyncSharp, inR); |
1315 | remote->deleteIncidence( inR ); | 1315 | remote->deleteIncidence( inR ); |
1316 | ++deletedEventR; | 1316 | ++deletedEventR; |
1317 | } | 1317 | } |
1318 | } | 1318 | } |
1319 | } else { | 1319 | } else { |
1320 | ++filteredIN; | 1320 | ++filteredIN; |
1321 | } | 1321 | } |
1322 | } | 1322 | } |
1323 | } | 1323 | } |
1324 | inR = er.next(); | 1324 | inR = er.next(); |
1325 | } | 1325 | } |
1326 | QPtrList<Incidence> el = local->rawIncidences(); | 1326 | QPtrList<Incidence> el = local->rawIncidences(); |
1327 | inL = el.first(); | 1327 | inL = el.first(); |
1328 | modulo = (el.count()/10)+1; | 1328 | modulo = (el.count()/10)+1; |
1329 | bar.setCaption (i18n("Add / remove events") ); | 1329 | bar.setCaption (i18n("Add / remove events") ); |
1330 | bar.setTotalSteps ( el.count() ) ; | 1330 | bar.setTotalSteps ( el.count() ) ; |
1331 | bar.show(); | 1331 | bar.show(); |
1332 | incCounter = 0; | 1332 | incCounter = 0; |
1333 | 1333 | ||
1334 | while ( inL ) { | 1334 | while ( inL ) { |
1335 | 1335 | ||
1336 | qApp->processEvents(); | 1336 | qApp->processEvents(); |
1337 | if ( ! bar.isVisible() ) | 1337 | if ( ! bar.isVisible() ) |
1338 | return false; | 1338 | return false; |
1339 | if ( incCounter % modulo == 0 ) | 1339 | if ( incCounter % modulo == 0 ) |
1340 | bar.setProgress( incCounter ); | 1340 | bar.setProgress( incCounter ); |
1341 | ++incCounter; | 1341 | ++incCounter; |
1342 | uid = inL->uid(); | 1342 | uid = inL->uid(); |
1343 | bool skipIncidence = false; | 1343 | bool skipIncidence = false; |
1344 | if ( uid.left(15) == QString("last-syncEvent-") ) | 1344 | if ( uid.left(15) == QString("last-syncEvent-") ) |
1345 | skipIncidence = true; | 1345 | skipIncidence = true; |
1346 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID ) | 1346 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID ) |
1347 | skipIncidence = true; | 1347 | skipIncidence = true; |
1348 | if ( !skipIncidence ) { | 1348 | if ( !skipIncidence ) { |
1349 | inR = remote->incidence( uid ); | 1349 | inR = remote->incidence( uid ); |
1350 | if ( ! inR ) { | 1350 | if ( ! inR ) { |
1351 | if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ | 1351 | if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ |
1352 | // no conflict ********** add or delete local | 1352 | // no conflict ********** add or delete local |
1353 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1353 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1354 | if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { | 1354 | if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { |
1355 | checkExternSyncEvent(eventLSyncSharp, inL); | 1355 | checkExternSyncEvent(eventLSyncSharp, inL); |
1356 | local->deleteIncidence( inL ); | 1356 | local->deleteIncidence( inL ); |
1357 | ++deletedEventL; | 1357 | ++deletedEventL; |
1358 | } else { | 1358 | } else { |
1359 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1359 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1360 | inL->removeID(mCurrentSyncDevice ); | 1360 | inL->removeID(mCurrentSyncDevice ); |
1361 | ++addedEventR; | 1361 | ++addedEventR; |
1362 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); | 1362 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); |
1363 | inL->setLastModified( modifiedCalendar ); | 1363 | inL->setLastModified( modifiedCalendar ); |
1364 | inR = inL->clone(); | 1364 | inR = inL->clone(); |
1365 | inR->setIDStr( ":" ); | 1365 | inR->setIDStr( ":" ); |
1366 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1366 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1367 | remote->addIncidence( inR ); | 1367 | remote->addIncidence( inR ); |
1368 | } | 1368 | } |
1369 | } | 1369 | } |
1370 | } else { | 1370 | } else { |
1371 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { | 1371 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { |
1372 | checkExternSyncEvent(eventLSyncSharp, inL); | 1372 | checkExternSyncEvent(eventLSyncSharp, inL); |
1373 | local->deleteIncidence( inL ); | 1373 | local->deleteIncidence( inL ); |
1374 | ++deletedEventL; | 1374 | ++deletedEventL; |
1375 | } else { | 1375 | } else { |
1376 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1376 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1377 | ++addedEventR; | 1377 | ++addedEventR; |
1378 | inL->setLastModified( modifiedCalendar ); | 1378 | inL->setLastModified( modifiedCalendar ); |
1379 | inR = inL->clone(); | 1379 | inR = inL->clone(); |
1380 | inR->setIDStr( ":" ); | 1380 | inR->setIDStr( ":" ); |
1381 | remote->addIncidence( inR ); | 1381 | remote->addIncidence( inR ); |
1382 | } | 1382 | } |
1383 | } | 1383 | } |
1384 | } | 1384 | } |
1385 | } else { | 1385 | } else { |
1386 | ++filteredOUT; | 1386 | ++filteredOUT; |
1387 | } | 1387 | } |
1388 | } | 1388 | } |
1389 | } | 1389 | } |
1390 | inL = el.next(); | 1390 | inL = el.next(); |
1391 | } | 1391 | } |
1392 | int delFut = 0; | 1392 | int delFut = 0; |
1393 | int remRem = 0; | 1393 | int remRem = 0; |
1394 | if ( mSyncManager->mWriteBackInFuture ) { | 1394 | if ( mSyncManager->mWriteBackInFuture ) { |
1395 | er = remote->rawIncidences(); | 1395 | er = remote->rawIncidences(); |
1396 | remRem = er.count(); | 1396 | remRem = er.count(); |
1397 | inR = er.first(); | 1397 | inR = er.first(); |
1398 | QDateTime dt; | 1398 | QDateTime dt; |
1399 | QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); | 1399 | QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); |
1400 | QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); | 1400 | QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); |
1401 | while ( inR ) { | 1401 | while ( inR ) { |
1402 | if ( inR->typeID() == todoID ) { | 1402 | if ( inR->typeID() == todoID ) { |
1403 | Todo * t = (Todo*)inR; | 1403 | Todo * t = (Todo*)inR; |
1404 | if ( t->hasDueDate() ) | 1404 | if ( t->hasDueDate() ) |
1405 | dt = t->dtDue(); | 1405 | dt = t->dtDue(); |
1406 | else | 1406 | else |
1407 | dt = cur.addSecs( 62 ); | 1407 | dt = cur.addSecs( 62 ); |
1408 | } | 1408 | } |
1409 | else if (inR->typeID() == eventID ) { | 1409 | else if (inR->typeID() == eventID ) { |
1410 | bool ok; | 1410 | bool ok; |
1411 | dt = inR->getNextOccurence( cur, &ok ); | 1411 | dt = inR->getNextOccurence( cur, &ok ); |
1412 | if ( !ok ) | 1412 | if ( !ok ) |
1413 | dt = cur.addSecs( -62 ); | 1413 | dt = cur.addSecs( -62 ); |
1414 | } | 1414 | } |
1415 | else | 1415 | else |
1416 | dt = inR->dtStart(); | 1416 | dt = inR->dtStart(); |
1417 | if ( dt < cur || dt > end ) { | 1417 | if ( dt < cur || dt > end ) { |
1418 | remote->deleteIncidence( inR ); | 1418 | remote->deleteIncidence( inR ); |
1419 | ++delFut; | 1419 | ++delFut; |
1420 | } | 1420 | } |
1421 | inR = er.next(); | 1421 | inR = er.next(); |
1422 | } | 1422 | } |
1423 | } | 1423 | } |
1424 | bar.hide(); | 1424 | bar.hide(); |
1425 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); | 1425 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); |
1426 | eventLSync->setReadOnly( false ); | 1426 | eventLSync->setReadOnly( false ); |
1427 | eventLSync->setDtStart( mLastCalendarSync ); | 1427 | eventLSync->setDtStart( mLastCalendarSync ); |
1428 | eventRSync->setDtStart( mLastCalendarSync ); | 1428 | eventRSync->setDtStart( mLastCalendarSync ); |
1429 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1429 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1430 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1430 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1431 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; | 1431 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; |
1432 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); | 1432 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); |
1433 | eventLSync->setReadOnly( true ); | 1433 | eventLSync->setReadOnly( true ); |
1434 | qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); | 1434 | qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); |
1435 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... | 1435 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... |
1436 | remote->addEvent( eventRSync ); | 1436 | remote->addEvent( eventRSync ); |
1437 | else | 1437 | else |
1438 | delete eventRSync; | 1438 | delete eventRSync; |
1439 | qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() ); | 1439 | qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() ); |
1440 | QString mes; | 1440 | QString mes; |
1441 | 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 ); | 1441 | 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 ); |
1442 | QString delmess; | 1442 | QString delmess; |
1443 | if ( delFut ) { | 1443 | if ( delFut ) { |
1444 | 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); | 1444 | 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); |
1445 | mes += delmess; | 1445 | mes += delmess; |
1446 | } | 1446 | } |
1447 | mes = i18n("Local calendar changed!\n") +mes; | 1447 | mes = i18n("Local calendar changed!\n") +mes; |
1448 | mCalendar->checkAlarmForIncidence( 0, true ); | 1448 | mCalendar->checkAlarmForIncidence( 0, true ); |
1449 | qDebug( mes ); | 1449 | qDebug( mes ); |
1450 | if ( mSyncManager->mShowSyncSummary ) { | 1450 | if ( mSyncManager->mShowSyncSummary ) { |
1451 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, | 1451 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, |
1452 | i18n("KO/Pi Synchronization"),i18n("Write back"))) { | 1452 | i18n("KO/Pi Synchronization"),i18n("Write back"))) { |
1453 | qDebug("KO: WB cancelled "); | 1453 | qDebug("KO: WB cancelled "); |
1454 | mSyncManager->mWriteBackFile = false; | 1454 | mSyncManager->mWriteBackFile = false; |
1455 | return syncOK; | 1455 | return syncOK; |
1456 | } | 1456 | } |
1457 | } | 1457 | } |
1458 | return syncOK; | 1458 | return syncOK; |
1459 | } | 1459 | } |
1460 | 1460 | ||
1461 | void CalendarView::setSyncDevice( QString s ) | 1461 | void CalendarView::setSyncDevice( QString s ) |
1462 | { | 1462 | { |
1463 | mCurrentSyncDevice= s; | 1463 | mCurrentSyncDevice= s; |
1464 | } | 1464 | } |
1465 | void CalendarView::setSyncName( QString s ) | 1465 | void CalendarView::setSyncName( QString s ) |
1466 | { | 1466 | { |
1467 | mCurrentSyncName= s; | 1467 | mCurrentSyncName= s; |
1468 | } | 1468 | } |
1469 | bool CalendarView::syncCalendar(QString filename, int mode) | 1469 | bool CalendarView::syncCalendar(QString filename, int mode) |
1470 | { | 1470 | { |
1471 | //qDebug("syncCalendar %s ", filename.latin1()); | 1471 | //qDebug("syncCalendar %s ", filename.latin1()); |
1472 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 1472 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
1473 | CalendarLocal* calendar = new CalendarLocal(); | 1473 | CalendarLocal* calendar = new CalendarLocal(); |
1474 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1474 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1475 | FileStorage* storage = new FileStorage( calendar ); | 1475 | FileStorage* storage = new FileStorage( calendar ); |
1476 | bool syncOK = false; | 1476 | bool syncOK = false; |
1477 | storage->setFileName( filename ); | 1477 | storage->setFileName( filename ); |
1478 | // qDebug("loading ... "); | 1478 | // qDebug("loading ... "); |
1479 | if ( storage->load() ) { | 1479 | if ( storage->load() ) { |
1480 | getEventViewerDialog()->setSyncMode( true ); | 1480 | getEventViewerDialog()->setSyncMode( true ); |
1481 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); | 1481 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); |
1482 | getEventViewerDialog()->setSyncMode( false ); | 1482 | getEventViewerDialog()->setSyncMode( false ); |
1483 | if ( syncOK ) { | 1483 | if ( syncOK ) { |
1484 | if ( mSyncManager->mWriteBackFile ) | 1484 | if ( mSyncManager->mWriteBackFile ) |
1485 | { | 1485 | { |
1486 | storage->setSaveFormat( new ICalFormat() ); | 1486 | storage->setSaveFormat( new ICalFormat() ); |
1487 | storage->save(); | 1487 | storage->save(); |
1488 | } | 1488 | } |
1489 | } | 1489 | } |
1490 | setModified( true ); | 1490 | setModified( true ); |
1491 | } | 1491 | } |
1492 | delete storage; | 1492 | delete storage; |
1493 | delete calendar; | 1493 | delete calendar; |
1494 | if ( syncOK ) | 1494 | if ( syncOK ) |
1495 | updateView(); | 1495 | updateView(); |
1496 | return syncOK; | 1496 | return syncOK; |
1497 | } | 1497 | } |
1498 | 1498 | ||
1499 | void CalendarView::syncExternal( int mode ) | 1499 | void CalendarView::syncExternal( int mode ) |
1500 | { | 1500 | { |
1501 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 1501 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
1502 | 1502 | ||
1503 | qApp->processEvents(); | 1503 | qApp->processEvents(); |
1504 | CalendarLocal* calendar = new CalendarLocal(); | 1504 | CalendarLocal* calendar = new CalendarLocal(); |
1505 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1505 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1506 | bool syncOK = false; | 1506 | bool syncOK = false; |
1507 | bool loadSuccess = false; | 1507 | bool loadSuccess = false; |
1508 | PhoneFormat* phoneFormat = 0; | 1508 | PhoneFormat* phoneFormat = 0; |
1509 | emit tempDisableBR(true); | 1509 | emit tempDisableBR(true); |
1510 | #ifndef DESKTOP_VERSION | 1510 | #ifndef DESKTOP_VERSION |
1511 | SharpFormat* sharpFormat = 0; | 1511 | SharpFormat* sharpFormat = 0; |
1512 | if ( mode == 0 ) { // sharp | 1512 | if ( mode == 0 ) { // sharp |
1513 | sharpFormat = new SharpFormat () ; | 1513 | sharpFormat = new SharpFormat () ; |
1514 | loadSuccess = sharpFormat->load( calendar, mCalendar ); | 1514 | loadSuccess = sharpFormat->load( calendar, mCalendar ); |
1515 | 1515 | ||
1516 | } else | 1516 | } else |
1517 | #endif | 1517 | #endif |
1518 | if ( mode == 1 ) { // phone | 1518 | if ( mode == 1 ) { // phone |
1519 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, | 1519 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, |
1520 | mSyncManager->mPhoneDevice, | 1520 | mSyncManager->mPhoneDevice, |
1521 | mSyncManager->mPhoneConnection, | 1521 | mSyncManager->mPhoneConnection, |
1522 | mSyncManager->mPhoneModel); | 1522 | mSyncManager->mPhoneModel); |
1523 | loadSuccess = phoneFormat->load( calendar,mCalendar); | 1523 | loadSuccess = phoneFormat->load( calendar,mCalendar); |
1524 | 1524 | ||
1525 | } else { | 1525 | } else { |
1526 | emit tempDisableBR(false); | 1526 | emit tempDisableBR(false); |
1527 | return; | 1527 | return; |
1528 | } | 1528 | } |
1529 | if ( loadSuccess ) { | 1529 | if ( loadSuccess ) { |
1530 | getEventViewerDialog()->setSyncMode( true ); | 1530 | getEventViewerDialog()->setSyncMode( true ); |
1531 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); | 1531 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); |
1532 | getEventViewerDialog()->setSyncMode( false ); | 1532 | getEventViewerDialog()->setSyncMode( false ); |
1533 | qApp->processEvents(); | 1533 | qApp->processEvents(); |
1534 | if ( syncOK ) { | 1534 | if ( syncOK ) { |
1535 | if ( mSyncManager->mWriteBackFile ) | 1535 | if ( mSyncManager->mWriteBackFile ) |
1536 | { | 1536 | { |
1537 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); | 1537 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); |
1538 | Incidence* inc = iL.first(); | 1538 | Incidence* inc = iL.first(); |
1539 | if ( phoneFormat ) { | 1539 | if ( phoneFormat ) { |
1540 | while ( inc ) { | 1540 | while ( inc ) { |
1541 | inc->removeID(mCurrentSyncDevice); | 1541 | inc->removeID(mCurrentSyncDevice); |
1542 | inc = iL.next(); | 1542 | inc = iL.next(); |
1543 | } | 1543 | } |
1544 | } | 1544 | } |
1545 | #ifndef DESKTOP_VERSION | 1545 | #ifndef DESKTOP_VERSION |
1546 | if ( sharpFormat ) | 1546 | if ( sharpFormat ) |
1547 | sharpFormat->save(calendar); | 1547 | sharpFormat->save(calendar); |
1548 | #endif | 1548 | #endif |
1549 | if ( phoneFormat ) | 1549 | if ( phoneFormat ) |
1550 | phoneFormat->save(calendar); | 1550 | phoneFormat->save(calendar); |
1551 | iL = calendar->rawIncidences(); | 1551 | iL = calendar->rawIncidences(); |
1552 | inc = iL.first(); | 1552 | inc = iL.first(); |
1553 | Incidence* loc; | 1553 | Incidence* loc; |
1554 | while ( inc ) { | 1554 | while ( inc ) { |
1555 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { | 1555 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { |
1556 | loc = mCalendar->incidence(inc->uid() ); | 1556 | loc = mCalendar->incidence(inc->uid() ); |
1557 | if ( loc ) { | 1557 | if ( loc ) { |
1558 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); | 1558 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); |
1559 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); | 1559 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); |
1560 | } | 1560 | } |
1561 | } | 1561 | } |
1562 | inc = iL.next(); | 1562 | inc = iL.next(); |
1563 | } | 1563 | } |
1564 | Incidence* lse = getLastSyncEvent(); | 1564 | Incidence* lse = getLastSyncEvent(); |
1565 | if ( lse ) { | 1565 | if ( lse ) { |
1566 | lse->setReadOnly( false ); | 1566 | lse->setReadOnly( false ); |
1567 | lse->setDescription( "" ); | 1567 | lse->setDescription( "" ); |
1568 | lse->setReadOnly( true ); | 1568 | lse->setReadOnly( true ); |
1569 | } | 1569 | } |
1570 | } | 1570 | } |
1571 | } else { | 1571 | } else { |
1572 | topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); | 1572 | topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); |
1573 | } | 1573 | } |
1574 | setModified( true ); | 1574 | setModified( true ); |
1575 | } else { | 1575 | } else { |
1576 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; | 1576 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; |
1577 | QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), | 1577 | QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), |
1578 | question, i18n("Ok")) ; | 1578 | question, i18n("Ok")) ; |
1579 | 1579 | ||
1580 | } | 1580 | } |
1581 | delete calendar; | 1581 | delete calendar; |
1582 | updateView(); | 1582 | updateView(); |
1583 | emit tempDisableBR(false); | 1583 | emit tempDisableBR(false); |
1584 | return ;//syncOK; | 1584 | return ;//syncOK; |
1585 | 1585 | ||
1586 | } | 1586 | } |
1587 | 1587 | ||
1588 | bool CalendarView::importBday() | 1588 | bool CalendarView::importBday() |
1589 | { | 1589 | { |
1590 | #ifndef KORG_NOKABC | 1590 | #ifndef KORG_NOKABC |
1591 | 1591 | ||
1592 | #ifdef DESKTOP_VERSION | 1592 | #ifdef DESKTOP_VERSION |
1593 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 1593 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
1594 | KABC::AddressBook::Iterator it; | 1594 | KABC::AddressBook::Iterator it; |
1595 | int count = 0; | 1595 | int count = 0; |
1596 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 1596 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
1597 | ++count; | 1597 | ++count; |
1598 | } | 1598 | } |
1599 | QProgressBar bar(count,0 ); | 1599 | QProgressBar bar(count,0 ); |
1600 | int w = 300; | 1600 | int w = 300; |
1601 | if ( QApplication::desktop()->width() < 320 ) | 1601 | if ( QApplication::desktop()->width() < 320 ) |
1602 | w = 220; | 1602 | w = 220; |
1603 | int h = bar.sizeHint().height() ; | 1603 | int h = bar.sizeHint().height() ; |
1604 | int dw = QApplication::desktop()->width(); | 1604 | int dw = QApplication::desktop()->width(); |
1605 | int dh = QApplication::desktop()->height(); | 1605 | int dh = QApplication::desktop()->height(); |
1606 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1606 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1607 | bar.show(); | 1607 | bar.show(); |
1608 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); | 1608 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); |
1609 | qApp->processEvents(); | 1609 | qApp->processEvents(); |
1610 | count = 0; | 1610 | count = 0; |
1611 | int addCount = 0; | 1611 | int addCount = 0; |
1612 | KCal::Attendee* a = 0; | 1612 | KCal::Attendee* a = 0; |
1613 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 1613 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
1614 | if ( ! bar.isVisible() ) | 1614 | if ( ! bar.isVisible() ) |
1615 | return false; | 1615 | return false; |
1616 | bar.setProgress( count++ ); | 1616 | bar.setProgress( count++ ); |
1617 | qApp->processEvents(); | 1617 | qApp->processEvents(); |
1618 | //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); | 1618 | //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); |
1619 | if ( (*it).birthday().date().isValid() ){ | 1619 | if ( (*it).birthday().date().isValid() ){ |
1620 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; | 1620 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; |
1621 | if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) | 1621 | if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) |
1622 | ++addCount; | 1622 | ++addCount; |
1623 | } | 1623 | } |
1624 | QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); | 1624 | QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); |
1625 | if ( anni.isValid() ){ | 1625 | if ( anni.isValid() ){ |
1626 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; | 1626 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; |
1627 | if ( addAnniversary( anni, (*it).assembledName(), a, false ) ) | 1627 | if ( addAnniversary( anni, (*it).assembledName(), a, false ) ) |
1628 | ++addCount; | 1628 | ++addCount; |
1629 | } | 1629 | } |
1630 | } | 1630 | } |
1631 | updateView(); | 1631 | updateView(); |
1632 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 1632 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
1633 | #else //DESKTOP_VERSION | 1633 | #else //DESKTOP_VERSION |
1634 | 1634 | ||
1635 | ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); | 1635 | ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); |
1636 | // the result should now arrive through method insertBirthdays | 1636 | // the result should now arrive through method insertBirthdays |
1637 | 1637 | ||
1638 | #endif //DESKTOP_VERSION | 1638 | #endif //DESKTOP_VERSION |
1639 | 1639 | ||
1640 | #endif //KORG_NOKABC | 1640 | #endif //KORG_NOKABC |
1641 | 1641 | ||
1642 | 1642 | ||
1643 | return true; | 1643 | return true; |
1644 | } | 1644 | } |
1645 | 1645 | ||
1646 | // This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI | 1646 | // This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI |
1647 | void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, | 1647 | void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, |
1648 | const QStringList& anniversaryList, const QStringList& realNameList, | 1648 | const QStringList& anniversaryList, const QStringList& realNameList, |
1649 | const QStringList& emailList, const QStringList& assembledNameList, | 1649 | const QStringList& emailList, const QStringList& assembledNameList, |
1650 | const QStringList& uidList) | 1650 | const QStringList& uidList) |
1651 | { | 1651 | { |
1652 | //qDebug("KO::CalendarView::insertBirthdays"); | 1652 | //qDebug("KO::CalendarView::insertBirthdays"); |
1653 | if (uid == this->name()) | 1653 | if (uid == this->name()) |
1654 | { | 1654 | { |
1655 | int count = birthdayList.count(); | 1655 | int count = birthdayList.count(); |
1656 | int addCount = 0; | 1656 | int addCount = 0; |
1657 | KCal::Attendee* a = 0; | 1657 | KCal::Attendee* a = 0; |
1658 | 1658 | ||
1659 | //qDebug("CalView 1 %i", count); | 1659 | //qDebug("CalView 1 %i", count); |
1660 | 1660 | ||
1661 | QProgressBar bar(count,0 ); | 1661 | QProgressBar bar(count,0 ); |
1662 | int w = 300; | 1662 | int w = 300; |
1663 | if ( QApplication::desktop()->width() < 320 ) | 1663 | if ( QApplication::desktop()->width() < 320 ) |
1664 | w = 220; | 1664 | w = 220; |
1665 | int h = bar.sizeHint().height() ; | 1665 | int h = bar.sizeHint().height() ; |
1666 | int dw = QApplication::desktop()->width(); | 1666 | int dw = QApplication::desktop()->width(); |
1667 | int dh = QApplication::desktop()->height(); | 1667 | int dh = QApplication::desktop()->height(); |
1668 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1668 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1669 | bar.show(); | 1669 | bar.show(); |
1670 | bar.setCaption (i18n("inserting birthdays - close to abort!") ); | 1670 | bar.setCaption (i18n("inserting birthdays - close to abort!") ); |
1671 | qApp->processEvents(); | 1671 | qApp->processEvents(); |
1672 | 1672 | ||
1673 | QDate birthday; | 1673 | QDate birthday; |
1674 | QDate anniversary; | 1674 | QDate anniversary; |
1675 | QString realName; | 1675 | QString realName; |
1676 | QString email; | 1676 | QString email; |
1677 | QString assembledName; | 1677 | QString assembledName; |
1678 | QString uid; | 1678 | QString uid; |
1679 | bool ok = true; | 1679 | bool ok = true; |
1680 | for ( int i = 0; i < count; i++) | 1680 | for ( int i = 0; i < count; i++) |
1681 | { | 1681 | { |
1682 | if ( ! bar.isVisible() ) | 1682 | if ( ! bar.isVisible() ) |
1683 | return; | 1683 | return; |
1684 | bar.setProgress( i ); | 1684 | bar.setProgress( i ); |
1685 | qApp->processEvents(); | 1685 | qApp->processEvents(); |
1686 | 1686 | ||
1687 | birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); | 1687 | birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); |
1688 | if (!ok) { | 1688 | if (!ok) { |
1689 | ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); | 1689 | ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); |
1690 | } | 1690 | } |
1691 | 1691 | ||
1692 | anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); | 1692 | anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); |
1693 | if (!ok) { | 1693 | if (!ok) { |
1694 | ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); | 1694 | ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); |
1695 | } | 1695 | } |
1696 | realName = realNameList[i]; | 1696 | realName = realNameList[i]; |
1697 | email = emailList[i]; | 1697 | email = emailList[i]; |
1698 | assembledName = assembledNameList[i]; | 1698 | assembledName = assembledNameList[i]; |
1699 | uid = uidList[i]; | 1699 | uid = uidList[i]; |
1700 | //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() ); | 1700 | //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() ); |
1701 | 1701 | ||
1702 | if ( birthday.isValid() ){ | 1702 | if ( birthday.isValid() ){ |
1703 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 1703 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
1704 | KCal::Attendee::ReqParticipant,uid) ; | 1704 | KCal::Attendee::ReqParticipant,uid) ; |
1705 | if ( addAnniversary( birthday, assembledName, a, true ) ) | 1705 | if ( addAnniversary( birthday, assembledName, a, true ) ) |
1706 | ++addCount; | 1706 | ++addCount; |
1707 | } | 1707 | } |
1708 | 1708 | ||
1709 | if ( anniversary.isValid() ){ | 1709 | if ( anniversary.isValid() ){ |
1710 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 1710 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
1711 | KCal::Attendee::ReqParticipant,uid) ; | 1711 | KCal::Attendee::ReqParticipant,uid) ; |
1712 | if ( addAnniversary( anniversary, assembledName, a, false ) ) | 1712 | if ( addAnniversary( anniversary, assembledName, a, false ) ) |
1713 | ++addCount; | 1713 | ++addCount; |
1714 | } | 1714 | } |
1715 | } | 1715 | } |
1716 | 1716 | ||
1717 | updateView(); | 1717 | updateView(); |
1718 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 1718 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
1719 | 1719 | ||
1720 | } | 1720 | } |
1721 | 1721 | ||
1722 | } | 1722 | } |
1723 | 1723 | ||
1724 | 1724 | ||
1725 | 1725 | ||
1726 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) | 1726 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) |
1727 | { | 1727 | { |
1728 | //qDebug("addAnni "); | 1728 | //qDebug("addAnni "); |
1729 | Event * ev = new Event(); | 1729 | Event * ev = new Event(); |
1730 | ev->setOrganizer(KOPrefs::instance()->email()); | 1730 | ev->setOrganizer(KOPrefs::instance()->email()); |
1731 | if ( a ) { | 1731 | if ( a ) { |
1732 | ev->addAttendee( a ); | 1732 | ev->addAttendee( a ); |
1733 | } | 1733 | } |
1734 | QString kind; | 1734 | QString kind; |
1735 | if ( birthday ) { | 1735 | if ( birthday ) { |
1736 | kind = i18n( "Birthday" ); | 1736 | kind = i18n( "Birthday" ); |
1737 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); | 1737 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); |
1738 | } | 1738 | } |
1739 | else { | 1739 | else { |
1740 | kind = i18n( "Anniversary" ); | 1740 | kind = i18n( "Anniversary" ); |
1741 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); | 1741 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); |
1742 | } | 1742 | } |
1743 | ev->setCategories( kind ); | 1743 | ev->setCategories( kind ); |
1744 | ev->setDtStart( QDateTime(date) ); | 1744 | ev->setDtStart( QDateTime(date) ); |
1745 | ev->setDtEnd( QDateTime(date) ); | 1745 | ev->setDtEnd( QDateTime(date) ); |
1746 | ev->setFloats( true ); | 1746 | ev->setFloats( true ); |
1747 | Recurrence * rec = ev->recurrence(); | 1747 | Recurrence * rec = ev->recurrence(); |
1748 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); | 1748 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); |
1749 | rec->addYearlyNum( date.month() ); | 1749 | rec->addYearlyNum( date.month() ); |
1750 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { | 1750 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { |
1751 | delete ev; | 1751 | delete ev; |
1752 | return false; | 1752 | return false; |
1753 | } | 1753 | } |
1754 | return true; | 1754 | return true; |
1755 | 1755 | ||
1756 | } | 1756 | } |
1757 | bool CalendarView::importQtopia( const QString &categories, | 1757 | bool CalendarView::importQtopia( const QString &categories, |
1758 | const QString &datebook, | 1758 | const QString &datebook, |
1759 | const QString &todolist ) | 1759 | const QString &todolist ) |
1760 | { | 1760 | { |
1761 | 1761 | ||
1762 | QtopiaFormat qtopiaFormat; | 1762 | QtopiaFormat qtopiaFormat; |
1763 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 1763 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
1764 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); | 1764 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); |
1765 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); | 1765 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); |
1766 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); | 1766 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); |
1767 | 1767 | ||
1768 | updateView(); | 1768 | updateView(); |
1769 | return true; | 1769 | return true; |
1770 | 1770 | ||
1771 | #if 0 | 1771 | #if 0 |
1772 | mGlobalSyncMode = SYNC_MODE_QTOPIA; | 1772 | mGlobalSyncMode = SYNC_MODE_QTOPIA; |
1773 | mCurrentSyncDevice = "qtopia-XML"; | 1773 | mCurrentSyncDevice = "qtopia-XML"; |
1774 | if ( mSyncManager->mAskForPreferences ) | 1774 | if ( mSyncManager->mAskForPreferences ) |
1775 | edit_sync_options(); | 1775 | edit_sync_options(); |
1776 | qApp->processEvents(); | 1776 | qApp->processEvents(); |
1777 | CalendarLocal* calendar = new CalendarLocal(); | 1777 | CalendarLocal* calendar = new CalendarLocal(); |
1778 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1778 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1779 | bool syncOK = false; | 1779 | bool syncOK = false; |
1780 | QtopiaFormat qtopiaFormat; | 1780 | QtopiaFormat qtopiaFormat; |
1781 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 1781 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
1782 | bool loadOk = true; | 1782 | bool loadOk = true; |
1783 | if ( !categories.isEmpty() ) | 1783 | if ( !categories.isEmpty() ) |
1784 | loadOk = qtopiaFormat.load( calendar, categories ); | 1784 | loadOk = qtopiaFormat.load( calendar, categories ); |
1785 | if ( loadOk && !datebook.isEmpty() ) | 1785 | if ( loadOk && !datebook.isEmpty() ) |
1786 | loadOk = qtopiaFormat.load( calendar, datebook ); | 1786 | loadOk = qtopiaFormat.load( calendar, datebook ); |
1787 | if ( loadOk && !todolist.isEmpty() ) | 1787 | if ( loadOk && !todolist.isEmpty() ) |
1788 | loadOk = qtopiaFormat.load( calendar, todolist ); | 1788 | loadOk = qtopiaFormat.load( calendar, todolist ); |
1789 | 1789 | ||
1790 | if ( loadOk ) { | 1790 | if ( loadOk ) { |
1791 | getEventViewerDialog()->setSyncMode( true ); | 1791 | getEventViewerDialog()->setSyncMode( true ); |
1792 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); | 1792 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); |
1793 | getEventViewerDialog()->setSyncMode( false ); | 1793 | getEventViewerDialog()->setSyncMode( false ); |
1794 | qApp->processEvents(); | 1794 | qApp->processEvents(); |
1795 | if ( syncOK ) { | 1795 | if ( syncOK ) { |
1796 | if ( mSyncManager->mWriteBackFile ) | 1796 | if ( mSyncManager->mWriteBackFile ) |
1797 | { | 1797 | { |
1798 | // write back XML file | 1798 | // write back XML file |
1799 | 1799 | ||
1800 | } | 1800 | } |
1801 | setModified( true ); | 1801 | setModified( true ); |
1802 | } | 1802 | } |
1803 | } else { | 1803 | } else { |
1804 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; | 1804 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; |
1805 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), | 1805 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), |
1806 | question, i18n("Ok")) ; | 1806 | question, i18n("Ok")) ; |
1807 | } | 1807 | } |
1808 | delete calendar; | 1808 | delete calendar; |
1809 | updateView(); | 1809 | updateView(); |
1810 | return syncOK; | 1810 | return syncOK; |
1811 | 1811 | ||
1812 | 1812 | ||
1813 | #endif | 1813 | #endif |
1814 | 1814 | ||
1815 | } | 1815 | } |
1816 | 1816 | ||
1817 | void CalendarView::setSyncEventsReadOnly() | 1817 | void CalendarView::setSyncEventsReadOnly() |
1818 | { | 1818 | { |
1819 | Event * ev; | 1819 | Event * ev; |
1820 | QPtrList<Event> eL = mCalendar->rawEvents(); | 1820 | QPtrList<Event> eL = mCalendar->rawEvents(); |
1821 | ev = eL.first(); | 1821 | ev = eL.first(); |
1822 | while ( ev ) { | 1822 | while ( ev ) { |
1823 | if ( ev->uid().left(15) == QString("last-syncEvent-") ) | 1823 | if ( ev->uid().left(15) == QString("last-syncEvent-") ) |
1824 | ev->setReadOnly( true ); | 1824 | ev->setReadOnly( true ); |
1825 | ev = eL.next(); | 1825 | ev = eL.next(); |
1826 | } | 1826 | } |
1827 | } | 1827 | } |
1828 | bool CalendarView::openCalendar(QString filename, bool merge) | 1828 | bool CalendarView::openCalendar(QString filename, bool merge) |
1829 | { | 1829 | { |
1830 | 1830 | ||
1831 | if (filename.isEmpty()) { | 1831 | if (filename.isEmpty()) { |
1832 | return false; | 1832 | return false; |
1833 | } | 1833 | } |
1834 | 1834 | ||
1835 | if (!QFile::exists(filename)) { | 1835 | if (!QFile::exists(filename)) { |
1836 | KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); | 1836 | KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); |
1837 | return false; | 1837 | return false; |
1838 | } | 1838 | } |
1839 | 1839 | ||
1840 | globalFlagBlockAgenda = 1; | 1840 | globalFlagBlockAgenda = 1; |
1841 | clearAllViews(); | 1841 | clearAllViews(); |
1842 | if (!merge) { | 1842 | if (!merge) { |
1843 | mViewManager->setDocumentId( filename ); | 1843 | mViewManager->setDocumentId( filename ); |
1844 | mCalendar->close(); | 1844 | mCalendar->close(); |
1845 | } | 1845 | } |
1846 | mStorage->setFileName( filename ); | 1846 | mStorage->setFileName( filename ); |
1847 | 1847 | ||
1848 | if ( mStorage->load() ) { | 1848 | if ( mStorage->load() ) { |
1849 | if ( merge ) ;//setModified( true ); | 1849 | if ( merge ) ;//setModified( true ); |
1850 | else { | 1850 | else { |
1851 | //setModified( true ); | 1851 | //setModified( true ); |
1852 | mViewManager->setDocumentId( filename ); | 1852 | mViewManager->setDocumentId( filename ); |
1853 | mDialogManager->setDocumentId( filename ); | 1853 | mDialogManager->setDocumentId( filename ); |
1854 | mTodoList->setDocumentId( filename ); | 1854 | mTodoList->setDocumentId( filename ); |
1855 | } | 1855 | } |
1856 | globalFlagBlockAgenda = 2; | 1856 | globalFlagBlockAgenda = 2; |
1857 | // if ( getLastSyncEvent() ) | 1857 | // if ( getLastSyncEvent() ) |
1858 | // getLastSyncEvent()->setReadOnly( true ); | 1858 | // getLastSyncEvent()->setReadOnly( true ); |
1859 | mCalendar->reInitAlarmSettings(); | 1859 | mCalendar->reInitAlarmSettings(); |
1860 | setSyncEventsReadOnly(); | 1860 | setSyncEventsReadOnly(); |
1861 | updateUnmanagedViews(); | 1861 | updateUnmanagedViews(); |
1862 | updateView(); | 1862 | updateView(); |
1863 | if ( filename != MainWindow::defaultFileName() ) { | 1863 | if ( filename != MainWindow::defaultFileName() ) { |
1864 | saveCalendar( MainWindow::defaultFileName() ); | 1864 | saveCalendar( MainWindow::defaultFileName() ); |
1865 | } else { | 1865 | } else { |
1866 | QFileInfo finf ( MainWindow::defaultFileName()); | 1866 | QFileInfo finf ( MainWindow::defaultFileName()); |
1867 | if ( finf.exists() ) { | 1867 | if ( finf.exists() ) { |
1868 | setLoadedFileVersion( finf.lastModified () ); | 1868 | setLoadedFileVersion( finf.lastModified () ); |
1869 | } | 1869 | } |
1870 | } | 1870 | } |
1871 | return true; | 1871 | return true; |
1872 | } else { | 1872 | } else { |
1873 | // while failing to load, the calendar object could | 1873 | // while failing to load, the calendar object could |
1874 | // have become partially populated. Clear it out. | 1874 | // have become partially populated. Clear it out. |
1875 | if ( !merge ) { | 1875 | if ( !merge ) { |
1876 | mCalendar->close(); | 1876 | mCalendar->close(); |
1877 | mViewManager->setDocumentId( filename ); | 1877 | mViewManager->setDocumentId( filename ); |
1878 | mDialogManager->setDocumentId( filename ); | 1878 | mDialogManager->setDocumentId( filename ); |
1879 | mTodoList->setDocumentId( filename ); | 1879 | mTodoList->setDocumentId( filename ); |
1880 | } | 1880 | } |
1881 | 1881 | ||
1882 | //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); | 1882 | //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); |
1883 | 1883 | ||
1884 | QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); | 1884 | QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); |
1885 | globalFlagBlockAgenda = 2; | 1885 | globalFlagBlockAgenda = 2; |
1886 | mCalendar->reInitAlarmSettings(); | 1886 | mCalendar->reInitAlarmSettings(); |
1887 | setSyncEventsReadOnly(); | 1887 | setSyncEventsReadOnly(); |
1888 | updateUnmanagedViews(); | 1888 | updateUnmanagedViews(); |
1889 | updateView(); | 1889 | updateView(); |
1890 | } | 1890 | } |
1891 | return false; | 1891 | return false; |
1892 | } | 1892 | } |
1893 | void CalendarView::showOpenError() | 1893 | void CalendarView::showOpenError() |
1894 | { | 1894 | { |
1895 | KMessageBox::error(this,i18n("Couldn't load calendar\n.")); | 1895 | KMessageBox::error(this,i18n("Couldn't load calendar\n.")); |
1896 | } | 1896 | } |
1897 | void CalendarView::setLoadedFileVersion(QDateTime dt) | 1897 | void CalendarView::setLoadedFileVersion(QDateTime dt) |
1898 | { | 1898 | { |
1899 | loadedFileVersion = dt; | 1899 | loadedFileVersion = dt; |
1900 | } | 1900 | } |
1901 | bool CalendarView::checkFileChanged(QString fn) | 1901 | bool CalendarView::checkFileChanged(QString fn) |
1902 | { | 1902 | { |
1903 | QFileInfo finf ( fn ); | 1903 | QFileInfo finf ( fn ); |
1904 | if ( !finf.exists() ) | 1904 | if ( !finf.exists() ) |
1905 | return true; | 1905 | return true; |
1906 | QDateTime dt = finf.lastModified (); | 1906 | QDateTime dt = finf.lastModified (); |
1907 | if ( dt <= loadedFileVersion ) | 1907 | if ( dt <= loadedFileVersion ) |
1908 | return false; | 1908 | return false; |
1909 | return true; | 1909 | return true; |
1910 | 1910 | ||
1911 | } | 1911 | } |
1912 | void CalendarView::watchSavedFile() | 1912 | void CalendarView::watchSavedFile() |
1913 | { | 1913 | { |
1914 | QFileInfo finf ( MainWindow::defaultFileName()); | 1914 | QFileInfo finf ( MainWindow::defaultFileName()); |
1915 | if ( !finf.exists() ) | 1915 | if ( !finf.exists() ) |
1916 | return; | 1916 | return; |
1917 | QDateTime dt = finf.lastModified (); | 1917 | QDateTime dt = finf.lastModified (); |
1918 | if ( dt < loadedFileVersion ) { | 1918 | if ( dt < loadedFileVersion ) { |
1919 | //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); | 1919 | //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); |
1920 | QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); | 1920 | QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); |
1921 | return; | 1921 | return; |
1922 | } | 1922 | } |
1923 | loadedFileVersion = dt; | 1923 | loadedFileVersion = dt; |
1924 | } | 1924 | } |
1925 | 1925 | ||
1926 | bool CalendarView::checkFileVersion(QString fn) | 1926 | bool CalendarView::checkFileVersion(QString fn) |
1927 | { | 1927 | { |
1928 | QFileInfo finf ( fn ); | 1928 | QFileInfo finf ( fn ); |
1929 | if ( !finf.exists() ) | 1929 | if ( !finf.exists() ) |
1930 | return true; | 1930 | return true; |
1931 | QDateTime dt = finf.lastModified (); | 1931 | QDateTime dt = finf.lastModified (); |
1932 | //qDebug("loaded file version %s",loadedFileVersion.toString().latin1()); | 1932 | //qDebug("loaded file version %s",loadedFileVersion.toString().latin1()); |
1933 | //qDebug("file on disk version %s",dt.toString().latin1()); | 1933 | //qDebug("file on disk version %s",dt.toString().latin1()); |
1934 | if ( dt <= loadedFileVersion ) | 1934 | if ( dt <= loadedFileVersion ) |
1935 | return true; | 1935 | return true; |
1936 | int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , | 1936 | int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , |
1937 | i18n("KO/Pi Warning"),i18n("Overwrite"), | 1937 | i18n("KO/Pi Warning"),i18n("Overwrite"), |
1938 | i18n("Sync+save")); | 1938 | i18n("Sync+save")); |
1939 | 1939 | ||
1940 | if ( km == KMessageBox::Cancel ) | 1940 | if ( km == KMessageBox::Cancel ) |
1941 | return false; | 1941 | return false; |
1942 | if ( km == KMessageBox::Yes ) | 1942 | if ( km == KMessageBox::Yes ) |
1943 | return true; | 1943 | return true; |
1944 | 1944 | ||
1945 | setSyncDevice("deleteaftersync" ); | 1945 | setSyncDevice("deleteaftersync" ); |
1946 | mSyncManager->mAskForPreferences = true; | 1946 | mSyncManager->mAskForPreferences = true; |
1947 | mSyncManager->mSyncAlgoPrefs = 3; | 1947 | mSyncManager->mSyncAlgoPrefs = 3; |
1948 | mSyncManager->mWriteBackFile = false; | 1948 | mSyncManager->mWriteBackFile = false; |
1949 | mSyncManager->mWriteBackExistingOnly = false; | 1949 | mSyncManager->mWriteBackExistingOnly = false; |
1950 | mSyncManager->mShowSyncSummary = false; | 1950 | mSyncManager->mShowSyncSummary = false; |
1951 | syncCalendar( fn, 3 ); | 1951 | syncCalendar( fn, 3 ); |
1952 | Event * e = getLastSyncEvent(); | 1952 | Event * e = getLastSyncEvent(); |
1953 | if ( e ) | 1953 | if ( e ) |
1954 | deleteEvent ( e ); | 1954 | deleteEvent ( e ); |
1955 | updateView(); | 1955 | updateView(); |
1956 | return true; | 1956 | return true; |
1957 | } | 1957 | } |
1958 | 1958 | ||
1959 | bool CalendarView::saveCalendar( QString filename ) | 1959 | bool CalendarView::saveCalendar( QString filename ) |
1960 | { | 1960 | { |
1961 | 1961 | ||
1962 | // Store back all unsaved data into calendar object | 1962 | // Store back all unsaved data into calendar object |
1963 | // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); | 1963 | // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); |
1964 | if ( mViewManager->currentView() ) | 1964 | if ( mViewManager->currentView() ) |
1965 | mViewManager->currentView()->flushView(); | 1965 | mViewManager->currentView()->flushView(); |
1966 | 1966 | ||
1967 | 1967 | ||
1968 | QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); | 1968 | QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); |
1969 | mStorage->setSaveFormat( new ICalFormat() ); | 1969 | mStorage->setSaveFormat( new ICalFormat() ); |
1970 | mStorage->setFileName( filename ); | 1970 | mStorage->setFileName( filename ); |
1971 | bool success; | 1971 | bool success; |
1972 | success = mStorage->save(); | 1972 | success = mStorage->save(); |
1973 | if ( !success ) { | 1973 | if ( !success ) { |
1974 | return false; | 1974 | return false; |
1975 | } | 1975 | } |
1976 | if ( filename == MainWindow::defaultFileName() ) { | 1976 | if ( filename == MainWindow::defaultFileName() ) { |
1977 | setLoadedFileVersion( lfv ); | 1977 | setLoadedFileVersion( lfv ); |
1978 | watchSavedFile(); | 1978 | watchSavedFile(); |
1979 | } | 1979 | } |
1980 | return true; | 1980 | return true; |
1981 | } | 1981 | } |
1982 | 1982 | ||
1983 | void CalendarView::closeCalendar() | 1983 | void CalendarView::closeCalendar() |
1984 | { | 1984 | { |
1985 | 1985 | ||
1986 | // child windows no longer valid | 1986 | // child windows no longer valid |
1987 | clearAllViews(); | 1987 | clearAllViews(); |
1988 | emit closingDown(); | 1988 | emit closingDown(); |
1989 | 1989 | ||
1990 | mCalendar->close(); | 1990 | mCalendar->close(); |
1991 | setModified(false); | 1991 | setModified(false); |
1992 | updateView(); | 1992 | updateView(); |
1993 | } | 1993 | } |
1994 | 1994 | ||
1995 | void CalendarView::archiveCalendar() | 1995 | void CalendarView::archiveCalendar() |
1996 | { | 1996 | { |
1997 | mDialogManager->showArchiveDialog(); | 1997 | mDialogManager->showArchiveDialog(); |
1998 | } | 1998 | } |
1999 | 1999 | ||
2000 | 2000 | ||
2001 | void CalendarView::readSettings() | 2001 | void CalendarView::readSettings() |
2002 | { | 2002 | { |
2003 | 2003 | ||
2004 | 2004 | ||
2005 | // mViewManager->showAgendaView(); | 2005 | // mViewManager->showAgendaView(); |
2006 | QString str; | 2006 | QString str; |
2007 | //qDebug("CalendarView::readSettings() "); | 2007 | //qDebug("CalendarView::readSettings() "); |
2008 | // read settings from the KConfig, supplying reasonable | 2008 | // read settings from the KConfig, supplying reasonable |
2009 | // defaults where none are to be found | 2009 | // defaults where none are to be found |
2010 | KConfig *config = KOGlobals::config(); | 2010 | KConfig *config = KOGlobals::config(); |
2011 | #ifndef KORG_NOSPLITTER | 2011 | #ifndef KORG_NOSPLITTER |
2012 | config->setGroup("KOrganizer Geometry"); | 2012 | config->setGroup("KOrganizer Geometry"); |
2013 | 2013 | ||
2014 | QValueList<int> sizes = config->readIntListEntry("Separator1"); | 2014 | QValueList<int> sizes = config->readIntListEntry("Separator1"); |
2015 | if (sizes.count() != 2) { | 2015 | if (sizes.count() != 2) { |
2016 | sizes << mDateNavigator->minimumSizeHint().width(); | 2016 | sizes << mDateNavigator->minimumSizeHint().width(); |
2017 | sizes << 300; | 2017 | sizes << 300; |
2018 | } | 2018 | } |
2019 | mPanner->setSizes(sizes); | 2019 | mPanner->setSizes(sizes); |
2020 | 2020 | ||
2021 | sizes = config->readIntListEntry("Separator2"); | 2021 | sizes = config->readIntListEntry("Separator2"); |
2022 | if ( ( mResourceView && sizes.count() == 4 ) || | 2022 | if ( ( mResourceView && sizes.count() == 4 ) || |
2023 | ( !mResourceView && sizes.count() == 3 ) ) { | 2023 | ( !mResourceView && sizes.count() == 3 ) ) { |
2024 | mLeftSplitter->setSizes(sizes); | 2024 | mLeftSplitter->setSizes(sizes); |
2025 | } | 2025 | } |
2026 | #endif | 2026 | #endif |
2027 | globalFlagBlockAgenda = 1; | 2027 | globalFlagBlockAgenda = 1; |
2028 | mViewManager->showAgendaView(); | 2028 | mViewManager->showAgendaView(); |
2029 | //mViewManager->readSettings( config ); | 2029 | //mViewManager->readSettings( config ); |
2030 | mTodoList->restoreLayout(config,QString("Todo Layout")); | 2030 | mTodoList->restoreLayout(config,QString("Todo Layout")); |
2031 | readFilterSettings(config); | 2031 | readFilterSettings(config); |
2032 | 2032 | ||
2033 | #ifdef DESKTOP_VERSION | 2033 | #ifdef DESKTOP_VERSION |
2034 | config->setGroup("WidgetLayout"); | 2034 | config->setGroup("WidgetLayout"); |
2035 | QStringList list; | 2035 | QStringList list; |
2036 | list = config->readListEntry("MainLayout"); | 2036 | list = config->readListEntry("MainLayout"); |
2037 | int x,y,w,h; | 2037 | int x,y,w,h; |
2038 | if ( ! list.isEmpty() ) { | 2038 | if ( ! list.isEmpty() ) { |
2039 | x = list[0].toInt(); | 2039 | x = list[0].toInt(); |
2040 | y = list[1].toInt(); | 2040 | y = list[1].toInt(); |
2041 | w = list[2].toInt(); | 2041 | w = list[2].toInt(); |
2042 | h = list[3].toInt(); | 2042 | h = list[3].toInt(); |
2043 | KApplication::testCoords( &x,&y,&w,&h ); | 2043 | KApplication::testCoords( &x,&y,&w,&h ); |
2044 | topLevelWidget()->setGeometry(x,y,w,h); | 2044 | topLevelWidget()->setGeometry(x,y,w,h); |
2045 | 2045 | ||
2046 | } else { | 2046 | } else { |
2047 | topLevelWidget()->setGeometry( 40 ,40 , 640, 440); | 2047 | topLevelWidget()->setGeometry( 40 ,40 , 640, 440); |
2048 | } | 2048 | } |
2049 | list = config->readListEntry("EditEventLayout"); | 2049 | list = config->readListEntry("EditEventLayout"); |
2050 | if ( ! list.isEmpty() ) { | 2050 | if ( ! list.isEmpty() ) { |
2051 | x = list[0].toInt(); | 2051 | x = list[0].toInt(); |
2052 | y = list[1].toInt(); | 2052 | y = list[1].toInt(); |
2053 | w = list[2].toInt(); | 2053 | w = list[2].toInt(); |
2054 | h = list[3].toInt(); | 2054 | h = list[3].toInt(); |
2055 | KApplication::testCoords( &x,&y,&w,&h ); | 2055 | KApplication::testCoords( &x,&y,&w,&h ); |
2056 | mEventEditor->setGeometry(x,y,w,h); | 2056 | mEventEditor->setGeometry(x,y,w,h); |
2057 | 2057 | ||
2058 | } | 2058 | } |
2059 | list = config->readListEntry("EditTodoLayout"); | 2059 | list = config->readListEntry("EditTodoLayout"); |
2060 | if ( ! list.isEmpty() ) { | 2060 | if ( ! list.isEmpty() ) { |
2061 | x = list[0].toInt(); | 2061 | x = list[0].toInt(); |
2062 | y = list[1].toInt(); | 2062 | y = list[1].toInt(); |
2063 | w = list[2].toInt(); | 2063 | w = list[2].toInt(); |
2064 | h = list[3].toInt(); | 2064 | h = list[3].toInt(); |
2065 | KApplication::testCoords( &x,&y,&w,&h ); | 2065 | KApplication::testCoords( &x,&y,&w,&h ); |
2066 | mTodoEditor->setGeometry(x,y,w,h); | 2066 | mTodoEditor->setGeometry(x,y,w,h); |
2067 | 2067 | ||
2068 | } | 2068 | } |
2069 | list = config->readListEntry("ViewerLayout"); | 2069 | list = config->readListEntry("ViewerLayout"); |
2070 | if ( ! list.isEmpty() ) { | 2070 | if ( ! list.isEmpty() ) { |
2071 | x = list[0].toInt(); | 2071 | x = list[0].toInt(); |
2072 | y = list[1].toInt(); | 2072 | y = list[1].toInt(); |
2073 | w = list[2].toInt(); | 2073 | w = list[2].toInt(); |
2074 | h = list[3].toInt(); | 2074 | h = list[3].toInt(); |
2075 | KApplication::testCoords( &x,&y,&w,&h ); | 2075 | KApplication::testCoords( &x,&y,&w,&h ); |
2076 | getEventViewerDialog()->setGeometry(x,y,w,h); | 2076 | getEventViewerDialog()->setGeometry(x,y,w,h); |
2077 | } | 2077 | } |
2078 | #endif | 2078 | #endif |
2079 | config->setGroup( "Views" ); | 2079 | config->setGroup( "Views" ); |
2080 | int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); | 2080 | int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); |
2081 | 2081 | ||
2082 | QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); | 2082 | QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); |
2083 | 2083 | ||
2084 | int resetval = 0; | 2084 | int resetval = 0; |
2085 | int maxVal = 0; | 2085 | int maxVal = 0; |
2086 | if (sizes.count() != 3) { | 2086 | if (sizes.count() != 3) { |
2087 | if ( KOPrefs::instance()->mVerticalScreen ) { | 2087 | if ( KOPrefs::instance()->mVerticalScreen ) { |
2088 | resetval = mDateNavigator->sizeHint().width()+2; | 2088 | resetval = mDateNavigator->sizeHint().width()+2; |
2089 | } else { | 2089 | } else { |
2090 | resetval = mDateNavigator->sizeHint().height()+2; | 2090 | resetval = mDateNavigator->sizeHint().height()+2; |
2091 | } | 2091 | } |
2092 | } | 2092 | } |
2093 | if ( resetval ) { | 2093 | if ( resetval ) { |
2094 | sizes.clear(); | 2094 | sizes.clear(); |
2095 | if ( KOPrefs::instance()->mVerticalScreen ) { | 2095 | if ( KOPrefs::instance()->mVerticalScreen ) { |
2096 | maxVal = QApplication::desktop()->width() -10; | 2096 | maxVal = QApplication::desktop()->width() -10; |
2097 | } else { | 2097 | } else { |
2098 | maxVal = QApplication::desktop()->height()-10; | 2098 | maxVal = QApplication::desktop()->height()-10; |
2099 | } | 2099 | } |
2100 | sizes << resetval; | 2100 | sizes << resetval; |
2101 | if ( maxVal < resetval + resetval) | 2101 | if ( maxVal < resetval + resetval) |
2102 | resetval = maxVal - resetval; | 2102 | resetval = maxVal - resetval; |
2103 | sizes << resetval; | 2103 | sizes << resetval; |
2104 | sizes << 100; | 2104 | sizes << 100; |
2105 | } | 2105 | } |
2106 | mLeftFrame->setSizes(sizes); | 2106 | mLeftFrame->setSizes(sizes); |
2107 | sizes = config->readIntListEntry("Main Splitter Frame"); | 2107 | sizes = config->readIntListEntry("Main Splitter Frame"); |
2108 | resetval = 0; | 2108 | resetval = 0; |
2109 | maxVal = 0; | 2109 | maxVal = 0; |
2110 | if (sizes.count() != 2) { | 2110 | if (sizes.count() != 2) { |
2111 | if ( !KOPrefs::instance()->mVerticalScreen ) { | 2111 | if ( !KOPrefs::instance()->mVerticalScreen ) { |
2112 | resetval = mDateNavigator->sizeHint().width()+2; | 2112 | resetval = mDateNavigator->sizeHint().width()+2; |
2113 | } else { | 2113 | } else { |
2114 | resetval = mDateNavigator->sizeHint().height()+2; | 2114 | resetval = mDateNavigator->sizeHint().height()+2; |
2115 | } | 2115 | } |
2116 | } | 2116 | } |
2117 | if ( resetval ) { | 2117 | if ( resetval ) { |
2118 | sizes.clear(); | 2118 | sizes.clear(); |
2119 | if ( !KOPrefs::instance()->mVerticalScreen ) { | 2119 | if ( !KOPrefs::instance()->mVerticalScreen ) { |
2120 | maxVal = QApplication::desktop()->width() -10; | 2120 | maxVal = QApplication::desktop()->width() -10; |
2121 | } else { | 2121 | } else { |
2122 | maxVal = QApplication::desktop()->height()-10; | 2122 | maxVal = QApplication::desktop()->height()-10; |
2123 | } | 2123 | } |
2124 | sizes << resetval; | 2124 | sizes << resetval; |
2125 | if ( maxVal < resetval + resetval) | 2125 | if ( maxVal < resetval + resetval) |
2126 | resetval = maxVal - resetval; | 2126 | resetval = maxVal - resetval; |
2127 | sizes << resetval; | 2127 | sizes << resetval; |
2128 | } | 2128 | } |
2129 | mMainFrame->setSizes(sizes); | 2129 | mMainFrame->setSizes(sizes); |
2130 | if ( dateCount == 5 ) mNavigator->selectWorkWeek(); | 2130 | if ( dateCount == 5 ) mNavigator->selectWorkWeek(); |
2131 | else if ( dateCount == 7 ) mNavigator->selectWeek(); | 2131 | else if ( dateCount == 7 ) mNavigator->selectWeek(); |
2132 | else mNavigator->selectDates( dateCount ); | 2132 | else mNavigator->selectDates( dateCount ); |
2133 | // mViewManager->readSettings( config ); | 2133 | // mViewManager->readSettings( config ); |
2134 | updateConfig(); | 2134 | updateConfig(); |
2135 | globalFlagBlockAgenda = 2; | 2135 | globalFlagBlockAgenda = 2; |
2136 | mViewManager->readSettings( config ); | 2136 | mViewManager->readSettings( config ); |
2137 | QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); | 2137 | QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); |
2138 | } | 2138 | } |
2139 | 2139 | ||
2140 | 2140 | ||
2141 | void CalendarView::writeSettings() | 2141 | void CalendarView::writeSettings() |
2142 | { | 2142 | { |
2143 | // kdDebug() << "CalendarView::writeSettings" << endl; | 2143 | // kdDebug() << "CalendarView::writeSettings" << endl; |
2144 | 2144 | ||
2145 | KConfig *config = KOGlobals::config(); | 2145 | KConfig *config = KOGlobals::config(); |
2146 | 2146 | ||
2147 | mViewManager->writeSettings( config ); | 2147 | mViewManager->writeSettings( config ); |
2148 | mTodoList->saveLayout(config,QString("Todo Layout")); | 2148 | mTodoList->saveLayout(config,QString("Todo Layout")); |
2149 | mDialogManager->writeSettings( config ); | 2149 | mDialogManager->writeSettings( config ); |
2150 | //KOPrefs::instance()->usrWriteConfig(); | 2150 | //KOPrefs::instance()->usrWriteConfig(); |
2151 | KOPrefs::instance()->writeConfig(); | 2151 | KOPrefs::instance()->writeConfig(); |
2152 | 2152 | ||
2153 | writeFilterSettings(config); | 2153 | writeFilterSettings(config); |
2154 | config->setGroup( "AppRun" ); | 2154 | config->setGroup( "AppRun" ); |
2155 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); | 2155 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); |
2156 | config->writeEntry( "LatestProgramStop", dt.secsTo( QDateTime::currentDateTime() ) ); | 2156 | config->writeEntry( "LatestProgramStop", dt.secsTo( QDateTime::currentDateTime() ) ); |
2157 | config->setGroup( "Views" ); | 2157 | config->setGroup( "Views" ); |
2158 | config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); | 2158 | config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); |
2159 | 2159 | ||
2160 | QValueList<int> listINT = mLeftFrame->sizes(); | 2160 | QValueList<int> listINT = mLeftFrame->sizes(); |
2161 | config->writeEntry("Left Splitter Frame",listINT); | 2161 | config->writeEntry("Left Splitter Frame",listINT); |
2162 | QValueList<int> listINT2 = mMainFrame->sizes(); | 2162 | QValueList<int> listINT2 = mMainFrame->sizes(); |
2163 | config->writeEntry("Main Splitter Frame",listINT2); | 2163 | config->writeEntry("Main Splitter Frame",listINT2); |
2164 | #ifdef DESKTOP_VERSION | 2164 | #ifdef DESKTOP_VERSION |
2165 | config->setGroup("WidgetLayout"); | 2165 | config->setGroup("WidgetLayout"); |
2166 | QStringList list ;//= config->readListEntry("MainLayout"); | 2166 | QStringList list ;//= config->readListEntry("MainLayout"); |
2167 | int x,y,w,h; | 2167 | int x,y,w,h; |
2168 | QWidget* wid; | 2168 | QWidget* wid; |
2169 | wid = topLevelWidget(); | 2169 | wid = topLevelWidget(); |
2170 | x = wid->geometry().x(); | 2170 | x = wid->geometry().x(); |
2171 | y = wid->geometry().y(); | 2171 | y = wid->geometry().y(); |
2172 | w = wid->width(); | 2172 | w = wid->width(); |
2173 | h = wid->height(); | 2173 | h = wid->height(); |
2174 | list.clear(); | 2174 | list.clear(); |
2175 | list << QString::number( x ); | 2175 | list << QString::number( x ); |
2176 | list << QString::number( y ); | 2176 | list << QString::number( y ); |
2177 | list << QString::number( w ); | 2177 | list << QString::number( w ); |
2178 | list << QString::number( h ); | 2178 | list << QString::number( h ); |
2179 | config->writeEntry("MainLayout",list ); | 2179 | config->writeEntry("MainLayout",list ); |
2180 | 2180 | ||
2181 | wid = mEventEditor; | 2181 | wid = mEventEditor; |
2182 | x = wid->geometry().x(); | 2182 | x = wid->geometry().x(); |
2183 | y = wid->geometry().y(); | 2183 | y = wid->geometry().y(); |
2184 | w = wid->width(); | 2184 | w = wid->width(); |
2185 | h = wid->height(); | 2185 | h = wid->height(); |
2186 | list.clear(); | 2186 | list.clear(); |
2187 | list << QString::number( x ); | 2187 | list << QString::number( x ); |
2188 | list << QString::number( y ); | 2188 | list << QString::number( y ); |
2189 | list << QString::number( w ); | 2189 | list << QString::number( w ); |
2190 | list << QString::number( h ); | 2190 | list << QString::number( h ); |
2191 | config->writeEntry("EditEventLayout",list ); | 2191 | config->writeEntry("EditEventLayout",list ); |
2192 | 2192 | ||
2193 | wid = mTodoEditor; | 2193 | wid = mTodoEditor; |
2194 | x = wid->geometry().x(); | 2194 | x = wid->geometry().x(); |
2195 | y = wid->geometry().y(); | 2195 | y = wid->geometry().y(); |
2196 | w = wid->width(); | 2196 | w = wid->width(); |
2197 | h = wid->height(); | 2197 | h = wid->height(); |
2198 | list.clear(); | 2198 | list.clear(); |
2199 | list << QString::number( x ); | 2199 | list << QString::number( x ); |
2200 | list << QString::number( y ); | 2200 | list << QString::number( y ); |
2201 | list << QString::number( w ); | 2201 | list << QString::number( w ); |
2202 | list << QString::number( h ); | 2202 | list << QString::number( h ); |
2203 | config->writeEntry("EditTodoLayout",list ); | 2203 | config->writeEntry("EditTodoLayout",list ); |
2204 | wid = getEventViewerDialog(); | 2204 | wid = getEventViewerDialog(); |
2205 | x = wid->geometry().x(); | 2205 | x = wid->geometry().x(); |
2206 | y = wid->geometry().y(); | 2206 | y = wid->geometry().y(); |
2207 | w = wid->width(); | 2207 | w = wid->width(); |
2208 | h = wid->height(); | 2208 | h = wid->height(); |
2209 | list.clear(); | 2209 | list.clear(); |
2210 | list << QString::number( x ); | 2210 | list << QString::number( x ); |
2211 | list << QString::number( y ); | 2211 | list << QString::number( y ); |
2212 | list << QString::number( w ); | 2212 | list << QString::number( w ); |
2213 | list << QString::number( h ); | 2213 | list << QString::number( h ); |
2214 | config->writeEntry("ViewerLayout",list ); | 2214 | config->writeEntry("ViewerLayout",list ); |
2215 | wid = mDialogManager->getSearchDialog(); | 2215 | wid = mDialogManager->getSearchDialog(); |
2216 | if ( wid ) { | 2216 | if ( wid ) { |
2217 | x = wid->geometry().x(); | 2217 | x = wid->geometry().x(); |
2218 | y = wid->geometry().y(); | 2218 | y = wid->geometry().y(); |
2219 | w = wid->width(); | 2219 | w = wid->width(); |
2220 | h = wid->height(); | 2220 | h = wid->height(); |
2221 | list.clear(); | 2221 | list.clear(); |
2222 | list << QString::number( x ); | 2222 | list << QString::number( x ); |
2223 | list << QString::number( y ); | 2223 | list << QString::number( y ); |
2224 | list << QString::number( w ); | 2224 | list << QString::number( w ); |
2225 | list << QString::number( h ); | 2225 | list << QString::number( h ); |
2226 | config->writeEntry("SearchLayout",list ); | 2226 | config->writeEntry("SearchLayout",list ); |
2227 | } | 2227 | } |
2228 | #endif | 2228 | #endif |
2229 | 2229 | ||
2230 | 2230 | ||
2231 | config->sync(); | 2231 | config->sync(); |
2232 | } | 2232 | } |
2233 | 2233 | ||
2234 | void CalendarView::readFilterSettings(KConfig *config) | 2234 | void CalendarView::readFilterSettings(KConfig *config) |
2235 | { | 2235 | { |
2236 | // kdDebug() << "CalendarView::readFilterSettings()" << endl; | 2236 | // kdDebug() << "CalendarView::readFilterSettings()" << endl; |
2237 | 2237 | ||
2238 | mFilters.clear(); | 2238 | mFilters.clear(); |
2239 | 2239 | ||
2240 | config->setGroup("General"); | 2240 | config->setGroup("General"); |
2241 | QStringList filterList = config->readListEntry("CalendarFilters"); | 2241 | QStringList filterList = config->readListEntry("CalendarFilters"); |
2242 | 2242 | ||
2243 | QStringList::ConstIterator it = filterList.begin(); | 2243 | QStringList::ConstIterator it = filterList.begin(); |
2244 | QStringList::ConstIterator end = filterList.end(); | 2244 | QStringList::ConstIterator end = filterList.end(); |
2245 | while(it != end) { | 2245 | while(it != end) { |
2246 | // kdDebug() << " filter: " << (*it) << endl; | 2246 | // kdDebug() << " filter: " << (*it) << endl; |
2247 | 2247 | ||
2248 | CalFilter *filter; | 2248 | CalFilter *filter; |
2249 | filter = new CalFilter(*it); | 2249 | filter = new CalFilter(*it); |
2250 | config->setGroup("Filter_" + (*it).utf8()); | 2250 | config->setGroup("Filter_" + (*it).utf8()); |
2251 | //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) ); | 2251 | //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) ); |
2252 | filter->setCriteria(config->readNumEntry("Criteria",0)); | 2252 | filter->setCriteria(config->readNumEntry("Criteria",0)); |
2253 | filter->setCategoryList(config->readListEntry("CategoryList")); | 2253 | filter->setCategoryList(config->readListEntry("CategoryList")); |
2254 | mFilters.append(filter); | 2254 | mFilters.append(filter); |
2255 | 2255 | ||
2256 | ++it; | 2256 | ++it; |
2257 | } | 2257 | } |
2258 | 2258 | ||
2259 | if (mFilters.count() == 0) { | 2259 | if (mFilters.count() == 0) { |
2260 | CalFilter *filter = new CalFilter(i18n("Default")); | 2260 | CalFilter *filter = new CalFilter(i18n("Default")); |
2261 | mFilters.append(filter); | 2261 | mFilters.append(filter); |
2262 | } | 2262 | } |
2263 | mFilterView->updateFilters(); | 2263 | mFilterView->updateFilters(); |
2264 | config->setGroup("FilterView"); | 2264 | config->setGroup("FilterView"); |
2265 | 2265 | ||
2266 | mFilterView->blockSignals(true); | 2266 | mFilterView->blockSignals(true); |
2267 | mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled")); | 2267 | mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled")); |
2268 | mFilterView->setSelectedFilter(config->readEntry("Current Filter")); | 2268 | mFilterView->setSelectedFilter(config->readEntry("Current Filter")); |
2269 | mFilterView->blockSignals(false); | 2269 | mFilterView->blockSignals(false); |
2270 | // We do it manually to avoid it being done twice by the above calls | 2270 | // We do it manually to avoid it being done twice by the above calls |
2271 | updateFilter(); | 2271 | updateFilter(); |
2272 | } | 2272 | } |
2273 | 2273 | ||
2274 | void CalendarView::writeFilterSettings(KConfig *config) | 2274 | void CalendarView::writeFilterSettings(KConfig *config) |
2275 | { | 2275 | { |
2276 | // kdDebug() << "CalendarView::writeFilterSettings()" << endl; | 2276 | // kdDebug() << "CalendarView::writeFilterSettings()" << endl; |
2277 | 2277 | ||
2278 | QStringList filterList; | 2278 | QStringList filterList; |
2279 | 2279 | ||
2280 | CalFilter *filter = mFilters.first(); | 2280 | CalFilter *filter = mFilters.first(); |
2281 | while(filter) { | 2281 | while(filter) { |
2282 | // kdDebug() << " fn: " << filter->name() << endl; | 2282 | // kdDebug() << " fn: " << filter->name() << endl; |
2283 | filterList << filter->name(); | 2283 | filterList << filter->name(); |
2284 | config->setGroup("Filter_" + filter->name().utf8()); | 2284 | config->setGroup("Filter_" + filter->name().utf8()); |
2285 | config->writeEntry("Criteria",filter->criteria()); | 2285 | config->writeEntry("Criteria",filter->criteria()); |
2286 | config->writeEntry("CategoryList",filter->categoryList()); | 2286 | config->writeEntry("CategoryList",filter->categoryList()); |
2287 | filter = mFilters.next(); | 2287 | filter = mFilters.next(); |
2288 | } | 2288 | } |
2289 | config->setGroup("General"); | 2289 | config->setGroup("General"); |
2290 | config->writeEntry("CalendarFilters",filterList); | 2290 | config->writeEntry("CalendarFilters",filterList); |
2291 | 2291 | ||
2292 | config->setGroup("FilterView"); | 2292 | config->setGroup("FilterView"); |
2293 | config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); | 2293 | config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); |
2294 | config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); | 2294 | config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); |
2295 | } | 2295 | } |
2296 | 2296 | ||
2297 | 2297 | ||
2298 | void CalendarView::goToday() | 2298 | void CalendarView::goToday() |
2299 | { | 2299 | { |
2300 | if ( mViewManager->currentView()->isMonthView() ) | 2300 | if ( mViewManager->currentView()->isMonthView() ) |
2301 | mNavigator->selectTodayMonth(); | 2301 | mNavigator->selectTodayMonth(); |
2302 | else | 2302 | else |
2303 | mNavigator->selectToday(); | 2303 | mNavigator->selectToday(); |
2304 | } | 2304 | } |
2305 | 2305 | ||
2306 | void CalendarView::goNext() | 2306 | void CalendarView::goNext() |
2307 | { | 2307 | { |
2308 | mNavigator->selectNext(); | 2308 | mNavigator->selectNext(); |
2309 | } | 2309 | } |
2310 | 2310 | ||
2311 | void CalendarView::goPrevious() | 2311 | void CalendarView::goPrevious() |
2312 | { | 2312 | { |
2313 | mNavigator->selectPrevious(); | 2313 | mNavigator->selectPrevious(); |
2314 | } | 2314 | } |
2315 | void CalendarView::goNextMonth() | 2315 | void CalendarView::goNextMonth() |
2316 | { | 2316 | { |
2317 | mNavigator->selectNextMonth(); | 2317 | mNavigator->selectNextMonth(); |
2318 | } | 2318 | } |
2319 | 2319 | ||
2320 | void CalendarView::goPreviousMonth() | 2320 | void CalendarView::goPreviousMonth() |
2321 | { | 2321 | { |
2322 | mNavigator->selectPreviousMonth(); | 2322 | mNavigator->selectPreviousMonth(); |
2323 | } | 2323 | } |
2324 | void CalendarView::writeLocale() | 2324 | void CalendarView::writeLocale() |
2325 | { | 2325 | { |
2326 | //KPimGlobalPrefs::instance()->setGlobalConfig(); | 2326 | //KPimGlobalPrefs::instance()->setGlobalConfig(); |
2327 | #if 0 | 2327 | #if 0 |
2328 | KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); | 2328 | KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime ); |
2329 | KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday ); | 2329 | KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday ); |
2330 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate ); | 2330 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate ); |
2331 | KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage ); | 2331 | KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage ); |
2332 | QString dummy = KOPrefs::instance()->mUserDateFormatLong; | 2332 | QString dummy = KOPrefs::instance()->mUserDateFormatLong; |
2333 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | 2333 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); |
2334 | dummy = KOPrefs::instance()->mUserDateFormatShort; | 2334 | dummy = KOPrefs::instance()->mUserDateFormatShort; |
2335 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | 2335 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); |
2336 | KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, | 2336 | KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, |
2337 | KOPrefs::instance()->mDaylightsavingStart, | 2337 | KOPrefs::instance()->mDaylightsavingStart, |
2338 | KOPrefs::instance()->mDaylightsavingEnd ); | 2338 | KOPrefs::instance()->mDaylightsavingEnd ); |
2339 | KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId ); | 2339 | KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId ); |
2340 | #endif | 2340 | #endif |
2341 | } | 2341 | } |
2342 | void CalendarView::updateConfig() | 2342 | void CalendarView::updateConfig() |
2343 | { | 2343 | { |
2344 | writeLocale(); | 2344 | writeLocale(); |
2345 | if ( KOPrefs::instance()->mUseAppColors ) | 2345 | if ( KOPrefs::instance()->mUseAppColors ) |
2346 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 2346 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
2347 | emit configChanged(); | 2347 | emit configChanged(); |
2348 | mTodoList->updateConfig(); | 2348 | mTodoList->updateConfig(); |
2349 | // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); | 2349 | // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); |
2350 | mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 2350 | mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
2351 | // To make the "fill window" configurations work | 2351 | // To make the "fill window" configurations work |
2352 | //mViewManager->raiseCurrentView(); | 2352 | //mViewManager->raiseCurrentView(); |
2353 | } | 2353 | } |
2354 | 2354 | ||
2355 | 2355 | ||
2356 | void CalendarView::eventChanged(Event *event) | 2356 | void CalendarView::eventChanged(Event *event) |
2357 | { | 2357 | { |
2358 | changeEventDisplay(event,KOGlobals::EVENTEDITED); | 2358 | changeEventDisplay(event,KOGlobals::EVENTEDITED); |
2359 | //updateUnmanagedViews(); | 2359 | //updateUnmanagedViews(); |
2360 | } | 2360 | } |
2361 | 2361 | ||
2362 | void CalendarView::eventAdded(Event *event) | 2362 | void CalendarView::eventAdded(Event *event) |
2363 | { | 2363 | { |
2364 | changeEventDisplay(event,KOGlobals::EVENTADDED); | 2364 | changeEventDisplay(event,KOGlobals::EVENTADDED); |
2365 | } | 2365 | } |
2366 | 2366 | ||
2367 | void CalendarView::eventToBeDeleted(Event *) | 2367 | void CalendarView::eventToBeDeleted(Event *) |
2368 | { | 2368 | { |
2369 | kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; | 2369 | kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; |
2370 | } | 2370 | } |
2371 | 2371 | ||
2372 | void CalendarView::eventDeleted() | 2372 | void CalendarView::eventDeleted() |
2373 | { | 2373 | { |
2374 | changeEventDisplay(0,KOGlobals::EVENTDELETED); | 2374 | changeEventDisplay(0,KOGlobals::EVENTDELETED); |
2375 | } | 2375 | } |
2376 | void CalendarView::changeTodoDisplay(Todo *which, int action) | 2376 | void CalendarView::changeTodoDisplay(Todo *which, int action) |
2377 | { | 2377 | { |
2378 | changeIncidenceDisplay((Incidence *)which, action); | 2378 | changeIncidenceDisplay((Incidence *)which, action); |
2379 | mDateNavigator->updateView(); //LR | 2379 | mDateNavigator->updateView(); //LR |
2380 | //mDialogManager->updateSearchDialog(); | 2380 | //mDialogManager->updateSearchDialog(); |
2381 | 2381 | ||
2382 | if (which) { | 2382 | if (which) { |
2383 | mViewManager->updateWNview(); | 2383 | mViewManager->updateWNview(); |
2384 | //mTodoList->updateView(); | 2384 | //mTodoList->updateView(); |
2385 | } | 2385 | } |
2386 | 2386 | ||
2387 | } | 2387 | } |
2388 | 2388 | ||
2389 | void CalendarView::changeIncidenceDisplay(Incidence *which, int action) | 2389 | void CalendarView::changeIncidenceDisplay(Incidence *which, int action) |
2390 | { | 2390 | { |
2391 | updateUnmanagedViews(); | 2391 | updateUnmanagedViews(); |
2392 | //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); | 2392 | //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); |
2393 | if ( action == KOGlobals::EVENTDELETED ) { //delete | 2393 | if ( action == KOGlobals::EVENTDELETED ) { //delete |
2394 | mCalendar->checkAlarmForIncidence( 0, true ); | 2394 | mCalendar->checkAlarmForIncidence( 0, true ); |
2395 | if ( mEventViewerDialog ) | 2395 | if ( mEventViewerDialog ) |
2396 | mEventViewerDialog->hide(); | 2396 | mEventViewerDialog->hide(); |
2397 | } | 2397 | } |
2398 | else | 2398 | else |
2399 | mCalendar->checkAlarmForIncidence( which , false ); | 2399 | mCalendar->checkAlarmForIncidence( which , false ); |
2400 | } | 2400 | } |
2401 | 2401 | ||
2402 | // most of the changeEventDisplays() right now just call the view's | 2402 | // most of the changeEventDisplays() right now just call the view's |
2403 | // total update mode, but they SHOULD be recoded to be more refresh-efficient. | 2403 | // total update mode, but they SHOULD be recoded to be more refresh-efficient. |
2404 | void CalendarView::changeEventDisplay(Event *which, int action) | 2404 | void CalendarView::changeEventDisplay(Event *which, int action) |
2405 | { | 2405 | { |
2406 | // kdDebug() << "CalendarView::changeEventDisplay" << endl; | 2406 | // kdDebug() << "CalendarView::changeEventDisplay" << endl; |
2407 | changeIncidenceDisplay((Incidence *)which, action); | 2407 | changeIncidenceDisplay((Incidence *)which, action); |
2408 | mDateNavigator->updateView(); | 2408 | mDateNavigator->updateView(); |
2409 | //mDialogManager->updateSearchDialog(); | 2409 | //mDialogManager->updateSearchDialog(); |
2410 | 2410 | ||
2411 | if (which) { | 2411 | if (which) { |
2412 | // If there is an event view visible update the display | 2412 | // If there is an event view visible update the display |
2413 | mViewManager->currentView()->changeEventDisplay(which,action); | 2413 | mViewManager->currentView()->changeEventDisplay(which,action); |
2414 | // TODO: check, if update needed | 2414 | // TODO: check, if update needed |
2415 | // if (which->getTodoStatus()) { | 2415 | // if (which->getTodoStatus()) { |
2416 | mTodoList->updateView(); | 2416 | mTodoList->updateView(); |
2417 | // } | 2417 | // } |
2418 | } else { | 2418 | } else { |
2419 | mViewManager->currentView()->updateView(); | 2419 | mViewManager->currentView()->updateView(); |
2420 | } | 2420 | } |
2421 | } | 2421 | } |
2422 | 2422 | ||
2423 | 2423 | ||
2424 | void CalendarView::updateTodoViews() | 2424 | void CalendarView::updateTodoViews() |
2425 | { | 2425 | { |
2426 | mTodoList->updateView(); | 2426 | mTodoList->updateView(); |
2427 | mViewManager->currentView()->updateView(); | 2427 | mViewManager->currentView()->updateView(); |
2428 | 2428 | ||
2429 | } | 2429 | } |
2430 | 2430 | ||
2431 | 2431 | ||
2432 | void CalendarView::updateView(const QDate &start, const QDate &end) | 2432 | void CalendarView::updateView(const QDate &start, const QDate &end) |
2433 | { | 2433 | { |
2434 | mTodoList->updateView(); | 2434 | mTodoList->updateView(); |
2435 | mViewManager->updateView(start, end); | 2435 | mViewManager->updateView(start, end); |
2436 | //mDateNavigator->updateView(); | 2436 | //mDateNavigator->updateView(); |
2437 | } | 2437 | } |
2438 | 2438 | ||
2439 | void CalendarView::clearAllViews() | 2439 | void CalendarView::clearAllViews() |
2440 | { | 2440 | { |
2441 | mTodoList->clearList(); | 2441 | mTodoList->clearList(); |
2442 | mViewManager->clearAllViews(); | 2442 | mViewManager->clearAllViews(); |
2443 | SearchDialog * sd = mDialogManager->getSearchDialog(); | 2443 | SearchDialog * sd = mDialogManager->getSearchDialog(); |
2444 | if ( sd ) { | 2444 | if ( sd ) { |
2445 | KOListView* kol = sd->listview(); | 2445 | KOListView* kol = sd->listview(); |
2446 | if ( kol ) | 2446 | if ( kol ) |
2447 | kol->clearList(); | 2447 | kol->clearList(); |
2448 | } | 2448 | } |
2449 | } | 2449 | } |
2450 | void CalendarView::updateView() | 2450 | void CalendarView::updateView() |
2451 | { | 2451 | { |
2452 | DateList tmpList = mNavigator->selectedDates(); | 2452 | DateList tmpList = mNavigator->selectedDates(); |
2453 | 2453 | ||
2454 | if ( KOPrefs::instance()->mHideNonStartedTodos ) | 2454 | if ( KOPrefs::instance()->mHideNonStartedTodos ) |
2455 | mTodoList->updateView(); | 2455 | mTodoList->updateView(); |
2456 | // We assume that the navigator only selects consecutive days. | 2456 | // We assume that the navigator only selects consecutive days. |
2457 | updateView( tmpList.first(), tmpList.last() ); | 2457 | updateView( tmpList.first(), tmpList.last() ); |
2458 | } | 2458 | } |
2459 | 2459 | ||
2460 | void CalendarView::updateUnmanagedViews() | 2460 | void CalendarView::updateUnmanagedViews() |
2461 | { | 2461 | { |
2462 | mDateNavigator->updateDayMatrix(); | 2462 | mDateNavigator->updateDayMatrix(); |
2463 | } | 2463 | } |
2464 | 2464 | ||
2465 | int CalendarView::msgItemDelete(const QString name) | 2465 | int CalendarView::msgItemDelete(const QString name) |
2466 | { | 2466 | { |
2467 | return KMessageBox::warningContinueCancel(this,name +"\n\n"+ | 2467 | return KMessageBox::warningContinueCancel(this,name +"\n\n"+ |
2468 | i18n("This item will be\npermanently deleted."), | 2468 | i18n("This item will be\npermanently deleted."), |
2469 | i18n("KO/Pi Confirmation"),i18n("Delete")); | 2469 | i18n("KO/Pi Confirmation"),i18n("Delete")); |
2470 | } | 2470 | } |
2471 | 2471 | ||
2472 | 2472 | ||
2473 | void CalendarView::edit_cut() | 2473 | void CalendarView::edit_cut() |
2474 | { | 2474 | { |
2475 | Event *anEvent=0; | 2475 | Event *anEvent=0; |
2476 | 2476 | ||
2477 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 2477 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
2478 | 2478 | ||
2479 | if (mViewManager->currentView()->isEventView()) { | 2479 | if (mViewManager->currentView()->isEventView()) { |
2480 | if ( incidence && incidence->typeID() == eventID ) { | 2480 | if ( incidence && incidence->typeID() == eventID ) { |
2481 | anEvent = static_cast<Event *>(incidence); | 2481 | anEvent = static_cast<Event *>(incidence); |
2482 | } | 2482 | } |
2483 | } | 2483 | } |
2484 | 2484 | ||
2485 | if (!anEvent) { | 2485 | if (!anEvent) { |
2486 | KNotifyClient::beep(); | 2486 | KNotifyClient::beep(); |
2487 | return; | 2487 | return; |
2488 | } | 2488 | } |
2489 | DndFactory factory( mCalendar ); | 2489 | DndFactory factory( mCalendar ); |
2490 | factory.cutIncidence(anEvent); | 2490 | factory.cutIncidence(anEvent); |
2491 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); | 2491 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); |
2492 | } | 2492 | } |
2493 | 2493 | ||
2494 | void CalendarView::edit_copy() | 2494 | void CalendarView::edit_copy() |
2495 | { | 2495 | { |
2496 | Event *anEvent=0; | 2496 | Event *anEvent=0; |
2497 | 2497 | ||
2498 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 2498 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
2499 | 2499 | ||
2500 | if (mViewManager->currentView()->isEventView()) { | 2500 | if (mViewManager->currentView()->isEventView()) { |
2501 | if ( incidence && incidence->typeID() == eventID ) { | 2501 | if ( incidence && incidence->typeID() == eventID ) { |
2502 | anEvent = static_cast<Event *>(incidence); | 2502 | anEvent = static_cast<Event *>(incidence); |
2503 | } | 2503 | } |
2504 | } | 2504 | } |
2505 | 2505 | ||
2506 | if (!anEvent) { | 2506 | if (!anEvent) { |
2507 | KNotifyClient::beep(); | 2507 | KNotifyClient::beep(); |
2508 | return; | 2508 | return; |
2509 | } | 2509 | } |
2510 | DndFactory factory( mCalendar ); | 2510 | DndFactory factory( mCalendar ); |
2511 | factory.copyIncidence(anEvent); | 2511 | factory.copyIncidence(anEvent); |
2512 | } | 2512 | } |
2513 | 2513 | ||
2514 | void CalendarView::edit_paste() | 2514 | void CalendarView::edit_paste() |
2515 | { | 2515 | { |
2516 | QDate date = mNavigator->selectedDates().first(); | 2516 | QDate date = mNavigator->selectedDates().first(); |
2517 | 2517 | ||
2518 | DndFactory factory( mCalendar ); | 2518 | DndFactory factory( mCalendar ); |
2519 | Event *pastedEvent = (Event *)factory.pasteIncidence( date ); | 2519 | Event *pastedEvent = (Event *)factory.pasteIncidence( date ); |
2520 | 2520 | ||
2521 | changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); | 2521 | changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); |
2522 | } | 2522 | } |
2523 | 2523 | void CalendarView::edit_global_options() | |
2524 | void CalendarView::edit_options() | ||
2525 | { | 2524 | { |
2526 | QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; | 2525 | QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; |
2527 | emit save(); | 2526 | emit save(); |
2528 | emit saveStopTimer(); | 2527 | emit saveStopTimer(); |
2529 | mDialogManager->showOptionsDialog(); | 2528 | mDialogManager->showGlobalOptionsDialog(); |
2530 | if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { | 2529 | if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { |
2531 | emit saveStopTimer(); | 2530 | emit saveStopTimer(); |
2532 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), | 2531 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), |
2533 | i18n("Timezone settings"),i18n("Reload"))) { | 2532 | i18n("Timezone settings"),i18n("Reload"))) { |
2534 | qDebug("KO: TZ reload cancelled "); | 2533 | qDebug("KO: TZ reload cancelled "); |
2535 | return; | 2534 | return; |
2536 | } | 2535 | } |
2537 | qDebug("KO: Timezone change "); | 2536 | qDebug("KO: Timezone change "); |
2538 | openCalendar( MainWindow::defaultFileName() ); | 2537 | openCalendar( MainWindow::defaultFileName() ); |
2539 | setModified(true); | 2538 | setModified(true); |
2540 | } | 2539 | } |
2541 | else | 2540 | else |
2542 | qDebug("KO: No tz change "); | 2541 | qDebug("KO: No tz change "); |
2543 | 2542 | } | |
2543 | void CalendarView::edit_options() | ||
2544 | { | ||
2545 | mDialogManager->showOptionsDialog(); | ||
2544 | } | 2546 | } |
2545 | 2547 | ||
2546 | 2548 | ||
2547 | void CalendarView::slotSelectPickerDate( QDate d) | 2549 | void CalendarView::slotSelectPickerDate( QDate d) |
2548 | { | 2550 | { |
2549 | mDateFrame->hide(); | 2551 | mDateFrame->hide(); |
2550 | if ( mDatePickerMode == 1 ) { | 2552 | if ( mDatePickerMode == 1 ) { |
2551 | mNavigator->slotDaySelect( d ); | 2553 | mNavigator->slotDaySelect( d ); |
2552 | } else if ( mDatePickerMode == 2 ) { | 2554 | } else if ( mDatePickerMode == 2 ) { |
2553 | if ( mMoveIncidence->typeID() == todoID ) { | 2555 | if ( mMoveIncidence->typeID() == todoID ) { |
2554 | Todo * to = (Todo *) mMoveIncidence; | 2556 | Todo * to = (Todo *) mMoveIncidence; |
2555 | QTime tim; | 2557 | QTime tim; |
2556 | int len = 0; | 2558 | int len = 0; |
2557 | if ( to->hasStartDate() && to->hasDueDate() ) | 2559 | if ( to->hasStartDate() && to->hasDueDate() ) |
2558 | len = to->dtStart().secsTo( to->dtDue()); | 2560 | len = to->dtStart().secsTo( to->dtDue()); |
2559 | if ( to->hasDueDate() ) | 2561 | if ( to->hasDueDate() ) |
2560 | tim = to->dtDue().time(); | 2562 | tim = to->dtDue().time(); |
2561 | else { | 2563 | else { |
2562 | tim = QTime ( 0,0,0 ); | 2564 | tim = QTime ( 0,0,0 ); |
2563 | to->setFloats( true ); | 2565 | to->setFloats( true ); |
2564 | to->setHasDueDate( true ); | 2566 | to->setHasDueDate( true ); |
2565 | } | 2567 | } |
2566 | QDateTime dt ( d,tim ); | 2568 | QDateTime dt ( d,tim ); |
2567 | to->setDtDue( dt ); | 2569 | to->setDtDue( dt ); |
2568 | 2570 | ||
2569 | if ( to->hasStartDate() ) { | 2571 | if ( to->hasStartDate() ) { |
2570 | if ( len>0 ) | 2572 | if ( len>0 ) |
2571 | to->setDtStart(to->dtDue().addSecs( -len )); | 2573 | to->setDtStart(to->dtDue().addSecs( -len )); |
2572 | else | 2574 | else |
2573 | if (to->dtStart() > to->dtDue() ) | 2575 | if (to->dtStart() > to->dtDue() ) |
2574 | to->setDtStart(to->dtDue().addDays( -3 )); | 2576 | to->setDtStart(to->dtDue().addDays( -3 )); |
2575 | } | 2577 | } |
2576 | 2578 | ||
2577 | todoChanged( to ); | 2579 | todoChanged( to ); |
2578 | } else { | 2580 | } else { |
2579 | if ( mMoveIncidence->doesRecur() ) { | 2581 | if ( mMoveIncidence->doesRecur() ) { |
2580 | #if 0 | 2582 | #if 0 |
2581 | // PENDING implement this | 2583 | // PENDING implement this |
2582 | Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); | 2584 | Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); |
2583 | mCalendar()->addIncidence( newInc ); | 2585 | mCalendar()->addIncidence( newInc ); |
2584 | if ( mMoveIncidence->typeID() == todoID ) | 2586 | if ( mMoveIncidence->typeID() == todoID ) |
2585 | emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); | 2587 | emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); |
2586 | else | 2588 | else |
2587 | emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); | 2589 | emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); |
2588 | mMoveIncidence = newInc; | 2590 | mMoveIncidence = newInc; |
2589 | 2591 | ||
2590 | #endif | 2592 | #endif |
2591 | } | 2593 | } |
2592 | QTime tim = mMoveIncidence->dtStart().time(); | 2594 | QTime tim = mMoveIncidence->dtStart().time(); |
2593 | int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); | 2595 | int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); |
2594 | QDateTime dt ( d,tim ); | 2596 | QDateTime dt ( d,tim ); |
2595 | mMoveIncidence->setDtStart( dt ); | 2597 | mMoveIncidence->setDtStart( dt ); |
2596 | ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); | 2598 | ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); |
2597 | changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); | 2599 | changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); |
2598 | } | 2600 | } |
2599 | 2601 | ||
2600 | mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); | 2602 | mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); |
2601 | } | 2603 | } |
2602 | } | 2604 | } |
2603 | 2605 | ||
2604 | void CalendarView::removeCategories() | 2606 | void CalendarView::removeCategories() |
2605 | { | 2607 | { |
2606 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); | 2608 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); |
2607 | QStringList catList = KOPrefs::instance()->mCustomCategories; | 2609 | QStringList catList = KOPrefs::instance()->mCustomCategories; |
2608 | QStringList catIncList; | 2610 | QStringList catIncList; |
2609 | QStringList newCatList; | 2611 | QStringList newCatList; |
2610 | Incidence* inc = incList.first(); | 2612 | Incidence* inc = incList.first(); |
2611 | int i; | 2613 | int i; |
2612 | int count = 0; | 2614 | int count = 0; |
2613 | while ( inc ) { | 2615 | while ( inc ) { |
2614 | newCatList.clear(); | 2616 | newCatList.clear(); |
2615 | catIncList = inc->categories() ; | 2617 | catIncList = inc->categories() ; |
2616 | for( i = 0; i< catIncList.count(); ++i ) { | 2618 | for( i = 0; i< catIncList.count(); ++i ) { |
2617 | if ( catList.contains (catIncList[i])) | 2619 | if ( catList.contains (catIncList[i])) |
2618 | newCatList.append( catIncList[i] ); | 2620 | newCatList.append( catIncList[i] ); |
2619 | } | 2621 | } |
2620 | newCatList.sort(); | 2622 | newCatList.sort(); |
2621 | inc->setCategories( newCatList.join(",") ); | 2623 | inc->setCategories( newCatList.join(",") ); |
2622 | inc = incList.next(); | 2624 | inc = incList.next(); |
2623 | } | 2625 | } |
2624 | } | 2626 | } |
2625 | 2627 | ||
2626 | int CalendarView::addCategories() | 2628 | int CalendarView::addCategories() |
2627 | { | 2629 | { |
2628 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); | 2630 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); |
2629 | QStringList catList = KOPrefs::instance()->mCustomCategories; | 2631 | QStringList catList = KOPrefs::instance()->mCustomCategories; |
2630 | QStringList catIncList; | 2632 | QStringList catIncList; |
2631 | Incidence* inc = incList.first(); | 2633 | Incidence* inc = incList.first(); |
2632 | int i; | 2634 | int i; |
2633 | int count = 0; | 2635 | int count = 0; |
2634 | while ( inc ) { | 2636 | while ( inc ) { |
2635 | catIncList = inc->categories() ; | 2637 | catIncList = inc->categories() ; |
2636 | for( i = 0; i< catIncList.count(); ++i ) { | 2638 | for( i = 0; i< catIncList.count(); ++i ) { |
2637 | if ( !catList.contains (catIncList[i])) { | 2639 | if ( !catList.contains (catIncList[i])) { |
2638 | catList.append( catIncList[i] ); | 2640 | catList.append( catIncList[i] ); |
2639 | //qDebug("add cat %s ", catIncList[i].latin1()); | 2641 | //qDebug("add cat %s ", catIncList[i].latin1()); |
2640 | ++count; | 2642 | ++count; |
2641 | } | 2643 | } |
2642 | } | 2644 | } |
2643 | inc = incList.next(); | 2645 | inc = incList.next(); |
2644 | } | 2646 | } |
2645 | catList.sort(); | 2647 | catList.sort(); |
2646 | KOPrefs::instance()->mCustomCategories = catList; | 2648 | KOPrefs::instance()->mCustomCategories = catList; |
2647 | return count; | 2649 | return count; |
2648 | } | 2650 | } |
2649 | 2651 | ||
2650 | void CalendarView::manageCategories() | 2652 | void CalendarView::manageCategories() |
2651 | { | 2653 | { |
2652 | KOCatPrefs* cp = new KOCatPrefs(); | 2654 | KOCatPrefs* cp = new KOCatPrefs(); |
2653 | cp->show(); | 2655 | cp->show(); |
2654 | int w =cp->sizeHint().width() ; | 2656 | int w =cp->sizeHint().width() ; |
2655 | int h = cp->sizeHint().height() ; | 2657 | int h = cp->sizeHint().height() ; |
2656 | int dw = QApplication::desktop()->width(); | 2658 | int dw = QApplication::desktop()->width(); |
2657 | int dh = QApplication::desktop()->height(); | 2659 | int dh = QApplication::desktop()->height(); |
2658 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2660 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2659 | if ( !cp->exec() ) { | 2661 | if ( !cp->exec() ) { |
2660 | delete cp; | 2662 | delete cp; |
2661 | return; | 2663 | return; |
2662 | } | 2664 | } |
2663 | int count = 0; | 2665 | int count = 0; |
2664 | if ( cp->addCat() ) { | 2666 | if ( cp->addCat() ) { |
2665 | count = addCategories(); | 2667 | count = addCategories(); |
2666 | if ( count ) { | 2668 | if ( count ) { |
2667 | topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); | 2669 | topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); |
2668 | writeSettings(); | 2670 | writeSettings(); |
2669 | } else | 2671 | } else |
2670 | topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); | 2672 | topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); |
2671 | } else { | 2673 | } else { |
2672 | removeCategories(); | 2674 | removeCategories(); |
2673 | updateView(); | 2675 | updateView(); |
2674 | } | 2676 | } |
2675 | delete cp; | 2677 | delete cp; |
2676 | } | 2678 | } |
2677 | 2679 | ||
2678 | void CalendarView::beamIncidence(Incidence * Inc) | 2680 | void CalendarView::beamIncidence(Incidence * Inc) |
2679 | { | 2681 | { |
2680 | QPtrList<Incidence> delSel ; | 2682 | QPtrList<Incidence> delSel ; |
2681 | delSel.append(Inc); | 2683 | delSel.append(Inc); |
2682 | beamIncidenceList( delSel ); | 2684 | beamIncidenceList( delSel ); |
2683 | } | 2685 | } |
2684 | void CalendarView::beamCalendar() | 2686 | void CalendarView::beamCalendar() |
2685 | { | 2687 | { |
2686 | QPtrList<Incidence> delSel = mCalendar->rawIncidences(); | 2688 | QPtrList<Incidence> delSel = mCalendar->rawIncidences(); |
2687 | //qDebug("beamCalendar() "); | 2689 | //qDebug("beamCalendar() "); |
2688 | beamIncidenceList( delSel ); | 2690 | beamIncidenceList( delSel ); |
2689 | } | 2691 | } |
2690 | void CalendarView::beamFilteredCalendar() | 2692 | void CalendarView::beamFilteredCalendar() |
2691 | { | 2693 | { |
2692 | QPtrList<Incidence> delSel = mCalendar->incidences(); | 2694 | QPtrList<Incidence> delSel = mCalendar->incidences(); |
2693 | //qDebug("beamFilteredCalendar() "); | 2695 | //qDebug("beamFilteredCalendar() "); |
2694 | beamIncidenceList( delSel ); | 2696 | beamIncidenceList( delSel ); |
2695 | } | 2697 | } |
2696 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) | 2698 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) |
2697 | { | 2699 | { |
2698 | if ( beamDialog->exec () == QDialog::Rejected ) | 2700 | if ( beamDialog->exec () == QDialog::Rejected ) |
2699 | return; | 2701 | return; |
2700 | #ifdef DESKTOP_VERSION | 2702 | #ifdef DESKTOP_VERSION |
2701 | QString fn = locateLocal( "tmp", "kopibeamfile" ); | 2703 | QString fn = locateLocal( "tmp", "kopibeamfile" ); |
2702 | #else | 2704 | #else |
2703 | QString fn = "/tmp/kopibeamfile"; | 2705 | QString fn = "/tmp/kopibeamfile"; |
2704 | #endif | 2706 | #endif |
2705 | QString mes; | 2707 | QString mes; |
2706 | bool createbup = true; | 2708 | bool createbup = true; |
2707 | if ( createbup ) { | 2709 | if ( createbup ) { |
2708 | QString description = "\n"; | 2710 | QString description = "\n"; |
2709 | CalendarLocal* cal = new CalendarLocal(); | 2711 | CalendarLocal* cal = new CalendarLocal(); |
2710 | if ( beamDialog->beamLocal() ) | 2712 | if ( beamDialog->beamLocal() ) |
2711 | cal->setLocalTime(); | 2713 | cal->setLocalTime(); |
2712 | else | 2714 | else |
2713 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 2715 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
2714 | Incidence *incidence = delSel.first(); | 2716 | Incidence *incidence = delSel.first(); |
2715 | bool addText = false; | 2717 | bool addText = false; |
2716 | if ( delSel.count() < 10 ) | 2718 | if ( delSel.count() < 10 ) |
2717 | addText = true; | 2719 | addText = true; |
2718 | else { | 2720 | else { |
2719 | description.sprintf(i18n(" %d items?"),delSel.count() ); | 2721 | description.sprintf(i18n(" %d items?"),delSel.count() ); |
2720 | } | 2722 | } |
2721 | while ( incidence ) { | 2723 | while ( incidence ) { |
2722 | Incidence *in = incidence->clone(); | 2724 | Incidence *in = incidence->clone(); |
2723 | if ( ! in->summary().isEmpty() ) { | 2725 | if ( ! in->summary().isEmpty() ) { |
2724 | in->setDescription(""); | 2726 | in->setDescription(""); |
2725 | } else { | 2727 | } else { |
2726 | in->setSummary( in->description().left(20)); | 2728 | in->setSummary( in->description().left(20)); |
2727 | in->setDescription(""); | 2729 | in->setDescription(""); |
2728 | } | 2730 | } |
2729 | if ( addText ) | 2731 | if ( addText ) |
2730 | description += in->summary() + "\n"; | 2732 | description += in->summary() + "\n"; |
2731 | cal->addIncidence( in ); | 2733 | cal->addIncidence( in ); |
2732 | incidence = delSel.next(); | 2734 | incidence = delSel.next(); |
2733 | } | 2735 | } |
2734 | if ( beamDialog->beamVcal() ) { | 2736 | if ( beamDialog->beamVcal() ) { |
2735 | fn += ".vcs"; | 2737 | fn += ".vcs"; |
2736 | FileStorage storage( cal, fn, new VCalFormat ); | 2738 | FileStorage storage( cal, fn, new VCalFormat ); |
2737 | storage.save(); | 2739 | storage.save(); |
2738 | } else { | 2740 | } else { |
2739 | fn += ".ics"; | 2741 | fn += ".ics"; |
2740 | FileStorage storage( cal, fn, new ICalFormat( ) ); | 2742 | FileStorage storage( cal, fn, new ICalFormat( ) ); |
2741 | storage.save(); | 2743 | storage.save(); |
2742 | } | 2744 | } |
2743 | delete cal; | 2745 | delete cal; |
2744 | mes = i18n("KO/Pi: Ready for beaming"); | 2746 | mes = i18n("KO/Pi: Ready for beaming"); |
2745 | topLevelWidget()->setCaption(mes); | 2747 | topLevelWidget()->setCaption(mes); |
2746 | KApplication::convert2latin1( fn ); | 2748 | KApplication::convert2latin1( fn ); |
2747 | #ifndef DESKTOP_VERSION | 2749 | #ifndef DESKTOP_VERSION |
2748 | Ir *ir = new Ir( this ); | 2750 | Ir *ir = new Ir( this ); |
2749 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 2751 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
2750 | ir->send( fn, description, "text/x-vCalendar" ); | 2752 | ir->send( fn, description, "text/x-vCalendar" ); |
2751 | #endif | 2753 | #endif |
2752 | } | 2754 | } |
2753 | } | 2755 | } |
2754 | void CalendarView::beamDone( Ir *ir ) | 2756 | void CalendarView::beamDone( Ir *ir ) |
2755 | { | 2757 | { |
2756 | #ifndef DESKTOP_VERSION | 2758 | #ifndef DESKTOP_VERSION |
2757 | delete ir; | 2759 | delete ir; |
2758 | #endif | 2760 | #endif |
2759 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); | 2761 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); |
2760 | topLevelWidget()->raise(); | 2762 | topLevelWidget()->raise(); |
2761 | } | 2763 | } |
2762 | 2764 | ||
2763 | void CalendarView::moveIncidence(Incidence * inc ) | 2765 | void CalendarView::moveIncidence(Incidence * inc ) |
2764 | { | 2766 | { |
2765 | if ( !inc ) return; | 2767 | if ( !inc ) return; |
2766 | showDatePickerPopup(); | 2768 | showDatePickerPopup(); |
2767 | mDatePickerMode = 2; | 2769 | mDatePickerMode = 2; |
2768 | mMoveIncidence = inc ; | 2770 | mMoveIncidence = inc ; |
2769 | QDate da; | 2771 | QDate da; |
2770 | if ( mMoveIncidence->typeID() == todoID ) { | 2772 | if ( mMoveIncidence->typeID() == todoID ) { |
2771 | Todo * to = (Todo *) mMoveIncidence; | 2773 | Todo * to = (Todo *) mMoveIncidence; |
2772 | if ( to->hasDueDate() ) | 2774 | if ( to->hasDueDate() ) |
2773 | da = to->dtDue().date(); | 2775 | da = to->dtDue().date(); |
2774 | else | 2776 | else |
2775 | da = QDate::currentDate(); | 2777 | da = QDate::currentDate(); |
2776 | } else { | 2778 | } else { |
2777 | da = mMoveIncidence->dtStart().date(); | 2779 | da = mMoveIncidence->dtStart().date(); |
2778 | } | 2780 | } |
2779 | //PENDING set date for recurring incidence to date of recurrence | 2781 | //PENDING set date for recurring incidence to date of recurrence |
2780 | //mMoveIncidenceOldDate; | 2782 | //mMoveIncidenceOldDate; |
2781 | mDatePicker->setDate( da ); | 2783 | mDatePicker->setDate( da ); |
2782 | } | 2784 | } |
2783 | void CalendarView::showDatePickerPopup() | 2785 | void CalendarView::showDatePickerPopup() |
2784 | { | 2786 | { |
2785 | if ( mDateFrame->isVisible() ) | 2787 | if ( mDateFrame->isVisible() ) |
2786 | mDateFrame->hide(); | 2788 | mDateFrame->hide(); |
2787 | else { | 2789 | else { |
2788 | int offX = 0, offY = 0; | 2790 | int offX = 0, offY = 0; |
2789 | #ifdef DESKTOP_VERSION | 2791 | #ifdef DESKTOP_VERSION |
2790 | int w =mDatePicker->sizeHint().width() ; | 2792 | int w =mDatePicker->sizeHint().width() ; |
2791 | int h = mDatePicker->sizeHint().height() ; | 2793 | int h = mDatePicker->sizeHint().height() ; |
2792 | int dw = topLevelWidget()->width(); | 2794 | int dw = topLevelWidget()->width(); |
2793 | int dh = topLevelWidget()->height(); | 2795 | int dh = topLevelWidget()->height(); |
2794 | offX = topLevelWidget()->x(); | 2796 | offX = topLevelWidget()->x(); |
2795 | offY = topLevelWidget()->y(); | 2797 | offY = topLevelWidget()->y(); |
2796 | #else | 2798 | #else |
2797 | int w =mDatePicker->sizeHint().width() ; | 2799 | int w =mDatePicker->sizeHint().width() ; |
2798 | int h = mDatePicker->sizeHint().height() ; | 2800 | int h = mDatePicker->sizeHint().height() ; |
2799 | int dw = QApplication::desktop()->width(); | 2801 | int dw = QApplication::desktop()->width(); |
2800 | int dh = QApplication::desktop()->height(); | 2802 | int dh = QApplication::desktop()->height(); |
2801 | #endif | 2803 | #endif |
2802 | mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h ); | 2804 | mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h ); |
2803 | mDateFrame->show(); | 2805 | mDateFrame->show(); |
2804 | } | 2806 | } |
2805 | } | 2807 | } |
2806 | void CalendarView::showDatePicker( ) | 2808 | void CalendarView::showDatePicker( ) |
2807 | { | 2809 | { |
2808 | showDatePickerPopup(); | 2810 | showDatePickerPopup(); |
2809 | mDatePickerMode = 1; | 2811 | mDatePickerMode = 1; |
2810 | mDatePicker->setDate( mNavigator->selectedDates().first() ); | 2812 | mDatePicker->setDate( mNavigator->selectedDates().first() ); |
2811 | } | 2813 | } |
2812 | 2814 | ||
2813 | void CalendarView::showEventEditor() | 2815 | void CalendarView::showEventEditor() |
2814 | { | 2816 | { |
2815 | #ifdef DESKTOP_VERSION | 2817 | #ifdef DESKTOP_VERSION |
2816 | int x,y,w,h; | 2818 | int x,y,w,h; |
2817 | x = mEventEditor->geometry().x(); | 2819 | x = mEventEditor->geometry().x(); |
2818 | y = mEventEditor->geometry().y(); | 2820 | y = mEventEditor->geometry().y(); |
2819 | w = mEventEditor->width(); | 2821 | w = mEventEditor->width(); |
2820 | h = mEventEditor->height(); | 2822 | h = mEventEditor->height(); |
2821 | mEventEditor->show(); | 2823 | mEventEditor->show(); |
2822 | mEventEditor->setGeometry(x,y,w,h); | 2824 | mEventEditor->setGeometry(x,y,w,h); |
2823 | #else | 2825 | #else |
2824 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { | 2826 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { |
2825 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 2827 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
2826 | qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); | 2828 | qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); |
2827 | qApp->processEvents(); | 2829 | qApp->processEvents(); |
2828 | delete mEventEditor; | 2830 | delete mEventEditor; |
2829 | mEventEditor = mDialogManager->getEventEditor(); | 2831 | mEventEditor = mDialogManager->getEventEditor(); |
2830 | topLevelWidget()->setCaption( i18n("") ); | 2832 | topLevelWidget()->setCaption( i18n("") ); |
2831 | } | 2833 | } |
2832 | mEventEditor->showMaximized(); | 2834 | mEventEditor->showMaximized(); |
2833 | #endif | 2835 | #endif |
2834 | } | 2836 | } |
2835 | void CalendarView::showTodoEditor() | 2837 | void CalendarView::showTodoEditor() |
2836 | { | 2838 | { |
2837 | #ifdef DESKTOP_VERSION | 2839 | #ifdef DESKTOP_VERSION |
2838 | int x,y,w,h; | 2840 | int x,y,w,h; |
2839 | x = mTodoEditor->geometry().x(); | 2841 | x = mTodoEditor->geometry().x(); |
2840 | y = mTodoEditor->geometry().y(); | 2842 | y = mTodoEditor->geometry().y(); |
2841 | w = mTodoEditor->width(); | 2843 | w = mTodoEditor->width(); |
2842 | h = mTodoEditor->height(); | 2844 | h = mTodoEditor->height(); |
2843 | mTodoEditor->show(); | 2845 | mTodoEditor->show(); |
2844 | mTodoEditor->setGeometry(x,y,w,h); | 2846 | mTodoEditor->setGeometry(x,y,w,h); |
2845 | #else | 2847 | #else |
2846 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { | 2848 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { |
2847 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 2849 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
2848 | qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); | 2850 | qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); |
2849 | qApp->processEvents(); | 2851 | qApp->processEvents(); |
2850 | delete mTodoEditor; | 2852 | delete mTodoEditor; |
2851 | mTodoEditor = mDialogManager->getTodoEditor(); | 2853 | mTodoEditor = mDialogManager->getTodoEditor(); |
2852 | topLevelWidget()->setCaption( i18n("") ); | 2854 | topLevelWidget()->setCaption( i18n("") ); |
2853 | } | 2855 | } |
2854 | mTodoEditor->showMaximized(); | 2856 | mTodoEditor->showMaximized(); |
2855 | #endif | 2857 | #endif |
2856 | } | 2858 | } |
2857 | 2859 | ||
2858 | void CalendarView::cloneIncidence() | 2860 | void CalendarView::cloneIncidence() |
2859 | { | 2861 | { |
2860 | Incidence *incidence = currentSelection(); | 2862 | Incidence *incidence = currentSelection(); |
2861 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2863 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2862 | if ( incidence ) { | 2864 | if ( incidence ) { |
2863 | cloneIncidence(incidence); | 2865 | cloneIncidence(incidence); |
2864 | } | 2866 | } |
2865 | } | 2867 | } |
2866 | void CalendarView::moveIncidence() | 2868 | void CalendarView::moveIncidence() |
2867 | { | 2869 | { |
2868 | Incidence *incidence = currentSelection(); | 2870 | Incidence *incidence = currentSelection(); |
2869 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2871 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2870 | if ( incidence ) { | 2872 | if ( incidence ) { |
2871 | moveIncidence(incidence); | 2873 | moveIncidence(incidence); |
2872 | } | 2874 | } |
2873 | } | 2875 | } |
2874 | void CalendarView::beamIncidence() | 2876 | void CalendarView::beamIncidence() |
2875 | { | 2877 | { |
2876 | Incidence *incidence = currentSelection(); | 2878 | Incidence *incidence = currentSelection(); |
2877 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2879 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2878 | if ( incidence ) { | 2880 | if ( incidence ) { |
2879 | beamIncidence(incidence); | 2881 | beamIncidence(incidence); |
2880 | } | 2882 | } |
2881 | } | 2883 | } |
2882 | void CalendarView::toggleCancelIncidence() | 2884 | void CalendarView::toggleCancelIncidence() |
2883 | { | 2885 | { |
2884 | Incidence *incidence = currentSelection(); | 2886 | Incidence *incidence = currentSelection(); |
2885 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2887 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2886 | if ( incidence ) { | 2888 | if ( incidence ) { |
2887 | cancelIncidence(incidence); | 2889 | cancelIncidence(incidence); |
2888 | } | 2890 | } |
2889 | } | 2891 | } |
2890 | 2892 | ||
2891 | 2893 | ||
2892 | void CalendarView::cancelIncidence(Incidence * inc ) | 2894 | void CalendarView::cancelIncidence(Incidence * inc ) |
2893 | { | 2895 | { |
2894 | inc->setCancelled( ! inc->cancelled() ); | 2896 | inc->setCancelled( ! inc->cancelled() ); |
2895 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); | 2897 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); |
2896 | updateView(); | 2898 | updateView(); |
2897 | } | 2899 | } |
2898 | void CalendarView::cloneIncidence(Incidence * orgInc ) | 2900 | void CalendarView::cloneIncidence(Incidence * orgInc ) |
2899 | { | 2901 | { |
2900 | Incidence * newInc = orgInc->clone(); | 2902 | Incidence * newInc = orgInc->clone(); |
2901 | newInc->recreate(); | 2903 | newInc->recreate(); |
2902 | 2904 | ||
2903 | if ( newInc->typeID() == todoID ) { | 2905 | if ( newInc->typeID() == todoID ) { |
2904 | Todo* t = (Todo*) newInc; | 2906 | Todo* t = (Todo*) newInc; |
2905 | bool cloneSub = false; | 2907 | bool cloneSub = false; |
2906 | if ( orgInc->relations().count() ) { | 2908 | if ( orgInc->relations().count() ) { |
2907 | int result = KMessageBox::warningYesNoCancel(this, | 2909 | int result = KMessageBox::warningYesNoCancel(this, |
2908 | i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( newInc->summary().left ( 25 ) ), | 2910 | i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( newInc->summary().left ( 25 ) ), |
2909 | i18n("Todo has subtodos"), | 2911 | i18n("Todo has subtodos"), |
2910 | i18n("Yes"), | 2912 | i18n("Yes"), |
2911 | i18n("No")); | 2913 | i18n("No")); |
2912 | 2914 | ||
2913 | if ( result == KMessageBox::Cancel ) { | 2915 | if ( result == KMessageBox::Cancel ) { |
2914 | delete t; | 2916 | delete t; |
2915 | return; | 2917 | return; |
2916 | } | 2918 | } |
2917 | if (result == KMessageBox::Yes) cloneSub = true; | 2919 | if (result == KMessageBox::Yes) cloneSub = true; |
2918 | } | 2920 | } |
2919 | showTodoEditor(); | 2921 | showTodoEditor(); |
2920 | mTodoEditor->editTodo( t ); | 2922 | mTodoEditor->editTodo( t ); |
2921 | if ( mTodoEditor->exec() ) { | 2923 | if ( mTodoEditor->exec() ) { |
2922 | if ( cloneSub ) { | 2924 | if ( cloneSub ) { |
2923 | orgInc->cloneRelations( t ); | 2925 | orgInc->cloneRelations( t ); |
2924 | mCalendar->addIncidenceBranch( t ); | 2926 | mCalendar->addIncidenceBranch( t ); |
2925 | updateView(); | 2927 | updateView(); |
2926 | 2928 | ||
2927 | } else { | 2929 | } else { |
2928 | mCalendar->addTodo( t ); | 2930 | mCalendar->addTodo( t ); |
2929 | updateView(); | 2931 | updateView(); |
2930 | } | 2932 | } |
2931 | } else { | 2933 | } else { |
2932 | delete t; | 2934 | delete t; |
2933 | } | 2935 | } |
2934 | } | 2936 | } |
2935 | else { | 2937 | else { |
2936 | Event* e = (Event*) newInc; | 2938 | Event* e = (Event*) newInc; |
2937 | showEventEditor(); | 2939 | showEventEditor(); |
2938 | mEventEditor->editEvent( e ); | 2940 | mEventEditor->editEvent( e ); |
2939 | if ( mEventEditor->exec() ) { | 2941 | if ( mEventEditor->exec() ) { |
2940 | mCalendar->addEvent( e ); | 2942 | mCalendar->addEvent( e ); |
2941 | updateView(); | 2943 | updateView(); |
2942 | } else { | 2944 | } else { |
2943 | delete e; | 2945 | delete e; |
2944 | } | 2946 | } |
2945 | } | 2947 | } |
2946 | setActiveWindow(); | 2948 | setActiveWindow(); |
2947 | } | 2949 | } |
2948 | 2950 | ||
2949 | void CalendarView::newEvent() | 2951 | void CalendarView::newEvent() |
2950 | { | 2952 | { |
2951 | // TODO: Replace this code by a common eventDurationHint of KOBaseView. | 2953 | // TODO: Replace this code by a common eventDurationHint of KOBaseView. |
2952 | KOAgendaView *aView = mViewManager->agendaView(); | 2954 | KOAgendaView *aView = mViewManager->agendaView(); |
2953 | if (aView) { | 2955 | if (aView) { |
2954 | if (aView->selectionStart().isValid()) { | 2956 | if (aView->selectionStart().isValid()) { |
2955 | if (aView->selectedIsAllDay()) { | 2957 | if (aView->selectedIsAllDay()) { |
2956 | newEvent(aView->selectionStart(),aView->selectionEnd(),true); | 2958 | newEvent(aView->selectionStart(),aView->selectionEnd(),true); |
2957 | } else { | 2959 | } else { |
2958 | newEvent(aView->selectionStart(),aView->selectionEnd()); | 2960 | newEvent(aView->selectionStart(),aView->selectionEnd()); |
2959 | } | 2961 | } |
2960 | return; | 2962 | return; |
2961 | } | 2963 | } |
2962 | } | 2964 | } |
2963 | 2965 | ||
2964 | QDate date = mNavigator->selectedDates().first(); | 2966 | QDate date = mNavigator->selectedDates().first(); |
2965 | QDateTime current = QDateTime::currentDateTime(); | 2967 | QDateTime current = QDateTime::currentDateTime(); |
2966 | if ( date <= current.date() ) { | 2968 | if ( date <= current.date() ) { |
2967 | int hour = current.time().hour() +1; | 2969 | int hour = current.time().hour() +1; |
2968 | newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), | 2970 | newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), |
2969 | QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); | 2971 | QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); |
2970 | } else | 2972 | } else |
2971 | newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), | 2973 | newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), |
2972 | QDateTime( date, QTime( KOPrefs::instance()->mStartTime + | 2974 | QDateTime( date, QTime( KOPrefs::instance()->mStartTime + |
2973 | KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); | 2975 | KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); |
2974 | } | 2976 | } |
2975 | 2977 | ||
2976 | void CalendarView::newEvent(QDateTime fh) | 2978 | void CalendarView::newEvent(QDateTime fh) |
2977 | { | 2979 | { |
2978 | newEvent(fh, | 2980 | newEvent(fh, |
2979 | QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); | 2981 | QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); |
2980 | } | 2982 | } |
2981 | 2983 | ||
2982 | void CalendarView::newEvent(QDate dt) | 2984 | void CalendarView::newEvent(QDate dt) |
2983 | { | 2985 | { |
2984 | newEvent(QDateTime(dt, QTime(0,0,0)), | 2986 | newEvent(QDateTime(dt, QTime(0,0,0)), |
2985 | QDateTime(dt, QTime(0,0,0)), true); | 2987 | QDateTime(dt, QTime(0,0,0)), true); |
2986 | } | 2988 | } |
2987 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) | 2989 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) |
2988 | { | 2990 | { |
2989 | newEvent(fromHint, toHint, false); | 2991 | newEvent(fromHint, toHint, false); |
2990 | } | 2992 | } |
2991 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) | 2993 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) |
2992 | { | 2994 | { |
2993 | 2995 | ||
2994 | showEventEditor(); | 2996 | showEventEditor(); |
2995 | mEventEditor->newEvent(fromHint,toHint,allDay); | 2997 | mEventEditor->newEvent(fromHint,toHint,allDay); |
2996 | if ( mFilterView->filtersEnabled() ) { | 2998 | if ( mFilterView->filtersEnabled() ) { |
2997 | CalFilter *filter = mFilterView->selectedFilter(); | 2999 | CalFilter *filter = mFilterView->selectedFilter(); |
2998 | if (filter && filter->showCategories()) { | 3000 | if (filter && filter->showCategories()) { |
2999 | mEventEditor->setCategories(filter->categoryList().join(",") ); | 3001 | mEventEditor->setCategories(filter->categoryList().join(",") ); |
3000 | } | 3002 | } |
3001 | if ( filter ) | 3003 | if ( filter ) |
3002 | mEventEditor->setSecrecy( filter->getSecrecy() ); | 3004 | mEventEditor->setSecrecy( filter->getSecrecy() ); |
3003 | } | 3005 | } |
3004 | mEventEditor->exec(); | 3006 | mEventEditor->exec(); |
3005 | setActiveWindow(); | 3007 | setActiveWindow(); |
3006 | } | 3008 | } |
3007 | void CalendarView::todoAdded(Todo * t) | 3009 | void CalendarView::todoAdded(Todo * t) |
3008 | { | 3010 | { |
3009 | 3011 | ||
3010 | changeTodoDisplay ( t ,KOGlobals::EVENTADDED); | 3012 | changeTodoDisplay ( t ,KOGlobals::EVENTADDED); |
3011 | updateTodoViews(); | 3013 | updateTodoViews(); |
3012 | } | 3014 | } |
3013 | void CalendarView::todoChanged(Todo * t) | 3015 | void CalendarView::todoChanged(Todo * t) |
3014 | { | 3016 | { |
3015 | emit todoModified( t, 4 ); | 3017 | emit todoModified( t, 4 ); |
3016 | // updateTodoViews(); | 3018 | // updateTodoViews(); |
3017 | } | 3019 | } |
3018 | void CalendarView::todoToBeDeleted(Todo *) | 3020 | void CalendarView::todoToBeDeleted(Todo *) |
3019 | { | 3021 | { |
3020 | //qDebug("todoToBeDeleted(Todo *) "); | 3022 | //qDebug("todoToBeDeleted(Todo *) "); |
3021 | updateTodoViews(); | 3023 | updateTodoViews(); |
3022 | } | 3024 | } |
3023 | void CalendarView::todoDeleted() | 3025 | void CalendarView::todoDeleted() |
3024 | { | 3026 | { |
3025 | //qDebug(" todoDeleted()"); | 3027 | //qDebug(" todoDeleted()"); |
3026 | updateTodoViews(); | 3028 | updateTodoViews(); |
3027 | } | 3029 | } |
3028 | 3030 | ||
3029 | 3031 | ||
3030 | void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) | 3032 | void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) |
3031 | { | 3033 | { |
3032 | showTodoEditor(); | 3034 | showTodoEditor(); |
3033 | mTodoEditor->newTodo(dt,0,allday); | 3035 | mTodoEditor->newTodo(dt,0,allday); |
3034 | if ( mFilterView->filtersEnabled() ) { | 3036 | if ( mFilterView->filtersEnabled() ) { |
3035 | CalFilter *filter = mFilterView->selectedFilter(); | 3037 | CalFilter *filter = mFilterView->selectedFilter(); |
3036 | if (filter && filter->showCategories()) { | 3038 | if (filter && filter->showCategories()) { |
3037 | mTodoEditor->setCategories(filter->categoryList().join(",") ); | 3039 | mTodoEditor->setCategories(filter->categoryList().join(",") ); |
3038 | } | 3040 | } |
3039 | if ( filter ) | 3041 | if ( filter ) |
3040 | mTodoEditor->setSecrecy( filter->getSecrecy() ); | 3042 | mTodoEditor->setSecrecy( filter->getSecrecy() ); |
3041 | } | 3043 | } |
3042 | mTodoEditor->exec(); | 3044 | mTodoEditor->exec(); |
3043 | setActiveWindow(); | 3045 | setActiveWindow(); |
3044 | } | 3046 | } |
3045 | 3047 | ||
3046 | void CalendarView::newTodo() | 3048 | void CalendarView::newTodo() |
3047 | { | 3049 | { |
3048 | newTodoDateTime( QDateTime(),true ); | 3050 | newTodoDateTime( QDateTime(),true ); |
3049 | } | 3051 | } |
3050 | 3052 | ||
3051 | void CalendarView::newSubTodo() | 3053 | void CalendarView::newSubTodo() |
3052 | { | 3054 | { |
3053 | Todo *todo = selectedTodo(); | 3055 | Todo *todo = selectedTodo(); |
3054 | if ( todo ) newSubTodo( todo ); | 3056 | if ( todo ) newSubTodo( todo ); |
3055 | } | 3057 | } |
3056 | 3058 | ||
3057 | void CalendarView::newSubTodo(Todo *parentEvent) | 3059 | void CalendarView::newSubTodo(Todo *parentEvent) |
3058 | { | 3060 | { |
3059 | 3061 | ||
3060 | showTodoEditor(); | 3062 | showTodoEditor(); |
3061 | mTodoEditor->newTodo(QDateTime(),parentEvent,true); | 3063 | mTodoEditor->newTodo(QDateTime(),parentEvent,true); |
3062 | mTodoEditor->exec(); | 3064 | mTodoEditor->exec(); |
3063 | setActiveWindow(); | 3065 | setActiveWindow(); |
3064 | } | 3066 | } |
3065 | 3067 | ||
3066 | void CalendarView::newFloatingEvent() | 3068 | void CalendarView::newFloatingEvent() |
3067 | { | 3069 | { |
3068 | DateList tmpList = mNavigator->selectedDates(); | 3070 | DateList tmpList = mNavigator->selectedDates(); |
3069 | QDate date = tmpList.first(); | 3071 | QDate date = tmpList.first(); |
3070 | 3072 | ||
3071 | newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), | 3073 | newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), |
3072 | QDateTime( date, QTime( 12, 0, 0 ) ), true ); | 3074 | QDateTime( date, QTime( 12, 0, 0 ) ), true ); |
3073 | } | 3075 | } |
3074 | 3076 | ||
3075 | 3077 | ||
3076 | void CalendarView::editEvent( Event *event ) | 3078 | void CalendarView::editEvent( Event *event ) |
3077 | { | 3079 | { |
3078 | 3080 | ||
3079 | if ( !event ) return; | 3081 | if ( !event ) return; |
3080 | if ( event->isReadOnly() ) { | 3082 | if ( event->isReadOnly() ) { |
3081 | showEvent( event ); | 3083 | showEvent( event ); |
3082 | return; | 3084 | return; |
3083 | } | 3085 | } |
3084 | showEventEditor(); | 3086 | showEventEditor(); |
3085 | mEventEditor->editEvent( event , mFlagEditDescription); | 3087 | mEventEditor->editEvent( event , mFlagEditDescription); |
3086 | mEventEditor->exec(); | 3088 | mEventEditor->exec(); |
3087 | setActiveWindow(); | 3089 | setActiveWindow(); |
3088 | 3090 | ||
3089 | } | 3091 | } |
3090 | void CalendarView::editJournal( Journal *jour ) | 3092 | void CalendarView::editJournal( Journal *jour ) |
3091 | { | 3093 | { |
3092 | if ( !jour ) return; | 3094 | if ( !jour ) return; |
3093 | mDialogManager->hideSearchDialog(); | 3095 | mDialogManager->hideSearchDialog(); |
3094 | mViewManager->showJournalView(); | 3096 | mViewManager->showJournalView(); |
3095 | mNavigator->slotDaySelect( jour->dtStart().date() ); | 3097 | mNavigator->slotDaySelect( jour->dtStart().date() ); |
3096 | } | 3098 | } |
3097 | void CalendarView::editTodo( Todo *todo ) | 3099 | void CalendarView::editTodo( Todo *todo ) |
3098 | { | 3100 | { |
3099 | if ( !todo ) return; | 3101 | if ( !todo ) return; |
3100 | 3102 | ||
3101 | if ( todo->isReadOnly() ) { | 3103 | if ( todo->isReadOnly() ) { |
3102 | showTodo( todo ); | 3104 | showTodo( todo ); |
3103 | return; | 3105 | return; |
3104 | } | 3106 | } |
3105 | showTodoEditor(); | 3107 | showTodoEditor(); |
3106 | mTodoEditor->editTodo( todo ,mFlagEditDescription); | 3108 | mTodoEditor->editTodo( todo ,mFlagEditDescription); |
3107 | mTodoEditor->exec(); | 3109 | mTodoEditor->exec(); |
3108 | setActiveWindow(); | 3110 | setActiveWindow(); |
3109 | 3111 | ||
3110 | } | 3112 | } |
3111 | 3113 | ||
3112 | KOEventViewerDialog* CalendarView::getEventViewerDialog() | 3114 | KOEventViewerDialog* CalendarView::getEventViewerDialog() |
3113 | { | 3115 | { |
3114 | if ( !mEventViewerDialog ) { | 3116 | if ( !mEventViewerDialog ) { |
3115 | mEventViewerDialog = new KOEventViewerDialog(0); | 3117 | mEventViewerDialog = new KOEventViewerDialog(0); |
3116 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); | 3118 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); |
3117 | connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); | 3119 | connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); |
3118 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), | 3120 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), |
3119 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 3121 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
3120 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), | 3122 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), |
3121 | viewManager(), SLOT( showAgendaView( bool ) ) ); | 3123 | viewManager(), SLOT( showAgendaView( bool ) ) ); |
3122 | connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), | 3124 | connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), |
3123 | this, SLOT( slotViewerClosed() ) ); | 3125 | this, SLOT( slotViewerClosed() ) ); |
3124 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), | 3126 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), |
3125 | this, SLOT( todoChanged(Todo *) ) ); | 3127 | this, SLOT( todoChanged(Todo *) ) ); |
3126 | mEventViewerDialog->resize( 640, 480 ); | 3128 | mEventViewerDialog->resize( 640, 480 ); |
3127 | 3129 | ||
3128 | } | 3130 | } |
3129 | return mEventViewerDialog; | 3131 | return mEventViewerDialog; |
3130 | } | 3132 | } |
3131 | void CalendarView::showEvent(Event *event) | 3133 | void CalendarView::showEvent(Event *event) |
3132 | { | 3134 | { |
3133 | getEventViewerDialog()->setEvent(event); | 3135 | getEventViewerDialog()->setEvent(event); |
3134 | getEventViewerDialog()->showMe(); | 3136 | getEventViewerDialog()->showMe(); |
3135 | } | 3137 | } |
3136 | 3138 | ||
3137 | void CalendarView::showTodo(Todo *event) | 3139 | void CalendarView::showTodo(Todo *event) |
3138 | { | 3140 | { |
3139 | getEventViewerDialog()->setTodo(event); | 3141 | getEventViewerDialog()->setTodo(event); |
3140 | getEventViewerDialog()->showMe(); | 3142 | getEventViewerDialog()->showMe(); |
3141 | } | 3143 | } |
3142 | void CalendarView::showJournal( Journal *jour ) | 3144 | void CalendarView::showJournal( Journal *jour ) |
3143 | { | 3145 | { |
3144 | getEventViewerDialog()->setJournal(jour); | 3146 | getEventViewerDialog()->setJournal(jour); |
3145 | getEventViewerDialog()->showMe(); | 3147 | getEventViewerDialog()->showMe(); |
3146 | 3148 | ||
3147 | } | 3149 | } |
3148 | // void CalendarView::todoModified (Todo *event, int changed) | 3150 | // void CalendarView::todoModified (Todo *event, int changed) |
3149 | // { | 3151 | // { |
3150 | // // if (mDialogList.find (event) != mDialogList.end ()) { | 3152 | // // if (mDialogList.find (event) != mDialogList.end ()) { |
3151 | // // kdDebug() << "Todo modified and open" << endl; | 3153 | // // kdDebug() << "Todo modified and open" << endl; |
3152 | // // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; | 3154 | // // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; |
3153 | // // temp->modified (changed); | 3155 | // // temp->modified (changed); |
3154 | 3156 | ||
3155 | // // } | 3157 | // // } |
3156 | 3158 | ||
3157 | // mViewManager->updateView(); | 3159 | // mViewManager->updateView(); |
3158 | // } | 3160 | // } |
3159 | 3161 | ||
3160 | void CalendarView::appointment_show() | 3162 | void CalendarView::appointment_show() |
3161 | { | 3163 | { |
3162 | Event *anEvent = 0; | 3164 | Event *anEvent = 0; |
3163 | 3165 | ||
3164 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3166 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3165 | 3167 | ||
3166 | if (mViewManager->currentView()->isEventView()) { | 3168 | if (mViewManager->currentView()->isEventView()) { |
3167 | if ( incidence && incidence->typeID() == eventID ) { | 3169 | if ( incidence && incidence->typeID() == eventID ) { |
3168 | anEvent = static_cast<Event *>(incidence); | 3170 | anEvent = static_cast<Event *>(incidence); |
3169 | } | 3171 | } |
3170 | } | 3172 | } |
3171 | 3173 | ||
3172 | if (!anEvent) { | 3174 | if (!anEvent) { |
3173 | KNotifyClient::beep(); | 3175 | KNotifyClient::beep(); |
3174 | return; | 3176 | return; |
3175 | } | 3177 | } |
3176 | 3178 | ||
3177 | showEvent(anEvent); | 3179 | showEvent(anEvent); |
3178 | } | 3180 | } |
3179 | 3181 | ||
3180 | void CalendarView::appointment_edit() | 3182 | void CalendarView::appointment_edit() |
3181 | { | 3183 | { |
3182 | Event *anEvent = 0; | 3184 | Event *anEvent = 0; |
3183 | 3185 | ||
3184 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3186 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3185 | 3187 | ||
3186 | if (mViewManager->currentView()->isEventView()) { | 3188 | if (mViewManager->currentView()->isEventView()) { |
3187 | if ( incidence && incidence->typeID() == eventID ) { | 3189 | if ( incidence && incidence->typeID() == eventID ) { |
3188 | anEvent = static_cast<Event *>(incidence); | 3190 | anEvent = static_cast<Event *>(incidence); |
3189 | } | 3191 | } |
3190 | } | 3192 | } |
3191 | 3193 | ||
3192 | if (!anEvent) { | 3194 | if (!anEvent) { |
3193 | KNotifyClient::beep(); | 3195 | KNotifyClient::beep(); |
3194 | return; | 3196 | return; |
3195 | } | 3197 | } |
3196 | 3198 | ||
3197 | editEvent(anEvent); | 3199 | editEvent(anEvent); |
3198 | } | 3200 | } |
3199 | 3201 | ||
3200 | void CalendarView::appointment_delete() | 3202 | void CalendarView::appointment_delete() |
3201 | { | 3203 | { |
3202 | Event *anEvent = 0; | 3204 | Event *anEvent = 0; |
3203 | 3205 | ||
3204 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3206 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3205 | 3207 | ||
3206 | if (mViewManager->currentView()->isEventView()) { | 3208 | if (mViewManager->currentView()->isEventView()) { |
3207 | if ( incidence && incidence->typeID() == eventID ) { | 3209 | if ( incidence && incidence->typeID() == eventID ) { |
3208 | anEvent = static_cast<Event *>(incidence); | 3210 | anEvent = static_cast<Event *>(incidence); |
3209 | } | 3211 | } |
3210 | } | 3212 | } |
3211 | 3213 | ||
3212 | if (!anEvent) { | 3214 | if (!anEvent) { |
3213 | KNotifyClient::beep(); | 3215 | KNotifyClient::beep(); |
3214 | return; | 3216 | return; |
3215 | } | 3217 | } |
3216 | 3218 | ||
3217 | deleteEvent(anEvent); | 3219 | deleteEvent(anEvent); |
3218 | } | 3220 | } |
3219 | 3221 | ||
3220 | void CalendarView::todo_resub( Todo * parent, Todo * sub ) | 3222 | void CalendarView::todo_resub( Todo * parent, Todo * sub ) |
3221 | { | 3223 | { |
3222 | if (!sub) return; | 3224 | if (!sub) return; |
3223 | if ( sub->relatedTo() == parent ) | 3225 | if ( sub->relatedTo() == parent ) |
3224 | return; | 3226 | return; |
3225 | sub->setRelatedTo(parent); | 3227 | sub->setRelatedTo(parent); |
3226 | sub->updated(); | 3228 | sub->updated(); |
3227 | setModified(true); | 3229 | setModified(true); |
3228 | updateView(); | 3230 | updateView(); |
3229 | } | 3231 | } |
3230 | void CalendarView::todo_unsub(Todo *anTodo ) | 3232 | void CalendarView::todo_unsub(Todo *anTodo ) |
3231 | { | 3233 | { |
3232 | todo_resub( 0, anTodo ); | 3234 | todo_resub( 0, anTodo ); |
3233 | } | 3235 | } |
3234 | 3236 | ||
3235 | void CalendarView::deleteTodo(Todo *todo) | 3237 | void CalendarView::deleteTodo(Todo *todo) |
3236 | { | 3238 | { |
3237 | if (!todo) { | 3239 | if (!todo) { |
3238 | KNotifyClient::beep(); | 3240 | KNotifyClient::beep(); |
3239 | return; | 3241 | return; |
3240 | } | 3242 | } |
3241 | if (KOPrefs::instance()->mConfirm) { | 3243 | if (KOPrefs::instance()->mConfirm) { |
3242 | QString text = todo->summary().left(20); | 3244 | QString text = todo->summary().left(20); |
3243 | if (!todo->relations().isEmpty()) { | 3245 | if (!todo->relations().isEmpty()) { |
3244 | text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); | 3246 | text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); |
3245 | 3247 | ||
3246 | } | 3248 | } |
3247 | switch (msgItemDelete(text)) { | 3249 | switch (msgItemDelete(text)) { |
3248 | case KMessageBox::Continue: // OK | 3250 | case KMessageBox::Continue: // OK |
3249 | bool deleteT = false; | 3251 | bool deleteT = false; |
3250 | if (!todo->relations().isEmpty()) { | 3252 | if (!todo->relations().isEmpty()) { |
3251 | deleteT = removeCompletedSubTodos( todo ); | 3253 | deleteT = removeCompletedSubTodos( todo ); |
3252 | } | 3254 | } |
3253 | // deleteT == true: todo already deleted in removeCompletedSubTodos | 3255 | // deleteT == true: todo already deleted in removeCompletedSubTodos |
3254 | if ( !deleteT ) { | 3256 | if ( !deleteT ) { |
3255 | checkExternalId( todo ); | 3257 | checkExternalId( todo ); |
3256 | calendar()->deleteTodo(todo); | 3258 | calendar()->deleteTodo(todo); |
3257 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); | 3259 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); |
3258 | updateView(); | 3260 | updateView(); |
3259 | } | 3261 | } |
3260 | break; | 3262 | break; |
3261 | } // switch | 3263 | } // switch |
3262 | } else { | 3264 | } else { |
3263 | checkExternalId( todo ); | 3265 | checkExternalId( todo ); |
3264 | mCalendar->deleteTodo(todo); | 3266 | mCalendar->deleteTodo(todo); |
3265 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); | 3267 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); |
3266 | updateView(); | 3268 | updateView(); |
3267 | } | 3269 | } |
3268 | 3270 | ||
3269 | emit updateSearchDialog(); | 3271 | emit updateSearchDialog(); |
3270 | } | 3272 | } |
3271 | void CalendarView::deleteJournal(Journal *jour) | 3273 | void CalendarView::deleteJournal(Journal *jour) |
3272 | { | 3274 | { |
3273 | if (!jour) { | 3275 | if (!jour) { |
3274 | KNotifyClient::beep(); | 3276 | KNotifyClient::beep(); |
3275 | return; | 3277 | return; |
3276 | } | 3278 | } |
3277 | if (KOPrefs::instance()->mConfirm) { | 3279 | if (KOPrefs::instance()->mConfirm) { |
3278 | switch (msgItemDelete( jour->description().left(20))) { | 3280 | switch (msgItemDelete( jour->description().left(20))) { |
3279 | case KMessageBox::Continue: // OK | 3281 | case KMessageBox::Continue: // OK |
3280 | calendar()->deleteJournal(jour); | 3282 | calendar()->deleteJournal(jour); |
3281 | updateView(); | 3283 | updateView(); |
3282 | break; | 3284 | break; |
3283 | } // switch | 3285 | } // switch |
3284 | } else { | 3286 | } else { |
3285 | calendar()->deleteJournal(jour);; | 3287 | calendar()->deleteJournal(jour);; |
3286 | updateView(); | 3288 | updateView(); |
3287 | } | 3289 | } |
3288 | emit updateSearchDialog(); | 3290 | emit updateSearchDialog(); |
3289 | } | 3291 | } |
3290 | 3292 | ||
3291 | void CalendarView::deleteEvent(Event *anEvent) | 3293 | void CalendarView::deleteEvent(Event *anEvent) |
3292 | { | 3294 | { |
3293 | if (!anEvent) { | 3295 | if (!anEvent) { |
3294 | KNotifyClient::beep(); | 3296 | KNotifyClient::beep(); |
3295 | return; | 3297 | return; |
3296 | } | 3298 | } |
3297 | 3299 | ||
3298 | if (anEvent->recurrence()->doesRecur()) { | 3300 | if (anEvent->recurrence()->doesRecur()) { |
3299 | QDate itemDate = mViewManager->currentSelectionDate(); | 3301 | QDate itemDate = mViewManager->currentSelectionDate(); |
3300 | int km; | 3302 | int km; |
3301 | if (!itemDate.isValid()) { | 3303 | if (!itemDate.isValid()) { |
3302 | //kdDebug() << "Date Not Valid" << endl; | 3304 | //kdDebug() << "Date Not Valid" << endl; |
3303 | if (KOPrefs::instance()->mConfirm) { | 3305 | if (KOPrefs::instance()->mConfirm) { |
3304 | km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + | 3306 | km = KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + |
3305 | i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), | 3307 | i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), |
3306 | i18n("KO/Pi Confirmation"),i18n("Delete All")); | 3308 | i18n("KO/Pi Confirmation"),i18n("Delete All")); |
3307 | if ( km == KMessageBox::Continue ) | 3309 | if ( km == KMessageBox::Continue ) |
3308 | km = KMessageBox::No; // No = all below | 3310 | km = KMessageBox::No; // No = all below |
3309 | } else | 3311 | } else |
3310 | km = KMessageBox::No; | 3312 | km = KMessageBox::No; |
3311 | } else { | 3313 | } else { |
3312 | km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) + | 3314 | km = KMessageBox::warningYesNoCancel(this,anEvent->summary().left(25) + |
3313 | i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ | 3315 | i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ |
3314 | KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), | 3316 | KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), |
3315 | i18n("KO/Pi Confirmation"),i18n("Current"), | 3317 | i18n("KO/Pi Confirmation"),i18n("Current"), |
3316 | i18n("All")); | 3318 | i18n("All")); |
3317 | } | 3319 | } |
3318 | switch(km) { | 3320 | switch(km) { |
3319 | 3321 | ||
3320 | case KMessageBox::No: // Continue // all | 3322 | case KMessageBox::No: // Continue // all |
3321 | //qDebug("KMessageBox::No "); | 3323 | //qDebug("KMessageBox::No "); |
3322 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 3324 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
3323 | schedule(Scheduler::Cancel,anEvent); | 3325 | schedule(Scheduler::Cancel,anEvent); |
3324 | 3326 | ||
3325 | checkExternalId( anEvent); | 3327 | checkExternalId( anEvent); |
3326 | mCalendar->deleteEvent(anEvent); | 3328 | mCalendar->deleteEvent(anEvent); |
3327 | changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); | 3329 | changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); |
3328 | break; | 3330 | break; |
3329 | 3331 | ||
3330 | // Disabled because it does not work | 3332 | // Disabled because it does not work |
3331 | //#if 0 | 3333 | //#if 0 |
3332 | case KMessageBox::Yes: // just this one | 3334 | case KMessageBox::Yes: // just this one |
3333 | //QDate qd = mNavigator->selectedDates().first(); | 3335 | //QDate qd = mNavigator->selectedDates().first(); |
3334 | //if (!qd.isValid()) { | 3336 | //if (!qd.isValid()) { |
3335 | // kdDebug() << "no date selected, or invalid date" << endl; | 3337 | // kdDebug() << "no date selected, or invalid date" << endl; |
3336 | // KNotifyClient::beep(); | 3338 | // KNotifyClient::beep(); |
3337 | // return; | 3339 | // return; |
3338 | //} | 3340 | //} |
3339 | //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); | 3341 | //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); |
3340 | if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { | 3342 | if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { |
3341 | anEvent->addExDate(itemDate); | 3343 | anEvent->addExDate(itemDate); |
3342 | int duration = anEvent->recurrence()->duration(); | 3344 | int duration = anEvent->recurrence()->duration(); |
3343 | if ( duration > 0 ) { | 3345 | if ( duration > 0 ) { |
3344 | anEvent->recurrence()->setDuration( duration - 1 ); | 3346 | anEvent->recurrence()->setDuration( duration - 1 ); |
3345 | } | 3347 | } |
3346 | changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); | 3348 | changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); |
3347 | } | 3349 | } |
3348 | break; | 3350 | break; |
3349 | //#endif | 3351 | //#endif |
3350 | } // switch | 3352 | } // switch |
3351 | } else { | 3353 | } else { |
3352 | if (KOPrefs::instance()->mConfirm) { | 3354 | if (KOPrefs::instance()->mConfirm) { |
3353 | switch (KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + | 3355 | switch (KMessageBox::warningContinueCancel(this,anEvent->summary().left(25) + |
3354 | i18n("\nAre you sure you want\nto delete this event?"), | 3356 | i18n("\nAre you sure you want\nto delete this event?"), |
3355 | i18n("KO/Pi Confirmation"),i18n("Delete"))) { | 3357 | i18n("KO/Pi Confirmation"),i18n("Delete"))) { |
3356 | case KMessageBox::Continue: // OK | 3358 | case KMessageBox::Continue: // OK |
3357 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 3359 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
3358 | schedule(Scheduler::Cancel,anEvent); | 3360 | schedule(Scheduler::Cancel,anEvent); |
3359 | checkExternalId( anEvent); | 3361 | checkExternalId( anEvent); |
3360 | mCalendar->deleteEvent(anEvent); | 3362 | mCalendar->deleteEvent(anEvent); |
3361 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); | 3363 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); |
3362 | break; | 3364 | break; |
3363 | } // switch | 3365 | } // switch |
3364 | } else { | 3366 | } else { |
3365 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 3367 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
3366 | schedule(Scheduler::Cancel,anEvent); | 3368 | schedule(Scheduler::Cancel,anEvent); |
3367 | checkExternalId( anEvent); | 3369 | checkExternalId( anEvent); |
3368 | mCalendar->deleteEvent(anEvent); | 3370 | mCalendar->deleteEvent(anEvent); |
3369 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); | 3371 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); |
3370 | } | 3372 | } |
3371 | } // if-else | 3373 | } // if-else |
3372 | emit updateSearchDialog(); | 3374 | emit updateSearchDialog(); |
3373 | } | 3375 | } |
3374 | 3376 | ||
3375 | bool CalendarView::deleteEvent(const QString &uid) | 3377 | bool CalendarView::deleteEvent(const QString &uid) |
3376 | { | 3378 | { |
3377 | Event *ev = mCalendar->event(uid); | 3379 | Event *ev = mCalendar->event(uid); |
3378 | if (ev) { | 3380 | if (ev) { |
3379 | deleteEvent(ev); | 3381 | deleteEvent(ev); |
3380 | return true; | 3382 | return true; |
3381 | } else { | 3383 | } else { |
3382 | return false; | 3384 | return false; |
3383 | } | 3385 | } |
3384 | } | 3386 | } |
3385 | 3387 | ||
3386 | /*****************************************************************************/ | 3388 | /*****************************************************************************/ |
3387 | 3389 | ||
3388 | void CalendarView::action_mail() | 3390 | void CalendarView::action_mail() |
3389 | { | 3391 | { |
3390 | #ifndef KORG_NOMAIL | 3392 | #ifndef KORG_NOMAIL |
3391 | KOMailClient mailClient; | 3393 | KOMailClient mailClient; |
3392 | 3394 | ||
3393 | Incidence *incidence = currentSelection(); | 3395 | Incidence *incidence = currentSelection(); |
3394 | 3396 | ||
3395 | if (!incidence) { | 3397 | if (!incidence) { |
3396 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); | 3398 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); |
3397 | return; | 3399 | return; |
3398 | } | 3400 | } |
3399 | if(incidence->attendeeCount() == 0 ) { | 3401 | if(incidence->attendeeCount() == 0 ) { |
3400 | KMessageBox::sorry(this, | 3402 | KMessageBox::sorry(this, |
3401 | i18n("Can't generate mail:\nNo attendees defined.\n")); | 3403 | i18n("Can't generate mail:\nNo attendees defined.\n")); |
3402 | return; | 3404 | return; |
3403 | } | 3405 | } |
3404 | 3406 | ||
3405 | CalendarLocal cal_tmp; | 3407 | CalendarLocal cal_tmp; |
3406 | Event *event = 0; | 3408 | Event *event = 0; |
3407 | Event *ev = 0; | 3409 | Event *ev = 0; |
3408 | if ( incidence && incidence->typeID() == eventID ) { | 3410 | if ( incidence && incidence->typeID() == eventID ) { |
3409 | event = static_cast<Event *>(incidence); | 3411 | event = static_cast<Event *>(incidence); |
3410 | ev = new Event(*event); | 3412 | ev = new Event(*event); |
3411 | cal_tmp.addEvent(ev); | 3413 | cal_tmp.addEvent(ev); |
3412 | } | 3414 | } |
3413 | ICalFormat mForm(); | 3415 | ICalFormat mForm(); |
3414 | QString attachment = mForm.toString( &cal_tmp ); | 3416 | QString attachment = mForm.toString( &cal_tmp ); |
3415 | if (ev) delete(ev); | 3417 | if (ev) delete(ev); |
3416 | 3418 | ||
3417 | mailClient.mailAttendees(currentSelection(), attachment); | 3419 | mailClient.mailAttendees(currentSelection(), attachment); |
3418 | 3420 | ||
3419 | #endif | 3421 | #endif |
3420 | 3422 | ||
3421 | #if 0 | 3423 | #if 0 |
3422 | Event *anEvent = 0; | 3424 | Event *anEvent = 0; |
3423 | if (mViewManager->currentView()->isEventView()) { | 3425 | if (mViewManager->currentView()->isEventView()) { |
3424 | anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first()); | 3426 | anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first()); |
3425 | } | 3427 | } |
3426 | 3428 | ||
3427 | if (!anEvent) { | 3429 | if (!anEvent) { |
3428 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); | 3430 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); |
3429 | return; | 3431 | return; |
3430 | } | 3432 | } |
3431 | if(anEvent->attendeeCount() == 0 ) { | 3433 | if(anEvent->attendeeCount() == 0 ) { |
3432 | KMessageBox::sorry(this, | 3434 | KMessageBox::sorry(this, |
3433 | i18n("Can't generate mail:\nNo attendees defined.\n")); | 3435 | i18n("Can't generate mail:\nNo attendees defined.\n")); |
3434 | return; | 3436 | return; |
3435 | } | 3437 | } |
3436 | 3438 | ||
3437 | mailobject.emailEvent(anEvent); | 3439 | mailobject.emailEvent(anEvent); |
3438 | #endif | 3440 | #endif |
3439 | } | 3441 | } |
3440 | 3442 | ||
3441 | 3443 | ||
3442 | void CalendarView::schedule_publish(Incidence *incidence) | 3444 | void CalendarView::schedule_publish(Incidence *incidence) |
3443 | { | 3445 | { |
3444 | Event *event = 0; | 3446 | Event *event = 0; |
3445 | Todo *todo = 0; | 3447 | Todo *todo = 0; |
3446 | 3448 | ||
3447 | if (incidence == 0) { | 3449 | if (incidence == 0) { |
3448 | incidence = mViewManager->currentView()->selectedIncidences().first(); | 3450 | incidence = mViewManager->currentView()->selectedIncidences().first(); |
3449 | if (incidence == 0) { | 3451 | if (incidence == 0) { |
3450 | incidence = mTodoList->selectedIncidences().first(); | 3452 | incidence = mTodoList->selectedIncidences().first(); |
3451 | } | 3453 | } |
3452 | } | 3454 | } |
3453 | if ( incidence && incidence->typeID() == eventID ) { | 3455 | if ( incidence && incidence->typeID() == eventID ) { |
3454 | event = static_cast<Event *>(incidence); | 3456 | event = static_cast<Event *>(incidence); |
3455 | } else { | 3457 | } else { |
3456 | if ( incidence && incidence->typeID() == todoID ) { | 3458 | if ( incidence && incidence->typeID() == todoID ) { |
3457 | todo = static_cast<Todo *>(incidence); | 3459 | todo = static_cast<Todo *>(incidence); |
3458 | } | 3460 | } |
3459 | } | 3461 | } |
3460 | 3462 | ||
3461 | if (!event && !todo) { | 3463 | if (!event && !todo) { |
3462 | KMessageBox::sorry(this,i18n("No event selected.")); | 3464 | KMessageBox::sorry(this,i18n("No event selected.")); |
3463 | return; | 3465 | return; |
3464 | } | 3466 | } |
3465 | 3467 | ||
3466 | PublishDialog *publishdlg = new PublishDialog(); | 3468 | PublishDialog *publishdlg = new PublishDialog(); |
3467 | if (incidence->attendeeCount()>0) { | 3469 | if (incidence->attendeeCount()>0) { |
3468 | QPtrList<Attendee> attendees = incidence->attendees(); | 3470 | QPtrList<Attendee> attendees = incidence->attendees(); |
3469 | attendees.first(); | 3471 | attendees.first(); |
3470 | while ( attendees.current()!=0 ) { | 3472 | while ( attendees.current()!=0 ) { |
3471 | publishdlg->addAttendee(attendees.current()); | 3473 | publishdlg->addAttendee(attendees.current()); |
3472 | attendees.next(); | 3474 | attendees.next(); |
3473 | } | 3475 | } |
3474 | } | 3476 | } |
3475 | bool send = true; | 3477 | bool send = true; |
3476 | if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) { | 3478 | if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) { |
3477 | if ( publishdlg->exec() != QDialog::Accepted ) | 3479 | if ( publishdlg->exec() != QDialog::Accepted ) |
3478 | send = false; | 3480 | send = false; |
3479 | } | 3481 | } |
3480 | if ( send ) { | 3482 | if ( send ) { |
3481 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); | 3483 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); |
3482 | if ( event ) { | 3484 | if ( event ) { |
3483 | Event *ev = new Event(*event); | 3485 | Event *ev = new Event(*event); |
3484 | ev->registerObserver(0); | 3486 | ev->registerObserver(0); |
3485 | ev->clearAttendees(); | 3487 | ev->clearAttendees(); |
3486 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { | 3488 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { |
3487 | delete(ev); | 3489 | delete(ev); |
3488 | } | 3490 | } |
3489 | } else { | 3491 | } else { |
3490 | if ( todo ) { | 3492 | if ( todo ) { |
3491 | Todo *ev = new Todo(*todo); | 3493 | Todo *ev = new Todo(*todo); |
3492 | ev->registerObserver(0); | 3494 | ev->registerObserver(0); |
3493 | ev->clearAttendees(); | 3495 | ev->clearAttendees(); |
3494 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { | 3496 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { |
3495 | delete(ev); | 3497 | delete(ev); |
3496 | } | 3498 | } |
3497 | } | 3499 | } |
3498 | } | 3500 | } |
3499 | } | 3501 | } |
3500 | delete publishdlg; | 3502 | delete publishdlg; |
3501 | } | 3503 | } |
3502 | 3504 | ||
3503 | void CalendarView::schedule_request(Incidence *incidence) | 3505 | void CalendarView::schedule_request(Incidence *incidence) |
3504 | { | 3506 | { |
3505 | schedule(Scheduler::Request,incidence); | 3507 | schedule(Scheduler::Request,incidence); |
3506 | } | 3508 | } |
3507 | 3509 | ||
3508 | void CalendarView::schedule_refresh(Incidence *incidence) | 3510 | void CalendarView::schedule_refresh(Incidence *incidence) |
3509 | { | 3511 | { |
3510 | schedule(Scheduler::Refresh,incidence); | 3512 | schedule(Scheduler::Refresh,incidence); |
3511 | } | 3513 | } |
3512 | 3514 | ||
3513 | void CalendarView::schedule_cancel(Incidence *incidence) | 3515 | void CalendarView::schedule_cancel(Incidence *incidence) |
3514 | { | 3516 | { |
3515 | schedule(Scheduler::Cancel,incidence); | 3517 | schedule(Scheduler::Cancel,incidence); |
3516 | } | 3518 | } |
3517 | 3519 | ||
3518 | void CalendarView::schedule_add(Incidence *incidence) | 3520 | void CalendarView::schedule_add(Incidence *incidence) |
3519 | { | 3521 | { |
3520 | schedule(Scheduler::Add,incidence); | 3522 | schedule(Scheduler::Add,incidence); |
3521 | } | 3523 | } |
3522 | 3524 | ||
3523 | void CalendarView::schedule_reply(Incidence *incidence) | 3525 | void CalendarView::schedule_reply(Incidence *incidence) |
3524 | { | 3526 | { |
3525 | schedule(Scheduler::Reply,incidence); | 3527 | schedule(Scheduler::Reply,incidence); |
3526 | } | 3528 | } |
3527 | 3529 | ||
3528 | void CalendarView::schedule_counter(Incidence *incidence) | 3530 | void CalendarView::schedule_counter(Incidence *incidence) |
3529 | { | 3531 | { |
3530 | schedule(Scheduler::Counter,incidence); | 3532 | schedule(Scheduler::Counter,incidence); |
3531 | } | 3533 | } |
3532 | 3534 | ||
3533 | void CalendarView::schedule_declinecounter(Incidence *incidence) | 3535 | void CalendarView::schedule_declinecounter(Incidence *incidence) |
3534 | { | 3536 | { |
3535 | schedule(Scheduler::Declinecounter,incidence); | 3537 | schedule(Scheduler::Declinecounter,incidence); |
3536 | } | 3538 | } |
3537 | 3539 | ||
3538 | void CalendarView::schedule_publish_freebusy(int daysToPublish) | 3540 | void CalendarView::schedule_publish_freebusy(int daysToPublish) |
3539 | { | 3541 | { |
3540 | QDateTime start = QDateTime::currentDateTime(); | 3542 | QDateTime start = QDateTime::currentDateTime(); |
3541 | QDateTime end = start.addDays(daysToPublish); | 3543 | QDateTime end = start.addDays(daysToPublish); |
3542 | 3544 | ||
3543 | FreeBusy *freebusy = new FreeBusy(mCalendar, start, end); | 3545 | FreeBusy *freebusy = new FreeBusy(mCalendar, start, end); |
3544 | freebusy->setOrganizer(KOPrefs::instance()->email()); | 3546 | freebusy->setOrganizer(KOPrefs::instance()->email()); |
3545 | 3547 | ||
3546 | 3548 | ||
3547 | PublishDialog *publishdlg = new PublishDialog(); | 3549 | PublishDialog *publishdlg = new PublishDialog(); |
3548 | if ( publishdlg->exec() == QDialog::Accepted ) { | 3550 | if ( publishdlg->exec() == QDialog::Accepted ) { |
3549 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); | 3551 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); |
3550 | if (!dlg->addMessage(freebusy,Scheduler::Publish,publishdlg->addresses())) { | 3552 | if (!dlg->addMessage(freebusy,Scheduler::Publish,publishdlg->addresses())) { |
3551 | delete(freebusy); | 3553 | delete(freebusy); |
3552 | } | 3554 | } |
3553 | } | 3555 | } |
3554 | delete publishdlg; | 3556 | delete publishdlg; |
3555 | } | 3557 | } |
3556 | 3558 | ||
3557 | void CalendarView::schedule(Scheduler::Method method, Incidence *incidence) | 3559 | void CalendarView::schedule(Scheduler::Method method, Incidence *incidence) |
3558 | { | 3560 | { |
3559 | Event *event = 0; | 3561 | Event *event = 0; |
3560 | Todo *todo = 0; | 3562 | Todo *todo = 0; |
3561 | 3563 | ||
3562 | if (incidence == 0) { | 3564 | if (incidence == 0) { |
3563 | incidence = mViewManager->currentView()->selectedIncidences().first(); | 3565 | incidence = mViewManager->currentView()->selectedIncidences().first(); |
3564 | if (incidence == 0) { | 3566 | if (incidence == 0) { |
3565 | incidence = mTodoList->selectedIncidences().first(); | 3567 | incidence = mTodoList->selectedIncidences().first(); |
3566 | } | 3568 | } |
3567 | } | 3569 | } |
3568 | if ( incidence && incidence->typeID() == eventID ) { | 3570 | if ( incidence && incidence->typeID() == eventID ) { |
3569 | event = static_cast<Event *>(incidence); | 3571 | event = static_cast<Event *>(incidence); |
3570 | } | 3572 | } |
3571 | if ( incidence && incidence->typeID() == todoID ) { | 3573 | if ( incidence && incidence->typeID() == todoID ) { |
3572 | todo = static_cast<Todo *>(incidence); | 3574 | todo = static_cast<Todo *>(incidence); |
3573 | } | 3575 | } |
3574 | 3576 | ||
3575 | if (!event && !todo) { | 3577 | if (!event && !todo) { |
3576 | KMessageBox::sorry(this,i18n("No event selected.")); | 3578 | KMessageBox::sorry(this,i18n("No event selected.")); |
3577 | return; | 3579 | return; |
3578 | } | 3580 | } |
3579 | 3581 | ||
3580 | if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) { | 3582 | if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) { |
3581 | KMessageBox::sorry(this,i18n("The event has no attendees.")); | 3583 | KMessageBox::sorry(this,i18n("The event has no attendees.")); |
3582 | return; | 3584 | return; |
3583 | } | 3585 | } |
3584 | 3586 | ||
3585 | Event *ev = 0; | 3587 | Event *ev = 0; |
3586 | if (event) ev = new Event(*event); | 3588 | if (event) ev = new Event(*event); |
3587 | Todo *to = 0; | 3589 | Todo *to = 0; |
3588 | if (todo) to = new Todo(*todo); | 3590 | if (todo) to = new Todo(*todo); |
3589 | 3591 | ||
3590 | if (method == Scheduler::Reply || method == Scheduler::Refresh) { | 3592 | if (method == Scheduler::Reply || method == Scheduler::Refresh) { |
3591 | Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); | 3593 | Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); |
3592 | if (!me) { | 3594 | if (!me) { |
3593 | KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails.")); | 3595 | KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails.")); |
3594 | return; | 3596 | return; |
3595 | } | 3597 | } |
3596 | if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) { | 3598 | if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) { |
3597 | StatusDialog *statdlg = new StatusDialog(this); | 3599 | StatusDialog *statdlg = new StatusDialog(this); |
3598 | if (!statdlg->exec()==QDialog::Accepted) return; | 3600 | if (!statdlg->exec()==QDialog::Accepted) return; |
3599 | me->setStatus( statdlg->status() ); | 3601 | me->setStatus( statdlg->status() ); |
3600 | delete(statdlg); | 3602 | delete(statdlg); |
3601 | } | 3603 | } |
3602 | Attendee *menew = new Attendee(*me); | 3604 | Attendee *menew = new Attendee(*me); |
3603 | if (ev) { | 3605 | if (ev) { |
3604 | ev->clearAttendees(); | 3606 | ev->clearAttendees(); |
3605 | ev->addAttendee(menew,false); | 3607 | ev->addAttendee(menew,false); |
3606 | } else { | 3608 | } else { |
3607 | if (to) { | 3609 | if (to) { |
3608 | todo->clearAttendees(); | 3610 | todo->clearAttendees(); |
3609 | todo->addAttendee(menew,false); | 3611 | todo->addAttendee(menew,false); |
3610 | } | 3612 | } |
3611 | } | 3613 | } |
3612 | } | 3614 | } |
3613 | 3615 | ||
3614 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); | 3616 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); |
3615 | if (ev) { | 3617 | if (ev) { |
3616 | if ( !dlg->addMessage(ev,method) ) delete(ev); | 3618 | if ( !dlg->addMessage(ev,method) ) delete(ev); |
3617 | } else { | 3619 | } else { |
3618 | if (to) { | 3620 | if (to) { |
3619 | if ( !dlg->addMessage(to,method) ) delete(to); | 3621 | if ( !dlg->addMessage(to,method) ) delete(to); |
3620 | } | 3622 | } |
3621 | } | 3623 | } |
3622 | } | 3624 | } |
3623 | 3625 | ||
3624 | void CalendarView::openAddressbook() | 3626 | void CalendarView::openAddressbook() |
3625 | { | 3627 | { |
3626 | KRun::runCommand("kaddressbook"); | 3628 | KRun::runCommand("kaddressbook"); |
3627 | } | 3629 | } |
3628 | 3630 | ||
3629 | void CalendarView::setModified(bool modified) | 3631 | void CalendarView::setModified(bool modified) |
3630 | { | 3632 | { |
3631 | if ( modified ) | 3633 | if ( modified ) |
3632 | emit signalmodified(); | 3634 | emit signalmodified(); |
3633 | if (mModified != modified) { | 3635 | if (mModified != modified) { |
3634 | mModified = modified; | 3636 | mModified = modified; |
3635 | emit modifiedChanged(mModified); | 3637 | emit modifiedChanged(mModified); |
3636 | } | 3638 | } |
3637 | } | 3639 | } |
3638 | 3640 | ||
3639 | bool CalendarView::isReadOnly() | 3641 | bool CalendarView::isReadOnly() |
3640 | { | 3642 | { |
3641 | return mReadOnly; | 3643 | return mReadOnly; |
3642 | } | 3644 | } |
3643 | 3645 | ||
3644 | void CalendarView::setReadOnly(bool readOnly) | 3646 | void CalendarView::setReadOnly(bool readOnly) |
3645 | { | 3647 | { |
3646 | if (mReadOnly != readOnly) { | 3648 | if (mReadOnly != readOnly) { |
3647 | mReadOnly = readOnly; | 3649 | mReadOnly = readOnly; |
3648 | emit readOnlyChanged(mReadOnly); | 3650 | emit readOnlyChanged(mReadOnly); |
3649 | } | 3651 | } |
3650 | } | 3652 | } |
3651 | 3653 | ||
3652 | bool CalendarView::isModified() | 3654 | bool CalendarView::isModified() |
3653 | { | 3655 | { |
3654 | return mModified; | 3656 | return mModified; |
3655 | } | 3657 | } |
3656 | void CalendarView::slotprintSelInc() | 3658 | void CalendarView::slotprintSelInc() |
3657 | { | 3659 | { |
3658 | if ( currentSelection() == 0 ) { | 3660 | if ( currentSelection() == 0 ) { |
3659 | KMessageBox::sorry(this,i18n("There is nothing selected!")); | 3661 | KMessageBox::sorry(this,i18n("There is nothing selected!")); |
3660 | return; | 3662 | return; |
3661 | } | 3663 | } |
3662 | showIncidence(); | 3664 | showIncidence(); |
3663 | getEventViewerDialog()->print(); | 3665 | getEventViewerDialog()->print(); |
3664 | 3666 | ||
3665 | } | 3667 | } |
3666 | void CalendarView::printSetup() | 3668 | void CalendarView::printSetup() |
3667 | { | 3669 | { |
3668 | #ifndef KORG_NOPRINTER | 3670 | #ifndef KORG_NOPRINTER |
3669 | createPrinter(); | 3671 | createPrinter(); |
3670 | 3672 | ||
3671 | mCalPrinter->setupPrinter(); | 3673 | mCalPrinter->setupPrinter(); |
3672 | #endif | 3674 | #endif |
3673 | } | 3675 | } |
3674 | 3676 | ||
3675 | void CalendarView::print() | 3677 | void CalendarView::print() |
3676 | { | 3678 | { |
3677 | #ifndef KORG_NOPRINTER | 3679 | #ifndef KORG_NOPRINTER |
3678 | createPrinter(); | 3680 | createPrinter(); |
3679 | 3681 | ||
3680 | DateList tmpDateList = mNavigator->selectedDates(); | 3682 | DateList tmpDateList = mNavigator->selectedDates(); |
3681 | mCalPrinter->print(CalPrinter::Month, | 3683 | mCalPrinter->print(CalPrinter::Month, |
3682 | tmpDateList.first(), tmpDateList.last()); | 3684 | tmpDateList.first(), tmpDateList.last()); |
3683 | #endif | 3685 | #endif |
3684 | } | 3686 | } |
3685 | 3687 | ||
3686 | void CalendarView::printPreview() | 3688 | void CalendarView::printPreview() |
3687 | { | 3689 | { |
3688 | #ifndef KORG_NOPRINTER | 3690 | #ifndef KORG_NOPRINTER |
3689 | kdDebug() << "CalendarView::printPreview()" << endl; | 3691 | kdDebug() << "CalendarView::printPreview()" << endl; |
3690 | 3692 | ||
3691 | createPrinter(); | 3693 | createPrinter(); |
3692 | 3694 | ||
3693 | DateList tmpDateList = mNavigator->selectedDates(); | 3695 | DateList tmpDateList = mNavigator->selectedDates(); |
3694 | 3696 | ||
3695 | mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(), | 3697 | mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(), |
3696 | tmpDateList.last()); | 3698 | tmpDateList.last()); |
3697 | #endif | 3699 | #endif |
3698 | } | 3700 | } |
3699 | 3701 | ||
3700 | void CalendarView::exportICalendar() | 3702 | void CalendarView::exportICalendar() |
3701 | { | 3703 | { |
3702 | QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); | 3704 | QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); |
3703 | 3705 | ||
3704 | // Force correct extension | 3706 | // Force correct extension |
3705 | if (filename.right(4) != ".ics") filename += ".ics"; | 3707 | if (filename.right(4) != ".ics") filename += ".ics"; |
3706 | 3708 | ||
3707 | FileStorage storage( mCalendar, filename, new ICalFormat() ); | 3709 | FileStorage storage( mCalendar, filename, new ICalFormat() ); |
3708 | storage.save(); | 3710 | storage.save(); |
3709 | } | 3711 | } |
3710 | 3712 | ||
3711 | bool CalendarView::exportVCalendar( QString filename ) | 3713 | bool CalendarView::exportVCalendar( QString filename ) |
3712 | { | 3714 | { |
3713 | if (mCalendar->journals().count() > 0) { | 3715 | if (mCalendar->journals().count() > 0) { |
3714 | int result = KMessageBox::warningContinueCancel(this, | 3716 | int result = KMessageBox::warningContinueCancel(this, |
3715 | i18n("The journal entries can not be\nexported to a vCalendar file."), | 3717 | i18n("The journal entries can not be\nexported to a vCalendar file."), |
3716 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), | 3718 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), |
3717 | true); | 3719 | true); |
3718 | if (result != KMessageBox::Continue) return false; | 3720 | if (result != KMessageBox::Continue) return false; |
3719 | } | 3721 | } |
3720 | 3722 | ||
3721 | //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this); | 3723 | //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this); |
3722 | 3724 | ||
3723 | // Force correct extension | 3725 | // Force correct extension |
3724 | if (filename.right(4) != ".vcs") filename += ".vcs"; | 3726 | if (filename.right(4) != ".vcs") filename += ".vcs"; |
3725 | 3727 | ||
3726 | FileStorage storage( mCalendar, filename, new VCalFormat ); | 3728 | FileStorage storage( mCalendar, filename, new VCalFormat ); |
3727 | return storage.save(); | 3729 | return storage.save(); |
3728 | 3730 | ||
3729 | } | 3731 | } |
3730 | 3732 | ||
3731 | void CalendarView::eventUpdated(Incidence *) | 3733 | void CalendarView::eventUpdated(Incidence *) |
3732 | { | 3734 | { |
3733 | setModified(); | 3735 | setModified(); |
3734 | // Don't call updateView here. The code, which has caused the update of the | 3736 | // Don't call updateView here. The code, which has caused the update of the |
3735 | // event is responsible for updating the view. | 3737 | // event is responsible for updating the view. |
3736 | // updateView(); | 3738 | // updateView(); |
3737 | } | 3739 | } |
3738 | 3740 | ||
3739 | void CalendarView::adaptNavigationUnits() | 3741 | void CalendarView::adaptNavigationUnits() |
3740 | { | 3742 | { |
3741 | if (mViewManager->currentView()->isEventView()) { | 3743 | if (mViewManager->currentView()->isEventView()) { |
3742 | int days = mViewManager->currentView()->currentDateCount(); | 3744 | int days = mViewManager->currentView()->currentDateCount(); |
3743 | if (days == 1) { | 3745 | if (days == 1) { |
3744 | emit changeNavStringPrev(i18n("&Previous Day")); | 3746 | emit changeNavStringPrev(i18n("&Previous Day")); |
3745 | emit changeNavStringNext(i18n("&Next Day")); | 3747 | emit changeNavStringNext(i18n("&Next Day")); |
3746 | } else { | 3748 | } else { |
3747 | emit changeNavStringPrev(i18n("&Previous Week")); | 3749 | emit changeNavStringPrev(i18n("&Previous Week")); |
3748 | emit changeNavStringNext(i18n("&Next Week")); | 3750 | emit changeNavStringNext(i18n("&Next Week")); |
3749 | } | 3751 | } |
3750 | } | 3752 | } |
3751 | } | 3753 | } |
3752 | 3754 | ||
3753 | void CalendarView::processMainViewSelection( Incidence *incidence ) | 3755 | void CalendarView::processMainViewSelection( Incidence *incidence ) |
3754 | { | 3756 | { |
3755 | if ( incidence ) mTodoList->clearSelection(); | 3757 | if ( incidence ) mTodoList->clearSelection(); |
3756 | processIncidenceSelection( incidence ); | 3758 | processIncidenceSelection( incidence ); |
3757 | } | 3759 | } |
3758 | 3760 | ||
3759 | void CalendarView::processTodoListSelection( Incidence *incidence ) | 3761 | void CalendarView::processTodoListSelection( Incidence *incidence ) |
3760 | { | 3762 | { |
3761 | if ( incidence && mViewManager->currentView() ) { | 3763 | if ( incidence && mViewManager->currentView() ) { |
3762 | mViewManager->currentView()->clearSelection(); | 3764 | mViewManager->currentView()->clearSelection(); |
3763 | } | 3765 | } |
3764 | processIncidenceSelection( incidence ); | 3766 | processIncidenceSelection( incidence ); |
3765 | } | 3767 | } |
3766 | 3768 | ||
3767 | void CalendarView::processIncidenceSelection( Incidence *incidence ) | 3769 | void CalendarView::processIncidenceSelection( Incidence *incidence ) |
3768 | { | 3770 | { |
3769 | if ( incidence == mSelectedIncidence ) return; | 3771 | if ( incidence == mSelectedIncidence ) return; |
3770 | 3772 | ||
3771 | mSelectedIncidence = incidence; | 3773 | mSelectedIncidence = incidence; |
3772 | 3774 | ||
3773 | emit incidenceSelected( mSelectedIncidence ); | 3775 | emit incidenceSelected( mSelectedIncidence ); |
3774 | 3776 | ||
3775 | if ( incidence && incidence->typeID() == eventID ) { | 3777 | if ( incidence && incidence->typeID() == eventID ) { |
3776 | Event *event = static_cast<Event *>( incidence ); | 3778 | Event *event = static_cast<Event *>( incidence ); |
3777 | if ( event->organizer() == KOPrefs::instance()->email() ) { | 3779 | if ( event->organizer() == KOPrefs::instance()->email() ) { |
3778 | emit organizerEventsSelected( true ); | 3780 | emit organizerEventsSelected( true ); |
3779 | } else { | 3781 | } else { |
3780 | emit organizerEventsSelected(false); | 3782 | emit organizerEventsSelected(false); |
3781 | } | 3783 | } |
3782 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, | 3784 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, |
3783 | KOPrefs::instance()->email() ) ) { | 3785 | KOPrefs::instance()->email() ) ) { |
3784 | emit groupEventsSelected( true ); | 3786 | emit groupEventsSelected( true ); |
3785 | } else { | 3787 | } else { |
3786 | emit groupEventsSelected(false); | 3788 | emit groupEventsSelected(false); |
3787 | } | 3789 | } |
3788 | return; | 3790 | return; |
3789 | } else { | 3791 | } else { |
3790 | if ( incidence && incidence->typeID() == todoID ) { | 3792 | if ( incidence && incidence->typeID() == todoID ) { |
3791 | emit todoSelected( true ); | 3793 | emit todoSelected( true ); |
3792 | Todo *event = static_cast<Todo *>( incidence ); | 3794 | Todo *event = static_cast<Todo *>( incidence ); |
3793 | if ( event->organizer() == KOPrefs::instance()->email() ) { | 3795 | if ( event->organizer() == KOPrefs::instance()->email() ) { |
3794 | emit organizerEventsSelected( true ); | 3796 | emit organizerEventsSelected( true ); |
3795 | } else { | 3797 | } else { |
3796 | emit organizerEventsSelected(false); | 3798 | emit organizerEventsSelected(false); |
3797 | } | 3799 | } |
3798 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, | 3800 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, |
3799 | KOPrefs::instance()->email() ) ) { | 3801 | KOPrefs::instance()->email() ) ) { |
3800 | emit groupEventsSelected( true ); | 3802 | emit groupEventsSelected( true ); |
3801 | } else { | 3803 | } else { |
3802 | emit groupEventsSelected(false); | 3804 | emit groupEventsSelected(false); |
3803 | } | 3805 | } |
3804 | return; | 3806 | return; |
3805 | } else { | 3807 | } else { |
3806 | emit todoSelected( false ); | 3808 | emit todoSelected( false ); |
3807 | emit organizerEventsSelected(false); | 3809 | emit organizerEventsSelected(false); |
3808 | emit groupEventsSelected(false); | 3810 | emit groupEventsSelected(false); |
3809 | } | 3811 | } |
3810 | return; | 3812 | return; |
3811 | } | 3813 | } |
3812 | 3814 | ||
3813 | /* if ( incidence && incidence->typeID() == todoID ) { | 3815 | /* if ( incidence && incidence->typeID() == todoID ) { |
3814 | emit todoSelected( true ); | 3816 | emit todoSelected( true ); |
3815 | } else { | 3817 | } else { |
3816 | emit todoSelected( false ); | 3818 | emit todoSelected( false ); |
3817 | }*/ | 3819 | }*/ |
3818 | } | 3820 | } |
3819 | 3821 | ||
3820 | 3822 | ||
3821 | void CalendarView::checkClipboard() | 3823 | void CalendarView::checkClipboard() |
3822 | { | 3824 | { |
3823 | #ifndef KORG_NODND | 3825 | #ifndef KORG_NODND |
3824 | if (ICalDrag::canDecode(QApplication::clipboard()->data())) { | 3826 | if (ICalDrag::canDecode(QApplication::clipboard()->data())) { |
3825 | emit pasteEnabled(true); | 3827 | emit pasteEnabled(true); |
3826 | } else { | 3828 | } else { |
3827 | emit pasteEnabled(false); | 3829 | emit pasteEnabled(false); |
3828 | } | 3830 | } |
3829 | #endif | 3831 | #endif |
3830 | } | 3832 | } |
3831 | 3833 | ||
3832 | void CalendarView::showDates(const DateList &selectedDates) | 3834 | void CalendarView::showDates(const DateList &selectedDates) |
3833 | { | 3835 | { |
3834 | // kdDebug() << "CalendarView::selectDates()" << endl; | 3836 | // kdDebug() << "CalendarView::selectDates()" << endl; |
3835 | 3837 | ||
3836 | 3838 | ||
3837 | if ( !mBlockShowDates ) { | 3839 | if ( !mBlockShowDates ) { |
3838 | if ( mViewManager->currentView() ) { | 3840 | if ( mViewManager->currentView() ) { |
3839 | updateView( selectedDates.first(), selectedDates.last() ); | 3841 | updateView( selectedDates.first(), selectedDates.last() ); |
3840 | } else { | 3842 | } else { |
3841 | mViewManager->showAgendaView(); | 3843 | mViewManager->showAgendaView(); |
3842 | } | 3844 | } |
3843 | } | 3845 | } |
3844 | 3846 | ||
3845 | QDate date = selectedDates.first(); | 3847 | QDate date = selectedDates.first(); |
3846 | if ( ! date.isValid() ) { | 3848 | if ( ! date.isValid() ) { |
3847 | topLevelWidget()->setCaption(""); | 3849 | topLevelWidget()->setCaption(""); |
3848 | return; | 3850 | return; |
3849 | } | 3851 | } |
3850 | 3852 | ||
3851 | QString selDates; | 3853 | QString selDates; |
3852 | selDates = KGlobal::locale()->formatDate( date, true); | 3854 | selDates = KGlobal::locale()->formatDate( date, true); |
3853 | if (selectedDates.first() < selectedDates.last() ) | 3855 | if (selectedDates.first() < selectedDates.last() ) |
3854 | selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); | 3856 | selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); |
3855 | else { | 3857 | else { |
3856 | QString addString; | 3858 | QString addString; |
3857 | if ( date == QDateTime::currentDateTime().date() ) | 3859 | if ( date == QDateTime::currentDateTime().date() ) |
3858 | addString = i18n("Today"); | 3860 | addString = i18n("Today"); |
3859 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) | 3861 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) |
3860 | addString = i18n("Tomorrow"); | 3862 | addString = i18n("Tomorrow"); |
3861 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) | 3863 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) |
3862 | addString = i18n("Yesterday"); | 3864 | addString = i18n("Yesterday"); |
3863 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) | 3865 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) |
3864 | addString = i18n("Day before yesterday"); | 3866 | addString = i18n("Day before yesterday"); |
3865 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) | 3867 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) |
3866 | addString = i18n("Day after tomorrow"); | 3868 | addString = i18n("Day after tomorrow"); |
3867 | if ( !addString.isEmpty() ) { | 3869 | if ( !addString.isEmpty() ) { |
3868 | topLevelWidget()->setCaption( addString+", " + selDates ); | 3870 | topLevelWidget()->setCaption( addString+", " + selDates ); |
3869 | return; | 3871 | return; |
3870 | } | 3872 | } |
3871 | } | 3873 | } |
3872 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); | 3874 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); |
3873 | 3875 | ||
3874 | } | 3876 | } |
3875 | 3877 | ||
3876 | QPtrList<CalFilter> CalendarView::filters() | 3878 | QPtrList<CalFilter> CalendarView::filters() |
3877 | { | 3879 | { |
3878 | return mFilters; | 3880 | return mFilters; |
3879 | 3881 | ||
3880 | } | 3882 | } |
3881 | void CalendarView::editFilters() | 3883 | void CalendarView::editFilters() |
3882 | { | 3884 | { |
3883 | // kdDebug() << "CalendarView::editFilters()" << endl; | 3885 | // kdDebug() << "CalendarView::editFilters()" << endl; |
3884 | 3886 | ||
3885 | CalFilter *filter = mFilters.first(); | 3887 | CalFilter *filter = mFilters.first(); |
3886 | while(filter) { | 3888 | while(filter) { |
3887 | kdDebug() << " Filter: " << filter->name() << endl; | 3889 | kdDebug() << " Filter: " << filter->name() << endl; |
3888 | filter = mFilters.next(); | 3890 | filter = mFilters.next(); |
3889 | } | 3891 | } |
3890 | 3892 | ||
3891 | mDialogManager->showFilterEditDialog(&mFilters); | 3893 | mDialogManager->showFilterEditDialog(&mFilters); |
3892 | } | 3894 | } |
3893 | void CalendarView::toggleFilter() | 3895 | void CalendarView::toggleFilter() |
3894 | { | 3896 | { |
3895 | showFilter(! mFilterView->isVisible()); | 3897 | showFilter(! mFilterView->isVisible()); |
3896 | } | 3898 | } |
3897 | 3899 | ||
3898 | KOFilterView *CalendarView::filterView() | 3900 | KOFilterView *CalendarView::filterView() |
3899 | { | 3901 | { |
3900 | return mFilterView; | 3902 | return mFilterView; |
3901 | } | 3903 | } |
3902 | void CalendarView::selectFilter( int fil ) | 3904 | void CalendarView::selectFilter( int fil ) |
3903 | { | 3905 | { |
3904 | mFilterView->setSelectedFilter( fil ); | 3906 | mFilterView->setSelectedFilter( fil ); |
3905 | } | 3907 | } |
3906 | void CalendarView::showFilter(bool visible) | 3908 | void CalendarView::showFilter(bool visible) |
3907 | { | 3909 | { |
3908 | if (visible) mFilterView->show(); | 3910 | if (visible) mFilterView->show(); |
3909 | else mFilterView->hide(); | 3911 | else mFilterView->hide(); |
3910 | } | 3912 | } |
3911 | void CalendarView::toggleFilerEnabled( ) | 3913 | void CalendarView::toggleFilerEnabled( ) |
3912 | { | 3914 | { |
3913 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); | 3915 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); |
3914 | if ( !mFilterView->filtersEnabled() ) | 3916 | if ( !mFilterView->filtersEnabled() ) |
3915 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); | 3917 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); |
3916 | 3918 | ||
3917 | } | 3919 | } |
3918 | void CalendarView::updateFilter() | 3920 | void CalendarView::updateFilter() |
3919 | { | 3921 | { |
3920 | CalFilter *filter = mFilterView->selectedFilter(); | 3922 | CalFilter *filter = mFilterView->selectedFilter(); |
3921 | if (filter) { | 3923 | if (filter) { |
3922 | QString mess; | 3924 | QString mess; |
3923 | if (mFilterView->filtersEnabled()) { | 3925 | if (mFilterView->filtersEnabled()) { |
3924 | mess = i18n("Filter selected: ")+filter->name(); | 3926 | mess = i18n("Filter selected: ")+filter->name(); |
3925 | filter->setEnabled(true); | 3927 | filter->setEnabled(true); |
3926 | } | 3928 | } |
3927 | else filter->setEnabled(false); | 3929 | else filter->setEnabled(false); |
3928 | mCalendar->setFilter(filter); | 3930 | mCalendar->setFilter(filter); |
3929 | updateView(); | 3931 | updateView(); |
3930 | if ( !mess.isEmpty() ) | 3932 | if ( !mess.isEmpty() ) |
3931 | topLevelWidget()->setCaption( mess ); | 3933 | topLevelWidget()->setCaption( mess ); |
3932 | 3934 | ||
3933 | } | 3935 | } |
3934 | } | 3936 | } |
3935 | 3937 | ||
3936 | void CalendarView::filterEdited() | 3938 | void CalendarView::filterEdited() |
3937 | { | 3939 | { |
3938 | mFilterView->updateFilters(); | 3940 | mFilterView->updateFilters(); |
3939 | updateFilter(); | 3941 | updateFilter(); |
3940 | writeSettings(); | 3942 | writeSettings(); |
3941 | } | 3943 | } |
3942 | 3944 | ||
3943 | 3945 | ||
3944 | void CalendarView::takeOverEvent() | 3946 | void CalendarView::takeOverEvent() |
3945 | { | 3947 | { |
3946 | Incidence *incidence = currentSelection(); | 3948 | Incidence *incidence = currentSelection(); |
3947 | 3949 | ||
3948 | if (!incidence) return; | 3950 | if (!incidence) return; |
3949 | 3951 | ||
3950 | incidence->setOrganizer(KOPrefs::instance()->email()); | 3952 | incidence->setOrganizer(KOPrefs::instance()->email()); |
3951 | incidence->recreate(); | 3953 | incidence->recreate(); |
3952 | incidence->setReadOnly(false); | 3954 | incidence->setReadOnly(false); |
3953 | 3955 | ||
3954 | updateView(); | 3956 | updateView(); |
3955 | } | 3957 | } |
3956 | 3958 | ||
3957 | void CalendarView::takeOverCalendar() | 3959 | void CalendarView::takeOverCalendar() |
3958 | { | 3960 | { |
3959 | // TODO: Create Calendar::allIncidences() function and use it here | 3961 | // TODO: Create Calendar::allIncidences() function and use it here |
3960 | 3962 | ||
3961 | clearAllViews(); | 3963 | clearAllViews(); |
3962 | QPtrList<Event> events = mCalendar->events(); | 3964 | QPtrList<Event> events = mCalendar->events(); |
3963 | for(uint i=0; i<events.count(); ++i) { | 3965 | for(uint i=0; i<events.count(); ++i) { |
3964 | events.at(i)->setOrganizer(KOPrefs::instance()->email()); | 3966 | events.at(i)->setOrganizer(KOPrefs::instance()->email()); |
3965 | events.at(i)->recreate(); | 3967 | events.at(i)->recreate(); |
3966 | events.at(i)->setReadOnly(false); | 3968 | events.at(i)->setReadOnly(false); |
3967 | } | 3969 | } |
3968 | 3970 | ||
3969 | QPtrList<Todo> todos = mCalendar->todos(); | 3971 | QPtrList<Todo> todos = mCalendar->todos(); |
3970 | for(uint i=0; i<todos.count(); ++i) { | 3972 | for(uint i=0; i<todos.count(); ++i) { |
3971 | todos.at(i)->setOrganizer(KOPrefs::instance()->email()); | 3973 | todos.at(i)->setOrganizer(KOPrefs::instance()->email()); |
3972 | todos.at(i)->recreate(); | 3974 | todos.at(i)->recreate(); |
3973 | todos.at(i)->setReadOnly(false); | 3975 | todos.at(i)->setReadOnly(false); |
3974 | } | 3976 | } |
3975 | 3977 | ||
3976 | QPtrList<Journal> journals = mCalendar->journals(); | 3978 | QPtrList<Journal> journals = mCalendar->journals(); |
3977 | for(uint i=0; i<journals.count(); ++i) { | 3979 | for(uint i=0; i<journals.count(); ++i) { |
3978 | journals.at(i)->setOrganizer(KOPrefs::instance()->email()); | 3980 | journals.at(i)->setOrganizer(KOPrefs::instance()->email()); |
3979 | journals.at(i)->recreate(); | 3981 | journals.at(i)->recreate(); |
3980 | journals.at(i)->setReadOnly(false); | 3982 | journals.at(i)->setReadOnly(false); |
3981 | } | 3983 | } |
3982 | 3984 | ||
3983 | updateView(); | 3985 | updateView(); |
3984 | } | 3986 | } |
3985 | 3987 | ||
3986 | void CalendarView::showIntro() | 3988 | void CalendarView::showIntro() |
3987 | { | 3989 | { |
3988 | kdDebug() << "To be implemented." << endl; | 3990 | kdDebug() << "To be implemented." << endl; |
3989 | } | 3991 | } |
3990 | 3992 | ||
3991 | QWidgetStack *CalendarView::viewStack() | 3993 | QWidgetStack *CalendarView::viewStack() |
3992 | { | 3994 | { |
3993 | return mRightFrame; | 3995 | return mRightFrame; |
3994 | } | 3996 | } |
3995 | 3997 | ||
3996 | QWidget *CalendarView::leftFrame() | 3998 | QWidget *CalendarView::leftFrame() |
3997 | { | 3999 | { |
3998 | return ( QWidget *)mLeftFrame; | 4000 | return ( QWidget *)mLeftFrame; |
3999 | } | 4001 | } |
4000 | 4002 | ||
4001 | DateNavigator *CalendarView::dateNavigator() | 4003 | DateNavigator *CalendarView::dateNavigator() |
4002 | { | 4004 | { |
4003 | return mNavigator; | 4005 | return mNavigator; |
4004 | } | 4006 | } |
4005 | 4007 | ||
4006 | KDateNavigator* CalendarView::dateNavigatorWidget() | 4008 | KDateNavigator* CalendarView::dateNavigatorWidget() |
4007 | { | 4009 | { |
4008 | return mDateNavigator->navigatorView(); | 4010 | return mDateNavigator->navigatorView(); |
4009 | } | 4011 | } |
4010 | void CalendarView::toggleDateNavigatorWidget() | 4012 | void CalendarView::toggleDateNavigatorWidget() |
4011 | { | 4013 | { |
4012 | KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; | 4014 | KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; |
4013 | 4015 | ||
4014 | if (!KOPrefs::instance()->mShowDateNavigator ) | 4016 | if (!KOPrefs::instance()->mShowDateNavigator ) |
4015 | mDateNavigator->hide(); | 4017 | mDateNavigator->hide(); |
4016 | else | 4018 | else |
4017 | mDateNavigator->show(); | 4019 | mDateNavigator->show(); |
4018 | } | 4020 | } |
4019 | void CalendarView::addView(KOrg::BaseView *view) | 4021 | void CalendarView::addView(KOrg::BaseView *view) |
4020 | { | 4022 | { |
4021 | mViewManager->addView(view); | 4023 | mViewManager->addView(view); |
4022 | } | 4024 | } |
4023 | 4025 | ||
4024 | void CalendarView::showView(KOrg::BaseView *view) | 4026 | void CalendarView::showView(KOrg::BaseView *view) |
4025 | { | 4027 | { |
4026 | mViewManager->showView(view, mLeftFrame->isVisible()); | 4028 | mViewManager->showView(view, mLeftFrame->isVisible()); |
4027 | } | 4029 | } |
4028 | 4030 | ||
4029 | Incidence *CalendarView::currentSelection() | 4031 | Incidence *CalendarView::currentSelection() |
4030 | { | 4032 | { |
4031 | return mViewManager->currentSelection(); | 4033 | return mViewManager->currentSelection(); |
4032 | } | 4034 | } |
4033 | void CalendarView::toggleAllDaySize() | 4035 | void CalendarView::toggleAllDaySize() |
4034 | { | 4036 | { |
4035 | /* | 4037 | /* |
4036 | if ( KOPrefs::instance()->mAllDaySize > 47 ) | 4038 | if ( KOPrefs::instance()->mAllDaySize > 47 ) |
4037 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2; | 4039 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2; |
4038 | else | 4040 | else |
4039 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2; | 4041 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2; |
4040 | */ | 4042 | */ |
4041 | viewManager()->agendaView()->toggleAllDay(); | 4043 | viewManager()->agendaView()->toggleAllDay(); |
4042 | } | 4044 | } |
4043 | void CalendarView::toggleExpand() | 4045 | void CalendarView::toggleExpand() |
4044 | { | 4046 | { |
4045 | // if ( mLeftFrame->isHidden() ) { | 4047 | // if ( mLeftFrame->isHidden() ) { |
4046 | // mLeftFrame->show(); | 4048 | // mLeftFrame->show(); |
4047 | // emit calendarViewExpanded( false ); | 4049 | // emit calendarViewExpanded( false ); |
4048 | // } else { | 4050 | // } else { |
4049 | // mLeftFrame->hide(); | 4051 | // mLeftFrame->hide(); |
4050 | // emit calendarViewExpanded( true ); | 4052 | // emit calendarViewExpanded( true ); |
4051 | // } | 4053 | // } |
4052 | //qDebug(" CalendarView::toggleExpand()"); | 4054 | //qDebug(" CalendarView::toggleExpand()"); |
4053 | globalFlagBlockAgenda = 1; | 4055 | globalFlagBlockAgenda = 1; |
4054 | emit calendarViewExpanded( !mLeftFrame->isHidden() ); | 4056 | emit calendarViewExpanded( !mLeftFrame->isHidden() ); |
4055 | globalFlagBlockAgenda = 5; | 4057 | globalFlagBlockAgenda = 5; |
4056 | mViewManager->raiseCurrentView( !mLeftFrame->isHidden() ); | 4058 | mViewManager->raiseCurrentView( !mLeftFrame->isHidden() ); |
4057 | //mViewManager->showView( 0, true ); | 4059 | //mViewManager->showView( 0, true ); |
4058 | } | 4060 | } |
4059 | 4061 | ||
4060 | void CalendarView::calendarModified( bool modified, Calendar * ) | 4062 | void CalendarView::calendarModified( bool modified, Calendar * ) |
4061 | { | 4063 | { |
4062 | setModified( modified ); | 4064 | setModified( modified ); |
4063 | } | 4065 | } |
4064 | 4066 | ||
4065 | Todo *CalendarView::selectedTodo() | 4067 | Todo *CalendarView::selectedTodo() |
4066 | { | 4068 | { |
4067 | Incidence *incidence = currentSelection(); | 4069 | Incidence *incidence = currentSelection(); |
4068 | if ( incidence && incidence->typeID() == todoID ) { | 4070 | if ( incidence && incidence->typeID() == todoID ) { |
4069 | return static_cast<Todo *>( incidence ); | 4071 | return static_cast<Todo *>( incidence ); |
4070 | } | 4072 | } |
4071 | 4073 | ||
4072 | incidence = mTodoList->selectedIncidences().first(); | 4074 | incidence = mTodoList->selectedIncidences().first(); |
4073 | if ( incidence && incidence->typeID() == todoID ) { | 4075 | if ( incidence && incidence->typeID() == todoID ) { |
4074 | return static_cast<Todo *>( incidence ); | 4076 | return static_cast<Todo *>( incidence ); |
4075 | } | 4077 | } |
4076 | 4078 | ||
4077 | return 0; | 4079 | return 0; |
4078 | } | 4080 | } |
4079 | 4081 | ||
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 4600090..1215a99 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -1,642 +1,643 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000, 2001 | 3 | Copyright (c) 2000, 2001 |
4 | Cornelius Schumacher <schumacher@kde.org> | 4 | Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | #ifndef CALENDARVIEW_H | 24 | #ifndef CALENDARVIEW_H |
25 | #define CALENDARVIEW_H | 25 | #define CALENDARVIEW_H |
26 | 26 | ||
27 | #include <qframe.h> | 27 | #include <qframe.h> |
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | #include <qwidget.h> | 29 | #include <qwidget.h> |
30 | #include <qptrlist.h> | 30 | #include <qptrlist.h> |
31 | #include <qvbox.h> | 31 | #include <qvbox.h> |
32 | #include <qmap.h> | 32 | #include <qmap.h> |
33 | #ifndef DESKTOP_VERSION | 33 | #ifndef DESKTOP_VERSION |
34 | #include <qtopia/ir.h> | 34 | #include <qtopia/ir.h> |
35 | #else | 35 | #else |
36 | #define Ir char | 36 | #define Ir char |
37 | #endif | 37 | #endif |
38 | #include <libkcal/calendar.h> | 38 | #include <libkcal/calendar.h> |
39 | #include <libkcal/scheduler.h> | 39 | #include <libkcal/scheduler.h> |
40 | #include <libkcal/calendarresources.h> | 40 | #include <libkcal/calendarresources.h> |
41 | #include <libkcal/resourcecalendar.h> | 41 | #include <libkcal/resourcecalendar.h> |
42 | #include <KDGanttMinimizeSplitter.h> | 42 | #include <KDGanttMinimizeSplitter.h> |
43 | 43 | ||
44 | #include <korganizer/calendarviewbase.h> | 44 | #include <korganizer/calendarviewbase.h> |
45 | 45 | ||
46 | #include <ksyncmanager.h> | 46 | #include <ksyncmanager.h> |
47 | 47 | ||
48 | class QWidgetStack; | 48 | class QWidgetStack; |
49 | class QSplitter; | 49 | class QSplitter; |
50 | 50 | ||
51 | class CalPrinter; | 51 | class CalPrinter; |
52 | class KOFilterView; | 52 | class KOFilterView; |
53 | class KOViewManager; | 53 | class KOViewManager; |
54 | class KODialogManager; | 54 | class KODialogManager; |
55 | class KOTodoView; | 55 | class KOTodoView; |
56 | class KDateNavigator; | 56 | class KDateNavigator; |
57 | class DateNavigatorContainer; | 57 | class DateNavigatorContainer; |
58 | class DateNavigator; | 58 | class DateNavigator; |
59 | class KOIncidenceEditor; | 59 | class KOIncidenceEditor; |
60 | class KDatePicker; | 60 | class KDatePicker; |
61 | class ResourceView; | 61 | class ResourceView; |
62 | class KOEventEditor; | 62 | class KOEventEditor; |
63 | class KOTodoEditor ; | 63 | class KOTodoEditor ; |
64 | class KOEventViewerDialog; | 64 | class KOEventViewerDialog; |
65 | class KOBeamPrefs; | 65 | class KOBeamPrefs; |
66 | class KSyncProfile; | 66 | class KSyncProfile; |
67 | class AlarmDialog; | 67 | class AlarmDialog; |
68 | class KCal::Attendee; | 68 | class KCal::Attendee; |
69 | 69 | ||
70 | namespace KCal { class FileStorage; } | 70 | namespace KCal { class FileStorage; } |
71 | 71 | ||
72 | using namespace KCal; | 72 | using namespace KCal; |
73 | 73 | ||
74 | /** | 74 | /** |
75 | This is the main calendar widget. It provides the different vies on t he | 75 | This is the main calendar widget. It provides the different vies on t he |
76 | calendar data as well as the date navigator. It also handles synchronisation | 76 | calendar data as well as the date navigator. It also handles synchronisation |
77 | of the different views and controls the different dialogs like preferences, | 77 | of the different views and controls the different dialogs like preferences, |
78 | event editor, search dialog etc. | 78 | event editor, search dialog etc. |
79 | 79 | ||
80 | @short main calendar view widget | 80 | @short main calendar view widget |
81 | @author Cornelius Schumacher | 81 | @author Cornelius Schumacher |
82 | */ | 82 | */ |
83 | 83 | ||
84 | #include <qtextbrowser.h> | 84 | #include <qtextbrowser.h> |
85 | #include <qtextcodec.h> | 85 | #include <qtextcodec.h> |
86 | 86 | ||
87 | class MissedAlarmTextBrowser : public QTextBrowser { | 87 | class MissedAlarmTextBrowser : public QTextBrowser { |
88 | Q_OBJECT | 88 | Q_OBJECT |
89 | public: | 89 | public: |
90 | MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); | 90 | MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); |
91 | ~MissedAlarmTextBrowser(); | 91 | ~MissedAlarmTextBrowser(); |
92 | void setSource(const QString & n); | 92 | void setSource(const QString & n); |
93 | 93 | ||
94 | private: | 94 | private: |
95 | Incidence * getNextInc(QDateTime start ); | 95 | Incidence * getNextInc(QDateTime start ); |
96 | QPtrList<Incidence> mAlarms; | 96 | QPtrList<Incidence> mAlarms; |
97 | signals: | 97 | signals: |
98 | void showIncidence( QString uid); | 98 | void showIncidence( QString uid); |
99 | }; | 99 | }; |
100 | 100 | ||
101 | 101 | ||
102 | class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface | 102 | class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface |
103 | { | 103 | { |
104 | Q_OBJECT | 104 | Q_OBJECT |
105 | public: | 105 | public: |
106 | /** | 106 | /** |
107 | Constructs a new calendar view widget. | 107 | Constructs a new calendar view widget. |
108 | 108 | ||
109 | @param calendar calendar document | 109 | @param calendar calendar document |
110 | @param parent parent window | 110 | @param parent parent window |
111 | @param name Qt internal widget object name | 111 | @param name Qt internal widget object name |
112 | */ | 112 | */ |
113 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, | 113 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, |
114 | const char *name = 0 ); | 114 | const char *name = 0 ); |
115 | CalendarView( Calendar *calendar, QWidget *parent = 0, | 115 | CalendarView( Calendar *calendar, QWidget *parent = 0, |
116 | const char *name = 0 ); | 116 | const char *name = 0 ); |
117 | virtual ~CalendarView(); | 117 | virtual ~CalendarView(); |
118 | 118 | ||
119 | Calendar *calendar() { return mCalendar; } | 119 | Calendar *calendar() { return mCalendar; } |
120 | 120 | ||
121 | KOViewManager *viewManager(); | 121 | KOViewManager *viewManager(); |
122 | KODialogManager *dialogManager(); | 122 | KODialogManager *dialogManager(); |
123 | 123 | ||
124 | QDate startDate(); | 124 | QDate startDate(); |
125 | QDate endDate(); | 125 | QDate endDate(); |
126 | 126 | ||
127 | QWidgetStack *viewStack(); | 127 | QWidgetStack *viewStack(); |
128 | QWidget *leftFrame(); | 128 | QWidget *leftFrame(); |
129 | 129 | ||
130 | DateNavigator *dateNavigator(); | 130 | DateNavigator *dateNavigator(); |
131 | KDateNavigator *dateNavigatorWidget(); | 131 | KDateNavigator *dateNavigatorWidget(); |
132 | 132 | ||
133 | void addView(KOrg::BaseView *); | 133 | void addView(KOrg::BaseView *); |
134 | void showView(KOrg::BaseView *); | 134 | void showView(KOrg::BaseView *); |
135 | KOEventViewerDialog* getEventViewerDialog(); | 135 | KOEventViewerDialog* getEventViewerDialog(); |
136 | Incidence *currentSelection(); | 136 | Incidence *currentSelection(); |
137 | 137 | ||
138 | signals: | 138 | signals: |
139 | void save (); | 139 | void save (); |
140 | void saveStopTimer (); | 140 | void saveStopTimer (); |
141 | void tempDisableBR(bool); | 141 | void tempDisableBR(bool); |
142 | /** This todo has been modified */ | 142 | /** This todo has been modified */ |
143 | void todoModified(Todo *, int); | 143 | void todoModified(Todo *, int); |
144 | 144 | ||
145 | /** when change is made to options dialog, the topwidget will catch this | 145 | /** when change is made to options dialog, the topwidget will catch this |
146 | * and emit this signal which notifies all widgets which have registered | 146 | * and emit this signal which notifies all widgets which have registered |
147 | * for notification to update their settings. */ | 147 | * for notification to update their settings. */ |
148 | void configChanged(); | 148 | void configChanged(); |
149 | /** emitted when the topwidget is closing down, so that any attached | 149 | /** emitted when the topwidget is closing down, so that any attached |
150 | child windows can also close. */ | 150 | child windows can also close. */ |
151 | void closingDown(); | 151 | void closingDown(); |
152 | /** emitted right before we die */ | 152 | /** emitted right before we die */ |
153 | void closed(QWidget *); | 153 | void closed(QWidget *); |
154 | 154 | ||
155 | /** Emitted when state of modified flag changes */ | 155 | /** Emitted when state of modified flag changes */ |
156 | void modifiedChanged(bool); | 156 | void modifiedChanged(bool); |
157 | void signalmodified(); | 157 | void signalmodified(); |
158 | 158 | ||
159 | /** Emitted when state of read-only flag changes */ | 159 | /** Emitted when state of read-only flag changes */ |
160 | void readOnlyChanged(bool); | 160 | void readOnlyChanged(bool); |
161 | 161 | ||
162 | /** Emitted when the unit of navigation changes */ | 162 | /** Emitted when the unit of navigation changes */ |
163 | void changeNavStringPrev(const QString &); | 163 | void changeNavStringPrev(const QString &); |
164 | void changeNavStringNext(const QString &); | 164 | void changeNavStringNext(const QString &); |
165 | 165 | ||
166 | /** Emitted when state of events selection has changed and user is organizer*/ | 166 | /** Emitted when state of events selection has changed and user is organizer*/ |
167 | void organizerEventsSelected(bool); | 167 | void organizerEventsSelected(bool); |
168 | /** Emitted when state of events selection has changed and user is attendee*/ | 168 | /** Emitted when state of events selection has changed and user is attendee*/ |
169 | void groupEventsSelected(bool); | 169 | void groupEventsSelected(bool); |
170 | /** | 170 | /** |
171 | Emitted when an incidence gets selected. If the selection is cleared the | 171 | Emitted when an incidence gets selected. If the selection is cleared the |
172 | signal is emitted with 0 as argument. | 172 | signal is emitted with 0 as argument. |
173 | */ | 173 | */ |
174 | void incidenceSelected( Incidence * ); | 174 | void incidenceSelected( Incidence * ); |
175 | /** Emitted, when a todoitem is selected or deselected. */ | 175 | /** Emitted, when a todoitem is selected or deselected. */ |
176 | void todoSelected( bool ); | 176 | void todoSelected( bool ); |
177 | 177 | ||
178 | /** | 178 | /** |
179 | Emitted, when clipboard content changes. Parameter indicates if paste | 179 | Emitted, when clipboard content changes. Parameter indicates if paste |
180 | is possible or not. | 180 | is possible or not. |
181 | */ | 181 | */ |
182 | void pasteEnabled(bool); | 182 | void pasteEnabled(bool); |
183 | 183 | ||
184 | /** Emitted, when the number of incoming messages has changed. */ | 184 | /** Emitted, when the number of incoming messages has changed. */ |
185 | void numIncomingChanged(int); | 185 | void numIncomingChanged(int); |
186 | 186 | ||
187 | /** Emitted, when the number of outgoing messages has changed. */ | 187 | /** Emitted, when the number of outgoing messages has changed. */ |
188 | void numOutgoingChanged(int); | 188 | void numOutgoingChanged(int); |
189 | 189 | ||
190 | /** Send status message, which can e.g. be displayed in the status bar. */ | 190 | /** Send status message, which can e.g. be displayed in the status bar. */ |
191 | void statusMessage(const QString &); | 191 | void statusMessage(const QString &); |
192 | 192 | ||
193 | void calendarViewExpanded( bool ); | 193 | void calendarViewExpanded( bool ); |
194 | void updateSearchDialog(); | 194 | void updateSearchDialog(); |
195 | 195 | ||
196 | 196 | ||
197 | public slots: | 197 | public slots: |
198 | void checkAlarms(); | 198 | void checkAlarms(); |
199 | void slotprintSelInc(); | 199 | void slotprintSelInc(); |
200 | void showNextAlarms(); | 200 | void showNextAlarms(); |
201 | void showOpenError(); | 201 | void showOpenError(); |
202 | void watchSavedFile(); | 202 | void watchSavedFile(); |
203 | void recheckTimerAlarm(); | 203 | void recheckTimerAlarm(); |
204 | void checkNextTimerAlarm(); | 204 | void checkNextTimerAlarm(); |
205 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 205 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
206 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); | 206 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); |
207 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 207 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
208 | 208 | ||
209 | /** options dialog made a changed to the configuration. we catch this | 209 | /** options dialog made a changed to the configuration. we catch this |
210 | * and notify all widgets which need to update their configuration. */ | 210 | * and notify all widgets which need to update their configuration. */ |
211 | void updateConfig(); | 211 | void updateConfig(); |
212 | 212 | ||
213 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, | 213 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, |
214 | const QStringList& anniversaryList, const QStringList& realNameList, | 214 | const QStringList& anniversaryList, const QStringList& realNameList, |
215 | const QStringList& emailList, const QStringList& assembledNameList, | 215 | const QStringList& emailList, const QStringList& assembledNameList, |
216 | const QStringList& uidList); | 216 | const QStringList& uidList); |
217 | 217 | ||
218 | /** | 218 | /** |
219 | Load calendar from file \a filename. If \a merge is true, load | 219 | Load calendar from file \a filename. If \a merge is true, load |
220 | calendar into existing one, if it is false, clear calendar, before | 220 | calendar into existing one, if it is false, clear calendar, before |
221 | loading. Return true, if calendar could be successfully loaded. | 221 | loading. Return true, if calendar could be successfully loaded. |
222 | */ | 222 | */ |
223 | bool openCalendar(QString filename, bool merge=false); | 223 | bool openCalendar(QString filename, bool merge=false); |
224 | bool syncCalendar(QString filename,int mode = 0 ); | 224 | bool syncCalendar(QString filename,int mode = 0 ); |
225 | 225 | ||
226 | /** | 226 | /** |
227 | Save calendar data to file. Return true if calendar could be | 227 | Save calendar data to file. Return true if calendar could be |
228 | successfully saved. | 228 | successfully saved. |
229 | */ | 229 | */ |
230 | bool saveCalendar(QString filename); | 230 | bool saveCalendar(QString filename); |
231 | 231 | ||
232 | /** | 232 | /** |
233 | Close calendar. Clear calendar data and reset views to display an empty | 233 | Close calendar. Clear calendar data and reset views to display an empty |
234 | calendar. | 234 | calendar. |
235 | */ | 235 | */ |
236 | void closeCalendar(); | 236 | void closeCalendar(); |
237 | 237 | ||
238 | /** Archive old events of calendar */ | 238 | /** Archive old events of calendar */ |
239 | void archiveCalendar(); | 239 | void archiveCalendar(); |
240 | 240 | ||
241 | void showIncidence(); | 241 | void showIncidence(); |
242 | void editIncidence(); | 242 | void editIncidence(); |
243 | void editIncidenceDescription(); | 243 | void editIncidenceDescription(); |
244 | void deleteIncidence(); | 244 | void deleteIncidence(); |
245 | void cloneIncidence(); | 245 | void cloneIncidence(); |
246 | void moveIncidence(); | 246 | void moveIncidence(); |
247 | void beamIncidence(); | 247 | void beamIncidence(); |
248 | void toggleCancelIncidence(); | 248 | void toggleCancelIncidence(); |
249 | 249 | ||
250 | /** create an editeventwin with supplied date/time, and if bool is true, | 250 | /** create an editeventwin with supplied date/time, and if bool is true, |
251 | * make the event take all day. */ | 251 | * make the event take all day. */ |
252 | void newEvent(QDateTime, QDateTime, bool allDay ); | 252 | void newEvent(QDateTime, QDateTime, bool allDay ); |
253 | void newEvent(QDateTime, QDateTime); | 253 | void newEvent(QDateTime, QDateTime); |
254 | void newEvent(QDateTime fh); | 254 | void newEvent(QDateTime fh); |
255 | void newEvent(QDate dt); | 255 | void newEvent(QDate dt); |
256 | /** create new event without having a date hint. Takes current date as | 256 | /** create new event without having a date hint. Takes current date as |
257 | default hint. */ | 257 | default hint. */ |
258 | void newEvent(); | 258 | void newEvent(); |
259 | void newFloatingEvent(); | 259 | void newFloatingEvent(); |
260 | 260 | ||
261 | /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ | 261 | /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ |
262 | void showIncidence(Incidence *); | 262 | void showIncidence(Incidence *); |
263 | void showIncidence(QString uid); | 263 | void showIncidence(QString uid); |
264 | /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ | 264 | /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ |
265 | void editIncidence(Incidence *); | 265 | void editIncidence(Incidence *); |
266 | /** Delete the supplied incidence. It calls the correct deleteXXX method*/ | 266 | /** Delete the supplied incidence. It calls the correct deleteXXX method*/ |
267 | void deleteIncidence(Incidence *); | 267 | void deleteIncidence(Incidence *); |
268 | void cloneIncidence(Incidence *); | 268 | void cloneIncidence(Incidence *); |
269 | void cancelIncidence(Incidence *); | 269 | void cancelIncidence(Incidence *); |
270 | /** Create an editor for the supplied event. */ | 270 | /** Create an editor for the supplied event. */ |
271 | void editEvent(Event *); | 271 | void editEvent(Event *); |
272 | /** Delete the supplied event. */ | 272 | /** Delete the supplied event. */ |
273 | void deleteEvent(Event *); | 273 | void deleteEvent(Event *); |
274 | /** Delete the event with the given unique ID. Returns false, if event wasn't | 274 | /** Delete the event with the given unique ID. Returns false, if event wasn't |
275 | found. */ | 275 | found. */ |
276 | bool deleteEvent(const QString &uid); | 276 | bool deleteEvent(const QString &uid); |
277 | /** Create a read-only viewer dialog for the supplied event. */ | 277 | /** Create a read-only viewer dialog for the supplied event. */ |
278 | void showEvent(Event *); | 278 | void showEvent(Event *); |
279 | 279 | ||
280 | void editJournal(Journal *); | 280 | void editJournal(Journal *); |
281 | void showJournal(Journal *); | 281 | void showJournal(Journal *); |
282 | void deleteJournal(Journal *); | 282 | void deleteJournal(Journal *); |
283 | /** Create an editor dialog for a todo */ | 283 | /** Create an editor dialog for a todo */ |
284 | void editTodo(Todo *); | 284 | void editTodo(Todo *); |
285 | /** Create a read-only viewer dialog for the supplied todo */ | 285 | /** Create a read-only viewer dialog for the supplied todo */ |
286 | void showTodo(Todo *); | 286 | void showTodo(Todo *); |
287 | /** create new todo */ | 287 | /** create new todo */ |
288 | void newTodo(); | 288 | void newTodo(); |
289 | void newTodoDateTime(QDateTime, bool allday); | 289 | void newTodoDateTime(QDateTime, bool allday); |
290 | /** create new todo with a parent todo */ | 290 | /** create new todo with a parent todo */ |
291 | void newSubTodo(); | 291 | void newSubTodo(); |
292 | /** create new todo with a parent todo */ | 292 | /** create new todo with a parent todo */ |
293 | void newSubTodo(Todo *); | 293 | void newSubTodo(Todo *); |
294 | /** Delete todo */ | 294 | /** Delete todo */ |
295 | void deleteTodo(Todo *); | 295 | void deleteTodo(Todo *); |
296 | 296 | ||
297 | 297 | ||
298 | /** Check if clipboard contains vCalendar event. The signal pasteEnabled() is | 298 | /** Check if clipboard contains vCalendar event. The signal pasteEnabled() is |
299 | * emitted as result. */ | 299 | * emitted as result. */ |
300 | void checkClipboard(); | 300 | void checkClipboard(); |
301 | 301 | ||
302 | /** using the KConfig associated with the kapp variable, read in the | 302 | /** using the KConfig associated with the kapp variable, read in the |
303 | * settings from the config file. | 303 | * settings from the config file. |
304 | */ | 304 | */ |
305 | void readSettings(); | 305 | void readSettings(); |
306 | 306 | ||
307 | /** write current state to config file. */ | 307 | /** write current state to config file. */ |
308 | void writeSettings(); | 308 | void writeSettings(); |
309 | 309 | ||
310 | /** read settings for calendar filters */ | 310 | /** read settings for calendar filters */ |
311 | void readFilterSettings(KConfig *config); | 311 | void readFilterSettings(KConfig *config); |
312 | 312 | ||
313 | /** write settings for calendar filters */ | 313 | /** write settings for calendar filters */ |
314 | void writeFilterSettings(KConfig *config); | 314 | void writeFilterSettings(KConfig *config); |
315 | 315 | ||
316 | /** passes on the message that an event has changed to the currently | 316 | /** passes on the message that an event has changed to the currently |
317 | * activated view so that it can make appropriate display changes. */ | 317 | * activated view so that it can make appropriate display changes. */ |
318 | void changeEventDisplay(Event *, int); | 318 | void changeEventDisplay(Event *, int); |
319 | void changeIncidenceDisplay(Incidence *, int); | 319 | void changeIncidenceDisplay(Incidence *, int); |
320 | void changeTodoDisplay(Todo *, int); | 320 | void changeTodoDisplay(Todo *, int); |
321 | 321 | ||
322 | void eventAdded(Event *); | 322 | void eventAdded(Event *); |
323 | void eventChanged(Event *); | 323 | void eventChanged(Event *); |
324 | void eventToBeDeleted(Event *); | 324 | void eventToBeDeleted(Event *); |
325 | void eventDeleted(); | 325 | void eventDeleted(); |
326 | 326 | ||
327 | void todoAdded(Todo *); | 327 | void todoAdded(Todo *); |
328 | void todoChanged(Todo *); | 328 | void todoChanged(Todo *); |
329 | void todoToBeDeleted(Todo *); | 329 | void todoToBeDeleted(Todo *); |
330 | void todoDeleted(); | 330 | void todoDeleted(); |
331 | 331 | ||
332 | void updateView(const QDate &start, const QDate &end); | 332 | void updateView(const QDate &start, const QDate &end); |
333 | void updateView(); | 333 | void updateView(); |
334 | void clearAllViews(); | 334 | void clearAllViews(); |
335 | 335 | ||
336 | /** Full update of visible todo views */ | 336 | /** Full update of visible todo views */ |
337 | void updateTodoViews(); | 337 | void updateTodoViews(); |
338 | 338 | ||
339 | void updateUnmanagedViews(); | 339 | void updateUnmanagedViews(); |
340 | 340 | ||
341 | /** cut the current appointment to the clipboard */ | 341 | /** cut the current appointment to the clipboard */ |
342 | void edit_cut(); | 342 | void edit_cut(); |
343 | 343 | ||
344 | /** copy the current appointment(s) to the clipboard */ | 344 | /** copy the current appointment(s) to the clipboard */ |
345 | void edit_copy(); | 345 | void edit_copy(); |
346 | 346 | ||
347 | /** paste the current vobject(s) in the clipboard buffer into calendar */ | 347 | /** paste the current vobject(s) in the clipboard buffer into calendar */ |
348 | void edit_paste(); | 348 | void edit_paste(); |
349 | 349 | ||
350 | /** edit viewing and configuration options. */ | 350 | /** edit viewing and configuration options. */ |
351 | void edit_options(); | 351 | void edit_options(); |
352 | void edit_global_options(); | ||
352 | /** | 353 | /** |
353 | Functions for printing, previewing a print, and setting up printing | 354 | Functions for printing, previewing a print, and setting up printing |
354 | parameters. | 355 | parameters. |
355 | */ | 356 | */ |
356 | void print(); | 357 | void print(); |
357 | void printSetup(); | 358 | void printSetup(); |
358 | void printPreview(); | 359 | void printPreview(); |
359 | 360 | ||
360 | /** Export as iCalendar file */ | 361 | /** Export as iCalendar file */ |
361 | void exportICalendar(); | 362 | void exportICalendar(); |
362 | 363 | ||
363 | /** Export as vCalendar file */ | 364 | /** Export as vCalendar file */ |
364 | bool exportVCalendar( QString fn); | 365 | bool exportVCalendar( QString fn); |
365 | 366 | ||
366 | /** pop up a dialog to show an existing appointment. */ | 367 | /** pop up a dialog to show an existing appointment. */ |
367 | void appointment_show(); | 368 | void appointment_show(); |
368 | /** | 369 | /** |
369 | * pop up an Appointment Dialog to edit an existing appointment.Get | 370 | * pop up an Appointment Dialog to edit an existing appointment.Get |
370 | * information on the appointment from the list of unique IDs that is | 371 | * information on the appointment from the list of unique IDs that is |
371 | * currently in the View, called currIds. | 372 | * currently in the View, called currIds. |
372 | */ | 373 | */ |
373 | void appointment_edit(); | 374 | void appointment_edit(); |
374 | /** | 375 | /** |
375 | * pop up dialog confirming deletion of currently selected event in the | 376 | * pop up dialog confirming deletion of currently selected event in the |
376 | * View. | 377 | * View. |
377 | */ | 378 | */ |
378 | void appointment_delete(); | 379 | void appointment_delete(); |
379 | 380 | ||
380 | /** mails the currently selected event to a particular user as a vCalendar | 381 | /** mails the currently selected event to a particular user as a vCalendar |
381 | attachment. */ | 382 | attachment. */ |
382 | void action_mail(); | 383 | void action_mail(); |
383 | 384 | ||
384 | /* frees a subtodo from it's relation */ | 385 | /* frees a subtodo from it's relation */ |
385 | void todo_unsub( Todo * ); | 386 | void todo_unsub( Todo * ); |
386 | void todo_resub( Todo * parent, Todo * sub ); | 387 | void todo_resub( Todo * parent, Todo * sub ); |
387 | 388 | ||
388 | /** Take ownership of selected event. */ | 389 | /** Take ownership of selected event. */ |
389 | void takeOverEvent(); | 390 | void takeOverEvent(); |
390 | 391 | ||
391 | /** Take ownership of all events in calendar. */ | 392 | /** Take ownership of all events in calendar. */ |
392 | void takeOverCalendar(); | 393 | void takeOverCalendar(); |
393 | 394 | ||
394 | /** query whether or not the calendar is "dirty". */ | 395 | /** query whether or not the calendar is "dirty". */ |
395 | bool isModified(); | 396 | bool isModified(); |
396 | /** set the state of calendar. Modified means "dirty", i.e. needing a save. */ | 397 | /** set the state of calendar. Modified means "dirty", i.e. needing a save. */ |
397 | void setModified(bool modified=true); | 398 | void setModified(bool modified=true); |
398 | 399 | ||
399 | /** query if the calendar is read-only. */ | 400 | /** query if the calendar is read-only. */ |
400 | bool isReadOnly(); | 401 | bool isReadOnly(); |
401 | /** set state of calendar to read-only */ | 402 | /** set state of calendar to read-only */ |
402 | void setReadOnly(bool readOnly=true); | 403 | void setReadOnly(bool readOnly=true); |
403 | 404 | ||
404 | void eventUpdated(Incidence *); | 405 | void eventUpdated(Incidence *); |
405 | 406 | ||
406 | /* iTIP scheduling actions */ | 407 | /* iTIP scheduling actions */ |
407 | void schedule_publish(Incidence *incidence = 0); | 408 | void schedule_publish(Incidence *incidence = 0); |
408 | void schedule_request(Incidence *incidence = 0); | 409 | void schedule_request(Incidence *incidence = 0); |
409 | void schedule_refresh(Incidence *incidence = 0); | 410 | void schedule_refresh(Incidence *incidence = 0); |
410 | void schedule_cancel(Incidence *incidence = 0); | 411 | void schedule_cancel(Incidence *incidence = 0); |
411 | void schedule_add(Incidence *incidence = 0); | 412 | void schedule_add(Incidence *incidence = 0); |
412 | void schedule_reply(Incidence *incidence = 0); | 413 | void schedule_reply(Incidence *incidence = 0); |
413 | void schedule_counter(Incidence *incidence = 0); | 414 | void schedule_counter(Incidence *incidence = 0); |
414 | void schedule_declinecounter(Incidence *incidence = 0); | 415 | void schedule_declinecounter(Incidence *incidence = 0); |
415 | void schedule_publish_freebusy(int daysToPublish = 30); | 416 | void schedule_publish_freebusy(int daysToPublish = 30); |
416 | 417 | ||
417 | void openAddressbook(); | 418 | void openAddressbook(); |
418 | 419 | ||
419 | void editFilters(); | 420 | void editFilters(); |
420 | void toggleFilerEnabled(); | 421 | void toggleFilerEnabled(); |
421 | QPtrList<CalFilter> filters(); | 422 | QPtrList<CalFilter> filters(); |
422 | void toggleFilter(); | 423 | void toggleFilter(); |
423 | void showFilter(bool visible); | 424 | void showFilter(bool visible); |
424 | void updateFilter(); | 425 | void updateFilter(); |
425 | void filterEdited(); | 426 | void filterEdited(); |
426 | void selectFilter( int ); | 427 | void selectFilter( int ); |
427 | KOFilterView *filterView(); | 428 | KOFilterView *filterView(); |
428 | 429 | ||
429 | void showIntro(); | 430 | void showIntro(); |
430 | 431 | ||
431 | /** Move the curdatepient view date to today */ | 432 | /** Move the curdatepient view date to today */ |
432 | void goToday(); | 433 | void goToday(); |
433 | 434 | ||
434 | /** Move to the next date(s) in the current view */ | 435 | /** Move to the next date(s) in the current view */ |
435 | void goNext(); | 436 | void goNext(); |
436 | 437 | ||
437 | /** Move to the previous date(s) in the current view */ | 438 | /** Move to the previous date(s) in the current view */ |
438 | void goPrevious(); | 439 | void goPrevious(); |
439 | /** Move to the next date(s) in the current view */ | 440 | /** Move to the next date(s) in the current view */ |
440 | void goNextMonth(); | 441 | void goNextMonth(); |
441 | 442 | ||
442 | /** Move to the previous date(s) in the current view */ | 443 | /** Move to the previous date(s) in the current view */ |
443 | void goPreviousMonth(); | 444 | void goPreviousMonth(); |
444 | 445 | ||
445 | void toggleExpand(); | 446 | void toggleExpand(); |
446 | void toggleDateNavigatorWidget(); | 447 | void toggleDateNavigatorWidget(); |
447 | void toggleAllDaySize(); | 448 | void toggleAllDaySize(); |
448 | void dialogClosing(Incidence *); | 449 | void dialogClosing(Incidence *); |
449 | 450 | ||
450 | /** Look for new messages in the inbox */ | 451 | /** Look for new messages in the inbox */ |
451 | void lookForIncomingMessages(); | 452 | void lookForIncomingMessages(); |
452 | /** Look for new messages in the outbox */ | 453 | /** Look for new messages in the outbox */ |
453 | void lookForOutgoingMessages(); | 454 | void lookForOutgoingMessages(); |
454 | 455 | ||
455 | void processMainViewSelection( Incidence * ); | 456 | void processMainViewSelection( Incidence * ); |
456 | void processTodoListSelection( Incidence * ); | 457 | void processTodoListSelection( Incidence * ); |
457 | 458 | ||
458 | void processIncidenceSelection( Incidence * ); | 459 | void processIncidenceSelection( Incidence * ); |
459 | 460 | ||
460 | void purgeCompleted(); | 461 | void purgeCompleted(); |
461 | bool removeCompletedSubTodos( Todo* ); | 462 | bool removeCompletedSubTodos( Todo* ); |
462 | void slotCalendarChanged(); | 463 | void slotCalendarChanged(); |
463 | bool importBday(); | 464 | bool importBday(); |
464 | bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); | 465 | bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); |
465 | bool importQtopia( const QString &categoriesFile, | 466 | bool importQtopia( const QString &categoriesFile, |
466 | const QString &datebookFile, | 467 | const QString &datebookFile, |
467 | const QString &tasklistFile ); | 468 | const QString &tasklistFile ); |
468 | void syncExternal( int mode ); | 469 | void syncExternal( int mode ); |
469 | void slotSelectPickerDate( QDate ) ; | 470 | void slotSelectPickerDate( QDate ) ; |
470 | void showDatePicker() ; | 471 | void showDatePicker() ; |
471 | void showDatePickerPopup() ; | 472 | void showDatePickerPopup() ; |
472 | void moveIncidence(Incidence *) ; | 473 | void moveIncidence(Incidence *) ; |
473 | void beamIncidence(Incidence *) ; | 474 | void beamIncidence(Incidence *) ; |
474 | void beamCalendar() ; | 475 | void beamCalendar() ; |
475 | void beamFilteredCalendar() ; | 476 | void beamFilteredCalendar() ; |
476 | void beamIncidenceList(QPtrList<Incidence>) ; | 477 | void beamIncidenceList(QPtrList<Incidence>) ; |
477 | void manageCategories(); | 478 | void manageCategories(); |
478 | int addCategories(); | 479 | int addCategories(); |
479 | void removeCategories(); | 480 | void removeCategories(); |
480 | void setSyncDevice( QString ); | 481 | void setSyncDevice( QString ); |
481 | void setSyncName( QString ); | 482 | void setSyncName( QString ); |
482 | void showDay( QDate ); | 483 | void showDay( QDate ); |
483 | void undo_delete(); | 484 | void undo_delete(); |
484 | protected slots: | 485 | protected slots: |
485 | void resetFocus(); | 486 | void resetFocus(); |
486 | void slotViewerClosed(); | 487 | void slotViewerClosed(); |
487 | void timerAlarm(); | 488 | void timerAlarm(); |
488 | void suspendAlarm(); | 489 | void suspendAlarm(); |
489 | void beamDone( Ir *ir ); | 490 | void beamDone( Ir *ir ); |
490 | /** Select a view or adapt the current view to display the specified dates. */ | 491 | /** Select a view or adapt the current view to display the specified dates. */ |
491 | void showDates( const KCal::DateList & ); | 492 | void showDates( const KCal::DateList & ); |
492 | void selectWeekNum ( int ); | 493 | void selectWeekNum ( int ); |
493 | 494 | ||
494 | public: | 495 | public: |
495 | // show a standard warning | 496 | // show a standard warning |
496 | // returns KMsgBox::yesNoCancel() | 497 | // returns KMsgBox::yesNoCancel() |
497 | int msgCalModified(); | 498 | int msgCalModified(); |
498 | virtual bool sync(KSyncManager* manager, QString filename, int mode); | 499 | virtual bool sync(KSyncManager* manager, QString filename, int mode); |
499 | 500 | ||
500 | virtual bool syncExternal(KSyncManager* manager, QString resource); | 501 | virtual bool syncExternal(KSyncManager* manager, QString resource); |
501 | virtual void removeSyncInfo( QString syncProfile); | 502 | virtual void removeSyncInfo( QString syncProfile); |
502 | void setSyncManager(KSyncManager* manager); | 503 | void setSyncManager(KSyncManager* manager); |
503 | void setLoadedFileVersion(QDateTime); | 504 | void setLoadedFileVersion(QDateTime); |
504 | bool checkFileVersion(QString fn); | 505 | bool checkFileVersion(QString fn); |
505 | bool checkFileChanged(QString fn); | 506 | bool checkFileChanged(QString fn); |
506 | Event* getLastSyncEvent(); | 507 | Event* getLastSyncEvent(); |
507 | /** Adapt navigation units correpsonding to step size of navigation of the | 508 | /** Adapt navigation units correpsonding to step size of navigation of the |
508 | * current view. | 509 | * current view. |
509 | */ | 510 | */ |
510 | void adaptNavigationUnits(); | 511 | void adaptNavigationUnits(); |
511 | bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); | 512 | bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); |
512 | int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); | 513 | int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); |
513 | //Attendee* getYourAttendee(Event *event); | 514 | //Attendee* getYourAttendee(Event *event); |
514 | void setBlockShowDates( bool b ) { mBlockShowDates = b ;} | 515 | void setBlockShowDates( bool b ) { mBlockShowDates = b ;} |
515 | protected: | 516 | protected: |
516 | void schedule(Scheduler::Method, Incidence *incidence = 0); | 517 | void schedule(Scheduler::Method, Incidence *incidence = 0); |
517 | 518 | ||
518 | // returns KMsgBox::OKCandel() | 519 | // returns KMsgBox::OKCandel() |
519 | int msgItemDelete(const QString name); | 520 | int msgItemDelete(const QString name); |
520 | void showEventEditor(); | 521 | void showEventEditor(); |
521 | void showTodoEditor(); | 522 | void showTodoEditor(); |
522 | void writeLocale(); | 523 | void writeLocale(); |
523 | Todo *selectedTodo(); | 524 | Todo *selectedTodo(); |
524 | 525 | ||
525 | private: | 526 | private: |
526 | QDateTime mNextAlarmDateTime; | 527 | QDateTime mNextAlarmDateTime; |
527 | bool mViewerCallerIsSearchDialog; | 528 | bool mViewerCallerIsSearchDialog; |
528 | bool mBlockShowDates; | 529 | bool mBlockShowDates; |
529 | KSyncManager* mSyncManager; | 530 | KSyncManager* mSyncManager; |
530 | AlarmDialog * mAlarmDialog; | 531 | AlarmDialog * mAlarmDialog; |
531 | QString mAlarmNotification; | 532 | QString mAlarmNotification; |
532 | QString mSuspendAlarmNotification; | 533 | QString mSuspendAlarmNotification; |
533 | QTimer* mSuspendTimer; | 534 | QTimer* mSuspendTimer; |
534 | QTimer* mAlarmTimer; | 535 | QTimer* mAlarmTimer; |
535 | QTimer* mRecheckAlarmTimer; | 536 | QTimer* mRecheckAlarmTimer; |
536 | void computeAlarm( QString ); | 537 | void computeAlarm( QString ); |
537 | void startAlarm( QString, QString ); | 538 | void startAlarm( QString, QString ); |
538 | void setSyncEventsReadOnly(); | 539 | void setSyncEventsReadOnly(); |
539 | 540 | ||
540 | QDateTime loadedFileVersion; | 541 | QDateTime loadedFileVersion; |
541 | void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); | 542 | void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); |
542 | void checkExternalId( Incidence * inc ); | 543 | void checkExternalId( Incidence * inc ); |
543 | int mGlobalSyncMode; | 544 | int mGlobalSyncMode; |
544 | QString mCurrentSyncDevice; | 545 | QString mCurrentSyncDevice; |
545 | QString mCurrentSyncName; | 546 | QString mCurrentSyncName; |
546 | KOBeamPrefs* beamDialog; | 547 | KOBeamPrefs* beamDialog; |
547 | void init(); | 548 | void init(); |
548 | int mDatePickerMode; | 549 | int mDatePickerMode; |
549 | bool mFlagEditDescription; | 550 | bool mFlagEditDescription; |
550 | QDateTime mLastCalendarSync; | 551 | QDateTime mLastCalendarSync; |
551 | void createPrinter(); | 552 | void createPrinter(); |
552 | 553 | ||
553 | void calendarModified( bool, Calendar * ); | 554 | void calendarModified( bool, Calendar * ); |
554 | 555 | ||
555 | CalPrinter *mCalPrinter; | 556 | CalPrinter *mCalPrinter; |
556 | 557 | ||
557 | QSplitter *mPanner; | 558 | QSplitter *mPanner; |
558 | QSplitter *mLeftSplitter; | 559 | QSplitter *mLeftSplitter; |
559 | KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; | 560 | KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; |
560 | QWidgetStack *mRightFrame; | 561 | QWidgetStack *mRightFrame; |
561 | 562 | ||
562 | KDatePicker* mDatePicker; | 563 | KDatePicker* mDatePicker; |
563 | QVBox* mDateFrame; | 564 | QVBox* mDateFrame; |
564 | 565 | ||
565 | DateNavigatorContainer *mDateNavigator; // widget showing small month view. | 566 | DateNavigatorContainer *mDateNavigator; // widget showing small month view. |
566 | 567 | ||
567 | KOFilterView *mFilterView; | 568 | KOFilterView *mFilterView; |
568 | 569 | ||
569 | ResourceView *mResourceView; | 570 | ResourceView *mResourceView; |
570 | 571 | ||
571 | // calendar object for this viewing instance | 572 | // calendar object for this viewing instance |
572 | Calendar *mCalendar; | 573 | Calendar *mCalendar; |
573 | 574 | ||
574 | CalendarResourceManager *mResourceManager; | 575 | CalendarResourceManager *mResourceManager; |
575 | 576 | ||
576 | FileStorage *mStorage; | 577 | FileStorage *mStorage; |
577 | 578 | ||
578 | DateNavigator *mNavigator; | 579 | DateNavigator *mNavigator; |
579 | 580 | ||
580 | KOViewManager *mViewManager; | 581 | KOViewManager *mViewManager; |
581 | KODialogManager *mDialogManager; | 582 | KODialogManager *mDialogManager; |
582 | 583 | ||
583 | // Calendar filters | 584 | // Calendar filters |
584 | QPtrList<CalFilter> mFilters; | 585 | QPtrList<CalFilter> mFilters; |
585 | 586 | ||
586 | // various housekeeping variables. | 587 | // various housekeeping variables. |
587 | bool mModified; // flag indicating if calendar is modified | 588 | bool mModified; // flag indicating if calendar is modified |
588 | bool mReadOnly; // flag indicating if calendar is read-only | 589 | bool mReadOnly; // flag indicating if calendar is read-only |
589 | QDate mSaveSingleDate; | 590 | QDate mSaveSingleDate; |
590 | 591 | ||
591 | Incidence *mSelectedIncidence; | 592 | Incidence *mSelectedIncidence; |
592 | Incidence *mMoveIncidence; | 593 | Incidence *mMoveIncidence; |
593 | QDate mMoveIncidenceOldDate; | 594 | QDate mMoveIncidenceOldDate; |
594 | KOTodoView *mTodoList; | 595 | KOTodoView *mTodoList; |
595 | KOEventEditor * mEventEditor; | 596 | KOEventEditor * mEventEditor; |
596 | KOTodoEditor * mTodoEditor; | 597 | KOTodoEditor * mTodoEditor; |
597 | KOEventViewerDialog * mEventViewerDialog; | 598 | KOEventViewerDialog * mEventViewerDialog; |
598 | void keyPressEvent ( QKeyEvent *e) ; | 599 | void keyPressEvent ( QKeyEvent *e) ; |
599 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; | 600 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; |
600 | }; | 601 | }; |
601 | 602 | ||
602 | 603 | ||
603 | class CalendarViewVisitor : public Incidence::Visitor | 604 | class CalendarViewVisitor : public Incidence::Visitor |
604 | { | 605 | { |
605 | public: | 606 | public: |
606 | CalendarViewVisitor() : mView( 0 ) {} | 607 | CalendarViewVisitor() : mView( 0 ) {} |
607 | 608 | ||
608 | bool act( Incidence *incidence, CalendarView *view ) | 609 | bool act( Incidence *incidence, CalendarView *view ) |
609 | { | 610 | { |
610 | mView = view; | 611 | mView = view; |
611 | return incidence->accept( *this ); | 612 | return incidence->accept( *this ); |
612 | } | 613 | } |
613 | 614 | ||
614 | protected: | 615 | protected: |
615 | CalendarView *mView; | 616 | CalendarView *mView; |
616 | }; | 617 | }; |
617 | 618 | ||
618 | class ShowIncidenceVisitor : public CalendarViewVisitor | 619 | class ShowIncidenceVisitor : public CalendarViewVisitor |
619 | { | 620 | { |
620 | protected: | 621 | protected: |
621 | bool visit( Event *event ) { mView->showEvent( event ); return true; } | 622 | bool visit( Event *event ) { mView->showEvent( event ); return true; } |
622 | bool visit( Todo *todo ) { mView->showTodo( todo ); return true; } | 623 | bool visit( Todo *todo ) { mView->showTodo( todo ); return true; } |
623 | bool visit( Journal * j ) { mView->showJournal( j );return true; } | 624 | bool visit( Journal * j ) { mView->showJournal( j );return true; } |
624 | }; | 625 | }; |
625 | 626 | ||
626 | class EditIncidenceVisitor : public CalendarViewVisitor | 627 | class EditIncidenceVisitor : public CalendarViewVisitor |
627 | { | 628 | { |
628 | protected: | 629 | protected: |
629 | bool visit( Event *event ) { mView->editEvent( event ); return true; } | 630 | bool visit( Event *event ) { mView->editEvent( event ); return true; } |
630 | bool visit( Todo *todo ) { mView->editTodo( todo ); return true; } | 631 | bool visit( Todo *todo ) { mView->editTodo( todo ); return true; } |
631 | bool visit( Journal *j ) { mView->editJournal( j); return true; } | 632 | bool visit( Journal *j ) { mView->editJournal( j); return true; } |
632 | }; | 633 | }; |
633 | 634 | ||
634 | class DeleteIncidenceVisitor : public CalendarViewVisitor | 635 | class DeleteIncidenceVisitor : public CalendarViewVisitor |
635 | { | 636 | { |
636 | protected: | 637 | protected: |
637 | bool visit( Event *event ) { mView->deleteEvent( event ); return true; } | 638 | bool visit( Event *event ) { mView->deleteEvent( event ); return true; } |
638 | bool visit( Todo *todo ) { mView->deleteTodo( todo ); return true; } | 639 | bool visit( Todo *todo ) { mView->deleteTodo( todo ); return true; } |
639 | bool visit( Journal * j) {mView->deleteJournal( j ); return true; } | 640 | bool visit( Journal * j) {mView->deleteJournal( j ); return true; } |
640 | }; | 641 | }; |
641 | 642 | ||
642 | #endif | 643 | #endif |
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index c927b37..aa30c52 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp | |||
@@ -1,352 +1,368 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | 3 | ||
4 | Copyright (c) 2001 | 4 | Copyright (c) 2001 |
5 | Cornelius Schumacher <schumacher@kde.org> | 5 | Cornelius Schumacher <schumacher@kde.org> |
6 | 6 | ||
7 | This program is free software; you can redistribute it and/or modify | 7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation; either version 2 of the License, or | 9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. | 10 | (at your option) any later version. |
11 | 11 | ||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the |
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
16 | 16 | ||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software | 18 | along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <libkdepim/categoryeditdialog.h> | 22 | #include <libkdepim/categoryeditdialog.h> |
23 | 23 | ||
24 | #include "calendarview.h" | 24 | #include "calendarview.h" |
25 | #include "incomingdialog.h" | 25 | #include "incomingdialog.h" |
26 | #include "outgoingdialog.h" | 26 | #include "outgoingdialog.h" |
27 | #include "koprefsdialog.h" | 27 | #include "koprefsdialog.h" |
28 | #include "koeventeditor.h" | 28 | #include "koeventeditor.h" |
29 | #include "koprefs.h" | 29 | #include "koprefs.h" |
30 | #include "datenavigator.h" | 30 | #include "datenavigator.h" |
31 | #include "kotodoeditor.h" | 31 | #include "kotodoeditor.h" |
32 | #include "searchdialog.h" | 32 | #include "searchdialog.h" |
33 | #include "filtereditdialog.h" | 33 | #include "filtereditdialog.h" |
34 | #ifndef KORG_NOPLUGINS | 34 | #ifndef KORG_NOPLUGINS |
35 | #include "plugindialog.h" | 35 | #include "plugindialog.h" |
36 | #endif | 36 | #endif |
37 | #ifndef KORG_NOARCHIVE | 37 | #ifndef KORG_NOARCHIVE |
38 | #include "archivedialog.h" | 38 | #include "archivedialog.h" |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #include "kconfig.h" | 41 | #include "kconfig.h" |
42 | #include "kodialogmanager.h" | 42 | #include "kodialogmanager.h" |
43 | #include <kapplication.h> | 43 | #include <kapplication.h> |
44 | 44 | ||
45 | KODialogManager::KODialogManager( CalendarView *mainView ) : | 45 | KODialogManager::KODialogManager( CalendarView *mainView ) : |
46 | QObject(), mMainView( mainView ) | 46 | QObject(), mMainView( mainView ) |
47 | { | 47 | { |
48 | mOutgoingDialog = 0; | 48 | mOutgoingDialog = 0; |
49 | mIncomingDialog = 0; | 49 | mIncomingDialog = 0; |
50 | mOptionsDialog = 0; | 50 | mOptionsDialog = 0; |
51 | mSearchDialog = 0; | 51 | mSearchDialog = 0; |
52 | mArchiveDialog = 0; | 52 | mArchiveDialog = 0; |
53 | mFilterEditDialog = 0; | 53 | mFilterEditDialog = 0; |
54 | mPluginDialog = 0; | 54 | mPluginDialog = 0; |
55 | 55 | ||
56 | // mCategoryEditDialog = new KPIM::CategoryEditDialog(KOPrefs::instance(),mMainView); | 56 | // mCategoryEditDialog = new KPIM::CategoryEditDialog(KOPrefs::instance(),mMainView); |
57 | //KOGlobals::fitDialogToScreen( mCategoryEditDialog ); | 57 | //KOGlobals::fitDialogToScreen( mCategoryEditDialog ); |
58 | } | 58 | } |
59 | 59 | ||
60 | KODialogManager::~KODialogManager() | 60 | KODialogManager::~KODialogManager() |
61 | { | 61 | { |
62 | delete mOutgoingDialog; | 62 | delete mOutgoingDialog; |
63 | delete mIncomingDialog; | 63 | delete mIncomingDialog; |
64 | delete mOptionsDialog; | 64 | delete mOptionsDialog; |
65 | delete mSearchDialog; | 65 | delete mSearchDialog; |
66 | #ifndef KORG_NOARCHIVE | 66 | #ifndef KORG_NOARCHIVE |
67 | delete mArchiveDialog; | 67 | delete mArchiveDialog; |
68 | #endif | 68 | #endif |
69 | delete mFilterEditDialog; | 69 | delete mFilterEditDialog; |
70 | #ifndef KORG_NOPLUGINS | 70 | #ifndef KORG_NOPLUGINS |
71 | delete mPluginDialog; | 71 | delete mPluginDialog; |
72 | #endif | 72 | #endif |
73 | } | 73 | } |
74 | 74 | ||
75 | OutgoingDialog *KODialogManager::outgoingDialog() | 75 | OutgoingDialog *KODialogManager::outgoingDialog() |
76 | { | 76 | { |
77 | createOutgoingDialog(); | 77 | createOutgoingDialog(); |
78 | return mOutgoingDialog; | 78 | return mOutgoingDialog; |
79 | } | 79 | } |
80 | 80 | ||
81 | void KODialogManager::createOutgoingDialog() | 81 | void KODialogManager::createOutgoingDialog() |
82 | { | 82 | { |
83 | if (!mOutgoingDialog) { | 83 | if (!mOutgoingDialog) { |
84 | mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView); | 84 | mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView); |
85 | if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog); | 85 | if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog); |
86 | connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)), | 86 | connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)), |
87 | mMainView,SIGNAL(numOutgoingChanged(int))); | 87 | mMainView,SIGNAL(numOutgoingChanged(int))); |
88 | } | 88 | } |
89 | } | 89 | } |
90 | 90 | ||
91 | void KODialogManager::showGlobalOptionsDialog( bool showSync ) | ||
92 | { | ||
93 | if (!mOptionsDialog) { | ||
94 | mOptionsDialog = new KOPrefsDialog(0); | ||
95 | connect(mOptionsDialog,SIGNAL(configChanged()), | ||
96 | mMainView,SLOT(updateConfig())); | ||
97 | } | ||
98 | mOptionsDialog->readConfig(); | ||
99 | #ifndef DESKTOP_VERSION | ||
100 | mOptionsDialog->showMaximized(); | ||
101 | #else | ||
102 | mOptionsDialog->show(); | ||
103 | #endif | ||
104 | if ( showSync ) | ||
105 | mOptionsDialog->showSyncPage(); | ||
106 | mOptionsDialog->exec(); | ||
107 | delete mOptionsDialog; | ||
108 | mOptionsDialog = 0; | ||
109 | } | ||
91 | void KODialogManager::showOptionsDialog( bool showSync ) | 110 | void KODialogManager::showOptionsDialog( bool showSync ) |
92 | { | 111 | { |
93 | 112 | ||
94 | if (!mOptionsDialog) { | 113 | if (!mOptionsDialog) { |
95 | mOptionsDialog = new KOPrefsDialog(mMainView); | 114 | mOptionsDialog = new KOPrefsDialog(mMainView); |
96 | //mOptionsDialog->readConfig(); | ||
97 | connect(mOptionsDialog,SIGNAL(configChanged()), | 115 | connect(mOptionsDialog,SIGNAL(configChanged()), |
98 | mMainView,SLOT(updateConfig())); | 116 | mMainView,SLOT(updateConfig())); |
99 | //connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), | ||
100 | // mOptionsDialog,SLOT(updateCategories())); | ||
101 | |||
102 | } | 117 | } |
103 | mOptionsDialog->readConfig(); | 118 | mOptionsDialog->readConfig(); |
104 | #ifndef DESKTOP_VERSION | 119 | #ifndef DESKTOP_VERSION |
105 | mOptionsDialog->showMaximized(); | 120 | mOptionsDialog->showMaximized(); |
106 | #else | 121 | #else |
107 | mOptionsDialog->show(); | 122 | mOptionsDialog->show(); |
108 | #endif | 123 | #endif |
109 | if ( showSync ) | 124 | if ( showSync ) |
110 | mOptionsDialog->showSyncPage(); | 125 | mOptionsDialog->showSyncPage(); |
111 | mOptionsDialog->exec(); | 126 | mOptionsDialog->exec(); |
112 | 127 | delete mOptionsDialog; | |
128 | mOptionsDialog = 0; | ||
113 | } | 129 | } |
114 | void KODialogManager::showSyncOptions() | 130 | void KODialogManager::showSyncOptions() |
115 | { | 131 | { |
116 | showOptionsDialog( true ); | 132 | showGlobalOptionsDialog( true ); |
117 | 133 | ||
118 | } | 134 | } |
119 | void KODialogManager::showOutgoingDialog() | 135 | void KODialogManager::showOutgoingDialog() |
120 | { | 136 | { |
121 | createOutgoingDialog(); | 137 | createOutgoingDialog(); |
122 | mOutgoingDialog->show(); | 138 | mOutgoingDialog->show(); |
123 | mOutgoingDialog->raise(); | 139 | mOutgoingDialog->raise(); |
124 | } | 140 | } |
125 | 141 | ||
126 | IncomingDialog *KODialogManager::incomingDialog() | 142 | IncomingDialog *KODialogManager::incomingDialog() |
127 | { | 143 | { |
128 | createOutgoingDialog(); | 144 | createOutgoingDialog(); |
129 | if (!mIncomingDialog) { | 145 | if (!mIncomingDialog) { |
130 | mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); | 146 | mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); |
131 | connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), | 147 | connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), |
132 | mMainView,SIGNAL(numIncomingChanged(int))); | 148 | mMainView,SIGNAL(numIncomingChanged(int))); |
133 | connect(mIncomingDialog,SIGNAL(calendarUpdated()), | 149 | connect(mIncomingDialog,SIGNAL(calendarUpdated()), |
134 | mMainView,SLOT(updateView())); | 150 | mMainView,SLOT(updateView())); |
135 | } | 151 | } |
136 | return mIncomingDialog; | 152 | return mIncomingDialog; |
137 | } | 153 | } |
138 | 154 | ||
139 | void KODialogManager::createIncomingDialog() | 155 | void KODialogManager::createIncomingDialog() |
140 | { | 156 | { |
141 | createOutgoingDialog(); | 157 | createOutgoingDialog(); |
142 | if (!mIncomingDialog) { | 158 | if (!mIncomingDialog) { |
143 | mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); | 159 | mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); |
144 | connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), | 160 | connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), |
145 | mMainView,SIGNAL(numIncomingChanged(int))); | 161 | mMainView,SIGNAL(numIncomingChanged(int))); |
146 | connect(mIncomingDialog,SIGNAL(calendarUpdated()), | 162 | connect(mIncomingDialog,SIGNAL(calendarUpdated()), |
147 | mMainView,SLOT(updateView())); | 163 | mMainView,SLOT(updateView())); |
148 | } | 164 | } |
149 | } | 165 | } |
150 | 166 | ||
151 | void KODialogManager::showIncomingDialog() | 167 | void KODialogManager::showIncomingDialog() |
152 | { | 168 | { |
153 | createIncomingDialog(); | 169 | createIncomingDialog(); |
154 | mIncomingDialog->show(); | 170 | mIncomingDialog->show(); |
155 | mIncomingDialog->raise(); | 171 | mIncomingDialog->raise(); |
156 | } | 172 | } |
157 | /* | 173 | /* |
158 | void KODialogManager::showCategoryEditDialog() | 174 | void KODialogManager::showCategoryEditDialog() |
159 | { | 175 | { |
160 | mCategoryEditDialog->show(); | 176 | mCategoryEditDialog->show(); |
161 | } | 177 | } |
162 | */ | 178 | */ |
163 | void KODialogManager::hideSearchDialog() | 179 | void KODialogManager::hideSearchDialog() |
164 | { | 180 | { |
165 | if (mSearchDialog) | 181 | if (mSearchDialog) |
166 | mSearchDialog->hide(); | 182 | mSearchDialog->hide(); |
167 | } | 183 | } |
168 | 184 | ||
169 | void KODialogManager::showSearchDialog() | 185 | void KODialogManager::showSearchDialog() |
170 | { | 186 | { |
171 | if (!mSearchDialog) { | 187 | if (!mSearchDialog) { |
172 | mSearchDialog = new SearchDialog(mMainView->calendar(),mMainView); | 188 | mSearchDialog = new SearchDialog(mMainView->calendar(),mMainView); |
173 | KOListView * lview = mSearchDialog->listview(); | 189 | KOListView * lview = mSearchDialog->listview(); |
174 | 190 | ||
175 | connect(lview, SIGNAL(showIncidenceSignal(Incidence *)), | 191 | connect(lview, SIGNAL(showIncidenceSignal(Incidence *)), |
176 | mMainView, SLOT(showIncidence(Incidence *))); | 192 | mMainView, SLOT(showIncidence(Incidence *))); |
177 | connect(lview, SIGNAL(editIncidenceSignal(Incidence *)), | 193 | connect(lview, SIGNAL(editIncidenceSignal(Incidence *)), |
178 | mMainView, SLOT(editIncidence(Incidence *))); | 194 | mMainView, SLOT(editIncidence(Incidence *))); |
179 | connect(lview, SIGNAL(deleteIncidenceSignal(Incidence *)), | 195 | connect(lview, SIGNAL(deleteIncidenceSignal(Incidence *)), |
180 | mMainView, SLOT(deleteIncidence(Incidence *))); | 196 | mMainView, SLOT(deleteIncidence(Incidence *))); |
181 | connect(lview, SIGNAL(cloneIncidenceSignal(Incidence *)), | 197 | connect(lview, SIGNAL(cloneIncidenceSignal(Incidence *)), |
182 | mMainView, SLOT(cloneIncidence(Incidence *))); | 198 | mMainView, SLOT(cloneIncidence(Incidence *))); |
183 | connect(lview, SIGNAL(beamIncidenceSignal(Incidence *)), | 199 | connect(lview, SIGNAL(beamIncidenceSignal(Incidence *)), |
184 | mMainView, SLOT(beamIncidence(Incidence *))); | 200 | mMainView, SLOT(beamIncidence(Incidence *))); |
185 | connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)), | 201 | connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)), |
186 | mMainView, SLOT(moveIncidence(Incidence *))); | 202 | mMainView, SLOT(moveIncidence(Incidence *))); |
187 | connect(lview, SIGNAL(beamIncidenceList(QPtrList<Incidence> )), | 203 | connect(lview, SIGNAL(beamIncidenceList(QPtrList<Incidence> )), |
188 | mMainView, SLOT(beamIncidenceList(QPtrList<Incidence> ))); | 204 | mMainView, SLOT(beamIncidenceList(QPtrList<Incidence> ))); |
189 | 205 | ||
190 | connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig())); | 206 | connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig())); |
191 | connect(mMainView, SIGNAL(updateSearchDialog()), mSearchDialog, SLOT(updateList())); | 207 | connect(mMainView, SIGNAL(updateSearchDialog()), mSearchDialog, SLOT(updateList())); |
192 | // connect( lview, SIGNAL( incidenceSelected( Incidence * ) ), | 208 | // connect( lview, SIGNAL( incidenceSelected( Incidence * ) ), |
193 | // mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 209 | // mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
194 | #ifndef DESKTOP_VERSION | 210 | #ifndef DESKTOP_VERSION |
195 | mSearchDialog->setMaximumSize( QApplication::desktop()->size()); | 211 | mSearchDialog->setMaximumSize( QApplication::desktop()->size()); |
196 | mSearchDialog->showMaximized(); | 212 | mSearchDialog->showMaximized(); |
197 | #else | 213 | #else |
198 | KConfig *config = KOGlobals::config(); | 214 | KConfig *config = KOGlobals::config(); |
199 | config->setGroup("WidgetLayout"); | 215 | config->setGroup("WidgetLayout"); |
200 | QStringList list; | 216 | QStringList list; |
201 | list = config->readListEntry("SearchLayout"); | 217 | list = config->readListEntry("SearchLayout"); |
202 | int x,y,w,h; | 218 | int x,y,w,h; |
203 | if ( ! list.isEmpty() ) { | 219 | if ( ! list.isEmpty() ) { |
204 | x = list[0].toInt(); | 220 | x = list[0].toInt(); |
205 | y = list[1].toInt(); | 221 | y = list[1].toInt(); |
206 | w = list[2].toInt(); | 222 | w = list[2].toInt(); |
207 | h = list[3].toInt(); | 223 | h = list[3].toInt(); |
208 | KApplication::testCoords( &x,&y,&w,&h ); | 224 | KApplication::testCoords( &x,&y,&w,&h ); |
209 | mSearchDialog->setGeometry(x,y,w,h); | 225 | mSearchDialog->setGeometry(x,y,w,h); |
210 | 226 | ||
211 | } | 227 | } |
212 | 228 | ||
213 | #endif | 229 | #endif |
214 | } | 230 | } |
215 | // make sure the widget is on top again | 231 | // make sure the widget is on top again |
216 | #ifdef DESKTOP_VERSION | 232 | #ifdef DESKTOP_VERSION |
217 | mSearchDialog->show(); | 233 | mSearchDialog->show(); |
218 | #else | 234 | #else |
219 | mSearchDialog->setMaximumSize( QApplication::desktop()->size()); | 235 | mSearchDialog->setMaximumSize( QApplication::desktop()->size()); |
220 | mSearchDialog->showMaximized(); | 236 | mSearchDialog->showMaximized(); |
221 | #endif | 237 | #endif |
222 | mSearchDialog->raiseAndSelect(); | 238 | mSearchDialog->raiseAndSelect(); |
223 | } | 239 | } |
224 | 240 | ||
225 | SearchDialog * KODialogManager::getSearchDialog() | 241 | SearchDialog * KODialogManager::getSearchDialog() |
226 | { | 242 | { |
227 | return mSearchDialog; | 243 | return mSearchDialog; |
228 | } | 244 | } |
229 | void KODialogManager::showArchiveDialog() | 245 | void KODialogManager::showArchiveDialog() |
230 | { | 246 | { |
231 | #ifndef KORG_NOARCHIVE | 247 | #ifndef KORG_NOARCHIVE |
232 | if (!mArchiveDialog) { | 248 | if (!mArchiveDialog) { |
233 | mArchiveDialog = new ArchiveDialog(mMainView->calendar(),mMainView); | 249 | mArchiveDialog = new ArchiveDialog(mMainView->calendar(),mMainView); |
234 | connect(mArchiveDialog,SIGNAL(eventsDeleted()), | 250 | connect(mArchiveDialog,SIGNAL(eventsDeleted()), |
235 | mMainView,SLOT(updateView())); | 251 | mMainView,SLOT(updateView())); |
236 | } | 252 | } |
237 | mArchiveDialog->show(); | 253 | mArchiveDialog->show(); |
238 | mArchiveDialog->raise(); | 254 | mArchiveDialog->raise(); |
239 | 255 | ||
240 | // Workaround. | 256 | // Workaround. |
241 | QApplication::restoreOverrideCursor(); | 257 | QApplication::restoreOverrideCursor(); |
242 | #endif | 258 | #endif |
243 | } | 259 | } |
244 | 260 | ||
245 | void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters) | 261 | void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters) |
246 | { | 262 | { |
247 | if (!mFilterEditDialog) { | 263 | if (!mFilterEditDialog) { |
248 | mFilterEditDialog = new FilterEditDialog(filters,mMainView); | 264 | mFilterEditDialog = new FilterEditDialog(filters,mMainView); |
249 | connect(mFilterEditDialog,SIGNAL(filterChanged()), | 265 | connect(mFilterEditDialog,SIGNAL(filterChanged()), |
250 | mMainView,SLOT(filterEdited())); | 266 | mMainView,SLOT(filterEdited())); |
251 | 267 | ||
252 | } | 268 | } |
253 | 269 | ||
254 | #ifndef DESKTOP_VERSION | 270 | #ifndef DESKTOP_VERSION |
255 | mFilterEditDialog->showMaximized(); | 271 | mFilterEditDialog->showMaximized(); |
256 | #else | 272 | #else |
257 | mFilterEditDialog->show(); | 273 | mFilterEditDialog->show(); |
258 | #endif | 274 | #endif |
259 | mFilterEditDialog->raise(); | 275 | mFilterEditDialog->raise(); |
260 | } | 276 | } |
261 | 277 | ||
262 | void KODialogManager::showPluginDialog() | 278 | void KODialogManager::showPluginDialog() |
263 | { | 279 | { |
264 | #ifndef KORG_NOPLUGINS | 280 | #ifndef KORG_NOPLUGINS |
265 | if (!mPluginDialog) { | 281 | if (!mPluginDialog) { |
266 | mPluginDialog = new PluginDialog(mMainView); | 282 | mPluginDialog = new PluginDialog(mMainView); |
267 | connect(mPluginDialog,SIGNAL(configChanged()), | 283 | connect(mPluginDialog,SIGNAL(configChanged()), |
268 | mMainView,SLOT(updateConfig())); | 284 | mMainView,SLOT(updateConfig())); |
269 | } | 285 | } |
270 | mPluginDialog->show(); | 286 | mPluginDialog->show(); |
271 | mPluginDialog->raise(); | 287 | mPluginDialog->raise(); |
272 | #endif | 288 | #endif |
273 | } | 289 | } |
274 | 290 | ||
275 | KOEventEditor *KODialogManager::getEventEditor() | 291 | KOEventEditor *KODialogManager::getEventEditor() |
276 | { | 292 | { |
277 | KOEventEditor *eventEditor = new KOEventEditor( mMainView->calendar(), | 293 | KOEventEditor *eventEditor = new KOEventEditor( mMainView->calendar(), |
278 | mMainView ); | 294 | mMainView ); |
279 | 295 | ||
280 | connect(eventEditor,SIGNAL(eventAdded(Event *)), | 296 | connect(eventEditor,SIGNAL(eventAdded(Event *)), |
281 | mMainView,SLOT(eventAdded(Event *))); | 297 | mMainView,SLOT(eventAdded(Event *))); |
282 | connect(eventEditor,SIGNAL(eventChanged(Event *)), | 298 | connect(eventEditor,SIGNAL(eventChanged(Event *)), |
283 | mMainView,SLOT(eventChanged(Event *))); | 299 | mMainView,SLOT(eventChanged(Event *))); |
284 | connect(eventEditor,SIGNAL(eventDeleted()), | 300 | connect(eventEditor,SIGNAL(eventDeleted()), |
285 | mMainView,SLOT(eventDeleted())); | 301 | mMainView,SLOT(eventDeleted())); |
286 | connect(eventEditor,SIGNAL(deleteAttendee(Incidence *)), | 302 | connect(eventEditor,SIGNAL(deleteAttendee(Incidence *)), |
287 | mMainView,SLOT(schedule_cancel(Incidence *))); | 303 | mMainView,SLOT(schedule_cancel(Incidence *))); |
288 | connect( eventEditor, SIGNAL(jumpToTime( const QDate &)), | 304 | connect( eventEditor, SIGNAL(jumpToTime( const QDate &)), |
289 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 305 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
290 | connect( eventEditor, SIGNAL( showAgendaView( bool)), | 306 | connect( eventEditor, SIGNAL( showAgendaView( bool)), |
291 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); | 307 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); |
292 | 308 | ||
293 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), | 309 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), |
294 | // eventEditor,SLOT(updateCategoryConfig())); | 310 | // eventEditor,SLOT(updateCategoryConfig())); |
295 | // connect(eventEditor,SIGNAL(editCategories()), | 311 | // connect(eventEditor,SIGNAL(editCategories()), |
296 | // mCategoryEditDialog,SLOT(show())); | 312 | // mCategoryEditDialog,SLOT(show())); |
297 | connect(eventEditor,SIGNAL(dialogClose(Incidence*)), | 313 | connect(eventEditor,SIGNAL(dialogClose(Incidence*)), |
298 | mMainView,SLOT(dialogClosing(Incidence*))); | 314 | mMainView,SLOT(dialogClosing(Incidence*))); |
299 | 315 | ||
300 | //connect(mMainView,SIGNAL(closingDown()),eventEditor,SLOT(reject())); | 316 | //connect(mMainView,SIGNAL(closingDown()),eventEditor,SLOT(reject())); |
301 | 317 | ||
302 | #ifndef DESKTOP_VERSION | 318 | #ifndef DESKTOP_VERSION |
303 | eventEditor->resize( QApplication::desktop()->width() -20, 100 ); | 319 | eventEditor->resize( QApplication::desktop()->width() -20, 100 ); |
304 | #endif | 320 | #endif |
305 | return eventEditor; | 321 | return eventEditor; |
306 | } | 322 | } |
307 | 323 | ||
308 | KOTodoEditor *KODialogManager::getTodoEditor() | 324 | KOTodoEditor *KODialogManager::getTodoEditor() |
309 | { | 325 | { |
310 | KOTodoEditor *todoEditor = new KOTodoEditor( mMainView->calendar(), | 326 | KOTodoEditor *todoEditor = new KOTodoEditor( mMainView->calendar(), |
311 | mMainView ); | 327 | mMainView ); |
312 | 328 | ||
313 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), | 329 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), |
314 | // todoEditor,SLOT(updateCategoryConfig())); | 330 | // todoEditor,SLOT(updateCategoryConfig())); |
315 | // connect(todoEditor,SIGNAL(editCategories()),mCategoryEditDialog,SLOT(show())); | 331 | // connect(todoEditor,SIGNAL(editCategories()),mCategoryEditDialog,SLOT(show())); |
316 | 332 | ||
317 | connect(todoEditor,SIGNAL(todoAdded(Todo *)), | 333 | connect(todoEditor,SIGNAL(todoAdded(Todo *)), |
318 | mMainView,SLOT(todoAdded(Todo *))); | 334 | mMainView,SLOT(todoAdded(Todo *))); |
319 | connect(todoEditor,SIGNAL(todoChanged(Todo *)), | 335 | connect(todoEditor,SIGNAL(todoChanged(Todo *)), |
320 | mMainView,SLOT(todoChanged(Todo *))); | 336 | mMainView,SLOT(todoChanged(Todo *))); |
321 | connect(todoEditor,SIGNAL(todoDeleted()), | 337 | connect(todoEditor,SIGNAL(todoDeleted()), |
322 | mMainView,SLOT(todoDeleted())); | 338 | mMainView,SLOT(todoDeleted())); |
323 | connect(todoEditor,SIGNAL(dialogClose(Incidence*)), | 339 | connect(todoEditor,SIGNAL(dialogClose(Incidence*)), |
324 | mMainView,SLOT(dialogClosing(Incidence*))); | 340 | mMainView,SLOT(dialogClosing(Incidence*))); |
325 | connect( todoEditor, SIGNAL(jumpToTime( const QDate &)), | 341 | connect( todoEditor, SIGNAL(jumpToTime( const QDate &)), |
326 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 342 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
327 | connect( todoEditor, SIGNAL( showAgendaView( bool)), | 343 | connect( todoEditor, SIGNAL( showAgendaView( bool)), |
328 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); | 344 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); |
329 | // connect(todoEditor,SIGNAL(deleteAttendee(Incidence *)), | 345 | // connect(todoEditor,SIGNAL(deleteAttendee(Incidence *)), |
330 | // mMainView,SLOT(schedule_cancel(Incidence *))); | 346 | // mMainView,SLOT(schedule_cancel(Incidence *))); |
331 | //connect(mMainView,SIGNAL(closingDown()),todoEditor,SLOT(reject())); | 347 | //connect(mMainView,SIGNAL(closingDown()),todoEditor,SLOT(reject())); |
332 | #ifndef DESKTOP_VERSION | 348 | #ifndef DESKTOP_VERSION |
333 | todoEditor->resize( QApplication::desktop()->width() -20, 100 ); | 349 | todoEditor->resize( QApplication::desktop()->width() -20, 100 ); |
334 | #endif | 350 | #endif |
335 | return todoEditor; | 351 | return todoEditor; |
336 | } | 352 | } |
337 | 353 | ||
338 | void KODialogManager::updateSearchDialog() | 354 | void KODialogManager::updateSearchDialog() |
339 | { | 355 | { |
340 | if (mSearchDialog) mSearchDialog->updateView(); | 356 | if (mSearchDialog) mSearchDialog->updateView(); |
341 | } | 357 | } |
342 | 358 | ||
343 | void KODialogManager::setDocumentId( const QString &id ) | 359 | void KODialogManager::setDocumentId( const QString &id ) |
344 | { | 360 | { |
345 | if (mOutgoingDialog) mOutgoingDialog->setDocumentId( id ); | 361 | if (mOutgoingDialog) mOutgoingDialog->setDocumentId( id ); |
346 | } | 362 | } |
347 | 363 | ||
348 | void KODialogManager::writeSettings( KConfig *config ) | 364 | void KODialogManager::writeSettings( KConfig *config ) |
349 | { | 365 | { |
350 | if (mSearchDialog) | 366 | if (mSearchDialog) |
351 | mSearchDialog->listview()->writeSettings(config,"SearchListView Layout"); | 367 | mSearchDialog->listview()->writeSettings(config,"SearchListView Layout"); |
352 | } | 368 | } |
diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h index a6cc621..b68ddc2 100644 --- a/korganizer/kodialogmanager.h +++ b/korganizer/kodialogmanager.h | |||
@@ -1,100 +1,101 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 | 3 | Copyright (c) 2001 |
4 | Cornelius Schumacher <schumacher@kde.org> | 4 | Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | #ifndef KODIALOGMANAGER_H | 24 | #ifndef KODIALOGMANAGER_H |
25 | #define KODIALOGMANAGER_H | 25 | #define KODIALOGMANAGER_H |
26 | 26 | ||
27 | #include <qobject.h> | 27 | #include <qobject.h> |
28 | #include <qptrlist.h> | 28 | #include <qptrlist.h> |
29 | 29 | ||
30 | #include <libkcal/calfilter.h> | 30 | #include <libkcal/calfilter.h> |
31 | 31 | ||
32 | class CalendarView; | 32 | class CalendarView; |
33 | class OutgoingDialog; | 33 | class OutgoingDialog; |
34 | class IncomingDialog; | 34 | class IncomingDialog; |
35 | class KOPrefsDialog; | 35 | class KOPrefsDialog; |
36 | //namespace KPIM { class CategoryEditDialog; } | 36 | //namespace KPIM { class CategoryEditDialog; } |
37 | class KOEventEditor; | 37 | class KOEventEditor; |
38 | class KOTodoEditor; | 38 | class KOTodoEditor; |
39 | class SearchDialog; | 39 | class SearchDialog; |
40 | class ArchiveDialog; | 40 | class ArchiveDialog; |
41 | class PluginDialog; | 41 | class PluginDialog; |
42 | class KConfig; | 42 | class KConfig; |
43 | class FilterEditDialog; | 43 | class FilterEditDialog; |
44 | 44 | ||
45 | using namespace KCal; | 45 | using namespace KCal; |
46 | 46 | ||
47 | /** | 47 | /** |
48 | This class manages the dialogs used by the calendar view. It owns the objects | 48 | This class manages the dialogs used by the calendar view. It owns the objects |
49 | and handles creation and selection. | 49 | and handles creation and selection. |
50 | */ | 50 | */ |
51 | class KODialogManager : public QObject | 51 | class KODialogManager : public QObject |
52 | { | 52 | { |
53 | Q_OBJECT | 53 | Q_OBJECT |
54 | public: | 54 | public: |
55 | KODialogManager( CalendarView * ); | 55 | KODialogManager( CalendarView * ); |
56 | virtual ~KODialogManager(); | 56 | virtual ~KODialogManager(); |
57 | 57 | ||
58 | /** Get an editor dialog for an Event. */ | 58 | /** Get an editor dialog for an Event. */ |
59 | KOEventEditor *getEventEditor(); | 59 | KOEventEditor *getEventEditor(); |
60 | 60 | ||
61 | /** Get an editor dialog for a Todo. */ | 61 | /** Get an editor dialog for a Todo. */ |
62 | KOTodoEditor *getTodoEditor(); | 62 | KOTodoEditor *getTodoEditor(); |
63 | 63 | ||
64 | OutgoingDialog *outgoingDialog(); | 64 | OutgoingDialog *outgoingDialog(); |
65 | 65 | ||
66 | IncomingDialog *incomingDialog(); | 66 | IncomingDialog *incomingDialog(); |
67 | void writeSettings( KConfig *config); | 67 | void writeSettings( KConfig *config); |
68 | void updateSearchDialog(); | 68 | void updateSearchDialog(); |
69 | SearchDialog * getSearchDialog(); | 69 | SearchDialog * getSearchDialog(); |
70 | void setDocumentId( const QString &id ); | 70 | void setDocumentId( const QString &id ); |
71 | 71 | ||
72 | public slots: | 72 | public slots: |
73 | void showOptionsDialog( bool showSync = false); | 73 | void showOptionsDialog( bool showSync = false); |
74 | void showGlobalOptionsDialog(bool showSync = false); | ||
74 | void showSyncOptions(); | 75 | void showSyncOptions(); |
75 | void showIncomingDialog(); | 76 | void showIncomingDialog(); |
76 | void showOutgoingDialog(); | 77 | void showOutgoingDialog(); |
77 | // void showCategoryEditDialog(); | 78 | // void showCategoryEditDialog(); |
78 | void showSearchDialog(); | 79 | void showSearchDialog(); |
79 | void showArchiveDialog(); | 80 | void showArchiveDialog(); |
80 | void showFilterEditDialog(QPtrList<CalFilter> *filters); | 81 | void showFilterEditDialog(QPtrList<CalFilter> *filters); |
81 | void showPluginDialog(); | 82 | void showPluginDialog(); |
82 | void hideSearchDialog(); | 83 | void hideSearchDialog(); |
83 | 84 | ||
84 | private: | 85 | private: |
85 | void createOutgoingDialog(); | 86 | void createOutgoingDialog(); |
86 | void createIncomingDialog(); | 87 | void createIncomingDialog(); |
87 | 88 | ||
88 | CalendarView *mMainView; | 89 | CalendarView *mMainView; |
89 | 90 | ||
90 | OutgoingDialog *mOutgoingDialog; | 91 | OutgoingDialog *mOutgoingDialog; |
91 | IncomingDialog *mIncomingDialog; | 92 | IncomingDialog *mIncomingDialog; |
92 | KOPrefsDialog *mOptionsDialog; | 93 | KOPrefsDialog *mOptionsDialog; |
93 | // KPIM::CategoryEditDialog *mCategoryEditDialog; | 94 | // KPIM::CategoryEditDialog *mCategoryEditDialog; |
94 | SearchDialog *mSearchDialog; | 95 | SearchDialog *mSearchDialog; |
95 | ArchiveDialog *mArchiveDialog; | 96 | ArchiveDialog *mArchiveDialog; |
96 | FilterEditDialog *mFilterEditDialog; | 97 | FilterEditDialog *mFilterEditDialog; |
97 | PluginDialog *mPluginDialog; | 98 | PluginDialog *mPluginDialog; |
98 | }; | 99 | }; |
99 | 100 | ||
100 | #endif | 101 | #endif |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index c9477e3..4b5b66a 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -1,1749 +1,1755 @@ | |||
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 | kdelibcfg = 0; | |
90 | if ( !parent ) | ||
90 | setupGlobalTab(); | 91 | setupGlobalTab(); |
92 | else { | ||
91 | setupMainTab(); | 93 | setupMainTab(); |
92 | // setupLocaleTab(); | 94 | // setupLocaleTab(); |
93 | //setupTimeZoneTab(); | 95 | //setupTimeZoneTab(); |
94 | setupTimeTab(); | 96 | setupTimeTab(); |
95 | //setupLocaleDateTab(); | 97 | //setupLocaleDateTab(); |
96 | setupFontsTab(); | 98 | setupFontsTab(); |
97 | setupColorsTab(); | 99 | setupColorsTab(); |
98 | setupViewsTab(); | 100 | setupViewsTab(); |
99 | //setupSyncTab(); | 101 | //setupSyncTab(); |
100 | //setupSyncAlgTab(); | 102 | //setupSyncAlgTab(); |
101 | //setupPrinterTab(); | 103 | //setupPrinterTab(); |
102 | //setupGroupSchedulingTab(); | 104 | //setupGroupSchedulingTab(); |
103 | //setupGroupAutomationTab(); | 105 | //setupGroupAutomationTab(); |
104 | 106 | } | |
105 | 107 | ||
106 | } | 108 | } |
107 | 109 | ||
108 | 110 | ||
109 | KOPrefsDialog::~KOPrefsDialog() | 111 | KOPrefsDialog::~KOPrefsDialog() |
110 | { | 112 | { |
111 | } | 113 | } |
112 | void KOPrefsDialog::setupGlobalTab() | 114 | void KOPrefsDialog::setupGlobalTab() |
113 | { | 115 | { |
114 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 116 | //QFrame *topFrame = addPage(i18n("Global"),0,0); |
115 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 117 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), this, "KCMKdeLibConfig" ); |
116 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 118 | setMainWidget( kdelibcfg ); |
117 | topLayout->addWidget( kdelibcfg ); | 119 | setCaption( i18n("KDE-Pim Global Settings")); |
118 | 120 | ||
119 | 121 | ||
120 | } | 122 | } |
121 | void KOPrefsDialog::setupLocaleDateTab() | 123 | void KOPrefsDialog::setupLocaleDateTab() |
122 | { | 124 | { |
123 | #if 0 | 125 | #if 0 |
124 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 126 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
125 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 127 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
126 | topLayout->setSpacing(mSpacingHint); | 128 | topLayout->setSpacing(mSpacingHint); |
127 | topLayout->setMargin(mMarginHint); | 129 | topLayout->setMargin(mMarginHint); |
128 | int iii = 0; | 130 | int iii = 0; |
129 | 131 | ||
130 | 132 | ||
131 | KPrefsDialogWidRadios *syncPrefsGroup = | 133 | KPrefsDialogWidRadios *syncPrefsGroup = |
132 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 134 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
133 | QString format; | 135 | QString format; |
134 | if ( QApplication::desktop()->width() < 480 ) | 136 | if ( QApplication::desktop()->width() < 480 ) |
135 | format = "(%d.%m.%Y)"; | 137 | format = "(%d.%m.%Y)"; |
136 | else | 138 | else |
137 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 139 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
138 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 140 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
139 | if ( QApplication::desktop()->width() < 480 ) | 141 | if ( QApplication::desktop()->width() < 480 ) |
140 | format = "(%m.%d.%Y)"; | 142 | format = "(%m.%d.%Y)"; |
141 | else | 143 | else |
142 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 144 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
143 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 145 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
144 | if ( QApplication::desktop()->width() < 480 ) | 146 | if ( QApplication::desktop()->width() < 480 ) |
145 | format = "(%Y-%m-%d)"; | 147 | format = "(%Y-%m-%d)"; |
146 | else | 148 | else |
147 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 149 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
148 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 150 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
149 | syncPrefsGroup->addRadio(i18n("User defined")); | 151 | syncPrefsGroup->addRadio(i18n("User defined")); |
150 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 152 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
151 | ++iii; | 153 | ++iii; |
152 | ++iii; | 154 | ++iii; |
153 | QLabel * lab; | 155 | QLabel * lab; |
154 | mUserDateFormatLong = new QLineEdit(topFrame); | 156 | mUserDateFormatLong = new QLineEdit(topFrame); |
155 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 157 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
156 | topLayout->addWidget(lab ,iii,0); | 158 | topLayout->addWidget(lab ,iii,0); |
157 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 159 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
158 | ++iii; | 160 | ++iii; |
159 | mUserDateFormatShort = new QLineEdit(topFrame); | 161 | mUserDateFormatShort = new QLineEdit(topFrame); |
160 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 162 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
161 | topLayout->addWidget(lab ,iii,0); | 163 | topLayout->addWidget(lab ,iii,0); |
162 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 164 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
163 | ++iii; | 165 | ++iii; |
164 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 166 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
165 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 167 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
166 | ++iii; | 168 | ++iii; |
167 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 169 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
168 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 170 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
169 | ++iii; | 171 | ++iii; |
170 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 172 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
171 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 173 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
172 | ++iii; | 174 | ++iii; |
173 | #endif | 175 | #endif |
174 | 176 | ||
175 | } | 177 | } |
176 | 178 | ||
177 | void KOPrefsDialog::setupLocaleTab() | 179 | void KOPrefsDialog::setupLocaleTab() |
178 | { | 180 | { |
179 | #if 0 | 181 | #if 0 |
180 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 182 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
181 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 183 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
182 | topLayout->setSpacing(mSpacingHint); | 184 | topLayout->setSpacing(mSpacingHint); |
183 | topLayout->setMargin(mMarginHint); | 185 | topLayout->setMargin(mMarginHint); |
184 | int iii = 0; | 186 | int iii = 0; |
185 | KPrefsDialogWidRadios *syncPrefsGroup = | 187 | KPrefsDialogWidRadios *syncPrefsGroup = |
186 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 188 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
187 | syncPrefsGroup->addRadio(i18n("English")); | 189 | syncPrefsGroup->addRadio(i18n("English")); |
188 | syncPrefsGroup->addRadio(i18n("German")); | 190 | syncPrefsGroup->addRadio(i18n("German")); |
189 | syncPrefsGroup->addRadio(i18n("French")); | 191 | syncPrefsGroup->addRadio(i18n("French")); |
190 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 192 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
191 | if ( QApplication::desktop()->width() < 300 ) | 193 | if ( QApplication::desktop()->width() < 300 ) |
192 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 194 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
193 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 195 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
194 | ++iii; | 196 | ++iii; |
195 | 197 | ||
196 | syncPrefsGroup = | 198 | syncPrefsGroup = |
197 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 199 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
198 | if ( QApplication::desktop()->width() > 300 ) | 200 | if ( QApplication::desktop()->width() > 300 ) |
199 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 201 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
200 | syncPrefsGroup->addRadio(i18n("24:00")); | 202 | syncPrefsGroup->addRadio(i18n("24:00")); |
201 | syncPrefsGroup->addRadio(i18n("12:00am")); | 203 | syncPrefsGroup->addRadio(i18n("12:00am")); |
202 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 204 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
203 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 205 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
204 | ++iii; | 206 | ++iii; |
205 | KPrefsDialogWidBool *sb; | 207 | KPrefsDialogWidBool *sb; |
206 | if ( QApplication::desktop()->width() < 300 ) { | 208 | if ( QApplication::desktop()->width() < 300 ) { |
207 | sb = | 209 | sb = |
208 | addWidBool(i18n("Week starts on Sunday"), | 210 | addWidBool(i18n("Week starts on Sunday"), |
209 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 211 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
210 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 212 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
211 | ++iii; | 213 | ++iii; |
212 | sb = | 214 | sb = |
213 | addWidBool(i18n("Use short date in (WN/E) view"), | 215 | addWidBool(i18n("Use short date in (WN/E) view"), |
214 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 216 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
215 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 217 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
216 | } | 218 | } |
217 | else { | 219 | else { |
218 | QWidget * hb = new QWidget( topFrame ); | 220 | QWidget * hb = new QWidget( topFrame ); |
219 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 221 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
220 | sb = | 222 | sb = |
221 | addWidBool(i18n("Week starts on Sunday"), | 223 | addWidBool(i18n("Week starts on Sunday"), |
222 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 224 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
223 | hbLayout->addWidget(sb->checkBox() ); | 225 | hbLayout->addWidget(sb->checkBox() ); |
224 | sb = | 226 | sb = |
225 | addWidBool(i18n("Use short date in (WN/E) view"), | 227 | addWidBool(i18n("Use short date in (WN/E) view"), |
226 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 228 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
227 | hbLayout->addWidget(sb->checkBox() ); | 229 | hbLayout->addWidget(sb->checkBox() ); |
228 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 230 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
229 | 231 | ||
230 | } | 232 | } |
231 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION | 233 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION |
232 | #if 0 | 234 | #if 0 |
233 | ++iii; | 235 | ++iii; |
234 | sb = | 236 | sb = |
235 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 237 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
236 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 238 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
237 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 239 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
238 | #endif | 240 | #endif |
239 | #endif | 241 | #endif |
240 | } | 242 | } |
241 | void KOPrefsDialog::showSyncPage() | 243 | void KOPrefsDialog::showSyncPage() |
242 | { | 244 | { |
243 | showPage ( 0 ) ; | 245 | // showPage ( 0 ) ; |
244 | kdelibcfg->showTimeZoneTab() ; | 246 | kdelibcfg->showTimeZoneTab() ; |
245 | 247 | ||
246 | } | 248 | } |
247 | void KOPrefsDialog::setupSyncAlgTab() | 249 | void KOPrefsDialog::setupSyncAlgTab() |
248 | { | 250 | { |
249 | #if 0 | 251 | #if 0 |
250 | QLabel * lab; | 252 | QLabel * lab; |
251 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 253 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); |
252 | mSetupSyncAlgTab = topFrame; | 254 | mSetupSyncAlgTab = topFrame; |
253 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 255 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
254 | topLayout->setSpacing(mSpacingHint); | 256 | topLayout->setSpacing(mSpacingHint); |
255 | topLayout->setMargin(mMarginHint); | 257 | topLayout->setMargin(mMarginHint); |
256 | int iii = 0; | 258 | int iii = 0; |
257 | 259 | ||
258 | KPrefsDialogWidBool *sb = | 260 | KPrefsDialogWidBool *sb = |
259 | addWidBool(i18n("Ask for preferences before syncing"), | 261 | addWidBool(i18n("Ask for preferences before syncing"), |
260 | &(KOPrefs::instance()->mAskForPreferences),topFrame); | 262 | &(KOPrefs::instance()->mAskForPreferences),topFrame); |
261 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 263 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
262 | 264 | ||
263 | ++iii; | 265 | ++iii; |
264 | 266 | ||
265 | KPrefsDialogWidRadios *syncPrefsGroup = | 267 | KPrefsDialogWidRadios *syncPrefsGroup = |
266 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), | 268 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), |
267 | topFrame); | 269 | topFrame); |
268 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 270 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
269 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 271 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
270 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 272 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
271 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 273 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
272 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 274 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
273 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 275 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
274 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 276 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
275 | ++iii; | 277 | ++iii; |
276 | sb = | 278 | sb = |
277 | addWidBool(i18n("Show summary after syncing"), | 279 | addWidBool(i18n("Show summary after syncing"), |
278 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); | 280 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); |
279 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 281 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
280 | 282 | ||
281 | ++iii; | 283 | ++iii; |
282 | #endif | 284 | #endif |
283 | 285 | ||
284 | 286 | ||
285 | 287 | ||
286 | } | 288 | } |
287 | 289 | ||
288 | 290 | ||
289 | void KOPrefsDialog::setupSyncTab() | 291 | void KOPrefsDialog::setupSyncTab() |
290 | { | 292 | { |
291 | #if 0 | 293 | #if 0 |
292 | QLabel * lab; | 294 | QLabel * lab; |
293 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); | 295 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); |
294 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 296 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
295 | topLayout->setSpacing(mSpacingHint); | 297 | topLayout->setSpacing(mSpacingHint); |
296 | topLayout->setMargin(mMarginHint); | 298 | topLayout->setMargin(mMarginHint); |
297 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); | 299 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); |
298 | int iii = 0; | 300 | int iii = 0; |
299 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); | 301 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); |
300 | ++iii; | 302 | ++iii; |
301 | 303 | ||
302 | mRemoteIPEdit = new QLineEdit(topFrame); | 304 | mRemoteIPEdit = new QLineEdit(topFrame); |
303 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); | 305 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); |
304 | topLayout->addWidget(lab ,iii,0); | 306 | topLayout->addWidget(lab ,iii,0); |
305 | topLayout->addWidget(mRemoteIPEdit,iii,1); | 307 | topLayout->addWidget(mRemoteIPEdit,iii,1); |
306 | ++iii; | 308 | ++iii; |
307 | mRemoteUser = new QLineEdit(topFrame); | 309 | mRemoteUser = new QLineEdit(topFrame); |
308 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); | 310 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); |
309 | topLayout->addWidget(lab ,iii,0); | 311 | topLayout->addWidget(lab ,iii,0); |
310 | topLayout->addWidget(mRemoteUser, iii,1); | 312 | topLayout->addWidget(mRemoteUser, iii,1); |
311 | ++iii; | 313 | ++iii; |
312 | 314 | ||
313 | mRemoteFile = new QLineEdit(topFrame); | 315 | mRemoteFile = new QLineEdit(topFrame); |
314 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); | 316 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); |
315 | topLayout->addWidget(lab ,iii,0); | 317 | topLayout->addWidget(lab ,iii,0); |
316 | topLayout->addWidget(mRemoteFile,iii,1); | 318 | topLayout->addWidget(mRemoteFile,iii,1); |
317 | ++iii; | 319 | ++iii; |
318 | 320 | ||
319 | mLocalTempFile = new QLineEdit(topFrame); | 321 | mLocalTempFile = new QLineEdit(topFrame); |
320 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); | 322 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); |
321 | topLayout->addWidget(lab ,iii,0); | 323 | topLayout->addWidget(lab ,iii,0); |
322 | topLayout->addWidget(mLocalTempFile,iii,1); | 324 | topLayout->addWidget(mLocalTempFile,iii,1); |
323 | ++iii; | 325 | ++iii; |
324 | 326 | ||
325 | KPrefsDialogWidBool *wb = | 327 | KPrefsDialogWidBool *wb = |
326 | addWidBool(i18n("Write back synced file"), | 328 | addWidBool(i18n("Write back synced file"), |
327 | &(KOPrefs::instance()->mWriteBackFile),topFrame); | 329 | &(KOPrefs::instance()->mWriteBackFile),topFrame); |
328 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 330 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
329 | ++iii; | 331 | ++iii; |
330 | wb = | 332 | wb = |
331 | addWidBool(i18n("Write back existing entries only"), | 333 | addWidBool(i18n("Write back existing entries only"), |
332 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); | 334 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); |
333 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 335 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
334 | ++iii; | 336 | ++iii; |
335 | 337 | ||
336 | #endif | 338 | #endif |
337 | } | 339 | } |
338 | 340 | ||
339 | void KOPrefsDialog::setupMainTab() | 341 | void KOPrefsDialog::setupMainTab() |
340 | { | 342 | { |
341 | QFrame *topFrame = addPage(i18n("General"),0,0); | 343 | QFrame *topFrame = addPage(i18n("General"),0,0); |
342 | // DesktopIcon("identity",KIcon::SizeMedium)); | 344 | // DesktopIcon("identity",KIcon::SizeMedium)); |
343 | 345 | ||
344 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 346 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
345 | topLayout->setSpacing(mSpacingHint); | 347 | topLayout->setSpacing(mSpacingHint); |
346 | topLayout->setMargin(mMarginHint); | 348 | topLayout->setMargin(mMarginHint); |
347 | 349 | ||
348 | // KPrefsDialogWidBool *emailControlCenter = | 350 | // KPrefsDialogWidBool *emailControlCenter = |
349 | // addWidBool(i18n("&Use email settings from Control Center"), | 351 | // addWidBool(i18n("&Use email settings from Control Center"), |
350 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 352 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
351 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 353 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
352 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 354 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
353 | // SLOT(toggleEmailSettings(bool))); | 355 | // SLOT(toggleEmailSettings(bool))); |
354 | 356 | ||
355 | mNameEdit = new QLineEdit(topFrame); | 357 | mNameEdit = new QLineEdit(topFrame); |
356 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 358 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
357 | topLayout->addWidget(mNameLabel,0,0); | 359 | topLayout->addWidget(mNameLabel,0,0); |
358 | topLayout->addWidget(mNameEdit,0,1); | 360 | topLayout->addWidget(mNameEdit,0,1); |
359 | 361 | ||
360 | mEmailEdit = new QLineEdit(topFrame); | 362 | mEmailEdit = new QLineEdit(topFrame); |
361 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 363 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
362 | topLayout->addWidget(mEmailLabel,1,0); | 364 | topLayout->addWidget(mEmailLabel,1,0); |
363 | topLayout->addWidget(mEmailEdit,1,1); | 365 | topLayout->addWidget(mEmailEdit,1,1); |
364 | KPrefsDialogWidBool *wb; | 366 | KPrefsDialogWidBool *wb; |
365 | 367 | ||
366 | 368 | ||
367 | 369 | ||
368 | KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), | 370 | KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), |
369 | &(KOPrefs::instance()->mShowFullMenu),topFrame); | 371 | &(KOPrefs::instance()->mShowFullMenu),topFrame); |
370 | topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); | 372 | topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); |
371 | 373 | ||
372 | 374 | ||
373 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), | 375 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), |
374 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); | 376 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); |
375 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); | 377 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); |
376 | 378 | ||
377 | 379 | ||
378 | KPrefsDialogWidBool *verticalScreen = | 380 | KPrefsDialogWidBool *verticalScreen = |
379 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 381 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
380 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 382 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
381 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 383 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
382 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); | 384 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); |
383 | 385 | ||
384 | 386 | ||
385 | int iii = 5; | 387 | int iii = 5; |
386 | widbool = addWidBool(i18n("Block popup until mouse button release"), | 388 | widbool = addWidBool(i18n("Block popup until mouse button release"), |
387 | &(KOPrefs::instance()->mBlockPopupMenu),topFrame); | 389 | &(KOPrefs::instance()->mBlockPopupMenu),topFrame); |
388 | topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); | 390 | topLayout->addMultiCellWidget( widbool->checkBox(), iii,iii,0,1); |
389 | ++iii; | 391 | ++iii; |
390 | QHBox *dummy = new QHBox(topFrame); | 392 | QHBox *dummy = new QHBox(topFrame); |
391 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 393 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
392 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 394 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
393 | 395 | ||
394 | topLayout->addMultiCellWidget(dummy,iii,iii,0,1); | 396 | topLayout->addMultiCellWidget(dummy,iii,iii,0,1); |
395 | 397 | ||
396 | ++iii; | 398 | ++iii; |
397 | 399 | ||
398 | 400 | ||
399 | // KPrefsDialogWidBool *bcc = | 401 | // KPrefsDialogWidBool *bcc = |
400 | // addWidBool(i18n("Send copy to owner when mailing events"), | 402 | // addWidBool(i18n("Send copy to owner when mailing events"), |
401 | // &(KOPrefs::instance()->mBcc),topFrame); | 403 | // &(KOPrefs::instance()->mBcc),topFrame); |
402 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 404 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
403 | 405 | ||
404 | 406 | ||
405 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 407 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
406 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 408 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
407 | 409 | ||
408 | // addWidBool(i18n("Enable automatic saving of calendar"), | 410 | // addWidBool(i18n("Enable automatic saving of calendar"), |
409 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 411 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
410 | 412 | ||
411 | QHBox *intervalBox = new QHBox(topFrame); | 413 | QHBox *intervalBox = new QHBox(topFrame); |
412 | // intervalBox->setSpacing(mSpacingHint); | 414 | // intervalBox->setSpacing(mSpacingHint); |
413 | topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); | 415 | topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); |
414 | ++iii; | 416 | ++iii; |
415 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 417 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
416 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 418 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
417 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 419 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
418 | /* | 420 | /* |
419 | QHBox * agendasize = new QHBox ( topFrame ); | 421 | QHBox * agendasize = new QHBox ( topFrame ); |
420 | 422 | ||
421 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 423 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
422 | 424 | ||
423 | 425 | ||
424 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 426 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
425 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 427 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
426 | */ | 428 | */ |
427 | 429 | ||
428 | 430 | ||
429 | KPrefsDialogWidBool *ask = | 431 | KPrefsDialogWidBool *ask = |
430 | addWidBool(i18n("Ask for quit when closing KO/Pi"), | 432 | addWidBool(i18n("Ask for quit when closing KO/Pi"), |
431 | &(KOPrefs::instance()->mAskForQuit),topFrame); | 433 | &(KOPrefs::instance()->mAskForQuit),topFrame); |
432 | topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1); | 434 | topLayout->addMultiCellWidget(ask->checkBox(),iii,iii,0,1); |
433 | ++iii; | 435 | ++iii; |
434 | 436 | ||
435 | 437 | ||
436 | /* | 438 | /* |
437 | KPrefsDialogWidBool *confirmCheck = | 439 | KPrefsDialogWidBool *confirmCheck = |
438 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), | 440 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), |
439 | topFrame); | 441 | topFrame); |
440 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); | 442 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); |
441 | 443 | ||
442 | 444 | ||
443 | mEnableGroupScheduling = | 445 | mEnableGroupScheduling = |
444 | addWidBool(i18n("Enable group scheduling"), | 446 | addWidBool(i18n("Enable group scheduling"), |
445 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); | 447 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); |
446 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); | 448 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); |
447 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), | 449 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), |
448 | SLOT(warningGroupScheduling())); | 450 | SLOT(warningGroupScheduling())); |
449 | 451 | ||
450 | mEnableProjectView = | 452 | mEnableProjectView = |
451 | addWidBool(i18n("Enable project view"), | 453 | addWidBool(i18n("Enable project view"), |
452 | &(KOPrefs::instance()->mEnableProjectView),topFrame); | 454 | &(KOPrefs::instance()->mEnableProjectView),topFrame); |
453 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); | 455 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); |
454 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), | 456 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), |
455 | SLOT(warningProjectView())); | 457 | SLOT(warningProjectView())); |
456 | 458 | ||
457 | // Can't be disabled anymore | 459 | // Can't be disabled anymore |
458 | mEnableGroupScheduling->checkBox()->hide(); | 460 | mEnableGroupScheduling->checkBox()->hide(); |
459 | 461 | ||
460 | // Disable setting, because this feature now becomes stable | 462 | // Disable setting, because this feature now becomes stable |
461 | mEnableProjectView->checkBox()->hide(); | 463 | mEnableProjectView->checkBox()->hide(); |
462 | 464 | ||
463 | KPrefsDialogWidRadios *defaultFormatGroup = | 465 | KPrefsDialogWidRadios *defaultFormatGroup = |
464 | addWidRadios(i18n("Default Calendar Format"), | 466 | addWidRadios(i18n("Default Calendar Format"), |
465 | &(KOPrefs::instance()->mDefaultFormat),topFrame); | 467 | &(KOPrefs::instance()->mDefaultFormat),topFrame); |
466 | defaultFormatGroup->addRadio(i18n("vCalendar")); | 468 | defaultFormatGroup->addRadio(i18n("vCalendar")); |
467 | defaultFormatGroup->addRadio(i18n("iCalendar")); | 469 | defaultFormatGroup->addRadio(i18n("iCalendar")); |
468 | 470 | ||
469 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); | 471 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); |
470 | 472 | ||
471 | // Default format unconditionally is iCalendar | 473 | // Default format unconditionally is iCalendar |
472 | defaultFormatGroup->groupBox()->hide(); | 474 | defaultFormatGroup->groupBox()->hide(); |
473 | 475 | ||
474 | KPrefsDialogWidRadios *mailClientGroup = | 476 | KPrefsDialogWidRadios *mailClientGroup = |
475 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), | 477 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), |
476 | topFrame); | 478 | topFrame); |
477 | mailClientGroup->addRadio(i18n("KMail")); | 479 | mailClientGroup->addRadio(i18n("KMail")); |
478 | mailClientGroup->addRadio(i18n("Sendmail")); | 480 | mailClientGroup->addRadio(i18n("Sendmail")); |
479 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); | 481 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); |
480 | 482 | ||
481 | KPrefsDialogWidBool *htmlsave = | 483 | KPrefsDialogWidBool *htmlsave = |
482 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), | 484 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), |
483 | topFrame); | 485 | topFrame); |
484 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); | 486 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); |
485 | 487 | ||
486 | KPrefsDialogWidRadios *destinationGroup = | 488 | KPrefsDialogWidRadios *destinationGroup = |
487 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), | 489 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), |
488 | topFrame); | 490 | topFrame); |
489 | destinationGroup->addRadio(i18n("be added to the standard resource")); | 491 | destinationGroup->addRadio(i18n("be added to the standard resource")); |
490 | destinationGroup->addRadio(i18n("be asked which resource to use")); | 492 | destinationGroup->addRadio(i18n("be asked which resource to use")); |
491 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); | 493 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); |
492 | 494 | ||
493 | topLayout->setRowStretch(14,1); | 495 | topLayout->setRowStretch(14,1); |
494 | */ | 496 | */ |
495 | } | 497 | } |
496 | 498 | ||
497 | 499 | ||
498 | void KOPrefsDialog::setupTimeTab() | 500 | void KOPrefsDialog::setupTimeTab() |
499 | { | 501 | { |
500 | QFrame *topFrame = addPage(i18n("Time"),0,0); | 502 | QFrame *topFrame = addPage(i18n("Time"),0,0); |
501 | // DesktopIcon("clock",KIcon::SizeMedium)); | 503 | // DesktopIcon("clock",KIcon::SizeMedium)); |
502 | 504 | ||
503 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 505 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
504 | topLayout->setSpacing(mSpacingHint); | 506 | topLayout->setSpacing(mSpacingHint); |
505 | topLayout->setMargin(mMarginHint); | 507 | topLayout->setMargin(mMarginHint); |
506 | 508 | ||
507 | QHBox *dummy = new QHBox(topFrame); | 509 | QHBox *dummy = new QHBox(topFrame); |
508 | KPrefsDialogWidTime *dayBegins = | 510 | KPrefsDialogWidTime *dayBegins = |
509 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 511 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
510 | dummy); | 512 | dummy); |
511 | //topLayout->addWidget(dayBegins->label(),2,0); | 513 | //topLayout->addWidget(dayBegins->label(),2,0); |
512 | 514 | ||
513 | //topLayout->addWidget(dayBegins->spinBox(),2,1); | 515 | //topLayout->addWidget(dayBegins->spinBox(),2,1); |
514 | topLayout->addMultiCellWidget(dummy,0,0,0,1); | 516 | topLayout->addMultiCellWidget(dummy,0,0,0,1); |
515 | 517 | ||
516 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), | 518 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), |
517 | topFrame),1,0); | 519 | topFrame),1,0); |
518 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); | 520 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); |
519 | mStartTimeSpin->setSuffix(":00"); | 521 | mStartTimeSpin->setSuffix(":00"); |
520 | topLayout->addWidget(mStartTimeSpin,1,1); | 522 | topLayout->addWidget(mStartTimeSpin,1,1); |
521 | 523 | ||
522 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), | 524 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), |
523 | topFrame),2,0); | 525 | topFrame),2,0); |
524 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); | 526 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); |
525 | mDefaultDurationSpin->setSuffix(":00"); | 527 | mDefaultDurationSpin->setSuffix(":00"); |
526 | topLayout->addWidget(mDefaultDurationSpin,2,1); | 528 | topLayout->addWidget(mDefaultDurationSpin,2,1); |
527 | 529 | ||
528 | QStringList alarmList; | 530 | QStringList alarmList; |
529 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") | 531 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") |
530 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; | 532 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; |
531 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), | 533 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), |
532 | 3,0); | 534 | 3,0); |
533 | mAlarmTimeCombo = new QComboBox(topFrame); | 535 | mAlarmTimeCombo = new QComboBox(topFrame); |
534 | mAlarmTimeCombo->insertStringList(alarmList); | 536 | mAlarmTimeCombo->insertStringList(alarmList); |
535 | topLayout->addWidget(mAlarmTimeCombo,3,1); | 537 | topLayout->addWidget(mAlarmTimeCombo,3,1); |
536 | 538 | ||
537 | 539 | ||
538 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 540 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, |
539 | i18n("Working Hours"), | 541 | i18n("Working Hours"), |
540 | topFrame); | 542 | topFrame); |
541 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); | 543 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); |
542 | workingHoursGroup->layout()->setSpacing( 0 ); | 544 | workingHoursGroup->layout()->setSpacing( 0 ); |
543 | workingHoursGroup->layout()->setMargin( 4 ); | 545 | workingHoursGroup->layout()->setMargin( 4 ); |
544 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 546 | QHBox *workStartBox = new QHBox(workingHoursGroup); |
545 | // workStartBox->setMargin( 0 ); | 547 | // workStartBox->setMargin( 0 ); |
546 | addWidTime(i18n("Daily starting hour:"), | 548 | addWidTime(i18n("Daily starting hour:"), |
547 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 549 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
548 | 550 | ||
549 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 551 | QHBox *workEndBox = new QHBox(workingHoursGroup); |
550 | //workEndBox->setMargin( 0 ); | 552 | //workEndBox->setMargin( 0 ); |
551 | addWidTime(i18n("Daily ending hour:"), | 553 | addWidTime(i18n("Daily ending hour:"), |
552 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 554 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
553 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 555 | QVBox *excludeBox = new QVBox(workingHoursGroup); |
554 | //excludeBox->setMargin( 0 ); | 556 | //excludeBox->setMargin( 0 ); |
555 | addWidBool(i18n("Exclude holidays"), | 557 | addWidBool(i18n("Exclude holidays"), |
556 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); | 558 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); |
557 | 559 | ||
558 | addWidBool(i18n("Exclude Saturdays"), | 560 | addWidBool(i18n("Exclude Saturdays"), |
559 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); | 561 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); |
560 | 562 | ||
561 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), | 563 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), |
562 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), | 564 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), |
563 | // topFrame); | 565 | // topFrame); |
564 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); | 566 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); |
565 | 567 | ||
566 | // topLayout->setRowStretch(6,1); | 568 | // topLayout->setRowStretch(6,1); |
567 | } | 569 | } |
568 | 570 | ||
569 | 571 | ||
570 | void KOPrefsDialog::setupViewsTab() | 572 | void KOPrefsDialog::setupViewsTab() |
571 | { | 573 | { |
572 | 574 | ||
573 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 575 | QFrame *topFrame = addPage(i18n("Views"),0,0); |
574 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 576 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
575 | 577 | ||
576 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 578 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); |
577 | topLayout->setSpacing(mSpacingHint); | 579 | topLayout->setSpacing(mSpacingHint); |
578 | topLayout->setMargin(mMarginHint); | 580 | topLayout->setMargin(mMarginHint); |
579 | 581 | ||
580 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; | 582 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; |
581 | // topLayout->addLayout(dayBeginsLayout,0,0); | 583 | // topLayout->addLayout(dayBeginsLayout,0,0); |
582 | 584 | ||
583 | // KPrefsDialogWidTime *dayBegins = | 585 | // KPrefsDialogWidTime *dayBegins = |
584 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 586 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
585 | // topFrame); | 587 | // topFrame); |
586 | // dayBeginsLayout->addWidget(dayBegins->label()); | 588 | // dayBeginsLayout->addWidget(dayBegins->label()); |
587 | // dayBeginsLayout->addStretch(1); | 589 | // dayBeginsLayout->addStretch(1); |
588 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); | 590 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); |
589 | 591 | ||
590 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; | 592 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; |
591 | // topLayout->addLayout(nextDaysLayout,1,0); | 593 | // topLayout->addLayout(nextDaysLayout,1,0); |
592 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); | 594 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); |
593 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); | 595 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); |
594 | // nextDaysLayout->addStretch(1); | 596 | // nextDaysLayout->addStretch(1); |
595 | // nextDaysLayout->addWidget(mNextXDaysSpin); | 597 | // nextDaysLayout->addWidget(mNextXDaysSpin); |
596 | 598 | ||
597 | 599 | ||
598 | int ii = 0; | 600 | int ii = 0; |
599 | KPrefsDialogWidBool *dummy = | 601 | KPrefsDialogWidBool *dummy = |
600 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), | 602 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), |
601 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); | 603 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); |
602 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 604 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
603 | 605 | ||
604 | 606 | ||
605 | 607 | ||
606 | 608 | ||
607 | 609 | ||
608 | 610 | ||
609 | // topLayout->addWidget(hourSizeGroup,ii++,0); | 611 | // topLayout->addWidget(hourSizeGroup,ii++,0); |
610 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); | 612 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); |
611 | //topLayout->setRowStretch(11,1); | 613 | //topLayout->setRowStretch(11,1); |
612 | 614 | ||
613 | 615 | ||
614 | 616 | ||
615 | 617 | ||
616 | #if 0 | 618 | #if 0 |
617 | 619 | ||
618 | topFrame = addPage(i18n("ViewChange"),0,0); | 620 | topFrame = addPage(i18n("ViewChange"),0,0); |
619 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 621 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
620 | 622 | ||
621 | topLayout = new QGridLayout(topFrame,6,1); | 623 | topLayout = new QGridLayout(topFrame,6,1); |
622 | topLayout->setSpacing(mSpacingHint); | 624 | topLayout->setSpacing(mSpacingHint); |
623 | topLayout->setMargin(mMarginHint); | 625 | topLayout->setMargin(mMarginHint); |
624 | ii = 0; | 626 | ii = 0; |
625 | 627 | ||
626 | #endif | 628 | #endif |
627 | 629 | ||
628 | dummy = | 630 | dummy = |
629 | addWidBool(i18n("Hold fullscreen on view change"), | 631 | addWidBool(i18n("Hold fullscreen on view change"), |
630 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); | 632 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); |
631 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 633 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
632 | 634 | ||
633 | dummy = | 635 | dummy = |
634 | addWidBool(i18n("Hold non-fullscreen on view change"), | 636 | addWidBool(i18n("Hold non-fullscreen on view change"), |
635 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); | 637 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); |
636 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 638 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
637 | 639 | ||
638 | 640 | ||
639 | 641 | ||
640 | KPrefsDialogWidBool *fullViewMonth = | 642 | KPrefsDialogWidBool *fullViewMonth = |
641 | addWidBool(i18n("Next days view uses full window"), | 643 | addWidBool(i18n("Next days view uses full window"), |
642 | &(KOPrefs::instance()->mFullViewMonth),topFrame); | 644 | &(KOPrefs::instance()->mFullViewMonth),topFrame); |
643 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); | 645 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); |
644 | 646 | ||
645 | 647 | ||
646 | KPrefsDialogWidBool *fullViewTodo = | 648 | KPrefsDialogWidBool *fullViewTodo = |
647 | addWidBool(i18n("Event list view uses full window"), | 649 | addWidBool(i18n("Event list view uses full window"), |
648 | &(KOPrefs::instance()->mFullViewTodo),topFrame); | 650 | &(KOPrefs::instance()->mFullViewTodo),topFrame); |
649 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); | 651 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); |
650 | dummy = | 652 | dummy = |
651 | addWidBool(i18n("Listview uses monthly timespan"), | 653 | addWidBool(i18n("Listview uses monthly timespan"), |
652 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); | 654 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); |
653 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 655 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
654 | dummy = | 656 | dummy = |
655 | addWidBool(i18n("Highlight selection in Time Edit"), | 657 | addWidBool(i18n("Highlight selection in Time Edit"), |
656 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); | 658 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); |
657 | topLayout->addWidget( dummy->checkBox(), ii++,0); | 659 | topLayout->addWidget( dummy->checkBox(), ii++,0); |
658 | 660 | ||
659 | KPrefsDialogWidBool *dailyRecur = | 661 | KPrefsDialogWidBool *dailyRecur = |
660 | addWidBool(i18n("Show events that recur daily in date nav."), | 662 | addWidBool(i18n("Show events that recur daily in date nav."), |
661 | &(KOPrefs::instance()->mDailyRecur),topFrame); | 663 | &(KOPrefs::instance()->mDailyRecur),topFrame); |
662 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 664 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
663 | 665 | ||
664 | KPrefsDialogWidBool *weeklyRecur = | 666 | KPrefsDialogWidBool *weeklyRecur = |
665 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 667 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
666 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 668 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
667 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 669 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |
668 | 670 | ||
669 | #ifdef DESKTOP_VERSION | 671 | #ifdef DESKTOP_VERSION |
670 | KPrefsDialogWidBool *enableToolTips = | 672 | KPrefsDialogWidBool *enableToolTips = |
671 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | 673 | addWidBool(i18n("Enable tooltips displaying summary of ev."), |
672 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | 674 | &(KOPrefs::instance()->mEnableToolTips),topFrame); |
673 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | 675 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); |
674 | #endif | 676 | #endif |
675 | // ********************************************************* | 677 | // ********************************************************* |
676 | 678 | ||
677 | topFrame = addPage(i18n("Agenda View"),0,0); | 679 | topFrame = addPage(i18n("Agenda View"),0,0); |
678 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 680 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
679 | 681 | ||
680 | topLayout = new QGridLayout(topFrame,5,1); | 682 | topLayout = new QGridLayout(topFrame,5,1); |
681 | topLayout->setSpacing(mSpacingHint); | 683 | topLayout->setSpacing(mSpacingHint); |
682 | topLayout->setMargin(mMarginHint); | 684 | topLayout->setMargin(mMarginHint); |
683 | ii = 0; | 685 | ii = 0; |
684 | 686 | ||
685 | 687 | ||
686 | dummy = | 688 | dummy = |
687 | addWidBool(i18n("Show time in agenda items"), | 689 | addWidBool(i18n("Show time in agenda items"), |
688 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); | 690 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); |
689 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 691 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
690 | 692 | ||
691 | dummy = | 693 | dummy = |
692 | addWidBool(i18n("Highlight current day in agenda"), | 694 | addWidBool(i18n("Highlight current day in agenda"), |
693 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); | 695 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); |
694 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 696 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
695 | 697 | ||
696 | dummy = | 698 | dummy = |
697 | addWidBool(i18n("Use light color for highlight current day"), | 699 | addWidBool(i18n("Use light color for highlight current day"), |
698 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); | 700 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); |
699 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 701 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
700 | 702 | ||
701 | 703 | ||
702 | KPrefsDialogWidBool *marcusBainsEnabled = | 704 | KPrefsDialogWidBool *marcusBainsEnabled = |
703 | addWidBool(i18n("Show current time"), | 705 | addWidBool(i18n("Show current time"), |
704 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); | 706 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); |
705 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); | 707 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); |
706 | 708 | ||
707 | 709 | ||
708 | dummy = | 710 | dummy = |
709 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), | 711 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), |
710 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); | 712 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); |
711 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 713 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
712 | 714 | ||
713 | dummy = | 715 | dummy = |
714 | addWidBool(i18n("Set agenda to current time on change"), | 716 | addWidBool(i18n("Set agenda to current time on change"), |
715 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); | 717 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); |
716 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 718 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
717 | 719 | ||
718 | 720 | ||
719 | dummy = | 721 | dummy = |
720 | addWidBool(i18n("Allday Agenda view shows todos"), | 722 | addWidBool(i18n("Allday Agenda view shows todos"), |
721 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | 723 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); |
722 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 724 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
723 | 725 | ||
724 | 726 | ||
725 | 727 | ||
726 | dummy = | 728 | dummy = |
727 | addWidBool(i18n("Agenda view shows completed todos"), | 729 | addWidBool(i18n("Agenda view shows completed todos"), |
728 | &(KOPrefs::instance()->mShowCompletedTodoInAgenda),topFrame); | 730 | &(KOPrefs::instance()->mShowCompletedTodoInAgenda),topFrame); |
729 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 731 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
730 | 732 | ||
731 | 733 | ||
732 | 734 | ||
733 | 735 | ||
734 | 736 | ||
735 | topFrame = addPage(i18n("Month View"),0,0); | 737 | topFrame = addPage(i18n("Month View"),0,0); |
736 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 738 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
737 | 739 | ||
738 | topLayout = new QGridLayout(topFrame,5,1); | 740 | topLayout = new QGridLayout(topFrame,5,1); |
739 | topLayout->setSpacing(mSpacingHint); | 741 | topLayout->setSpacing(mSpacingHint); |
740 | topLayout->setMargin(mMarginHint); | 742 | topLayout->setMargin(mMarginHint); |
741 | ii = 0; | 743 | ii = 0; |
742 | QLabel *lab; | 744 | QLabel *lab; |
743 | QHBox *habo = new QHBox( topFrame ); | 745 | QHBox *habo = new QHBox( topFrame ); |
744 | if ( QApplication::desktop()->width() <= 480 ) { | 746 | if ( QApplication::desktop()->width() <= 480 ) { |
745 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 747 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
746 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 748 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
747 | ii++; | 749 | ii++; |
748 | } else { | 750 | } else { |
749 | new QLabel ( i18n("Show events that recur "), habo ); | 751 | new QLabel ( i18n("Show events that recur "), habo ); |
750 | } | 752 | } |
751 | dailyRecur = | 753 | dailyRecur = |
752 | addWidBool(i18n("daily"), | 754 | addWidBool(i18n("daily"), |
753 | &(KOPrefs::instance()->mMonthDailyRecur),habo); | 755 | &(KOPrefs::instance()->mMonthDailyRecur),habo); |
754 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 756 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
755 | 757 | ||
756 | weeklyRecur = | 758 | weeklyRecur = |
757 | addWidBool(i18n("weekly"), | 759 | addWidBool(i18n("weekly"), |
758 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); | 760 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); |
759 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 761 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
760 | ii++; | 762 | ii++; |
761 | 763 | ||
762 | 764 | ||
763 | habo = new QHBox( topFrame ); | 765 | habo = new QHBox( topFrame ); |
764 | if ( QApplication::desktop()->width() <= 480 ) { | 766 | if ( QApplication::desktop()->width() <= 480 ) { |
765 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 767 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
766 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 768 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
767 | ii++; | 769 | ii++; |
768 | 770 | ||
769 | } else { | 771 | } else { |
770 | new QLabel ( i18n("Show in every cell "), habo ); | 772 | new QLabel ( i18n("Show in every cell "), habo ); |
771 | } | 773 | } |
772 | weeklyRecur = | 774 | weeklyRecur = |
773 | addWidBool(i18n("short month"), | 775 | addWidBool(i18n("short month"), |
774 | &(KOPrefs::instance()->mMonthShowShort),habo); | 776 | &(KOPrefs::instance()->mMonthShowShort),habo); |
775 | weeklyRecur = | 777 | weeklyRecur = |
776 | addWidBool(i18n("icons"), | 778 | addWidBool(i18n("icons"), |
777 | &(KOPrefs::instance()->mMonthShowIcons),habo); | 779 | &(KOPrefs::instance()->mMonthShowIcons),habo); |
778 | weeklyRecur = | 780 | weeklyRecur = |
779 | addWidBool(i18n("times"), | 781 | addWidBool(i18n("times"), |
780 | &(KOPrefs::instance()->mMonthShowTimes),habo); | 782 | &(KOPrefs::instance()->mMonthShowTimes),habo); |
781 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 783 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
782 | ii++; | 784 | ii++; |
783 | #ifdef DESKTOP_VERSION | 785 | #ifdef DESKTOP_VERSION |
784 | KPrefsDialogWidBool *enableMonthScroll = | 786 | KPrefsDialogWidBool *enableMonthScroll = |
785 | addWidBool(i18n("Enable scrollbars in month view cells"), | 787 | addWidBool(i18n("Enable scrollbars in month view cells"), |
786 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); | 788 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); |
787 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); | 789 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); |
788 | #endif | 790 | #endif |
789 | dummy = | 791 | dummy = |
790 | addWidBool(i18n("Week view mode uses bigger font"), | 792 | addWidBool(i18n("Week view mode uses bigger font"), |
791 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); | 793 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); |
792 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 794 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
793 | dummy = | 795 | dummy = |
794 | addWidBool(i18n("Show Sat/Sun together"), | 796 | addWidBool(i18n("Show Sat/Sun together"), |
795 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 797 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
796 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 798 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
797 | 799 | ||
798 | KPrefsDialogWidBool *coloredCategoriesInMonthView = | 800 | KPrefsDialogWidBool *coloredCategoriesInMonthView = |
799 | addWidBool(i18n("Month view uses category colors"), | 801 | addWidBool(i18n("Month view uses category colors"), |
800 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); | 802 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); |
801 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 803 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
802 | 804 | ||
803 | dummy = | 805 | dummy = |
804 | addWidBool(i18n("Category colors are applied to text"), | 806 | addWidBool(i18n("Category colors are applied to text"), |
805 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 807 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
806 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 808 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
807 | coloredCategoriesInMonthView = | 809 | coloredCategoriesInMonthView = |
808 | addWidBool(i18n("Month view uses day colors"), | 810 | addWidBool(i18n("Month view uses day colors"), |
809 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); | 811 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); |
810 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 812 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
811 | 813 | ||
812 | KPrefsDialogWidColor *holidayColor = | 814 | KPrefsDialogWidColor *holidayColor = |
813 | addWidColor(i18n("Day color odd months"), | 815 | addWidColor(i18n("Day color odd months"), |
814 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); | 816 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); |
815 | topLayout->addWidget(holidayColor->label(),ii,0); | 817 | topLayout->addWidget(holidayColor->label(),ii,0); |
816 | topLayout->addWidget(holidayColor->button(),ii++,1); | 818 | topLayout->addWidget(holidayColor->button(),ii++,1); |
817 | 819 | ||
818 | holidayColor = | 820 | holidayColor = |
819 | addWidColor(i18n("Day color even months"), | 821 | addWidColor(i18n("Day color even months"), |
820 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); | 822 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); |
821 | topLayout->addWidget(holidayColor->label(),ii,0); | 823 | topLayout->addWidget(holidayColor->label(),ii,0); |
822 | topLayout->addWidget(holidayColor->button(),ii++,1); | 824 | topLayout->addWidget(holidayColor->button(),ii++,1); |
823 | 825 | ||
824 | 826 | ||
825 | holidayColor = | 827 | holidayColor = |
826 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 828 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
827 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 829 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
828 | topLayout->addWidget(holidayColor->label(),ii,0); | 830 | topLayout->addWidget(holidayColor->label(),ii,0); |
829 | topLayout->addWidget(holidayColor->button(),ii++,1); | 831 | topLayout->addWidget(holidayColor->button(),ii++,1); |
830 | // *********************** What'sNext View | 832 | // *********************** What'sNext View |
831 | topFrame = addPage(i18n("What's Next View"),0,0); | 833 | topFrame = addPage(i18n("What's Next View"),0,0); |
832 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 834 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
833 | 835 | ||
834 | topLayout = new QGridLayout(topFrame,4,1); | 836 | topLayout = new QGridLayout(topFrame,4,1); |
835 | topLayout->setSpacing(mSpacingHint); | 837 | topLayout->setSpacing(mSpacingHint); |
836 | topLayout->setMargin(mMarginHint); | 838 | topLayout->setMargin(mMarginHint); |
837 | ii = 0; | 839 | ii = 0; |
838 | 840 | ||
839 | 841 | ||
840 | QHBox* hdummy = new QHBox(topFrame); | 842 | QHBox* hdummy = new QHBox(topFrame); |
841 | new QLabel(i18n("Days in What's Next:"),hdummy); | 843 | new QLabel(i18n("Days in What's Next:"),hdummy); |
842 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); | 844 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); |
843 | 845 | ||
844 | topLayout->addWidget(hdummy,ii++,0); | 846 | topLayout->addWidget(hdummy,ii++,0); |
845 | 847 | ||
846 | QHBox *prioBox = new QHBox(topFrame); | 848 | QHBox *prioBox = new QHBox(topFrame); |
847 | // intervalBox->setSpacing(mSpacingHint); | 849 | // intervalBox->setSpacing(mSpacingHint); |
848 | topLayout->addWidget(prioBox,ii++,0); | 850 | topLayout->addWidget(prioBox,ii++,0); |
849 | 851 | ||
850 | QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); | 852 | QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); |
851 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 853 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
852 | if ( QApplication::desktop()->width() < 300 ) | 854 | if ( QApplication::desktop()->width() < 300 ) |
853 | mPrioSpin->setFixedWidth( 40 ); | 855 | mPrioSpin->setFixedWidth( 40 ); |
854 | 856 | ||
855 | KPrefsDialogWidBool *passwdk = | 857 | KPrefsDialogWidBool *passwdk = |
856 | 858 | ||
857 | addWidBool(i18n("Show events that are done"), | 859 | addWidBool(i18n("Show events that are done"), |
858 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); | 860 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); |
859 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 861 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
860 | passwdk = | 862 | passwdk = |
861 | addWidBool(i18n("Show parent To-Do's"), | 863 | addWidBool(i18n("Show parent To-Do's"), |
862 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | 864 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); |
863 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 865 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
864 | 866 | ||
865 | passwdk = | 867 | passwdk = |
866 | addWidBool(i18n("Show location"), | 868 | addWidBool(i18n("Show location"), |
867 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | 869 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); |
868 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 870 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
869 | 871 | ||
870 | 872 | ||
871 | passwdk = | 873 | passwdk = |
872 | addWidBool(i18n("Use short date in WN+Event view"), | 874 | addWidBool(i18n("Use short date in WN+Event view"), |
873 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 875 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
874 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 876 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
875 | 877 | ||
876 | 878 | ||
877 | 879 | ||
878 | 880 | ||
879 | // *********************** Todo View | 881 | // *********************** Todo View |
880 | 882 | ||
881 | topFrame = addPage(i18n("Todo View"),0,0); | 883 | topFrame = addPage(i18n("Todo View"),0,0); |
882 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 884 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
883 | 885 | ||
884 | topLayout = new QGridLayout(topFrame,4,1); | 886 | topLayout = new QGridLayout(topFrame,4,1); |
885 | topLayout->setSpacing(mSpacingHint); | 887 | topLayout->setSpacing(mSpacingHint); |
886 | topLayout->setMargin(mMarginHint); | 888 | topLayout->setMargin(mMarginHint); |
887 | ii = 0; | 889 | ii = 0; |
888 | dummy = | 890 | dummy = |
889 | addWidBool(i18n("Hide not running Todos in To-do view"), | 891 | addWidBool(i18n("Hide not running Todos in To-do view"), |
890 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); | 892 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); |
891 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 893 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
892 | 894 | ||
893 | 895 | ||
894 | KPrefsDialogWidBool *showCompletedTodo = | 896 | KPrefsDialogWidBool *showCompletedTodo = |
895 | addWidBool(i18n("To-do view shows completed Todos"), | 897 | addWidBool(i18n("To-do view shows completed Todos"), |
896 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); | 898 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); |
897 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); | 899 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); |
898 | dummy = | 900 | dummy = |
899 | addWidBool(i18n("To-do view shows complete as 'xx %'"), | 901 | addWidBool(i18n("To-do view shows complete as 'xx %'"), |
900 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); | 902 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); |
901 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 903 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
902 | 904 | ||
903 | dummy = | 905 | dummy = |
904 | addWidBool(i18n("Small To-do view uses smaller font"), | 906 | addWidBool(i18n("Small To-do view uses smaller font"), |
905 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); | 907 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); |
906 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 908 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
907 | 909 | ||
908 | 910 | ||
909 | 911 | ||
910 | dummy = | 912 | dummy = |
911 | addWidBool(i18n("Todo view uses category colors"), | 913 | addWidBool(i18n("Todo view uses category colors"), |
912 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); | 914 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); |
913 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 915 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
914 | 916 | ||
915 | 917 | ||
916 | QWidget* wid = new QWidget( topFrame ); | 918 | QWidget* wid = new QWidget( topFrame ); |
917 | // Todo run today color | 919 | // Todo run today color |
918 | KPrefsDialogWidColor *todoRunColor = | 920 | KPrefsDialogWidColor *todoRunColor = |
919 | addWidColor(i18n("Color for running todos:"), | 921 | addWidColor(i18n("Color for running todos:"), |
920 | &(KOPrefs::instance()->mTodoRunColor),wid); | 922 | &(KOPrefs::instance()->mTodoRunColor),wid); |
921 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 923 | QHBoxLayout *widLayout = new QHBoxLayout(wid); |
922 | widLayout->addWidget( todoRunColor->label() ); | 924 | widLayout->addWidget( todoRunColor->label() ); |
923 | widLayout->addWidget( todoRunColor->button() ); | 925 | widLayout->addWidget( todoRunColor->button() ); |
924 | topLayout->addWidget(wid,ii++,0); | 926 | topLayout->addWidget(wid,ii++,0); |
925 | 927 | ||
926 | wid = new QWidget( topFrame ); | 928 | wid = new QWidget( topFrame ); |
927 | // Todo due today color | 929 | // Todo due today color |
928 | KPrefsDialogWidColor *todoDueTodayColor = | 930 | KPrefsDialogWidColor *todoDueTodayColor = |
929 | addWidColor(i18n("Todo due today color:"), | 931 | addWidColor(i18n("Todo due today color:"), |
930 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 932 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
931 | widLayout = new QHBoxLayout(wid); | 933 | widLayout = new QHBoxLayout(wid); |
932 | widLayout->addWidget( todoDueTodayColor->label() ); | 934 | widLayout->addWidget( todoDueTodayColor->label() ); |
933 | widLayout->addWidget( todoDueTodayColor->button() ); | 935 | widLayout->addWidget( todoDueTodayColor->button() ); |
934 | topLayout->addWidget(wid,ii++,0); | 936 | topLayout->addWidget(wid,ii++,0); |
935 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 937 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
936 | 938 | ||
937 | // Todo overdue color | 939 | // Todo overdue color |
938 | wid = new QWidget( topFrame ); | 940 | wid = new QWidget( topFrame ); |
939 | widLayout = new QHBoxLayout(wid); | 941 | widLayout = new QHBoxLayout(wid); |
940 | KPrefsDialogWidColor *todoOverdueColor = | 942 | KPrefsDialogWidColor *todoOverdueColor = |
941 | addWidColor(i18n("Todo overdue color:"), | 943 | addWidColor(i18n("Todo overdue color:"), |
942 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 944 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
943 | widLayout->addWidget(todoOverdueColor->label()); | 945 | widLayout->addWidget(todoOverdueColor->label()); |
944 | widLayout->addWidget(todoOverdueColor->button()); | 946 | widLayout->addWidget(todoOverdueColor->button()); |
945 | topLayout->addWidget(wid,ii++,0); | 947 | topLayout->addWidget(wid,ii++,0); |
946 | 948 | ||
947 | dummy = | 949 | dummy = |
948 | addWidBool(i18n("Colors are applied to text"), | 950 | addWidBool(i18n("Colors are applied to text"), |
949 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); | 951 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); |
950 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 952 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
951 | 953 | ||
952 | 954 | ||
953 | 955 | ||
954 | topFrame = addPage(i18n("View Options"),0,0); | 956 | topFrame = addPage(i18n("View Options"),0,0); |
955 | 957 | ||
956 | topLayout = new QGridLayout(topFrame,4,1); | 958 | topLayout = new QGridLayout(topFrame,4,1); |
957 | topLayout->setSpacing(mSpacingHint); | 959 | topLayout->setSpacing(mSpacingHint); |
958 | topLayout->setMargin(mMarginHint); | 960 | topLayout->setMargin(mMarginHint); |
959 | ii = 0; | 961 | ii = 0; |
960 | 962 | ||
961 | dummy = | 963 | dummy = |
962 | addWidBool(i18n("Show Sync Events"), | 964 | addWidBool(i18n("Show Sync Events"), |
963 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 965 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
964 | topLayout->addWidget(dummy->checkBox(), ii++,0); | 966 | topLayout->addWidget(dummy->checkBox(), ii++,0); |
965 | 967 | ||
966 | lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); | 968 | lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); |
967 | topLayout->addWidget(lab ,ii++,0); | 969 | topLayout->addWidget(lab ,ii++,0); |
968 | 970 | ||
969 | dummy = addWidBool(i18n("Details"), | 971 | dummy = addWidBool(i18n("Details"), |
970 | &(KOPrefs::instance()->mEVshowDetails),topFrame); | 972 | &(KOPrefs::instance()->mEVshowDetails),topFrame); |
971 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 973 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
972 | dummy = addWidBool(i18n("Created time"), | 974 | dummy = addWidBool(i18n("Created time"), |
973 | &(KOPrefs::instance()->mEVshowCreated),topFrame); | 975 | &(KOPrefs::instance()->mEVshowCreated),topFrame); |
974 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 976 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
975 | dummy = addWidBool(i18n("Last modified time"), | 977 | dummy = addWidBool(i18n("Last modified time"), |
976 | &(KOPrefs::instance()->mEVshowChanged),topFrame); | 978 | &(KOPrefs::instance()->mEVshowChanged),topFrame); |
977 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 979 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
978 | 980 | ||
979 | 981 | ||
980 | lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); | 982 | lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); |
981 | topLayout->addWidget(lab ,ii++,0); | 983 | topLayout->addWidget(lab ,ii++,0); |
982 | 984 | ||
983 | dummy = addWidBool(i18n("Details"), | 985 | dummy = addWidBool(i18n("Details"), |
984 | &(KOPrefs::instance()->mWTshowDetails),topFrame); | 986 | &(KOPrefs::instance()->mWTshowDetails),topFrame); |
985 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 987 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
986 | dummy = addWidBool(i18n("Created time"), | 988 | dummy = addWidBool(i18n("Created time"), |
987 | &(KOPrefs::instance()->mWTshowCreated),topFrame); | 989 | &(KOPrefs::instance()->mWTshowCreated),topFrame); |
988 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 990 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
989 | dummy = addWidBool(i18n("Last modified time"), | 991 | dummy = addWidBool(i18n("Last modified time"), |
990 | &(KOPrefs::instance()->mWTshowChanged),topFrame); | 992 | &(KOPrefs::instance()->mWTshowChanged),topFrame); |
991 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 993 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
992 | 994 | ||
993 | 995 | ||
994 | topFrame = addPage(i18n("Alarm"),0,0); | 996 | topFrame = addPage(i18n("Alarm"),0,0); |
995 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 997 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
996 | 998 | ||
997 | topLayout = new QGridLayout(topFrame,2,1); | 999 | topLayout = new QGridLayout(topFrame,2,1); |
998 | topLayout->setSpacing(mSpacingHint); | 1000 | topLayout->setSpacing(mSpacingHint); |
999 | topLayout->setMargin(mMarginHint); | 1001 | topLayout->setMargin(mMarginHint); |
1000 | int iii = 0; | 1002 | int iii = 0; |
1001 | 1003 | ||
1002 | dummy = | 1004 | dummy = |
1003 | addWidBool(i18n("Use internal alarm notification"), | 1005 | addWidBool(i18n("Use internal alarm notification"), |
1004 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); | 1006 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); |
1005 | topLayout->addWidget(dummy->checkBox(),iii++,0); | 1007 | topLayout->addWidget(dummy->checkBox(),iii++,0); |
1006 | 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); | 1008 | 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); |
1007 | 1009 | ||
1008 | topLayout->addWidget(lab ,iii++,0); | 1010 | topLayout->addWidget(lab ,iii++,0); |
1009 | #ifndef DESKTOP_VERSION | 1011 | #ifndef DESKTOP_VERSION |
1010 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 1012 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
1011 | #else | 1013 | #else |
1012 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 1014 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
1013 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 1015 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
1014 | #endif | 1016 | #endif |
1015 | 1017 | ||
1016 | QHBox* dummyBox = new QHBox(topFrame); | 1018 | QHBox* dummyBox = new QHBox(topFrame); |
1017 | new QLabel(i18n("Play beeps count:"),dummyBox); | 1019 | new QLabel(i18n("Play beeps count:"),dummyBox); |
1018 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 1020 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
1019 | topLayout->addWidget(dummyBox,iii++,0); | 1021 | topLayout->addWidget(dummyBox,iii++,0); |
1020 | 1022 | ||
1021 | dummyBox = new QHBox(topFrame); | 1023 | dummyBox = new QHBox(topFrame); |
1022 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); | 1024 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); |
1023 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); | 1025 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); |
1024 | topLayout->addWidget(dummyBox,iii++,0); | 1026 | topLayout->addWidget(dummyBox,iii++,0); |
1025 | 1027 | ||
1026 | dummyBox = new QHBox(topFrame); | 1028 | dummyBox = new QHBox(topFrame); |
1027 | new QLabel(i18n("Default suspend time in min:"),dummyBox); | 1029 | new QLabel(i18n("Default suspend time in min:"),dummyBox); |
1028 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); | 1030 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); |
1029 | topLayout->addWidget(dummyBox,iii++,0); | 1031 | topLayout->addWidget(dummyBox,iii++,0); |
1030 | 1032 | ||
1031 | dummyBox = new QHBox(topFrame); | 1033 | dummyBox = new QHBox(topFrame); |
1032 | new QLabel(i18n("Auto suspend count:"),dummyBox); | 1034 | new QLabel(i18n("Auto suspend count:"),dummyBox); |
1033 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); | 1035 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); |
1034 | topLayout->addWidget(dummyBox,iii++,0); | 1036 | topLayout->addWidget(dummyBox,iii++,0); |
1035 | 1037 | ||
1036 | 1038 | ||
1037 | 1039 | ||
1038 | QHBox* hbo = new QHBox ( topFrame ); | 1040 | QHBox* hbo = new QHBox ( topFrame ); |
1039 | mDefaultAlarmFile = new QLineEdit(hbo); | 1041 | mDefaultAlarmFile = new QLineEdit(hbo); |
1040 | QPushButton * loadTemplate = new QPushButton(hbo); | 1042 | QPushButton * loadTemplate = new QPushButton(hbo); |
1041 | QPixmap icon; | 1043 | QPixmap icon; |
1042 | if ( QApplication::desktop()->width() < 321 ) | 1044 | if ( QApplication::desktop()->width() < 321 ) |
1043 | icon = SmallIcon("fileimport16"); | 1045 | icon = SmallIcon("fileimport16"); |
1044 | else | 1046 | else |
1045 | icon = SmallIcon("fileimport"); | 1047 | icon = SmallIcon("fileimport"); |
1046 | loadTemplate->setIconSet (icon ) ; | 1048 | loadTemplate->setIconSet (icon ) ; |
1047 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); | 1049 | connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); |
1048 | int size = loadTemplate->sizeHint().height(); | 1050 | int size = loadTemplate->sizeHint().height(); |
1049 | loadTemplate->setFixedSize( size, size ); | 1051 | loadTemplate->setFixedSize( size, size ); |
1050 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); | 1052 | //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); |
1051 | // topLayout->addWidget(lab ,iii++,0); | 1053 | // topLayout->addWidget(lab ,iii++,0); |
1052 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); | 1054 | lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); |
1053 | topLayout->addWidget(lab ,iii++,0); | 1055 | topLayout->addWidget(lab ,iii++,0); |
1054 | topLayout->addWidget(hbo,iii++,0); | 1056 | topLayout->addWidget(hbo,iii++,0); |
1055 | // 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); | 1057 | // 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); |
1056 | 1058 | ||
1057 | // topLayout->addWidget(lab ,iii++,0); | 1059 | // topLayout->addWidget(lab ,iii++,0); |
1058 | // #ifndef DESKTOP_VERSION | 1060 | // #ifndef DESKTOP_VERSION |
1059 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 1061 | // lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
1060 | // #else | 1062 | // #else |
1061 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 1063 | // lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
1062 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 1064 | // lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
1063 | // #endif | 1065 | // #endif |
1064 | 1066 | ||
1065 | 1067 | ||
1066 | } | 1068 | } |
1067 | 1069 | ||
1068 | void KOPrefsDialog::selectSoundFile() | 1070 | void KOPrefsDialog::selectSoundFile() |
1069 | { | 1071 | { |
1070 | QString fileName = mDefaultAlarmFile->text(); | 1072 | QString fileName = mDefaultAlarmFile->text(); |
1071 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); | 1073 | fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); |
1072 | if ( fileName.length() > 0 ) | 1074 | if ( fileName.length() > 0 ) |
1073 | mDefaultAlarmFile->setText( fileName ); | 1075 | mDefaultAlarmFile->setText( fileName ); |
1074 | } | 1076 | } |
1075 | void KOPrefsDialog::setupFontsTab() | 1077 | void KOPrefsDialog::setupFontsTab() |
1076 | { | 1078 | { |
1077 | 1079 | ||
1078 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); | 1080 | QFrame *topFrame = addPage(i18n("Fonts"),0,0); |
1079 | // DesktopIcon("fonts",KIcon::SizeMedium)); | 1081 | // DesktopIcon("fonts",KIcon::SizeMedium)); |
1080 | 1082 | ||
1081 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); | 1083 | QGridLayout *topLayout = new QGridLayout(topFrame,7,3); |
1082 | topLayout->setSpacing(1); | 1084 | topLayout->setSpacing(1); |
1083 | topLayout->setMargin(3); | 1085 | topLayout->setMargin(3); |
1084 | KPrefsDialogWidFont * tVFont; | 1086 | KPrefsDialogWidFont * tVFont; |
1085 | int i = 0; | 1087 | int i = 0; |
1086 | KPrefsDialogWidFont *timeLabelsFont = | 1088 | KPrefsDialogWidFont *timeLabelsFont = |
1087 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), | 1089 | addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), |
1088 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); | 1090 | &(KOPrefs::instance()->mDateNavigatorFont),topFrame); |
1089 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 1091 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
1090 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 1092 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
1091 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 1093 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
1092 | ++i; | 1094 | ++i; |
1093 | 1095 | ||
1094 | 1096 | ||
1095 | timeLabelsFont = | 1097 | timeLabelsFont = |
1096 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), | 1098 | addWidFont(i18n("Mon 15"),i18n("Date Labels:"), |
1097 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); | 1099 | &(KOPrefs::instance()->mTimeLabelsFont),topFrame); |
1098 | topLayout->addWidget(timeLabelsFont->label(),i,0); | 1100 | topLayout->addWidget(timeLabelsFont->label(),i,0); |
1099 | topLayout->addWidget(timeLabelsFont->preview(),i,1); | 1101 | topLayout->addWidget(timeLabelsFont->preview(),i,1); |
1100 | topLayout->addWidget(timeLabelsFont->button(),i,2); | 1102 | topLayout->addWidget(timeLabelsFont->button(),i,2); |
1101 | ++i; | 1103 | ++i; |
1102 | 1104 | ||
1103 | KPrefsDialogWidFont *timeBarFont = | 1105 | KPrefsDialogWidFont *timeBarFont = |
1104 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), | 1106 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), |
1105 | &(KOPrefs::instance()->mTimeBarFont),topFrame); | 1107 | &(KOPrefs::instance()->mTimeBarFont),topFrame); |
1106 | topLayout->addWidget(timeBarFont->label(),i,0); | 1108 | topLayout->addWidget(timeBarFont->label(),i,0); |
1107 | topLayout->addWidget(timeBarFont->preview(),i,1); | 1109 | topLayout->addWidget(timeBarFont->preview(),i,1); |
1108 | topLayout->addWidget(timeBarFont->button(),i,2); | 1110 | topLayout->addWidget(timeBarFont->button(),i,2); |
1109 | ++i; | 1111 | ++i; |
1110 | 1112 | ||
1111 | 1113 | ||
1112 | KPrefsDialogWidFont *marcusBainsFont = | 1114 | KPrefsDialogWidFont *marcusBainsFont = |
1113 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), | 1115 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), |
1114 | &(KOPrefs::instance()->mMarcusBainsFont),topFrame); | 1116 | &(KOPrefs::instance()->mMarcusBainsFont),topFrame); |
1115 | topLayout->addWidget(marcusBainsFont->label(),i,0); | 1117 | topLayout->addWidget(marcusBainsFont->label(),i,0); |
1116 | topLayout->addWidget(marcusBainsFont->preview(),i,1); | 1118 | topLayout->addWidget(marcusBainsFont->preview(),i,1); |
1117 | topLayout->addWidget(marcusBainsFont->button(),i,2); | 1119 | topLayout->addWidget(marcusBainsFont->button(),i,2); |
1118 | ++i; | 1120 | ++i; |
1119 | 1121 | ||
1120 | tVFont = | 1122 | tVFont = |
1121 | addWidFont(i18n("Summary"),i18n("Event Viewer:"), | 1123 | addWidFont(i18n("Summary"),i18n("Event Viewer:"), |
1122 | &(KOPrefs::instance()->mEventViewFont),topFrame); | 1124 | &(KOPrefs::instance()->mEventViewFont),topFrame); |
1123 | topLayout->addWidget(tVFont->label(),i,0); | 1125 | topLayout->addWidget(tVFont->label(),i,0); |
1124 | topLayout->addWidget(tVFont->preview(),i,1); | 1126 | topLayout->addWidget(tVFont->preview(),i,1); |
1125 | topLayout->addWidget(tVFont->button(),i,2); | 1127 | topLayout->addWidget(tVFont->button(),i,2); |
1126 | ++i; | 1128 | ++i; |
1127 | 1129 | ||
1128 | 1130 | ||
1129 | 1131 | ||
1130 | tVFont = | 1132 | tVFont = |
1131 | addWidFont(i18n("Details"),i18n("EditorBox:"), | 1133 | addWidFont(i18n("Details"),i18n("EditorBox:"), |
1132 | &(KOPrefs::instance()->mEditBoxFont),topFrame); | 1134 | &(KOPrefs::instance()->mEditBoxFont),topFrame); |
1133 | topLayout->addWidget(tVFont->label(),i,0); | 1135 | topLayout->addWidget(tVFont->label(),i,0); |
1134 | topLayout->addWidget(tVFont->preview(),i,1); | 1136 | topLayout->addWidget(tVFont->preview(),i,1); |
1135 | topLayout->addWidget(tVFont->button(),i,2); | 1137 | topLayout->addWidget(tVFont->button(),i,2); |
1136 | ++i; | 1138 | ++i; |
1137 | 1139 | ||
1138 | 1140 | ||
1139 | 1141 | ||
1140 | topLayout->setColStretch(1,1); | 1142 | topLayout->setColStretch(1,1); |
1141 | topLayout->setRowStretch(4,1); | 1143 | topLayout->setRowStretch(4,1); |
1142 | 1144 | ||
1143 | 1145 | ||
1144 | i = 0; | 1146 | i = 0; |
1145 | topFrame = addPage(i18n("View Fonts"),0, | 1147 | topFrame = addPage(i18n("View Fonts"),0, |
1146 | DesktopIcon("fonts",KIcon::SizeMedium)); | 1148 | DesktopIcon("fonts",KIcon::SizeMedium)); |
1147 | 1149 | ||
1148 | topLayout = new QGridLayout(topFrame,7,3); | 1150 | topLayout = new QGridLayout(topFrame,7,3); |
1149 | topLayout->setSpacing(1); | 1151 | topLayout->setSpacing(1); |
1150 | topLayout->setMargin(3); | 1152 | topLayout->setMargin(3); |
1151 | 1153 | ||
1152 | tVFont = | 1154 | tVFont = |
1153 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), | 1155 | addWidFont(i18n("Configure KO"),i18n("What's Next View:"), |
1154 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); | 1156 | &(KOPrefs::instance()->mWhatsNextFont),topFrame); |
1155 | topLayout->addWidget(tVFont->label(),i,0); | 1157 | topLayout->addWidget(tVFont->label(),i,0); |
1156 | topLayout->addWidget(tVFont->preview(),i,1); | 1158 | topLayout->addWidget(tVFont->preview(),i,1); |
1157 | topLayout->addWidget(tVFont->button(),i,2); | 1159 | topLayout->addWidget(tVFont->button(),i,2); |
1158 | ++i; | 1160 | ++i; |
1159 | KPrefsDialogWidFont *agendaViewFont = | 1161 | KPrefsDialogWidFont *agendaViewFont = |
1160 | addWidFont(i18n("Event text"),i18n("Agenda view:"), | 1162 | addWidFont(i18n("Event text"),i18n("Agenda view:"), |
1161 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); | 1163 | &(KOPrefs::instance()->mAgendaViewFont),topFrame); |
1162 | topLayout->addWidget(agendaViewFont->label(),i,0); | 1164 | topLayout->addWidget(agendaViewFont->label(),i,0); |
1163 | topLayout->addWidget(agendaViewFont->preview(),i,1); | 1165 | topLayout->addWidget(agendaViewFont->preview(),i,1); |
1164 | topLayout->addWidget(agendaViewFont->button(),i,2); | 1166 | topLayout->addWidget(agendaViewFont->button(),i,2); |
1165 | ++i; | 1167 | ++i; |
1166 | 1168 | ||
1167 | 1169 | ||
1168 | KPrefsDialogWidFont *monthViewFont = | 1170 | KPrefsDialogWidFont *monthViewFont = |
1169 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), | 1171 | addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), |
1170 | i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); | 1172 | i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); |
1171 | topLayout->addWidget(monthViewFont->label(),i,0); | 1173 | topLayout->addWidget(monthViewFont->label(),i,0); |
1172 | topLayout->addWidget(monthViewFont->preview(),i,1); | 1174 | topLayout->addWidget(monthViewFont->preview(),i,1); |
1173 | topLayout->addWidget(monthViewFont->button(),i,2); | 1175 | topLayout->addWidget(monthViewFont->button(),i,2); |
1174 | ++i; | 1176 | ++i; |
1175 | 1177 | ||
1176 | 1178 | ||
1177 | KPrefsDialogWidFont *lVFont = | 1179 | KPrefsDialogWidFont *lVFont = |
1178 | addWidFont(i18n("Event"),i18n("List View:"), | 1180 | addWidFont(i18n("Event"),i18n("List View:"), |
1179 | &(KOPrefs::instance()->mListViewFont),topFrame); | 1181 | &(KOPrefs::instance()->mListViewFont),topFrame); |
1180 | topLayout->addWidget(lVFont->label(),i,0); | 1182 | topLayout->addWidget(lVFont->label(),i,0); |
1181 | topLayout->addWidget(lVFont->preview(),i,1); | 1183 | topLayout->addWidget(lVFont->preview(),i,1); |
1182 | topLayout->addWidget(lVFont->button(),i,2); | 1184 | topLayout->addWidget(lVFont->button(),i,2); |
1183 | ++i; | 1185 | ++i; |
1184 | 1186 | ||
1185 | 1187 | ||
1186 | tVFont = | 1188 | tVFont = |
1187 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), | 1189 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), |
1188 | &(KOPrefs::instance()->mTodoViewFont),topFrame); | 1190 | &(KOPrefs::instance()->mTodoViewFont),topFrame); |
1189 | topLayout->addWidget(tVFont->label(),i,0); | 1191 | topLayout->addWidget(tVFont->label(),i,0); |
1190 | topLayout->addWidget(tVFont->preview(),i,1); | 1192 | topLayout->addWidget(tVFont->preview(),i,1); |
1191 | topLayout->addWidget(tVFont->button(),i,2); | 1193 | topLayout->addWidget(tVFont->button(),i,2); |
1192 | ++i; | 1194 | ++i; |
1193 | 1195 | ||
1194 | 1196 | ||
1195 | tVFont = | 1197 | tVFont = |
1196 | addWidFont(i18n("Today"),i18n("JournalView:"), | 1198 | addWidFont(i18n("Today"),i18n("JournalView:"), |
1197 | &(KOPrefs::instance()->mJornalViewFont),topFrame); | 1199 | &(KOPrefs::instance()->mJornalViewFont),topFrame); |
1198 | topLayout->addWidget(tVFont->label(),i,0); | 1200 | topLayout->addWidget(tVFont->label(),i,0); |
1199 | topLayout->addWidget(tVFont->preview(),i,1); | 1201 | topLayout->addWidget(tVFont->preview(),i,1); |
1200 | topLayout->addWidget(tVFont->button(),i,2); | 1202 | topLayout->addWidget(tVFont->button(),i,2); |
1201 | ++i; | 1203 | ++i; |
1202 | 1204 | ||
1203 | 1205 | ||
1204 | 1206 | ||
1205 | 1207 | ||
1206 | topLayout->setColStretch(1,1); | 1208 | topLayout->setColStretch(1,1); |
1207 | topLayout->setRowStretch(4,1); | 1209 | topLayout->setRowStretch(4,1); |
1208 | 1210 | ||
1209 | 1211 | ||
1210 | 1212 | ||
1211 | 1213 | ||
1212 | } | 1214 | } |
1213 | 1215 | ||
1214 | void KOPrefsDialog::setupColorsTab() | 1216 | void KOPrefsDialog::setupColorsTab() |
1215 | { | 1217 | { |
1216 | QFrame *topFrame = addPage(i18n("Colors"),0,0); | 1218 | QFrame *topFrame = addPage(i18n("Colors"),0,0); |
1217 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1219 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1218 | 1220 | ||
1219 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1221 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1220 | // topLayout->setSpacing(mSpacingHint); | 1222 | // topLayout->setSpacing(mSpacingHint); |
1221 | // topLayout->setMargin(mMarginHint); | 1223 | // topLayout->setMargin(mMarginHint); |
1222 | 1224 | ||
1223 | topLayout->setSpacing(2); | 1225 | topLayout->setSpacing(2); |
1224 | topLayout->setMargin(3); | 1226 | topLayout->setMargin(3); |
1225 | 1227 | ||
1226 | int ii = 1; | 1228 | int ii = 1; |
1227 | QGroupBox *categoryGroup ; | 1229 | QGroupBox *categoryGroup ; |
1228 | 1230 | ||
1229 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), | 1231 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), |
1230 | topFrame); | 1232 | topFrame); |
1231 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); | 1233 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); |
1232 | 1234 | ||
1233 | mCategoryCombo = new QComboBox(categoryGroup); | 1235 | mCategoryCombo = new QComboBox(categoryGroup); |
1234 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1236 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1235 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); | 1237 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); |
1236 | 1238 | ||
1237 | mCategoryButton = new KColorButton(categoryGroup); | 1239 | mCategoryButton = new KColorButton(categoryGroup); |
1238 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); | 1240 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); |
1239 | updateCategoryColor(); | 1241 | updateCategoryColor(); |
1240 | 1242 | ||
1241 | 1243 | ||
1242 | // Holiday Color | 1244 | // Holiday Color |
1243 | 1245 | ||
1244 | KPrefsDialogWidColor *holidayColor = | 1246 | KPrefsDialogWidColor *holidayColor = |
1245 | addWidColor(i18n("Holiday color:"), | 1247 | addWidColor(i18n("Holiday color:"), |
1246 | &(KOPrefs::instance()->mHolidayColor),topFrame); | 1248 | &(KOPrefs::instance()->mHolidayColor),topFrame); |
1247 | topLayout->addWidget(holidayColor->label(),ii,0); | 1249 | topLayout->addWidget(holidayColor->label(),ii,0); |
1248 | topLayout->addWidget(holidayColor->button(),ii++,1); | 1250 | topLayout->addWidget(holidayColor->button(),ii++,1); |
1249 | 1251 | ||
1250 | // Highlight Color | 1252 | // Highlight Color |
1251 | KPrefsDialogWidColor *highlightColor = | 1253 | KPrefsDialogWidColor *highlightColor = |
1252 | addWidColor(i18n("Highlight color:"), | 1254 | addWidColor(i18n("Highlight color:"), |
1253 | &(KOPrefs::instance()->mHighlightColor),topFrame); | 1255 | &(KOPrefs::instance()->mHighlightColor),topFrame); |
1254 | topLayout->addWidget(highlightColor->label(),ii,0); | 1256 | topLayout->addWidget(highlightColor->label(),ii,0); |
1255 | topLayout->addWidget(highlightColor->button(),ii++,1); | 1257 | topLayout->addWidget(highlightColor->button(),ii++,1); |
1256 | 1258 | ||
1257 | // Event color | 1259 | // Event color |
1258 | KPrefsDialogWidColor *eventColor = | 1260 | KPrefsDialogWidColor *eventColor = |
1259 | addWidColor(i18n("Default event color:"), | 1261 | addWidColor(i18n("Default event color:"), |
1260 | &(KOPrefs::instance()->mEventColor),topFrame); | 1262 | &(KOPrefs::instance()->mEventColor),topFrame); |
1261 | topLayout->addWidget(eventColor->label(),ii,0); | 1263 | topLayout->addWidget(eventColor->label(),ii,0); |
1262 | topLayout->addWidget(eventColor->button(),ii++,1); | 1264 | topLayout->addWidget(eventColor->button(),ii++,1); |
1263 | eventColor = | 1265 | eventColor = |
1264 | addWidColor(i18n("Default todo done color:"), | 1266 | addWidColor(i18n("Default todo done color:"), |
1265 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); | 1267 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); |
1266 | topLayout->addWidget(eventColor->label(),ii,0); | 1268 | topLayout->addWidget(eventColor->label(),ii,0); |
1267 | topLayout->addWidget(eventColor->button(),ii++,1); | 1269 | topLayout->addWidget(eventColor->button(),ii++,1); |
1268 | 1270 | ||
1269 | 1271 | ||
1270 | // agenda view background color | 1272 | // agenda view background color |
1271 | KPrefsDialogWidColor *agendaBgColor = | 1273 | KPrefsDialogWidColor *agendaBgColor = |
1272 | addWidColor(i18n("Agenda view background color:"), | 1274 | addWidColor(i18n("Agenda view background color:"), |
1273 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); | 1275 | &(KOPrefs::instance()->mAgendaBgColor),topFrame); |
1274 | topLayout->addWidget(agendaBgColor->label(),ii,0); | 1276 | topLayout->addWidget(agendaBgColor->label(),ii,0); |
1275 | topLayout->addWidget(agendaBgColor->button(),ii++,1); | 1277 | topLayout->addWidget(agendaBgColor->button(),ii++,1); |
1276 | 1278 | ||
1277 | // working hours color | 1279 | // working hours color |
1278 | KPrefsDialogWidColor *workingHoursColor = | 1280 | KPrefsDialogWidColor *workingHoursColor = |
1279 | addWidColor(i18n("Working hours color:"), | 1281 | addWidColor(i18n("Working hours color:"), |
1280 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); | 1282 | &(KOPrefs::instance()->mWorkingHoursColor),topFrame); |
1281 | topLayout->addWidget(workingHoursColor->label(),ii,0); | 1283 | topLayout->addWidget(workingHoursColor->label(),ii,0); |
1282 | topLayout->addWidget(workingHoursColor->button(),ii++,1); | 1284 | topLayout->addWidget(workingHoursColor->button(),ii++,1); |
1283 | 1285 | ||
1284 | KPrefsDialogWidBool *sb = | 1286 | KPrefsDialogWidBool *sb = |
1285 | addWidBool(i18n("Use colors for application:"), | 1287 | addWidBool(i18n("Use colors for application:"), |
1286 | &(KOPrefs::instance()->mUseAppColors),topFrame); | 1288 | &(KOPrefs::instance()->mUseAppColors),topFrame); |
1287 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); | 1289 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); |
1288 | 1290 | ||
1289 | ii++; | 1291 | ii++; |
1290 | KPrefsDialogWidColor * workingHoursColor1 = | 1292 | KPrefsDialogWidColor * workingHoursColor1 = |
1291 | addWidColor(i18n("Buttons, menus, etc.:"), | 1293 | addWidColor(i18n("Buttons, menus, etc.:"), |
1292 | &(KOPrefs::instance()->mAppColor1),topFrame); | 1294 | &(KOPrefs::instance()->mAppColor1),topFrame); |
1293 | topLayout->addWidget(workingHoursColor1->label(),ii,0); | 1295 | topLayout->addWidget(workingHoursColor1->label(),ii,0); |
1294 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); | 1296 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); |
1295 | 1297 | ||
1296 | KPrefsDialogWidColor * workingHoursColor2 = | 1298 | KPrefsDialogWidColor * workingHoursColor2 = |
1297 | addWidColor(i18n("Frames, labels, etc.:"), | 1299 | addWidColor(i18n("Frames, labels, etc.:"), |
1298 | &(KOPrefs::instance()->mAppColor2),topFrame); | 1300 | &(KOPrefs::instance()->mAppColor2),topFrame); |
1299 | topLayout->addWidget(workingHoursColor2->label(),ii,0); | 1301 | topLayout->addWidget(workingHoursColor2->label(),ii,0); |
1300 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); | 1302 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); |
1301 | 1303 | ||
1302 | 1304 | ||
1303 | 1305 | ||
1304 | } | 1306 | } |
1305 | 1307 | ||
1306 | void KOPrefsDialog::setCategoryColor() | 1308 | void KOPrefsDialog::setCategoryColor() |
1307 | { | 1309 | { |
1308 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); | 1310 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); |
1309 | } | 1311 | } |
1310 | 1312 | ||
1311 | void KOPrefsDialog::updateCategoryColor() | 1313 | void KOPrefsDialog::updateCategoryColor() |
1312 | { | 1314 | { |
1313 | QString cat = mCategoryCombo->currentText(); | 1315 | QString cat = mCategoryCombo->currentText(); |
1314 | QColor *color = mCategoryDict.find(cat); | 1316 | QColor *color = mCategoryDict.find(cat); |
1315 | if (!color) { | 1317 | if (!color) { |
1316 | color = KOPrefs::instance()->categoryColor(cat); | 1318 | color = KOPrefs::instance()->categoryColor(cat); |
1317 | } | 1319 | } |
1318 | if (color) { | 1320 | if (color) { |
1319 | mCategoryButton->setColor(*color); | 1321 | mCategoryButton->setColor(*color); |
1320 | } | 1322 | } |
1321 | } | 1323 | } |
1322 | 1324 | ||
1323 | void KOPrefsDialog::setupPrinterTab() | 1325 | void KOPrefsDialog::setupPrinterTab() |
1324 | { | 1326 | { |
1325 | mPrinterTab = addPage(i18n("Printing"),0, | 1327 | mPrinterTab = addPage(i18n("Printing"),0, |
1326 | DesktopIcon("fileprint",KIcon::SizeMedium)); | 1328 | DesktopIcon("fileprint",KIcon::SizeMedium)); |
1327 | 1329 | ||
1328 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); | 1330 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); |
1329 | topLayout->setSpacing(mSpacingHint); | 1331 | topLayout->setSpacing(mSpacingHint); |
1330 | topLayout->setMargin(mMarginHint); | 1332 | topLayout->setMargin(mMarginHint); |
1331 | 1333 | ||
1332 | topLayout->setRowStretch(4,1); | 1334 | topLayout->setRowStretch(4,1); |
1333 | } | 1335 | } |
1334 | 1336 | ||
1335 | void KOPrefsDialog::setupGroupSchedulingTab() | 1337 | void KOPrefsDialog::setupGroupSchedulingTab() |
1336 | { | 1338 | { |
1337 | #if 0 | 1339 | #if 0 |
1338 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, | 1340 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, |
1339 | DesktopIcon("personal",KIcon::SizeMedium)); | 1341 | DesktopIcon("personal",KIcon::SizeMedium)); |
1340 | 1342 | ||
1341 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 1343 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
1342 | topLayout->setSpacing(mSpacingHint); | 1344 | topLayout->setSpacing(mSpacingHint); |
1343 | topLayout->setMargin(mMarginHint); | 1345 | topLayout->setMargin(mMarginHint); |
1344 | 1346 | ||
1345 | #if 0 | 1347 | #if 0 |
1346 | KPrefsDialogWidRadios *schedulerGroup = | 1348 | KPrefsDialogWidRadios *schedulerGroup = |
1347 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), | 1349 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), |
1348 | topFrame); | 1350 | topFrame); |
1349 | schedulerGroup->addRadio("Dummy"); // Only for debugging | 1351 | schedulerGroup->addRadio("Dummy"); // Only for debugging |
1350 | schedulerGroup->addRadio(i18n("Mail client")); | 1352 | schedulerGroup->addRadio(i18n("Mail client")); |
1351 | 1353 | ||
1352 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); | 1354 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); |
1353 | #endif | 1355 | #endif |
1354 | 1356 | ||
1355 | KPrefsDialogWidRadios *sendGroup = | 1357 | KPrefsDialogWidRadios *sendGroup = |
1356 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), | 1358 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), |
1357 | topFrame); | 1359 | topFrame); |
1358 | sendGroup->addRadio(i18n("Send to outbox")); | 1360 | sendGroup->addRadio(i18n("Send to outbox")); |
1359 | sendGroup->addRadio(i18n("Send directly")); | 1361 | sendGroup->addRadio(i18n("Send directly")); |
1360 | 1362 | ||
1361 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); | 1363 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); |
1362 | 1364 | ||
1363 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); | 1365 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); |
1364 | mAMails = new QListView(topFrame); | 1366 | mAMails = new QListView(topFrame); |
1365 | mAMails->addColumn(i18n("Email"),300); | 1367 | mAMails->addColumn(i18n("Email"),300); |
1366 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); | 1368 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); |
1367 | 1369 | ||
1368 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); | 1370 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); |
1369 | aEmailsEdit = new QLineEdit(topFrame); | 1371 | aEmailsEdit = new QLineEdit(topFrame); |
1370 | aEmailsEdit->setEnabled(false); | 1372 | aEmailsEdit->setEnabled(false); |
1371 | topLayout->addWidget(aEmailsEdit,4,1); | 1373 | topLayout->addWidget(aEmailsEdit,4,1); |
1372 | 1374 | ||
1373 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); | 1375 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); |
1374 | topLayout->addWidget(add,5,0); | 1376 | topLayout->addWidget(add,5,0); |
1375 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); | 1377 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); |
1376 | topLayout->addWidget(del,5,1); | 1378 | topLayout->addWidget(del,5,1); |
1377 | 1379 | ||
1378 | //topLayout->setRowStretch(2,1); | 1380 | //topLayout->setRowStretch(2,1); |
1379 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); | 1381 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); |
1380 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); | 1382 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); |
1381 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); | 1383 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); |
1382 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); | 1384 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); |
1383 | #endif | 1385 | #endif |
1384 | } | 1386 | } |
1385 | 1387 | ||
1386 | void KOPrefsDialog::setupGroupAutomationTab() | 1388 | void KOPrefsDialog::setupGroupAutomationTab() |
1387 | { | 1389 | { |
1388 | return; | 1390 | return; |
1389 | QFrame *topFrame = addPage(i18n("Group Automation"),0, | 1391 | QFrame *topFrame = addPage(i18n("Group Automation"),0, |
1390 | DesktopIcon("personal",KIcon::SizeMedium)); | 1392 | DesktopIcon("personal",KIcon::SizeMedium)); |
1391 | 1393 | ||
1392 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); | 1394 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); |
1393 | topLayout->setSpacing(mSpacingHint); | 1395 | topLayout->setSpacing(mSpacingHint); |
1394 | topLayout->setMargin(mMarginHint); | 1396 | topLayout->setMargin(mMarginHint); |
1395 | 1397 | ||
1396 | KPrefsDialogWidRadios *autoRefreshGroup = | 1398 | KPrefsDialogWidRadios *autoRefreshGroup = |
1397 | addWidRadios(i18n("Auto Send Refresh"), | 1399 | addWidRadios(i18n("Auto Send Refresh"), |
1398 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); | 1400 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); |
1399 | autoRefreshGroup->addRadio(i18n("Never")); | 1401 | autoRefreshGroup->addRadio(i18n("Never")); |
1400 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); | 1402 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); |
1401 | //autoRefreshGroup->addRadio(i18n("selected emails")); | 1403 | //autoRefreshGroup->addRadio(i18n("selected emails")); |
1402 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); | 1404 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); |
1403 | 1405 | ||
1404 | KPrefsDialogWidRadios *autoInsertGroup = | 1406 | KPrefsDialogWidRadios *autoInsertGroup = |
1405 | addWidRadios(i18n("Auto Insert IMIP Replies"), | 1407 | addWidRadios(i18n("Auto Insert IMIP Replies"), |
1406 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); | 1408 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); |
1407 | autoInsertGroup->addRadio(i18n("Never")); | 1409 | autoInsertGroup->addRadio(i18n("Never")); |
1408 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); | 1410 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); |
1409 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1411 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1410 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); | 1412 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); |
1411 | 1413 | ||
1412 | KPrefsDialogWidRadios *autoRequestGroup = | 1414 | KPrefsDialogWidRadios *autoRequestGroup = |
1413 | addWidRadios(i18n("Auto Insert IMIP Requests"), | 1415 | addWidRadios(i18n("Auto Insert IMIP Requests"), |
1414 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); | 1416 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); |
1415 | autoRequestGroup->addRadio(i18n("Never")); | 1417 | autoRequestGroup->addRadio(i18n("Never")); |
1416 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); | 1418 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); |
1417 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1419 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1418 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); | 1420 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); |
1419 | 1421 | ||
1420 | KPrefsDialogWidRadios *autoFreeBusyGroup = | 1422 | KPrefsDialogWidRadios *autoFreeBusyGroup = |
1421 | addWidRadios(i18n("Auto Send FreeBusy Information"), | 1423 | addWidRadios(i18n("Auto Send FreeBusy Information"), |
1422 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); | 1424 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); |
1423 | autoFreeBusyGroup->addRadio(i18n("Never")); | 1425 | autoFreeBusyGroup->addRadio(i18n("Never")); |
1424 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); | 1426 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); |
1425 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1427 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1426 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); | 1428 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); |
1427 | 1429 | ||
1428 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = | 1430 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = |
1429 | addWidRadios(i18n("Auto Save FreeBusy Replies"), | 1431 | addWidRadios(i18n("Auto Save FreeBusy Replies"), |
1430 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); | 1432 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); |
1431 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); | 1433 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); |
1432 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); | 1434 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); |
1433 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1435 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1434 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); | 1436 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); |
1435 | } | 1437 | } |
1436 | 1438 | ||
1437 | void KOPrefsDialog::showPrinterTab() | 1439 | void KOPrefsDialog::showPrinterTab() |
1438 | { | 1440 | { |
1439 | showPage(pageIndex(mPrinterTab)); | 1441 | showPage(pageIndex(mPrinterTab)); |
1440 | } | 1442 | } |
1441 | 1443 | ||
1442 | 1444 | ||
1443 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, | 1445 | void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, |
1444 | const QStringList *tags) | 1446 | const QStringList *tags) |
1445 | { | 1447 | { |
1446 | if (tags) { | 1448 | if (tags) { |
1447 | int i = tags->findIndex(text); | 1449 | int i = tags->findIndex(text); |
1448 | if (i > 0) combo->setCurrentItem(i); | 1450 | if (i > 0) combo->setCurrentItem(i); |
1449 | } else { | 1451 | } else { |
1450 | for(int i=0;i<combo->count();++i) { | 1452 | for(int i=0;i<combo->count();++i) { |
1451 | if (combo->text(i) == text) { | 1453 | if (combo->text(i) == text) { |
1452 | combo->setCurrentItem(i); | 1454 | combo->setCurrentItem(i); |
1453 | break; | 1455 | break; |
1454 | } | 1456 | } |
1455 | } | 1457 | } |
1456 | } | 1458 | } |
1457 | } | 1459 | } |
1458 | 1460 | ||
1459 | void KOPrefsDialog::usrReadConfig() | 1461 | void KOPrefsDialog::usrReadConfig() |
1460 | { | 1462 | { |
1461 | kdelibcfg->readConfig(); | 1463 | if ( kdelibcfg ) |
1464 | kdelibcfg->readConfig(); | ||
1465 | else { | ||
1462 | mNameEdit->setText(KOPrefs::instance()->fullName()); | 1466 | mNameEdit->setText(KOPrefs::instance()->fullName()); |
1463 | mEmailEdit->setText(KOPrefs::instance()->email()); | 1467 | mEmailEdit->setText(KOPrefs::instance()->email()); |
1464 | 1468 | ||
1465 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); | 1469 | mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); |
1466 | // QDate current ( 2001, 1,1); | 1470 | // QDate current ( 2001, 1,1); |
1467 | //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1471 | //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
1468 | //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1472 | //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1469 | //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); | 1473 | //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); |
1470 | //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1474 | //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1471 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); | 1475 | mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); |
1472 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); | 1476 | mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); |
1473 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); | 1477 | mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); |
1474 | // if (KOPrefs::instance()->mAllDaySize > 47 ) | 1478 | // if (KOPrefs::instance()->mAllDaySize > 47 ) |
1475 | // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; | 1479 | // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; |
1476 | //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); | 1480 | //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); |
1477 | 1481 | ||
1478 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); | 1482 | mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); |
1479 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); | 1483 | mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); |
1480 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); | 1484 | mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); |
1481 | // mAMails->clear(); | 1485 | // mAMails->clear(); |
1482 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); | 1486 | // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); |
1483 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { | 1487 | // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { |
1484 | // QListViewItem *item = new QListViewItem(mAMails); | 1488 | // QListViewItem *item = new QListViewItem(mAMails); |
1485 | // item->setText(0,*it); | 1489 | // item->setText(0,*it); |
1486 | // mAMails->insertItem(item); | 1490 | // mAMails->insertItem(item); |
1487 | // } | 1491 | // } |
1488 | 1492 | ||
1489 | // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); | 1493 | // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); |
1490 | //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); | 1494 | //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); |
1491 | //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); | 1495 | //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); |
1492 | //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); | 1496 | //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); |
1493 | 1497 | ||
1494 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); | 1498 | //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); |
1495 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); | 1499 | mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); |
1496 | //QString dummy = KOPrefs::instance()->mUserDateFormatLong; | 1500 | //QString dummy = KOPrefs::instance()->mUserDateFormatLong; |
1497 | //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); | 1501 | //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); |
1498 | //dummy = KOPrefs::instance()->mUserDateFormatShort; | 1502 | //dummy = KOPrefs::instance()->mUserDateFormatShort; |
1499 | //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); | 1503 | //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); |
1500 | updateCategories(); | 1504 | updateCategories(); |
1501 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); | 1505 | mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); |
1502 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); | 1506 | mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); |
1503 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); | 1507 | mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); |
1504 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); | 1508 | mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); |
1509 | } | ||
1505 | } | 1510 | } |
1506 | 1511 | ||
1507 | 1512 | ||
1508 | void KOPrefsDialog::usrWriteConfig() | 1513 | void KOPrefsDialog::usrWriteConfig() |
1509 | { | 1514 | { |
1510 | 1515 | if ( kdelibcfg ) | |
1511 | kdelibcfg->writeConfig(); | 1516 | kdelibcfg->writeConfig(); |
1517 | else { | ||
1512 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); | 1518 | // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); |
1513 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); | 1519 | //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); |
1514 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); | 1520 | //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); |
1515 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); | 1521 | //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); |
1516 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); | 1522 | //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); |
1517 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); | 1523 | KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); |
1518 | 1524 | ||
1519 | //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); | 1525 | //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); |
1520 | //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); | 1526 | //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); |
1521 | KOPrefs::instance()->setFullName(mNameEdit->text()); | 1527 | KOPrefs::instance()->setFullName(mNameEdit->text()); |
1522 | KOPrefs::instance()->setEmail(mEmailEdit->text()); | 1528 | KOPrefs::instance()->setEmail(mEmailEdit->text()); |
1523 | 1529 | ||
1524 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); | 1530 | KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); |
1525 | 1531 | ||
1526 | // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); | 1532 | // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); |
1527 | //QDate date; | 1533 | //QDate date; |
1528 | //date = mStartDateSavingEdit->date(); | 1534 | //date = mStartDateSavingEdit->date(); |
1529 | //int sub = 0; | 1535 | //int sub = 0; |
1530 | //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 1536 | //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
1531 | // sub = 1; | 1537 | // sub = 1; |
1532 | // KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; | 1538 | // KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; |
1533 | // date = mEndDateSavingEdit->date(); | 1539 | // date = mEndDateSavingEdit->date(); |
1534 | // if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 1540 | // if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
1535 | // sub = 1; | 1541 | // sub = 1; |
1536 | // else | 1542 | // else |
1537 | // sub = 0; | 1543 | // sub = 0; |
1538 | // KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; | 1544 | // KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; |
1539 | // // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); | 1545 | // // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); |
1540 | 1546 | ||
1541 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); | 1547 | KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); |
1542 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); | 1548 | KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); |
1543 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); | 1549 | KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); |
1544 | 1550 | ||
1545 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); | 1551 | //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); |
1546 | 1552 | ||
1547 | QDictIterator<QColor> it(mCategoryDict); | 1553 | QDictIterator<QColor> it(mCategoryDict); |
1548 | while (it.current()) { | 1554 | while (it.current()) { |
1549 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); | 1555 | KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); |
1550 | ++it; | 1556 | ++it; |
1551 | } | 1557 | } |
1552 | 1558 | ||
1553 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); | 1559 | KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); |
1554 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); | 1560 | KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); |
1555 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); | 1561 | KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); |
1556 | 1562 | ||
1557 | KOPrefs::instance()->mAdditionalMails.clear(); | 1563 | KOPrefs::instance()->mAdditionalMails.clear(); |
1558 | // QListViewItem *item; | 1564 | // QListViewItem *item; |
1559 | // item = mAMails->firstChild(); | 1565 | // item = mAMails->firstChild(); |
1560 | // while (item) | 1566 | // while (item) |
1561 | // { | 1567 | // { |
1562 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); | 1568 | // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); |
1563 | // item = item->nextSibling(); | 1569 | // item = item->nextSibling(); |
1564 | // } | 1570 | // } |
1565 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); | 1571 | KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); |
1566 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; | 1572 | KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; |
1567 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; | 1573 | KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; |
1568 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; | 1574 | KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; |
1569 | 1575 | } | |
1570 | } | 1576 | } |
1571 | 1577 | ||
1572 | void KOPrefsDialog::updateCategories() | 1578 | void KOPrefsDialog::updateCategories() |
1573 | { | 1579 | { |
1574 | mCategoryCombo->clear(); | 1580 | mCategoryCombo->clear(); |
1575 | mCategoryDict.clear(); | 1581 | mCategoryDict.clear(); |
1576 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1582 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1577 | updateCategoryColor(); | 1583 | updateCategoryColor(); |
1578 | } | 1584 | } |
1579 | 1585 | ||
1580 | void KOPrefsDialog::warningGroupScheduling() | 1586 | void KOPrefsDialog::warningGroupScheduling() |
1581 | { | 1587 | { |
1582 | warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); | 1588 | warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); |
1583 | } | 1589 | } |
1584 | 1590 | ||
1585 | void KOPrefsDialog::warningProjectView() | 1591 | void KOPrefsDialog::warningProjectView() |
1586 | { | 1592 | { |
1587 | warningExperimental(mEnableProjectView->checkBox()->isChecked()); | 1593 | warningExperimental(mEnableProjectView->checkBox()->isChecked()); |
1588 | } | 1594 | } |
1589 | 1595 | ||
1590 | void KOPrefsDialog::warningExperimental(bool on) | 1596 | void KOPrefsDialog::warningExperimental(bool on) |
1591 | { | 1597 | { |
1592 | if (on) { | 1598 | if (on) { |
1593 | KMessageBox::information(this,i18n("This is an experimental feature. " | 1599 | KMessageBox::information(this,i18n("This is an experimental feature. " |
1594 | "It may not work, it may do nothing useful and it may cause data loss. " | 1600 | "It may not work, it may do nothing useful and it may cause data loss. " |
1595 | "Use with care.\n" | 1601 | "Use with care.\n" |
1596 | "You have to restart KOrganizer for this setting to take effect.")); | 1602 | "You have to restart KOrganizer for this setting to take effect.")); |
1597 | } else { | 1603 | } else { |
1598 | KMessageBox::information(this, | 1604 | KMessageBox::information(this, |
1599 | i18n("You have to restart KOrganizer for this setting to take effect.")); | 1605 | i18n("You have to restart KOrganizer for this setting to take effect.")); |
1600 | } | 1606 | } |
1601 | } | 1607 | } |
1602 | 1608 | ||
1603 | void KOPrefsDialog::toggleEmailSettings(bool on) | 1609 | void KOPrefsDialog::toggleEmailSettings(bool on) |
1604 | { | 1610 | { |
1605 | if (on) { | 1611 | if (on) { |
1606 | mEmailEdit->setEnabled(false); | 1612 | mEmailEdit->setEnabled(false); |
1607 | mNameEdit->setEnabled(false); | 1613 | mNameEdit->setEnabled(false); |
1608 | mEmailLabel->setEnabled(false); | 1614 | mEmailLabel->setEnabled(false); |
1609 | mNameLabel->setEnabled(false); | 1615 | mNameLabel->setEnabled(false); |
1610 | 1616 | ||
1611 | KEMailSettings settings; | 1617 | KEMailSettings settings; |
1612 | mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); | 1618 | mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); |
1613 | mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); | 1619 | mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); |
1614 | } else { | 1620 | } else { |
1615 | mEmailEdit->setEnabled(true); | 1621 | mEmailEdit->setEnabled(true); |
1616 | mNameEdit->setEnabled(true); | 1622 | mNameEdit->setEnabled(true); |
1617 | mEmailLabel->setEnabled(true); | 1623 | mEmailLabel->setEnabled(true); |
1618 | mNameLabel->setEnabled(true); | 1624 | mNameLabel->setEnabled(true); |
1619 | } | 1625 | } |
1620 | } | 1626 | } |
1621 | 1627 | ||
1622 | void KOPrefsDialog::addItem() | 1628 | void KOPrefsDialog::addItem() |
1623 | { | 1629 | { |
1624 | // aEmailsEdit->setEnabled(true); | 1630 | // aEmailsEdit->setEnabled(true); |
1625 | // QListViewItem *item = new QListViewItem(mAMails); | 1631 | // QListViewItem *item = new QListViewItem(mAMails); |
1626 | // mAMails->insertItem(item); | 1632 | // mAMails->insertItem(item); |
1627 | // mAMails->setSelected(item,true); | 1633 | // mAMails->setSelected(item,true); |
1628 | // aEmailsEdit->setText(i18n("(EmptyEmail)")); | 1634 | // aEmailsEdit->setText(i18n("(EmptyEmail)")); |
1629 | } | 1635 | } |
1630 | 1636 | ||
1631 | void KOPrefsDialog::removeItem() | 1637 | void KOPrefsDialog::removeItem() |
1632 | { | 1638 | { |
1633 | // QListViewItem *item; | 1639 | // QListViewItem *item; |
1634 | // item = mAMails->selectedItem(); | 1640 | // item = mAMails->selectedItem(); |
1635 | // if (!item) return; | 1641 | // if (!item) return; |
1636 | // mAMails->takeItem(item); | 1642 | // mAMails->takeItem(item); |
1637 | // item = mAMails->selectedItem(); | 1643 | // item = mAMails->selectedItem(); |
1638 | // if (!item) { | 1644 | // if (!item) { |
1639 | // aEmailsEdit->setText(""); | 1645 | // aEmailsEdit->setText(""); |
1640 | // aEmailsEdit->setEnabled(false); | 1646 | // aEmailsEdit->setEnabled(false); |
1641 | // } | 1647 | // } |
1642 | // if (mAMails->childCount() == 0) { | 1648 | // if (mAMails->childCount() == 0) { |
1643 | // aEmailsEdit->setEnabled(false); | 1649 | // aEmailsEdit->setEnabled(false); |
1644 | // } | 1650 | // } |
1645 | } | 1651 | } |
1646 | 1652 | ||
1647 | void KOPrefsDialog::updateItem() | 1653 | void KOPrefsDialog::updateItem() |
1648 | { | 1654 | { |
1649 | // QListViewItem *item; | 1655 | // QListViewItem *item; |
1650 | // item = mAMails->selectedItem(); | 1656 | // item = mAMails->selectedItem(); |
1651 | // if (!item) return; | 1657 | // if (!item) return; |
1652 | // item->setText(0,aEmailsEdit->text()); | 1658 | // item->setText(0,aEmailsEdit->text()); |
1653 | } | 1659 | } |
1654 | 1660 | ||
1655 | void KOPrefsDialog::updateInput() | 1661 | void KOPrefsDialog::updateInput() |
1656 | { | 1662 | { |
1657 | // QListViewItem *item; | 1663 | // QListViewItem *item; |
1658 | // item = mAMails->selectedItem(); | 1664 | // item = mAMails->selectedItem(); |
1659 | // if (!item) return; | 1665 | // if (!item) return; |
1660 | // aEmailsEdit->setEnabled(true); | 1666 | // aEmailsEdit->setEnabled(true); |
1661 | // aEmailsEdit->setText(item->text(0)); | 1667 | // aEmailsEdit->setText(item->text(0)); |
1662 | } | 1668 | } |
1663 | void KOPrefsDialog::updateTimezoneOffset( int index ) | 1669 | void KOPrefsDialog::updateTimezoneOffset( int index ) |
1664 | { | 1670 | { |
1665 | /* | 1671 | /* |
1666 | qDebug("updateTimezoneOffset %d ", index); | 1672 | qDebug("updateTimezoneOffset %d ", index); |
1667 | if ( index < 24 ) { | 1673 | if ( index < 24 ) { |
1668 | mTimezoneOffsetSpin->setEnabled ( false ); | 1674 | mTimezoneOffsetSpin->setEnabled ( false ); |
1669 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); | 1675 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); |
1670 | 1676 | ||
1671 | 1677 | ||
1672 | } else { | 1678 | } else { |
1673 | if ( index == 24 ) { | 1679 | if ( index == 24 ) { |
1674 | mTimezoneOffsetSpin->setEnabled ( true ); | 1680 | mTimezoneOffsetSpin->setEnabled ( true ); |
1675 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1681 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1676 | 1682 | ||
1677 | } else { | 1683 | } else { |
1678 | mTimezoneOffsetSpin->setEnabled ( false ); | 1684 | mTimezoneOffsetSpin->setEnabled ( false ); |
1679 | mTimezoneOffsetSpin->setValue( 0 ); | 1685 | mTimezoneOffsetSpin->setValue( 0 ); |
1680 | } | 1686 | } |
1681 | } | 1687 | } |
1682 | */ | 1688 | */ |
1683 | } | 1689 | } |
1684 | 1690 | ||
1685 | void KOPrefsDialog::setupTimeZoneTab() | 1691 | void KOPrefsDialog::setupTimeZoneTab() |
1686 | { | 1692 | { |
1687 | #if 0 | 1693 | #if 0 |
1688 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); | 1694 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); |
1689 | // DesktopIcon("clock",KIcon::SizeMedium)); | 1695 | // DesktopIcon("clock",KIcon::SizeMedium)); |
1690 | 1696 | ||
1691 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1697 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1692 | topLayout->setSpacing(mSpacingHint); | 1698 | topLayout->setSpacing(mSpacingHint); |
1693 | topLayout->setMargin(mMarginHint); | 1699 | topLayout->setMargin(mMarginHint); |
1694 | 1700 | ||
1695 | QHBox *timeZoneBox = new QHBox( topFrame ); | 1701 | QHBox *timeZoneBox = new QHBox( topFrame ); |
1696 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 1702 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
1697 | 1703 | ||
1698 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 1704 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
1699 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 1705 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
1700 | if ( QApplication::desktop()->width() < 300 ) { | 1706 | if ( QApplication::desktop()->width() < 300 ) { |
1701 | mTimeZoneCombo->setMaximumWidth(150); | 1707 | mTimeZoneCombo->setMaximumWidth(150); |
1702 | } | 1708 | } |
1703 | 1709 | ||
1704 | QStringList list; | 1710 | QStringList list; |
1705 | list = KGlobal::locale()->timeZoneList(); | 1711 | list = KGlobal::locale()->timeZoneList(); |
1706 | mTimeZoneCombo->insertStringList(list); | 1712 | mTimeZoneCombo->insertStringList(list); |
1707 | 1713 | ||
1708 | // find the currently set time zone and select it | 1714 | // find the currently set time zone and select it |
1709 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; | 1715 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; |
1710 | int nCurrentlySet = 11; | 1716 | int nCurrentlySet = 11; |
1711 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 1717 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
1712 | { | 1718 | { |
1713 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 1719 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
1714 | { | 1720 | { |
1715 | nCurrentlySet = i; | 1721 | nCurrentlySet = i; |
1716 | break; | 1722 | break; |
1717 | } | 1723 | } |
1718 | } | 1724 | } |
1719 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 1725 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
1720 | int iii = 1; | 1726 | int iii = 1; |
1721 | KPrefsDialogWidBool *sb = | 1727 | KPrefsDialogWidBool *sb = |
1722 | addWidBool(i18n("Timezone has daylight saving"), | 1728 | addWidBool(i18n("Timezone has daylight saving"), |
1723 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); | 1729 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); |
1724 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 1730 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
1725 | ++iii; | 1731 | ++iii; |
1726 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 1732 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
1727 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1733 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1728 | ++iii; | 1734 | ++iii; |
1729 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 1735 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
1730 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1736 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1731 | ++iii; | 1737 | ++iii; |
1732 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 1738 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
1733 | topLayout->addWidget(lab, iii,0); | 1739 | topLayout->addWidget(lab, iii,0); |
1734 | mStartDateSavingEdit = new KDateEdit(topFrame); | 1740 | mStartDateSavingEdit = new KDateEdit(topFrame); |
1735 | topLayout->addWidget(mStartDateSavingEdit, iii,1); | 1741 | topLayout->addWidget(mStartDateSavingEdit, iii,1); |
1736 | ++iii; | 1742 | ++iii; |
1737 | 1743 | ||
1738 | lab = new QLabel( i18n("Daylight end:"), topFrame ); | 1744 | lab = new QLabel( i18n("Daylight end:"), topFrame ); |
1739 | topLayout->addWidget(lab, iii,0); | 1745 | topLayout->addWidget(lab, iii,0); |
1740 | mEndDateSavingEdit = new KDateEdit(topFrame); | 1746 | mEndDateSavingEdit = new KDateEdit(topFrame); |
1741 | topLayout->addWidget(mEndDateSavingEdit, iii,1); | 1747 | topLayout->addWidget(mEndDateSavingEdit, iii,1); |
1742 | ++iii; | 1748 | ++iii; |
1743 | QDate current ( 2001, 1,1); | 1749 | QDate current ( 2001, 1,1); |
1744 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); | 1750 | mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); |
1745 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); | 1751 | mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); |
1746 | #endif | 1752 | #endif |
1747 | 1753 | ||
1748 | } | 1754 | } |
1749 | 1755 | ||
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 25e76ee..2c04852 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1,2266 +1,2271 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | 2 | ||
3 | #include <qaction.h> | 3 | #include <qaction.h> |
4 | #include <qpopupmenu.h> | 4 | #include <qpopupmenu.h> |
5 | #include <qpainter.h> | 5 | #include <qpainter.h> |
6 | #include <qwhatsthis.h> | 6 | #include <qwhatsthis.h> |
7 | #include <qpushbutton.h> | 7 | #include <qpushbutton.h> |
8 | #include <qmessagebox.h> | 8 | #include <qmessagebox.h> |
9 | #include <qlineedit.h> | 9 | #include <qlineedit.h> |
10 | #include <qtextcodec.h> | 10 | #include <qtextcodec.h> |
11 | #include <qfile.h> | 11 | #include <qfile.h> |
12 | #include <qdir.h> | 12 | #include <qdir.h> |
13 | #include <qapp.h> | 13 | #include <qapp.h> |
14 | #include <qfileinfo.h> | 14 | #include <qfileinfo.h> |
15 | #include <qlabel.h> | 15 | #include <qlabel.h> |
16 | #include <qspinbox.h> | 16 | #include <qspinbox.h> |
17 | #include <qcheckbox.h> | 17 | #include <qcheckbox.h> |
18 | #include <qmap.h> | 18 | #include <qmap.h> |
19 | #include <qwmatrix.h> | 19 | #include <qwmatrix.h> |
20 | #include <qtextbrowser.h> | 20 | #include <qtextbrowser.h> |
21 | #include <qtextstream.h> | 21 | #include <qtextstream.h> |
22 | #ifndef DESKTOP_VERSION | 22 | #ifndef DESKTOP_VERSION |
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | #include <qpe/qpemenubar.h> | 24 | #include <qpe/qpemenubar.h> |
25 | #include <qpe/qpetoolbar.h> | 25 | #include <qpe/qpetoolbar.h> |
26 | #include <qpe/resource.h> | 26 | #include <qpe/resource.h> |
27 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
28 | #include <qtopia/alarmserver.h> | 28 | #include <qtopia/alarmserver.h> |
29 | #include <qtopia/qcopenvelope_qws.h> | 29 | #include <qtopia/qcopenvelope_qws.h> |
30 | #include <unistd.h> // for sleep | 30 | #include <unistd.h> // for sleep |
31 | #else | 31 | #else |
32 | #include <qmenubar.h> | 32 | #include <qmenubar.h> |
33 | #include <qtoolbar.h> | 33 | #include <qtoolbar.h> |
34 | #include <qapplication.h> | 34 | #include <qapplication.h> |
35 | //#include <resource.h> | 35 | //#include <resource.h> |
36 | 36 | ||
37 | #endif | 37 | #endif |
38 | #include <libkcal/calendarlocal.h> | 38 | #include <libkcal/calendarlocal.h> |
39 | #include <libkcal/todo.h> | 39 | #include <libkcal/todo.h> |
40 | #include <libkcal/phoneformat.h> | 40 | #include <libkcal/phoneformat.h> |
41 | #include <libkdepim/ksyncprofile.h> | 41 | #include <libkdepim/ksyncprofile.h> |
42 | #include <libkdepim/phoneaccess.h> | 42 | #include <libkdepim/phoneaccess.h> |
43 | #include <libkcal/kincidenceformatter.h> | 43 | #include <libkcal/kincidenceformatter.h> |
44 | #include <libkdepim/kpimglobalprefs.h> | 44 | #include <libkdepim/kpimglobalprefs.h> |
45 | 45 | ||
46 | #include "calendarview.h" | 46 | #include "calendarview.h" |
47 | #include "koviewmanager.h" | 47 | #include "koviewmanager.h" |
48 | #include "datenavigator.h" | 48 | #include "datenavigator.h" |
49 | #include "koagendaview.h" | 49 | #include "koagendaview.h" |
50 | #include "koagenda.h" | 50 | #include "koagenda.h" |
51 | #include "kodialogmanager.h" | 51 | #include "kodialogmanager.h" |
52 | #include "kdialogbase.h" | 52 | #include "kdialogbase.h" |
53 | #include "kapplication.h" | 53 | #include "kapplication.h" |
54 | #include "kofilterview.h" | 54 | #include "kofilterview.h" |
55 | #include "kstandarddirs.h" | 55 | #include "kstandarddirs.h" |
56 | #include "koprefs.h" | 56 | #include "koprefs.h" |
57 | #include "kfiledialog.h" | 57 | #include "kfiledialog.h" |
58 | #include "koglobals.h" | 58 | #include "koglobals.h" |
59 | #include "kglobal.h" | 59 | #include "kglobal.h" |
60 | #include "ktoolbar.h" | 60 | #include "ktoolbar.h" |
61 | #include "klocale.h" | 61 | #include "klocale.h" |
62 | #include "kconfig.h" | 62 | #include "kconfig.h" |
63 | #include "externalapphandler.h" | 63 | #include "externalapphandler.h" |
64 | #include <kglobalsettings.h> | 64 | #include <kglobalsettings.h> |
65 | 65 | ||
66 | using namespace KCal; | 66 | using namespace KCal; |
67 | #ifndef _WIN32_ | 67 | #ifndef _WIN32_ |
68 | #include <unistd.h> | 68 | #include <unistd.h> |
69 | #else | 69 | #else |
70 | #ifdef _OL_IMPORT_ | 70 | #ifdef _OL_IMPORT_ |
71 | #include "koimportoldialog.h" | 71 | #include "koimportoldialog.h" |
72 | #endif | 72 | #endif |
73 | #endif | 73 | #endif |
74 | #include "mainwindow.h" | 74 | #include "mainwindow.h" |
75 | 75 | ||
76 | 76 | ||
77 | class KOex2phonePrefs : public QDialog | 77 | class KOex2phonePrefs : public QDialog |
78 | { | 78 | { |
79 | public: | 79 | public: |
80 | KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : | 80 | KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : |
81 | QDialog( parent, name, true ) | 81 | QDialog( parent, name, true ) |
82 | { | 82 | { |
83 | setCaption( i18n("Export to phone options") ); | 83 | setCaption( i18n("Export to phone options") ); |
84 | QVBoxLayout* lay = new QVBoxLayout( this ); | 84 | QVBoxLayout* lay = new QVBoxLayout( this ); |
85 | lay->setSpacing( 3 ); | 85 | lay->setSpacing( 3 ); |
86 | lay->setMargin( 3 ); | 86 | lay->setMargin( 3 ); |
87 | QLabel *lab; | 87 | QLabel *lab; |
88 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); | 88 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); |
89 | lab->setAlignment (AlignHCenter ); | 89 | lab->setAlignment (AlignHCenter ); |
90 | QHBox* temphb; | 90 | QHBox* temphb; |
91 | temphb = new QHBox( this ); | 91 | temphb = new QHBox( this ); |
92 | new QLabel( i18n("I/O device: "), temphb ); | 92 | new QLabel( i18n("I/O device: "), temphb ); |
93 | mPhoneDevice = new QLineEdit( temphb); | 93 | mPhoneDevice = new QLineEdit( temphb); |
94 | lay->addWidget( temphb ); | 94 | lay->addWidget( temphb ); |
95 | temphb = new QHBox( this ); | 95 | temphb = new QHBox( this ); |
96 | new QLabel( i18n("Connection: "), temphb ); | 96 | new QLabel( i18n("Connection: "), temphb ); |
97 | mPhoneConnection = new QLineEdit( temphb); | 97 | mPhoneConnection = new QLineEdit( temphb); |
98 | lay->addWidget( temphb ); | 98 | lay->addWidget( temphb ); |
99 | temphb = new QHBox( this ); | 99 | temphb = new QHBox( this ); |
100 | new QLabel( i18n("Model(opt.): "), temphb ); | 100 | new QLabel( i18n("Model(opt.): "), temphb ); |
101 | mPhoneModel = new QLineEdit( temphb); | 101 | mPhoneModel = new QLineEdit( temphb); |
102 | lay->addWidget( temphb ); | 102 | lay->addWidget( temphb ); |
103 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); | 103 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); |
104 | mWriteBackFuture->setChecked( true ); | 104 | mWriteBackFuture->setChecked( true ); |
105 | lay->addWidget( mWriteBackFuture ); | 105 | lay->addWidget( mWriteBackFuture ); |
106 | temphb = new QHBox( this ); | 106 | temphb = new QHBox( this ); |
107 | new QLabel( i18n("Max. weeks in future: ") , temphb ); | 107 | new QLabel( i18n("Max. weeks in future: ") , temphb ); |
108 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); | 108 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); |
109 | mWriteBackFutureWeeks->setValue( 8 ); | 109 | mWriteBackFutureWeeks->setValue( 8 ); |
110 | lay->addWidget( temphb ); | 110 | lay->addWidget( temphb ); |
111 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); | 111 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); |
112 | lab->setAlignment (AlignHCenter ); | 112 | lab->setAlignment (AlignHCenter ); |
113 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); | 113 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); |
114 | lay->addWidget( ok ); | 114 | lay->addWidget( ok ); |
115 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 115 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
116 | lay->addWidget( cancel ); | 116 | lay->addWidget( cancel ); |
117 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 117 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
118 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 118 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
119 | resize( 220, 240 ); | 119 | resize( 220, 240 ); |
120 | qApp->processEvents(); | 120 | qApp->processEvents(); |
121 | int dw = QApplication::desktop()->width(); | 121 | int dw = QApplication::desktop()->width(); |
122 | int dh = QApplication::desktop()->height(); | 122 | int dh = QApplication::desktop()->height(); |
123 | move( (dw-width())/2, (dh - height() )/2 ); | 123 | move( (dw-width())/2, (dh - height() )/2 ); |
124 | } | 124 | } |
125 | 125 | ||
126 | public: | 126 | public: |
127 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; | 127 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; |
128 | QCheckBox* mWriteBackFuture; | 128 | QCheckBox* mWriteBackFuture; |
129 | QSpinBox* mWriteBackFutureWeeks; | 129 | QSpinBox* mWriteBackFutureWeeks; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | int globalFlagBlockStartup; | 132 | int globalFlagBlockStartup; |
133 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | 133 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : |
134 | QMainWindow( parent, name ) | 134 | QMainWindow( parent, name ) |
135 | { | 135 | { |
136 | 136 | ||
137 | mClosed = false; | 137 | mClosed = false; |
138 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; | 138 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; |
139 | QString confFile = locateLocal("config","korganizerrc"); | 139 | QString confFile = locateLocal("config","korganizerrc"); |
140 | QFileInfo finf ( confFile ); | 140 | QFileInfo finf ( confFile ); |
141 | bool showWarning = !finf.exists(); | 141 | bool showWarning = !finf.exists(); |
142 | setIcon(SmallIcon( "ko24" ) ); | 142 | setIcon(SmallIcon( "ko24" ) ); |
143 | mBlockAtStartup = true; | 143 | mBlockAtStartup = true; |
144 | mFlagKeyPressed = false; | 144 | mFlagKeyPressed = false; |
145 | setCaption("KO/Pi"); | 145 | setCaption("KO/Pi"); |
146 | KOPrefs *p = KOPrefs::instance(); | 146 | KOPrefs *p = KOPrefs::instance(); |
147 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 147 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
148 | p->mCurrentDisplayedView = 0; | 148 | p->mCurrentDisplayedView = 0; |
149 | if ( p->mHourSize > 22 ) | 149 | if ( p->mHourSize > 22 ) |
150 | p->mHourSize = 22; | 150 | p->mHourSize = 22; |
151 | QMainWindow::ToolBarDock tbd; | 151 | QMainWindow::ToolBarDock tbd; |
152 | if ( p->mToolBarHor ) { | 152 | if ( p->mToolBarHor ) { |
153 | if ( p->mToolBarUp ) | 153 | if ( p->mToolBarUp ) |
154 | tbd = Bottom; | 154 | tbd = Bottom; |
155 | else | 155 | else |
156 | tbd = Top; | 156 | tbd = Top; |
157 | } | 157 | } |
158 | else { | 158 | else { |
159 | if ( p->mToolBarUp ) | 159 | if ( p->mToolBarUp ) |
160 | tbd = Right; | 160 | tbd = Right; |
161 | else | 161 | else |
162 | tbd = Left; | 162 | tbd = Left; |
163 | } | 163 | } |
164 | if ( KOPrefs::instance()->mUseAppColors ) | 164 | if ( KOPrefs::instance()->mUseAppColors ) |
165 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 165 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
166 | globalFlagBlockStartup = 1; | 166 | globalFlagBlockStartup = 1; |
167 | iconToolBar = new QPEToolBar( this ); | 167 | iconToolBar = new QPEToolBar( this ); |
168 | addToolBar (iconToolBar , tbd ); | 168 | addToolBar (iconToolBar , tbd ); |
169 | 169 | ||
170 | #ifdef DESKTOP_VERSION | 170 | #ifdef DESKTOP_VERSION |
171 | if ( KOPrefs::instance()->mShowIconFilter ) | 171 | if ( KOPrefs::instance()->mShowIconFilter ) |
172 | #else | 172 | #else |
173 | if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) | 173 | if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) |
174 | #endif | 174 | #endif |
175 | 175 | ||
176 | { | 176 | { |
177 | if ( p->mToolBarHorF ) { | 177 | if ( p->mToolBarHorF ) { |
178 | if ( p->mToolBarUpF ) | 178 | if ( p->mToolBarUpF ) |
179 | tbd = Bottom; | 179 | tbd = Bottom; |
180 | else | 180 | else |
181 | tbd = Top; | 181 | tbd = Top; |
182 | } | 182 | } |
183 | else { | 183 | else { |
184 | if ( p->mToolBarUpF ) | 184 | if ( p->mToolBarUpF ) |
185 | tbd = Right; | 185 | tbd = Right; |
186 | else | 186 | else |
187 | tbd = Left; | 187 | tbd = Left; |
188 | } | 188 | } |
189 | filterToolBar = new QPEToolBar ( this ); | 189 | filterToolBar = new QPEToolBar ( this ); |
190 | filterMenubar = new QMenuBar( 0 ); | 190 | filterMenubar = new QMenuBar( 0 ); |
191 | QFontMetrics fm ( filterMenubar->font() ); | 191 | QFontMetrics fm ( filterMenubar->font() ); |
192 | 192 | ||
193 | filterPopupMenu = new QPopupMenu( this ); | 193 | filterPopupMenu = new QPopupMenu( this ); |
194 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); | 194 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); |
195 | QString addTest = "A"; | 195 | QString addTest = "A"; |
196 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); | 196 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); |
197 | #ifdef DESKTOP_VERSION | 197 | #ifdef DESKTOP_VERSION |
198 | addTest = "AAABBBCCCx"; | 198 | addTest = "AAABBBCCCx"; |
199 | #else | 199 | #else |
200 | addTest = "AAx"; | 200 | addTest = "AAx"; |
201 | #endif | 201 | #endif |
202 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); | 202 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); |
203 | addToolBar (filterToolBar , tbd ); | 203 | addToolBar (filterToolBar , tbd ); |
204 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); | 204 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); |
205 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); | 205 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); |
206 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) | 206 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) |
207 | filterToolBar->hide(); | 207 | filterToolBar->hide(); |
208 | } else { | 208 | } else { |
209 | filterToolBar = 0; | 209 | filterToolBar = 0; |
210 | filterMenubar = 0; | 210 | filterMenubar = 0; |
211 | filterPopupMenu = 0; | 211 | filterPopupMenu = 0; |
212 | } | 212 | } |
213 | if ( p->mShowIconOnetoolbar ) { | 213 | if ( p->mShowIconOnetoolbar ) { |
214 | viewToolBar = iconToolBar ; | 214 | viewToolBar = iconToolBar ; |
215 | navigatorToolBar = iconToolBar ; | 215 | navigatorToolBar = iconToolBar ; |
216 | } else { | 216 | } else { |
217 | #ifndef DESKTOP_VERSION | 217 | #ifndef DESKTOP_VERSION |
218 | setToolBarsMovable( false ); | 218 | setToolBarsMovable( false ); |
219 | #endif | 219 | #endif |
220 | if ( p->mToolBarHorV ) { | 220 | if ( p->mToolBarHorV ) { |
221 | if ( p->mToolBarUpV ) | 221 | if ( p->mToolBarUpV ) |
222 | tbd = Bottom; | 222 | tbd = Bottom; |
223 | else | 223 | else |
224 | tbd = Top; | 224 | tbd = Top; |
225 | } | 225 | } |
226 | else { | 226 | else { |
227 | if ( p->mToolBarUpV ) | 227 | if ( p->mToolBarUpV ) |
228 | tbd = Right; | 228 | tbd = Right; |
229 | else | 229 | else |
230 | tbd = Left; | 230 | tbd = Left; |
231 | } | 231 | } |
232 | viewToolBar = new QPEToolBar( this ); | 232 | viewToolBar = new QPEToolBar( this ); |
233 | addToolBar (viewToolBar , tbd ); | 233 | addToolBar (viewToolBar , tbd ); |
234 | if ( p->mToolBarHorN ) { | 234 | if ( p->mToolBarHorN ) { |
235 | if ( p->mToolBarUpN ) | 235 | if ( p->mToolBarUpN ) |
236 | tbd = Bottom; | 236 | tbd = Bottom; |
237 | else | 237 | else |
238 | tbd = Top; | 238 | tbd = Top; |
239 | } | 239 | } |
240 | else { | 240 | else { |
241 | if ( p->mToolBarUpN ) | 241 | if ( p->mToolBarUpN ) |
242 | tbd = Right; | 242 | tbd = Right; |
243 | else | 243 | else |
244 | tbd = Left; | 244 | tbd = Left; |
245 | } | 245 | } |
246 | navigatorToolBar = new QPEToolBar( this ); | 246 | navigatorToolBar = new QPEToolBar( this ); |
247 | addToolBar (navigatorToolBar , tbd ); | 247 | addToolBar (navigatorToolBar , tbd ); |
248 | } | 248 | } |
249 | 249 | ||
250 | 250 | ||
251 | 251 | ||
252 | mCalendarModifiedFlag = false; | 252 | mCalendarModifiedFlag = false; |
253 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); | 253 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); |
254 | splash->setAlignment ( AlignCenter ); | 254 | splash->setAlignment ( AlignCenter ); |
255 | setCentralWidget( splash ); | 255 | setCentralWidget( splash ); |
256 | #ifndef DESKTOP_VERSION | 256 | #ifndef DESKTOP_VERSION |
257 | showMaximized(); | 257 | showMaximized(); |
258 | #endif | 258 | #endif |
259 | 259 | ||
260 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); | 260 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); |
261 | setDefaultPreferences(); | 261 | setDefaultPreferences(); |
262 | mCalendar = new CalendarLocal(); | 262 | mCalendar = new CalendarLocal(); |
263 | mView = new CalendarView( mCalendar, this,"mCalendar " ); | 263 | mView = new CalendarView( mCalendar, this,"mCalendar " ); |
264 | mView->hide(); | 264 | mView->hide(); |
265 | //mView->resize(splash->size() ); | 265 | //mView->resize(splash->size() ); |
266 | initActions(); | 266 | initActions(); |
267 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); | 267 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); |
268 | mSyncManager->setBlockSave(false); | 268 | mSyncManager->setBlockSave(false); |
269 | mView->setSyncManager(mSyncManager); | 269 | mView->setSyncManager(mSyncManager); |
270 | #ifndef DESKTOP_VERSION | 270 | #ifndef DESKTOP_VERSION |
271 | iconToolBar->show(); | 271 | iconToolBar->show(); |
272 | qApp->processEvents(); | 272 | qApp->processEvents(); |
273 | #endif | 273 | #endif |
274 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); | 274 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); |
275 | int vh = height() ; | 275 | int vh = height() ; |
276 | int vw = width(); | 276 | int vw = width(); |
277 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); | 277 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); |
278 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 278 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
279 | vh -= iconToolBar->height(); | 279 | vh -= iconToolBar->height(); |
280 | } else { | 280 | } else { |
281 | vw -= iconToolBar->height(); | 281 | vw -= iconToolBar->height(); |
282 | } | 282 | } |
283 | //mView->setMaximumSize( splash->size() ); | 283 | //mView->setMaximumSize( splash->size() ); |
284 | //mView->resize( splash->size() ); | 284 | //mView->resize( splash->size() ); |
285 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 285 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
286 | mView->readSettings(); | 286 | mView->readSettings(); |
287 | bool newFile = false; | 287 | bool newFile = false; |
288 | if( !QFile::exists( defaultFileName() ) ) { | 288 | if( !QFile::exists( defaultFileName() ) ) { |
289 | QFileInfo finfo ( defaultFileName() ); | 289 | QFileInfo finfo ( defaultFileName() ); |
290 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); | 290 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); |
291 | QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; | 291 | QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; |
292 | finfo.setFile( oldFile ); | 292 | finfo.setFile( oldFile ); |
293 | if (finfo.exists() ) { | 293 | if (finfo.exists() ) { |
294 | KMessageBox::information( this, message); | 294 | KMessageBox::information( this, message); |
295 | mView->openCalendar( oldFile ); | 295 | mView->openCalendar( oldFile ); |
296 | qApp->processEvents(); | 296 | qApp->processEvents(); |
297 | } else { | 297 | } else { |
298 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); | 298 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); |
299 | finfo.setFile( oldFile ); | 299 | finfo.setFile( oldFile ); |
300 | if (finfo.exists() ) { | 300 | if (finfo.exists() ) { |
301 | KMessageBox::information( this, message); | 301 | KMessageBox::information( this, message); |
302 | mView->openCalendar( oldFile ); | 302 | mView->openCalendar( oldFile ); |
303 | qApp->processEvents(); | 303 | qApp->processEvents(); |
304 | } | 304 | } |
305 | } | 305 | } |
306 | mView->saveCalendar( defaultFileName() ); | 306 | mView->saveCalendar( defaultFileName() ); |
307 | newFile = true; | 307 | newFile = true; |
308 | } | 308 | } |
309 | 309 | ||
310 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 310 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
311 | mView->openCalendar( defaultFileName() ); | 311 | mView->openCalendar( defaultFileName() ); |
312 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 312 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
313 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); | 313 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); |
314 | 314 | ||
315 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { | 315 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { |
316 | KOPrefs::instance()->setAllDefaults(); | 316 | KOPrefs::instance()->setAllDefaults(); |
317 | int count = mView->addCategories(); | 317 | int count = mView->addCategories(); |
318 | } | 318 | } |
319 | processIncidenceSelection( 0 ); | 319 | processIncidenceSelection( 0 ); |
320 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), | 320 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), |
321 | SLOT( processIncidenceSelection( Incidence * ) ) ); | 321 | SLOT( processIncidenceSelection( Incidence * ) ) ); |
322 | connect( mView, SIGNAL( modifiedChanged( bool ) ), | 322 | connect( mView, SIGNAL( modifiedChanged( bool ) ), |
323 | SLOT( slotModifiedChanged( bool ) ) ); | 323 | SLOT( slotModifiedChanged( bool ) ) ); |
324 | 324 | ||
325 | 325 | ||
326 | connect( mView, SIGNAL( tempDisableBR(bool) ), | 326 | connect( mView, SIGNAL( tempDisableBR(bool) ), |
327 | SLOT( disableBR(bool) ) ); | 327 | SLOT( disableBR(bool) ) ); |
328 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); | 328 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); |
329 | mView->setModified( false ); | 329 | mView->setModified( false ); |
330 | mBlockAtStartup = false; | 330 | mBlockAtStartup = false; |
331 | mView->setModified( false ); | 331 | mView->setModified( false ); |
332 | setCentralWidget( mView ); | 332 | setCentralWidget( mView ); |
333 | globalFlagBlockStartup = 0; | 333 | globalFlagBlockStartup = 0; |
334 | mView->show(); | 334 | mView->show(); |
335 | delete splash; | 335 | delete splash; |
336 | if ( newFile ) | 336 | if ( newFile ) |
337 | mView->updateConfig(); | 337 | mView->updateConfig(); |
338 | // qApp->processEvents(); | 338 | // qApp->processEvents(); |
339 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 339 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
340 | //fillSyncMenu(); | 340 | //fillSyncMenu(); |
341 | 341 | ||
342 | 342 | ||
343 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); | 343 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); |
344 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); | 344 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); |
345 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); | 345 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); |
346 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 346 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
347 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 347 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
348 | mSyncManager->setDefaultFileName( sentSyncFile()); | 348 | mSyncManager->setDefaultFileName( sentSyncFile()); |
349 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); | 349 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); |
350 | mSyncManager->fillSyncMenu(); | 350 | mSyncManager->fillSyncMenu(); |
351 | 351 | ||
352 | 352 | ||
353 | 353 | ||
354 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 354 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
355 | if ( showWarning ) { | 355 | if ( showWarning ) { |
356 | KMessageBox::information( this, | 356 | KMessageBox::information( this, |
357 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); | 357 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); |
358 | qApp->processEvents(); | 358 | qApp->processEvents(); |
359 | mView->dialogManager()->showSyncOptions(); | 359 | mView->dialogManager()->showSyncOptions(); |
360 | } | 360 | } |
361 | 361 | ||
362 | //US listen for result adressed from Ka/Pi | 362 | //US listen for result adressed from Ka/Pi |
363 | #ifndef DESKTOP_VERSION | 363 | #ifndef DESKTOP_VERSION |
364 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 364 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
365 | #endif | 365 | #endif |
366 | #ifndef DESKTOP_VERSION | 366 | #ifndef DESKTOP_VERSION |
367 | infrared = 0; | 367 | infrared = 0; |
368 | #endif | 368 | #endif |
369 | updateFilterToolbar(); | 369 | updateFilterToolbar(); |
370 | updateWeek( mView->startDate() ); | 370 | updateWeek( mView->startDate() ); |
371 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), | 371 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), |
372 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); | 372 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); |
373 | mBRdisabled = false; | 373 | mBRdisabled = false; |
374 | //toggleBeamReceive(); | 374 | //toggleBeamReceive(); |
375 | int tiint= 3000; | 375 | int tiint= 3000; |
376 | #ifndef DESKTOP_VERSION | 376 | #ifndef DESKTOP_VERSION |
377 | tiint = 5000; | 377 | tiint = 5000; |
378 | #endif | 378 | #endif |
379 | QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() )); | 379 | QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() )); |
380 | } | 380 | } |
381 | MainWindow::~MainWindow() | 381 | MainWindow::~MainWindow() |
382 | { | 382 | { |
383 | //qDebug("MainWindow::~MainWindow() "); | 383 | //qDebug("MainWindow::~MainWindow() "); |
384 | //save toolbar location | 384 | //save toolbar location |
385 | delete mCalendar; | 385 | delete mCalendar; |
386 | delete mSyncManager; | 386 | delete mSyncManager; |
387 | #ifndef DESKTOP_VERSION | 387 | #ifndef DESKTOP_VERSION |
388 | if ( infrared ) | 388 | if ( infrared ) |
389 | delete infrared; | 389 | delete infrared; |
390 | #endif | 390 | #endif |
391 | 391 | ||
392 | 392 | ||
393 | } | 393 | } |
394 | 394 | ||
395 | void MainWindow::disableBR(bool b) | 395 | void MainWindow::disableBR(bool b) |
396 | { | 396 | { |
397 | #ifndef DESKTOP_VERSION | 397 | #ifndef DESKTOP_VERSION |
398 | if ( b ) { | 398 | if ( b ) { |
399 | if ( infrared ) { | 399 | if ( infrared ) { |
400 | toggleBeamReceive(); | 400 | toggleBeamReceive(); |
401 | mBRdisabled = true; | 401 | mBRdisabled = true; |
402 | } | 402 | } |
403 | mBRdisabled = true; | 403 | mBRdisabled = true; |
404 | } else { | 404 | } else { |
405 | if ( mBRdisabled ) { | 405 | if ( mBRdisabled ) { |
406 | mBRdisabled = false; | 406 | mBRdisabled = false; |
407 | //makes no sense,because other cal ap is probably running | 407 | //makes no sense,because other cal ap is probably running |
408 | // toggleBeamReceive(); | 408 | // toggleBeamReceive(); |
409 | } | 409 | } |
410 | } | 410 | } |
411 | #endif | 411 | #endif |
412 | 412 | ||
413 | } | 413 | } |
414 | bool MainWindow::beamReceiveEnabled() | 414 | bool MainWindow::beamReceiveEnabled() |
415 | { | 415 | { |
416 | #ifndef DESKTOP_VERSION | 416 | #ifndef DESKTOP_VERSION |
417 | return ( infrared != 0 ); | 417 | return ( infrared != 0 ); |
418 | #endif | 418 | #endif |
419 | return false; | 419 | return false; |
420 | } | 420 | } |
421 | 421 | ||
422 | void MainWindow::toggleBeamReceive() | 422 | void MainWindow::toggleBeamReceive() |
423 | { | 423 | { |
424 | if ( mBRdisabled ) | 424 | if ( mBRdisabled ) |
425 | return; | 425 | return; |
426 | #ifndef DESKTOP_VERSION | 426 | #ifndef DESKTOP_VERSION |
427 | if ( infrared ) { | 427 | if ( infrared ) { |
428 | qDebug("KO: Disable BeamReceive "); | 428 | qDebug("KO: Disable BeamReceive "); |
429 | delete infrared; | 429 | delete infrared; |
430 | infrared = 0; | 430 | infrared = 0; |
431 | brAction->setOn(false); | 431 | brAction->setOn(false); |
432 | return; | 432 | return; |
433 | } | 433 | } |
434 | qDebug("KO: Enable BeamReceive "); | 434 | qDebug("KO: Enable BeamReceive "); |
435 | brAction->setOn(true); | 435 | brAction->setOn(true); |
436 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; | 436 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; |
437 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); | 437 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); |
438 | #endif | 438 | #endif |
439 | } | 439 | } |
440 | void MainWindow::showMaximized () | 440 | void MainWindow::showMaximized () |
441 | { | 441 | { |
442 | #ifndef DESKTOP_VERSION | 442 | #ifndef DESKTOP_VERSION |
443 | if ( ! globalFlagBlockStartup ) | 443 | if ( ! globalFlagBlockStartup ) |
444 | if ( mClosed ) | 444 | if ( mClosed ) |
445 | mView->goToday(); | 445 | mView->goToday(); |
446 | #endif | 446 | #endif |
447 | QWidget::showMaximized () ; | 447 | QWidget::showMaximized () ; |
448 | mClosed = false; | 448 | mClosed = false; |
449 | } | 449 | } |
450 | void MainWindow::closeEvent( QCloseEvent* ce ) | 450 | void MainWindow::closeEvent( QCloseEvent* ce ) |
451 | { | 451 | { |
452 | 452 | ||
453 | 453 | ||
454 | 454 | ||
455 | if ( ! KOPrefs::instance()->mAskForQuit ) { | 455 | if ( ! KOPrefs::instance()->mAskForQuit ) { |
456 | saveOnClose(); | 456 | saveOnClose(); |
457 | mClosed = true; | 457 | mClosed = true; |
458 | ce->accept(); | 458 | ce->accept(); |
459 | return; | 459 | return; |
460 | 460 | ||
461 | } | 461 | } |
462 | 462 | ||
463 | switch( QMessageBox::information( this, "KO/Pi", | 463 | switch( QMessageBox::information( this, "KO/Pi", |
464 | i18n("Do you really want\nto close KO/Pi?"), | 464 | i18n("Do you really want\nto close KO/Pi?"), |
465 | i18n("Close"), i18n("No"), | 465 | i18n("Close"), i18n("No"), |
466 | 0, 0 ) ) { | 466 | 0, 0 ) ) { |
467 | case 0: | 467 | case 0: |
468 | saveOnClose(); | 468 | saveOnClose(); |
469 | mClosed = true; | 469 | mClosed = true; |
470 | ce->accept(); | 470 | ce->accept(); |
471 | break; | 471 | break; |
472 | case 1: | 472 | case 1: |
473 | ce->ignore(); | 473 | ce->ignore(); |
474 | break; | 474 | break; |
475 | case 2: | 475 | case 2: |
476 | 476 | ||
477 | default: | 477 | default: |
478 | break; | 478 | break; |
479 | } | 479 | } |
480 | 480 | ||
481 | 481 | ||
482 | } | 482 | } |
483 | 483 | ||
484 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | 484 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) |
485 | { | 485 | { |
486 | QDataStream stream( data, IO_ReadOnly ); | 486 | QDataStream stream( data, IO_ReadOnly ); |
487 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); | 487 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); |
488 | //QString datamess; | 488 | //QString datamess; |
489 | //qDebug("message "); | 489 | //qDebug("message "); |
490 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); | 490 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); |
491 | 491 | ||
492 | if ( cmsg == "setDocument(QString)" ) { | 492 | if ( cmsg == "setDocument(QString)" ) { |
493 | QDataStream stream( data, IO_ReadOnly ); | 493 | QDataStream stream( data, IO_ReadOnly ); |
494 | QString fileName; | 494 | QString fileName; |
495 | stream >> fileName; | 495 | stream >> fileName; |
496 | //qDebug("filename %s ", fileName.latin1()); | 496 | //qDebug("filename %s ", fileName.latin1()); |
497 | showMaximized(); | 497 | showMaximized(); |
498 | raise(); | 498 | raise(); |
499 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; | 499 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; |
500 | mSyncManager->slotSyncMenu( 1002 ); | 500 | mSyncManager->slotSyncMenu( 1002 ); |
501 | return; | 501 | return; |
502 | } | 502 | } |
503 | 503 | ||
504 | if ( cmsg == "-writeFile" ) { | 504 | if ( cmsg == "-writeFile" ) { |
505 | // I made from the "-writeFile" an "-writeAlarm" | 505 | // I made from the "-writeFile" an "-writeAlarm" |
506 | mView->viewManager()->showWhatsNextView(); | 506 | mView->viewManager()->showWhatsNextView(); |
507 | mCalendar->checkAlarmForIncidence( 0, true); | 507 | mCalendar->checkAlarmForIncidence( 0, true); |
508 | showMaximized(); | 508 | showMaximized(); |
509 | raise(); | 509 | raise(); |
510 | return; | 510 | return; |
511 | 511 | ||
512 | } | 512 | } |
513 | if ( cmsg == "-writeFileSilent" ) { | 513 | if ( cmsg == "-writeFileSilent" ) { |
514 | // I made from the "-writeFile" an "-writeAlarm" | 514 | // I made from the "-writeFile" an "-writeAlarm" |
515 | // mView->viewManager()->showWhatsNextView(); | 515 | // mView->viewManager()->showWhatsNextView(); |
516 | mCalendar->checkAlarmForIncidence( 0, true); | 516 | mCalendar->checkAlarmForIncidence( 0, true); |
517 | //showMaximized(); | 517 | //showMaximized(); |
518 | //raise(); | 518 | //raise(); |
519 | hide(); | 519 | hide(); |
520 | return; | 520 | return; |
521 | } | 521 | } |
522 | if ( cmsg == "-newCountdown" ) { | 522 | if ( cmsg == "-newCountdown" ) { |
523 | qDebug("newCountdown "); | 523 | qDebug("newCountdown "); |
524 | 524 | ||
525 | } | 525 | } |
526 | QString msg ; | 526 | QString msg ; |
527 | QString allmsg = cmsg; | 527 | QString allmsg = cmsg; |
528 | while ( allmsg.length() > 0 ) { | 528 | while ( allmsg.length() > 0 ) { |
529 | int nextC = allmsg.find( "-", 1 ); | 529 | int nextC = allmsg.find( "-", 1 ); |
530 | if ( nextC == -1 ) { | 530 | if ( nextC == -1 ) { |
531 | msg = allmsg; | 531 | msg = allmsg; |
532 | allmsg = ""; | 532 | allmsg = ""; |
533 | } else{ | 533 | } else{ |
534 | msg = allmsg.left( nextC ); | 534 | msg = allmsg.left( nextC ); |
535 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); | 535 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); |
536 | } | 536 | } |
537 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); | 537 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); |
538 | if ( msg == "-newEvent" ) { | 538 | if ( msg == "-newEvent" ) { |
539 | mView->newEvent(); | 539 | mView->newEvent(); |
540 | } | 540 | } |
541 | if ( msg == "-newTodo" ) { | 541 | if ( msg == "-newTodo" ) { |
542 | mView->newTodo(); | 542 | mView->newTodo(); |
543 | 543 | ||
544 | } | 544 | } |
545 | if ( msg == "-showWN" ) { | 545 | if ( msg == "-showWN" ) { |
546 | mView->viewManager()->showWhatsNextView(); | 546 | mView->viewManager()->showWhatsNextView(); |
547 | } | 547 | } |
548 | if ( msg == "-showTodo" ) { | 548 | if ( msg == "-showTodo" ) { |
549 | mView->viewManager()->showTodoView(); | 549 | mView->viewManager()->showTodoView(); |
550 | } | 550 | } |
551 | if ( msg == "-showList" ) { | 551 | if ( msg == "-showList" ) { |
552 | mView->viewManager()->showListView(); | 552 | mView->viewManager()->showListView(); |
553 | } | 553 | } |
554 | else if ( msg == "-showDay" ) { | 554 | else if ( msg == "-showDay" ) { |
555 | mView->viewManager()->showDayView(); | 555 | mView->viewManager()->showDayView(); |
556 | } | 556 | } |
557 | else if ( msg == "-showWWeek" ) { | 557 | else if ( msg == "-showWWeek" ) { |
558 | mView->viewManager()->showWorkWeekView(); | 558 | mView->viewManager()->showWorkWeekView(); |
559 | } | 559 | } |
560 | else if ( msg == "-ringSync" ) { | 560 | else if ( msg == "-ringSync" ) { |
561 | mSyncManager->multiSync( false ); | 561 | mSyncManager->multiSync( false ); |
562 | } | 562 | } |
563 | else if ( msg == "-showWeek" ) { | 563 | else if ( msg == "-showWeek" ) { |
564 | mView->viewManager()->showWeekView(); | 564 | mView->viewManager()->showWeekView(); |
565 | } | 565 | } |
566 | else if ( msg == "-showTodo" ) { | 566 | else if ( msg == "-showTodo" ) { |
567 | mView->viewManager()->showTodoView(); | 567 | mView->viewManager()->showTodoView(); |
568 | } | 568 | } |
569 | else if ( msg == "-showJournal" ) { | 569 | else if ( msg == "-showJournal" ) { |
570 | mView->dateNavigator()->selectDates( 1 ); | 570 | mView->dateNavigator()->selectDates( 1 ); |
571 | mView->dateNavigator()->selectToday(); | 571 | mView->dateNavigator()->selectToday(); |
572 | mView->viewManager()->showJournalView(); | 572 | mView->viewManager()->showJournalView(); |
573 | } | 573 | } |
574 | else if ( msg == "-showKO" ) { | 574 | else if ( msg == "-showKO" ) { |
575 | mView->viewManager()->showNextXView(); | 575 | mView->viewManager()->showNextXView(); |
576 | } | 576 | } |
577 | else if ( msg == "-showWNext" ) { | 577 | else if ( msg == "-showWNext" ) { |
578 | mView->viewManager()->showWhatsNextView(); | 578 | mView->viewManager()->showWhatsNextView(); |
579 | } | 579 | } |
580 | else if ( msg == "nextView()" ) { | 580 | else if ( msg == "nextView()" ) { |
581 | mView->viewManager()->showNextView(); | 581 | mView->viewManager()->showNextView(); |
582 | } | 582 | } |
583 | else if ( msg == "-showNextXView" ) { | 583 | else if ( msg == "-showNextXView" ) { |
584 | mView->viewManager()->showNextXView(); | 584 | mView->viewManager()->showNextXView(); |
585 | } | 585 | } |
586 | 586 | ||
587 | 587 | ||
588 | } | 588 | } |
589 | 589 | ||
590 | showMaximized(); | 590 | showMaximized(); |
591 | raise(); | 591 | raise(); |
592 | } | 592 | } |
593 | 593 | ||
594 | QPixmap MainWindow::loadPixmap( QString name ) | 594 | QPixmap MainWindow::loadPixmap( QString name ) |
595 | { | 595 | { |
596 | return SmallIcon( name ); | 596 | return SmallIcon( name ); |
597 | 597 | ||
598 | } | 598 | } |
599 | void MainWindow::setUsesBigPixmaps ( bool b ) | 599 | void MainWindow::setUsesBigPixmaps ( bool b ) |
600 | { | 600 | { |
601 | qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); | 601 | qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); |
602 | if ( b ) | 602 | if ( b ) |
603 | qDebug("KO: BigPixmaps are not supported "); | 603 | qDebug("KO: BigPixmaps are not supported "); |
604 | } | 604 | } |
605 | void MainWindow::initActions() | 605 | void MainWindow::initActions() |
606 | { | 606 | { |
607 | //KOPrefs::instance()->mShowFullMenu | 607 | //KOPrefs::instance()->mShowFullMenu |
608 | iconToolBar->clear(); | 608 | iconToolBar->clear(); |
609 | KOPrefs *p = KOPrefs::instance(); | 609 | KOPrefs *p = KOPrefs::instance(); |
610 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); | 610 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); |
611 | 611 | ||
612 | QPopupMenu *viewMenu = new QPopupMenu( this ); | 612 | QPopupMenu *viewMenu = new QPopupMenu( this ); |
613 | QPopupMenu *actionMenu = new QPopupMenu( this ); | 613 | QPopupMenu *actionMenu = new QPopupMenu( this ); |
614 | QPopupMenu *importMenu = new QPopupMenu( this ); | 614 | QPopupMenu *importMenu = new QPopupMenu( this ); |
615 | QPopupMenu *importMenu_X = new QPopupMenu( this ); | 615 | QPopupMenu *importMenu_X = new QPopupMenu( this ); |
616 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); | 616 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); |
617 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); | 617 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); |
618 | selectFilterMenu = new QPopupMenu( this ); | 618 | selectFilterMenu = new QPopupMenu( this ); |
619 | selectFilterMenu->setCheckable( true ); | 619 | selectFilterMenu->setCheckable( true ); |
620 | syncMenu = new QPopupMenu( this ); | 620 | syncMenu = new QPopupMenu( this ); |
621 | configureAgendaMenu = new QPopupMenu( this ); | 621 | configureAgendaMenu = new QPopupMenu( this ); |
622 | configureToolBarMenu = new QPopupMenu( this ); | 622 | configureToolBarMenu = new QPopupMenu( this ); |
623 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 623 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
624 | QIconSet icon; | 624 | QIconSet icon; |
625 | int pixWid = 22, pixHei = 22; | 625 | int pixWid = 22, pixHei = 22; |
626 | QString pathString = ""; | 626 | QString pathString = ""; |
627 | if ( !p->mToolBarMiniIcons ) { | 627 | if ( !p->mToolBarMiniIcons ) { |
628 | if ( QApplication::desktop()->width() < 480 ) { | 628 | if ( QApplication::desktop()->width() < 480 ) { |
629 | pathString += "icons16/"; | 629 | pathString += "icons16/"; |
630 | pixWid = 18; pixHei = 16; | 630 | pixWid = 18; pixHei = 16; |
631 | } | 631 | } |
632 | } else { | 632 | } else { |
633 | pathString += "iconsmini/"; | 633 | pathString += "iconsmini/"; |
634 | pixWid = 18; pixHei = 16; | 634 | pixWid = 18; pixHei = 16; |
635 | } | 635 | } |
636 | if ( KOPrefs::instance()->mShowFullMenu ) { | 636 | if ( KOPrefs::instance()->mShowFullMenu ) { |
637 | QMenuBar *menuBar1; | 637 | QMenuBar *menuBar1; |
638 | menuBar1 = menuBar(); | 638 | menuBar1 = menuBar(); |
639 | menuBar1->insertItem( i18n("File"), importMenu ); | 639 | menuBar1->insertItem( i18n("File"), importMenu ); |
640 | menuBar1->insertItem( i18n("View"), viewMenu ); | 640 | menuBar1->insertItem( i18n("View"), viewMenu ); |
641 | menuBar1->insertItem( i18n("Actions"), actionMenu ); | 641 | menuBar1->insertItem( i18n("Actions"), actionMenu ); |
642 | #ifdef DESKTOP_VERSION | 642 | #ifdef DESKTOP_VERSION |
643 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); | 643 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); |
644 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 644 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
645 | #else | 645 | #else |
646 | menuBar1->insertItem( i18n("Sync"), syncMenu ); | 646 | menuBar1->insertItem( i18n("Sync"), syncMenu ); |
647 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); | 647 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); |
648 | #endif | 648 | #endif |
649 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 649 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
650 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); | 650 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); |
651 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 651 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
652 | } else { | 652 | } else { |
653 | QPEMenuBar *menuBar1; | 653 | QPEMenuBar *menuBar1; |
654 | menuBar1 = new QPEMenuBar( iconToolBar ); | 654 | menuBar1 = new QPEMenuBar( iconToolBar ); |
655 | QPopupMenu *menuBar = new QPopupMenu( this ); | 655 | QPopupMenu *menuBar = new QPopupMenu( this ); |
656 | icon = loadPixmap( pathString + "z_menu" ); | 656 | icon = loadPixmap( pathString + "z_menu" ); |
657 | menuBar1->insertItem( icon.pixmap(), menuBar); | 657 | menuBar1->insertItem( icon.pixmap(), menuBar); |
658 | //menuBar1->insertItem( i18n("ME"), menuBar); | 658 | //menuBar1->insertItem( i18n("ME"), menuBar); |
659 | menuBar->insertItem( i18n("File"), importMenu ); | 659 | menuBar->insertItem( i18n("File"), importMenu ); |
660 | menuBar->insertItem( i18n("View"), viewMenu ); | 660 | menuBar->insertItem( i18n("View"), viewMenu ); |
661 | menuBar->insertItem( i18n("Actions"), actionMenu ); | 661 | menuBar->insertItem( i18n("Actions"), actionMenu ); |
662 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); | 662 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); |
663 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 663 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
664 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 664 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
665 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 665 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
666 | menuBar->insertItem( i18n("Help"), helpMenu ); | 666 | menuBar->insertItem( i18n("Help"), helpMenu ); |
667 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 667 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
668 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 668 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
669 | } | 669 | } |
670 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 670 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
671 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); | 671 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); |
672 | 672 | ||
673 | 673 | ||
674 | mWeekBgColor = iconToolBar->backgroundColor(); | 674 | mWeekBgColor = iconToolBar->backgroundColor(); |
675 | mWeekPixmap.resize( pixWid , pixHei ); | 675 | mWeekPixmap.resize( pixWid , pixHei ); |
676 | mWeekPixmap.fill( mWeekBgColor ); | 676 | mWeekPixmap.fill( mWeekBgColor ); |
677 | icon = mWeekPixmap; | 677 | icon = mWeekPixmap; |
678 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); | 678 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); |
679 | if ( p-> mShowIconWeekNum ) | 679 | if ( p-> mShowIconWeekNum ) |
680 | mWeekAction->addTo( iconToolBar ); | 680 | mWeekAction->addTo( iconToolBar ); |
681 | mWeekFont = font(); | 681 | mWeekFont = font(); |
682 | 682 | ||
683 | int fontPoint = mWeekFont.pointSize(); | 683 | int fontPoint = mWeekFont.pointSize(); |
684 | QFontMetrics f( mWeekFont ); | 684 | QFontMetrics f( mWeekFont ); |
685 | int fontWid = f.width( "30" ); | 685 | int fontWid = f.width( "30" ); |
686 | while ( fontWid > pixWid ) { | 686 | while ( fontWid > pixWid ) { |
687 | --fontPoint; | 687 | --fontPoint; |
688 | mWeekFont.setPointSize( fontPoint ); | 688 | mWeekFont.setPointSize( fontPoint ); |
689 | QFontMetrics f( mWeekFont ); | 689 | QFontMetrics f( mWeekFont ); |
690 | fontWid = f.width( "30" ); | 690 | fontWid = f.width( "30" ); |
691 | //qDebug("dec-- "); | 691 | //qDebug("dec-- "); |
692 | } | 692 | } |
693 | 693 | ||
694 | connect( mWeekAction, SIGNAL( activated() ), | 694 | connect( mWeekAction, SIGNAL( activated() ), |
695 | this, SLOT( weekAction() ) ); | 695 | this, SLOT( weekAction() ) ); |
696 | 696 | ||
697 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); | 697 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); |
698 | if ( p->mShowIconFilterview ) { | 698 | if ( p->mShowIconFilterview ) { |
699 | icon = loadPixmap( pathString + "filter" ); | 699 | icon = loadPixmap( pathString + "filter" ); |
700 | actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); | 700 | actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); |
701 | connect( actionFilterMenuTB, SIGNAL( activated() ), | 701 | connect( actionFilterMenuTB, SIGNAL( activated() ), |
702 | this, SLOT( fillFilterMenuTB() ) ); | 702 | this, SLOT( fillFilterMenuTB() ) ); |
703 | actionFilterMenuTB->addTo( iconToolBar ); | 703 | actionFilterMenuTB->addTo( iconToolBar ); |
704 | selectFilterMenuTB = new QPopupMenu( this ); | 704 | selectFilterMenuTB = new QPopupMenu( this ); |
705 | selectFilterMenuTB->setCheckable( true ); | 705 | selectFilterMenuTB->setCheckable( true ); |
706 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 706 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
707 | } | 707 | } |
708 | 708 | ||
709 | //#endif | 709 | //#endif |
710 | // ****************** | 710 | // ****************** |
711 | QAction *action; | 711 | QAction *action; |
712 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 712 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
713 | configureToolBarMenu->setCheckable( true ); | 713 | configureToolBarMenu->setCheckable( true ); |
714 | 714 | ||
715 | 715 | ||
716 | configureAgendaMenu->setCheckable( true ); | 716 | configureAgendaMenu->setCheckable( true ); |
717 | int iii ; | 717 | int iii ; |
718 | for ( iii = 1;iii<= 10 ;++iii ){ | 718 | for ( iii = 1;iii<= 10 ;++iii ){ |
719 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); | 719 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); |
720 | } | 720 | } |
721 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 721 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
722 | 722 | ||
723 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), | 723 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), |
724 | this, SLOT( showConfigureAgenda( ) ) ); | 724 | this, SLOT( showConfigureAgenda( ) ) ); |
725 | 725 | ||
726 | icon = loadPixmap( pathString + "configure" ); | 726 | icon = loadPixmap( pathString + "configure" ); |
727 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); | 727 | action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); |
728 | action->addTo( actionMenu ); | 728 | action->addTo( actionMenu ); |
729 | connect( action, SIGNAL( activated() ), | 729 | connect( action, SIGNAL( activated() ), |
730 | mView, SLOT( edit_options() ) ); | 730 | mView, SLOT( edit_options() ) ); |
731 | icon = loadPixmap( pathString + "configure" ); | ||
732 | action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); | ||
733 | action->addTo( actionMenu ); | ||
734 | connect( action, SIGNAL( activated() ), | ||
735 | mView, SLOT( edit_global_options() ) ); | ||
731 | actionMenu->insertSeparator(); | 736 | actionMenu->insertSeparator(); |
732 | 737 | ||
733 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | 738 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
734 | action->addTo( actionMenu ); | 739 | action->addTo( actionMenu ); |
735 | connect( action, SIGNAL( activated() ), | 740 | connect( action, SIGNAL( activated() ), |
736 | mView, SLOT( undo_delete() ) ); | 741 | mView, SLOT( undo_delete() ) ); |
737 | actionMenu->insertSeparator(); | 742 | actionMenu->insertSeparator(); |
738 | 743 | ||
739 | icon = loadPixmap( pathString + "newevent" ); | 744 | icon = loadPixmap( pathString + "newevent" ); |
740 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 745 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
741 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); | 746 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); |
742 | configureToolBarMenu->insertSeparator(); | 747 | configureToolBarMenu->insertSeparator(); |
743 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); | 748 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); |
744 | configureToolBarMenu->insertSeparator(); | 749 | configureToolBarMenu->insertSeparator(); |
745 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); | 750 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); |
746 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 751 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
747 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 752 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
748 | ne_action->addTo( actionMenu ); | 753 | ne_action->addTo( actionMenu ); |
749 | connect( ne_action, SIGNAL( activated() ), | 754 | connect( ne_action, SIGNAL( activated() ), |
750 | mView, SLOT( newEvent() ) ); | 755 | mView, SLOT( newEvent() ) ); |
751 | icon = loadPixmap( pathString + "newtodo" ); | 756 | icon = loadPixmap( pathString + "newtodo" ); |
752 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 757 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
753 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 758 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
754 | nt_action->addTo( actionMenu ); | 759 | nt_action->addTo( actionMenu ); |
755 | connect( nt_action, SIGNAL( activated() ), | 760 | connect( nt_action, SIGNAL( activated() ), |
756 | mView, SLOT( newTodo() ) ); | 761 | mView, SLOT( newTodo() ) ); |
757 | 762 | ||
758 | icon = loadPixmap( pathString + "today" ); | 763 | icon = loadPixmap( pathString + "today" ); |
759 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 764 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
760 | today_action->addTo( viewMenu ); | 765 | today_action->addTo( viewMenu ); |
761 | connect( today_action, SIGNAL( activated() ), | 766 | connect( today_action, SIGNAL( activated() ), |
762 | mView, SLOT( goToday() ) ); | 767 | mView, SLOT( goToday() ) ); |
763 | viewMenu->insertSeparator(); | 768 | viewMenu->insertSeparator(); |
764 | 769 | ||
765 | // *********************** | 770 | // *********************** |
766 | if ( KOPrefs::instance()->mVerticalScreen ) { | 771 | if ( KOPrefs::instance()->mVerticalScreen ) { |
767 | icon = SmallIcon( "1updownarrow" ); | 772 | icon = SmallIcon( "1updownarrow" ); |
768 | } else { | 773 | } else { |
769 | icon = SmallIcon("1leftrightarrow" ); | 774 | icon = SmallIcon("1leftrightarrow" ); |
770 | } | 775 | } |
771 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); | 776 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); |
772 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); | 777 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); |
773 | FSaction->addTo( viewMenu ); | 778 | FSaction->addTo( viewMenu ); |
774 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); | 779 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); |
775 | 780 | ||
776 | icon = loadPixmap( pathString + "navi" ); | 781 | icon = loadPixmap( pathString + "navi" ); |
777 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); | 782 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); |
778 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 783 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
779 | action->addTo( viewMenu ); | 784 | action->addTo( viewMenu ); |
780 | connect( action, SIGNAL( activated() ), | 785 | connect( action, SIGNAL( activated() ), |
781 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 786 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
782 | mToggleNav = action ; | 787 | mToggleNav = action ; |
783 | icon = loadPixmap( pathString + "filter" ); | 788 | icon = loadPixmap( pathString + "filter" ); |
784 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); | 789 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); |
785 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); | 790 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); |
786 | action->addTo( viewMenu ); | 791 | action->addTo( viewMenu ); |
787 | connect( action, SIGNAL( activated() ), | 792 | connect( action, SIGNAL( activated() ), |
788 | mView, SLOT( toggleFilter() ) ); | 793 | mView, SLOT( toggleFilter() ) ); |
789 | mToggleFilter = action; | 794 | mToggleFilter = action; |
790 | icon = loadPixmap( pathString + "allday" ); | 795 | icon = loadPixmap( pathString + "allday" ); |
791 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); | 796 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); |
792 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); | 797 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); |
793 | action->addTo( viewMenu ); | 798 | action->addTo( viewMenu ); |
794 | connect( action, SIGNAL( activated() ), | 799 | connect( action, SIGNAL( activated() ), |
795 | mView, SLOT( toggleAllDaySize() ) ); | 800 | mView, SLOT( toggleAllDaySize() ) ); |
796 | mToggleAllday = action; | 801 | mToggleAllday = action; |
797 | 802 | ||
798 | 803 | ||
799 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 804 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
800 | mToggleNav, SLOT( setEnabled ( bool ) ) ); | 805 | mToggleNav, SLOT( setEnabled ( bool ) ) ); |
801 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 806 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
802 | mToggleFilter, SLOT( setEnabled ( bool ) ) ); | 807 | mToggleFilter, SLOT( setEnabled ( bool ) ) ); |
803 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 808 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
804 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); | 809 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); |
805 | // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 810 | // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
806 | // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); | 811 | // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); |
807 | 812 | ||
808 | viewMenu->insertSeparator(); | 813 | viewMenu->insertSeparator(); |
809 | icon = loadPixmap( pathString + "picker" ); | 814 | icon = loadPixmap( pathString + "picker" ); |
810 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); | 815 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); |
811 | action->addTo( viewMenu ); | 816 | action->addTo( viewMenu ); |
812 | connect( action, SIGNAL( activated() ), | 817 | connect( action, SIGNAL( activated() ), |
813 | mView, SLOT( showDatePicker() ) ); | 818 | mView, SLOT( showDatePicker() ) ); |
814 | action->addTo( iconToolBar ); | 819 | action->addTo( iconToolBar ); |
815 | viewMenu->insertSeparator(); | 820 | viewMenu->insertSeparator(); |
816 | 821 | ||
817 | if ( p-> mShowIconToggleFull ) | 822 | if ( p-> mShowIconToggleFull ) |
818 | FSaction->addTo( iconToolBar ); | 823 | FSaction->addTo( iconToolBar ); |
819 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); | 824 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); |
820 | 825 | ||
821 | //******************** | 826 | //******************** |
822 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); | 827 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); |
823 | 828 | ||
824 | 829 | ||
825 | icon = loadPixmap( pathString + "whatsnext" ); | 830 | icon = loadPixmap( pathString + "whatsnext" ); |
826 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); | 831 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); |
827 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 832 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
828 | whatsnext_action->addTo( viewMenu ); | 833 | whatsnext_action->addTo( viewMenu ); |
829 | connect( whatsnext_action, SIGNAL( activated() ), | 834 | connect( whatsnext_action, SIGNAL( activated() ), |
830 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 835 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
831 | 836 | ||
832 | icon = loadPixmap( pathString + "xdays" ); | 837 | icon = loadPixmap( pathString + "xdays" ); |
833 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); | 838 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); |
834 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 839 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
835 | xdays_action->addTo( viewMenu ); | 840 | xdays_action->addTo( viewMenu ); |
836 | connect( xdays_action, SIGNAL( activated() ), | 841 | connect( xdays_action, SIGNAL( activated() ), |
837 | mView->viewManager(), SLOT( showNextXView() ) ); | 842 | mView->viewManager(), SLOT( showNextXView() ) ); |
838 | 843 | ||
839 | 844 | ||
840 | icon = loadPixmap( pathString + "journal" ); | 845 | icon = loadPixmap( pathString + "journal" ); |
841 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 846 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
842 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 847 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
843 | viewjournal_action->addTo( viewMenu ); | 848 | viewjournal_action->addTo( viewMenu ); |
844 | connect( viewjournal_action, SIGNAL( activated() ), | 849 | connect( viewjournal_action, SIGNAL( activated() ), |
845 | mView->viewManager(), SLOT( showJournalView() ) ); | 850 | mView->viewManager(), SLOT( showJournalView() ) ); |
846 | 851 | ||
847 | 852 | ||
848 | icon = loadPixmap( pathString + "day" ); | 853 | icon = loadPixmap( pathString + "day" ); |
849 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 854 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
850 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 855 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
851 | day1_action->addTo( viewMenu ); | 856 | day1_action->addTo( viewMenu ); |
852 | // action->addTo( toolBar ); | 857 | // action->addTo( toolBar ); |
853 | connect( day1_action, SIGNAL( activated() ), | 858 | connect( day1_action, SIGNAL( activated() ), |
854 | mView->viewManager(), SLOT( showDayView() ) ); | 859 | mView->viewManager(), SLOT( showDayView() ) ); |
855 | 860 | ||
856 | icon = loadPixmap( pathString + "workweek" ); | 861 | icon = loadPixmap( pathString + "workweek" ); |
857 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 862 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
858 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 863 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
859 | day5_action->addTo( viewMenu ); | 864 | day5_action->addTo( viewMenu ); |
860 | connect( day5_action, SIGNAL( activated() ), | 865 | connect( day5_action, SIGNAL( activated() ), |
861 | mView->viewManager(), SLOT( showWorkWeekView() ) ); | 866 | mView->viewManager(), SLOT( showWorkWeekView() ) ); |
862 | 867 | ||
863 | icon = loadPixmap( pathString + "week" ); | 868 | icon = loadPixmap( pathString + "week" ); |
864 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 869 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
865 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 870 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
866 | day7_action->addTo( viewMenu ); | 871 | day7_action->addTo( viewMenu ); |
867 | connect( day7_action, SIGNAL( activated() ), | 872 | connect( day7_action, SIGNAL( activated() ), |
868 | mView->viewManager(), SLOT( showWeekView() ) ); | 873 | mView->viewManager(), SLOT( showWeekView() ) ); |
869 | 874 | ||
870 | icon = loadPixmap( pathString + "workweek2" ); | 875 | icon = loadPixmap( pathString + "workweek2" ); |
871 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); | 876 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); |
872 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); | 877 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); |
873 | day6_action->addTo( viewMenu ); | 878 | day6_action->addTo( viewMenu ); |
874 | connect( day6_action, SIGNAL( activated() ), | 879 | connect( day6_action, SIGNAL( activated() ), |
875 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); | 880 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); |
876 | 881 | ||
877 | icon = loadPixmap( pathString + "month" ); | 882 | icon = loadPixmap( pathString + "month" ); |
878 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 883 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
879 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 884 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
880 | month_action->addTo( viewMenu ); | 885 | month_action->addTo( viewMenu ); |
881 | connect( month_action, SIGNAL( activated() ), | 886 | connect( month_action, SIGNAL( activated() ), |
882 | mView->viewManager(), SLOT( showMonthView() ) ); | 887 | mView->viewManager(), SLOT( showMonthView() ) ); |
883 | 888 | ||
884 | icon = loadPixmap( pathString + "list" ); | 889 | icon = loadPixmap( pathString + "list" ); |
885 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | 890 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); |
886 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | 891 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); |
887 | showlist_action->addTo( viewMenu ); | 892 | showlist_action->addTo( viewMenu ); |
888 | connect( showlist_action, SIGNAL( activated() ), | 893 | connect( showlist_action, SIGNAL( activated() ), |
889 | mView->viewManager(), SLOT( showListView() ) ); | 894 | mView->viewManager(), SLOT( showListView() ) ); |
890 | 895 | ||
891 | icon = loadPixmap( pathString + "todo" ); | 896 | icon = loadPixmap( pathString + "todo" ); |
892 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 897 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
893 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 898 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
894 | todoview_action->addTo( viewMenu ); | 899 | todoview_action->addTo( viewMenu ); |
895 | connect( todoview_action, SIGNAL( activated() ), | 900 | connect( todoview_action, SIGNAL( activated() ), |
896 | mView->viewManager(), SLOT( showTodoView() ) ); | 901 | mView->viewManager(), SLOT( showTodoView() ) ); |
897 | 902 | ||
898 | 903 | ||
899 | 904 | ||
900 | #if 0 | 905 | #if 0 |
901 | action = new QAction( "view_timespan", "Time Span", 0, this ); | 906 | action = new QAction( "view_timespan", "Time Span", 0, this ); |
902 | action->addTo( viewMenu ); | 907 | action->addTo( viewMenu ); |
903 | connect( action, SIGNAL( activated() ), | 908 | connect( action, SIGNAL( activated() ), |
904 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 909 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
905 | #endif | 910 | #endif |
906 | 911 | ||
907 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 912 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, |
908 | this ); | 913 | this ); |
909 | mNewSubTodoAction->addTo( actionMenu ); | 914 | mNewSubTodoAction->addTo( actionMenu ); |
910 | connect( mNewSubTodoAction, SIGNAL( activated() ), | 915 | connect( mNewSubTodoAction, SIGNAL( activated() ), |
911 | mView, SLOT( newSubTodo() ) ); | 916 | mView, SLOT( newSubTodo() ) ); |
912 | 917 | ||
913 | actionMenu->insertSeparator(); | 918 | actionMenu->insertSeparator(); |
914 | 919 | ||
915 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); | 920 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); |
916 | mShowAction->addTo( actionMenu ); | 921 | mShowAction->addTo( actionMenu ); |
917 | connect( mShowAction, SIGNAL( activated() ), | 922 | connect( mShowAction, SIGNAL( activated() ), |
918 | mView, SLOT( showIncidence() ) ); | 923 | mView, SLOT( showIncidence() ) ); |
919 | 924 | ||
920 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); | 925 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); |
921 | mEditAction->addTo( actionMenu ); | 926 | mEditAction->addTo( actionMenu ); |
922 | connect( mEditAction, SIGNAL( activated() ), | 927 | connect( mEditAction, SIGNAL( activated() ), |
923 | mView, SLOT( editIncidence() ) ); | 928 | mView, SLOT( editIncidence() ) ); |
924 | 929 | ||
925 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); | 930 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); |
926 | mDeleteAction->addTo( actionMenu ); | 931 | mDeleteAction->addTo( actionMenu ); |
927 | connect( mDeleteAction, SIGNAL( activated() ), | 932 | connect( mDeleteAction, SIGNAL( activated() ), |
928 | mView, SLOT( deleteIncidence() ) ); | 933 | mView, SLOT( deleteIncidence() ) ); |
929 | 934 | ||
930 | 935 | ||
931 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); | 936 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); |
932 | mCloneAction->addTo( actionMenu ); | 937 | mCloneAction->addTo( actionMenu ); |
933 | connect( mCloneAction, SIGNAL( activated() ), | 938 | connect( mCloneAction, SIGNAL( activated() ), |
934 | mView, SLOT( cloneIncidence() ) ); | 939 | mView, SLOT( cloneIncidence() ) ); |
935 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); | 940 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); |
936 | mMoveAction->addTo( actionMenu ); | 941 | mMoveAction->addTo( actionMenu ); |
937 | connect( mMoveAction, SIGNAL( activated() ), | 942 | connect( mMoveAction, SIGNAL( activated() ), |
938 | mView, SLOT( moveIncidence() ) ); | 943 | mView, SLOT( moveIncidence() ) ); |
939 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); | 944 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); |
940 | mBeamAction->addTo( actionMenu ); | 945 | mBeamAction->addTo( actionMenu ); |
941 | connect( mBeamAction, SIGNAL( activated() ), | 946 | connect( mBeamAction, SIGNAL( activated() ), |
942 | mView, SLOT( beamIncidence() ) ); | 947 | mView, SLOT( beamIncidence() ) ); |
943 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); | 948 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); |
944 | mCancelAction->addTo( actionMenu ); | 949 | mCancelAction->addTo( actionMenu ); |
945 | connect( mCancelAction, SIGNAL( activated() ), | 950 | connect( mCancelAction, SIGNAL( activated() ), |
946 | mView, SLOT( toggleCancelIncidence() ) ); | 951 | mView, SLOT( toggleCancelIncidence() ) ); |
947 | 952 | ||
948 | actionMenu->insertSeparator(); | 953 | actionMenu->insertSeparator(); |
949 | 954 | ||
950 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, | 955 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, |
951 | this ); | 956 | this ); |
952 | action->addTo( actionMenu ); | 957 | action->addTo( actionMenu ); |
953 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); | 958 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); |
954 | 959 | ||
955 | icon = loadPixmap( pathString + "search" ); | 960 | icon = loadPixmap( pathString + "search" ); |
956 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 961 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); |
957 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); | 962 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); |
958 | search_action->addTo( actionMenu ); | 963 | search_action->addTo( actionMenu ); |
959 | connect( search_action, SIGNAL( activated() ), | 964 | connect( search_action, SIGNAL( activated() ), |
960 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 965 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
961 | 966 | ||
962 | 967 | ||
963 | 968 | ||
964 | if ( KOPrefs::instance()->mShowFullMenu ) { | 969 | if ( KOPrefs::instance()->mShowFullMenu ) { |
965 | actionMenu->insertSeparator(); | 970 | actionMenu->insertSeparator(); |
966 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); | 971 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); |
967 | 972 | ||
968 | } | 973 | } |
969 | // actionMenu->insertSeparator(); | 974 | // actionMenu->insertSeparator(); |
970 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, | 975 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, |
971 | this ); | 976 | this ); |
972 | action->addTo( importMenu_X ); | 977 | action->addTo( importMenu_X ); |
973 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); | 978 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); |
974 | action = new QAction( "import_quick", i18n("Import last file"), 0, | 979 | action = new QAction( "import_quick", i18n("Import last file"), 0, |
975 | this ); | 980 | this ); |
976 | action->addTo( importMenu_X ); | 981 | action->addTo( importMenu_X ); |
977 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); | 982 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); |
978 | importMenu_X->insertSeparator(); | 983 | importMenu_X->insertSeparator(); |
979 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, | 984 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, |
980 | this ); | 985 | this ); |
981 | action->addTo( importMenu_X ); | 986 | action->addTo( importMenu_X ); |
982 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); | 987 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); |
983 | //#ifndef DESKTOP_VERSION | 988 | //#ifndef DESKTOP_VERSION |
984 | importMenu_X->insertSeparator(); | 989 | importMenu_X->insertSeparator(); |
985 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, | 990 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, |
986 | this ); | 991 | this ); |
987 | action->addTo( importMenu_X ); | 992 | action->addTo( importMenu_X ); |
988 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); | 993 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); |
989 | //#else | 994 | //#else |
990 | #ifdef _OL_IMPORT_ | 995 | #ifdef _OL_IMPORT_ |
991 | importMenu_X->insertSeparator(); | 996 | importMenu_X->insertSeparator(); |
992 | action = new QAction( "import_ol", i18n("Import from OL"), 0, | 997 | action = new QAction( "import_ol", i18n("Import from OL"), 0, |
993 | this ); | 998 | this ); |
994 | action->addTo( importMenu_X ); | 999 | action->addTo( importMenu_X ); |
995 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); | 1000 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); |
996 | #endif | 1001 | #endif |
997 | //#endif | 1002 | //#endif |
998 | 1003 | ||
999 | //importMenu->insertSeparator(); | 1004 | //importMenu->insertSeparator(); |
1000 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, | 1005 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, |
1001 | this ); | 1006 | this ); |
1002 | action->addTo( importMenu ); | 1007 | action->addTo( importMenu ); |
1003 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); | 1008 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); |
1004 | 1009 | ||
1005 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, | 1010 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, |
1006 | this ); | 1011 | this ); |
1007 | action->addTo( importMenu ); | 1012 | action->addTo( importMenu ); |
1008 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 1013 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
1009 | importMenu->insertSeparator(); | 1014 | importMenu->insertSeparator(); |
1010 | importMenu->insertItem( i18n("Import"), importMenu_X ); | 1015 | importMenu->insertItem( i18n("Import"), importMenu_X ); |
1011 | //importMenu->insertSeparator(); | 1016 | //importMenu->insertSeparator(); |
1012 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 1017 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, |
1013 | this ); | 1018 | this ); |
1014 | action->addTo( exportMenu_X ); | 1019 | action->addTo( exportMenu_X ); |
1015 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 1020 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
1016 | 1021 | ||
1017 | 1022 | ||
1018 | //LR | 1023 | //LR |
1019 | QPopupMenu *ex2phone = new QPopupMenu( this ); | 1024 | QPopupMenu *ex2phone = new QPopupMenu( this ); |
1020 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1025 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1021 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1026 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1022 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); | 1027 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); |
1023 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); | 1028 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); |
1024 | 1029 | ||
1025 | importMenu->insertItem( i18n("Export"), exportMenu_X ); | 1030 | importMenu->insertItem( i18n("Export"), exportMenu_X ); |
1026 | #ifndef DESKTOP_VERSION | 1031 | #ifndef DESKTOP_VERSION |
1027 | //importMenu->insertSeparator(); | 1032 | //importMenu->insertSeparator(); |
1028 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, | 1033 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, |
1029 | this ); | 1034 | this ); |
1030 | brAction->addTo( beamMenu_X ); | 1035 | brAction->addTo( beamMenu_X ); |
1031 | brAction->setToggleAction (true ) ; | 1036 | brAction->setToggleAction (true ) ; |
1032 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 1037 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
1033 | 1038 | ||
1034 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 1039 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
1035 | this ); | 1040 | this ); |
1036 | action->addTo( beamMenu_X ); | 1041 | action->addTo( beamMenu_X ); |
1037 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 1042 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
1038 | 1043 | ||
1039 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 1044 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
1040 | this ); | 1045 | this ); |
1041 | action->addTo( beamMenu_X ); | 1046 | action->addTo( beamMenu_X ); |
1042 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 1047 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
1043 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); | 1048 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); |
1044 | #else | 1049 | #else |
1045 | //importMenu->insertSeparator(); | 1050 | //importMenu->insertSeparator(); |
1046 | icon = loadPixmap( pathString + "print" ); | 1051 | icon = loadPixmap( pathString + "print" ); |
1047 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 1052 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
1048 | action->addTo( beamMenu_X ); | 1053 | action->addTo( beamMenu_X ); |
1049 | connect( action, SIGNAL( activated() ), | 1054 | connect( action, SIGNAL( activated() ), |
1050 | this, SLOT( printCal() ) ); | 1055 | this, SLOT( printCal() ) ); |
1051 | 1056 | ||
1052 | icon = loadPixmap( pathString + "print" ); | 1057 | icon = loadPixmap( pathString + "print" ); |
1053 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 1058 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
1054 | action->addTo( beamMenu_X ); | 1059 | action->addTo( beamMenu_X ); |
1055 | connect( action, SIGNAL( activated() ), | 1060 | connect( action, SIGNAL( activated() ), |
1056 | this, SLOT( printSel() ) ); | 1061 | this, SLOT( printSel() ) ); |
1057 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); | 1062 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); |
1058 | action->addTo( beamMenu_X ); | 1063 | action->addTo( beamMenu_X ); |
1059 | connect( action, SIGNAL( activated() ), | 1064 | connect( action, SIGNAL( activated() ), |
1060 | mView->viewManager(), SLOT( slotprintWNV() ) ); | 1065 | mView->viewManager(), SLOT( slotprintWNV() ) ); |
1061 | 1066 | ||
1062 | 1067 | ||
1063 | icon = loadPixmap( pathString + "print" ); | 1068 | icon = loadPixmap( pathString + "print" ); |
1064 | action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); | 1069 | action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); |
1065 | action->addTo( beamMenu_X ); | 1070 | action->addTo( beamMenu_X ); |
1066 | connect( action, SIGNAL( activated() ), | 1071 | connect( action, SIGNAL( activated() ), |
1067 | this, SLOT( printListView() ) ); | 1072 | this, SLOT( printListView() ) ); |
1068 | 1073 | ||
1069 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); | 1074 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); |
1070 | action->addTo( beamMenu_X ); | 1075 | action->addTo( beamMenu_X ); |
1071 | connect( action, SIGNAL( activated() ), | 1076 | connect( action, SIGNAL( activated() ), |
1072 | mView, SLOT( slotprintSelInc() ) ); | 1077 | mView, SLOT( slotprintSelInc() ) ); |
1073 | 1078 | ||
1074 | importMenu->insertItem( i18n("Print"), beamMenu_X ); | 1079 | importMenu->insertItem( i18n("Print"), beamMenu_X ); |
1075 | #endif | 1080 | #endif |
1076 | importMenu->insertSeparator(); | 1081 | importMenu->insertSeparator(); |
1077 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 1082 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
1078 | this ); | 1083 | this ); |
1079 | action->addTo( importMenu ); | 1084 | action->addTo( importMenu ); |
1080 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 1085 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
1081 | importMenu->insertSeparator(); | 1086 | importMenu->insertSeparator(); |
1082 | action = new QAction( "beam all", i18n("Save"), 0, | 1087 | action = new QAction( "beam all", i18n("Save"), 0, |
1083 | this ); | 1088 | this ); |
1084 | action->addTo( importMenu ); | 1089 | action->addTo( importMenu ); |
1085 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 1090 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
1086 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 1091 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
1087 | this ); | 1092 | this ); |
1088 | action->addTo( importMenu ); | 1093 | action->addTo( importMenu ); |
1089 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 1094 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
1090 | 1095 | ||
1091 | //menuBar->insertItem( "Configure",configureMenu ); | 1096 | //menuBar->insertItem( "Configure",configureMenu ); |
1092 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 1097 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
1093 | icon = loadPixmap( "korganizer/korganizer" ); | 1098 | icon = loadPixmap( "korganizer/korganizer" ); |
1094 | 1099 | ||
1095 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 1100 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
1096 | action->addTo( helpMenu ); | 1101 | action->addTo( helpMenu ); |
1097 | connect( action, SIGNAL( activated() ), | 1102 | connect( action, SIGNAL( activated() ), |
1098 | SLOT( whatsNew() ) ); | 1103 | SLOT( whatsNew() ) ); |
1099 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 1104 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
1100 | action->addTo( helpMenu ); | 1105 | action->addTo( helpMenu ); |
1101 | connect( action, SIGNAL( activated() ), | 1106 | connect( action, SIGNAL( activated() ), |
1102 | SLOT( features() ) ); | 1107 | SLOT( features() ) ); |
1103 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 1108 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
1104 | action->addTo( helpMenu ); | 1109 | action->addTo( helpMenu ); |
1105 | connect( action, SIGNAL( activated() ), | 1110 | connect( action, SIGNAL( activated() ), |
1106 | SLOT( keyBindings() ) ); | 1111 | SLOT( keyBindings() ) ); |
1107 | action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); | 1112 | action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); |
1108 | action->addTo( helpMenu ); | 1113 | action->addTo( helpMenu ); |
1109 | connect( action, SIGNAL( activated() ), | 1114 | connect( action, SIGNAL( activated() ), |
1110 | SLOT( storagehowto() ) ); | 1115 | SLOT( storagehowto() ) ); |
1111 | action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); | 1116 | action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); |
1112 | action->addTo( helpMenu ); | 1117 | action->addTo( helpMenu ); |
1113 | connect( action, SIGNAL( activated() ), | 1118 | connect( action, SIGNAL( activated() ), |
1114 | SLOT( timetrackinghowto() ) ); | 1119 | SLOT( timetrackinghowto() ) ); |
1115 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 1120 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
1116 | action->addTo( helpMenu ); | 1121 | action->addTo( helpMenu ); |
1117 | connect( action, SIGNAL( activated() ), | 1122 | connect( action, SIGNAL( activated() ), |
1118 | SLOT( synchowto() ) ); | 1123 | SLOT( synchowto() ) ); |
1119 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); | 1124 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); |
1120 | action->addTo( helpMenu ); | 1125 | action->addTo( helpMenu ); |
1121 | connect( action, SIGNAL( activated() ), | 1126 | connect( action, SIGNAL( activated() ), |
1122 | SLOT( kdesynchowto() ) ); | 1127 | SLOT( kdesynchowto() ) ); |
1123 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); | 1128 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); |
1124 | action->addTo( helpMenu ); | 1129 | action->addTo( helpMenu ); |
1125 | connect( action, SIGNAL( activated() ), | 1130 | connect( action, SIGNAL( activated() ), |
1126 | SLOT( multisynchowto() ) ); | 1131 | SLOT( multisynchowto() ) ); |
1127 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 1132 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
1128 | action->addTo( helpMenu ); | 1133 | action->addTo( helpMenu ); |
1129 | connect( action, SIGNAL( activated() ), | 1134 | connect( action, SIGNAL( activated() ), |
1130 | SLOT( aboutAutoSaving() ) ); | 1135 | SLOT( aboutAutoSaving() ) ); |
1131 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 1136 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
1132 | action->addTo( helpMenu ); | 1137 | action->addTo( helpMenu ); |
1133 | connect( action, SIGNAL( activated() ), | 1138 | connect( action, SIGNAL( activated() ), |
1134 | SLOT( aboutKnownBugs() ) ); | 1139 | SLOT( aboutKnownBugs() ) ); |
1135 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 1140 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
1136 | action->addTo( helpMenu ); | 1141 | action->addTo( helpMenu ); |
1137 | connect( action, SIGNAL( activated() ), | 1142 | connect( action, SIGNAL( activated() ), |
1138 | SLOT( usertrans() ) ); | 1143 | SLOT( usertrans() ) ); |
1139 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 1144 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
1140 | action->addTo( helpMenu ); | 1145 | action->addTo( helpMenu ); |
1141 | connect( action, SIGNAL( activated() ), | 1146 | connect( action, SIGNAL( activated() ), |
1142 | SLOT( faq() ) ); | 1147 | SLOT( faq() ) ); |
1143 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | 1148 | action = new QAction( "licence", i18n("Licence..."), 0, this ); |
1144 | action->addTo( helpMenu ); | 1149 | action->addTo( helpMenu ); |
1145 | connect( action, SIGNAL( activated() ), | 1150 | connect( action, SIGNAL( activated() ), |
1146 | SLOT( licence() ) ); | 1151 | SLOT( licence() ) ); |
1147 | action = new QAction( "about", i18n("About..."), 0, this ); | 1152 | action = new QAction( "about", i18n("About..."), 0, this ); |
1148 | action->addTo( helpMenu ); | 1153 | action->addTo( helpMenu ); |
1149 | connect( action, SIGNAL( activated() ), | 1154 | connect( action, SIGNAL( activated() ), |
1150 | SLOT( about() ) ); | 1155 | SLOT( about() ) ); |
1151 | //menuBar->insertSeparator(); | 1156 | //menuBar->insertSeparator(); |
1152 | 1157 | ||
1153 | // ****************************************************** | 1158 | // ****************************************************** |
1154 | // menubar icons | 1159 | // menubar icons |
1155 | 1160 | ||
1156 | 1161 | ||
1157 | 1162 | ||
1158 | //menuBar->insertItem( iconToolBar ); | 1163 | //menuBar->insertItem( iconToolBar ); |
1159 | //xdays_action | 1164 | //xdays_action |
1160 | if (p-> mShowIconNewEvent) | 1165 | if (p-> mShowIconNewEvent) |
1161 | ne_action->addTo( iconToolBar ); | 1166 | ne_action->addTo( iconToolBar ); |
1162 | if (p->mShowIconNewTodo ) | 1167 | if (p->mShowIconNewTodo ) |
1163 | nt_action->addTo( iconToolBar ); | 1168 | nt_action->addTo( iconToolBar ); |
1164 | if (p-> mShowIconSearch) | 1169 | if (p-> mShowIconSearch) |
1165 | search_action->addTo( iconToolBar ); | 1170 | search_action->addTo( iconToolBar ); |
1166 | if (p-> mShowIconWhatsThis) | 1171 | if (p-> mShowIconWhatsThis) |
1167 | QWhatsThis::whatsThisButton ( iconToolBar ); | 1172 | QWhatsThis::whatsThisButton ( iconToolBar ); |
1168 | if (p-> mShowIconNext) | 1173 | if (p-> mShowIconNext) |
1169 | whatsnext_action->addTo( viewToolBar ); | 1174 | whatsnext_action->addTo( viewToolBar ); |
1170 | if (p-> mShowIconNextDays) | 1175 | if (p-> mShowIconNextDays) |
1171 | xdays_action->addTo( viewToolBar ); | 1176 | xdays_action->addTo( viewToolBar ); |
1172 | if (p-> mShowIconJournal) | 1177 | if (p-> mShowIconJournal) |
1173 | viewjournal_action->addTo( viewToolBar ); | 1178 | viewjournal_action->addTo( viewToolBar ); |
1174 | if (p-> mShowIconDay1) | 1179 | if (p-> mShowIconDay1) |
1175 | day1_action->addTo( viewToolBar ); | 1180 | day1_action->addTo( viewToolBar ); |
1176 | if (p-> mShowIconDay5) | 1181 | if (p-> mShowIconDay5) |
1177 | day5_action->addTo( viewToolBar ); | 1182 | day5_action->addTo( viewToolBar ); |
1178 | if (p-> mShowIconDay7) | 1183 | if (p-> mShowIconDay7) |
1179 | day7_action->addTo( viewToolBar ); | 1184 | day7_action->addTo( viewToolBar ); |
1180 | if (p-> mShowIconDay6) | 1185 | if (p-> mShowIconDay6) |
1181 | day6_action->addTo( viewToolBar ); | 1186 | day6_action->addTo( viewToolBar ); |
1182 | if (p-> mShowIconMonth) | 1187 | if (p-> mShowIconMonth) |
1183 | month_action->addTo( viewToolBar ); | 1188 | month_action->addTo( viewToolBar ); |
1184 | if (p-> mShowIconList) | 1189 | if (p-> mShowIconList) |
1185 | showlist_action->addTo( viewToolBar ); | 1190 | showlist_action->addTo( viewToolBar ); |
1186 | if (p-> mShowIconTodoview) | 1191 | if (p-> mShowIconTodoview) |
1187 | todoview_action->addTo( viewToolBar ); | 1192 | todoview_action->addTo( viewToolBar ); |
1188 | 1193 | ||
1189 | icon = loadPixmap( pathString + "2leftarrowB" ); | 1194 | icon = loadPixmap( pathString + "2leftarrowB" ); |
1190 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); | 1195 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); |
1191 | if (p-> mShowIconBackFast) { | 1196 | if (p-> mShowIconBackFast) { |
1192 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 1197 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
1193 | connect( action, SIGNAL( activated() ), | 1198 | connect( action, SIGNAL( activated() ), |
1194 | mView, SLOT( goPreviousMonth() ) ); | 1199 | mView, SLOT( goPreviousMonth() ) ); |
1195 | action->addTo( navigatorToolBar ); | 1200 | action->addTo( navigatorToolBar ); |
1196 | } | 1201 | } |
1197 | icon = loadPixmap( pathString + "1leftarrowB" ); | 1202 | icon = loadPixmap( pathString + "1leftarrowB" ); |
1198 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); | 1203 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); |
1199 | if (p-> mShowIconBack) { | 1204 | if (p-> mShowIconBack) { |
1200 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 1205 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
1201 | connect( action, SIGNAL( activated() ), | 1206 | connect( action, SIGNAL( activated() ), |
1202 | mView, SLOT( goPrevious() ) ); | 1207 | mView, SLOT( goPrevious() ) ); |
1203 | action->addTo( navigatorToolBar ); | 1208 | action->addTo( navigatorToolBar ); |
1204 | } | 1209 | } |
1205 | icon = loadPixmap( pathString + "today" ); | 1210 | icon = loadPixmap( pathString + "today" ); |
1206 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 1211 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
1207 | if (p-> mShowIconToday) | 1212 | if (p-> mShowIconToday) |
1208 | today_action->addTo( navigatorToolBar ); | 1213 | today_action->addTo( navigatorToolBar ); |
1209 | icon = loadPixmap( pathString + "1rightarrowB" ); | 1214 | icon = loadPixmap( pathString + "1rightarrowB" ); |
1210 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 1215 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
1211 | if (p-> mShowIconForward) { | 1216 | if (p-> mShowIconForward) { |
1212 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 1217 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
1213 | connect( action, SIGNAL( activated() ), | 1218 | connect( action, SIGNAL( activated() ), |
1214 | mView, SLOT( goNext() ) ); | 1219 | mView, SLOT( goNext() ) ); |
1215 | action->addTo( navigatorToolBar ); | 1220 | action->addTo( navigatorToolBar ); |
1216 | } | 1221 | } |
1217 | icon = loadPixmap( pathString + "2rightarrowB" ); | 1222 | icon = loadPixmap( pathString + "2rightarrowB" ); |
1218 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 1223 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
1219 | if (p-> mShowIconForwardFast) { | 1224 | if (p-> mShowIconForwardFast) { |
1220 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); | 1225 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); |
1221 | connect( action, SIGNAL( activated() ), | 1226 | connect( action, SIGNAL( activated() ), |
1222 | mView, SLOT( goNextMonth() ) ); | 1227 | mView, SLOT( goNextMonth() ) ); |
1223 | action->addTo( navigatorToolBar ); | 1228 | action->addTo( navigatorToolBar ); |
1224 | } | 1229 | } |
1225 | 1230 | ||
1226 | 1231 | ||
1227 | configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); | 1232 | configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); |
1228 | 1233 | ||
1229 | 1234 | ||
1230 | if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); | 1235 | if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); |
1231 | if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); | 1236 | if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); |
1232 | if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); | 1237 | if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); |
1233 | if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); | 1238 | if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); |
1234 | 1239 | ||
1235 | if (p-> mShowIconNewEvent) | 1240 | if (p-> mShowIconNewEvent) |
1236 | configureToolBarMenu->setItemChecked( 10, true ); | 1241 | configureToolBarMenu->setItemChecked( 10, true ); |
1237 | if (p->mShowIconNewTodo ) | 1242 | if (p->mShowIconNewTodo ) |
1238 | configureToolBarMenu->setItemChecked( 20, true ); | 1243 | configureToolBarMenu->setItemChecked( 20, true ); |
1239 | if (p-> mShowIconSearch) | 1244 | if (p-> mShowIconSearch) |
1240 | configureToolBarMenu->setItemChecked( 120, true ); | 1245 | configureToolBarMenu->setItemChecked( 120, true ); |
1241 | if (p-> mShowIconList) | 1246 | if (p-> mShowIconList) |
1242 | configureToolBarMenu->setItemChecked( 30, true ); | 1247 | configureToolBarMenu->setItemChecked( 30, true ); |
1243 | if (p-> mShowIconDay1) | 1248 | if (p-> mShowIconDay1) |
1244 | configureToolBarMenu->setItemChecked( 40, true ); | 1249 | configureToolBarMenu->setItemChecked( 40, true ); |
1245 | if (p-> mShowIconDay5) | 1250 | if (p-> mShowIconDay5) |
1246 | configureToolBarMenu->setItemChecked( 50, true ); | 1251 | configureToolBarMenu->setItemChecked( 50, true ); |
1247 | if (p-> mShowIconDay6) | 1252 | if (p-> mShowIconDay6) |
1248 | configureToolBarMenu->setItemChecked( 75, true ); | 1253 | configureToolBarMenu->setItemChecked( 75, true ); |
1249 | if (p-> mShowIconDay7) | 1254 | if (p-> mShowIconDay7) |
1250 | configureToolBarMenu->setItemChecked( 60, true ); | 1255 | configureToolBarMenu->setItemChecked( 60, true ); |
1251 | if (p-> mShowIconMonth) | 1256 | if (p-> mShowIconMonth) |
1252 | configureToolBarMenu->setItemChecked( 70, true ); | 1257 | configureToolBarMenu->setItemChecked( 70, true ); |
1253 | if (p-> mShowIconTodoview) | 1258 | if (p-> mShowIconTodoview) |
1254 | configureToolBarMenu->setItemChecked( 80, true ); | 1259 | configureToolBarMenu->setItemChecked( 80, true ); |
1255 | if (p-> mShowIconBackFast) | 1260 | if (p-> mShowIconBackFast) |
1256 | configureToolBarMenu->setItemChecked( 200, true ); | 1261 | configureToolBarMenu->setItemChecked( 200, true ); |
1257 | if (p-> mShowIconBack) | 1262 | if (p-> mShowIconBack) |
1258 | configureToolBarMenu->setItemChecked( 210, true ); | 1263 | configureToolBarMenu->setItemChecked( 210, true ); |
1259 | if (p-> mShowIconToday) | 1264 | if (p-> mShowIconToday) |
1260 | configureToolBarMenu->setItemChecked( 130, true ); | 1265 | configureToolBarMenu->setItemChecked( 130, true ); |
1261 | if (p-> mShowIconForward) | 1266 | if (p-> mShowIconForward) |
1262 | configureToolBarMenu->setItemChecked( 220, true ); | 1267 | configureToolBarMenu->setItemChecked( 220, true ); |
1263 | if (p-> mShowIconForwardFast) | 1268 | if (p-> mShowIconForwardFast) |
1264 | configureToolBarMenu->setItemChecked( 230, true ); | 1269 | configureToolBarMenu->setItemChecked( 230, true ); |
1265 | if (p-> mShowIconNextDays) | 1270 | if (p-> mShowIconNextDays) |
1266 | configureToolBarMenu->setItemChecked( 100, true ); | 1271 | configureToolBarMenu->setItemChecked( 100, true ); |
1267 | if (p-> mShowIconNext) | 1272 | if (p-> mShowIconNext) |
1268 | configureToolBarMenu->setItemChecked( 110, true ); | 1273 | configureToolBarMenu->setItemChecked( 110, true ); |
1269 | if (p-> mShowIconJournal) | 1274 | if (p-> mShowIconJournal) |
1270 | configureToolBarMenu->setItemChecked( 90, true ); | 1275 | configureToolBarMenu->setItemChecked( 90, true ); |
1271 | if (p-> mShowIconWhatsThis) | 1276 | if (p-> mShowIconWhatsThis) |
1272 | configureToolBarMenu->setItemChecked( 300, true ); | 1277 | configureToolBarMenu->setItemChecked( 300, true ); |
1273 | if (p-> mShowIconWeekNum) | 1278 | if (p-> mShowIconWeekNum) |
1274 | configureToolBarMenu->setItemChecked( 400, true ); | 1279 | configureToolBarMenu->setItemChecked( 400, true ); |
1275 | if (!p-> mShowIconStretch) { | 1280 | if (!p-> mShowIconStretch) { |
1276 | QLabel* dummy = new QLabel( iconToolBar ); | 1281 | QLabel* dummy = new QLabel( iconToolBar ); |
1277 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 1282 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
1278 | dummy->setMinimumWidth( 0 ); | 1283 | dummy->setMinimumWidth( 0 ); |
1279 | iconToolBar->setStretchableWidget ( dummy ) ; | 1284 | iconToolBar->setStretchableWidget ( dummy ) ; |
1280 | } | 1285 | } |
1281 | else { | 1286 | else { |
1282 | iconToolBar->setHorizontalStretchable (true ); | 1287 | iconToolBar->setHorizontalStretchable (true ); |
1283 | viewToolBar->setHorizontalStretchable (true ); | 1288 | viewToolBar->setHorizontalStretchable (true ); |
1284 | navigatorToolBar->setHorizontalStretchable (true ); | 1289 | navigatorToolBar->setHorizontalStretchable (true ); |
1285 | iconToolBar->setVerticalStretchable (true ); | 1290 | iconToolBar->setVerticalStretchable (true ); |
1286 | viewToolBar->setVerticalStretchable (true ); | 1291 | viewToolBar->setVerticalStretchable (true ); |
1287 | navigatorToolBar->setVerticalStretchable (true ); | 1292 | navigatorToolBar->setVerticalStretchable (true ); |
1288 | configureToolBarMenu->setItemChecked( 5, true ); | 1293 | configureToolBarMenu->setItemChecked( 5, true ); |
1289 | } | 1294 | } |
1290 | if (p-> mShowIconFilter) | 1295 | if (p-> mShowIconFilter) |
1291 | configureToolBarMenu->setItemChecked( 7, true ); | 1296 | configureToolBarMenu->setItemChecked( 7, true ); |
1292 | if (p-> mShowIconOnetoolbar) | 1297 | if (p-> mShowIconOnetoolbar) |
1293 | configureToolBarMenu->setItemChecked( 6, true ); | 1298 | configureToolBarMenu->setItemChecked( 6, true ); |
1294 | 1299 | ||
1295 | 1300 | ||
1296 | if ( filterMenubar ) { | 1301 | if ( filterMenubar ) { |
1297 | filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); | 1302 | filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); |
1298 | connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) ); | 1303 | connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) ); |
1299 | } | 1304 | } |
1300 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 1305 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
1301 | configureAgenda( p->mHourSize ); | 1306 | configureAgenda( p->mHourSize ); |
1302 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 1307 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
1303 | } | 1308 | } |
1304 | 1309 | ||
1305 | void MainWindow::exportToPhone( int mode ) | 1310 | void MainWindow::exportToPhone( int mode ) |
1306 | { | 1311 | { |
1307 | 1312 | ||
1308 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1313 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1309 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1314 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1310 | KOex2phonePrefs ex2phone; | 1315 | KOex2phonePrefs ex2phone; |
1311 | 1316 | ||
1312 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 1317 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |
1313 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); | 1318 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); |
1314 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1319 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1315 | if ( mode == 1 ) | 1320 | if ( mode == 1 ) |
1316 | ex2phone.setCaption(i18n("Export complete calendar")); | 1321 | ex2phone.setCaption(i18n("Export complete calendar")); |
1317 | if ( mode == 2 ) | 1322 | if ( mode == 2 ) |
1318 | ex2phone.setCaption(i18n("Export filtered calendar")); | 1323 | ex2phone.setCaption(i18n("Export filtered calendar")); |
1319 | 1324 | ||
1320 | if ( !ex2phone.exec() ) { | 1325 | if ( !ex2phone.exec() ) { |
1321 | return; | 1326 | return; |
1322 | } | 1327 | } |
1323 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); | 1328 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); |
1324 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); | 1329 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); |
1325 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); | 1330 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); |
1326 | 1331 | ||
1327 | int inFuture = 0; | 1332 | int inFuture = 0; |
1328 | if ( ex2phone.mWriteBackFuture->isChecked() ) | 1333 | if ( ex2phone.mWriteBackFuture->isChecked() ) |
1329 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); | 1334 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); |
1330 | QPtrList<Incidence> delSel; | 1335 | QPtrList<Incidence> delSel; |
1331 | if ( mode == 1 ) | 1336 | if ( mode == 1 ) |
1332 | delSel = mCalendar->rawIncidences(); | 1337 | delSel = mCalendar->rawIncidences(); |
1333 | if ( mode == 2 ) | 1338 | if ( mode == 2 ) |
1334 | delSel = mCalendar->incidences(); | 1339 | delSel = mCalendar->incidences(); |
1335 | CalendarLocal* cal = new CalendarLocal(); | 1340 | CalendarLocal* cal = new CalendarLocal(); |
1336 | cal->setLocalTime(); | 1341 | cal->setLocalTime(); |
1337 | Incidence *incidence = delSel.first(); | 1342 | Incidence *incidence = delSel.first(); |
1338 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); | 1343 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); |
1339 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); | 1344 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); |
1340 | while ( incidence ) { | 1345 | while ( incidence ) { |
1341 | if ( incidence->typeID() != journalID ) { | 1346 | if ( incidence->typeID() != journalID ) { |
1342 | bool add = true; | 1347 | bool add = true; |
1343 | if ( inFuture ) { | 1348 | if ( inFuture ) { |
1344 | QDateTime dt; | 1349 | QDateTime dt; |
1345 | if ( incidence->typeID() == todoID ) { | 1350 | if ( incidence->typeID() == todoID ) { |
1346 | Todo * t = (Todo*)incidence; | 1351 | Todo * t = (Todo*)incidence; |
1347 | if ( t->hasDueDate() ) | 1352 | if ( t->hasDueDate() ) |
1348 | dt = t->dtDue(); | 1353 | dt = t->dtDue(); |
1349 | else | 1354 | else |
1350 | dt = cur.addSecs( 62 ); | 1355 | dt = cur.addSecs( 62 ); |
1351 | } | 1356 | } |
1352 | else { | 1357 | else { |
1353 | bool ok; | 1358 | bool ok; |
1354 | dt = incidence->getNextOccurence( cur, &ok ); | 1359 | dt = incidence->getNextOccurence( cur, &ok ); |
1355 | if ( !ok ) | 1360 | if ( !ok ) |
1356 | dt = cur.addSecs( -62 ); | 1361 | dt = cur.addSecs( -62 ); |
1357 | } | 1362 | } |
1358 | if ( dt < cur || dt > end ) { | 1363 | if ( dt < cur || dt > end ) { |
1359 | add = false; | 1364 | add = false; |
1360 | } | 1365 | } |
1361 | } | 1366 | } |
1362 | if ( add ) { | 1367 | if ( add ) { |
1363 | Incidence *in = incidence->clone(); | 1368 | Incidence *in = incidence->clone(); |
1364 | cal->addIncidence( in ); | 1369 | cal->addIncidence( in ); |
1365 | } | 1370 | } |
1366 | } | 1371 | } |
1367 | incidence = delSel.next(); | 1372 | incidence = delSel.next(); |
1368 | } | 1373 | } |
1369 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 1374 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
1370 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 1375 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
1371 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1376 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1372 | 1377 | ||
1373 | setCaption( i18n("Writing to phone...")); | 1378 | setCaption( i18n("Writing to phone...")); |
1374 | if ( PhoneFormat::writeToPhone( cal ) ) | 1379 | if ( PhoneFormat::writeToPhone( cal ) ) |
1375 | setCaption( i18n("Export to phone successful!")); | 1380 | setCaption( i18n("Export to phone successful!")); |
1376 | else | 1381 | else |
1377 | setCaption( i18n("Error exporting to phone!")); | 1382 | setCaption( i18n("Error exporting to phone!")); |
1378 | delete cal; | 1383 | delete cal; |
1379 | } | 1384 | } |
1380 | 1385 | ||
1381 | 1386 | ||
1382 | void MainWindow::setDefaultPreferences() | 1387 | void MainWindow::setDefaultPreferences() |
1383 | { | 1388 | { |
1384 | KOPrefs *p = KOPrefs::instance(); | 1389 | KOPrefs *p = KOPrefs::instance(); |
1385 | 1390 | ||
1386 | p->mCompactDialogs = true; | 1391 | p->mCompactDialogs = true; |
1387 | p->mConfirm = true; | 1392 | p->mConfirm = true; |
1388 | // p->mEnableQuickTodo = false; | 1393 | // p->mEnableQuickTodo = false; |
1389 | 1394 | ||
1390 | } | 1395 | } |
1391 | 1396 | ||
1392 | QString MainWindow::resourcePath() | 1397 | QString MainWindow::resourcePath() |
1393 | { | 1398 | { |
1394 | return KGlobal::iconLoader()->iconPath(); | 1399 | return KGlobal::iconLoader()->iconPath(); |
1395 | } | 1400 | } |
1396 | 1401 | ||
1397 | void MainWindow::displayText( QString text ,QString cap ) | 1402 | void MainWindow::displayText( QString text ,QString cap ) |
1398 | { | 1403 | { |
1399 | QDialog dia( this, "name", true ); ; | 1404 | QDialog dia( this, "name", true ); ; |
1400 | dia.setCaption( cap ); | 1405 | dia.setCaption( cap ); |
1401 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 1406 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
1402 | lay->setSpacing( 3 ); | 1407 | lay->setSpacing( 3 ); |
1403 | lay->setMargin( 3 ); | 1408 | lay->setMargin( 3 ); |
1404 | QTextBrowser tb ( &dia ); | 1409 | QTextBrowser tb ( &dia ); |
1405 | lay->addWidget( &tb ); | 1410 | lay->addWidget( &tb ); |
1406 | tb.setText( text ); | 1411 | tb.setText( text ); |
1407 | #ifdef DESKTOP_VERSION | 1412 | #ifdef DESKTOP_VERSION |
1408 | dia.resize( 640, 480); | 1413 | dia.resize( 640, 480); |
1409 | #else | 1414 | #else |
1410 | dia.showMaximized(); | 1415 | dia.showMaximized(); |
1411 | #endif | 1416 | #endif |
1412 | dia.exec(); | 1417 | dia.exec(); |
1413 | } | 1418 | } |
1414 | 1419 | ||
1415 | void MainWindow::features() | 1420 | void MainWindow::features() |
1416 | { | 1421 | { |
1417 | 1422 | ||
1418 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); | 1423 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); |
1419 | } | 1424 | } |
1420 | 1425 | ||
1421 | void MainWindow::usertrans() | 1426 | void MainWindow::usertrans() |
1422 | { | 1427 | { |
1423 | 1428 | ||
1424 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); | 1429 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); |
1425 | } | 1430 | } |
1426 | 1431 | ||
1427 | void MainWindow::storagehowto() | 1432 | void MainWindow::storagehowto() |
1428 | { | 1433 | { |
1429 | KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); | 1434 | KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); |
1430 | } | 1435 | } |
1431 | void MainWindow::timetrackinghowto() | 1436 | void MainWindow::timetrackinghowto() |
1432 | { | 1437 | { |
1433 | KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" ); | 1438 | KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" ); |
1434 | } | 1439 | } |
1435 | void MainWindow::kdesynchowto() | 1440 | void MainWindow::kdesynchowto() |
1436 | { | 1441 | { |
1437 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 1442 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
1438 | } | 1443 | } |
1439 | void MainWindow::multisynchowto() | 1444 | void MainWindow::multisynchowto() |
1440 | { | 1445 | { |
1441 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 1446 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
1442 | } | 1447 | } |
1443 | void MainWindow::synchowto() | 1448 | void MainWindow::synchowto() |
1444 | { | 1449 | { |
1445 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 1450 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
1446 | } | 1451 | } |
1447 | void MainWindow::faq() | 1452 | void MainWindow::faq() |
1448 | { | 1453 | { |
1449 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); | 1454 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); |
1450 | 1455 | ||
1451 | } | 1456 | } |
1452 | void MainWindow::whatsNew() | 1457 | void MainWindow::whatsNew() |
1453 | { | 1458 | { |
1454 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 1459 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
1455 | 1460 | ||
1456 | } | 1461 | } |
1457 | void MainWindow::licence() | 1462 | void MainWindow::licence() |
1458 | { | 1463 | { |
1459 | KApplication::showLicence(); | 1464 | KApplication::showLicence(); |
1460 | 1465 | ||
1461 | } | 1466 | } |
1462 | void MainWindow::about() | 1467 | void MainWindow::about() |
1463 | { | 1468 | { |
1464 | QString version; | 1469 | QString version; |
1465 | #include <../version> | 1470 | #include <../version> |
1466 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), | 1471 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), |
1467 | i18n("KOrganizer/Platform-independent\n") + | 1472 | i18n("KOrganizer/Platform-independent\n") + |
1468 | "(KO/Pi) " + version + " - " + | 1473 | "(KO/Pi) " + version + " - " + |
1469 | 1474 | ||
1470 | #ifdef DESKTOP_VERSION | 1475 | #ifdef DESKTOP_VERSION |
1471 | i18n("Desktop Edition\n") + | 1476 | i18n("Desktop Edition\n") + |
1472 | #else | 1477 | #else |
1473 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + | 1478 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + |
1474 | #endif | 1479 | #endif |
1475 | i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); | 1480 | i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); |
1476 | } | 1481 | } |
1477 | void MainWindow::keyBindings() | 1482 | void MainWindow::keyBindings() |
1478 | { | 1483 | { |
1479 | QString cap = i18n("KO/Pi Keys + Colors"); | 1484 | QString cap = i18n("KO/Pi Keys + Colors"); |
1480 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1485 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1481 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1486 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1482 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + | 1487 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + |
1483 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + | 1488 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + |
1484 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1489 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1485 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1490 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1486 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1491 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ |
1487 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1492 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1488 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1493 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1489 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ | 1494 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ |
1490 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1495 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1491 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1496 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1492 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1497 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1493 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ | 1498 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ |
1494 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1499 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1495 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1500 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1496 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ | 1501 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ |
1497 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1502 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1498 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1503 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1499 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1504 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1500 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1505 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1501 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1506 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1502 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1507 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1503 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1508 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1504 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1509 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1505 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1510 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1506 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1511 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1507 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | 1512 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ |
1508 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | 1513 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ |
1509 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | 1514 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ |
1510 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1515 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1511 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1516 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1512 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1517 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1513 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1518 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1514 | i18n("<p><h3>In list view:</h3></p>\n") + | 1519 | i18n("<p><h3>In list view:</h3></p>\n") + |
1515 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1520 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1516 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1521 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1517 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1522 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1518 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1523 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1519 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1524 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1520 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1525 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1521 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1526 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1522 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1527 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1523 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1528 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1524 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1529 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1525 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1530 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
1526 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1531 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1527 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1532 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1528 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1533 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1529 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1534 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1530 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1535 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
1531 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ | 1536 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ |
1532 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + | 1537 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + |
1533 | i18n("<p><b>White</b>: Item readonly</p>\n"); | 1538 | i18n("<p><b>White</b>: Item readonly</p>\n"); |
1534 | displayText( text, cap); | 1539 | displayText( text, cap); |
1535 | } | 1540 | } |
1536 | void MainWindow::aboutAutoSaving() | 1541 | void MainWindow::aboutAutoSaving() |
1537 | { | 1542 | { |
1538 | QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); | 1543 | QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); |
1539 | 1544 | ||
1540 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); | 1545 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); |
1541 | 1546 | ||
1542 | } | 1547 | } |
1543 | void MainWindow::aboutKnownBugs() | 1548 | void MainWindow::aboutKnownBugs() |
1544 | { | 1549 | { |
1545 | QMessageBox* msg; | 1550 | QMessageBox* msg; |
1546 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), | 1551 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), |
1547 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ | 1552 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ |
1548 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1553 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1549 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + | 1554 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + |
1550 | i18n("\nor report them in the bugtracker on\n") + | 1555 | i18n("\nor report them in the bugtracker on\n") + |
1551 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), | 1556 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), |
1552 | QMessageBox::NoIcon, | 1557 | QMessageBox::NoIcon, |
1553 | QMessageBox::Ok, | 1558 | QMessageBox::Ok, |
1554 | QMessageBox::NoButton, | 1559 | QMessageBox::NoButton, |
1555 | QMessageBox::NoButton); | 1560 | QMessageBox::NoButton); |
1556 | msg->exec(); | 1561 | msg->exec(); |
1557 | delete msg; | 1562 | delete msg; |
1558 | 1563 | ||
1559 | } | 1564 | } |
1560 | 1565 | ||
1561 | QString MainWindow::defaultFileName() | 1566 | QString MainWindow::defaultFileName() |
1562 | { | 1567 | { |
1563 | return locateLocal( "data", "korganizer/mycalendar.ics" ); | 1568 | return locateLocal( "data", "korganizer/mycalendar.ics" ); |
1564 | } | 1569 | } |
1565 | QString MainWindow::syncFileName() | 1570 | QString MainWindow::syncFileName() |
1566 | { | 1571 | { |
1567 | #ifdef DESKTOP_VERSION | 1572 | #ifdef DESKTOP_VERSION |
1568 | return locateLocal( "tmp", "synccalendar.ics" ); | 1573 | return locateLocal( "tmp", "synccalendar.ics" ); |
1569 | #else | 1574 | #else |
1570 | return QString( "/tmp/synccalendar.ics" ); | 1575 | return QString( "/tmp/synccalendar.ics" ); |
1571 | #endif | 1576 | #endif |
1572 | } | 1577 | } |
1573 | #include "koglobals.h" | 1578 | #include "koglobals.h" |
1574 | #include <kcalendarsystem.h> | 1579 | #include <kcalendarsystem.h> |
1575 | void MainWindow::updateWeek(QDate seda) | 1580 | void MainWindow::updateWeek(QDate seda) |
1576 | { | 1581 | { |
1577 | int weekNum = KGlobal::locale()->weekNum ( seda ); | 1582 | int weekNum = KGlobal::locale()->weekNum ( seda ); |
1578 | mWeekPixmap.fill( mWeekBgColor ); | 1583 | mWeekPixmap.fill( mWeekBgColor ); |
1579 | QPainter p ( &mWeekPixmap ); | 1584 | QPainter p ( &mWeekPixmap ); |
1580 | p.setFont( mWeekFont ); | 1585 | p.setFont( mWeekFont ); |
1581 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); | 1586 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); |
1582 | p.end(); | 1587 | p.end(); |
1583 | QIconSet icon3 ( mWeekPixmap ); | 1588 | QIconSet icon3 ( mWeekPixmap ); |
1584 | mWeekAction->setIconSet ( icon3 ); | 1589 | mWeekAction->setIconSet ( icon3 ); |
1585 | 1590 | ||
1586 | } | 1591 | } |
1587 | void MainWindow::updateWeekNum(const DateList &selectedDates) | 1592 | void MainWindow::updateWeekNum(const DateList &selectedDates) |
1588 | { | 1593 | { |
1589 | updateWeek( selectedDates.first() ); | 1594 | updateWeek( selectedDates.first() ); |
1590 | } | 1595 | } |
1591 | void MainWindow::processIncidenceSelection( Incidence *incidence ) | 1596 | void MainWindow::processIncidenceSelection( Incidence *incidence ) |
1592 | { | 1597 | { |
1593 | 1598 | ||
1594 | if ( !incidence ) { | 1599 | if ( !incidence ) { |
1595 | enableIncidenceActions( false ); | 1600 | enableIncidenceActions( false ); |
1596 | 1601 | ||
1597 | mNewSubTodoAction->setEnabled( false ); | 1602 | mNewSubTodoAction->setEnabled( false ); |
1598 | setCaptionToDates(); | 1603 | setCaptionToDates(); |
1599 | return; | 1604 | return; |
1600 | 1605 | ||
1601 | } | 1606 | } |
1602 | 1607 | ||
1603 | //KGlobal::locale()->formatDateTime(nextA, true); | 1608 | //KGlobal::locale()->formatDateTime(nextA, true); |
1604 | QString startString = ""; | 1609 | QString startString = ""; |
1605 | if ( incidence->typeID() != todoID ) { | 1610 | if ( incidence->typeID() != todoID ) { |
1606 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { | 1611 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { |
1607 | if ( incidence->doesFloat() ) { | 1612 | if ( incidence->doesFloat() ) { |
1608 | startString += ": "+incidence->dtStartDateStr( true ); | 1613 | startString += ": "+incidence->dtStartDateStr( true ); |
1609 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); | 1614 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); |
1610 | 1615 | ||
1611 | } else { | 1616 | } else { |
1612 | startString = ": "+incidence->dtStartStr(true); | 1617 | startString = ": "+incidence->dtStartStr(true); |
1613 | startString += " --- "+((Event*)incidence)->dtEndStr(true); | 1618 | startString += " --- "+((Event*)incidence)->dtEndStr(true); |
1614 | 1619 | ||
1615 | } | 1620 | } |
1616 | 1621 | ||
1617 | } else { | 1622 | } else { |
1618 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) | 1623 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) |
1619 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ | 1624 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ |
1620 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); | 1625 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); |
1621 | 1626 | ||
1622 | if ( incidence->isBirthday() || incidence->isAnniversary() ) { | 1627 | if ( incidence->isBirthday() || incidence->isAnniversary() ) { |
1623 | bool ok; | 1628 | bool ok; |
1624 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); | 1629 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); |
1625 | if ( ok ) { | 1630 | if ( ok ) { |
1626 | int years = noc.date().year() - incidence->dtStart().date().year(); | 1631 | int years = noc.date().year() - incidence->dtStart().date().year(); |
1627 | startString += i18n(" (%1 y.)"). arg( years ); | 1632 | startString += i18n(" (%1 y.)"). arg( years ); |
1628 | } | 1633 | } |
1629 | } | 1634 | } |
1630 | else | 1635 | else |
1631 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); | 1636 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); |
1632 | } | 1637 | } |
1633 | 1638 | ||
1634 | } | 1639 | } |
1635 | else | 1640 | else |
1636 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); | 1641 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); |
1637 | if ( !incidence->location().isEmpty() ) | 1642 | if ( !incidence->location().isEmpty() ) |
1638 | startString += " (" +incidence->location()+")"; | 1643 | startString += " (" +incidence->location()+")"; |
1639 | setCaption( incidence->summary()+startString); | 1644 | setCaption( incidence->summary()+startString); |
1640 | 1645 | ||
1641 | enableIncidenceActions( true ); | 1646 | enableIncidenceActions( true ); |
1642 | 1647 | ||
1643 | if ( incidence->typeID() == eventID ) { | 1648 | if ( incidence->typeID() == eventID ) { |
1644 | mShowAction->setText( i18n("Show Event...") ); | 1649 | mShowAction->setText( i18n("Show Event...") ); |
1645 | mEditAction->setText( i18n("Edit Event...") ); | 1650 | mEditAction->setText( i18n("Edit Event...") ); |
1646 | mDeleteAction->setText( i18n("Delete Event...") ); | 1651 | mDeleteAction->setText( i18n("Delete Event...") ); |
1647 | 1652 | ||
1648 | mNewSubTodoAction->setEnabled( false ); | 1653 | mNewSubTodoAction->setEnabled( false ); |
1649 | } else if ( incidence->typeID() == todoID ) { | 1654 | } else if ( incidence->typeID() == todoID ) { |
1650 | mShowAction->setText( i18n("Show Todo...") ); | 1655 | mShowAction->setText( i18n("Show Todo...") ); |
1651 | mEditAction->setText( i18n("Edit Todo...") ); | 1656 | mEditAction->setText( i18n("Edit Todo...") ); |
1652 | mDeleteAction->setText( i18n("Delete Todo...") ); | 1657 | mDeleteAction->setText( i18n("Delete Todo...") ); |
1653 | 1658 | ||
1654 | mNewSubTodoAction->setEnabled( true ); | 1659 | mNewSubTodoAction->setEnabled( true ); |
1655 | } else { | 1660 | } else { |
1656 | mShowAction->setText( i18n("Show...") ); | 1661 | mShowAction->setText( i18n("Show...") ); |
1657 | mShowAction->setText( i18n("Edit...") ); | 1662 | mShowAction->setText( i18n("Edit...") ); |
1658 | mShowAction->setText( i18n("Delete...") ); | 1663 | mShowAction->setText( i18n("Delete...") ); |
1659 | 1664 | ||
1660 | mNewSubTodoAction->setEnabled( false ); | 1665 | mNewSubTodoAction->setEnabled( false ); |
1661 | } | 1666 | } |
1662 | } | 1667 | } |
1663 | 1668 | ||
1664 | void MainWindow::enableIncidenceActions( bool enabled ) | 1669 | void MainWindow::enableIncidenceActions( bool enabled ) |
1665 | { | 1670 | { |
1666 | mShowAction->setEnabled( enabled ); | 1671 | mShowAction->setEnabled( enabled ); |
1667 | mEditAction->setEnabled( enabled ); | 1672 | mEditAction->setEnabled( enabled ); |
1668 | mDeleteAction->setEnabled( enabled ); | 1673 | mDeleteAction->setEnabled( enabled ); |
1669 | 1674 | ||
1670 | mCloneAction->setEnabled( enabled ); | 1675 | mCloneAction->setEnabled( enabled ); |
1671 | mMoveAction->setEnabled( enabled ); | 1676 | mMoveAction->setEnabled( enabled ); |
1672 | mBeamAction->setEnabled( enabled ); | 1677 | mBeamAction->setEnabled( enabled ); |
1673 | mCancelAction->setEnabled( enabled ); | 1678 | mCancelAction->setEnabled( enabled ); |
1674 | } | 1679 | } |
1675 | 1680 | ||
1676 | void MainWindow::importOL() | 1681 | void MainWindow::importOL() |
1677 | { | 1682 | { |
1678 | #ifdef _OL_IMPORT_ | 1683 | #ifdef _OL_IMPORT_ |
1679 | mView->clearAllViews(); | 1684 | mView->clearAllViews(); |
1680 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); | 1685 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); |
1681 | id->exec(); | 1686 | id->exec(); |
1682 | delete id; | 1687 | delete id; |
1683 | mView->calendar()->checkAlarmForIncidence( 0, true ); | 1688 | mView->calendar()->checkAlarmForIncidence( 0, true ); |
1684 | mView->updateView(); | 1689 | mView->updateView(); |
1685 | #endif | 1690 | #endif |
1686 | } | 1691 | } |
1687 | void MainWindow::importBday() | 1692 | void MainWindow::importBday() |
1688 | { | 1693 | { |
1689 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1694 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1690 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), | 1695 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), |
1691 | i18n("Import!"), i18n("Cancel"), 0, | 1696 | i18n("Import!"), i18n("Cancel"), 0, |
1692 | 0, 1 ); | 1697 | 0, 1 ); |
1693 | if ( result == 0 ) { | 1698 | if ( result == 0 ) { |
1694 | mView->importBday(); | 1699 | mView->importBday(); |
1695 | 1700 | ||
1696 | } | 1701 | } |
1697 | 1702 | ||
1698 | 1703 | ||
1699 | } | 1704 | } |
1700 | void MainWindow::importQtopia() | 1705 | void MainWindow::importQtopia() |
1701 | { | 1706 | { |
1702 | //#ifndef DESKTOP_VERSION | 1707 | //#ifndef DESKTOP_VERSION |
1703 | QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"); | 1708 | QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"); |
1704 | #ifdef DESKTOP_VERSION | 1709 | #ifdef DESKTOP_VERSION |
1705 | mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml"); | 1710 | mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml"); |
1706 | #endif | 1711 | #endif |
1707 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, | 1712 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, |
1708 | i18n("Import!"), i18n("Cancel"), 0, | 1713 | i18n("Import!"), i18n("Cancel"), 0, |
1709 | 0, 1 ); | 1714 | 0, 1 ); |
1710 | if ( result == 0 ) { | 1715 | if ( result == 0 ) { |
1711 | #ifndef DESKTOP_VERSION | 1716 | #ifndef DESKTOP_VERSION |
1712 | QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); | 1717 | QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); |
1713 | QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); | 1718 | QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); |
1714 | QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; | 1719 | QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; |
1715 | #else | 1720 | #else |
1716 | QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; | 1721 | QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; |
1717 | QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; | 1722 | QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; |
1718 | QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; | 1723 | QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; |
1719 | #endif | 1724 | #endif |
1720 | mView->importQtopia( categories, datebook, todolist ); | 1725 | mView->importQtopia( categories, datebook, todolist ); |
1721 | } | 1726 | } |
1722 | mView->calendar()->reInitAlarmSettings(); | 1727 | mView->calendar()->reInitAlarmSettings(); |
1723 | #if 0 | 1728 | #if 0 |
1724 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1729 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1725 | i18n("Not supported \non desktop!\n"), | 1730 | i18n("Not supported \non desktop!\n"), |
1726 | i18n("Ok"), i18n("Cancel"), 0, | 1731 | i18n("Ok"), i18n("Cancel"), 0, |
1727 | 0, 1 ); | 1732 | 0, 1 ); |
1728 | 1733 | ||
1729 | #endif | 1734 | #endif |
1730 | } | 1735 | } |
1731 | 1736 | ||
1732 | void MainWindow::saveOnClose() | 1737 | void MainWindow::saveOnClose() |
1733 | { | 1738 | { |
1734 | KOPrefs *p = KOPrefs::instance(); | 1739 | KOPrefs *p = KOPrefs::instance(); |
1735 | p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); | 1740 | p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); |
1736 | p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); | 1741 | p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); |
1737 | p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); | 1742 | p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); |
1738 | if ( filterToolBar ) { | 1743 | if ( filterToolBar ) { |
1739 | p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); | 1744 | p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); |
1740 | } | 1745 | } |
1741 | #ifdef DESKTOP_VERSION | 1746 | #ifdef DESKTOP_VERSION |
1742 | 1747 | ||
1743 | QPoint myP; | 1748 | QPoint myP; |
1744 | myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1749 | myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1745 | if ( p->mToolBarHor ) | 1750 | if ( p->mToolBarHor ) |
1746 | p->mToolBarUp = myP.y() > height()/2; | 1751 | p->mToolBarUp = myP.y() > height()/2; |
1747 | else | 1752 | else |
1748 | p->mToolBarUp = myP.x() > width()/2; | 1753 | p->mToolBarUp = myP.x() > width()/2; |
1749 | myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1754 | myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1750 | if ( p->mToolBarHorV ) | 1755 | if ( p->mToolBarHorV ) |
1751 | p->mToolBarUpV = myP.y() > height()/2; | 1756 | p->mToolBarUpV = myP.y() > height()/2; |
1752 | else | 1757 | else |
1753 | p->mToolBarUpV = myP.x() > width()/2 ; | 1758 | p->mToolBarUpV = myP.x() > width()/2 ; |
1754 | myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1759 | myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1755 | if ( p->mToolBarHorN ) | 1760 | if ( p->mToolBarHorN ) |
1756 | p->mToolBarUpN = myP.y() > height()/2; | 1761 | p->mToolBarUpN = myP.y() > height()/2; |
1757 | else | 1762 | else |
1758 | p->mToolBarUpN = myP.x() > width()/2 ; | 1763 | p->mToolBarUpN = myP.x() > width()/2 ; |
1759 | if ( filterToolBar ) { | 1764 | if ( filterToolBar ) { |
1760 | myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1765 | myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1761 | if ( p->mToolBarHorF ) | 1766 | if ( p->mToolBarHorF ) |
1762 | p->mToolBarUpF = myP.y() > height()/2; | 1767 | p->mToolBarUpF = myP.y() > height()/2; |
1763 | else | 1768 | else |
1764 | p->mToolBarUpF = myP.x() > width()/2 ; | 1769 | p->mToolBarUpF = myP.x() > width()/2 ; |
1765 | } | 1770 | } |
1766 | #else | 1771 | #else |
1767 | if ( p->mToolBarHor ) | 1772 | if ( p->mToolBarHor ) |
1768 | p->mToolBarUp = iconToolBar->y() > height()/2; | 1773 | p->mToolBarUp = iconToolBar->y() > height()/2; |
1769 | else | 1774 | else |
1770 | p->mToolBarUp = iconToolBar->x() > width()/2; | 1775 | p->mToolBarUp = iconToolBar->x() > width()/2; |
1771 | if ( p->mToolBarHorV ) | 1776 | if ( p->mToolBarHorV ) |
1772 | p->mToolBarUpV = viewToolBar->y() > height()/2; | 1777 | p->mToolBarUpV = viewToolBar->y() > height()/2; |
1773 | else | 1778 | else |
1774 | p->mToolBarUpV = viewToolBar->x() > width()/2 ; | 1779 | p->mToolBarUpV = viewToolBar->x() > width()/2 ; |
1775 | 1780 | ||
1776 | if ( p->mToolBarHorN ) | 1781 | if ( p->mToolBarHorN ) |
1777 | p->mToolBarUpN = navigatorToolBar->y() > height()/2; | 1782 | p->mToolBarUpN = navigatorToolBar->y() > height()/2; |
1778 | else | 1783 | else |
1779 | p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; | 1784 | p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; |
1780 | if ( filterToolBar ) { | 1785 | if ( filterToolBar ) { |
1781 | if ( p->mToolBarHorF ) | 1786 | if ( p->mToolBarHorF ) |
1782 | p->mToolBarUpF = filterToolBar->y() > height()/2; | 1787 | p->mToolBarUpF = filterToolBar->y() > height()/2; |
1783 | else | 1788 | else |
1784 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; | 1789 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; |
1785 | } | 1790 | } |
1786 | #endif | 1791 | #endif |
1787 | 1792 | ||
1788 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) | 1793 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) |
1789 | save(); | 1794 | save(); |
1790 | mView->writeSettings(); | 1795 | mView->writeSettings(); |
1791 | } | 1796 | } |
1792 | void MainWindow::slotModifiedChanged( bool changed ) | 1797 | void MainWindow::slotModifiedChanged( bool changed ) |
1793 | { | 1798 | { |
1794 | if ( mBlockAtStartup ) | 1799 | if ( mBlockAtStartup ) |
1795 | return; | 1800 | return; |
1796 | 1801 | ||
1797 | int msec; | 1802 | int msec; |
1798 | // we store the changes after 1 minute, | 1803 | // we store the changes after 1 minute, |
1799 | // and for safety reasons after 10 minutes again | 1804 | // and for safety reasons after 10 minutes again |
1800 | if ( !mSyncManager->blockSave() ) | 1805 | if ( !mSyncManager->blockSave() ) |
1801 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; | 1806 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; |
1802 | else | 1807 | else |
1803 | msec = 1000 * 600; | 1808 | msec = 1000 * 600; |
1804 | mSaveTimer.start( msec, true ); // 1 minute | 1809 | mSaveTimer.start( msec, true ); // 1 minute |
1805 | qDebug("KO: Saving File in %d secs!", msec/1000); | 1810 | qDebug("KO: Saving File in %d secs!", msec/1000); |
1806 | mCalendarModifiedFlag = true; | 1811 | mCalendarModifiedFlag = true; |
1807 | } | 1812 | } |
1808 | void MainWindow::saveStopTimer() | 1813 | void MainWindow::saveStopTimer() |
1809 | { | 1814 | { |
1810 | mSaveTimer.stop(); | 1815 | mSaveTimer.stop(); |
1811 | } | 1816 | } |
1812 | void MainWindow::save() | 1817 | void MainWindow::save() |
1813 | { | 1818 | { |
1814 | if ( !mCalendarModifiedFlag ) { | 1819 | if ( !mCalendarModifiedFlag ) { |
1815 | qDebug("KO: Calendar not modified. Nothing saved."); | 1820 | qDebug("KO: Calendar not modified. Nothing saved."); |
1816 | return; | 1821 | return; |
1817 | } | 1822 | } |
1818 | if ( mSyncManager->blockSave() ) | 1823 | if ( mSyncManager->blockSave() ) |
1819 | return; | 1824 | return; |
1820 | mSyncManager->setBlockSave(true); | 1825 | mSyncManager->setBlockSave(true); |
1821 | if ( mView->checkFileVersion( defaultFileName()) ) { | 1826 | if ( mView->checkFileVersion( defaultFileName()) ) { |
1822 | if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ | 1827 | if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ |
1823 | QDate reference ( 2000,1,1); | 1828 | QDate reference ( 2000,1,1); |
1824 | int daysTo = reference.daysTo ( QDate::currentDate() ); | 1829 | int daysTo = reference.daysTo ( QDate::currentDate() ); |
1825 | if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { | 1830 | if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { |
1826 | setCaption(i18n("Creating backup ... please wait ..." )); | 1831 | setCaption(i18n("Creating backup ... please wait ..." )); |
1827 | qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); | 1832 | qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); |
1828 | // we need the file path, the backup dir and the number of bups as param | 1833 | // we need the file path, the backup dir and the number of bups as param |
1829 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; | 1834 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; |
1830 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) | 1835 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) |
1831 | bupDir = KGlobalSettings::backupDataDir(); | 1836 | bupDir = KGlobalSettings::backupDataDir(); |
1832 | int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); | 1837 | int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); |
1833 | if ( retval == 0 ) { | 1838 | if ( retval == 0 ) { |
1834 | qDebug("KO: Backup cancelled. Will try again tomorrow "); | 1839 | qDebug("KO: Backup cancelled. Will try again tomorrow "); |
1835 | // retval == 0 : backup skipped for today, try again tomorrow | 1840 | // retval == 0 : backup skipped for today, try again tomorrow |
1836 | KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; | 1841 | KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; |
1837 | } else if ( retval == 1 ){ | 1842 | } else if ( retval == 1 ){ |
1838 | qDebug("KO: Backup created."); | 1843 | qDebug("KO: Backup created."); |
1839 | // backup ok | 1844 | // backup ok |
1840 | KOPrefs::instance()->mLastBackupDate = daysTo; | 1845 | KOPrefs::instance()->mLastBackupDate = daysTo; |
1841 | 1846 | ||
1842 | } else if ( retval == 2 ){ | 1847 | } else if ( retval == 2 ){ |
1843 | qDebug("KO: Backup globally cancelled."); | 1848 | qDebug("KO: Backup globally cancelled."); |
1844 | // backup globally cancelled | 1849 | // backup globally cancelled |
1845 | KPimGlobalPrefs::instance()->mBackupEnabled = false; | 1850 | KPimGlobalPrefs::instance()->mBackupEnabled = false; |
1846 | } | 1851 | } |
1847 | // retval == 3: do nothing, try again later | 1852 | // retval == 3: do nothing, try again later |
1848 | } | 1853 | } |
1849 | ; // KPimGlobalPrefs::instance()->mLastBackupDate | 1854 | ; // KPimGlobalPrefs::instance()->mLastBackupDate |
1850 | } | 1855 | } |
1851 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 1856 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
1852 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); | 1857 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); |
1853 | qDebug("KO: Start saving data to file!"); | 1858 | qDebug("KO: Start saving data to file!"); |
1854 | mView->saveCalendar( defaultFileName() ); | 1859 | mView->saveCalendar( defaultFileName() ); |
1855 | mCalendarModifiedFlag = false; | 1860 | mCalendarModifiedFlag = false; |
1856 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 1861 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
1857 | qDebug("KO: Needed %d ms for saving.",msNeeded ); | 1862 | qDebug("KO: Needed %d ms for saving.",msNeeded ); |
1858 | QString savemes; | 1863 | QString savemes; |
1859 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); | 1864 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); |
1860 | setCaption(savemes); | 1865 | setCaption(savemes); |
1861 | } else | 1866 | } else |
1862 | setCaption(i18n("Saving cancelled!")); | 1867 | setCaption(i18n("Saving cancelled!")); |
1863 | mSyncManager->setBlockSave( false ); | 1868 | mSyncManager->setBlockSave( false ); |
1864 | } | 1869 | } |
1865 | 1870 | ||
1866 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) | 1871 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) |
1867 | { | 1872 | { |
1868 | if ( !e->isAutoRepeat() ) { | 1873 | if ( !e->isAutoRepeat() ) { |
1869 | mFlagKeyPressed = false; | 1874 | mFlagKeyPressed = false; |
1870 | } | 1875 | } |
1871 | } | 1876 | } |
1872 | void MainWindow::keyPressEvent ( QKeyEvent * e ) | 1877 | void MainWindow::keyPressEvent ( QKeyEvent * e ) |
1873 | { | 1878 | { |
1874 | qApp->processEvents(); | 1879 | qApp->processEvents(); |
1875 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { | 1880 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { |
1876 | e->ignore(); | 1881 | e->ignore(); |
1877 | // qDebug(" ignore %d",e->isAutoRepeat() ); | 1882 | // qDebug(" ignore %d",e->isAutoRepeat() ); |
1878 | return; | 1883 | return; |
1879 | } | 1884 | } |
1880 | if (! e->isAutoRepeat() ) | 1885 | if (! e->isAutoRepeat() ) |
1881 | mFlagKeyPressed = true; | 1886 | mFlagKeyPressed = true; |
1882 | KOPrefs *p = KOPrefs::instance(); | 1887 | KOPrefs *p = KOPrefs::instance(); |
1883 | bool showSelectedDates = false; | 1888 | bool showSelectedDates = false; |
1884 | int size; | 1889 | int size; |
1885 | int pro = 0; | 1890 | int pro = 0; |
1886 | //qDebug("MainWindow::keyPressEvent "); | 1891 | //qDebug("MainWindow::keyPressEvent "); |
1887 | switch ( e->key() ) { | 1892 | switch ( e->key() ) { |
1888 | case Qt::Key_Right: | 1893 | case Qt::Key_Right: |
1889 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 1894 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1890 | mView->goNextMonth(); | 1895 | mView->goNextMonth(); |
1891 | else | 1896 | else |
1892 | mView->goNext(); | 1897 | mView->goNext(); |
1893 | showSelectedDates = true; | 1898 | showSelectedDates = true; |
1894 | break; | 1899 | break; |
1895 | case Qt::Key_Left: | 1900 | case Qt::Key_Left: |
1896 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1901 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1897 | mView->goPreviousMonth(); | 1902 | mView->goPreviousMonth(); |
1898 | else | 1903 | else |
1899 | mView->goPrevious(); | 1904 | mView->goPrevious(); |
1900 | showSelectedDates = true; | 1905 | showSelectedDates = true; |
1901 | break; | 1906 | break; |
1902 | case Qt::Key_Down: | 1907 | case Qt::Key_Down: |
1903 | mView->viewManager()->agendaView()->scrollOneHourDown(); | 1908 | mView->viewManager()->agendaView()->scrollOneHourDown(); |
1904 | break; | 1909 | break; |
1905 | case Qt::Key_Up: | 1910 | case Qt::Key_Up: |
1906 | mView->viewManager()->agendaView()->scrollOneHourUp(); | 1911 | mView->viewManager()->agendaView()->scrollOneHourUp(); |
1907 | break; | 1912 | break; |
1908 | case Qt::Key_K: | 1913 | case Qt::Key_K: |
1909 | mView->viewManager()->showMonthViewWeek(); | 1914 | mView->viewManager()->showMonthViewWeek(); |
1910 | break; | 1915 | break; |
1911 | case Qt::Key_I: | 1916 | case Qt::Key_I: |
1912 | mView->showIncidence(); | 1917 | mView->showIncidence(); |
1913 | break; | 1918 | break; |
1914 | case Qt::Key_Delete: | 1919 | case Qt::Key_Delete: |
1915 | case Qt::Key_Backspace: | 1920 | case Qt::Key_Backspace: |
1916 | mView->deleteIncidence(); | 1921 | mView->deleteIncidence(); |
1917 | break; | 1922 | break; |
1918 | case Qt::Key_D: | 1923 | case Qt::Key_D: |
1919 | mView->viewManager()->showDayView(); | 1924 | mView->viewManager()->showDayView(); |
1920 | showSelectedDates = true; | 1925 | showSelectedDates = true; |
1921 | break; | 1926 | break; |
1922 | case Qt::Key_O: | 1927 | case Qt::Key_O: |
1923 | mView->toggleFilerEnabled( ); | 1928 | mView->toggleFilerEnabled( ); |
1924 | break; | 1929 | break; |
1925 | case Qt::Key_0: | 1930 | case Qt::Key_0: |
1926 | case Qt::Key_1: | 1931 | case Qt::Key_1: |
1927 | case Qt::Key_2: | 1932 | case Qt::Key_2: |
1928 | case Qt::Key_3: | 1933 | case Qt::Key_3: |
1929 | case Qt::Key_4: | 1934 | case Qt::Key_4: |
1930 | case Qt::Key_5: | 1935 | case Qt::Key_5: |
1931 | case Qt::Key_6: | 1936 | case Qt::Key_6: |
1932 | case Qt::Key_7: | 1937 | case Qt::Key_7: |
1933 | case Qt::Key_8: | 1938 | case Qt::Key_8: |
1934 | case Qt::Key_9: | 1939 | case Qt::Key_9: |
1935 | pro = e->key()-48; | 1940 | pro = e->key()-48; |
1936 | if ( pro == 0 ) | 1941 | if ( pro == 0 ) |
1937 | pro = 10; | 1942 | pro = 10; |
1938 | if ( e->state() == Qt::ControlButton) | 1943 | if ( e->state() == Qt::ControlButton) |
1939 | pro += 10; | 1944 | pro += 10; |
1940 | break; | 1945 | break; |
1941 | case Qt::Key_M: | 1946 | case Qt::Key_M: |
1942 | mView->viewManager()->showMonthView(); | 1947 | mView->viewManager()->showMonthView(); |
1943 | showSelectedDates = true; | 1948 | showSelectedDates = true; |
1944 | break; | 1949 | break; |
1945 | case Qt::Key_Insert: | 1950 | case Qt::Key_Insert: |
1946 | mView->newEvent(); | 1951 | mView->newEvent(); |
1947 | break; | 1952 | break; |
1948 | case Qt::Key_S : | 1953 | case Qt::Key_S : |
1949 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 1954 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1950 | mView->newSubTodo(); | 1955 | mView->newSubTodo(); |
1951 | else | 1956 | else |
1952 | mView->dialogManager()->showSearchDialog(); | 1957 | mView->dialogManager()->showSearchDialog(); |
1953 | break; | 1958 | break; |
1954 | case Qt::Key_Y : | 1959 | case Qt::Key_Y : |
1955 | case Qt::Key_Z : | 1960 | case Qt::Key_Z : |
1956 | mView->viewManager()->showWorkWeekView(); | 1961 | mView->viewManager()->showWorkWeekView(); |
1957 | showSelectedDates = true; | 1962 | showSelectedDates = true; |
1958 | break; | 1963 | break; |
1959 | case Qt::Key_U : | 1964 | case Qt::Key_U : |
1960 | mView->viewManager()->showWeekView(); | 1965 | mView->viewManager()->showWeekView(); |
1961 | showSelectedDates = true; | 1966 | showSelectedDates = true; |
1962 | break; | 1967 | break; |
1963 | case Qt::Key_H : | 1968 | case Qt::Key_H : |
1964 | keyBindings(); | 1969 | keyBindings(); |
1965 | break; | 1970 | break; |
1966 | case Qt::Key_W: | 1971 | case Qt::Key_W: |
1967 | mView->viewManager()->showWhatsNextView(); | 1972 | mView->viewManager()->showWhatsNextView(); |
1968 | break; | 1973 | break; |
1969 | case Qt::Key_L: | 1974 | case Qt::Key_L: |
1970 | mView->viewManager()->showListView(); | 1975 | mView->viewManager()->showListView(); |
1971 | break; | 1976 | break; |
1972 | case Qt::Key_N: | 1977 | case Qt::Key_N: |
1973 | mView->viewManager()->showNextView(); | 1978 | mView->viewManager()->showNextView(); |
1974 | break; | 1979 | break; |
1975 | case Qt::Key_V: | 1980 | case Qt::Key_V: |
1976 | mView->viewManager()->showTodoView(); | 1981 | mView->viewManager()->showTodoView(); |
1977 | break; | 1982 | break; |
1978 | case Qt::Key_C: | 1983 | case Qt::Key_C: |
1979 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); | 1984 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); |
1980 | break; | 1985 | break; |
1981 | case Qt::Key_P: | 1986 | case Qt::Key_P: |
1982 | mView->showDatePicker( ); | 1987 | mView->showDatePicker( ); |
1983 | break; | 1988 | break; |
1984 | case Qt::Key_F: | 1989 | case Qt::Key_F: |
1985 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1990 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1986 | mView->editFilters(); | 1991 | mView->editFilters(); |
1987 | else | 1992 | else |
1988 | mView->toggleFilter(); | 1993 | mView->toggleFilter(); |
1989 | break; | 1994 | break; |
1990 | case Qt::Key_X: | 1995 | case Qt::Key_X: |
1991 | if ( e->state() == Qt::ControlButton ) | 1996 | if ( e->state() == Qt::ControlButton ) |
1992 | mView->toggleDateNavigatorWidget(); | 1997 | mView->toggleDateNavigatorWidget(); |
1993 | else { | 1998 | else { |
1994 | mView->viewManager()->showNextXView(); | 1999 | mView->viewManager()->showNextXView(); |
1995 | showSelectedDates = true; | 2000 | showSelectedDates = true; |
1996 | } | 2001 | } |
1997 | break; | 2002 | break; |
1998 | case Qt::Key_Space: | 2003 | case Qt::Key_Space: |
1999 | mView->toggleExpand(); | 2004 | mView->toggleExpand(); |
2000 | break; | 2005 | break; |
2001 | case Qt::Key_A: | 2006 | case Qt::Key_A: |
2002 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) | 2007 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) |
2003 | mView->showNextAlarms(); | 2008 | mView->showNextAlarms(); |
2004 | else | 2009 | else |
2005 | mView->toggleAllDaySize(); | 2010 | mView->toggleAllDaySize(); |
2006 | break; | 2011 | break; |
2007 | case Qt::Key_T: | 2012 | case Qt::Key_T: |
2008 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 2013 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
2009 | mView->newTodo(); | 2014 | mView->newTodo(); |
2010 | else { | 2015 | else { |
2011 | mView->goToday(); | 2016 | mView->goToday(); |
2012 | showSelectedDates = true; | 2017 | showSelectedDates = true; |
2013 | } | 2018 | } |
2014 | break; | 2019 | break; |
2015 | case Qt::Key_J: | 2020 | case Qt::Key_J: |
2016 | mView->viewManager()->showJournalView(); | 2021 | mView->viewManager()->showJournalView(); |
2017 | break; | 2022 | break; |
2018 | case Qt::Key_B: | 2023 | case Qt::Key_B: |
2019 | mView->editIncidenceDescription();; | 2024 | mView->editIncidenceDescription();; |
2020 | break; | 2025 | break; |
2021 | // case Qt::Key_Return: | 2026 | // case Qt::Key_Return: |
2022 | case Qt::Key_E: | 2027 | case Qt::Key_E: |
2023 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 2028 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
2024 | mView->newEvent(); | 2029 | mView->newEvent(); |
2025 | else | 2030 | else |
2026 | mView->editIncidence(); | 2031 | mView->editIncidence(); |
2027 | break; | 2032 | break; |
2028 | case Qt::Key_Plus: | 2033 | case Qt::Key_Plus: |
2029 | size = p->mHourSize +2; | 2034 | size = p->mHourSize +2; |
2030 | if ( size <= 22 ) | 2035 | if ( size <= 22 ) |
2031 | configureAgenda( size ); | 2036 | configureAgenda( size ); |
2032 | break; | 2037 | break; |
2033 | case Qt::Key_Minus: | 2038 | case Qt::Key_Minus: |
2034 | size = p->mHourSize - 2; | 2039 | size = p->mHourSize - 2; |
2035 | if ( size >= 4 ) | 2040 | if ( size >= 4 ) |
2036 | configureAgenda( size ); | 2041 | configureAgenda( size ); |
2037 | break; | 2042 | break; |
2038 | 2043 | ||
2039 | 2044 | ||
2040 | default: | 2045 | default: |
2041 | e->ignore(); | 2046 | e->ignore(); |
2042 | } | 2047 | } |
2043 | if ( pro > 0 ) { | 2048 | if ( pro > 0 ) { |
2044 | mView->selectFilter( pro-1 ); | 2049 | mView->selectFilter( pro-1 ); |
2045 | } | 2050 | } |
2046 | if ( showSelectedDates ) { | 2051 | if ( showSelectedDates ) { |
2047 | ;// setCaptionToDates(); | 2052 | ;// setCaptionToDates(); |
2048 | } | 2053 | } |
2049 | 2054 | ||
2050 | } | 2055 | } |
2051 | void MainWindow::fillFilterMenuTB() | 2056 | void MainWindow::fillFilterMenuTB() |
2052 | { | 2057 | { |
2053 | selectFilterMenuTB->clear(); | 2058 | selectFilterMenuTB->clear(); |
2054 | selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); | 2059 | selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); |
2055 | selectFilterMenuTB->insertSeparator(); | 2060 | selectFilterMenuTB->insertSeparator(); |
2056 | selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); | 2061 | selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); |
2057 | 2062 | ||
2058 | selectFilterMenuTB->insertSeparator(); | 2063 | selectFilterMenuTB->insertSeparator(); |
2059 | QPtrList<CalFilter> fili = mView->filters(); | 2064 | QPtrList<CalFilter> fili = mView->filters(); |
2060 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2065 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2061 | CalFilter *filter = fili.first(); | 2066 | CalFilter *filter = fili.first(); |
2062 | int iii = 2; | 2067 | int iii = 2; |
2063 | bool checkitem = mView->filterView()->filtersEnabled(); | 2068 | bool checkitem = mView->filterView()->filtersEnabled(); |
2064 | while(filter) { | 2069 | while(filter) { |
2065 | selectFilterMenuTB->insertItem( filter->name(), iii ); | 2070 | selectFilterMenuTB->insertItem( filter->name(), iii ); |
2066 | if ( filter == curfilter) | 2071 | if ( filter == curfilter) |
2067 | selectFilterMenuTB->setItemChecked( iii, checkitem ); | 2072 | selectFilterMenuTB->setItemChecked( iii, checkitem ); |
2068 | filter = fili.next(); | 2073 | filter = fili.next(); |
2069 | ++iii; | 2074 | ++iii; |
2070 | } | 2075 | } |
2071 | if ( !checkitem ) | 2076 | if ( !checkitem ) |
2072 | selectFilterMenuTB->setItemChecked( 1, true ); | 2077 | selectFilterMenuTB->setItemChecked( 1, true ); |
2073 | 2078 | ||
2074 | int x = 0; | 2079 | int x = 0; |
2075 | int y = iconToolBar->height(); | 2080 | int y = iconToolBar->height(); |
2076 | int dX = 0; | 2081 | int dX = 0; |
2077 | int dY = 0; | 2082 | int dY = 0; |
2078 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 2083 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
2079 | if ( iconToolBar->y() > height()/2 ) { | 2084 | if ( iconToolBar->y() > height()/2 ) { |
2080 | dY = selectFilterMenuTB->sizeHint().height()+8; | 2085 | dY = selectFilterMenuTB->sizeHint().height()+8; |
2081 | y = 0; | 2086 | y = 0; |
2082 | } | 2087 | } |
2083 | } else { | 2088 | } else { |
2084 | if ( iconToolBar->x() > width()/2 ) { // right side | 2089 | if ( iconToolBar->x() > width()/2 ) { // right side |
2085 | x=0; | 2090 | x=0; |
2086 | dX= selectFilterMenuTB->sizeHint().width()+8; | 2091 | dX= selectFilterMenuTB->sizeHint().width()+8; |
2087 | y = 0; | 2092 | y = 0; |
2088 | } else { | 2093 | } else { |
2089 | x= iconToolBar->width(); | 2094 | x= iconToolBar->width(); |
2090 | y = 0; | 2095 | y = 0; |
2091 | } | 2096 | } |
2092 | } | 2097 | } |
2093 | //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); | 2098 | //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); |
2094 | selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))); | 2099 | selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))); |
2095 | } | 2100 | } |
2096 | void MainWindow::fillFilterMenu() | 2101 | void MainWindow::fillFilterMenu() |
2097 | { | 2102 | { |
2098 | selectFilterMenu->clear(); | 2103 | selectFilterMenu->clear(); |
2099 | selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); | 2104 | selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); |
2100 | selectFilterMenu->insertSeparator(); | 2105 | selectFilterMenu->insertSeparator(); |
2101 | selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); | 2106 | selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); |
2102 | 2107 | ||
2103 | selectFilterMenu->insertSeparator(); | 2108 | selectFilterMenu->insertSeparator(); |
2104 | QPtrList<CalFilter> fili = mView->filters(); | 2109 | QPtrList<CalFilter> fili = mView->filters(); |
2105 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2110 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2106 | CalFilter *filter = fili.first(); | 2111 | CalFilter *filter = fili.first(); |
2107 | int iii = 2; | 2112 | int iii = 2; |
2108 | bool checkitem = mView->filterView()->filtersEnabled(); | 2113 | bool checkitem = mView->filterView()->filtersEnabled(); |
2109 | while(filter) { | 2114 | while(filter) { |
2110 | selectFilterMenu->insertItem( filter->name(), iii ); | 2115 | selectFilterMenu->insertItem( filter->name(), iii ); |
2111 | if ( filter == curfilter) | 2116 | if ( filter == curfilter) |
2112 | selectFilterMenu->setItemChecked( iii, checkitem ); | 2117 | selectFilterMenu->setItemChecked( iii, checkitem ); |
2113 | filter = fili.next(); | 2118 | filter = fili.next(); |
2114 | ++iii; | 2119 | ++iii; |
2115 | } | 2120 | } |
2116 | if ( !checkitem ) | 2121 | if ( !checkitem ) |
2117 | selectFilterMenu->setItemChecked( 1, true ); | 2122 | selectFilterMenu->setItemChecked( 1, true ); |
2118 | } | 2123 | } |
2119 | void MainWindow::fillFilterMenuPopup() | 2124 | void MainWindow::fillFilterMenuPopup() |
2120 | { | 2125 | { |
2121 | filterPopupMenu->clear(); | 2126 | filterPopupMenu->clear(); |
2122 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); | 2127 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); |
2123 | 2128 | ||
2124 | filterPopupMenu->insertSeparator(); | 2129 | filterPopupMenu->insertSeparator(); |
2125 | QPtrList<CalFilter> fili = mView->filters(); | 2130 | QPtrList<CalFilter> fili = mView->filters(); |
2126 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2131 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2127 | CalFilter *filter = fili.first(); | 2132 | CalFilter *filter = fili.first(); |
2128 | int iii = 1; | 2133 | int iii = 1; |
2129 | bool checkitem = mView->filterView()->filtersEnabled(); | 2134 | bool checkitem = mView->filterView()->filtersEnabled(); |
2130 | while(filter) { | 2135 | while(filter) { |
2131 | filterPopupMenu->insertItem( filter->name(), iii ); | 2136 | filterPopupMenu->insertItem( filter->name(), iii ); |
2132 | if ( filter == curfilter) | 2137 | if ( filter == curfilter) |
2133 | filterPopupMenu->setItemChecked( iii, checkitem ); | 2138 | filterPopupMenu->setItemChecked( iii, checkitem ); |
2134 | filter = fili.next(); | 2139 | filter = fili.next(); |
2135 | ++iii; | 2140 | ++iii; |
2136 | } | 2141 | } |
2137 | if ( !checkitem ) | 2142 | if ( !checkitem ) |
2138 | filterPopupMenu->setItemChecked( 0, true ); | 2143 | filterPopupMenu->setItemChecked( 0, true ); |
2139 | } | 2144 | } |
2140 | void MainWindow::selectFilter( int fil ) | 2145 | void MainWindow::selectFilter( int fil ) |
2141 | { | 2146 | { |
2142 | 2147 | ||
2143 | if ( fil == 0 ) { | 2148 | if ( fil == 0 ) { |
2144 | mView->editFilters( ); | 2149 | mView->editFilters( ); |
2145 | } else if ( fil == 1 ){ | 2150 | } else if ( fil == 1 ){ |
2146 | if ( mView->filterView()->filtersEnabled() ) | 2151 | if ( mView->filterView()->filtersEnabled() ) |
2147 | mView->toggleFilerEnabled( ); | 2152 | mView->toggleFilerEnabled( ); |
2148 | } else { | 2153 | } else { |
2149 | if ( !mView->filterView()->filtersEnabled() ) { | 2154 | if ( !mView->filterView()->filtersEnabled() ) { |
2150 | mView->filterView()->blockSignals( true ); | 2155 | mView->filterView()->blockSignals( true ); |
2151 | mView->toggleFilerEnabled( ); | 2156 | mView->toggleFilerEnabled( ); |
2152 | mView->filterView()->blockSignals( false ); | 2157 | mView->filterView()->blockSignals( false ); |
2153 | } | 2158 | } |
2154 | mView->selectFilter( fil-2 ); | 2159 | mView->selectFilter( fil-2 ); |
2155 | } | 2160 | } |
2156 | } | 2161 | } |
2157 | void MainWindow::updateFilterToolbar() | 2162 | void MainWindow::updateFilterToolbar() |
2158 | { | 2163 | { |
2159 | if ( filterMenubar ) { | 2164 | if ( filterMenubar ) { |
2160 | if ( !mView->filterView()->filtersEnabled() ) { | 2165 | if ( !mView->filterView()->filtersEnabled() ) { |
2161 | filterMenubar->changeItem( 0, i18n("No Filter") ); | 2166 | filterMenubar->changeItem( 0, i18n("No Filter") ); |
2162 | } else { | 2167 | } else { |
2163 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2168 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2164 | if ( curfilter ) { | 2169 | if ( curfilter ) { |
2165 | filterMenubar->changeItem( 0, curfilter->name() ); | 2170 | filterMenubar->changeItem( 0, curfilter->name() ); |
2166 | } | 2171 | } |
2167 | } | 2172 | } |
2168 | } | 2173 | } |
2169 | } | 2174 | } |
2170 | void MainWindow::selectFilterPopup( int fil ) | 2175 | void MainWindow::selectFilterPopup( int fil ) |
2171 | { | 2176 | { |
2172 | selectFilter( fil + 1 ); | 2177 | selectFilter( fil + 1 ); |
2173 | 2178 | ||
2174 | } | 2179 | } |
2175 | void MainWindow::configureToolBar( int item ) | 2180 | void MainWindow::configureToolBar( int item ) |
2176 | { | 2181 | { |
2177 | 2182 | ||
2178 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); | 2183 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); |
2179 | KOPrefs *p = KOPrefs::instance(); | 2184 | KOPrefs *p = KOPrefs::instance(); |
2180 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); | 2185 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); |
2181 | p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); | 2186 | p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); |
2182 | p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); | 2187 | p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); |
2183 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); | 2188 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); |
2184 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); | 2189 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); |
2185 | p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); | 2190 | p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); |
2186 | p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); | 2191 | p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); |
2187 | p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); | 2192 | p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); |
2188 | p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); | 2193 | p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); |
2189 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); | 2194 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); |
2190 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); | 2195 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); |
2191 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); | 2196 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); |
2192 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); | 2197 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); |
2193 | p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); | 2198 | p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); |
2194 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); | 2199 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); |
2195 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); | 2200 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); |
2196 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); | 2201 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); |
2197 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); | 2202 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); |
2198 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); | 2203 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); |
2199 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); | 2204 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); |
2200 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); | 2205 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); |
2201 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); | 2206 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); |
2202 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); | 2207 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); |
2203 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); | 2208 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); |
2204 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); | 2209 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); |
2205 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); | 2210 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); |
2206 | p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); | 2211 | p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); |
2207 | // initActions(); | 2212 | // initActions(); |
2208 | } | 2213 | } |
2209 | void MainWindow::setCaption ( const QString & c ) | 2214 | void MainWindow::setCaption ( const QString & c ) |
2210 | { | 2215 | { |
2211 | QString cap = c; | 2216 | QString cap = c; |
2212 | cap.replace( QRegExp("\n"), " " ); | 2217 | cap.replace( QRegExp("\n"), " " ); |
2213 | cap = cap.stripWhiteSpace(); | 2218 | cap = cap.stripWhiteSpace(); |
2214 | if ( cap.isEmpty() ) | 2219 | if ( cap.isEmpty() ) |
2215 | cap = "KO/Pi"; | 2220 | cap = "KO/Pi"; |
2216 | QWidget::setCaption( cap ); | 2221 | QWidget::setCaption( cap ); |
2217 | } | 2222 | } |
2218 | void MainWindow::setCaptionToDates() | 2223 | void MainWindow::setCaptionToDates() |
2219 | { | 2224 | { |
2220 | QString selDates; | 2225 | QString selDates; |
2221 | QDate date = mView->startDate(); | 2226 | QDate date = mView->startDate(); |
2222 | if ( ! date.isValid() ) { | 2227 | if ( ! date.isValid() ) { |
2223 | setCaption(""); | 2228 | setCaption(""); |
2224 | return; | 2229 | return; |
2225 | } | 2230 | } |
2226 | selDates = KGlobal::locale()->formatDate( date, true); | 2231 | selDates = KGlobal::locale()->formatDate( date, true); |
2227 | if (mView->startDate() < mView->endDate() ) | 2232 | if (mView->startDate() < mView->endDate() ) |
2228 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); | 2233 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); |
2229 | else { | 2234 | else { |
2230 | QString addString; | 2235 | QString addString; |
2231 | if ( date == QDateTime::currentDateTime().date() ) | 2236 | if ( date == QDateTime::currentDateTime().date() ) |
2232 | addString = i18n("Today"); | 2237 | addString = i18n("Today"); |
2233 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) | 2238 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) |
2234 | addString = i18n("Tomorrow"); | 2239 | addString = i18n("Tomorrow"); |
2235 | if ( !addString.isEmpty() ) | 2240 | if ( !addString.isEmpty() ) |
2236 | selDates = addString+", "+selDates ; | 2241 | selDates = addString+", "+selDates ; |
2237 | } | 2242 | } |
2238 | setCaption( i18n("Dates: ") + selDates ); | 2243 | setCaption( i18n("Dates: ") + selDates ); |
2239 | 2244 | ||
2240 | } | 2245 | } |
2241 | void MainWindow::showConfigureAgenda( ) | 2246 | void MainWindow::showConfigureAgenda( ) |
2242 | { | 2247 | { |
2243 | int iii; | 2248 | int iii; |
2244 | for ( iii = 1;iii<= 10 ;++iii ){ | 2249 | for ( iii = 1;iii<= 10 ;++iii ){ |
2245 | configureAgendaMenu->setItemChecked( (iii+1)*2, false ); | 2250 | configureAgendaMenu->setItemChecked( (iii+1)*2, false ); |
2246 | } | 2251 | } |
2247 | configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); | 2252 | configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); |
2248 | } | 2253 | } |
2249 | void MainWindow::configureAgenda( int item ) | 2254 | void MainWindow::configureAgenda( int item ) |
2250 | { | 2255 | { |
2251 | if ( KOPrefs::instance()->mHourSize == item ) | 2256 | if ( KOPrefs::instance()->mHourSize == item ) |
2252 | return; | 2257 | return; |
2253 | KOPrefs::instance()->mHourSize=item; | 2258 | KOPrefs::instance()->mHourSize=item; |
2254 | mView->viewManager()->agendaView()->updateConfig(); | 2259 | mView->viewManager()->agendaView()->updateConfig(); |
2255 | } | 2260 | } |
2256 | 2261 | ||
2257 | void MainWindow::saveCalendar() | 2262 | void MainWindow::saveCalendar() |
2258 | { | 2263 | { |
2259 | QString fn = KOPrefs::instance()->mLastSaveFile; | 2264 | QString fn = KOPrefs::instance()->mLastSaveFile; |
2260 | fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); | 2265 | fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); |
2261 | 2266 | ||
2262 | if ( fn == "" ) | 2267 | if ( fn == "" ) |
2263 | return; | 2268 | return; |
2264 | QFileInfo info; | 2269 | QFileInfo info; |
2265 | info.setFile( fn ); | 2270 | info.setFile( fn ); |
2266 | QString mes; | 2271 | QString mes; |