-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 9 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 8 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 13 | ||||
-rw-r--r-- | korganizer/calendarview.h | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 69 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 5 |
6 files changed, 74 insertions, 33 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 2c0d626..6f76c7e 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1,1572 +1,1573 @@ | |||
1 | { "10 minutes","10 Minuten" }, | 1 | { "10 minutes","10 Minuten" }, |
2 | { "10th","10." }, | 2 | { "10th","10." }, |
3 | { "11th","11." }, | 3 | { "11th","11." }, |
4 | { "12 pm Format","12 AM/PM Format" }, | 4 | { "12 pm Format","12 AM/PM Format" }, |
5 | { "12th","12." }, | 5 | { "12th","12." }, |
6 | { "13th","13." }, | 6 | { "13th","13." }, |
7 | { "14th","14." }, | 7 | { "14th","14." }, |
8 | { "15th","15." }, | 8 | { "15th","15." }, |
9 | { "16th","16." }, | 9 | { "16th","16." }, |
10 | { "17th","17." }, | 10 | { "17th","17." }, |
11 | { "18th","18." }, | 11 | { "18th","18." }, |
12 | { "19th","19." }, | 12 | { "19th","19." }, |
13 | { "1 Day","1 Tag" }, | 13 | { "1 Day","1 Tag" }, |
14 | { "1 h","1 Std" }, | 14 | { "1 h","1 Std" }, |
15 | { "1 (high)","1 (hoch)" }, | 15 | { "1 (high)","1 (hoch)" }, |
16 | { "5 (low)","5" }, | 16 | { "5 (low)","5" }, |
17 | { "1st","1." }, | 17 | { "1st","1." }, |
18 | { "20th","20." }, | 18 | { "20th","20." }, |
19 | { "21st","21." }, | 19 | { "21st","21." }, |
20 | { "22nd","22." }, | 20 | { "22nd","22." }, |
21 | { "23rd","23." }, | 21 | { "23rd","23." }, |
22 | { "24:00 Hour Format","24:00 Stunden Format" }, | 22 | { "24:00 Hour Format","24:00 Stunden Format" }, |
23 | { "24th","24." }, | 23 | { "24th","24." }, |
24 | { "25th","25." }, | 24 | { "25th","25." }, |
25 | { "26th","26." }, | 25 | { "26th","26." }, |
26 | { "27th","27." }, | 26 | { "27th","27." }, |
27 | { "28th","28." }, | 27 | { "28th","28." }, |
28 | { "29th","29." }, | 28 | { "29th","29." }, |
29 | { "2nd","2." }, | 29 | { "2nd","2." }, |
30 | { "30 minutes","30 Minuten" }, | 30 | { "30 minutes","30 Minuten" }, |
31 | { "30th","30." }, | 31 | { "30th","30." }, |
32 | { "31st","31." }, | 32 | { "31st","31." }, |
33 | { "3rd","3." }, | 33 | { "3rd","3." }, |
34 | { "4th","4." }, | 34 | { "4th","4." }, |
35 | { "5 (lowest)","5 (Niedrigster)" }, | 35 | { "5 (lowest)","5 (Niedrigster)" }, |
36 | { "5th","5." }, | 36 | { "5th","5." }, |
37 | { "6th","6." }, | 37 | { "6th","6." }, |
38 | { "7th","7." }, | 38 | { "7th","7." }, |
39 | { "8th","8." }, | 39 | { "8th","8." }, |
40 | { "9th","9." }, | 40 | { "9th","9." }, |
41 | { "About...","Über..." }, | 41 | { "About...","Über..." }, |
42 | { "&Accept","&Akzeptieren" }, | 42 | { "&Accept","&Akzeptieren" }, |
43 | { "Accept","Akzeptieren" }, | 43 | { "Accept","Akzeptieren" }, |
44 | { "Accept A&ll","A&lles Akzepieren" }, | 44 | { "Accept A&ll","A&lles Akzepieren" }, |
45 | { "Access:","Zugriff:" }, | 45 | { "Access:","Zugriff:" }, |
46 | { "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, | 46 | { "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, |
47 | { "Action","Aktion" }, | 47 | { "Action","Aktion" }, |
48 | { "Add Filter","Filter Hinzufügen" }, | 48 | { "Add Filter","Filter Hinzufügen" }, |
49 | { "&Add","Hinzufügen" }, | 49 | { "&Add","Hinzufügen" }, |
50 | { "Add","Hinzufügen" }, | 50 | { "Add","Hinzufügen" }, |
51 | { "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, | 51 | { "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, |
52 | { "Additional email address:","Zusätzliche E-Mail Adresse:" }, | 52 | { "Additional email address:","Zusätzliche E-Mail Adresse:" }, |
53 | { "&Addressbook","&Adressbuch" }, | 53 | { "&Addressbook","&Adressbuch" }, |
54 | { "Address &Book...","Adress&buch..." }, | 54 | { "Address &Book...","Adress&buch..." }, |
55 | { "Agenda Size","Agende Größe" }, | 55 | { "Agenda Size","Agende Größe" }, |
56 | { "Agenda Size:","Größe der Agenda:" }, | 56 | { "Agenda Size:","Größe der Agenda:" }, |
57 | { "Agenda view:","Agenda Ansicht:" }, | 57 | { "Agenda view:","Agenda Ansicht:" }, |
58 | { "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, | 58 | { "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, |
59 | { "All attendees","Alle Teilnehmer" }, | 59 | { "All attendees","Alle Teilnehmer" }, |
60 | { "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, | 60 | { "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, |
61 | { "All day event","Ganztägig" }, | 61 | { "All day event","Ganztägig" }, |
62 | { "Anonymous","Anonym" }, | 62 | { "Anonymous","Anonym" }, |
63 | { "Apply","Anwenden" }, | 63 | { "Apply","Anwenden" }, |
64 | { "Apr","Apr" }, | 64 | { "Apr","Apr" }, |
65 | { "April","April" }, | 65 | { "April","April" }, |
66 | {"Ask for every entry on conflict","Frage bei Konflikten nach"}, | 66 | {"Ask for every entry on conflict","Frage bei Konflikten nach"}, |
67 | { "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, | 67 | { "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, |
68 | { "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, | 68 | { "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, |
69 | { "Attendees","Teilnehmer" }, | 69 | { "Attendees","Teilnehmer" }, |
70 | { "Aug","Aug" }, | 70 | { "Aug","Aug" }, |
71 | { "August","August" }, | 71 | { "August","August" }, |
72 | { "Auto-Save","Automatisches Abspeichern" }, | 72 | { "Auto-Save","Automatisches Abspeichern" }, |
73 | { "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, | 73 | { "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, |
74 | { "Auto saving...","Automatische Sicherung..." }, | 74 | { "Auto saving...","Automatische Sicherung..." }, |
75 | { "Begin on:","Starte mit:" }, | 75 | { "Begin on:","Starte mit:" }, |
76 | { "Begins on: %1","Starte mit: %1" }, | 76 | { "Begins on: %1","Starte mit: %1" }, |
77 | { "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, | 77 | { "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, |
78 | { "<b>On:</b> %1","<b>Am:</b> %1" }, | 78 | { "<b>On:</b> %1","<b>Am:</b> %1" }, |
79 | { "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, | 79 | { "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, |
80 | { "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, | 80 | { "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, |
81 | { " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, | 81 | { " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, |
82 | { "Busy","Belegt" }, | 82 | { "Busy","Belegt" }, |
83 | { "&Cancel","Abbre&chen" }, | 83 | { "&Cancel","Abbre&chen" }, |
84 | { "Cancel","Abbrechen" }, | 84 | { "Cancel","Abbrechen" }, |
85 | { "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, | 85 | { "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, |
86 | { "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, | 86 | { "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, |
87 | { "Categories...","Kategorien..." }, | 87 | { "Categories...","Kategorien..." }, |
88 | { "Categories","Kategorien" }, | 88 | { "Categories","Kategorien" }, |
89 | { "Category","Kategorie" }, | 89 | { "Category","Kategorie" }, |
90 | { "Center View","Zentriere Ansicht" }, | 90 | { "Center View","Zentriere Ansicht" }, |
91 | { "Change","Ändere" }, | 91 | { "Change","Ändere" }, |
92 | { "Cinema","Kino" }, | 92 | { "Cinema","Kino" }, |
93 | { "Clone Item","Klone Eintrag" }, | 93 | { "Clone Item","Klone Eintrag" }, |
94 | { "&Close","S&chließen" }, | 94 | { "&Close","S&chließen" }, |
95 | { "Close","Schließen" }, | 95 | { "Close","Schließen" }, |
96 | { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, | 96 | { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, |
97 | { "Colors","Farben" }, | 97 | { "Colors","Farben" }, |
98 | { "completed","erledigt" }, | 98 | { "completed","erledigt" }, |
99 | { "completed on %1","erledigt am %1" }, | 99 | { "completed on %1","erledigt am %1" }, |
100 | { "Complete","Erledigt" }, | 100 | { "Complete","Erledigt" }, |
101 | { "Confidential","Vertraulich" }, | 101 | { "Confidential","Vertraulich" }, |
102 | { "Configure...","Einstellungen..." }, | 102 | { "Configure...","Einstellungen..." }, |
103 | { "Confirm &deletes","Löschvogang bestätigen" }, | 103 | { "Confirm &deletes","Löschvogang bestätigen" }, |
104 | { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, | 104 | { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, |
105 | { "Counter-event Viewer","Terminzähler Ansicht" }, | 105 | { "Counter-event Viewer","Terminzähler Ansicht" }, |
106 | { "Daily ending hour:","Feierabend:" }, | 106 | { "Daily ending hour:","Feierabend:" }, |
107 | { "Daily starting hour:","Anfangszeit:" }, | 107 | { "Daily starting hour:","Anfangszeit:" }, |
108 | { "Daily","Täglich" }, | 108 | { "Daily","Täglich" }, |
109 | { "Date Format","Datums Format" }, | 109 | { "Date Format","Datums Format" }, |
110 | { "Date Format:","Datums Format:" }, | 110 | { "Date Format:","Datums Format:" }, |
111 | { "DateNavigator:(nr)","Datums Navigator" }, | 111 | { "DateNavigator:(nr)","Datums Navigator" }, |
112 | { "Dates: ","Datum: " }, | 112 | { "Dates: ","Datum: " }, |
113 | { "Date && Time","Datum && Zeit" }, | 113 | { "Date && Time","Datum && Zeit" }, |
114 | { "Day begins at:","Der Tag beginnt um:" }, | 114 | { "Day begins at:","Der Tag beginnt um:" }, |
115 | { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, | 115 | { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, |
116 | { "Days in What's Next:","Tage in What's Next:" }, | 116 | { "Days in What's Next:","Tage in What's Next:" }, |
117 | { "day(s)","Tag(e)" }, | 117 | { "day(s)","Tag(e)" }, |
118 | { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, | 118 | { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, |
119 | { "day","Tag" }, | 119 | { "day","Tag" }, |
120 | { "Dec","Dez" }, | 120 | { "Dec","Dez" }, |
121 | { "December","Dezember" }, | 121 | { "December","Dezember" }, |
122 | { "Default alarm time:","Standard Alarmzeit:" }, | 122 | { "Default alarm time:","Standard Alarmzeit:" }, |
123 | { "Default appointment time:","Standard Termin Startzeit:" }, | 123 | { "Default appointment time:","Standard Termin Startzeit:" }, |
124 | { "Default event color:","Standard Terminfarbe:" }, | 124 | { "Default event color:","Standard Terminfarbe:" }, |
125 | { "Default","Standard" }, | 125 | { "Default","Standard" }, |
126 | { "Def. duration of new app.:","Standard Termin Länge:" }, | 126 | { "Def. duration of new app.:","Standard Termin Länge:" }, |
127 | { "Delete All","Lösche alles" }, | 127 | { "Delete All","Lösche alles" }, |
128 | { "Delete all selected","Lösche alle Selektierten" }, | 128 | { "Delete all selected","Lösche alle Selektierten" }, |
129 | { "Delete Current","Aktuellen löschen" }, | 129 | { "Delete Current","Aktuellen löschen" }, |
130 | { "Delete Event...","Lösche Termin..." }, | 130 | { "Delete Event...","Lösche Termin..." }, |
131 | { "Delete Event","Lösche Termin" }, | 131 | { "Delete Event","Lösche Termin" }, |
132 | { "&Delete...","Lösche..." }, | 132 | { "&Delete...","Lösche..." }, |
133 | { "Delete...","Lösche..." }, | 133 | { "Delete...","Lösche..." }, |
134 | { "Delete","Lösche" }, | 134 | { "Delete","Lösche" }, |
135 | { "Delete Todo...","Lösche Todo..." }, | 135 | { "Delete Todo...","Lösche Todo..." }, |
136 | { "Delete To-Do","Lösche Todo" }, | 136 | { "Delete To-Do","Lösche Todo" }, |
137 | { "Deleting item %d ...","Lösche Eintrag %d..." }, | 137 | { "Deleting item %d ...","Lösche Eintrag %d..." }, |
138 | { "Descriptions","Beschreibungen" }, | 138 | { "Descriptions","Beschreibungen" }, |
139 | { "Deselect all","Deselektiere Alle" }, | 139 | { "Deselect all","Deselektiere Alle" }, |
140 | { "Details","Details" }, | 140 | { "Details","Details" }, |
141 | { "Dinner","Abendessen" }, | 141 | { "Dinner","Abendessen" }, |
142 | { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, | 142 | { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI beenden?" }, |
143 | { "Due Date","Fällig am" }, | 143 | { "Due Date","Fällig am" }, |
144 | { "Due: ","Fällig: "}, | 144 | { "Due: ","Fällig: "}, |
145 | { "Due Time","Fällig um" }, | 145 | { "Due Time","Fällig um" }, |
146 | { "Due:","Fällig:"}, | 146 | { "Due:","Fällig:"}, |
147 | { "Duration: ","Dauer: " }, | 147 | { "Duration: ","Dauer: " }, |
148 | { "Edit...","Bearbeite..." }, | 148 | { "Edit...","Bearbeite..." }, |
149 | { "Edit Event...","Bearbeite Termin..." }, | 149 | { "Edit Event...","Bearbeite Termin..." }, |
150 | { "Edit Event","Bearbeite Termin" }, | 150 | { "Edit Event","Bearbeite Termin" }, |
151 | { "Edit exceptions","Bearbeite Ausnahmen" }, | 151 | { "Edit exceptions","Bearbeite Ausnahmen" }, |
152 | { "EditorBox:","Editor Fenster:" }, | 152 | { "EditorBox:","Editor Fenster:" }, |
153 | { "Edit Recurrence Range","Bearbeite Wiederholung" }, | 153 | { "Edit Recurrence Range","Bearbeite Wiederholung" }, |
154 | { "Edit Todo...","Berabeite Todo..." }, | 154 | { "Edit Todo...","Berabeite Todo..." }, |
155 | { "Edit To-Do","Todo bearbeiten" }, | 155 | { "Edit To-Do","Todo bearbeiten" }, |
156 | { "E&mail address:","E&mail Adresse:" }, | 156 | { "E&mail address:","E&mail Adresse:" }, |
157 | { "(EmptyEmail)","(KeineEmail)" }, | 157 | { "(EmptyEmail)","(KeineEmail)" }, |
158 | { "(EmptyName)","(KeinName)" }, | 158 | { "(EmptyName)","(KeinName)" }, |
159 | { "Enable Recurrence","Wiederholung anschalten" }, | 159 | { "Enable Recurrence","Wiederholung anschalten" }, |
160 | { "End after","Endet nach"}, | 160 | { "End after","Endet nach"}, |
161 | { "End by:","Endet am"}, | 161 | { "End by:","Endet am"}, |
162 | { "End/Due Date","Ende/Fällig am" }, | 162 | { "End/Due Date","Ende/Fällig am" }, |
163 | { "End:","Ende:" }, | 163 | { "End:","Ende:" }, |
164 | { "End/Due Time","Ende/Fällig um" }, | 164 | { "End/Due Time","Ende/Fällig um" }, |
165 | { "English","Englisch" }, | 165 | { "English","Englisch" }, |
166 | { "Event","Termin" }, | 166 | { "Event","Termin" }, |
167 | { "Event list","Termin Liste" }, | 167 | { "Event list","Termin Liste" }, |
168 | { "Events","Termine" }, | 168 | { "Events","Termine" }, |
169 | { "Event Viewer:","Termin Übersicht:" }, | 169 | { "Event Viewer:","Termin Übersicht:" }, |
170 | { "every","jede" }, | 170 | { "every","jede" }, |
171 | { "Exceptions...","Ausnahmen..." }, | 171 | { "Exceptions...","Ausnahmen..." }, |
172 | { "Exceptions","Ausnahmen" }, | 172 | { "Exceptions","Ausnahmen" }, |
173 | { "Exclude holidays","Ohne freie Tage" }, | 173 | { "Exclude holidays","Ohne freie Tage" }, |
174 | { "Exclude Saturdays","Ohne Samstage" }, | 174 | { "Exclude Saturdays","Ohne Samstage" }, |
175 | { "Feb","Feb" }, | 175 | { "Feb","Feb" }, |
176 | { "February","Februar" }, | 176 | { "February","Februar" }, |
177 | { "&Find","Suche!" }, | 177 | { "&Find","Suche!" }, |
178 | { "Fonts","Schriftart" }, | 178 | { "Fonts","Schriftart" }, |
179 | { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, | 179 | { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, |
180 | { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, | 180 | { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, |
181 | { "Free","Frei" }, | 181 | { "Free","Frei" }, |
182 | { "Friday","Freitag" }, | 182 | { "Friday","Freitag" }, |
183 | { "Fri","Fr" }, | 183 | { "Fri","Fr" }, |
184 | { "From:","Vom:" }, | 184 | { "From:","Vom:" }, |
185 | { "Full &name:","Vor- und &Nachname:" }, | 185 | { "Full &name:","Vor- und &Nachname:" }, |
186 | { "General","Allgemein" }, | 186 | { "General","Allgemein" }, |
187 | { "German","Deutsch" }, | 187 | { "German","Deutsch" }, |
188 | { "Gifts","Geschenke" }, | 188 | { "Gifts","Geschenke" }, |
189 | { "Go to Today","Heute anzeigen" }, | 189 | { "Go to Today","Heute anzeigen" }, |
190 | { "Help","Hilfe" }, | 190 | { "Help","Hilfe" }, |
191 | { "Hide Dates","Daten ausblenden" }, | 191 | { "Hide Dates","Daten ausblenden" }, |
192 | { "Highlight color:","Markierungen:" }, | 192 | { "Highlight color:","Markierungen:" }, |
193 | { "Holiday color:","Freie Tage:" }, | 193 | { "Holiday color:","Freie Tage:" }, |
194 | { "hour(s)","Stunde(n)" }, | 194 | { "hour(s)","Stunde(n)" }, |
195 | { "In %1 days: ","In %1 Tagen: " }, | 195 | { "In %1 days: ","In %1 Tagen: " }, |
196 | { "Incomplete Todo:","Unerledigte Aufgaben:" }, | 196 | { "Incomplete Todo:","Unerledigte Aufgaben:" }, |
197 | { "Information","Information" }, | 197 | { "Information","Information" }, |
198 | { "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, | 198 | { "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, |
199 | { "Jan","Jan" }, | 199 | { "Jan","Jan" }, |
200 | { "January","Januar" }, | 200 | { "January","Januar" }, |
201 | { "JournalView:","Journal Ansicht:" }, | 201 | { "JournalView:","Journal Ansicht:" }, |
202 | { "Journals","Journale" }, | 202 | { "Journals","Journale" }, |
203 | { "Jul","Jul" }, | 203 | { "Jul","Jul" }, |
204 | { "July","Juli" }, | 204 | { "July","Juli" }, |
205 | { "Jump to date","Springe zum Datum" }, | 205 | { "Jump to date","Springe zum Datum" }, |
206 | { "June","Juni" }, | 206 | { "June","Juni" }, |
207 | { "Jun","Jun" }, | 207 | { "Jun","Jun" }, |
208 | { "Key Bindings...","Tastenzuordnung..." }, | 208 | { "Key Bindings...","Tastenzuordnung..." }, |
209 | { "Kids","Kinder" }, | 209 | { "Kids","Kinder" }, |
210 | { "Known Problems...","Bekannte Probleme..." }, | 210 | { "Known Problems...","Bekannte Probleme..." }, |
211 | { "KO/Pi Find ","KO/Pi Suchdialog " }, | 211 | { "KO/Pi Find ","KO/Pi Suchdialog " }, |
212 | { "KO/Pi Find: ","KO/Pi Suchen: " }, | 212 | { "KO/Pi Find: ","KO/Pi Suchen: " }, |
213 | { "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, | 213 | { "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, |
214 | { "Language:(needs restart)","Sprache (Neustart!)" }, | 214 | { "Language:(needs restart)","Sprache (Neustart!)" }, |
215 | { "Language:","Sprache" }, | 215 | { "Language:","Sprache" }, |
216 | { "Large","Etwas mehr" }, | 216 | { "Large","Etwas mehr" }, |
217 | { "List View:","Listenansicht:" }, | 217 | { "List View:","Listenansicht:" }, |
218 | { "List View","Listenansicht" }, | 218 | { "List View","Listenansicht" }, |
219 | { "Load/Save","Laden/Speichern" }, | 219 | { "Load/Save","Laden/Speichern" }, |
220 | { "Load Template","Lade Vorlage" }, | 220 | { "Load Template","Lade Vorlage" }, |
221 | { "Locale","Lokalisation" }, | 221 | { "Locale","Lokalisation" }, |
222 | { "Local temp file:","Lokale temp. Datei:" }, | 222 | { "Local temp file:","Lokale temp. Datei:" }, |
223 | { "Location: ","Ort: " }, | 223 | { "Location: ","Ort: " }, |
224 | { "Location:","Ort:" }, | 224 | { "Location:","Ort:" }, |
225 | { "Mail client","Mail Programm" }, | 225 | { "Mail client","Mail Programm" }, |
226 | { "Mail Client","Mail Programm" }, | 226 | { "Mail Client","Mail Programm" }, |
227 | { "March","März" }, | 227 | { "March","März" }, |
228 | { "Mar","Mär" }, | 228 | { "Mar","Mär" }, |
229 | { "May","Mai" }, | 229 | { "May","Mai" }, |
230 | { "M. Bains line:","M. Bains Linie:" }, | 230 | { "M. Bains line:","M. Bains Linie:" }, |
231 | { "Medium","Medium" }, | 231 | { "Medium","Medium" }, |
232 | { "Method","Methode" }, | 232 | { "Method","Methode" }, |
233 | { "minute(s)","Minute(n)" }, | 233 | { "minute(s)","Minute(n)" }, |
234 | { "Monday","Montag" }, | 234 | { "Monday","Montag" }, |
235 | { "Mon","Mo" }, | 235 | { "Mon","Mo" }, |
236 | { "Monthly","Monatlich" }, | 236 | { "Monthly","Monatlich" }, |
237 | { "Month not long enough","Monat ist nicht lang genug" }, | 237 | { "Month not long enough","Monat ist nicht lang genug" }, |
238 | { "month(s)","Monat(e)" }, | 238 | { "month(s)","Monat(e)" }, |
239 | { "Month view:","Monatsansicht:" }, | 239 | { "Month view:","Monatsansicht:" }, |
240 | { "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, | 240 | { "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, |
241 | { "Todo view uses category colors","Todo Ansicht zeigt Kategorie Farben" }, | 241 | { "Todo view uses category colors","Todo Ansicht zeigt Kategorie Farben" }, |
242 | { "Move &Down","Nach unten verschieben" }, | 242 | { "Move &Down","Nach unten verschieben" }, |
243 | { "Move &Up","Nach oben verschieben" }, | 243 | { "Move &Up","Nach oben verschieben" }, |
244 | { "Name:","Name:" }, | 244 | { "Name:","Name:" }, |
245 | { "Name","Name" }, | 245 | { "Name","Name" }, |
246 | { "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, | 246 | { "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, |
247 | { "%n Days","%n Tage" }, | 247 | { "%n Days","%n Tage" }, |
248 | { "Never","Nie" }, | 248 | { "Never","Nie" }, |
249 | { "New event...","Neuer Termin..." }, | 249 | { "New event...","Neuer Termin..." }, |
250 | { "New event","Neuer Termin" }, | 250 | { "New event","Neuer Termin" }, |
251 | { "New Event...","Neuer Termin..." }, | 251 | { "New Event...","Neuer Termin..." }, |
252 | { "New Events/Todos should","Neue Termine/Todos sollten" }, | 252 | { "New Events/Todos should","Neue Termine/Todos sollten" }, |
253 | { "&New","&Neu" }, | 253 | { "&New","&Neu" }, |
254 | { "New","Neu", }, | 254 | { "New","Neu", }, |
255 | { "New Sub-Todo...","Neues Sub-Todo..." }, | 255 | { "New Sub-Todo...","Neues Sub-Todo..." }, |
256 | { "New Todo...","Neues Todo..." }, | 256 | { "New Todo...","Neues Todo..." }, |
257 | { "Next Alarm: ","Nächster Alarm: ", }, | 257 | { "Next Alarm: ","Nächster Alarm: ", }, |
258 | { "&Next Day","&Nächster Tag", }, | 258 | { "&Next Day","&Nächster Tag", }, |
259 | { "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, | 259 | { "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, |
260 | { "Next month","Nächster Monat" }, | 260 | { "Next month","Nächster Monat" }, |
261 | { "&Next Week","&Nächste Woche" }, | 261 | { "&Next Week","&Nächste Woche" }, |
262 | { "Next year","Nächstes Jahr" }, | 262 | { "Next year","Nächstes Jahr" }, |
263 | { "Next Year","Nächstes Jahr" }, | 263 | { "Next Year","Nächstes Jahr" }, |
264 | { "%n h","%n Std" }, | 264 | { "%n h","%n Std" }, |
265 | { "No ending date","Kein End-Datum", }, | 265 | { "No ending date","Kein End-Datum", }, |
266 | { "No event, nothing to do.","Kein Termin, nichts zu tun.", }, | 266 | { "No event, nothing to do.","Kein Termin, nichts zu tun.", }, |
267 | { "No event selected.","Kein Termin selektiert" }, | 267 | { "No event selected.","Kein Termin selektiert" }, |
268 | { "No","Nein" }, | 268 | { "No","Nein" }, |
269 | { "No program set","Kein Programm ausgewählt", }, | 269 | { "No program set","Kein Programm ausgewählt", }, |
270 | { "Normal","Normal" }, | 270 | { "Normal","Normal" }, |
271 | { "[No selection]","Keine Selektion", }, | 271 | { "[No selection]","Keine Selektion", }, |
272 | { "No sound set","Kein Sound ausgewählt", }, | 272 | { "No sound set","Kein Sound ausgewählt", }, |
273 | { "no time ","keine Zeit ", }, | 273 | { "no time ","keine Zeit ", }, |
274 | { "no time","keine Zeit", }, | 274 | { "no time","keine Zeit", }, |
275 | { "No Time","Keine Zeit" }, | 275 | { "No Time","Keine Zeit" }, |
276 | { "November","November" }, | 276 | { "November","November" }, |
277 | { "Nov","Nov", }, | 277 | { "Nov","Nov", }, |
278 | { "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, | 278 | { "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, |
279 | { "occurrence(s)","Vorkommen" }, | 279 | { "occurrence(s)","Vorkommen" }, |
280 | { "October","Oktober" }, | 280 | { "October","Oktober" }, |
281 | { "Oct","Okt", }, | 281 | { "Oct","Okt", }, |
282 | { "O-due!","Ü-fällig! " }, | 282 | { "O-due!","Ü-fällig! " }, |
283 | { "&OK","&OK" }, | 283 | { "&OK","&OK" }, |
284 | { "Ok+Show!","Ok+Anzeigen" }, | 284 | { "Ok+Show!","Ok+Anzeigen" }, |
285 | { "Organizer: %1","Organisator %1" }, | 285 | { "Organizer: %1","Organisator %1" }, |
286 | { "Organizer","Organisator" }, | 286 | { "Organizer","Organisator" }, |
287 | { "Owner: ","Besitzer: " }, | 287 | { "Owner: ","Besitzer: " }, |
288 | { "Owner:","Besitzer:" }, | 288 | { "Owner:","Besitzer:" }, |
289 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, | 289 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, |
290 | { "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, | 290 | { "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, |
291 | { "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, | 291 | { "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, |
292 | { "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, | 292 | { "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, |
293 | { "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, | 293 | { "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, |
294 | { "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, | 294 | { "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, |
295 | { "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, | 295 | { "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, |
296 | { "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, | 296 | { "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, |
297 | { "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, | 297 | { "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, |
298 | { "&Previous Day","Vorheriger Tag" }, | 298 | { "&Previous Day","Vorheriger Tag" }, |
299 | { "Previous month","Vorheriger Monat" }, | 299 | { "Previous month","Vorheriger Monat" }, |
300 | { "Previous Month","Vorheriger Monat" }, | 300 | { "Previous Month","Vorheriger Monat" }, |
301 | { "&Previous Week","Vorherige Woche" }, | 301 | { "&Previous Week","Vorherige Woche" }, |
302 | { "Previous year","Vorheriges Jahr" }, | 302 | { "Previous year","Vorheriges Jahr" }, |
303 | { "Previous Year","Vorheriges Jahr" }, | 303 | { "Previous Year","Vorheriges Jahr" }, |
304 | { "Printing","Drucken" }, | 304 | { "Printing","Drucken" }, |
305 | { "Priority:","Priorität:" }, | 305 | { "Priority:","Priorität:" }, |
306 | { "Private","Privat" }, | 306 | { "Private","Privat" }, |
307 | { "Proceed","Weiter" }, | 307 | { "Proceed","Weiter" }, |
308 | { "Public","Öffentlich" }, | 308 | { "Public","Öffentlich" }, |
309 | { "Purge","Entferne" }, | 309 | { "Purge","Entferne" }, |
310 | { "Purge Completed...","Entferne erledigte Todos..." }, | 310 | { "Purge Completed...","Entferne erledigte Todos..." }, |
311 | { "Purge Todos","Todos bereinigen" }, | 311 | { "Purge Todos","Todos bereinigen" }, |
312 | { "read-only","schreibgeschützt" }, | 312 | { "read-only","schreibgeschützt" }, |
313 | { "Recur every","Wiederh. alle" }, | 313 | { "Recur every","Wiederh. alle" }, |
314 | { "Recur in the month of","Wiederh. im Monat" }, | 314 | { "Recur in the month of","Wiederh. im Monat" }, |
315 | { "Recur on the","Wiederh. am" }, | 315 | { "Recur on the","Wiederh. am" }, |
316 | { "Recur on this day","Wiederh. am diesen Tag" }, | 316 | { "Recur on this day","Wiederh. am diesen Tag" }, |
317 | { "Recurrence Range...","Wiederholungs Zeitraum..." }, | 317 | { "Recurrence Range...","Wiederholungs Zeitraum..." }, |
318 | { "Recurrence Range","Wiederholungs Zeitraum" }, | 318 | { "Recurrence Range","Wiederholungs Zeitraum" }, |
319 | { "Recurrence Rule","Wiederholungs Regel" }, | 319 | { "Recurrence Rule","Wiederholungs Regel" }, |
320 | { "Recurrence","Wiederholung" }, | 320 | { "Recurrence","Wiederholung" }, |
321 | { "Recurs","Wiederholung" }, | 321 | { "Recurs","Wiederholung" }, |
322 | {"&Reject","Abweisen"}, | 322 | {"&Reject","Abweisen"}, |
323 | { "Reminder:","Alarm:" }, | 323 | { "Reminder:","Alarm:" }, |
324 | { "Rem.:","Alarm:" }, | 324 | { "Rem.:","Alarm:" }, |
325 | { "Rem.","Alarm:" }, | 325 | { "Rem.","Alarm:" }, |
326 | { "Remote file:","Remote Datei:"}, | 326 | { "Remote file:","Remote Datei:"}, |
327 | { "Remote IP:","Remote (ferne) IP:" }, | 327 | { "Remote IP:","Remote (ferne) IP:" }, |
328 | { "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, | 328 | { "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, |
329 | { "Remote user:","Remote Benutzer"}, | 329 | { "Remote user:","Remote Benutzer"}, |
330 | { "&Remove","Entfe&rnen" }, | 330 | { "&Remove","Entfe&rnen" }, |
331 | { "Remove","Entfernen" }, | 331 | { "Remove","Entfernen" }, |
332 | { "Request response","Bemerkung anfordern" }, | 332 | { "Request response","Bemerkung anfordern" }, |
333 | { "Role:","Rolle:" }, | 333 | { "Role:","Rolle:" }, |
334 | { "Role","Rolle" }, | 334 | { "Role","Rolle" }, |
335 | { "Sat","Sa" }, | 335 | { "Sat","Sa" }, |
336 | { "Saturday","Samstag" }, | 336 | { "Saturday","Samstag" }, |
337 | { "Search for:","Suche nach:" }, | 337 | { "Search for:","Suche nach:" }, |
338 | { "Search In","Suche in" }, | 338 | { "Search In","Suche in" }, |
339 | { "Search...","Suche..." }, | 339 | { "Search...","Suche..." }, |
340 | { "Search","Suche" }, | 340 | { "Search","Suche" }, |
341 | { "Select Addresses","Wähle Adressen" }, | 341 | { "Select Addresses","Wähle Adressen" }, |
342 | { "Select all","Selektiere Alle" }, | 342 | { "Select all","Selektiere Alle" }, |
343 | { "Select a month","Wähle Monat" }, | 343 | { "Select a month","Wähle Monat" }, |
344 | { "Select a week","Wähle Woche" }, | 344 | { "Select a week","Wähle Woche" }, |
345 | { "Select a year","Wähle Jahr" }, | 345 | { "Select a year","Wähle Jahr" }, |
346 | { "Send directly","Sende direkt" }, | 346 | { "Send directly","Sende direkt" }, |
347 | { "&Send Messages","&Sende Nachrichten", }, | 347 | { "&Send Messages","&Sende Nachrichten", }, |
348 | { "Sep","Sep" }, | 348 | { "Sep","Sep" }, |
349 | { "September","September" }, | 349 | { "September","September" }, |
350 | { "Shopping","Einkaufen" }, | 350 | { "Shopping","Einkaufen" }, |
351 | { "Show Dates","Zeige Daten" }, | 351 | { "Show Dates","Zeige Daten" }, |
352 | { "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, | 352 | { "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, |
353 | { "Show Event","Termin anzeigen" }, | 353 | { "Show Event","Termin anzeigen" }, |
354 | { "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, | 354 | { "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, |
355 | { "Show Marcus Bains line","Zeige Marcus Bains Linie" }, | 355 | { "Show Marcus Bains line","Zeige Marcus Bains Linie" }, |
356 | { "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, | 356 | { "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, |
357 | { "Show time as:","Zeige Zeit als" }, | 357 | { "Show time as:","Zeige Zeit als" }, |
358 | { "Show Todo","Todo anzeigen" }, | 358 | { "Show Todo","Todo anzeigen" }, |
359 | { "Vertical screen layout(Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, | 359 | { "Vertical screen layout(Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, |
360 | { "&Show","Anzeigen" }, | 360 | { "&Show","Anzeigen" }, |
361 | { "Show...","Anzeigen..." }, | 361 | { "Show...","Anzeigen..." }, |
362 | { "Show","Anzeigen" }, | 362 | { "Show","Anzeigen" }, |
363 | { "Small","Klein" }, | 363 | { "Small","Klein" }, |
364 | { "Sorry","Tut mir leid" }, | 364 | { "Sorry","Tut mir leid" }, |
365 | {"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, | 365 | {"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, |
366 | { "Start:","Start:" }, | 366 | { "Start:","Start:" }, |
367 | { "Start Date","Start am" }, | 367 | { "Start Date","Start am" }, |
368 | { "Start date: %1","Start Datum: %1" }, | 368 | { "Start date: %1","Start Datum: %1" }, |
369 | { "Start Time","Start um" }, | 369 | { "Start Time","Start um" }, |
370 | { "Status:","Status:" }, | 370 | { "Status:","Status:" }, |
371 | { "Status","Status:" }, | 371 | { "Status","Status:" }, |
372 | { "Summaries","Titel" }, | 372 | { "Summaries","Titel" }, |
373 | { "Summary:","Titel:" }, | 373 | { "Summary:","Titel:" }, |
374 | { "Summary","Titel" }, | 374 | { "Summary","Titel" }, |
375 | { "Sunday","Sonntag" }, | 375 | { "Sunday","Sonntag" }, |
376 | { "Sun","So" }, | 376 | { "Sun","So" }, |
377 | { "Sync preferences:","Sync Einstellungen" }, | 377 | { "Sync preferences:","Sync Einstellungen" }, |
378 | { "Sync Prefs","Sync Einstellungen" }, | 378 | { "Sync Prefs","Sync Einstellungen" }, |
379 | { "Syncronize","Daten abgleich" }, | 379 | { "Syncronize","Daten abgleich" }, |
380 | { "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, | 380 | { "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, |
381 | { "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, | 381 | { "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, |
382 | { "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, | 382 | { "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, |
383 | { "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges Todo" }, | 383 | { "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges Todo" }, |
384 | { "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, | 384 | { "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, |
385 | { "Template...","Vorlage..." }, | 385 | { "Template...","Vorlage..." }, |
386 | { "This day","Dieser Tag" }, | 386 | { "This day","Dieser Tag" }, |
387 | { "This is an experimental feature. ","Dieses Feature ist experimentel" }, | 387 | { "This is an experimental feature. ","Dieses Feature ist experimentel" }, |
388 | { "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, | 388 | { "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, |
389 | { "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, | 389 | { "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, |
390 | { "Thu","Do" }, | 390 | { "Thu","Do" }, |
391 | { "Thursday","Donnerstag" }, | 391 | { "Thursday","Donnerstag" }, |
392 | { "Time associated","Mit Zeit" }, | 392 | { "Time associated","Mit Zeit" }, |
393 | { "Time bar:","Uhrzeit Zeile:" }, | 393 | { "Time bar:","Uhrzeit Zeile:" }, |
394 | { "Time && Date","Zeit und Datum" }, | 394 | { "Time && Date","Zeit und Datum" }, |
395 | { "Time Format","Zeit Format" }, | 395 | { "Time Format","Zeit Format" }, |
396 | { "Time Format(nr):","Zeit Format(Neustart!)" }, | 396 | { "Time Format(nr):","Zeit Format(Neustart!)" }, |
397 | { "Date Labels:","Datumsleiste:" }, | 397 | { "Date Labels:","Datumsleiste:" }, |
398 | { "Time: ","Zeit: " }, | 398 | { "Time: ","Zeit: " }, |
399 | { "Timezone:","Zeitzone:" }, | 399 | { "Timezone:","Zeitzone:" }, |
400 | { "To: ","Bis: " }, | 400 | { "To: ","Bis: " }, |
401 | { "To:","Bis:" }, | 401 | { "To:","Bis:" }, |
402 | { "Today: ","Heute: " }, | 402 | { "Today: ","Heute: " }, |
403 | { "Todo due today color:","Heute fällige Todos" }, | 403 | { "Todo due today color:","Heute fällige Todos" }, |
404 | { "To-do items:","To-Do items:" }, | 404 | { "To-do items:","To-Do items:" }, |
405 | { "Todo overdue color:","Überfällige Todos" }, | 405 | { "Todo overdue color:","Überfällige Todos" }, |
406 | { "Todo","Todo" }, | 406 | { "Todo","Todo" }, |
407 | { "To-do view shows completed Todos","Todo Ansicht zeigt erledigte Todos" }, | 407 | { "To-do view shows completed Todos","Todo Ansicht zeigt erledigte Todos" }, |
408 | { "ToDoView:","Todo Ansicht:" }, | 408 | { "ToDoView:","Todo Ansicht:" }, |
409 | { "Toggle Alarm","Wechsle Alarm" }, | 409 | { "Toggle Alarm","Wechsle Alarm" }, |
410 | { "Toggle Allday","Umschalten Ganztag" }, | 410 | { "Toggle Allday","Umschalten Ganztag" }, |
411 | { "Tomorrow: ","Morgen: " }, | 411 | { "Tomorrow: ","Morgen: " }, |
412 | { "Tue","Di" }, | 412 | { "Tue","Di" }, |
413 | { "Tuesday","Dienstag" }, | 413 | { "Tuesday","Dienstag" }, |
414 | { "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, | 414 | { "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, |
415 | { "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, | 415 | { "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, |
416 | { "Unknown","Unbekannt" }, | 416 | { "Unknown","Unbekannt" }, |
417 | { "Up","Hinauf" }, | 417 | { "Up","Hinauf" }, |
418 | { "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, | 418 | { "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, |
419 | { "User defined","Benutzerdefiniert" }, | 419 | { "User defined","Benutzerdefiniert" }, |
420 | { "User long date:","Format langes Datum:" }, | 420 | { "User long date:","Format langes Datum:" }, |
421 | { "User short date:","Forma kurzes Datum:" }, | 421 | { "User short date:","Forma kurzes Datum:" }, |
422 | { "View","Ansicht" }, | 422 | { "View","Ansicht" }, |
423 | { "View Fonts","Schriftarten Ansichten" }, | 423 | { "View Fonts","Schriftarten Ansichten" }, |
424 | { "Views","Ansichten" }, | 424 | { "Views","Ansichten" }, |
425 | { "Wed","Mi" }, | 425 | { "Wed","Mi" }, |
426 | { "Wednesday","Mittwoch" }, | 426 | { "Wednesday","Mittwoch" }, |
427 | { "Week %1","Woche %1" }, | 427 | { "Week %1","Woche %1" }, |
428 | { "Weekly","Wöchentlich" }, | 428 | { "Weekly","Wöchentlich" }, |
429 | { "Week starts on Sunday","Woche beginnt Sonntags" }, | 429 | { "Week starts on Sunday","Woche beginnt Sonntags" }, |
430 | { "What's Next View:","What's Next Anz." }, | 430 | { "What's Next View:","What's Next Anz." }, |
431 | { "What's next ?","Was kommt als nächstes?(What's Next)" }, | 431 | { "What's next ?","Was kommt als nächstes?(What's Next)" }, |
432 | { "Working Hours","Tägliche Arbeitszeit" }, | 432 | { "Working Hours","Tägliche Arbeitszeit" }, |
433 | { "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, | 433 | { "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, |
434 | { "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, | 434 | { "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, |
435 | { "Write back synced file","Syncronisierte Datei zurückschreiben" }, | 435 | { "Write back synced file","Syncronisierte Datei zurückschreiben" }, |
436 | { "Yearly","Jährlich" }, | 436 | { "Yearly","Jährlich" }, |
437 | { "year(s)","Jahr(e)" }, | 437 | { "year(s)","Jahr(e)" }, |
438 | { "Yes","Ja" }, | 438 | { "Yes","Ja" }, |
439 | { "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, | 439 | { "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, |
440 | { "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, | 440 | { "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, |
441 | { "week(s) on:","Woche(n) am: " }, | 441 | { "week(s) on:","Woche(n) am: " }, |
442 | { "Full menu bar(nr)","Volle Menuleiste(bn)" }, | 442 | { "Full menu bar(nr)","Volle Menuleiste(bn)" }, |
443 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, | 443 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, |
444 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, | 444 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, |
445 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, | 445 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, |
446 | { "Daylight start:","Sommerzeit Start:" }, | 446 | { "Daylight start:","Sommerzeit Start:" }, |
447 | { "Daylight end:","Sommerzeit Ende:" }, | 447 | { "Daylight end:","Sommerzeit Ende:" }, |
448 | { "Time Zone","Zeitzone" }, | 448 | { "Time Zone","Zeitzone" }, |
449 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, | 449 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, |
450 | { "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, | 450 | { "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, |
451 | { "minutely","minütlich" }, | 451 | { "minutely","minütlich" }, |
452 | { "hourly","stündlich" }, | 452 | { "hourly","stündlich" }, |
453 | { "daily","täglich" }, | 453 | { "daily","täglich" }, |
454 | { "weekly","wöchentlich" }, | 454 | { "weekly","wöchentlich" }, |
455 | { "monthly","monatlich" }, | 455 | { "monthly","monatlich" }, |
456 | { "day-monthly","tag-monatlich" }, | 456 | { "day-monthly","tag-monatlich" }, |
457 | { "month-yearly","monat-jährlich" }, | 457 | { "month-yearly","monat-jährlich" }, |
458 | { "day-yearly","tag-jährlich" }, | 458 | { "day-yearly","tag-jährlich" }, |
459 | { "position-yearly","pos-jährlich" }, | 459 | { "position-yearly","pos-jährlich" }, |
460 | { "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, | 460 | { "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, |
461 | { "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, | 461 | { "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, |
462 | { "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, | 462 | { "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, |
463 | { "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, | 463 | { "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, |
464 | { "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, | 464 | { "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, |
465 | { "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, | 465 | { "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, |
466 | { "Event list view uses full window","Listenansicht nutzt Vollbild" }, | 466 | { "Event list view uses full window","Listenansicht nutzt Vollbild" }, |
467 | { "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, | 467 | { "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, |
468 | { "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, | 468 | { "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, |
469 | { "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, | 469 | { "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, |
470 | { "ViewChange","Ansichtswechsel" }, | 470 | { "ViewChange","Ansichtswechsel" }, |
471 | { "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, | 471 | { "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, |
472 | { "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, | 472 | { "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, |
473 | { "File","Datei" }, | 473 | { "File","Datei" }, |
474 | { "Clone...","Dupliziere..." }, | 474 | { "Clone...","Dupliziere..." }, |
475 | { "Move...","Bewege..." }, | 475 | { "Move...","Bewege..." }, |
476 | { "Beam...","Sende via IR..." }, | 476 | { "Beam...","Sende via IR..." }, |
477 | { "&Clone...","Dupliziere..." }, | 477 | { "&Clone...","Dupliziere..." }, |
478 | { "&Move...","Bewege..." }, | 478 | { "&Move...","Bewege..." }, |
479 | { "&Beam...","Sende via IR..." }, | 479 | { "&Beam...","Sende via IR..." }, |
480 | { "Show Completed","Zeige erledigte Todos" }, | 480 | { "Show Completed","Zeige erledigte Todos" }, |
481 | { "Show Quick Todo","Zeige Quick-Todo" }, | 481 | { "Show Quick Todo","Zeige Quick-Todo" }, |
482 | { "Unparent Todo","Un-sub Todo" }, | 482 | { "Unparent Todo","Un-sub Todo" }, |
483 | { "Save selected to file...","Speichere Selektierte..." }, | 483 | { "Save selected to file...","Speichere Selektierte..." }, |
484 | { "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, | 484 | { "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, |
485 | { "Set Categ. for selected...","Setze Kateg. für Selekt." }, | 485 | { "Set Categ. for selected...","Setze Kateg. für Selekt." }, |
486 | { "Beam via IR...","Sende via IR..." }, | 486 | { "Beam via IR...","Sende via IR..." }, |
487 | { "Search","Suchen" }, | 487 | { "Search","Suchen" }, |
488 | { "Date Picker","Datum auswählen" }, | 488 | { "Date Picker","Datum auswählen" }, |
489 | { "Day View","Tagesansicht" }, | 489 | { "Day View","Tagesansicht" }, |
490 | { "Work Week","Arbeitswoche" }, | 490 | { "Work Week","Arbeitswoche" }, |
491 | { "Week","Wochenansicht" }, | 491 | { "Week","Wochenansicht" }, |
492 | { "Month","Monatsansicht" }, | 492 | { "Month","Monatsansicht" }, |
493 | { "Todo View","Todo Liste" }, | 493 | { "Todo View","Todo Liste" }, |
494 | { "Journal","Journal" }, | 494 | { "Journal","Journal" }, |
495 | { "Next days","Nächste Tage" }, | 495 | { "Next days","Nächste Tage" }, |
496 | { "Print agenda selection...","Drucke Agendaselektion..." }, | 496 | { "Print agenda selection...","Drucke Agendaselektion..." }, |
497 | { "Toggle DateNavigator","Navigator umschalten" }, | 497 | { "Toggle DateNavigator","Navigator umschalten" }, |
498 | { "Toggle FilterView","Filteransicht umschalten" }, | 498 | { "Toggle FilterView","Filteransicht umschalten" }, |
499 | { "Prev. month","Vorheriger Monat" }, | 499 | { "Prev. month","Vorheriger Monat" }, |
500 | { "Go backward","Gehe zurück" }, | 500 | { "Go backward","Gehe zurück" }, |
501 | { "Go forward","Gehe weiter" }, | 501 | { "Go forward","Gehe weiter" }, |
502 | { "Synchronize","Synchronisieren" }, | 502 | { "Synchronize","Synchronisieren" }, |
503 | { "AgendaSize","Agendagröße" }, | 503 | { "AgendaSize","Agendagröße" }, |
504 | { "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, | 504 | { "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, |
505 | { "Import last file","Importiere letzte Datei" }, | 505 | { "Import last file","Importiere letzte Datei" }, |
506 | { "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, | 506 | { "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, |
507 | { "Save Backup...","Speichere Backup..." }, | 507 | { "Save Backup...","Speichere Backup..." }, |
508 | { "Export VCalendar","Exportiere VCalendar" }, | 508 | { "Export VCalendar","Exportiere VCalendar" }, |
509 | { "Manage new categories...","Verwalte neue Kategorien..." }, | 509 | { "Manage new categories...","Verwalte neue Kategorien..." }, |
510 | { "Beam complete calendar...","Sende kompletten Kalender..." }, | 510 | { "Beam complete calendar...","Sende kompletten Kalender..." }, |
511 | { "Beam filtered calendar...","Sende gefilterten Kalender..." }, | 511 | { "Beam filtered calendar...","Sende gefilterten Kalender..." }, |
512 | { "Remote via ssh","Über Netzwerk via ssh" }, | 512 | { "Remote via ssh","Über Netzwerk via ssh" }, |
513 | { "With local file","Mit lokaler Datei" }, | 513 | { "With local file","Mit lokaler Datei" }, |
514 | { "With last file","Mit letzter Datei" }, | 514 | { "With last file","Mit letzter Datei" }, |
515 | { "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, | 515 | { "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, |
516 | { "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, | 516 | { "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, |
517 | { "Save filename","Speichern: Dateinamen wählen" }, | 517 | { "Save filename","Speichern: Dateinamen wählen" }, |
518 | { "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, | 518 | { "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, |
519 | { "KO/Pi: Warning!","KO/Pi: Warnung!" }, | 519 | { "KO/Pi: Warning!","KO/Pi: Warnung!" }, |
520 | { "Overwrite!","Überschreibe!" }, | 520 | { "Overwrite!","Überschreibe!" }, |
521 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 521 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
522 | { "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" }, | 522 | { "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" }, |
523 | { "KO/Pi Confirmation","KO/Pi Bestätigung" }, | 523 | { "KO/Pi Confirmation","KO/Pi Bestätigung" }, |
524 | { "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, | 524 | { "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, |
525 | { "Deleting item %d ...","Lösche Eintrag %d ..." }, | 525 | { "Deleting item %d ...","Lösche Eintrag %d ..." }, |
526 | { "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, | 526 | { "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, |
527 | { "Size","Größe" }, | 527 | { "Size","Größe" }, |
528 | { "Date","Datum" }, | 528 | { "Date","Datum" }, |
529 | { "Mime Type","Datei Typ" }, | 529 | { "Mime Type","Datei Typ" }, |
530 | { "All Files","Alle Dateien" }, | 530 | { "All Files","Alle Dateien" }, |
531 | { "Files","Dateien" }, | 531 | { "Files","Dateien" }, |
532 | { "Documents","DoKumente" }, | 532 | { "Documents","DoKumente" }, |
533 | { "Select Categories","Selektiere Kategorien" }, | 533 | { "Select Categories","Selektiere Kategorien" }, |
534 | { " &Deselect All "," Auswahl aufheben " }, | 534 | { " &Deselect All "," Auswahl aufheben " }, |
535 | { "A&dd","Hinzu" }, | 535 | { "A&dd","Hinzu" }, |
536 | { "&Modify","Ändern" }, | 536 | { "&Modify","Ändern" }, |
537 | { "Edit Categories","Editiere Kategorien" }, | 537 | { "Edit Categories","Editiere Kategorien" }, |
538 | { " &Edit Categories "," &Editiere Kategorien " }, | 538 | { " &Edit Categories "," &Editiere Kategorien " }, |
539 | { "Beam Options","Beam Einstellungen" }, | 539 | { "Beam Options","Beam Einstellungen" }, |
540 | { " With timezone "," Mit Zeitzone " }, | 540 | { " With timezone "," Mit Zeitzone " }, |
541 | { " Local time ", " Lokale Zeit " }, | 541 | { " Local time ", " Lokale Zeit " }, |
542 | { "Manage new Categories","Verwalte neue Kategorien" }, | 542 | { "Manage new Categories","Verwalte neue Kategorien" }, |
543 | { "Add to category list","Füge zur Kategorieliste hinzu" }, | 543 | { "Add to category list","Füge zur Kategorieliste hinzu" }, |
544 | { "Remove from Events/Todos","Entferne von Terminen/Todos" }, | 544 | { "Remove from Events/Todos","Entferne von Terminen/Todos" }, |
545 | { "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, | 545 | { "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, |
546 | { "File format","Datei Format" }, | 546 | { "File format","Datei Format" }, |
547 | { "Time format","Zeit Format" }, | 547 | { "Time format","Zeit Format" }, |
548 | { "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, | 548 | { "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, |
549 | { "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, | 549 | { "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, |
550 | { "h","Std" }, | 550 | { "h","Std" }, |
551 | { "min","Min" }, | 551 | { "min","Min" }, |
552 | { "hou","Std" }, | 552 | { "hou","Std" }, |
553 | { "day","Tag" }, | 553 | { "day","Tag" }, |
554 | { "French","Französich" }, | 554 | { "French","Französich" }, |
555 | { "Time","Zeit" }, | 555 | { "Time","Zeit" }, |
556 | { "Event Viewer","Termin Anzeige" }, | 556 | { "Event Viewer","Termin Anzeige" }, |
557 | { "Cancel Sync","Sync Abbrechen" }, | 557 | { "Cancel Sync","Sync Abbrechen" }, |
558 | { "Remote","Fern" }, | 558 | { "Remote","Fern" }, |
559 | { "Local","Lokal" }, | 559 | { "Local","Lokal" }, |
560 | { "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, | 560 | { "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, |
561 | { "Local: ","Lokal: " }, | 561 | { "Local: ","Lokal: " }, |
562 | { "Remote: ","Fern: " }, | 562 | { "Remote: ","Fern: " }, |
563 | { "Last modified: ","Zuletzt geändert: " }, | 563 | { "Last modified: ","Zuletzt geändert: " }, |
564 | { "Location: ","Ort: " }, | 564 | { "Location: ","Ort: " }, |
565 | { "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, | 565 | { "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, |
566 | { "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, | 566 | { "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, |
567 | { "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, | 567 | { "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, |
568 | { "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, | 568 | { "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, |
569 | { "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, | 569 | { "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, |
570 | { "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, | 570 | { "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, |
571 | { "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, | 571 | { "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, |
572 | { "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, | 572 | { "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, |
573 | { "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, | 573 | { "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, |
574 | { "( %1 min before )","( %1 min vorher )" }, | 574 | { "( %1 min before )","( %1 min vorher )" }, |
575 | { "<b>Alarm on: ","<b>Alarm am: " }, | 575 | { "<b>Alarm on: ","<b>Alarm am: " }, |
576 | { "<b>Details: </b>","<b>Details: </b>" }, | 576 | { "<b>Details: </b>","<b>Details: </b>" }, |
577 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, | 577 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, |
578 | { "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, | 578 | { "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, |
579 | { "Organizer","Organisator" }, | 579 | { "Organizer","Organisator" }, |
580 | { "Save","Speichern" }, | 580 | { "Save","Speichern" }, |
581 | { "Exit (+save)","Beenden(+speichern)" }, | 581 | { "Exit (+save)","Beenden(+speichern)" }, |
582 | { "Home","Zuhause" }, | 582 | { "Home","Zuhause" }, |
583 | { "Office","Büro" }, | 583 | { "Office","Büro" }, |
584 | { "Library","Bibliothek" }, | 584 | { "Library","Bibliothek" }, |
585 | { "Doctor","Arzt" }, | 585 | { "Doctor","Arzt" }, |
586 | { "Beach","Strand" }, | 586 | { "Beach","Strand" }, |
587 | { "Conference room","Konferenzraum" }, | 587 | { "Conference room","Konferenzraum" }, |
588 | { "Drive Home","Heimfahrt" }, | 588 | { "Drive Home","Heimfahrt" }, |
589 | { "Watch TV","Tv gucken" }, | 589 | { "Watch TV","Tv gucken" }, |
590 | { "Phone call","Telefonanruf" }, | 590 | { "Phone call","Telefonanruf" }, |
591 | { "Pay bill","Rechnung bezahlen" }, | 591 | { "Pay bill","Rechnung bezahlen" }, |
592 | { "Read book","Buch lesen" }, | 592 | { "Read book","Buch lesen" }, |
593 | { "Watering plants","Pflanzen giessen" }, | 593 | { "Watering plants","Pflanzen giessen" }, |
594 | {"Appointment","Verabredung" }, | 594 | {"Appointment","Verabredung" }, |
595 | {"Birthday","Geburtstag" }, | 595 | {"Birthday","Geburtstag" }, |
596 | {"Business","Geschäft" }, | 596 | {"Business","Geschäft" }, |
597 | {"Business Travel","Geschäftsreise" }, | 597 | {"Business Travel","Geschäftsreise" }, |
598 | {"Cinema","Kino" }, | 598 | {"Cinema","Kino" }, |
599 | {"Customer","Kunde" }, | 599 | {"Customer","Kunde" }, |
600 | {"Break","Pause" }, | 600 | {"Break","Pause" }, |
601 | {"Breakfast","Frühstück" }, | 601 | {"Breakfast","Frühstück" }, |
602 | {"Competition","Wettkampf" }, | 602 | {"Competition","Wettkampf" }, |
603 | {"Dinner","Abendessen" }, | 603 | {"Dinner","Abendessen" }, |
604 | {"Education","Erziehung" }, | 604 | {"Education","Erziehung" }, |
605 | {"Family","Familie" }, | 605 | {"Family","Familie" }, |
606 | {"Favorites","Favoriten" }, | 606 | {"Favorites","Favoriten" }, |
607 | {"Festival","Festival" }, | 607 | {"Festival","Festival" }, |
608 | {"Fishing","Angeln" }, | 608 | {"Fishing","Angeln" }, |
609 | {"Flight","Flug" }, | 609 | {"Flight","Flug" }, |
610 | {"Gifts","Geschenk" }, | 610 | {"Gifts","Geschenk" }, |
611 | {"Holiday","Feiertag" }, | 611 | {"Holiday","Feiertag" }, |
612 | {"Holiday Cards","Ansichtskarten" }, | 612 | {"Holiday Cards","Ansichtskarten" }, |
613 | {"Hot Contacts","Heisse Kontakte" }, | 613 | {"Hot Contacts","Heisse Kontakte" }, |
614 | {"Hiking","Wandern" }, | 614 | {"Hiking","Wandern" }, |
615 | {"Hunting","Jagen" }, | 615 | {"Hunting","Jagen" }, |
616 | {"Key Customer","Wichtiger Kunde" }, | 616 | {"Key Customer","Wichtiger Kunde" }, |
617 | {"Kids","Kinder" }, | 617 | {"Kids","Kinder" }, |
618 | {"Lunch","Mittagessen" }, | 618 | {"Lunch","Mittagessen" }, |
619 | {"Meeting","Treffen" }, | 619 | {"Meeting","Treffen" }, |
620 | {"Miscellaneous","Verschiedenes" }, | 620 | {"Miscellaneous","Verschiedenes" }, |
621 | {"Partner","Partner" }, | 621 | {"Partner","Partner" }, |
622 | {"Party","Partie" }, | 622 | {"Party","Partie" }, |
623 | {"Personal","Privat" }, | 623 | {"Personal","Privat" }, |
624 | {"Personal Travel","Privatreise"}, | 624 | {"Personal Travel","Privatreise"}, |
625 | {"PHB","PHB" }, | 625 | {"PHB","PHB" }, |
626 | {"Phone Calls","Telefonanruf" }, | 626 | {"Phone Calls","Telefonanruf" }, |
627 | {"Projects","Projekt" }, | 627 | {"Projects","Projekt" }, |
628 | {"Recurring","Wiederholend" }, | 628 | {"Recurring","Wiederholend" }, |
629 | {"School","Schule" }, | 629 | {"School","Schule" }, |
630 | {"Shopping","Einkaufen" }, | 630 | {"Shopping","Einkaufen" }, |
631 | {"Speach","Rede" }, | 631 | {"Speach","Rede" }, |
632 | {"Special Occasion","Spez.Gelegenheit" }, | 632 | {"Special Occasion","Spez.Gelegenheit" }, |
633 | {"Sports","Sport" }, | 633 | {"Sports","Sport" }, |
634 | {"Talk","Vortrag" }, | 634 | {"Talk","Vortrag" }, |
635 | {"Travel","Reise" }, | 635 | {"Travel","Reise" }, |
636 | {"TV","TV" }, | 636 | {"TV","TV" }, |
637 | {"Germany","Deutschland" }, | 637 | {"Germany","Deutschland" }, |
638 | {"Sweden","Schweden" }, | 638 | {"Sweden","Schweden" }, |
639 | {"Forest","Wald" }, | 639 | {"Forest","Wald" }, |
640 | { "Desert","Wüste" }, | 640 | { "Desert","Wüste" }, |
641 | { "Kitchen","Küche" }, | 641 | { "Kitchen","Küche" }, |
642 | { "Lake","See" }, | 642 | { "Lake","See" }, |
643 | {"University","Universität"}, | 643 | {"University","Universität"}, |
644 | {"Vacation","Urlaub" }, | 644 | {"Vacation","Urlaub" }, |
645 | {"VIP","VIP" }, | 645 | {"VIP","VIP" }, |
646 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, | 646 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, |
647 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, | 647 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, |
648 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, | 648 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, |
649 | { "Cancelled","Gecancelt" }, | 649 | { "Cancelled","Gecancelt" }, |
650 | { "Multiple sync","Mehrfach Sync" }, | 650 | { "Multiple sync","Mehrfach Sync" }, |
651 | { "Local file","Lokale Datei" }, | 651 | { "Local file","Lokale Datei" }, |
652 | { "Last file","Letzte Datei" }, | 652 | { "Last file","Letzte Datei" }, |
653 | { "Keys + Colors...","Tasten + Farben..." }, | 653 | { "Keys + Colors...","Tasten + Farben..." }, |
654 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, | 654 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, |
655 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, | 655 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, |
656 | { "Choose...","Wähle..." }, | 656 | { "Choose...","Wähle..." }, |
657 | { "Use colors for application:","Setze Farben für Programm:" }, | 657 | { "Use colors for application:","Setze Farben für Programm:" }, |
658 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, | 658 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, |
659 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, | 659 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, |
660 | { "Show parent To-Do's","Zeige Ober-Todos" }, | 660 | { "Show parent To-Do's","Zeige Ober-Todos" }, |
661 | { "Show location","Zeige Orte" }, | 661 | { "Show location","Zeige Orte" }, |
662 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, | 662 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, |
663 | { "Show in every cell ","Zeige in jeder Zelle " }, | 663 | { "Show in every cell ","Zeige in jeder Zelle " }, |
664 | { "short month","kurzen Monat" }, | 664 | { "short month","kurzen Monat" }, |
665 | { "icons","Icons" }, | 665 | { "icons","Icons" }, |
666 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, | 666 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, |
667 | { "Category colors are applied to text","Kategorie Farben färben Text" }, | 667 | { "Category colors are applied to text","Kategorie Farben färben Text" }, |
668 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, | 668 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, |
669 | { "Day color odd months","Tagesfarbe ungerade Monate" }, | 669 | { "Day color odd months","Tagesfarbe ungerade Monate" }, |
670 | { "Day color even months","Tagesfarbe gerade Monate" }, | 670 | { "Day color even months","Tagesfarbe gerade Monate" }, |
671 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, | 671 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, |
672 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, | 672 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, |
673 | { "Small To-do view uses smaller font","Kleine Todo Ansicht nutzt kleineren Font" }, | 673 | { "Small To-do view uses smaller font","Kleine Todo Ansicht nutzt kleineren Font" }, |
674 | { "Colors are applied to text","Farben werden auf Text angewendet" }, | 674 | { "Colors are applied to text","Farben werden auf Text angewendet" }, |
675 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, | 675 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, |
676 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, | 676 | { "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, |
677 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, | 677 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, |
678 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, | 678 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, |
679 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, | 679 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, |
680 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, | 680 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, |
681 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, | 681 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, |
682 | { "New profile","Neues Profil" }, | 682 | { "New profile","Neues Profil" }, |
683 | { "Clone profile","Klone Profil" }, | 683 | { "Clone profile","Klone Profil" }, |
684 | { "Delete profile","Lösche Profil" }, | 684 | { "Delete profile","Lösche Profil" }, |
685 | { "Profile:","Profil:" }, | 685 | { "Profile:","Profil:" }, |
686 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, | 686 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, |
687 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, | 687 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, |
688 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, | 688 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, |
689 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, | 689 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, |
690 | { "Write back file","Schreibe Datei zurück" }, | 690 | { "Write back file","Schreibe Datei zurück" }, |
691 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, | 691 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, |
692 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, | 692 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, |
693 | { "Local device name:","Name dieses Gerätes:" }, | 693 | { "Local device name:","Name dieses Gerätes:" }, |
694 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, | 694 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, |
695 | { "Sync preferences","Synchronisations Einstellungen" }, | 695 | { "Sync preferences","Synchronisations Einstellungen" }, |
696 | { "Profile kind","Profil Art" }, | 696 | { "Profile kind","Profil Art" }, |
697 | { "Local file","Lokale Datei" }, | 697 | { "Local file","Lokale Datei" }, |
698 | { "Local file:","Lokale Datei:" }, | 698 | { "Local file:","Lokale Datei:" }, |
699 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, | 699 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, |
700 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, | 700 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, |
701 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, | 701 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, |
702 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, | 702 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, |
703 | { "Device","Gerät:" }, | 703 | { "Device","Gerät:" }, |
704 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, | 704 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, |
705 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, | 705 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, |
706 | { "Synchronization successful","Synchronisation erfolgreich" }, | 706 | { "Synchronization successful","Synchronisation erfolgreich" }, |
707 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, | 707 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, |
708 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, | 708 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, |
709 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, | 709 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, |
710 | { "Enter password","Passwort eingeben" }, | 710 | { "Enter password","Passwort eingeben" }, |
711 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, | 711 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, |
712 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, | 712 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, |
713 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, | 713 | { "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, |
714 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, | 714 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, |
715 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, | 715 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, |
716 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, | 716 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, |
717 | { "Enter filter name:","Neuer Filter Name:" }, | 717 | { "Enter filter name:","Neuer Filter Name:" }, |
718 | { "Add Filter","Filter hinzufügen" }, | 718 | { "Add Filter","Filter hinzufügen" }, |
719 | { "Question","Frage" }, | 719 | { "Question","Frage" }, |
720 | { "Filter position: ","Filter Position: " }, | 720 | { "Filter position: ","Filter Position: " }, |
721 | { "Month View","Monatsansicht" }, | 721 | { "Month View","Monatsansicht" }, |
722 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, | 722 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, |
723 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, | 723 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, |
724 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, | 724 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, |
725 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, | 725 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, |
726 | { "Access: ","Zugriff: " }, | 726 | { "Access: ","Zugriff: " }, |
727 | { "Needs Action","Aktion notwendig" }, | 727 | { "Needs Action","Aktion notwendig" }, |
728 | { "Accepted","Akzeptiert" }, | 728 | { "Accepted","Akzeptiert" }, |
729 | { "Declined","Abgelehnt" }, | 729 | { "Declined","Abgelehnt" }, |
730 | { "Tentative","Vorläufig" }, | 730 | { "Tentative","Vorläufig" }, |
731 | { "Delegated","Beauftragt" }, | 731 | { "Delegated","Beauftragt" }, |
732 | { "Completed","Vollständig" }, | 732 | { "Completed","Vollständig" }, |
733 | { "In Process","In Bearbeitung" }, | 733 | { "In Process","In Bearbeitung" }, |
734 | { "Participant","Teilnehmer" }, | 734 | { "Participant","Teilnehmer" }, |
735 | { "Optional Participant","Möglicher Teilnehmer" }, | 735 | { "Optional Participant","Möglicher Teilnehmer" }, |
736 | { "Observer","Beobachter" }, | 736 | { "Observer","Beobachter" }, |
737 | { "Chair","Vorsitzender" }, | 737 | { "Chair","Vorsitzender" }, |
738 | { "Not supported \non desktop!\n","" }, | 738 | { "Not supported \non desktop!\n","" }, |
739 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, | 739 | { "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, |
740 | { "Date range: ","Datums Zeitspanne: " }, | 740 | { "Date range: ","Datums Zeitspanne: " }, |
741 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, | 741 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, |
742 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, | 742 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, |
743 | { "Add / remove events","Add./entferne Termine" }, | 743 | { "Add / remove events","Add./entferne Termine" }, |
744 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, | 744 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, |
745 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, | 745 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, |
746 | { "Overwrite","Überschreiben" }, | 746 | { "Overwrite","Überschreiben" }, |
747 | { "Sync+save","Syncen+speichern" }, | 747 | { "Sync+save","Syncen+speichern" }, |
748 | { "Default","Standard" }, | 748 | { "Default","Standard" }, |
749 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, | 749 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, |
750 | { " %d items?"," %d Einträge?" }, | 750 | { " %d items?"," %d Einträge?" }, |
751 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, | 751 | { "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, |
752 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, | 752 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, |
753 | { "Current","Aktuelle" }, | 753 | { "Current","Aktuelle" }, |
754 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, | 754 | { "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, |
755 | { "All","Alle" }, | 755 | { "All","Alle" }, |
756 | { "Data Loss Warning","Datenverlust Warnung" }, | 756 | { "Data Loss Warning","Datenverlust Warnung" }, |
757 | { "Proceed","Weitermachen" }, | 757 | { "Proceed","Weitermachen" }, |
758 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, | 758 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, |
759 | { "Filter disabled ","Filter abgeschaltet" }, | 759 | { "Filter disabled ","Filter abgeschaltet" }, |
760 | { "Filter selected: ","Gewählter Filter: " }, | 760 | { "Filter selected: ","Gewählter Filter: " }, |
761 | { "Toggle Cancel","Gecancelt ändern" }, | 761 | { "Toggle Cancel","Gecancelt ändern" }, |
762 | { "&Toggle Cancel","Gecancel&t ändern" }, | 762 | { "&Toggle Cancel","Gecancel&t ändern" }, |
763 | { "Configure Toolbar","Konfiguriere Toolbar" }, | 763 | { "Configure Toolbar","Konfiguriere Toolbar" }, |
764 | { "Stretched TB","Gedehnte TB" }, | 764 | { "Stretched TB","Gedehnte TB" }, |
765 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, | 765 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, |
766 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, | 766 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, |
767 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, | 767 | { "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, |
768 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, | 768 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, |
769 | { "Imported file successfully","Datei erfolgreich importiert" }, | 769 | { "Imported file successfully","Datei erfolgreich importiert" }, |
770 | { "Error importing file","Fehler beim Importieren der Datei" }, | 770 | { "Error importing file","Fehler beim Importieren der Datei" }, |
771 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, | 771 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, |
772 | { "Export iCal filename(*.ics)","Export iCal Dateiname(*.ics)" }, | ||
772 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, | 773 | { "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, |
773 | { "Overwrite!","Überschreiben!" }, | 774 | { "Overwrite!","Überschreiben!" }, |
774 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, | 775 | { "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, |
775 | { "Load backup filename","Lade Backup Dateiname" }, | 776 | { "Load backup filename","Lade Backup Dateiname" }, |
776 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, | 777 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, |
777 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, | 778 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, |
778 | { "Save backup filename","Speichere Backup Dateiname" }, | 779 | { "Save backup filename","Speichere Backup Dateiname" }, |
779 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, | 780 | { "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, |
780 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 781 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
781 | { "Details of attendee","Teilnehmerdetails" }, | 782 | { "Details of attendee","Teilnehmerdetails" }, |
782 | { "Work phone:\n","Telefon Arbeit:\n" }, | 783 | { "Work phone:\n","Telefon Arbeit:\n" }, |
783 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, | 784 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, |
784 | { "Home phone:\n","Telefon privat:\n" }, | 785 | { "Home phone:\n","Telefon privat:\n" }, |
785 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, | 786 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, |
786 | { "Email:\n","Email:\n" }, | 787 | { "Email:\n","Email:\n" }, |
787 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, | 788 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, |
788 | { "Audio Al.: ","Audio Al.: " }, | 789 | { "Audio Al.: ","Audio Al.: " }, |
789 | { "Proc.Al.: ","Proz.Al.: " }, | 790 | { "Proc.Al.: ","Proz.Al.: " }, |
790 | { "No sound set","Kein Sound definiert" }, | 791 | { "No sound set","Kein Sound definiert" }, |
791 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, | 792 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, |
792 | { "No program set","Kein Programm definiert" }, | 793 | { "No program set","Kein Programm definiert" }, |
793 | { "Running '%1'","Ausführen '%1'" }, | 794 | { "Running '%1'","Ausführen '%1'" }, |
794 | { "Playing '%1'","Abspielen '%1'" }, | 795 | { "Playing '%1'","Abspielen '%1'" }, |
795 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, | 796 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, |
796 | { "Load!","Laden!" }, | 797 | { "Load!","Laden!" }, |
797 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, | 798 | { "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, |
798 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, | 799 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, |
799 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, | 800 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, |
800 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, | 801 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, |
801 | { "Features + hints...","Eigenschaften + Tipps..." }, | 802 | { "Features + hints...","Eigenschaften + Tipps..." }, |
802 | { "User translation...","Benutzer Übersetzung..." }, | 803 | { "User translation...","Benutzer Übersetzung..." }, |
803 | { "Sync HowTo...","Synchronisation HowTo..." }, | 804 | { "Sync HowTo...","Synchronisation HowTo..." }, |
804 | { "Print calendar...","Drucke Kalender..." }, | 805 | { "Print calendar...","Drucke Kalender..." }, |
805 | { "Anniversary","Jahrestag" }, | 806 | { "Anniversary","Jahrestag" }, |
806 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, | 807 | { "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, |
807 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, | 808 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, |
808 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, | 809 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, |
809 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, | 810 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, |
810 | { "<b>Access: </b>","<b>Zugriff: </b>" }, | 811 | { "<b>Access: </b>","<b>Zugriff: </b>" }, |
811 | { "(%1 min before)","(%1 min vorher)" }, | 812 | { "(%1 min before)","(%1 min vorher)" }, |
812 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, | 813 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, |
813 | { "Save Journal/Description...","Speichere Journal/Details..." }, | 814 | { "Save Journal/Description...","Speichere Journal/Details..." }, |
814 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, | 815 | { "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, |
815 | { "Continue","Weitermachen" }, | 816 | { "Continue","Weitermachen" }, |
816 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, | 817 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, |
817 | { "Attendee:","Teilnehmer:" }, | 818 | { "Attendee:","Teilnehmer:" }, |
818 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, | 819 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, |
819 | { "On day ","Am Tag " }, | 820 | { "On day ","Am Tag " }, |
820 | { "%1 of ","%1 des Monats" }, | 821 | { "%1 of ","%1 des Monats" }, |
821 | { "%1 of the year","%1 des Jahres" }, | 822 | { "%1 of the year","%1 des Jahres" }, |
822 | { "Anonymous","Anonymo" }, | 823 | { "Anonymous","Anonymo" }, |
823 | { "nobody@nowhere","niemand@nirgendwo" }, | 824 | { "nobody@nowhere","niemand@nirgendwo" }, |
824 | { "calendar.html","calendar.html" }, | 825 | { "calendar.html","calendar.html" }, |
825 | { " Local Time"," Lokale Zeit" }, | 826 | { " Local Time"," Lokale Zeit" }, |
826 | { "Unknown Name","Unbekannter Name" }, | 827 | { "Unknown Name","Unbekannter Name" }, |
827 | { "unknown@nowhere","unbekannt@nirgendwo" }, | 828 | { "unknown@nowhere","unbekannt@nirgendwo" }, |
828 | { "Beam via IR!","Beam via IR!" }, | 829 | { "Beam via IR!","Beam via IR!" }, |
829 | { "Next Month","Nächster Monat" }, | 830 | { "Next Month","Nächster Monat" }, |
830 | { "Prio","Prio" }, | 831 | { "Prio","Prio" }, |
831 | { "Reparent Todo","Mache Sub-Todo" }, | 832 | { "Reparent Todo","Mache Sub-Todo" }, |
832 | { "tomorrow","morgen" }, | 833 | { "tomorrow","morgen" }, |
833 | { "today","heute" }, | 834 | { "today","heute" }, |
834 | { "yesterday","gestern" }, | 835 | { "yesterday","gestern" }, |
835 | { "Ok","Ok" }, | 836 | { "Ok","Ok" }, |
836 | { "Ok+Agenda","Ok+Agenda" }, | 837 | { "Ok+Agenda","Ok+Agenda" }, |
837 | { "Email","Email" }, | 838 | { "Email","Email" }, |
838 | { "RSVP","RSVP" }, | 839 | { "RSVP","RSVP" }, |
839 | { "Email:","Email:" }, | 840 | { "Email:","Email:" }, |
840 | { "Appointment Time ","Termin Zeit " }, | 841 | { "Appointment Time ","Termin Zeit " }, |
841 | { "2","2" }, | 842 | { "2","2" }, |
842 | { "3","3" }, | 843 | { "3","3" }, |
843 | { "4","4" }, | 844 | { "4","4" }, |
844 | { " 0 %"," 0 %" }, | 845 | { " 0 %"," 0 %" }, |
845 | { " 20 %"," 20 %" }, | 846 | { " 20 %"," 20 %" }, |
846 | { " 40 %"," 40 %" }, | 847 | { " 40 %"," 40 %" }, |
847 | { " 60 %"," 60 %" }, | 848 | { " 60 %"," 60 %" }, |
848 | { " 80 %"," 80 %" }, | 849 | { " 80 %"," 80 %" }, |
849 | { "100 %","100 %" }, | 850 | { "100 %","100 %" }, |
850 | { "Filter","Filter" }, | 851 | { "Filter","Filter" }, |
851 | { "Configure","Konfiguriere" }, | 852 | { "Configure","Konfiguriere" }, |
852 | { "What's Next","What's Next" }, | 853 | { "What's Next","What's Next" }, |
853 | { "Complete calendar...","Kompletten Kalender..." }, | 854 | { "Complete calendar...","Kompletten Kalender..." }, |
854 | { "Filtered calendar...","Gefilterten Kalender..." }, | 855 | { "Filtered calendar...","Gefilterten Kalender..." }, |
855 | { "Export to phone","Exportiere zum Handy" }, | 856 | { "Export to phone","Exportiere zum Handy" }, |
856 | { "Beam receive enabled","Beam Empfang an" }, | 857 | { "Beam receive enabled","Beam Empfang an" }, |
857 | { "What's new?","Was ist neu?" }, | 858 | { "What's new?","Was ist neu?" }, |
858 | { "FAQ...","FAQ..." }, | 859 | { "FAQ...","FAQ..." }, |
859 | { "Licence...","Licence..." }, | 860 | { "Licence...","Licence..." }, |
860 | { "What's This?","What's This?" }, | 861 | { "What's This?","What's This?" }, |
861 | { "&Edit...","Bearbeite..." }, | 862 | { "&Edit...","Bearbeite..." }, |
862 | { "Oktober","Oktober" }, | 863 | { "Oktober","Oktober" }, |
863 | { "Title","Titel" }, | 864 | { "Title","Titel" }, |
864 | { "%1 %","%1 %" }, | 865 | { "%1 %","%1 %" }, |
865 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, | 866 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, |
866 | { "Import!","Importiere!" }, | 867 | { "Import!","Importiere!" }, |
867 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, | 868 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, |
868 | { "Export to phone options","Export ans Handy Optionen" }, | 869 | { "Export to phone options","Export ans Handy Optionen" }, |
869 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, | 870 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, |
870 | { "I/O device: ","I/O device: " }, | 871 | { "I/O device: ","I/O device: " }, |
871 | { "Connection: ","Connection: " }, | 872 | { "Connection: ","Connection: " }, |
872 | { "Model(opt.): ","Model(opt.): " }, | 873 | { "Model(opt.): ","Model(opt.): " }, |
873 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, | 874 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, |
874 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, | 875 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, |
875 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, | 876 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, |
876 | { "Export to mobile phone!","Exportiere auf das Handy!" }, | 877 | { "Export to mobile phone!","Exportiere auf das Handy!" }, |
877 | { "Export complete calendar","Exportiere kompletten Kalender" }, | 878 | { "Export complete calendar","Exportiere kompletten Kalender" }, |
878 | { "Writing to phone...","Sende Daten ans Handy..." }, | 879 | { "Writing to phone...","Sende Daten ans Handy..." }, |
879 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, | 880 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, |
880 | { "Retry","Nochmal versuchen" }, | 881 | { "Retry","Nochmal versuchen" }, |
881 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, | 882 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, |
882 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, | 883 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, |
883 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, | 884 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, |
884 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, | 885 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, |
885 | { "Preferences","Vorlieben" }, | 886 | { "Preferences","Vorlieben" }, |
886 | { "Global","Global" }, | 887 | { "Global","Global" }, |
887 | { "Phone","Phone" }, | 888 | { "Phone","Phone" }, |
888 | { "SMS","SMS" }, | 889 | { "SMS","SMS" }, |
889 | { "Fax","Fax" }, | 890 | { "Fax","Fax" }, |
890 | { "Pager","Pager" }, | 891 | { "Pager","Pager" }, |
891 | { "SIP","SIP" }, | 892 | { "SIP","SIP" }, |
892 | { "Italian","Italienisch" }, | 893 | { "Italian","Italienisch" }, |
893 | { "24:00","24:00" }, | 894 | { "24:00","24:00" }, |
894 | { "12:00am","12:00am" }, | 895 | { "12:00am","12:00am" }, |
895 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, | 896 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, |
896 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, | 897 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, |
897 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, | 898 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, |
898 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, | 899 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, |
899 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, | 900 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, |
900 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, | 901 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, |
901 | { "Used Mail Client","Benutzter Mail Client" }, | 902 | { "Used Mail Client","Benutzter Mail Client" }, |
902 | { "Channel:","Channel:" }, | 903 | { "Channel:","Channel:" }, |
903 | { "Message:","Message:" }, | 904 | { "Message:","Message:" }, |
904 | { "Parameters:","Parameter:" }, | 905 | { "Parameters:","Parameter:" }, |
905 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, | 906 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, |
906 | { "extra Message:","extra Message:" }, | 907 | { "extra Message:","extra Message:" }, |
907 | { "extra Parameters:","extra Parameter:" }, | 908 | { "extra Parameters:","extra Parameter:" }, |
908 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, | 909 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, |
909 | { "External Apps.","Externe Appl." }, | 910 | { "External Apps.","Externe Appl." }, |
910 | { "24 hours","24 Std." }, | 911 | { "24 hours","24 Std." }, |
911 | { "3 hours","3 Std." }, | 912 | { "3 hours","3 Std." }, |
912 | { "1 hour","1 Std." }, | 913 | { "1 hour","1 Std." }, |
913 | { "15 minutes","15 Min." }, | 914 | { "15 minutes","15 Min." }, |
914 | { "5 minutes","5 Min." }, | 915 | { "5 minutes","5 Min." }, |
915 | { "1 minute","1 Min." }, | 916 | { "1 minute","1 Min." }, |
916 | { "23","23" }, | 917 | { "23","23" }, |
917 | { "Mon 15","Mon 15" }, | 918 | { "Mon 15","Mon 15" }, |
918 | { "Configure KO","Konfiguriere KO" }, | 919 | { "Configure KO","Konfiguriere KO" }, |
919 | { "Event text","Termin Text" }, | 920 | { "Event text","Termin Text" }, |
920 | { "ToDo","Todo" }, | 921 | { "ToDo","Todo" }, |
921 | { "Today","Heute" }, | 922 | { "Today","Heute" }, |
922 | { "What's Next View","What's Next Ansicht" }, | 923 | { "What's Next View","What's Next Ansicht" }, |
923 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, | 924 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, |
924 | { "Alarm","Alarm" }, | 925 | { "Alarm","Alarm" }, |
925 | { "Used %1 Client","Benutzter %1 Client" }, | 926 | { "Used %1 Client","Benutzter %1 Client" }, |
926 | { "No email client installed","Kein Email Klient installiert" }, | 927 | { "No email client installed","Kein Email Klient installiert" }, |
927 | { "Userdefined email client","Benutzerdef. Email Klient" }, | 928 | { "Userdefined email client","Benutzerdef. Email Klient" }, |
928 | { "OM/Pi email client","OM/Pi Email Klient" }, | 929 | { "OM/Pi email client","OM/Pi Email Klient" }, |
929 | { "Include in multiple ","Beziehe in multiple " }, | 930 | { "Include in multiple ","Beziehe in multiple " }, |
930 | { "calendar ","Kalender " }, | 931 | { "calendar ","Kalender " }, |
931 | { "addressbook ","Adressbuch " }, | 932 | { "addressbook ","Adressbuch " }, |
932 | { "pwmanager","PWmanager" }, | 933 | { "pwmanager","PWmanager" }, |
933 | { " sync"," Sync ein" }, | 934 | { " sync"," Sync ein" }, |
934 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, | 935 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, |
935 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, | 936 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, |
936 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, | 937 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, |
937 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, | 938 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, |
938 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, | 939 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, |
939 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, | 940 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, |
940 | { "Help...","Hilfe..." }, | 941 | { "Help...","Hilfe..." }, |
941 | { "Local file Cal:","Lokale Datei Kal:" }, | 942 | { "Local file Cal:","Lokale Datei Kal:" }, |
942 | { "Local file ABook:","Lokale Datei ABuch:" }, | 943 | { "Local file ABook:","Lokale Datei ABuch:" }, |
943 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, | 944 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, |
944 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, | 945 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, |
945 | { "Calendar:","Kalender:" }, | 946 | { "Calendar:","Kalender:" }, |
946 | { "AddressBook:","AdressBuch:" }, | 947 | { "AddressBook:","AdressBuch:" }, |
947 | { "PWManager:","PWManager:" }, | 948 | { "PWManager:","PWManager:" }, |
948 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, | 949 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, |
949 | { "ssh/scp","ssh/scp" }, | 950 | { "ssh/scp","ssh/scp" }, |
950 | { "ftp","ftp" }, | 951 | { "ftp","ftp" }, |
951 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, | 952 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, |
952 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, | 953 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, |
953 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, | 954 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, |
954 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, | 955 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, |
955 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, | 956 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, |
956 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, | 957 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, |
957 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, | 958 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, |
958 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, | 959 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, |
959 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, | 960 | { "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, |
960 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, | 961 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, |
961 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, | 962 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, |
962 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, | 963 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, |
963 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, | 964 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, |
964 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, | 965 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, |
965 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen "Multi-Syncen"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, | 966 | { "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen "Multi-Syncen"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, |
966 | { "KDE-Pim Sync","KDE-Pim Sync" }, | 967 | { "KDE-Pim Sync","KDE-Pim Sync" }, |
967 | { "Multiple profiles","Multi-Sync Profile" }, | 968 | { "Multiple profiles","Multi-Sync Profile" }, |
968 | { "Device: ","Gerät: " }, | 969 | { "Device: ","Gerät: " }, |
969 | { "Multiple sync started.","Multi-Sync gestartet." }, | 970 | { "Multiple sync started.","Multi-Sync gestartet." }, |
970 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, | 971 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, |
971 | { "Turn filter on","Schalte Filter an" }, | 972 | { "Turn filter on","Schalte Filter an" }, |
972 | { "Turn filter off","Schalte Filter aus" }, | 973 | { "Turn filter off","Schalte Filter aus" }, |
973 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, | 974 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, |
974 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, | 975 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, |
975 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, | 976 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, |
976 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, | 977 | { "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, |
977 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, | 978 | { "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, |
978 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, | 979 | { "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, |
979 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, | 980 | { "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, |
980 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, | 981 | { "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, |
981 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, | 982 | { "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, |
982 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, | 983 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, |
983 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, | 984 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, |
984 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, | 985 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, |
985 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, | 986 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, |
986 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, | 987 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, |
987 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, | 988 | { "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, |
988 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, | 989 | { "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, |
989 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, | 990 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, |
990 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, | 991 | { "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, |
991 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, | 992 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, |
992 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, | 993 | { "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, |
993 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, | 994 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, |
994 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, | 995 | { "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, |
995 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, | 996 | { "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, |
996 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, | 997 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, |
997 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, | 998 | { "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, |
998 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, | 999 | { "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, |
999 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, | 1000 | { "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, |
1000 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, | 1001 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, |
1001 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, | 1002 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, |
1002 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, | 1003 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, |
1003 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, | 1004 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, |
1004 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, | 1005 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, |
1005 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, | 1006 | { "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, |
1006 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, | 1007 | { "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, |
1007 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, | 1008 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, |
1008 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, | 1009 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, |
1009 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, | 1010 | { "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, |
1010 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, | 1011 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, |
1011 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, | 1012 | { "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, |
1012 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, | 1013 | { "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, |
1013 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, | 1014 | { "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, |
1014 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, | 1015 | { "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, |
1015 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, | 1016 | { "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, |
1016 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, | 1017 | { "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, |
1017 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, | 1018 | { "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, |
1018 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, | 1019 | { "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, |
1019 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, | 1020 | { "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, |
1020 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, | 1021 | { "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, |
1021 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, | 1022 | { "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, |
1022 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1023 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1023 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, | 1024 | { "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, |
1024 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1025 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1025 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1026 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1026 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1027 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1027 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, | 1028 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, |
1028 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, | 1029 | { "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, |
1029 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, | 1030 | { "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, |
1030 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1031 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1031 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1032 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1032 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, | 1033 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, |
1033 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1034 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1034 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1035 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1035 | { "From: ","Von: " }, | 1036 | { "From: ","Von: " }, |
1036 | { "Remove sync info","Entferne Sync Info" }, | 1037 | { "Remove sync info","Entferne Sync Info" }, |
1037 | { "For all profiles","Für alle Profile" }, | 1038 | { "For all profiles","Für alle Profile" }, |
1038 | { "Hide not Running","Verstecke nicht Laufende" }, | 1039 | { "Hide not Running","Verstecke nicht Laufende" }, |
1039 | { "ME","ME" }, | 1040 | { "ME","ME" }, |
1040 | { "Toolbar","Toolbar" }, | 1041 | { "Toolbar","Toolbar" }, |
1041 | { "Undo Delete...","UNDO Löschen..." }, | 1042 | { "Undo Delete...","UNDO Löschen..." }, |
1042 | { "Undo Delete","Löschen rückgängig machen" }, | 1043 | { "Undo Delete","Löschen rückgängig machen" }, |
1043 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1044 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1044 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1045 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1045 | { "Januar","Januar" }, | 1046 | { "Januar","Januar" }, |
1046 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1047 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1047 | { "No Filter","Kein Filter" }, | 1048 | { "No Filter","Kein Filter" }, |
1048 | { "Multiple Sync options","Multi Sync Optionen" }, | 1049 | { "Multiple Sync options","Multi Sync Optionen" }, |
1049 | { "Sync algo options","Sync Ablauf Optionen" }, | 1050 | { "Sync algo options","Sync Ablauf Optionen" }, |
1050 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1051 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1051 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1052 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1052 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1053 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1053 | { "Write back options","Optionen zum Zurückschreiben" }, | 1054 | { "Write back options","Optionen zum Zurückschreiben" }, |
1054 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1055 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1055 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1056 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1056 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1057 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1057 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1058 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1058 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1059 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1059 | { "Time period","Zeitspanne" }, | 1060 | { "Time period","Zeitspanne" }, |
1060 | { "From ","Von " }, | 1061 | { "From ","Von " }, |
1061 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1062 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1062 | { " weeks in the future "," Wochen in der Zukunft " }, | 1063 | { " weeks in the future "," Wochen in der Zukunft " }, |
1063 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1064 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1064 | { "Local temp file:","Lokale temp Datei:" }, | 1065 | { "Local temp file:","Lokale temp Datei:" }, |
1065 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1066 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1066 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1067 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1067 | { "Language","Sprache" }, | 1068 | { "Language","Sprache" }, |
1068 | { "Time Format","Zeit Format" }, | 1069 | { "Time Format","Zeit Format" }, |
1069 | { "Time Zone","Zeit Zone" }, | 1070 | { "Time Zone","Zeit Zone" }, |
1070 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1071 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1071 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, | 1072 | { "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, |
1072 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1073 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1073 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1074 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1074 | { "Save settings","Speichere Einstellungen" }, | 1075 | { "Save settings","Speichere Einstellungen" }, |
1075 | { "Save standard","Speichere Standard" }, | 1076 | { "Save standard","Speichere Standard" }, |
1076 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1077 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1077 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1078 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1078 | { "Data storage path","Daten Speicherpfad" }, | 1079 | { "Data storage path","Daten Speicherpfad" }, |
1079 | { "Language","Sprache" }, | 1080 | { "Language","Sprache" }, |
1080 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1081 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1081 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1082 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1082 | { "Show events that are done","Zeige abgelaufene Termine" }, | 1083 | { "Show events that are done","Zeige abgelaufene Termine" }, |
1083 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1084 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1084 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1085 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1085 | { "KO/Pi","KO/Pi" }, | 1086 | { "KO/Pi","KO/Pi" }, |
1086 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1087 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1087 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1088 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1088 | { "Sound.Al.: ","Sound.Al.: " }, | 1089 | { "Sound.Al.: ","Sound.Al.: " }, |
1089 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1090 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1090 | { "Restore","Wiederherstellen" }, | 1091 | { "Restore","Wiederherstellen" }, |
1091 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklich\nwiederherstellen?" }, | 1092 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklich\nwiederherstellen?" }, |
1092 | { "% completed","% erledigt" }, | 1093 | { "% completed","% erledigt" }, |
1093 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1094 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1094 | { "Set complete","Setze auf erledigt" }, | 1095 | { "Set complete","Setze auf erledigt" }, |
1095 | { "(cancelled)","(gecancelt)" }, | 1096 | { "(cancelled)","(gecancelt)" }, |
1096 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1097 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1097 | { " Local time "," Lokale Zeit " }, | 1098 | { " Local time "," Lokale Zeit " }, |
1098 | { "Form2","Form2" }, | 1099 | { "Form2","Form2" }, |
1099 | { "Filter enabled","Filter angeschaltet" }, | 1100 | { "Filter enabled","Filter angeschaltet" }, |
1100 | { "Edit Filters","Ändere Filter" }, | 1101 | { "Edit Filters","Ändere Filter" }, |
1101 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1102 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1102 | { "Agenda","Agenda" }, | 1103 | { "Agenda","Agenda" }, |
1103 | { " ("," (" }, | 1104 | { " ("," (" }, |
1104 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1105 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1105 | { "Print","Print" }, | 1106 | { "Print","Print" }, |
1106 | { "&Setup Printer...","Drucker &Setup..." }, | 1107 | { "&Setup Printer...","Drucker &Setup..." }, |
1107 | { "View Type","Zeige Typ" }, | 1108 | { "View Type","Zeige Typ" }, |
1108 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1109 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1109 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1110 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1110 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1111 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1111 | { "Portrait","Portrait" }, | 1112 | { "Portrait","Portrait" }, |
1112 | { "Landscape","Landschaft" }, | 1113 | { "Landscape","Landschaft" }, |
1113 | { "Print day","Drucke Tag" }, | 1114 | { "Print day","Drucke Tag" }, |
1114 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1115 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1115 | { "Date && Time Range","Datum && Zeitspanne" }, | 1116 | { "Date && Time Range","Datum && Zeitspanne" }, |
1116 | { "&End date:","&Enddatum:" }, | 1117 | { "&End date:","&Enddatum:" }, |
1117 | { "&Start date:","&Startdatum:" }, | 1118 | { "&Start date:","&Startdatum:" }, |
1118 | { "Start &time:","Startzeit:" }, | 1119 | { "Start &time:","Startzeit:" }, |
1119 | { "End ti&me:","Endzeit:" }, | 1120 | { "End ti&me:","Endzeit:" }, |
1120 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1121 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1121 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1122 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1122 | { "Alt+D","Alt+D" }, | 1123 | { "Alt+D","Alt+D" }, |
1123 | { "&Use colors","Nutze Farben" }, | 1124 | { "&Use colors","Nutze Farben" }, |
1124 | { "Alt+U","Alt+U" }, | 1125 | { "Alt+U","Alt+U" }, |
1125 | { "Print week","Drucke Woche" }, | 1126 | { "Print week","Drucke Woche" }, |
1126 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1127 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1127 | { "Use &colors","Nutze Farben" }, | 1128 | { "Use &colors","Nutze Farben" }, |
1128 | { "Type of View","Typ der Ansicht" }, | 1129 | { "Type of View","Typ der Ansicht" }, |
1129 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1130 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1130 | { "Alt+F","Alt+F" }, | 1131 | { "Alt+F","Alt+F" }, |
1131 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1132 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1132 | { "Alt+T","Alt+T" }, | 1133 | { "Alt+T","Alt+T" }, |
1133 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1134 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1134 | { "Print month","Drucke Monat" }, | 1135 | { "Print month","Drucke Monat" }, |
1135 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1136 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1136 | { "&Start month:","&Startmonat:" }, | 1137 | { "&Start month:","&Startmonat:" }, |
1137 | { "&End month:","&Endmonat:" }, | 1138 | { "&End month:","&Endmonat:" }, |
1138 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1139 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1139 | { "Print todos","Drucke Todos" }, | 1140 | { "Print todos","Drucke Todos" }, |
1140 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1141 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1141 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1142 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1142 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1143 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1143 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1144 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1144 | { "Items to Print","Zu druckende Items" }, | 1145 | { "Items to Print","Zu druckende Items" }, |
1145 | { "&From:","Von:" }, | 1146 | { "&From:","Von:" }, |
1146 | { "&To:","Bis:" }, | 1147 | { "&To:","Bis:" }, |
1147 | { "Print &all todo items","Drucke alle Todo Items" }, | 1148 | { "Print &all todo items","Drucke alle Todo Items" }, |
1148 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1149 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1149 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1150 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1150 | { "Todo List","Todo Liste" }, | 1151 | { "Todo List","Todo Liste" }, |
1151 | { "&Title:","&Titel:" }, | 1152 | { "&Title:","&Titel:" }, |
1152 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, | 1153 | { "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, |
1153 | { "Todo list","Todo Liste" }, | 1154 | { "Todo list","Todo Liste" }, |
1154 | { "&Print...","Drucke..." }, | 1155 | { "&Print...","Drucke..." }, |
1155 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1156 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1156 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1157 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1157 | { "OK","OK" }, | 1158 | { "OK","OK" }, |
1158 | { "FilterEditor","FilterEditor" }, | 1159 | { "FilterEditor","FilterEditor" }, |
1159 | { "Include","Inclusive" }, | 1160 | { "Include","Inclusive" }, |
1160 | { "Exclude","Exclusive" }, | 1161 | { "Exclude","Exclusive" }, |
1161 | { "Edit Selection...","Editiere Auswahl" }, | 1162 | { "Edit Selection...","Editiere Auswahl" }, |
1162 | { "recurring events","wiederholende Termine" }, | 1163 | { "recurring events","wiederholende Termine" }, |
1163 | { "recurr. events","wiederh.Termine" }, | 1164 | { "recurr. events","wiederh.Termine" }, |
1164 | { "completed to-dos","erledigte Todos" }, | 1165 | { "completed to-dos","erledigte Todos" }, |
1165 | { "events","Termine" }, | 1166 | { "events","Termine" }, |
1166 | { "todos","Todos" }, | 1167 | { "todos","Todos" }, |
1167 | { "journals","Journale" }, | 1168 | { "journals","Journale" }, |
1168 | { "public","öffentl." }, | 1169 | { "public","öffentl." }, |
1169 | { "private","privat" }, | 1170 | { "private","privat" }, |
1170 | { "confidential","vertraul." }, | 1171 | { "confidential","vertraul." }, |
1171 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, | 1172 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, |
1172 | { "Yesterday","Gestern" }, | 1173 | { "Yesterday","Gestern" }, |
1173 | { "Day after tomorrow","Übermorgen" }, | 1174 | { "Day after tomorrow","Übermorgen" }, |
1174 | { "Tomorrow","Morgen" }, | 1175 | { "Tomorrow","Morgen" }, |
1175 | { "Day before yesterday","Vorgestern" }, | 1176 | { "Day before yesterday","Vorgestern" }, |
1176 | { "Size %1","Größe %1" }, | 1177 | { "Size %1","Größe %1" }, |
1177 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1178 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1178 | { " (%1 y.)"," (%1 J.)" }, | 1179 | { " (%1 y.)"," (%1 J.)" }, |
1179 | { "Allday:","Ganztägig:" }, | 1180 | { "Allday:","Ganztägig:" }, |
1180 | { "compl.todos","erled.Todos" }, | 1181 | { "compl.todos","erled.Todos" }, |
1181 | { "Day view","Tagesansicht" }, | 1182 | { "Day view","Tagesansicht" }, |
1182 | { "Next days","Nächste Tage" }, | 1183 | { "Next days","Nächste Tage" }, |
1183 | { "Next week","Nächste Woche" }, | 1184 | { "Next week","Nächste Woche" }, |
1184 | { "Next two weeks","Nächste zwei Wochen" }, | 1185 | { "Next two weeks","Nächste zwei Wochen" }, |
1185 | { "This month","Dieser Monat" }, | 1186 | { "This month","Dieser Monat" }, |
1186 | { "Journal view","Journal" }, | 1187 | { "Journal view","Journal" }, |
1187 | { "Display all opened","Zeige alle geöffnet" }, | 1188 | { "Display all opened","Zeige alle geöffnet" }, |
1188 | { "Display all closed","Zeige alle geschlossen" }, | 1189 | { "Display all closed","Zeige alle geschlossen" }, |
1189 | { "Display all flat","Zeige alle flach" }, | 1190 | { "Display all flat","Zeige alle flach" }, |
1190 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1191 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1191 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1192 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1192 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1193 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1193 | { "Select Week","Wähle Woche" }, | 1194 | { "Select Week","Wähle Woche" }, |
1194 | { "Set alarm...","Setze Alarm..." }, | 1195 | { "Set alarm...","Setze Alarm..." }, |
1195 | { "Set Alarm!","Setze Alarm!" }, | 1196 | { "Set Alarm!","Setze Alarm!" }, |
1196 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, | 1197 | { "Changed alarm for %1 items","Alarm für %1 Items geändert" }, |
1197 | { " and "," und " }, | 1198 | { " and "," und " }, |
1198 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1199 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1199 | { "Mail to selected","Mail an Ausgewählte" }, | 1200 | { "Mail to selected","Mail an Ausgewählte" }, |
1200 | { "Mail to all","Mail an Alle" }, | 1201 | { "Mail to all","Mail an Alle" }, |
1201 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1202 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1202 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1203 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1203 | { " on"," am" }, | 1204 | { " on"," am" }, |
1204 | { " completed on "," erledigt am " }, | 1205 | { " completed on "," erledigt am " }, |
1205 | { "Save as Event template","Speichere als Vorlage" }, | 1206 | { "Save as Event template","Speichere als Vorlage" }, |
1206 | { "Load Event template","Lade Termin Vorlage" }, | 1207 | { "Load Event template","Lade Termin Vorlage" }, |
1207 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1208 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1208 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1209 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1209 | { "Sub todos:<br>","Unter-Todos:<br>" }, | 1210 | { "Sub todos:<br>","Unter-Todos:<br>" }, |
1210 | { "Parent todo:<br>","Über-Todo:<br>" }, | 1211 | { "Parent todo:<br>","Über-Todo:<br>" }, |
1211 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1212 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1212 | { " completed"," erledigt" }, | 1213 | { " completed"," erledigt" }, |
1213 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, | 1214 | { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, |
1214 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1215 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1215 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1216 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1216 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1217 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1217 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, | 1218 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, |
1218 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1219 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1219 | { "Error","Fehler" }, | 1220 | { "Error","Fehler" }, |
1220 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1221 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1221 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1222 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1222 | { "Warning","Warnung" }, | 1223 | { "Warning","Warnung" }, |
1223 | { "Select week number","Wähle Wochen Nummer" }, | 1224 | { "Select week number","Wähle Wochen Nummer" }, |
1224 | { "Februar","Februar" }, | 1225 | { "Februar","Februar" }, |
1225 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1226 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1226 | { "W","W" }, | 1227 | { "W","W" }, |
1227 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1228 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1228 | { "T: %1","T: %1" }, | 1229 | { "T: %1","T: %1" }, |
1229 | { "Start: ","Start: " }, | 1230 | { "Start: ","Start: " }, |
1230 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1231 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1231 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1232 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1232 | { "Remote IP address:","Ferne IP Adresse:" }, | 1233 | { "Remote IP address:","Ferne IP Adresse:" }, |
1233 | { "Remote port number:","Ferne Port Nummer:" }, | 1234 | { "Remote port number:","Ferne Port Nummer:" }, |
1234 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1235 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1235 | { "Remote from: ","Fern von: " }, | 1236 | { "Remote from: ","Fern von: " }, |
1236 | { "Local from: ","Lokal von: " }, | 1237 | { "Local from: ","Lokal von: " }, |
1237 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, | 1238 | { "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, |
1238 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1239 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1239 | { "Write back","Schreibe zurück" }, | 1240 | { "Write back","Schreibe zurück" }, |
1240 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1241 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1241 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1242 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1242 | { "Received sync request","Sync Anfrage erhalten" }, | 1243 | { "Received sync request","Sync Anfrage erhalten" }, |
1243 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, | 1244 | { "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, |
1244 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1245 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1245 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1246 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1246 | { "Sending file...","Sende Datei..." }, | 1247 | { "Sending file...","Sende Datei..." }, |
1247 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1248 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1248 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1249 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1249 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1250 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1250 | { "Writing file to disk...","Speichere Datei..." }, | 1251 | { "Writing file to disk...","Speichere Datei..." }, |
1251 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1252 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1252 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1253 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1253 | { "Synchronize!","Synchronisiere!" }, | 1254 | { "Synchronize!","Synchronisiere!" }, |
1254 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1255 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1255 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1256 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1256 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, | 1257 | { "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, |
1257 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1258 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1258 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1259 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1259 | { "List week view","Listenwochenansicht" }, | 1260 | { "List week view","Listenwochenansicht" }, |
1260 | { "List week","Listenwochenansicht" }, | 1261 | { "List week","Listenwochenansicht" }, |
1261 | { "Next Week","Nächste Woche" }, | 1262 | { "Next Week","Nächste Woche" }, |
1262 | { "Previous Week","Vorherige Woche" }, | 1263 | { "Previous Week","Vorherige Woche" }, |
1263 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, | 1264 | { "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, |
1264 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1265 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1265 | { "Details","Details" }, | 1266 | { "Details","Details" }, |
1266 | { "Created time","Erstellt Zeit" }, | 1267 | { "Created time","Erstellt Zeit" }, |
1267 | { "Last modified time","Geändert Zeit" }, | 1268 | { "Last modified time","Geändert Zeit" }, |
1268 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1269 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1269 | { "View Options","Anzeige Optionen" }, | 1270 | { "View Options","Anzeige Optionen" }, |
1270 | { "<b>Created: ","<b>Erstellt am: " }, | 1271 | { "<b>Created: ","<b>Erstellt am: " }, |
1271 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1272 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1272 | { "Journal: ","Journal: " }, | 1273 | { "Journal: ","Journal: " }, |
1273 | { "yearly","jährlich" }, | 1274 | { "yearly","jährlich" }, |
1274 | { "(%1) ","%1-" }, | 1275 | { "(%1) ","%1-" }, |
1275 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1276 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1276 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1277 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1277 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1278 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1278 | { "Summary/Loc.","Titel/Ort" }, | 1279 | { "Summary/Loc.","Titel/Ort" }, |
1279 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1280 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1280 | { "Week Number","Wochennummer" }, | 1281 | { "Week Number","Wochennummer" }, |
1281 | { "Import","Importiere" }, | 1282 | { "Import","Importiere" }, |
1282 | { "Export","Exportiere" }, | 1283 | { "Export","Exportiere" }, |
1283 | { "Beam","Beame" }, | 1284 | { "Beam","Beame" }, |
1284 | { "Export","Exportiere" }, | 1285 | { "Export","Exportiere" }, |
1285 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1286 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1286 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1287 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1287 | { "Journal/Details...","Journale/Details..." }, | 1288 | { "Journal/Details...","Journale/Details..." }, |
1288 | { "Agenda View","Agenda Ansicht" }, | 1289 | { "Agenda View","Agenda Ansicht" }, |
1289 | { "Show current time","Zeige aktuelle Zeit" }, | 1290 | { "Show current time","Zeige aktuelle Zeit" }, |
1290 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1291 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1291 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, | 1292 | { "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, |
1292 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, | 1293 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, |
1293 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, | 1294 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, |
1294 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, | 1295 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, |
1295 | { "%1 days\n","%1 Tagen\n" }, | 1296 | { "%1 days\n","%1 Tagen\n" }, |
1296 | { "1 day\n","1 Tag\n" }, | 1297 | { "1 day\n","1 Tag\n" }, |
1297 | { "%1 hours\n","%1 Stunden\n" }, | 1298 | { "%1 hours\n","%1 Stunden\n" }, |
1298 | { "1 hour\n","1 Stunde\n" }, | 1299 | { "1 hour\n","1 Stunde\n" }, |
1299 | { "%1 minutes\n","%1 Minuten\n" }, | 1300 | { "%1 minutes\n","%1 Minuten\n" }, |
1300 | { "1 minute\n","1 Minute\n" }, | 1301 | { "1 minute\n","1 Minute\n" }, |
1301 | { "Only one toolbar","Nur eine Toolbar" }, | 1302 | { "Only one toolbar","Nur eine Toolbar" }, |
1302 | { "Print","Drucke" }, | 1303 | { "Print","Drucke" }, |
1303 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, | 1304 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, |
1304 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, | 1305 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, |
1305 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, | 1306 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, |
1306 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, | 1307 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, |
1307 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, | 1308 | { "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, |
1308 | { "KO/Pi Printout","KO/Pi Ausdruck" }, | 1309 | { "KO/Pi Printout","KO/Pi Ausdruck" }, |
1309 | { "Print unscaled","Drucke unskaliert" }, | 1310 | { "Print unscaled","Drucke unskaliert" }, |
1310 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, | 1311 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, |
1311 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, | 1312 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, |
1312 | { "Printout Mode","Druck Modus" }, | 1313 | { "Printout Mode","Druck Modus" }, |
1313 | { "Filter menu icon","Filtermenu Icon" }, | 1314 | { "Filter menu icon","Filtermenu Icon" }, |
1314 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, | 1315 | { "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, |
1315 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, | 1316 | { "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, |
1316 | { "%1d","%1t" }, | 1317 | { "%1d","%1t" }, |
1317 | { "%1h","%1std" }, | 1318 | { "%1h","%1std" }, |
1318 | { "%1min","%1min" }, | 1319 | { "%1min","%1min" }, |
1319 | { "( %1 before )","( %1 vorher )" }, | 1320 | { "( %1 before )","( %1 vorher )" }, |
1320 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, | 1321 | { "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, |
1321 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, | 1322 | { "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, |
1322 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, | 1323 | { "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, |
1323 | { "Show Sync Events","Zeige Sync-Ereignisse" }, | 1324 | { "Show Sync Events","Zeige Sync-Ereignisse" }, |
1324 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, | 1325 | { "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, |
1325 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, | 1326 | { "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, |
1326 | { " on "," am " }, | 1327 | { " on "," am " }, |
1327 | { "On: ","Am: " }, | 1328 | { "On: ","Am: " }, |
1328 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, | 1329 | { "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, |
1329 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, | 1330 | { "Start/Stop todo...","Starte/Stoppe Todo..." }, |
1330 | { "Color for running todos:","Farbe für laufende Todos:" }, | 1331 | { "Color for running todos:","Farbe für laufende Todos:" }, |
1331 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, | 1332 | { "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, |
1332 | { "Todo is started","Todo ist gestartet" }, | 1333 | { "Todo is started","Todo ist gestartet" }, |
1333 | { "Stop todo","Stoppe Todo" }, | 1334 | { "Stop todo","Stoppe Todo" }, |
1334 | { "Todo is stopped","Todo ist gestoppt" }, | 1335 | { "Todo is stopped","Todo ist gestoppt" }, |
1335 | { "Start todo","Starte Todo" }, | 1336 | { "Start todo","Starte Todo" }, |
1336 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, | 1337 | { "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, |
1337 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, | 1338 | { "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, |
1338 | { "Todo has subtodos","Todo hat Untertodos" }, | 1339 | { "Todo has subtodos","Todo hat Untertodos" }, |
1339 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, | 1340 | { "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, |
1340 | { "Colors","Farben" }, | 1341 | { "Colors","Farben" }, |
1341 | { "Click on new parent item","Klicke auf neues Übertodo" }, | 1342 | { "Click on new parent item","Klicke auf neues Übertodo" }, |
1342 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, | 1343 | { "Reparenting aborted!","Übertodo setzen abgebrochen" }, |
1343 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, | 1344 | { "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, |
1344 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, | 1345 | { "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, |
1345 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, | 1346 | { "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, |
1346 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, | 1347 | { "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, |
1347 | { "times","Zeiten" }, | 1348 | { "times","Zeiten" }, |
1348 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, | 1349 | { "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, |
1349 | { "Backup enabled","Backup angeschaltet" }, | 1350 | { "Backup enabled","Backup angeschaltet" }, |
1350 | { "Use standard backup dir","Standard Backupverzeichnis" }, | 1351 | { "Use standard backup dir","Standard Backupverzeichnis" }, |
1351 | { "Number of Backups:","Anzahl der Backups" }, | 1352 | { "Number of Backups:","Anzahl der Backups" }, |
1352 | { "Make backup every ","Mache ein Backup alle " }, | 1353 | { "Make backup every ","Mache ein Backup alle " }, |
1353 | { " days"," Tage" }, | 1354 | { " days"," Tage" }, |
1354 | { "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, | 1355 | { "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, |
1355 | { "Backup Failed!","Backup Problem!" }, | 1356 | { "Backup Failed!","Backup Problem!" }, |
1356 | { "Try again now","Versuche jetzt nochmal" }, | 1357 | { "Try again now","Versuche jetzt nochmal" }, |
1357 | { "Try again later","Versuche später nochmal" }, | 1358 | { "Try again later","Versuche später nochmal" }, |
1358 | { "Try again tomorrow","Versuche morgen nochmal" }, | 1359 | { "Try again tomorrow","Versuche morgen nochmal" }, |
1359 | { "Disable backup","Schalte Backup ab" }, | 1360 | { "Disable backup","Schalte Backup ab" }, |
1360 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, | 1361 | { "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, |
1361 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, | 1362 | { "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, |
1362 | { "Choose action","Wähle Aktion" }, | 1363 | { "Choose action","Wähle Aktion" }, |
1363 | { "Comment for todo:","Kommentar zum Todo:" }, | 1364 | { "Comment for todo:","Kommentar zum Todo:" }, |
1364 | { "Stop+note","Stop+Notiz" }, | 1365 | { "Stop+note","Stop+Notiz" }, |
1365 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, | 1366 | { "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, |
1366 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, | 1367 | { "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, |
1367 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, | 1368 | { "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, |
1368 | { "Print complete list...","Drucke komplette Liste..." }, | 1369 | { "Print complete list...","Drucke komplette Liste..." }, |
1369 | { "Hide all selected","Verstecke Ausgewählte" }, | 1370 | { "Hide all selected","Verstecke Ausgewählte" }, |
1370 | { "Add items","hinzufügen" }, | 1371 | { "Add items","hinzufügen" }, |
1371 | { "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, | 1372 | { "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, |
1372 | { "Print List View...","Drucke Listenansicht..." }, | 1373 | { "Print List View...","Drucke Listenansicht..." }, |
1373 | { "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, | 1374 | { "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, |
1374 | { "Configure KO/Pi...","Konfiguriere KO/Pi..." }, | 1375 | { "Configure KO/Pi...","Konfiguriere KO/Pi..." }, |
1375 | { "Global Settings...","Globale Einstellungen..." }, | 1376 | { "Global Settings...","Globale Einstellungen..." }, |
1376 | { "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" }, | 1377 | { "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" }, |
1377 | { "(disabled)","(abgeschaltet)" }, | 1378 | { "(disabled)","(abgeschaltet)" }, |
1378 | { "New Calendar","Neuer Kalender" }, | 1379 | { "New Calendar","Neuer Kalender" }, |
1379 | { "Calendar","Kalender" }, | 1380 | { "Calendar","Kalender" }, |
1380 | { "Filter selector","Filterauswahl" }, | 1381 | { "Filter selector","Filterauswahl" }, |
1381 | { "Filtermenu","Filtermenu" }, | 1382 | { "Filtermenu","Filtermenu" }, |
1382 | { "Toggle Fullscreen","Vollbild umschalten" }, | 1383 | { "Toggle Fullscreen","Vollbild umschalten" }, |
1383 | { "Toggle Resource View","Resourcenansicht umschalten" }, | 1384 | { "Toggle Resource View","Resourcenansicht umschalten" }, |
1384 | { "Storage HowTo...","Speicherort HowTo..." }, | 1385 | { "Storage HowTo...","Speicherort HowTo..." }, |
1385 | { "Timetracking HowTo...","Timetracking HowTo..." }, | 1386 | { "Timetracking HowTo...","Timetracking HowTo..." }, |
1386 | { "Juni","Juni" }, | 1387 | { "Juni","Juni" }, |
1387 | { "Juli","Juli" }, | 1388 | { "Juli","Juli" }, |
1388 | { "ToDo:","ToDo:" }, | 1389 | { "ToDo:","ToDo:" }, |
1389 | { "Set Calendar","Setze Kalender" }, | 1390 | { "Set Calendar","Setze Kalender" }, |
1390 | { "Todo: %1","Todo: %1" }, | 1391 | { "Todo: %1","Todo: %1" }, |
1391 | { ": (Prio ",": (Prio " }, | 1392 | { ": (Prio ",": (Prio " }, |
1392 | { "Todos","Todos" }, | 1393 | { "Todos","Todos" }, |
1393 | { "Todo Viewer","Todo Anzeige" }, | 1394 | { "Todo Viewer","Todo Anzeige" }, |
1394 | { "Todo ","Todo " }, | 1395 | { "Todo ","Todo " }, |
1395 | { " Calendar \n Resource "," Kalender \n Resource " }, | 1396 | { " Calendar \n Resource "," Kalender \n Resource " }, |
1396 | { " Color "," Farbe " }, | 1397 | { " Color "," Farbe " }, |
1397 | { "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, | 1398 | { "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, |
1398 | { "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, | 1399 | { "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, |
1399 | { "Add new Calendar","Füge Kalender hinzu" }, | 1400 | { "Add new Calendar","Füge Kalender hinzu" }, |
1400 | { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, | 1401 | { "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, |
1401 | { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, | 1402 | { "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, |
1402 | { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, | 1403 | { "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, |
1403 | { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, | 1404 | { "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, |
1404 | { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, | 1405 | { "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, |
1405 | { "Global application font for all apps:","Globale Schriftart:" }, | 1406 | { "Global application font for all apps:","Globale Schriftart:" }, |
1406 | { "Application Font","Applikationsschriftart" }, | 1407 | { "Application Font","Applikationsschriftart" }, |
1407 | { "Kx/Pi","Kx/Pi" }, | 1408 | { "Kx/Pi","Kx/Pi" }, |
1408 | { "Backup","Backup" }, | 1409 | { "Backup","Backup" }, |
1409 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, | 1410 | { "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, |
1410 | { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, | 1411 | { "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, |
1411 | { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, | 1412 | { "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, |
1412 | { "Choose Color","Wähle Farbe" }, | 1413 | { "Choose Color","Wähle Farbe" }, |
1413 | { " OK "," OK " }, | 1414 | { " OK "," OK " }, |
1414 | { " Cancel "," Abbrechen " }, | 1415 | { " Cancel "," Abbrechen " }, |
1415 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, | 1416 | { "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, |
1416 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, | 1417 | { "Matching items will be removed from list","Passende werden von der Liste entfernt" }, |
1417 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, | 1418 | { "Search on displayed list only","Suche auf der dargestellten Liste" }, |
1418 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, | 1419 | { "List will be cleared before search","Liste wird vor der Suche gelöscht" }, |
1419 | { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, | 1420 | { "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, |
1420 | { "%1\nis running!","%1\nist am Laufen!" }, | 1421 | { "%1\nis running!","%1\nist am Laufen!" }, |
1421 | { "Additional Comment:","Zusätzlicher Kommentar:" }, | 1422 | { "Additional Comment:","Zusätzlicher Kommentar:" }, |
1422 | { "Stop and save","Stopp und Speichern" }, | 1423 | { "Stop and save","Stopp und Speichern" }, |
1423 | { "Continue running","Weiter laufen lassen" }, | 1424 | { "Continue running","Weiter laufen lassen" }, |
1424 | { "Stop - do not save","Stopp - nicht Speichern" }, | 1425 | { "Stop - do not save","Stopp - nicht Speichern" }, |
1425 | { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, | 1426 | { "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, |
1426 | { "Time mismatch!","Zeiten stimmen nicht!" }, | 1427 | { "Time mismatch!","Zeiten stimmen nicht!" }, |
1427 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, | 1428 | { "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, |
1428 | { "Yes, stop todo","Ja, stoppe Todo" }, | 1429 | { "Yes, stop todo","Ja, stoppe Todo" }, |
1429 | { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, | 1430 | { "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, |
1430 | { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, | 1431 | { "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, |
1431 | { "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, | 1432 | { "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, |
1432 | { "Spouse","Ehegatte" }, | 1433 | { "Spouse","Ehegatte" }, |
1433 | { "Notes","Notizen" }, | 1434 | { "Notes","Notizen" }, |
1434 | { "Messanger","Messanger" }, | 1435 | { "Messanger","Messanger" }, |
1435 | { "Assistant","Assistent" }, | 1436 | { "Assistant","Assistent" }, |
1436 | { "Manager","Manager" }, | 1437 | { "Manager","Manager" }, |
1437 | { "Secrecy","Sichtbar" }, | 1438 | { "Secrecy","Sichtbar" }, |
1438 | { "male","männlich" }, | 1439 | { "male","männlich" }, |
1439 | { "female","weiblich" }, | 1440 | { "female","weiblich" }, |
1440 | { "Hide!","Verbergen!" }, | 1441 | { "Hide!","Verbergen!" }, |
1441 | { "Show!","Anzeigen!" }, | 1442 | { "Show!","Anzeigen!" }, |
1442 | { "Details","Details" }, | 1443 | { "Details","Details" }, |
1443 | { "Profession","Beruf" }, | 1444 | { "Profession","Beruf" }, |
1444 | { "Children","Kinder" }, | 1445 | { "Children","Kinder" }, |
1445 | { "Department","Abteilung" }, | 1446 | { "Department","Abteilung" }, |
1446 | { "Backup cancelled","Backup abgebrochen" }, | 1447 | { "Backup cancelled","Backup abgebrochen" }, |
1447 | { "Backup globally disabled","Backup global abgeschaltet" }, | 1448 | { "Backup globally disabled","Backup global abgeschaltet" }, |
1448 | { "Backup succesfully finished","Backup erfolgreich beendet" }, | 1449 | { "Backup succesfully finished","Backup erfolgreich beendet" }, |
1449 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, | 1450 | { "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, |
1450 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, | 1451 | { "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, |
1451 | { "Birthdays","Geburtstage" }, | 1452 | { "Birthdays","Geburtstage" }, |
1452 | { "KO/Pi import information!","KO/Pi Import Information!" }, | 1453 | { "KO/Pi import information!","KO/Pi Import Information!" }, |
1453 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, | 1454 | { "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, |
1454 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, | 1455 | { "Cancel - do not start"," Abbrechen - Todo nicht starten" }, |
1455 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, | 1456 | { "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, |
1456 | { "Reload","Neu laden" }, | 1457 | { "Reload","Neu laden" }, |
1457 | { "Timezone settings","Zeitzoneneinstellung" }, | 1458 | { "Timezone settings","Zeitzoneneinstellung" }, |
1458 | { "Title: ","Titel: " }, | 1459 | { "Title: ","Titel: " }, |
1459 | { "Journal from: ","Journal vom: " }, | 1460 | { "Journal from: ","Journal vom: " }, |
1460 | { "Journal: %1 from ","Journal: %1 vom " }, | 1461 | { "Journal: %1 from ","Journal: %1 vom " }, |
1461 | { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, | 1462 | { "<b>Click here to edit categories: </b>","<b>Klicke hier um Kategorien zu ändern: </b>" }, |
1462 | { "Selected Item","Ausgewähltes Item" }, | 1463 | { "Selected Item","Ausgewähltes Item" }, |
1463 | { "Select Date...","Wähle Datum..." }, | 1464 | { "Select Date...","Wähle Datum..." }, |
1464 | { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, | 1465 | { "After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:","Nach dem Importieren/Laden/Syncen kann es neue Kategorien in den Terminen oder Todos geben, die nicht automatisch der Kategorieliste hinzugefügt werden. Bitte wählen Sie, was <b>jetzt</b> passieren soll:" }, |
1465 | { "Change category list now!","Ändere Kategorieliste jetzt!" }, | 1466 | { "Change category list now!","Ändere Kategorieliste jetzt!" }, |
1466 | { "Edit category list...","Ändere Kategorieliste..." }, | 1467 | { "Edit category list...","Ändere Kategorieliste..." }, |
1467 | { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, | 1468 | { "Toolbar changes needs a restart!","Neustart benötigt für Toolbaränderungen!" }, |
1468 | { "Filepath: ","Dateipfad: " }, | 1469 | { "Filepath: ","Dateipfad: " }, |
1469 | { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, | 1470 | { "You can try to reload the calendar in the Resource View!","In der Resourcenansicht können Sie erneut versuchen den Kalender zu laden!" }, |
1470 | { "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, | 1471 | { "<b>WARNING:</b> There is a pending suspended alarm!","<b>WARNUNG:</b> Es gibt einen laufenden Suspendalarm!" }, |
1471 | { "Pending Suspend Alarm","Laufender Suspend Alarm" }, | 1472 | { "Pending Suspend Alarm","Laufender Suspend Alarm" }, |
1472 | { "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, | 1473 | { "Error loading calendar %1","Fehler beim Laden von Kalender %1" }, |
1473 | { "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, | 1474 | { "Calendar(s) not loaded:","Nicht geladene(r) Kalender:" }, |
1474 | { "Loading of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, | 1475 | { "Loading of calendar(s) failed","Laden von Kalendern fehlgeschlagen" }, |
1475 | { "Alarm Options","Alarm Einstellungen" }, | 1476 | { "Alarm Options","Alarm Einstellungen" }, |
1476 | { "Delete selected...","Lösche Ausgewählte..." }, | 1477 | { "Delete selected...","Lösche Ausgewählte..." }, |
1477 | { "None","Nichts" }, | 1478 | { "None","Nichts" }, |
1478 | { "Selection","Auswahl" }, | 1479 | { "Selection","Auswahl" }, |
1479 | { "Set categories","Setze Kategorien" }, | 1480 | { "Set categories","Setze Kategorien" }, |
1480 | { "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, | 1481 | { "This adds the selected\nitems to the calendar\n%1\nand removes them from\ntheir current calendar!","Das fügt die ausgewählten\nEinträge dem Kalender\n%1\nhinzu und entfernt sie von\nihrem aktuellen Kalender!" }, |
1481 | { "Reset","Neu setzen" }, | 1482 | { "Reset","Neu setzen" }, |
1482 | { "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, | 1483 | { "Do you want to <b>add</b> categories to the selected items or <b>reset</b> the list (i.e. remove current categories)?","Möchten Sie Kategorien zu den ausgewählten Einträgen <b>hinzufügen</b> oder die Liste <b>neu setzen</b> (d.h. vorhandene Kategorien löschen)?" }, |
1483 | { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, | 1484 | { "The file\n%1\ndoes not exist!\nShall I create it for you?","Die Datei\n%1\nexistiert nicht!\nSoll sie neu angelegt werden?" }, |
1484 | { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, | 1485 | { "Sorry, cannot create the file\n%1!\nNo calendar added!","Kann leider die Datei\n%1\nnicht anlegen!\nKein Kalender hinzugefügt!" }, |
1485 | { "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, | 1486 | { "\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n","\nKEIN\n SCHREIBBARER\n KALENDER\n GEFUNDEN!\n\nBitte korrigieren Sie\nihre Kalendereinstellungen!\n" }, |
1486 | { "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, | 1487 | { "\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie Datei\n%1\nwurde verändert!\nDatei Grösse: %2 Bytes.\nZuletzt geändert: %3\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, |
1487 | { "Edit","Edit" }, | 1488 | { "Edit","Edit" }, |
1488 | { "Last Modified","Zuletzt geändert" }, | 1489 | { "Last Modified","Zuletzt geändert" }, |
1489 | { "Journal viewer","Journal Anzeige" }, | 1490 | { "Journal viewer","Journal Anzeige" }, |
1490 | { "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, | 1491 | { "Configure Calendar Files...","Konfiguriere Kalenderdateien..." }, |
1491 | { "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, | 1492 | { "You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>.","Sie können <b>mehr als eine</b> Kalenderdatei in KO/Pi darstellen und benutzen. Eine Kalenderdatei wird <b>Resource</b> genannt. Um einen Kalender hinzuzufügen oder die Kalendereinstellungen zu ändern benutzen Sie bitte das Menu: <b>Ansicht -> Resourcenansicht umschalten</b>." }, |
1492 | { "Hide Completed","Verstecke erledigte Todos" }, | 1493 | { "Hide Completed","Verstecke erledigte Todos" }, |
1493 | { "Show not Running","Zeige nicht Laufende" }, | 1494 | { "Show not Running","Zeige nicht Laufende" }, |
1494 | { "Click to add new Todo","Klick für neues Todo!" }, | 1495 | { "Click to add new Todo","Klick für neues Todo!" }, |
1495 | { "Show next conflict for","Zeige nächsten Konflikt für" }, | 1496 | { "Show next conflict for","Zeige nächsten Konflikt für" }, |
1496 | { "All events","Alle Termine" }, | 1497 | { "All events","Alle Termine" }, |
1497 | { "Allday events","Ganztagestermine" }, | 1498 | { "Allday events","Ganztagestermine" }, |
1498 | { "Events with time","Termine mit Zeit" }, | 1499 | { "Events with time","Termine mit Zeit" }, |
1499 | { "No conflict found","Kein Konflikt gefunden" }, | 1500 | { "No conflict found","Kein Konflikt gefunden" }, |
1500 | { "Conflict %1 <-> %2","Konflikt %1 <-> %2" }, | 1501 | { "Conflict %1 <-> %2","Konflikt %1 <-> %2" }, |
1501 | { "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " }, | 1502 | { "<p><b>Q</b>: Show next date with conflicting events\n ","<p><b>Q</b>: Zeige nächstes Datum mit Terminen im Konflikt\n " }, |
1502 | { "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" }, | 1503 | { "Week view mode uses row layout","Wochenansicht Modus nutzt Reihenlayout" }, |
1503 | { "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" }, | 1504 | { "The event\n%1\nconflicts with event\n%2\nat date\n%3.\n","Der Termin\n%1\nist im Konflikt mit Termin\n%2\nam Datum\n%3.\n" }, |
1504 | { "KO/Pi Conflict detected","KO/Pi Konflikt erkannt" }, | 1505 | { "KO/Pi Conflict detected","KO/Pi Konflikt erkannt" }, |
1505 | { "Show date","Zeige Datum" }, | 1506 | { "Show date","Zeige Datum" }, |
1506 | { "No problem!","Null Problemo!" }, | 1507 | { "No problem!","Null Problemo!" }, |
1507 | { "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, | 1508 | { "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, |
1508 | { "Pi-Sync Port Error","Pi-Sync Port Fehler" }, | 1509 | { "Pi-Sync Port Error","Pi-Sync Port Fehler" }, |
1509 | { "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, | 1510 | { "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, |
1510 | { "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, | 1511 | { "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, |
1511 | { "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, | 1512 | { "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, |
1512 | { "Pi-Sync Error","Pi-Sync Fehler" }, | 1513 | { "Pi-Sync Error","Pi-Sync Fehler" }, |
1513 | { "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, | 1514 | { "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, |
1514 | { "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, | 1515 | { "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, |
1515 | { "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, | 1516 | { "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, |
1516 | { "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, | 1517 | { "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, |
1517 | { "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, | 1518 | { "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, |
1518 | { "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, | 1519 | { "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, |
1519 | { "Receiving file from remote...","Empfange entfernte Datei..." }, | 1520 | { "Receiving file from remote...","Empfange entfernte Datei..." }, |
1520 | { "Sending back synced file...","Sende synchronisierte Datei zurück..." }, | 1521 | { "Sending back synced file...","Sende synchronisierte Datei zurück..." }, |
1521 | { "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, | 1522 | { "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, |
1522 | { "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" }, | 1523 | { "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" }, |
1523 | { "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, | 1524 | { "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, |
1524 | { "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, | 1525 | { "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, |
1525 | { "Writing back file ...","Schreibe Datei zurück..." }, | 1526 | { "Writing back file ...","Schreibe Datei zurück..." }, |
1526 | { "Sending back file ...","Sende Datei zurück..." }, | 1527 | { "Sending back file ...","Sende Datei zurück..." }, |
1527 | { "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" }, | 1528 | { "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" }, |
1528 | { "Created","Angelegt" }, | 1529 | { "Created","Angelegt" }, |
1529 | { "Last Modified Sub","Zuletzt geändertes Sub" }, | 1530 | { "Last Modified Sub","Zuletzt geändertes Sub" }, |
1530 | { "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" }, | 1531 | { "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" }, |
1531 | { "Show times on two lines","Zeige Zeiten auf zwei Zeilen" }, | 1532 | { "Show times on two lines","Zeige Zeiten auf zwei Zeilen" }, |
1532 | { "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, | 1533 | { "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, |
1533 | { "Duration","Dauer" }, | 1534 | { "Duration","Dauer" }, |
1534 | { " day"," Tag" }, | 1535 | { " day"," Tag" }, |
1535 | { "Click this button to display all todos in a <b>flat</b> hierarchy","Klicke diesen Knopf um alle Todos in einer <b>flachen</b> Hierarchie darzustellen" }, | 1536 | { "Click this button to display all todos in a <b>flat</b> hierarchy","Klicke diesen Knopf um alle Todos in einer <b>flachen</b> Hierarchie darzustellen" }, |
1536 | { "Click this button to display all todos <b>openend</b>","Klicke diesen Knopf um alle Todos <b>geöffnet</b> darzustellen" }, | 1537 | { "Click this button to display all todos <b>openend</b>","Klicke diesen Knopf um alle Todos <b>geöffnet</b> darzustellen" }, |
1537 | { "Click this button to display all todos <b>closed</b>","Klicke diesen Knopf um alle Todos <b>geschlossen</b> darzustellen" }, | 1538 | { "Click this button to display all todos <b>closed</b>","Klicke diesen Knopf um alle Todos <b>geschlossen</b> darzustellen" }, |
1538 | { "Click this button to toggle show/hide <b>running</b> todos","Klicke diesen Knopf um <b>zeige Laufende</b> umzuschalten" }, | 1539 | { "Click this button to toggle show/hide <b>running</b> todos","Klicke diesen Knopf um <b>zeige Laufende</b> umzuschalten" }, |
1539 | { "Click this button to toggle show/hide <b>completed</b> todos","Klicke diesen Knopf um <b>zeige Erledigte</b> umzuschalten" }, | 1540 | { "Click this button to toggle show/hide <b>completed</b> todos","Klicke diesen Knopf um <b>zeige Erledigte</b> umzuschalten" }, |
1540 | { "Click this button to add a new subtodo to the currently selected todo","Klicke diesen Knopf um ein Untertodo zu dem gerade selektierten Todo hinzuzufügen" }, | 1541 | { "Click this button to add a new subtodo to the currently selected todo","Klicke diesen Knopf um ein Untertodo zu dem gerade selektierten Todo hinzuzufügen" }, |
1541 | { "In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.","In dieser Spalte kann man einen <b>Kalender auf sichtbar schalten</b>. Wenn ein Kalender nicht sichtbar ist werden seine Einträge nicht in den Ansichten angezeigt. Man kann Einträge hinzufügen und laden/speichern wie gewöhnlich." }, | 1542 | { "In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.","In dieser Spalte kann man einen <b>Kalender auf sichtbar schalten</b>. Wenn ein Kalender nicht sichtbar ist werden seine Einträge nicht in den Ansichten angezeigt. Man kann Einträge hinzufügen und laden/speichern wie gewöhnlich." }, |
1542 | { "In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.","In dieser Spalte wird der <b>Name des Kalenders</b> angezeigt. Wenn Sie auf den Namen klicken wird Information über die Kalenderdatei angezeigt. Wenn die Datei beim Start nicht geladen wurde können Sie hier erneut versuchen sie zu laden." }, | 1543 | { "In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.","In dieser Spalte wird der <b>Name des Kalenders</b> angezeigt. Wenn Sie auf den Namen klicken wird Information über die Kalenderdatei angezeigt. Wenn die Datei beim Start nicht geladen wurde können Sie hier erneut versuchen sie zu laden." }, |
1543 | { "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." }, | 1544 | { "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." }, |
1544 | { "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." }, | 1545 | { "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." }, |
1545 | { "Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.","Klicken Sie diesen Knopf <b>um einen Kalender hinzuzufügen</b>. Sie können eine existierende Kalenderdatei hinzufügen oder einen neuen Kalender und KO/Pi legt dann eine neue leere Kalenderdatei für Sie an." }, | 1546 | { "Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.","Klicken Sie diesen Knopf <b>um einen Kalender hinzuzufügen</b>. Sie können eine existierende Kalenderdatei hinzufügen oder einen neuen Kalender und KO/Pi legt dann eine neue leere Kalenderdatei für Sie an." }, |
1546 | { "<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)","<b>iCal (*.ics) Datei:</b><br>(Datei wird angelegt, wenn sie nicht existiert)" }, | 1547 | { "<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)","<b>iCal (*.ics) Datei:</b><br>(Datei wird angelegt, wenn sie nicht existiert)" }, |
1547 | { "Error saving data","Fehler beim Abspeichern" }, | 1548 | { "Error saving data","Fehler beim Abspeichern" }, |
1548 | { "Calendar(s) not saved:","Nicht gespeicherte Kalender:" }, | 1549 | { "Calendar(s) not saved:","Nicht gespeicherte Kalender:" }, |
1549 | { "Enable conflict detection","Schalte Konflikterkennung an" }, | 1550 | { "Enable conflict detection","Schalte Konflikterkennung an" }, |
1550 | { "Filter for the edited event","Filter für den bearbeiteten Termin" }, | 1551 | { "Filter for the edited event","Filter für den bearbeiteten Termin" }, |
1551 | { "Filter for other events","Filter für die anderen Termine" }, | 1552 | { "Filter for other events","Filter für die anderen Termine" }, |
1552 | { "Check Allday with Allday","Prüfe GanzTag mit GanzTag" }, | 1553 | { "Check Allday with Allday","Prüfe GanzTag mit GanzTag" }, |
1553 | { "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" }, | 1554 | { "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" }, |
1554 | { "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" }, | 1555 | { "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" }, |
1555 | { "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, | 1556 | { "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, |
1556 | { "Conflict detection","Konflikterkennung" }, | 1557 | { "Conflict detection","Konflikterkennung" }, |
1557 | { "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, | 1558 | { "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, |
1558 | { "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." }, | 1559 | { "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." }, |
1559 | { "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" }, | 1560 | { "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" }, |
1560 | { "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, | 1561 | { "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, |
1561 | { "","" }, | 1562 | { " Yes, close "," Ja, beenden " }, |
1562 | { "","" }, | 1563 | { "Export All Data","Exportiere alle Daten" }, |
1563 | { "","" }, | 1564 | { "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, |
1564 | { "","" }, | 1565 | { "","" }, |
1565 | { "","" }, | 1566 | { "","" }, |
1566 | { "","" }, | 1567 | { "","" }, |
1567 | { "","" }, | 1568 | { "","" }, |
1568 | { "","" }, | 1569 | { "","" }, |
1569 | { "","" }, | 1570 | { "","" }, |
1570 | { "","" }, | 1571 | { "","" }, |
1571 | { "","" }, | 1572 | { "","" }, |
1572 | { "","" }, | 1573 | { "","" }, |
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 2acfacf..a0ac232 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -1,682 +1,674 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the KOrganizer alarm daemon. | 2 | This file is part of the KOrganizer alarm daemon. |
3 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2002 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 "simplealarmdaemonimpl.h" | 24 | #include "simplealarmdaemonimpl.h" |
25 | 25 | ||
26 | #include "alarmdialog.h" | 26 | #include "alarmdialog.h" |
27 | #include <qpopupmenu.h> | 27 | #include <qpopupmenu.h> |
28 | #include <qapp.h> | 28 | #include <qapp.h> |
29 | #include <qdir.h> | 29 | #include <qdir.h> |
30 | #include <qfile.h> | 30 | #include <qfile.h> |
31 | #include <qhbox.h> | 31 | #include <qhbox.h> |
32 | #include <qtimer.h> | 32 | #include <qtimer.h> |
33 | #include <qfile.h> | 33 | #include <qfile.h> |
34 | #include <qdatetime.h> | 34 | #include <qdatetime.h> |
35 | #include <qpushbutton.h> | 35 | #include <qpushbutton.h> |
36 | #include <qlayout.h> | 36 | #include <qlayout.h> |
37 | #include <qlineedit.h> | 37 | #include <qlineedit.h> |
38 | #include <qdialog.h> | 38 | #include <qdialog.h> |
39 | #define protected public | 39 | #define protected public |
40 | #include <qspinbox.h> | 40 | #include <qspinbox.h> |
41 | #undef protected | 41 | #undef protected |
42 | #include <qtextstream.h> | 42 | #include <qtextstream.h> |
43 | #include <qtopia/qcopenvelope_qws.h> | 43 | #include <qtopia/qcopenvelope_qws.h> |
44 | #include <qtopia/alarmserver.h> | 44 | #include <qtopia/alarmserver.h> |
45 | 45 | ||
46 | #include <stdlib.h> | 46 | #include <stdlib.h> |
47 | #include <stdio.h> | 47 | #include <stdio.h> |
48 | #include <unistd.h> | 48 | #include <unistd.h> |
49 | 49 | ||
50 | 50 | ||
51 | SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) | 51 | SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) |
52 | : QLabel( parent ) | 52 | : QLabel( parent ) |
53 | { | 53 | { |
54 | mAlarmDialog = new AlarmDialog( 0 ); | 54 | mAlarmDialog = new AlarmDialog( 0 ); |
55 | mPopUp = new QPopupMenu( this ); | 55 | mPopUp = new QPopupMenu( this ); |
56 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); | 56 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); |
57 | mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); | 57 | mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); |
58 | mPopUp->insertSeparator(); | 58 | mPopUp->insertSeparator(); |
59 | mPopUp->insertItem( "Todo List", this, SLOT ( showTodo() ) ); | 59 | mPopUp->insertItem( "Todo List", this, SLOT ( showTodo() ) ); |
60 | mPopUp->insertSeparator(); | 60 | mPopUp->insertSeparator(); |
61 | mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); | 61 | mPopUp->insertItem( "Addresses", this, SLOT ( showAdd() ) ); |
62 | mPopUp->insertSeparator(); | 62 | mPopUp->insertSeparator(); |
63 | mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); | 63 | mPopUp->insertItem( "Edit Journal", this, SLOT ( writeJournal() ) ); |
64 | mPopUp->insertItem( "New Event", this, SLOT ( newEvent() ) ); | 64 | mPopUp->insertItem( "New Event", this, SLOT ( newEvent() ) ); |
65 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); | 65 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); |
66 | mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); | 66 | mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); |
67 | mPopUp->insertSeparator(); | 67 | mPopUp->insertSeparator(); |
68 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); | 68 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); |
69 | mTimerPopUp = new QPopupMenu( this ); | 69 | mTimerPopUp = new QPopupMenu( this ); |
70 | QFont fon = mTimerPopUp->font(); | ||
71 | int points = 16; | ||
72 | if ( QApplication::desktop()->width() < 480 ) | ||
73 | points = 12; | ||
74 | fon.setPointSize( points ); | ||
75 | //qDebug("point s %d ", fon.pointSize()); | ||
76 | mTimerPopUp->setFont( fon ); | ||
77 | mPopUp->setFont( fon ); | ||
78 | mBeepPopUp = new QPopupMenu( this ); | 70 | mBeepPopUp = new QPopupMenu( this ); |
79 | mSoundPopUp = new QPopupMenu( this ); | 71 | mSoundPopUp = new QPopupMenu( this ); |
80 | mPausePopUp = new QPopupMenu( this ); | 72 | mPausePopUp = new QPopupMenu( this ); |
81 | QPopupMenu* savePopUp = new QPopupMenu( this ); | 73 | QPopupMenu* savePopUp = new QPopupMenu( this ); |
82 | savePopUp->insertItem( "Save", 0 ); | 74 | savePopUp->insertItem( "Save", 0 ); |
83 | savePopUp->insertItem( "Load", 1 ); | 75 | savePopUp->insertItem( "Load", 1 ); |
84 | mSoundPopUp->insertItem( "Buzzer", 0 ); | 76 | mSoundPopUp->insertItem( "Buzzer", 0 ); |
85 | mSoundPopUp->insertItem( "Wav file", 1 ); | 77 | mSoundPopUp->insertItem( "Wav file", 1 ); |
86 | mPausePopUp->insertItem( " 1 sec", 1 ); | 78 | mPausePopUp->insertItem( " 1 sec", 1 ); |
87 | mPausePopUp->insertItem( " 2 sec", 2 ); | 79 | mPausePopUp->insertItem( " 2 sec", 2 ); |
88 | mPausePopUp->insertItem( " 3 sec", 3 ); | 80 | mPausePopUp->insertItem( " 3 sec", 3 ); |
89 | mPausePopUp->insertItem( " 5 sec", 5 ); | 81 | mPausePopUp->insertItem( " 5 sec", 5 ); |
90 | mPausePopUp->insertItem( "10 sec", 10 ); | 82 | mPausePopUp->insertItem( "10 sec", 10 ); |
91 | mPausePopUp->insertItem( "30 sec", 30 ); | 83 | mPausePopUp->insertItem( "30 sec", 30 ); |
92 | mPausePopUp->insertItem( " 1 min", 60 ); | 84 | mPausePopUp->insertItem( " 1 min", 60 ); |
93 | mPausePopUp->insertItem( " 5 min", 300 ); | 85 | mPausePopUp->insertItem( " 5 min", 300 ); |
94 | mPausePopUp->insertItem( "10 min", 600 ); | 86 | mPausePopUp->insertItem( "10 min", 600 ); |
95 | mSuspendPopUp = new QPopupMenu( this ); | 87 | mSuspendPopUp = new QPopupMenu( this ); |
96 | mSuspendPopUp->insertItem( "Off", 0 ); | 88 | mSuspendPopUp->insertItem( "Off", 0 ); |
97 | mSuspendPopUp->insertItem( " 1x", 1 ); | 89 | mSuspendPopUp->insertItem( " 1x", 1 ); |
98 | mSuspendPopUp->insertItem( " 2x", 2 ); | 90 | mSuspendPopUp->insertItem( " 2x", 2 ); |
99 | mSuspendPopUp->insertItem( " 3x", 3 ); | 91 | mSuspendPopUp->insertItem( " 3x", 3 ); |
100 | mSuspendPopUp->insertItem( " 5x", 5 ); | 92 | mSuspendPopUp->insertItem( " 5x", 5 ); |
101 | mSuspendPopUp->insertItem( "10x", 10 ); | 93 | mSuspendPopUp->insertItem( "10x", 10 ); |
102 | mSuspendPopUp->insertItem( "20x", 20 ); | 94 | mSuspendPopUp->insertItem( "20x", 20 ); |
103 | mSuspendPopUp->insertItem( "30x", 30 ); | 95 | mSuspendPopUp->insertItem( "30x", 30 ); |
104 | mBeepPopUp->insertItem( "Auto suspend",mSuspendPopUp ); | 96 | mBeepPopUp->insertItem( "Auto suspend",mSuspendPopUp ); |
105 | mBeepPopUp->insertItem( "Beep interval",mPausePopUp ); | 97 | mBeepPopUp->insertItem( "Beep interval",mPausePopUp ); |
106 | mBeepPopUp->insertItem( "Replay",mSoundPopUp ); | 98 | mBeepPopUp->insertItem( "Replay",mSoundPopUp ); |
107 | mBeepPopUp->insertItem( "Config",savePopUp ); | 99 | mBeepPopUp->insertItem( "Config",savePopUp ); |
108 | mBeepPopUp->insertItem( "300", 300 ); | 100 | mBeepPopUp->insertItem( "300", 300 ); |
109 | mBeepPopUp->insertItem( "180", 180 ); | 101 | mBeepPopUp->insertItem( "180", 180 ); |
110 | mBeepPopUp->insertItem( "60", 60 ); | 102 | mBeepPopUp->insertItem( "60", 60 ); |
111 | mBeepPopUp->insertItem( "30", 30 ); | 103 | mBeepPopUp->insertItem( "30", 30 ); |
112 | mBeepPopUp->insertItem( "10", 10 ); | 104 | mBeepPopUp->insertItem( "10", 10 ); |
113 | mBeepPopUp->insertItem( "3", 3 ); | 105 | mBeepPopUp->insertItem( "3", 3 ); |
114 | mBeepPopUp->insertItem( "1", 1 ); | 106 | mBeepPopUp->insertItem( "1", 1 ); |
115 | mBeepPopUp->insertItem( "Off", 0 ); | 107 | mBeepPopUp->insertItem( "Off", 0 ); |
116 | mBeepPopUp->insertSeparator(); | 108 | mBeepPopUp->insertSeparator(); |
117 | mBeepPopUp->insertItem( "Simulate", 1000 ); | 109 | mBeepPopUp->insertItem( "Simulate", 1000 ); |
118 | mBeepPopUp->setCheckable( true ); | 110 | mBeepPopUp->setCheckable( true ); |
119 | mPopUp->insertSeparator(); | 111 | mPopUp->insertSeparator(); |
120 | mPopUp->insertItem( "Play beeps", mBeepPopUp ); | 112 | mPopUp->insertItem( "Play beeps", mBeepPopUp ); |
121 | mPopUp->insertSeparator(); | 113 | mPopUp->insertSeparator(); |
122 | mPopUp->insertItem( "Timer", mTimerPopUp ); | 114 | mPopUp->insertItem( "Timer", mTimerPopUp ); |
123 | //mPopUp->insertSeparator(); | 115 | //mPopUp->insertSeparator(); |
124 | //mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) ); | 116 | //mPopUp->insertItem( "Simulate", this, SLOT ( simulate() ) ); |
125 | 117 | ||
126 | mPopUp->resize( mPopUp->sizeHint() ); | 118 | mPopUp->resize( mPopUp->sizeHint() ); |
127 | mPlayBeeps = 60; | 119 | mPlayBeeps = 60; |
128 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); | 120 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); |
129 | connect ( mBeepPopUp, SIGNAL( activated ( int ) ), this, SLOT (slotPlayBeep( int ) ) ); | 121 | connect ( mBeepPopUp, SIGNAL( activated ( int ) ), this, SLOT (slotPlayBeep( int ) ) ); |
130 | connect ( mTimerPopUp, SIGNAL( activated ( int ) ), this, SLOT (confTimer( int ) ) ); | 122 | connect ( mTimerPopUp, SIGNAL( activated ( int ) ), this, SLOT (confTimer( int ) ) ); |
131 | connect ( mTimerPopUp, SIGNAL(aboutToShow() ), this, SLOT ( showTimer( ) ) ); | 123 | connect ( mTimerPopUp, SIGNAL(aboutToShow() ), this, SLOT ( showTimer( ) ) ); |
132 | connect ( mSoundPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSound( int ) ) ); | 124 | connect ( mSoundPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSound( int ) ) ); |
133 | connect ( mPausePopUp, SIGNAL( activated ( int ) ), this, SLOT (confPause( int ) ) ); | 125 | connect ( mPausePopUp, SIGNAL( activated ( int ) ), this, SLOT (confPause( int ) ) ); |
134 | connect ( mSuspendPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSuspend( int ) ) ); | 126 | connect ( mSuspendPopUp, SIGNAL( activated ( int ) ), this, SLOT (confSuspend( int ) ) ); |
135 | connect ( savePopUp, SIGNAL( activated ( int ) ), this, SLOT (saveSlot( int ) ) ); | 127 | connect ( savePopUp, SIGNAL( activated ( int ) ), this, SLOT (saveSlot( int ) ) ); |
136 | mTimerTime = 0; | 128 | mTimerTime = 0; |
137 | mCustomText = "Custom Text"; | 129 | mCustomText = "Custom Text"; |
138 | mCustomMinutes = 7; | 130 | mCustomMinutes = 7; |
139 | mTimerPopupConf = 1; | 131 | mTimerPopupConf = 1; |
140 | fillTimerPopUp(); | 132 | fillTimerPopUp(); |
141 | mPausePlay = 0; | 133 | mPausePlay = 0; |
142 | confPause( 1 ); | 134 | confPause( 1 ); |
143 | mSuspend = 0; | 135 | mSuspend = 0; |
144 | confSuspend( 0 ); | 136 | confSuspend( 0 ); |
145 | if ( QApplication::desktop()->width() < 480 ) { | 137 | if ( QApplication::desktop()->width() < 480 ) { |
146 | wavAlarm = false; | 138 | wavAlarm = false; |
147 | mSoundPopUp->setItemChecked ( 0, true ); | 139 | mSoundPopUp->setItemChecked ( 0, true ); |
148 | } | 140 | } |
149 | else { | 141 | else { |
150 | wavAlarm = true; | 142 | wavAlarm = true; |
151 | mSoundPopUp->setItemChecked ( 1, true ); | 143 | mSoundPopUp->setItemChecked ( 1, true ); |
152 | } | 144 | } |
153 | saveSlot( 1 ); | 145 | saveSlot( 1 ); |
154 | } | 146 | } |
155 | 147 | ||
156 | SimpleAlarmDaemonImpl::~SimpleAlarmDaemonImpl() | 148 | SimpleAlarmDaemonImpl::~SimpleAlarmDaemonImpl() |
157 | { | 149 | { |
158 | //delete mPopUp; | 150 | //delete mPopUp; |
159 | delete mAlarmDialog; | 151 | delete mAlarmDialog; |
160 | } | 152 | } |
161 | void SimpleAlarmDaemonImpl::saveSlot( int load ) | 153 | void SimpleAlarmDaemonImpl::saveSlot( int load ) |
162 | { | 154 | { |
163 | QString fileName = QDir::homeDirPath() +"/.kopialarmrc"; | 155 | QString fileName = QDir::homeDirPath() +"/.kopialarmrc"; |
164 | //qDebug("save %d ", load ); | 156 | //qDebug("save %d ", load ); |
165 | QFile file( fileName ); | 157 | QFile file( fileName ); |
166 | if ( load ) { | 158 | if ( load ) { |
167 | if( !QFile::exists( fileName) ) | 159 | if( !QFile::exists( fileName) ) |
168 | return; | 160 | return; |
169 | if (!file.open( IO_ReadOnly ) ) { | 161 | if (!file.open( IO_ReadOnly ) ) { |
170 | return ; | 162 | return ; |
171 | } | 163 | } |
172 | QString line; | 164 | QString line; |
173 | bool ok; | 165 | bool ok; |
174 | int val; | 166 | int val; |
175 | int len; | 167 | int len; |
176 | while ( file.readLine( line, 1024 ) > 0 ) { | 168 | while ( file.readLine( line, 1024 ) > 0 ) { |
177 | //qDebug("read %s ", line.latin1()); | 169 | //qDebug("read %s ", line.latin1()); |
178 | len = line.length(); | 170 | len = line.length(); |
179 | if ( line.left(4 ) == "PPAU" ) { | 171 | if ( line.left(4 ) == "PPAU" ) { |
180 | val = line.mid( 4,len-5).toInt( &ok ); | 172 | val = line.mid( 4,len-5).toInt( &ok ); |
181 | if ( ok ) { | 173 | if ( ok ) { |
182 | confPause( val ); | 174 | confPause( val ); |
183 | } | 175 | } |
184 | } | 176 | } |
185 | if ( line.left(4 ) == "SUCO" ) { | 177 | if ( line.left(4 ) == "SUCO" ) { |
186 | val = line.mid( 4,len-5).toInt( &ok ); | 178 | val = line.mid( 4,len-5).toInt( &ok ); |
187 | if ( ok ) | 179 | if ( ok ) |
188 | confSuspend ( val ); | 180 | confSuspend ( val ); |
189 | } | 181 | } |
190 | if ( line.left(4 ) == "WAAL" ) { | 182 | if ( line.left(4 ) == "WAAL" ) { |
191 | val = line.mid( 4,len-5).toInt( &ok ); | 183 | val = line.mid( 4,len-5).toInt( &ok ); |
192 | if ( ok ) | 184 | if ( ok ) |
193 | confSound( val ); | 185 | confSound( val ); |
194 | 186 | ||
195 | } | 187 | } |
196 | if ( line.left(4 ) == "PLBE" ) { | 188 | if ( line.left(4 ) == "PLBE" ) { |
197 | val = line.mid( 4,len-5).toInt( &ok ); | 189 | val = line.mid( 4,len-5).toInt( &ok ); |
198 | if ( ok ) | 190 | if ( ok ) |
199 | slotPlayBeep( val ); | 191 | slotPlayBeep( val ); |
200 | 192 | ||
201 | } | 193 | } |
202 | if ( line.left(4 ) == "CUTE" ) { | 194 | if ( line.left(4 ) == "CUTE" ) { |
203 | mCustomText = line.mid( 5,len-6); | 195 | mCustomText = line.mid( 5,len-6); |
204 | // qDebug("text ***%s*** ",mCustomText.latin1() ); | 196 | // qDebug("text ***%s*** ",mCustomText.latin1() ); |
205 | 197 | ||
206 | } | 198 | } |
207 | if ( line.left(4 ) == "CUMI" ) { | 199 | if ( line.left(4 ) == "CUMI" ) { |
208 | val = line.mid( 4,len-5).toInt( &ok ); | 200 | val = line.mid( 4,len-5).toInt( &ok ); |
209 | if ( ok ) | 201 | if ( ok ) |
210 | mCustomMinutes = val; | 202 | mCustomMinutes = val; |
211 | 203 | ||
212 | } | 204 | } |
213 | if ( line.left(4 ) == "SUTI" ) { | 205 | if ( line.left(4 ) == "SUTI" ) { |
214 | val = line.mid( 4,len-5).toInt( &ok ); | 206 | val = line.mid( 4,len-5).toInt( &ok ); |
215 | if ( ok ) | 207 | if ( ok ) |
216 | mAlarmDialog->setSuspendTime( val );; | 208 | mAlarmDialog->setSuspendTime( val );; |
217 | 209 | ||
218 | } | 210 | } |
219 | } | 211 | } |
220 | file.close(); | 212 | file.close(); |
221 | } else { | 213 | } else { |
222 | if (!file.open( IO_WriteOnly ) ) { | 214 | if (!file.open( IO_WriteOnly ) ) { |
223 | return; | 215 | return; |
224 | } | 216 | } |
225 | QString configString ; | 217 | QString configString ; |
226 | configString += "PPAU " + QString::number( mPausePlay ) + "\n"; | 218 | configString += "PPAU " + QString::number( mPausePlay ) + "\n"; |
227 | configString += "SUCO " + QString::number( mSuspend ) + "\n"; | 219 | configString += "SUCO " + QString::number( mSuspend ) + "\n"; |
228 | configString += "WAAL " + QString::number( wavAlarm ) + "\n"; | 220 | configString += "WAAL " + QString::number( wavAlarm ) + "\n"; |
229 | configString += "PLBE " + QString::number( mPlayBeeps ) + "\n"; | 221 | configString += "PLBE " + QString::number( mPlayBeeps ) + "\n"; |
230 | configString += "CUTE " + mCustomText + "\n"; | 222 | configString += "CUTE " + mCustomText + "\n"; |
231 | configString += "CUMI " + QString::number( mCustomMinutes ) + "\n"; | 223 | configString += "CUMI " + QString::number( mCustomMinutes ) + "\n"; |
232 | configString += "SUTI " + QString::number( mAlarmDialog->getSuspendTime( )) + "\n"; | 224 | configString += "SUTI " + QString::number( mAlarmDialog->getSuspendTime( )) + "\n"; |
233 | QTextStream ts( &file ); | 225 | QTextStream ts( &file ); |
234 | ts << configString ; | 226 | ts << configString ; |
235 | file.close(); | 227 | file.close(); |
236 | } | 228 | } |
237 | 229 | ||
238 | } | 230 | } |
239 | void SimpleAlarmDaemonImpl::confSuspend( int num ) | 231 | void SimpleAlarmDaemonImpl::confSuspend( int num ) |
240 | { | 232 | { |
241 | mSuspendPopUp->setItemChecked ( mSuspend,false ); | 233 | mSuspendPopUp->setItemChecked ( mSuspend,false ); |
242 | mSuspend = num; | 234 | mSuspend = num; |
243 | mSuspendPopUp->setItemChecked ( mSuspend,true ); | 235 | mSuspendPopUp->setItemChecked ( mSuspend,true ); |
244 | } | 236 | } |
245 | void SimpleAlarmDaemonImpl::confPause( int num ) | 237 | void SimpleAlarmDaemonImpl::confPause( int num ) |
246 | { | 238 | { |
247 | mPausePopUp->setItemChecked ( mPausePlay,false ); | 239 | mPausePopUp->setItemChecked ( mPausePlay,false ); |
248 | mPausePlay = num; | 240 | mPausePlay = num; |
249 | mPausePopUp->setItemChecked ( mPausePlay,true ); | 241 | mPausePopUp->setItemChecked ( mPausePlay,true ); |
250 | } | 242 | } |
251 | void SimpleAlarmDaemonImpl::confSound( int num ) | 243 | void SimpleAlarmDaemonImpl::confSound( int num ) |
252 | { | 244 | { |
253 | if ( num == 0 ) { | 245 | if ( num == 0 ) { |
254 | wavAlarm = false; | 246 | wavAlarm = false; |
255 | mSoundPopUp->setItemChecked ( 0, true ); | 247 | mSoundPopUp->setItemChecked ( 0, true ); |
256 | mSoundPopUp->setItemChecked ( 1, false ); | 248 | mSoundPopUp->setItemChecked ( 1, false ); |
257 | } else { | 249 | } else { |
258 | wavAlarm = true; | 250 | wavAlarm = true; |
259 | mSoundPopUp->setItemChecked ( 0, false ); | 251 | mSoundPopUp->setItemChecked ( 0, false ); |
260 | mSoundPopUp->setItemChecked ( 1, true ); | 252 | mSoundPopUp->setItemChecked ( 1, true ); |
261 | } | 253 | } |
262 | } | 254 | } |
263 | void SimpleAlarmDaemonImpl::slotPlayBeep( int num ) | 255 | void SimpleAlarmDaemonImpl::slotPlayBeep( int num ) |
264 | { | 256 | { |
265 | if ( num == 1000 ) { | 257 | if ( num == 1000 ) { |
266 | simulate(); | 258 | simulate(); |
267 | return; | 259 | return; |
268 | } | 260 | } |
269 | mBeepPopUp->setItemChecked ( mPlayBeeps,false ); | 261 | mBeepPopUp->setItemChecked ( mPlayBeeps,false ); |
270 | mPlayBeeps = num; | 262 | mPlayBeeps = num; |
271 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); | 263 | mBeepPopUp->setItemChecked ( mPlayBeeps, true ); |
272 | } | 264 | } |
273 | 265 | ||
274 | void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& ) | 266 | void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& ) |
275 | { | 267 | { |
276 | //qDebug("SimpleAlarmDaemonImpl::ALARM RECEIVED! %s", msg.data()); | 268 | //qDebug("SimpleAlarmDaemonImpl::ALARM RECEIVED! %s", msg.data()); |
277 | QString mess = QString::fromUtf8(msg.data()); | 269 | QString mess = QString::fromUtf8(msg.data()); |
278 | mAlarmMessage = mess.mid( 9 ); | 270 | mAlarmMessage = mess.mid( 9 ); |
279 | QString filename = getenv("QPEDIR") ; | 271 | QString filename = getenv("QPEDIR") ; |
280 | filename += "/pics/kdepim/korganizer/koalarm.wav"; | 272 | filename += "/pics/kdepim/korganizer/koalarm.wav"; |
281 | QString tempfilename; | 273 | QString tempfilename; |
282 | if ( mess.left( 13 ) == "suspend_alarm") { | 274 | if ( mess.left( 13 ) == "suspend_alarm") { |
283 | bool error = false; | 275 | bool error = false; |
284 | int len = mess.mid( 13 ).find("+++"); | 276 | int len = mess.mid( 13 ).find("+++"); |
285 | if ( len < 2 ) | 277 | if ( len < 2 ) |
286 | error = true; | 278 | error = true; |
287 | else { | 279 | else { |
288 | tempfilename = mess.mid( 13, len ); | 280 | tempfilename = mess.mid( 13, len ); |
289 | if ( !QFile::exists( tempfilename ) ) | 281 | if ( !QFile::exists( tempfilename ) ) |
290 | error = true; | 282 | error = true; |
291 | } | 283 | } |
292 | if ( ! error ) { | 284 | if ( ! error ) { |
293 | filename = tempfilename; | 285 | filename = tempfilename; |
294 | } | 286 | } |
295 | mAlarmMessage = mess.mid( 13+len+3 ); | 287 | mAlarmMessage = mess.mid( 13+len+3 ); |
296 | //qDebug("suspend file %s ",tempfilename.latin1() ); | 288 | //qDebug("suspend file %s ",tempfilename.latin1() ); |
297 | startAlarm( mAlarmMessage, filename); | 289 | startAlarm( mAlarmMessage, filename); |
298 | return; | 290 | return; |
299 | } | 291 | } |
300 | if ( mess.left( 11 ) == "timer_alarm") { | 292 | if ( mess.left( 11 ) == "timer_alarm") { |
301 | mTimerTime = 0; | 293 | mTimerTime = 0; |
302 | startAlarm( mess.mid( 11 ), filename ); | 294 | startAlarm( mess.mid( 11 ), filename ); |
303 | return; | 295 | return; |
304 | } | 296 | } |
305 | if ( mess.left( 10 ) == "proc_alarm") { | 297 | if ( mess.left( 10 ) == "proc_alarm") { |
306 | bool error = false; | 298 | bool error = false; |
307 | int len = mess.mid( 10 ).find("+++"); | 299 | int len = mess.mid( 10 ).find("+++"); |
308 | if ( len < 2 ) | 300 | if ( len < 2 ) |
309 | error = true; | 301 | error = true; |
310 | else { | 302 | else { |
311 | tempfilename = mess.mid( 10, len ); | 303 | tempfilename = mess.mid( 10, len ); |
312 | if ( !QFile::exists( tempfilename ) ) | 304 | if ( !QFile::exists( tempfilename ) ) |
313 | error = true; | 305 | error = true; |
314 | } | 306 | } |
315 | if ( error ) { | 307 | if ( error ) { |
316 | mAlarmMessage = "Procedure Alarm\nError - File not found\n"; | 308 | mAlarmMessage = "Procedure Alarm\nError - File not found\n"; |
317 | mAlarmMessage += mess.mid( 10+len+3+9 ); | 309 | mAlarmMessage += mess.mid( 10+len+3+9 ); |
318 | } else { | 310 | } else { |
319 | //qDebug("-----system command %s ",tempfilename.latin1() ); | 311 | //qDebug("-----system command %s ",tempfilename.latin1() ); |
320 | if ( vfork () == 0 ) { | 312 | if ( vfork () == 0 ) { |
321 | execl ( tempfilename.latin1(), 0 ); | 313 | execl ( tempfilename.latin1(), 0 ); |
322 | return; | 314 | return; |
323 | } | 315 | } |
324 | QTimer::singleShot( 10000, this, SLOT ( writeFile() ) ); | 316 | QTimer::singleShot( 10000, this, SLOT ( writeFile() ) ); |
325 | return; | 317 | return; |
326 | } | 318 | } |
327 | 319 | ||
328 | //qDebug("+++++++system command %s ",tempfilename.latin1() ); | 320 | //qDebug("+++++++system command %s ",tempfilename.latin1() ); |
329 | } | 321 | } |
330 | if ( mess.left( 11 ) == "audio_alarm") { | 322 | if ( mess.left( 11 ) == "audio_alarm") { |
331 | bool error = false; | 323 | bool error = false; |
332 | int len = mess.mid( 11 ).find("+++"); | 324 | int len = mess.mid( 11 ).find("+++"); |
333 | if ( len < 2 ) | 325 | if ( len < 2 ) |
334 | error = true; | 326 | error = true; |
335 | else { | 327 | else { |
336 | tempfilename = mess.mid( 11, len ); | 328 | tempfilename = mess.mid( 11, len ); |
337 | if ( !QFile::exists( tempfilename ) ) | 329 | if ( !QFile::exists( tempfilename ) ) |
338 | error = true; | 330 | error = true; |
339 | } | 331 | } |
340 | if ( ! error ) { | 332 | if ( ! error ) { |
341 | filename = tempfilename; | 333 | filename = tempfilename; |
342 | } | 334 | } |
343 | mAlarmMessage = mess.mid( 11+len+3+9 ); | 335 | mAlarmMessage = mess.mid( 11+len+3+9 ); |
344 | //qDebug("audio file command %s ",tempfilename.latin1() ); | 336 | //qDebug("audio file command %s ",tempfilename.latin1() ); |
345 | } | 337 | } |
346 | if ( mess.left( 9 ) == "cal_alarm") { | 338 | if ( mess.left( 9 ) == "cal_alarm") { |
347 | mAlarmMessage = mess.mid( 9 ) ; | 339 | mAlarmMessage = mess.mid( 9 ) ; |
348 | } | 340 | } |
349 | 341 | ||
350 | QTimer::singleShot( 10000, this, SLOT ( writeFile() ) ); | 342 | QTimer::singleShot( 10000, this, SLOT ( writeFile() ) ); |
351 | startAlarm( mAlarmMessage, filename ); | 343 | startAlarm( mAlarmMessage, filename ); |
352 | 344 | ||
353 | } | 345 | } |
354 | 346 | ||
355 | int SimpleAlarmDaemonImpl::getFileNameLen( QString mess ) | 347 | int SimpleAlarmDaemonImpl::getFileNameLen( QString mess ) |
356 | { | 348 | { |
357 | return 0; | 349 | return 0; |
358 | } | 350 | } |
359 | void SimpleAlarmDaemonImpl::startAlarm( QString mess, QString filename ) | 351 | void SimpleAlarmDaemonImpl::startAlarm( QString mess, QString filename ) |
360 | { | 352 | { |
361 | //mAlarmDialog->show(); | 353 | //mAlarmDialog->show(); |
362 | //mAlarmDialog->raise(); | 354 | //mAlarmDialog->raise(); |
363 | mAlarmDialog->eventNotification( mess, mPlayBeeps, filename, wavAlarm,mPausePlay ,mSuspend ); | 355 | mAlarmDialog->eventNotification( mess, mPlayBeeps, filename, wavAlarm,mPausePlay ,mSuspend ); |
364 | } | 356 | } |
365 | 357 | ||
366 | 358 | ||
367 | void SimpleAlarmDaemonImpl::fillTimerPopUp() | 359 | void SimpleAlarmDaemonImpl::fillTimerPopUp() |
368 | { | 360 | { |
369 | 361 | ||
370 | // qDebug(" timer %d %d ",mTimerPopupConf, mTimerTime ); | 362 | // qDebug(" timer %d %d ",mTimerPopupConf, mTimerTime ); |
371 | if ( mTimerPopupConf == mTimerTime ) { | 363 | if ( mTimerPopupConf == mTimerTime ) { |
372 | if ( mTimerTime ) { | 364 | if ( mTimerTime ) { |
373 | int secs = QDateTime::currentDateTime().secsTo ( mRunningTimer ); | 365 | int secs = QDateTime::currentDateTime().secsTo ( mRunningTimer ); |
374 | QTime t ( secs/3600, (secs/60)%60, secs%60 ); | 366 | QTime t ( secs/3600, (secs/60)%60, secs%60 ); |
375 | mTimerPopUp->changeItem ( 1 , t.toString() + " (countdown)"); | 367 | mTimerPopUp->changeItem ( 1 , t.toString() + " (countdown)"); |
376 | } | 368 | } |
377 | else { | 369 | else { |
378 | QString text = mCustomText.stripWhiteSpace (); | 370 | QString text = mCustomText.stripWhiteSpace (); |
379 | int in = text.find( " " ); | 371 | int in = text.find( " " ); |
380 | text = text.left ( in ); | 372 | text = text.left ( in ); |
381 | mTimerPopUp->changeItem ( 3, text ); | 373 | mTimerPopUp->changeItem ( 3, text ); |
382 | } | 374 | } |
383 | return; | 375 | return; |
384 | } | 376 | } |
385 | mTimerPopupConf = mTimerTime; | 377 | mTimerPopupConf = mTimerTime; |
386 | mTimerPopUp->clear(); | 378 | mTimerPopUp->clear(); |
387 | if ( mTimerTime ) { | 379 | if ( mTimerTime ) { |
388 | int secs = QDateTime::currentDateTime().secsTo ( mRunningTimer ); | 380 | int secs = QDateTime::currentDateTime().secsTo ( mRunningTimer ); |
389 | QTime t ( secs/3600, (secs/60)%60, secs%60 ); | 381 | QTime t ( secs/3600, (secs/60)%60, secs%60 ); |
390 | 382 | ||
391 | 383 | ||
392 | mTimerPopUp->insertItem( "Stop timer "+ mRunningTimerText , 0 ); | 384 | mTimerPopUp->insertItem( "Stop timer "+ mRunningTimerText , 0 ); |
393 | mTimerPopUp->insertItem( t.toString() + " (countdown)",1); | 385 | mTimerPopUp->insertItem( t.toString() + " (countdown)",1); |
394 | mTimerPopUp->insertItem( mRunningTimer.time().toString() + " (alarm)",2); | 386 | mTimerPopUp->insertItem( mRunningTimer.time().toString() + " (alarm)",2); |
395 | } else { | 387 | } else { |
396 | 388 | ||
397 | QString fileName = QDir::homeDirPath() +"/.kopialarmtimerrc"; | 389 | QString fileName = QDir::homeDirPath() +"/.kopialarmtimerrc"; |
398 | QFile file( fileName ); | 390 | QFile file( fileName ); |
399 | if( !QFile::exists( fileName) ) { | 391 | if( !QFile::exists( fileName) ) { |
400 | // write defaults | 392 | // write defaults |
401 | if (!file.open( IO_WriteOnly ) ) { | 393 | if (!file.open( IO_WriteOnly ) ) { |
402 | return; | 394 | return; |
403 | } | 395 | } |
404 | QString configString ; | 396 | QString configString ; |
405 | configString += "#config file for kopi alarm timer\n"; | 397 | configString += "#config file for kopi alarm timer\n"; |
406 | configString += "#format: <Text for popup menu>;<timer countdown in minutes>\n"; | 398 | configString += "#format: <Text for popup menu>;<timer countdown in minutes>\n"; |
407 | configString += "24 hours; 1440\n"; | 399 | configString += "24 hours; 1440\n"; |
408 | configString += "8 hours; 480\n"; | 400 | configString += "8 hours; 480\n"; |
409 | configString += "5 hours; 300\n"; | 401 | configString += "5 hours; 300\n"; |
410 | configString += "1 hour; 60\n"; | 402 | configString += "1 hour; 60\n"; |
411 | configString += "30 min; 30\n"; | 403 | configString += "30 min; 30\n"; |
412 | configString += "15 min; 15\n"; | 404 | configString += "15 min; 15\n"; |
413 | configString += "SEPARATOR\n"; | 405 | configString += "SEPARATOR\n"; |
414 | configString += "Pizza; 22\n"; | 406 | configString += "Pizza; 22\n"; |
415 | configString += "Nap; 45\n"; | 407 | configString += "Nap; 45\n"; |
416 | configString += "Tea; 5\n"; | 408 | configString += "Tea; 5\n"; |
417 | QTextStream ts( &file ); | 409 | QTextStream ts( &file ); |
418 | ts << configString ; | 410 | ts << configString ; |
419 | file.close(); | 411 | file.close(); |
420 | } | 412 | } |
421 | 413 | ||
422 | if (!file.open( IO_ReadOnly ) ) { | 414 | if (!file.open( IO_ReadOnly ) ) { |
423 | return ; | 415 | return ; |
424 | } | 416 | } |
425 | QString line; | 417 | QString line; |
426 | bool ok; | 418 | bool ok; |
427 | while ( file.readLine( line, 1024 ) > 0 ) { | 419 | while ( file.readLine( line, 1024 ) > 0 ) { |
428 | //qDebug("read %s ", line.latin1()); | 420 | //qDebug("read %s ", line.latin1()); |
429 | if ( line.left(1 ) != "#" ) { | 421 | if ( line.left(1 ) != "#" ) { |
430 | // no comment | 422 | // no comment |
431 | if ( line.left(9 ) == "SEPARATOR" ) { | 423 | if ( line.left(9 ) == "SEPARATOR" ) { |
432 | mTimerPopUp->insertSeparator(); | 424 | mTimerPopUp->insertSeparator(); |
433 | } else { | 425 | } else { |
434 | QStringList li = QStringList::split(";",line); | 426 | QStringList li = QStringList::split(";",line); |
435 | ok = false; | 427 | ok = false; |
436 | if ( li.count() == 2 ) { | 428 | if ( li.count() == 2 ) { |
437 | int val = li[1].toInt( &ok ); | 429 | int val = li[1].toInt( &ok ); |
438 | if ( ok && val > 0 ) { | 430 | if ( ok && val > 0 ) { |
439 | mTimerPopUp->insertItem( li[0], val+10); | 431 | mTimerPopUp->insertItem( li[0], val+10); |
440 | } | 432 | } |
441 | } | 433 | } |
442 | } | 434 | } |
443 | } | 435 | } |
444 | } | 436 | } |
445 | file.close(); | 437 | file.close(); |
446 | #if 0 | 438 | #if 0 |
447 | mTimerPopUp->insertItem( "24 hours", 1440 ); | 439 | mTimerPopUp->insertItem( "24 hours", 1440 ); |
448 | // mTimerPopUp->insertItem( i18n("12 h"), 720 ); | 440 | // mTimerPopUp->insertItem( i18n("12 h"), 720 ); |
449 | mTimerPopUp->insertItem( " 8 hours", 480 ); | 441 | mTimerPopUp->insertItem( " 8 hours", 480 ); |
450 | mTimerPopUp->insertItem( " 5 hours", 300 ); | 442 | mTimerPopUp->insertItem( " 5 hours", 300 ); |
451 | // mTimerPopUp->insertItem( i18n(" 2 h"), 120 ); | 443 | // mTimerPopUp->insertItem( i18n(" 2 h"), 120 ); |
452 | mTimerPopUp->insertItem( " 1 hour", 60 ); | 444 | mTimerPopUp->insertItem( " 1 hour", 60 ); |
453 | mTimerPopUp->insertItem( "30 min", 30 ); | 445 | mTimerPopUp->insertItem( "30 min", 30 ); |
454 | mTimerPopUp->insertItem( "15 min", 15 ); | 446 | mTimerPopUp->insertItem( "15 min", 15 ); |
455 | mTimerPopUp->insertItem( "10 min", 10 ); | 447 | mTimerPopUp->insertItem( "10 min", 10 ); |
456 | //mTimerPopUp->insertItem( " 5 min", 5 ); | 448 | //mTimerPopUp->insertItem( " 5 min", 5 ); |
457 | mTimerPopUp->insertSeparator(); | 449 | mTimerPopUp->insertSeparator(); |
458 | mTimerPopUp->insertItem( "Pizza", 22 ); | 450 | mTimerPopUp->insertItem( "Pizza", 22 ); |
459 | mTimerPopUp->insertItem( "Nap", 45 ); | 451 | mTimerPopUp->insertItem( "Nap", 45 ); |
460 | mTimerPopUp->insertItem( "Tea", 5 ); | 452 | mTimerPopUp->insertItem( "Tea", 5 ); |
461 | #endif | 453 | #endif |
462 | QString text = mCustomText.stripWhiteSpace (); | 454 | QString text = mCustomText.stripWhiteSpace (); |
463 | int in = text.find( " " ); | 455 | int in = text.find( " " ); |
464 | text = text.left ( in ); | 456 | text = text.left ( in ); |
465 | mTimerPopUp->insertItem( text, 3 ); | 457 | mTimerPopUp->insertItem( text, 3 ); |
466 | mTimerPopUp->insertSeparator(); | 458 | mTimerPopUp->insertSeparator(); |
467 | mTimerPopUp->insertItem( "Customize", 2 ); | 459 | mTimerPopUp->insertItem( "Customize", 2 ); |
468 | } | 460 | } |
469 | 461 | ||
470 | } | 462 | } |
471 | 463 | ||
472 | void SimpleAlarmDaemonImpl::showTimer() | 464 | void SimpleAlarmDaemonImpl::showTimer() |
473 | { | 465 | { |
474 | fillTimerPopUp(); | 466 | fillTimerPopUp(); |
475 | } | 467 | } |
476 | 468 | ||
477 | void SimpleAlarmDaemonImpl::confTimer( int time ) | 469 | void SimpleAlarmDaemonImpl::confTimer( int time ) |
478 | { | 470 | { |
479 | //qDebug("impleAlarmDaemonImpl::confTimer() %d ", time ); | 471 | //qDebug("impleAlarmDaemonImpl::confTimer() %d ", time ); |
480 | int minutes = time; | 472 | int minutes = time; |
481 | if ( minutes == 0 ) { | 473 | if ( minutes == 0 ) { |
482 | if ( ! mTimerTime ) | 474 | if ( ! mTimerTime ) |
483 | return; | 475 | return; |
484 | 476 | ||
485 | QDialog dia ( 0, ("Stop Timer" ), true ); | 477 | QDialog dia ( 0, ("Stop Timer" ), true ); |
486 | QLabel lab (("Really stop the timer?\n\n"+ mRunningTimerText+"\n"), &dia ); | 478 | QLabel lab (("Really stop the timer?\n\n"+ mRunningTimerText+"\n"), &dia ); |
487 | lab.setAlignment( AlignCenter ); | 479 | lab.setAlignment( AlignCenter ); |
488 | dia.setCaption(("KO/Pi Timer Stop" )); | 480 | dia.setCaption(("KO/Pi Timer Stop" )); |
489 | QVBoxLayout lay( &dia ); | 481 | QVBoxLayout lay( &dia ); |
490 | lay.addWidget( &lab); | 482 | lay.addWidget( &lab); |
491 | QPushButton ok ( "Stop timer!", &dia); | 483 | QPushButton ok ( "Stop timer!", &dia); |
492 | QFont fo = dia.font(); | 484 | QFont fo = dia.font(); |
493 | fo.setPointSize( 36 ); | 485 | fo.setPointSize( 36 ); |
494 | ok.setFont( fo ); | 486 | ok.setFont( fo ); |
495 | lay.addWidget( &ok); | 487 | lay.addWidget( &ok); |
496 | connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) ); | 488 | connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) ); |
497 | QPushButton con ( "Continue timer!", &dia); | 489 | QPushButton con ( "Continue timer!", &dia); |
498 | fo.setPointSize( 36 ); | 490 | fo.setPointSize( 36 ); |
499 | con.setFont( fo ); | 491 | con.setFont( fo ); |
500 | lay.addWidget( &con); | 492 | lay.addWidget( &con); |
501 | connect ( &con, SIGNAL (clicked()), &dia, SLOT ( reject() ) ); | 493 | connect ( &con, SIGNAL (clicked()), &dia, SLOT ( reject() ) ); |
502 | lay.setMargin(5); | 494 | lay.setMargin(5); |
503 | lay.setSpacing(5); | 495 | lay.setSpacing(5); |
504 | dia.resize(dia.sizeHint() ); | 496 | dia.resize(dia.sizeHint() ); |
505 | 497 | ||
506 | if ( !dia.exec() ) | 498 | if ( !dia.exec() ) |
507 | return; | 499 | return; |
508 | 500 | ||
509 | AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.utf8() ); | 501 | AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.utf8() ); |
510 | mTimerTime = 0; | 502 | mTimerTime = 0; |
511 | return; | 503 | return; |
512 | } | 504 | } |
513 | if ( mTimerTime ) | 505 | if ( mTimerTime ) |
514 | return; | 506 | return; |
515 | if ( minutes == 1 ) { | 507 | if ( minutes == 1 ) { |
516 | return; | 508 | return; |
517 | } | 509 | } |
518 | QString mess = "timer_alarm"; | 510 | QString mess = "timer_alarm"; |
519 | mess += ("Timer Alarm!\n"); | 511 | mess += ("Timer Alarm!\n"); |
520 | if ( minutes == 3 ) { | 512 | if ( minutes == 3 ) { |
521 | mess += mCustomText; | 513 | mess += mCustomText; |
522 | minutes = mCustomMinutes ; | 514 | minutes = mCustomMinutes ; |
523 | mRunningTimerText = mCustomText.stripWhiteSpace (); | 515 | mRunningTimerText = mCustomText.stripWhiteSpace (); |
524 | int in = mRunningTimerText.find( " " ); | 516 | int in = mRunningTimerText.find( " " ); |
525 | mRunningTimerText = mRunningTimerText.left ( in ); | 517 | mRunningTimerText = mRunningTimerText.left ( in ); |
526 | } | 518 | } |
527 | else { | 519 | else { |
528 | if ( minutes == 2 ) { | 520 | if ( minutes == 2 ) { |
529 | // ask time | 521 | // ask time |
530 | QDialog dia ( 0, ("Customize Timer" ), true ); | 522 | QDialog dia ( 0, ("Customize Timer" ), true ); |
531 | QLabel lab (("Message Text:"), &dia ); | 523 | QLabel lab (("Message Text:"), &dia ); |
532 | dia.setCaption(("KO/Pi Timer" )); | 524 | dia.setCaption(("KO/Pi Timer" )); |
533 | QVBoxLayout lay( &dia ); | 525 | QVBoxLayout lay( &dia ); |
534 | lay.setMargin(5); | 526 | lay.setMargin(5); |
535 | lay.setSpacing(5); | 527 | lay.setSpacing(5); |
536 | lay.addWidget( &lab); | 528 | lay.addWidget( &lab); |
537 | QLineEdit lEdit( mCustomText, &dia ); | 529 | QLineEdit lEdit( mCustomText, &dia ); |
538 | lay.addWidget( &lEdit); | 530 | lay.addWidget( &lEdit); |
539 | QLabel lab2 (("Countdown time (1 min - 24 h):"), &dia ); | 531 | QLabel lab2 (("Countdown time (1 min - 24 h):"), &dia ); |
540 | lay.addWidget( &lab2); | 532 | lay.addWidget( &lab2); |
541 | QHBox hbox1 ( &dia ); | 533 | QHBox hbox1 ( &dia ); |
542 | lay.addWidget( &hbox1); | 534 | lay.addWidget( &hbox1); |
543 | QLabel lab3 (("Hours"), &hbox1 ); | 535 | QLabel lab3 (("Hours"), &hbox1 ); |
544 | QLabel lab4 (("Minutes"), &hbox1 ); | 536 | QLabel lab4 (("Minutes"), &hbox1 ); |
545 | QHBox hbox ( &dia ); | 537 | QHBox hbox ( &dia ); |
546 | QSpinBox spinh( 0, 24, 1,& hbox ); | 538 | QSpinBox spinh( 0, 24, 1,& hbox ); |
547 | QFont fo = dia.font(); | 539 | QFont fo = dia.font(); |
548 | fo.setPointSize( 36 ); | 540 | fo.setPointSize( 36 ); |
549 | QSpinBox spinm( 0, 59, 1,&hbox ); | 541 | QSpinBox spinm( 0, 59, 1,&hbox ); |
550 | spinm.setFont( fo ); | 542 | spinm.setFont( fo ); |
551 | spinh.setFont( fo ); | 543 | spinh.setFont( fo ); |
552 | spinh.setButtonSymbols( QSpinBox::PlusMinus ); | 544 | spinh.setButtonSymbols( QSpinBox::PlusMinus ); |
553 | spinm.setButtonSymbols( QSpinBox::PlusMinus ); | 545 | spinm.setButtonSymbols( QSpinBox::PlusMinus ); |
554 | spinh.upButton ()->setFixedSize( QSize( 48, 30 )); | 546 | spinh.upButton ()->setFixedSize( QSize( 48, 30 )); |
555 | spinh.downButton ()->setFixedSize( QSize( 48, 30 )); | 547 | spinh.downButton ()->setFixedSize( QSize( 48, 30 )); |
556 | //spinh.editor ()->setFixedSize( QSize( 50, 100 )); | 548 | //spinh.editor ()->setFixedSize( QSize( 50, 100 )); |
557 | spinh.setFixedSize( 100,62 ); | 549 | spinh.setFixedSize( 100,62 ); |
558 | spinm.upButton ()->setFixedSize( QSize( 48, 30 )); | 550 | spinm.upButton ()->setFixedSize( QSize( 48, 30 )); |
559 | spinm.downButton ()->setFixedSize( QSize( 48, 30 )); | 551 | spinm.downButton ()->setFixedSize( QSize( 48, 30 )); |
560 | spinm.downButton ()->setGeometry( 50,50,50,50); | 552 | spinm.downButton ()->setGeometry( 50,50,50,50); |
561 | // spinm.setSuffix( " m" ); | 553 | // spinm.setSuffix( " m" ); |
562 | //spinh.setSuffix( " h" ); | 554 | //spinh.setSuffix( " h" ); |
563 | spinm.setWrapping ( true ); | 555 | spinm.setWrapping ( true ); |
564 | //spinm.editor ()->setFixedSize( QSize( 50, 100 )); | 556 | //spinm.editor ()->setFixedSize( QSize( 50, 100 )); |
565 | spinm.setLineStep( 1 ); | 557 | spinm.setLineStep( 1 ); |
566 | spinm.setFixedSize( 110,62 ); | 558 | spinm.setFixedSize( 110,62 ); |
567 | lay.addWidget( &hbox); | 559 | lay.addWidget( &hbox); |
568 | QLabel lab5 ("Timer fires at:", &dia ); | 560 | QLabel lab5 ("Timer fires at:", &dia ); |
569 | lab5.setAlignment( AlignCenter ); | 561 | lab5.setAlignment( AlignCenter ); |
570 | lay.addWidget( &lab5); | 562 | lay.addWidget( &lab5); |
571 | KODateLabel dl ( &dia ); | 563 | KODateLabel dl ( &dia ); |
572 | dl.setAlignment( AlignCenter ); | 564 | dl.setAlignment( AlignCenter ); |
573 | dl.setFont( fo ); | 565 | dl.setFont( fo ); |
574 | connect ( &spinh, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_hours( int ) ) ); | 566 | connect ( &spinh, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_hours( int ) ) ); |
575 | connect ( &spinm, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_minutes( int ) ) ); | 567 | connect ( &spinm, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_minutes( int ) ) ); |
576 | lay.addWidget( &dl); | 568 | lay.addWidget( &dl); |
577 | spinh.setValue( mCustomMinutes/60 ); | 569 | spinh.setValue( mCustomMinutes/60 ); |
578 | spinm.setValue( mCustomMinutes%60 ); | 570 | spinm.setValue( mCustomMinutes%60 ); |
579 | QPushButton ok ( "Start timer", &dia); | 571 | QPushButton ok ( "Start timer", &dia); |
580 | ok.setDefault( true ); | 572 | ok.setDefault( true ); |
581 | ok.setFont( fo ); | 573 | ok.setFont( fo ); |
582 | spinh.setFocus(); | 574 | spinh.setFocus(); |
583 | lay.addWidget( &ok); | 575 | lay.addWidget( &ok); |
584 | connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) ); | 576 | connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) ); |
585 | dia.resize( dia.sizeHint().width(), dia.sizeHint().height() ); | 577 | dia.resize( dia.sizeHint().width(), dia.sizeHint().height() ); |
586 | 578 | ||
587 | if ( !dia.exec() ) | 579 | if ( !dia.exec() ) |
588 | return; | 580 | return; |
589 | mCustomText = lEdit.text(); | 581 | mCustomText = lEdit.text(); |
590 | mCustomMinutes = spinh.value()*60+spinm.value(); | 582 | mCustomMinutes = spinh.value()*60+spinm.value(); |
591 | if ( mCustomMinutes == 0 ) | 583 | if ( mCustomMinutes == 0 ) |
592 | mCustomMinutes = 1; | 584 | mCustomMinutes = 1; |
593 | if ( mCustomMinutes > 1440 ) | 585 | if ( mCustomMinutes > 1440 ) |
594 | mCustomMinutes = 1440; | 586 | mCustomMinutes = 1440; |
595 | mess += mCustomText; | 587 | mess += mCustomText; |
596 | minutes = mCustomMinutes; | 588 | minutes = mCustomMinutes; |
597 | mRunningTimerText = mCustomText.stripWhiteSpace (); | 589 | mRunningTimerText = mCustomText.stripWhiteSpace (); |
598 | int in = mRunningTimerText.find( " " ); | 590 | int in = mRunningTimerText.find( " " ); |
599 | mRunningTimerText = mRunningTimerText.left ( in ); | 591 | mRunningTimerText = mRunningTimerText.left ( in ); |
600 | } | 592 | } |
601 | else { | 593 | else { |
602 | mess += mTimerPopUp->text( minutes ); | 594 | mess += mTimerPopUp->text( minutes ); |
603 | mRunningTimerText = mTimerPopUp->text( minutes ); | 595 | mRunningTimerText = mTimerPopUp->text( minutes ); |
604 | minutes -= 10; | 596 | minutes -= 10; |
605 | } | 597 | } |
606 | } | 598 | } |
607 | //minutes = 1; | 599 | //minutes = 1; |
608 | 600 | ||
609 | mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); | 601 | mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); |
610 | timerMesssage = mess; | 602 | timerMesssage = mess; |
611 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); | 603 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); |
612 | mTimerTime = 1; | 604 | mTimerTime = 1; |
613 | } | 605 | } |
614 | 606 | ||
615 | void SimpleAlarmDaemonImpl::writeFile() | 607 | void SimpleAlarmDaemonImpl::writeFile() |
616 | { | 608 | { |
617 | QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); | 609 | QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); |
618 | //QCopEnvelope e("QPE/Application/kopi", "-writeFile"); | 610 | //QCopEnvelope e("QPE/Application/kopi", "-writeFile"); |
619 | } | 611 | } |
620 | void SimpleAlarmDaemonImpl::showWN() | 612 | void SimpleAlarmDaemonImpl::showWN() |
621 | { | 613 | { |
622 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); | 614 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); |
623 | } | 615 | } |
624 | void SimpleAlarmDaemonImpl::newTodo() | 616 | void SimpleAlarmDaemonImpl::newTodo() |
625 | { | 617 | { |
626 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); | 618 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); |
627 | } | 619 | } |
628 | 620 | ||
629 | void SimpleAlarmDaemonImpl::newEvent() | 621 | void SimpleAlarmDaemonImpl::newEvent() |
630 | { | 622 | { |
631 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); | 623 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); |
632 | 624 | ||
633 | } | 625 | } |
634 | void SimpleAlarmDaemonImpl::newMail() | 626 | void SimpleAlarmDaemonImpl::newMail() |
635 | { | 627 | { |
636 | QCopEnvelope e("QPE/Application/ompi", "newMail()"); | 628 | QCopEnvelope e("QPE/Application/ompi", "newMail()"); |
637 | } | 629 | } |
638 | void SimpleAlarmDaemonImpl::showAdd() | 630 | void SimpleAlarmDaemonImpl::showAdd() |
639 | { | 631 | { |
640 | QCopEnvelope e("QPE/Application/kapi", "raise()"); | 632 | QCopEnvelope e("QPE/Application/kapi", "raise()"); |
641 | } | 633 | } |
642 | void SimpleAlarmDaemonImpl::ringSync() | 634 | void SimpleAlarmDaemonImpl::ringSync() |
643 | { | 635 | { |
644 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); | 636 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); |
645 | 637 | ||
646 | } | 638 | } |
647 | void SimpleAlarmDaemonImpl::newCountdown() | 639 | void SimpleAlarmDaemonImpl::newCountdown() |
648 | { | 640 | { |
649 | //recieve("cal_alarm", 10 ); | 641 | //recieve("cal_alarm", 10 ); |
650 | } | 642 | } |
651 | void SimpleAlarmDaemonImpl::simulate() | 643 | void SimpleAlarmDaemonImpl::simulate() |
652 | { | 644 | { |
653 | QTimer::singleShot( 10000, this, SLOT ( writeFile() ) ); | 645 | QTimer::singleShot( 10000, this, SLOT ( writeFile() ) ); |
654 | QString filename = getenv("QPEDIR") ; | 646 | QString filename = getenv("QPEDIR") ; |
655 | filename += "/pics/kdepim/korganizer/koalarm.wav"; | 647 | filename += "/pics/kdepim/korganizer/koalarm.wav"; |
656 | startAlarm("Alarm simulation", filename ); | 648 | startAlarm("Alarm simulation", filename ); |
657 | } | 649 | } |
658 | void SimpleAlarmDaemonImpl::showKO() | 650 | void SimpleAlarmDaemonImpl::showKO() |
659 | { | 651 | { |
660 | QCopEnvelope e("QPE/Application/kopi", "-showKO"); | 652 | QCopEnvelope e("QPE/Application/kopi", "-showKO"); |
661 | // testing only | 653 | // testing only |
662 | //QCopEnvelope e("QPE/Application/kopi", "nextView()"); | 654 | //QCopEnvelope e("QPE/Application/kopi", "nextView()"); |
663 | 655 | ||
664 | } | 656 | } |
665 | void SimpleAlarmDaemonImpl::showTodo() | 657 | void SimpleAlarmDaemonImpl::showTodo() |
666 | { | 658 | { |
667 | QCopEnvelope e("QPE/Application/kopi", "-showTodo"); | 659 | QCopEnvelope e("QPE/Application/kopi", "-showTodo"); |
668 | 660 | ||
669 | } | 661 | } |
670 | void SimpleAlarmDaemonImpl::writeJournal() | 662 | void SimpleAlarmDaemonImpl::writeJournal() |
671 | { | 663 | { |
672 | QCopEnvelope e("QPE/Application/kopi", "-showJournal"); | 664 | QCopEnvelope e("QPE/Application/kopi", "-showJournal"); |
673 | 665 | ||
674 | } | 666 | } |
675 | 667 | ||
676 | void SimpleAlarmDaemonImpl::mousePressEvent( QMouseEvent * ) | 668 | void SimpleAlarmDaemonImpl::mousePressEvent( QMouseEvent * ) |
677 | { | 669 | { |
678 | 670 | ||
679 | mPopUp->popup(mapToGlobal(QPoint (0, -mPopUp->height() ))); | 671 | mPopUp->popup(mapToGlobal(QPoint (0, -mPopUp->height() ))); |
680 | 672 | ||
681 | } | 673 | } |
682 | 674 | ||
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 79fb727..2ba8528 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1526,3632 +1526,3635 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b | |||
1526 | return 2; | 1526 | return 2; |
1527 | break; | 1527 | break; |
1528 | 1528 | ||
1529 | default: | 1529 | default: |
1530 | // SYNC_PREF_TAKE_BOTH not implemented | 1530 | // SYNC_PREF_TAKE_BOTH not implemented |
1531 | break; | 1531 | break; |
1532 | } | 1532 | } |
1533 | return 0; | 1533 | return 0; |
1534 | } | 1534 | } |
1535 | Event* CalendarView::getLastSyncEvent() | 1535 | Event* CalendarView::getLastSyncEvent() |
1536 | { | 1536 | { |
1537 | Event* lse; | 1537 | Event* lse; |
1538 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); | 1538 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); |
1539 | lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); | 1539 | lse = mCalendar->event( "last-syncEvent-"+mCurrentSyncDevice ); |
1540 | if (!lse) { | 1540 | if (!lse) { |
1541 | lse = new Event(); | 1541 | lse = new Event(); |
1542 | lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); | 1542 | lse->setUid( "last-syncEvent-"+mCurrentSyncDevice ); |
1543 | QString sum = ""; | 1543 | QString sum = ""; |
1544 | if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) | 1544 | if ( mSyncManager->mExternSyncProfiles.contains( mCurrentSyncDevice ) ) |
1545 | sum = "E: "; | 1545 | sum = "E: "; |
1546 | lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); | 1546 | lse->setSummary(sum+mCurrentSyncDevice + i18n(" - sync event")); |
1547 | lse->setDtStart( mLastCalendarSync ); | 1547 | lse->setDtStart( mLastCalendarSync ); |
1548 | lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); | 1548 | lse->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); |
1549 | lse->setCategories( i18n("SyncEvent") ); | 1549 | lse->setCategories( i18n("SyncEvent") ); |
1550 | lse->setReadOnly( true ); | 1550 | lse->setReadOnly( true ); |
1551 | mCalendar->addEvent( lse ); | 1551 | mCalendar->addEvent( lse ); |
1552 | } | 1552 | } |
1553 | 1553 | ||
1554 | return lse; | 1554 | return lse; |
1555 | 1555 | ||
1556 | } | 1556 | } |
1557 | 1557 | ||
1558 | // we check, if the to delete event has a id for a profile | 1558 | // we check, if the to delete event has a id for a profile |
1559 | // if yes, we set this id in the profile to delete | 1559 | // if yes, we set this id in the profile to delete |
1560 | void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) | 1560 | void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) |
1561 | { | 1561 | { |
1562 | if ( lastSync.count() == 0 ) { | 1562 | if ( lastSync.count() == 0 ) { |
1563 | //qDebug(" lastSync.count() == 0"); | 1563 | //qDebug(" lastSync.count() == 0"); |
1564 | return; | 1564 | return; |
1565 | } | 1565 | } |
1566 | if ( toDelete->typeID() == journalID ) | 1566 | if ( toDelete->typeID() == journalID ) |
1567 | return; | 1567 | return; |
1568 | 1568 | ||
1569 | Event* eve = lastSync.first(); | 1569 | Event* eve = lastSync.first(); |
1570 | 1570 | ||
1571 | while ( eve ) { | 1571 | while ( eve ) { |
1572 | QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name | 1572 | QString id = toDelete->getID( eve->uid().mid( 15 ) ); // this is the sync profile name |
1573 | if ( !id.isEmpty() ) { | 1573 | if ( !id.isEmpty() ) { |
1574 | QString des = eve->description(); | 1574 | QString des = eve->description(); |
1575 | QString pref = "e"; | 1575 | QString pref = "e"; |
1576 | if ( toDelete->typeID() == todoID ) | 1576 | if ( toDelete->typeID() == todoID ) |
1577 | pref = "t"; | 1577 | pref = "t"; |
1578 | des += pref+ id + ","; | 1578 | des += pref+ id + ","; |
1579 | eve->setReadOnly( false ); | 1579 | eve->setReadOnly( false ); |
1580 | eve->setDescription( des ); | 1580 | eve->setDescription( des ); |
1581 | //qDebug("setdes %s ", des.latin1()); | 1581 | //qDebug("setdes %s ", des.latin1()); |
1582 | eve->setReadOnly( true ); | 1582 | eve->setReadOnly( true ); |
1583 | } | 1583 | } |
1584 | eve = lastSync.next(); | 1584 | eve = lastSync.next(); |
1585 | } | 1585 | } |
1586 | 1586 | ||
1587 | } | 1587 | } |
1588 | void CalendarView::checkExternalId( Incidence * inc ) | 1588 | void CalendarView::checkExternalId( Incidence * inc ) |
1589 | { | 1589 | { |
1590 | QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; | 1590 | QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; |
1591 | checkExternSyncEvent( lastSync, inc ); | 1591 | checkExternSyncEvent( lastSync, inc ); |
1592 | 1592 | ||
1593 | } | 1593 | } |
1594 | bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) | 1594 | bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int mode ) |
1595 | { | 1595 | { |
1596 | bool syncOK = true; | 1596 | bool syncOK = true; |
1597 | int addedEvent = 0; | 1597 | int addedEvent = 0; |
1598 | int addedEventR = 0; | 1598 | int addedEventR = 0; |
1599 | int deletedEventR = 0; | 1599 | int deletedEventR = 0; |
1600 | int deletedEventL = 0; | 1600 | int deletedEventL = 0; |
1601 | int changedLocal = 0; | 1601 | int changedLocal = 0; |
1602 | int changedRemote = 0; | 1602 | int changedRemote = 0; |
1603 | int filteredIN = 0; | 1603 | int filteredIN = 0; |
1604 | int filteredOUT = 0; | 1604 | int filteredOUT = 0; |
1605 | //QPtrList<Event> el = local->rawEvents(); | 1605 | //QPtrList<Event> el = local->rawEvents(); |
1606 | Event* eventR; | 1606 | Event* eventR; |
1607 | QString uid; | 1607 | QString uid; |
1608 | int take; | 1608 | int take; |
1609 | Event* eventRSync; | 1609 | Event* eventRSync; |
1610 | Event* eventLSync; | 1610 | Event* eventLSync; |
1611 | clearAllViews(); | 1611 | clearAllViews(); |
1612 | QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); | 1612 | QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); |
1613 | QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); | 1613 | QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); |
1614 | bool fullDateRange = false; | 1614 | bool fullDateRange = false; |
1615 | local->resetTempSyncStat(); | 1615 | local->resetTempSyncStat(); |
1616 | mLastCalendarSync = QDateTime::currentDateTime(); | 1616 | mLastCalendarSync = QDateTime::currentDateTime(); |
1617 | if ( mSyncManager->syncWithDesktop() ) { | 1617 | if ( mSyncManager->syncWithDesktop() ) { |
1618 | remote->resetPilotStat(1); | 1618 | remote->resetPilotStat(1); |
1619 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { | 1619 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { |
1620 | mLastCalendarSync = KSyncManager::mRequestedSyncEvent; | 1620 | mLastCalendarSync = KSyncManager::mRequestedSyncEvent; |
1621 | qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); | 1621 | qDebug("KO: using extern time for calendar sync: %s ", mLastCalendarSync.toString().latin1() ); |
1622 | } else { | 1622 | } else { |
1623 | qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); | 1623 | qDebug("KSyncManager::mRequestedSyncEvent has invalid datatime "); |
1624 | } | 1624 | } |
1625 | } | 1625 | } |
1626 | QDateTime modifiedCalendar = mLastCalendarSync; | 1626 | QDateTime modifiedCalendar = mLastCalendarSync; |
1627 | eventLSync = getLastSyncEvent(); | 1627 | eventLSync = getLastSyncEvent(); |
1628 | eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); | 1628 | eventR = remote->event("last-syncEvent-"+mCurrentSyncName ); |
1629 | if ( eventR ) { | 1629 | if ( eventR ) { |
1630 | qDebug("last-syncEvent on remote found "); | 1630 | qDebug("last-syncEvent on remote found "); |
1631 | eventRSync = (Event*) eventR->clone(); | 1631 | eventRSync = (Event*) eventR->clone(); |
1632 | remote->deleteEvent(eventR ); | 1632 | remote->deleteEvent(eventR ); |
1633 | 1633 | ||
1634 | } else { | 1634 | } else { |
1635 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { | 1635 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL || mSyncManager->syncWithDesktop()) { |
1636 | eventRSync = (Event*)eventLSync->clone(); | 1636 | eventRSync = (Event*)eventLSync->clone(); |
1637 | } else { | 1637 | } else { |
1638 | fullDateRange = true; | 1638 | fullDateRange = true; |
1639 | eventRSync = new Event(); | 1639 | eventRSync = new Event(); |
1640 | eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); | 1640 | eventRSync->setSummary(mCurrentSyncName + i18n(" - sync event")); |
1641 | eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); | 1641 | eventRSync->setUid("last-syncEvent-"+mCurrentSyncName ); |
1642 | eventRSync->setDtStart( mLastCalendarSync ); | 1642 | eventRSync->setDtStart( mLastCalendarSync ); |
1643 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); | 1643 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 7200 ) ); |
1644 | eventRSync->setCategories( i18n("SyncEvent") ); | 1644 | eventRSync->setCategories( i18n("SyncEvent") ); |
1645 | } | 1645 | } |
1646 | } | 1646 | } |
1647 | if ( eventLSync->dtStart() == mLastCalendarSync ) | 1647 | if ( eventLSync->dtStart() == mLastCalendarSync ) |
1648 | fullDateRange = true; | 1648 | fullDateRange = true; |
1649 | 1649 | ||
1650 | if ( ! fullDateRange ) { | 1650 | if ( ! fullDateRange ) { |
1651 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { | 1651 | if ( eventLSync->dtStart() != eventRSync->dtStart() ) { |
1652 | 1652 | ||
1653 | qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); | 1653 | qDebug("set fulldate to true %s %s" ,eventLSync->dtStart().toString().latin1(), eventRSync->dtStart().toString().latin1() ); |
1654 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); | 1654 | //qDebug("%d %d %d %d ", eventLSync->dtStart().time().second(), eventLSync->dtStart().time().msec() , eventRSync->dtStart().time().second(), eventRSync->dtStart().time().msec()); |
1655 | fullDateRange = true; | 1655 | fullDateRange = true; |
1656 | } | 1656 | } |
1657 | } | 1657 | } |
1658 | if ( mSyncManager->syncWithDesktop() ) { | 1658 | if ( mSyncManager->syncWithDesktop() ) { |
1659 | fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); | 1659 | fullDateRange = ( eventLSync->dtStart() <= mLastCalendarSync && eventLSync->dtStart().addSecs(1) >= mLastCalendarSync ); |
1660 | } | 1660 | } |
1661 | if ( fullDateRange ) | 1661 | if ( fullDateRange ) |
1662 | mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); | 1662 | mLastCalendarSync = QDateTime::currentDateTime().addDays( -100*365); |
1663 | else | 1663 | else |
1664 | mLastCalendarSync = eventLSync->dtStart(); | 1664 | mLastCalendarSync = eventLSync->dtStart(); |
1665 | // for resyncing if own file has changed | 1665 | // for resyncing if own file has changed |
1666 | if ( mCurrentSyncDevice == "deleteaftersync" ) { | 1666 | if ( mCurrentSyncDevice == "deleteaftersync" ) { |
1667 | mLastCalendarSync = loadedFileVersion; | 1667 | mLastCalendarSync = loadedFileVersion; |
1668 | //qDebug("setting mLastCalendarSync "); | 1668 | //qDebug("setting mLastCalendarSync "); |
1669 | } | 1669 | } |
1670 | //qDebug("*************************** "); | 1670 | //qDebug("*************************** "); |
1671 | qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); | 1671 | qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); |
1672 | QPtrList<Incidence> er = remote->rawIncidences(); | 1672 | QPtrList<Incidence> er = remote->rawIncidences(); |
1673 | Incidence* inR = er.first(); | 1673 | Incidence* inR = er.first(); |
1674 | Incidence* inL; | 1674 | Incidence* inL; |
1675 | QProgressBar bar( er.count(),0 ); | 1675 | QProgressBar bar( er.count(),0 ); |
1676 | bar.setCaption (i18n("Syncing - close to abort!") ); | 1676 | bar.setCaption (i18n("Syncing - close to abort!") ); |
1677 | 1677 | ||
1678 | // ************** setting up filter ************* | 1678 | // ************** setting up filter ************* |
1679 | CalFilter *filterIN = 0; | 1679 | CalFilter *filterIN = 0; |
1680 | CalFilter *filterOUT = 0; | 1680 | CalFilter *filterOUT = 0; |
1681 | CalFilter *filter = mFilters.first(); | 1681 | CalFilter *filter = mFilters.first(); |
1682 | while(filter) { | 1682 | while(filter) { |
1683 | if ( filter->name() == mSyncManager->mFilterInCal ) | 1683 | if ( filter->name() == mSyncManager->mFilterInCal ) |
1684 | filterIN = filter; | 1684 | filterIN = filter; |
1685 | if ( filter->name() == mSyncManager->mFilterOutCal ) | 1685 | if ( filter->name() == mSyncManager->mFilterOutCal ) |
1686 | filterOUT = filter; | 1686 | filterOUT = filter; |
1687 | filter = mFilters.next(); | 1687 | filter = mFilters.next(); |
1688 | } | 1688 | } |
1689 | int w = 300; | 1689 | int w = 300; |
1690 | if ( QApplication::desktop()->width() < 320 ) | 1690 | if ( QApplication::desktop()->width() < 320 ) |
1691 | w = 220; | 1691 | w = 220; |
1692 | int h = bar.sizeHint().height() ; | 1692 | int h = bar.sizeHint().height() ; |
1693 | int dw = QApplication::desktop()->width(); | 1693 | int dw = QApplication::desktop()->width(); |
1694 | int dh = QApplication::desktop()->height(); | 1694 | int dh = QApplication::desktop()->height(); |
1695 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 1695 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
1696 | bar.show(); | 1696 | bar.show(); |
1697 | int modulo = (er.count()/10)+1; | 1697 | int modulo = (er.count()/10)+1; |
1698 | int incCounter = 0; | 1698 | int incCounter = 0; |
1699 | while ( inR ) { | 1699 | while ( inR ) { |
1700 | if ( ! bar.isVisible() ) | 1700 | if ( ! bar.isVisible() ) |
1701 | return false; | 1701 | return false; |
1702 | if ( incCounter % modulo == 0 ) | 1702 | if ( incCounter % modulo == 0 ) |
1703 | bar.setProgress( incCounter ); | 1703 | bar.setProgress( incCounter ); |
1704 | ++incCounter; | 1704 | ++incCounter; |
1705 | uid = inR->uid(); | 1705 | uid = inR->uid(); |
1706 | bool skipIncidence = false; | 1706 | bool skipIncidence = false; |
1707 | if ( uid.left(15) == QString("last-syncEvent-") ) | 1707 | if ( uid.left(15) == QString("last-syncEvent-") ) |
1708 | skipIncidence = true; | 1708 | skipIncidence = true; |
1709 | QString idS; | 1709 | QString idS; |
1710 | qApp->processEvents(); | 1710 | qApp->processEvents(); |
1711 | if ( !skipIncidence ) { | 1711 | if ( !skipIncidence ) { |
1712 | inL = local->incidenceForUid( uid , false ); | 1712 | inL = local->incidenceForUid( uid , false ); |
1713 | if ( inL ) { // maybe conflict - same uid in both calendars | 1713 | if ( inL ) { // maybe conflict - same uid in both calendars |
1714 | if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { | 1714 | if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) { |
1715 | //qDebug("take %d %s ", take, inL->summary().latin1()); | 1715 | //qDebug("take %d %s ", take, inL->summary().latin1()); |
1716 | if ( take == 3 ) | 1716 | if ( take == 3 ) |
1717 | return false; | 1717 | return false; |
1718 | if ( take == 1 ) {// take local ********************** | 1718 | if ( take == 1 ) {// take local ********************** |
1719 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) | 1719 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) |
1720 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1720 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1721 | else | 1721 | else |
1722 | idS = inR->IDStr(); | 1722 | idS = inR->IDStr(); |
1723 | int calID = inR->calID(); | 1723 | int calID = inR->calID(); |
1724 | remote->deleteIncidence( inR ); | 1724 | remote->deleteIncidence( inR ); |
1725 | inR = inL->clone(); | 1725 | inR = inL->clone(); |
1726 | inR->setCalID( calID ); | 1726 | inR->setCalID( calID ); |
1727 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1727 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1728 | if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) | 1728 | if ( mGlobalSyncMode != SYNC_MODE_EXTERNAL ) |
1729 | inR->setIDStr( idS ); | 1729 | inR->setIDStr( idS ); |
1730 | remote->addIncidence( inR ); | 1730 | remote->addIncidence( inR ); |
1731 | if ( mSyncManager->syncWithDesktop() ) | 1731 | if ( mSyncManager->syncWithDesktop() ) |
1732 | inR->setPilotId( 2 ); | 1732 | inR->setPilotId( 2 ); |
1733 | ++changedRemote; | 1733 | ++changedRemote; |
1734 | } else {// take remote ********************** | 1734 | } else {// take remote ********************** |
1735 | if ( !inL->isReadOnly() ) { | 1735 | if ( !inL->isReadOnly() ) { |
1736 | idS = inL->IDStr(); | 1736 | idS = inL->IDStr(); |
1737 | int pid = inL->pilotId(); | 1737 | int pid = inL->pilotId(); |
1738 | int calID = inL->calID(); | 1738 | int calID = inL->calID(); |
1739 | local->deleteIncidence( inL ); | 1739 | local->deleteIncidence( inL ); |
1740 | inL = inR->clone(); | 1740 | inL = inR->clone(); |
1741 | inL->setCalID( calID ); | 1741 | inL->setCalID( calID ); |
1742 | if ( mSyncManager->syncWithDesktop() ) | 1742 | if ( mSyncManager->syncWithDesktop() ) |
1743 | inL->setPilotId( pid ); | 1743 | inL->setPilotId( pid ); |
1744 | inL->setIDStr( idS ); | 1744 | inL->setIDStr( idS ); |
1745 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1745 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1746 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1746 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1747 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); | 1747 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); |
1748 | } | 1748 | } |
1749 | local->addIncidence( inL ); | 1749 | local->addIncidence( inL ); |
1750 | ++changedLocal; | 1750 | ++changedLocal; |
1751 | } | 1751 | } |
1752 | } | 1752 | } |
1753 | } | 1753 | } |
1754 | } else { // no conflict ********** add or delete remote | 1754 | } else { // no conflict ********** add or delete remote |
1755 | if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ | 1755 | if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ |
1756 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1756 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1757 | QString des = eventLSync->description(); | 1757 | QString des = eventLSync->description(); |
1758 | QString pref = "e"; | 1758 | QString pref = "e"; |
1759 | if ( inR->typeID() == todoID ) | 1759 | if ( inR->typeID() == todoID ) |
1760 | pref = "t"; | 1760 | pref = "t"; |
1761 | if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it | 1761 | if ( des.find(pref+ inR->getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it |
1762 | inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); | 1762 | inR->setTempSyncStat( SYNC_TEMPSTATE_DELETE ); |
1763 | //remote->deleteIncidence( inR ); | 1763 | //remote->deleteIncidence( inR ); |
1764 | ++deletedEventR; | 1764 | ++deletedEventR; |
1765 | } else { | 1765 | } else { |
1766 | inR->setLastModified( modifiedCalendar ); | 1766 | inR->setLastModified( modifiedCalendar ); |
1767 | inL = inR->clone(); | 1767 | inL = inR->clone(); |
1768 | inL->setIDStr( ":" ); | 1768 | inL->setIDStr( ":" ); |
1769 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); | 1769 | inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) ); |
1770 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); | 1770 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); |
1771 | 1771 | ||
1772 | inL->setCalID( 0 );// add to default cal | 1772 | inL->setCalID( 0 );// add to default cal |
1773 | local->addIncidence( inL ); | 1773 | local->addIncidence( inL ); |
1774 | ++addedEvent; | 1774 | ++addedEvent; |
1775 | 1775 | ||
1776 | } | 1776 | } |
1777 | } else { | 1777 | } else { |
1778 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { | 1778 | if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { |
1779 | inR->setLastModified( modifiedCalendar ); | 1779 | inR->setLastModified( modifiedCalendar ); |
1780 | inL = inR->clone(); | 1780 | inL = inR->clone(); |
1781 | inL->setIDStr( ":" ); | 1781 | inL->setIDStr( ":" ); |
1782 | inL->setCalID( 0 );// add to default cal | 1782 | inL->setCalID( 0 );// add to default cal |
1783 | local->addIncidence( inL ); | 1783 | local->addIncidence( inL ); |
1784 | ++addedEvent; | 1784 | ++addedEvent; |
1785 | 1785 | ||
1786 | } else { | 1786 | } else { |
1787 | checkExternSyncEvent(eventRSyncSharp, inR); | 1787 | checkExternSyncEvent(eventRSyncSharp, inR); |
1788 | remote->deleteIncidence( inR ); | 1788 | remote->deleteIncidence( inR ); |
1789 | ++deletedEventR; | 1789 | ++deletedEventR; |
1790 | } | 1790 | } |
1791 | } | 1791 | } |
1792 | } else { | 1792 | } else { |
1793 | ++filteredIN; | 1793 | ++filteredIN; |
1794 | } | 1794 | } |
1795 | } | 1795 | } |
1796 | } | 1796 | } |
1797 | inR = er.next(); | 1797 | inR = er.next(); |
1798 | } | 1798 | } |
1799 | QPtrList<Incidence> el = local->rawIncidences(); | 1799 | QPtrList<Incidence> el = local->rawIncidences(); |
1800 | inL = el.first(); | 1800 | inL = el.first(); |
1801 | modulo = (el.count()/10)+1; | 1801 | modulo = (el.count()/10)+1; |
1802 | bar.setCaption (i18n("Add / remove events") ); | 1802 | bar.setCaption (i18n("Add / remove events") ); |
1803 | bar.setTotalSteps ( el.count() ) ; | 1803 | bar.setTotalSteps ( el.count() ) ; |
1804 | bar.show(); | 1804 | bar.show(); |
1805 | incCounter = 0; | 1805 | incCounter = 0; |
1806 | 1806 | ||
1807 | while ( inL ) { | 1807 | while ( inL ) { |
1808 | 1808 | ||
1809 | qApp->processEvents(); | 1809 | qApp->processEvents(); |
1810 | if ( ! bar.isVisible() ) | 1810 | if ( ! bar.isVisible() ) |
1811 | return false; | 1811 | return false; |
1812 | if ( incCounter % modulo == 0 ) | 1812 | if ( incCounter % modulo == 0 ) |
1813 | bar.setProgress( incCounter ); | 1813 | bar.setProgress( incCounter ); |
1814 | ++incCounter; | 1814 | ++incCounter; |
1815 | uid = inL->uid(); | 1815 | uid = inL->uid(); |
1816 | bool skipIncidence = false; | 1816 | bool skipIncidence = false; |
1817 | if ( uid.left(15) == QString("last-syncEvent-") ) | 1817 | if ( uid.left(15) == QString("last-syncEvent-") ) |
1818 | skipIncidence = true; | 1818 | skipIncidence = true; |
1819 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID ) | 1819 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID ) |
1820 | skipIncidence = true; | 1820 | skipIncidence = true; |
1821 | if ( !skipIncidence ) { | 1821 | if ( !skipIncidence ) { |
1822 | inR = remote->incidenceForUid( uid , true ); | 1822 | inR = remote->incidenceForUid( uid , true ); |
1823 | if ( ! inR ) { | 1823 | if ( ! inR ) { |
1824 | if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ | 1824 | if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ |
1825 | // no conflict ********** add or delete local | 1825 | // no conflict ********** add or delete local |
1826 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 1826 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
1827 | if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { | 1827 | if ( !inL->getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { |
1828 | checkExternSyncEvent(eventLSyncSharp, inL); | 1828 | checkExternSyncEvent(eventLSyncSharp, inL); |
1829 | local->deleteIncidence( inL ); | 1829 | local->deleteIncidence( inL ); |
1830 | ++deletedEventL; | 1830 | ++deletedEventL; |
1831 | } else { | 1831 | } else { |
1832 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1832 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1833 | inL->removeID(mCurrentSyncDevice ); | 1833 | inL->removeID(mCurrentSyncDevice ); |
1834 | ++addedEventR; | 1834 | ++addedEventR; |
1835 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); | 1835 | //qDebug("remote added Incidence %s ", inL->summary().latin1()); |
1836 | inL->setLastModified( modifiedCalendar ); | 1836 | inL->setLastModified( modifiedCalendar ); |
1837 | inR = inL->clone(); | 1837 | inR = inL->clone(); |
1838 | inR->setIDStr( ":" ); | 1838 | inR->setIDStr( ":" ); |
1839 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1839 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1840 | inR->setCalID( 0 );// add to default cal | 1840 | inR->setCalID( 0 );// add to default cal |
1841 | remote->addIncidence( inR ); | 1841 | remote->addIncidence( inR ); |
1842 | } | 1842 | } |
1843 | } | 1843 | } |
1844 | } else { | 1844 | } else { |
1845 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { | 1845 | if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { |
1846 | checkExternSyncEvent(eventLSyncSharp, inL); | 1846 | checkExternSyncEvent(eventLSyncSharp, inL); |
1847 | local->deleteIncidence( inL ); | 1847 | local->deleteIncidence( inL ); |
1848 | ++deletedEventL; | 1848 | ++deletedEventL; |
1849 | } else { | 1849 | } else { |
1850 | if ( ! mSyncManager->mWriteBackExistingOnly ) { | 1850 | if ( ! mSyncManager->mWriteBackExistingOnly ) { |
1851 | ++addedEventR; | 1851 | ++addedEventR; |
1852 | inL->setLastModified( modifiedCalendar ); | 1852 | inL->setLastModified( modifiedCalendar ); |
1853 | inR = inL->clone(); | 1853 | inR = inL->clone(); |
1854 | inR->setIDStr( ":" ); | 1854 | inR->setIDStr( ":" ); |
1855 | inR->setCalID( 0 );// add to default cal | 1855 | inR->setCalID( 0 );// add to default cal |
1856 | remote->addIncidence( inR ); | 1856 | remote->addIncidence( inR ); |
1857 | } | 1857 | } |
1858 | } | 1858 | } |
1859 | } | 1859 | } |
1860 | } else { | 1860 | } else { |
1861 | ++filteredOUT; | 1861 | ++filteredOUT; |
1862 | } | 1862 | } |
1863 | } | 1863 | } |
1864 | } | 1864 | } |
1865 | inL = el.next(); | 1865 | inL = el.next(); |
1866 | } | 1866 | } |
1867 | int delFut = 0; | 1867 | int delFut = 0; |
1868 | int remRem = 0; | 1868 | int remRem = 0; |
1869 | if ( mSyncManager->mWriteBackInFuture ) { | 1869 | if ( mSyncManager->mWriteBackInFuture ) { |
1870 | er = remote->rawIncidences(); | 1870 | er = remote->rawIncidences(); |
1871 | remRem = er.count(); | 1871 | remRem = er.count(); |
1872 | inR = er.first(); | 1872 | inR = er.first(); |
1873 | QDateTime dt; | 1873 | QDateTime dt; |
1874 | QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); | 1874 | QDateTime cur = QDateTime::currentDateTime().addDays( -(mSyncManager->mWriteBackInPast * 7) ); |
1875 | QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); | 1875 | QDateTime end = QDateTime::currentDateTime().addDays( (mSyncManager->mWriteBackInFuture ) *7 ); |
1876 | while ( inR ) { | 1876 | while ( inR ) { |
1877 | if ( inR->typeID() == todoID ) { | 1877 | if ( inR->typeID() == todoID ) { |
1878 | Todo * t = (Todo*)inR; | 1878 | Todo * t = (Todo*)inR; |
1879 | if ( t->hasDueDate() ) | 1879 | if ( t->hasDueDate() ) |
1880 | dt = t->dtDue(); | 1880 | dt = t->dtDue(); |
1881 | else | 1881 | else |
1882 | dt = cur.addSecs( 62 ); | 1882 | dt = cur.addSecs( 62 ); |
1883 | } | 1883 | } |
1884 | else if (inR->typeID() == eventID ) { | 1884 | else if (inR->typeID() == eventID ) { |
1885 | bool ok; | 1885 | bool ok; |
1886 | dt = inR->getNextOccurence( cur, &ok ); | 1886 | dt = inR->getNextOccurence( cur, &ok ); |
1887 | if ( !ok ) | 1887 | if ( !ok ) |
1888 | dt = cur.addSecs( -62 ); | 1888 | dt = cur.addSecs( -62 ); |
1889 | } | 1889 | } |
1890 | else | 1890 | else |
1891 | dt = inR->dtStart(); | 1891 | dt = inR->dtStart(); |
1892 | if ( dt < cur || dt > end ) { | 1892 | if ( dt < cur || dt > end ) { |
1893 | remote->deleteIncidence( inR ); | 1893 | remote->deleteIncidence( inR ); |
1894 | ++delFut; | 1894 | ++delFut; |
1895 | } | 1895 | } |
1896 | inR = er.next(); | 1896 | inR = er.next(); |
1897 | } | 1897 | } |
1898 | } | 1898 | } |
1899 | bar.hide(); | 1899 | bar.hide(); |
1900 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); | 1900 | mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 ); |
1901 | eventLSync->setReadOnly( false ); | 1901 | eventLSync->setReadOnly( false ); |
1902 | eventLSync->setDtStart( mLastCalendarSync ); | 1902 | eventLSync->setDtStart( mLastCalendarSync ); |
1903 | eventRSync->setDtStart( mLastCalendarSync ); | 1903 | eventRSync->setDtStart( mLastCalendarSync ); |
1904 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1904 | eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1905 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); | 1905 | eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) ); |
1906 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; | 1906 | eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ; |
1907 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); | 1907 | eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName ); |
1908 | eventLSync->setReadOnly( true ); | 1908 | eventLSync->setReadOnly( true ); |
1909 | qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); | 1909 | qDebug("KO: Normal sync: %d ",mGlobalSyncMode == SYNC_MODE_NORMAL ); |
1910 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... | 1910 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal... |
1911 | remote->addEvent( eventRSync ); | 1911 | remote->addEvent( eventRSync ); |
1912 | else | 1912 | else |
1913 | delete eventRSync; | 1913 | delete eventRSync; |
1914 | qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() ); | 1914 | qDebug("KO: Sync with desktop %d ",mSyncManager->syncWithDesktop() ); |
1915 | QString mes; | 1915 | QString mes; |
1916 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR, filteredIN, filteredOUT ); | 1916 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR, filteredIN, filteredOUT ); |
1917 | QString delmess; | 1917 | QString delmess; |
1918 | if ( delFut ) { | 1918 | if ( delFut ) { |
1919 | delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are more\nthan %d weeks in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInPast,mSyncManager->mWriteBackInFuture, remRem-delFut); | 1919 | delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are more\nthan %d weeks in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInPast,mSyncManager->mWriteBackInFuture, remRem-delFut); |
1920 | mes += delmess; | 1920 | mes += delmess; |
1921 | } | 1921 | } |
1922 | mes = i18n("Local calendar changed!\n") +mes; | 1922 | mes = i18n("Local calendar changed!\n") +mes; |
1923 | mCalendar->checkAlarmForIncidence( 0, true ); | 1923 | mCalendar->checkAlarmForIncidence( 0, true ); |
1924 | qDebug( mes ); | 1924 | qDebug( mes ); |
1925 | if ( mSyncManager->mShowSyncSummary ) { | 1925 | if ( mSyncManager->mShowSyncSummary ) { |
1926 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, | 1926 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, |
1927 | i18n("KO/Pi Synchronization"),i18n("Write back"))) { | 1927 | i18n("KO/Pi Synchronization"),i18n("Write back"))) { |
1928 | qDebug("KO: WB cancelled "); | 1928 | qDebug("KO: WB cancelled "); |
1929 | mSyncManager->mWriteBackFile = false; | 1929 | mSyncManager->mWriteBackFile = false; |
1930 | return syncOK; | 1930 | return syncOK; |
1931 | } | 1931 | } |
1932 | } | 1932 | } |
1933 | return syncOK; | 1933 | return syncOK; |
1934 | } | 1934 | } |
1935 | 1935 | ||
1936 | void CalendarView::setSyncDevice( QString s ) | 1936 | void CalendarView::setSyncDevice( QString s ) |
1937 | { | 1937 | { |
1938 | mCurrentSyncDevice= s; | 1938 | mCurrentSyncDevice= s; |
1939 | } | 1939 | } |
1940 | void CalendarView::setSyncName( QString s ) | 1940 | void CalendarView::setSyncName( QString s ) |
1941 | { | 1941 | { |
1942 | mCurrentSyncName= s; | 1942 | mCurrentSyncName= s; |
1943 | } | 1943 | } |
1944 | bool CalendarView::syncCalendar(QString filename, int mode) | 1944 | bool CalendarView::syncCalendar(QString filename, int mode) |
1945 | { | 1945 | { |
1946 | //qDebug("syncCalendar %s ", filename.latin1()); | 1946 | //qDebug("syncCalendar %s ", filename.latin1()); |
1947 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 1947 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
1948 | CalendarLocal* calendar = new CalendarLocal(); | 1948 | CalendarLocal* calendar = new CalendarLocal(); |
1949 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1949 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1950 | FileStorage* storage = new FileStorage( calendar ); | 1950 | FileStorage* storage = new FileStorage( calendar ); |
1951 | bool syncOK = false; | 1951 | bool syncOK = false; |
1952 | storage->setFileName( filename ); | 1952 | storage->setFileName( filename ); |
1953 | // qDebug("loading ... "); | 1953 | // qDebug("loading ... "); |
1954 | if ( storage->load() ) { | 1954 | if ( storage->load() ) { |
1955 | getEventViewerDialog()->setSyncMode( true ); | 1955 | getEventViewerDialog()->setSyncMode( true ); |
1956 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); | 1956 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); |
1957 | getEventViewerDialog()->setSyncMode( false ); | 1957 | getEventViewerDialog()->setSyncMode( false ); |
1958 | if ( syncOK ) { | 1958 | if ( syncOK ) { |
1959 | if ( mSyncManager->mWriteBackFile ) | 1959 | if ( mSyncManager->mWriteBackFile ) |
1960 | { | 1960 | { |
1961 | storage->setSaveFormat( new ICalFormat() ); | 1961 | storage->setSaveFormat( new ICalFormat() ); |
1962 | storage->save(); | 1962 | storage->save(); |
1963 | } | 1963 | } |
1964 | } | 1964 | } |
1965 | setModified( true ); | 1965 | setModified( true ); |
1966 | } | 1966 | } |
1967 | delete storage; | 1967 | delete storage; |
1968 | delete calendar; | 1968 | delete calendar; |
1969 | if ( syncOK ) | 1969 | if ( syncOK ) |
1970 | updateView(); | 1970 | updateView(); |
1971 | return syncOK; | 1971 | return syncOK; |
1972 | } | 1972 | } |
1973 | 1973 | ||
1974 | void CalendarView::syncExternal( int mode ) | 1974 | void CalendarView::syncExternal( int mode ) |
1975 | { | 1975 | { |
1976 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 1976 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
1977 | 1977 | ||
1978 | qApp->processEvents(); | 1978 | qApp->processEvents(); |
1979 | CalendarLocal* calendar = new CalendarLocal(); | 1979 | CalendarLocal* calendar = new CalendarLocal(); |
1980 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 1980 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
1981 | bool syncOK = false; | 1981 | bool syncOK = false; |
1982 | bool loadSuccess = false; | 1982 | bool loadSuccess = false; |
1983 | PhoneFormat* phoneFormat = 0; | 1983 | PhoneFormat* phoneFormat = 0; |
1984 | emit tempDisableBR(true); | 1984 | emit tempDisableBR(true); |
1985 | #ifndef DESKTOP_VERSION | 1985 | #ifndef DESKTOP_VERSION |
1986 | SharpFormat* sharpFormat = 0; | 1986 | SharpFormat* sharpFormat = 0; |
1987 | if ( mode == 0 ) { // sharp | 1987 | if ( mode == 0 ) { // sharp |
1988 | sharpFormat = new SharpFormat () ; | 1988 | sharpFormat = new SharpFormat () ; |
1989 | loadSuccess = sharpFormat->load( calendar, mCalendar ); | 1989 | loadSuccess = sharpFormat->load( calendar, mCalendar ); |
1990 | 1990 | ||
1991 | } else | 1991 | } else |
1992 | #endif | 1992 | #endif |
1993 | if ( mode == 1 ) { // phone | 1993 | if ( mode == 1 ) { // phone |
1994 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, | 1994 | phoneFormat = new PhoneFormat (mCurrentSyncDevice, |
1995 | mSyncManager->mPhoneDevice, | 1995 | mSyncManager->mPhoneDevice, |
1996 | mSyncManager->mPhoneConnection, | 1996 | mSyncManager->mPhoneConnection, |
1997 | mSyncManager->mPhoneModel); | 1997 | mSyncManager->mPhoneModel); |
1998 | loadSuccess = phoneFormat->load( calendar,mCalendar); | 1998 | loadSuccess = phoneFormat->load( calendar,mCalendar); |
1999 | 1999 | ||
2000 | } else { | 2000 | } else { |
2001 | emit tempDisableBR(false); | 2001 | emit tempDisableBR(false); |
2002 | return; | 2002 | return; |
2003 | } | 2003 | } |
2004 | if ( loadSuccess ) { | 2004 | if ( loadSuccess ) { |
2005 | getEventViewerDialog()->setSyncMode( true ); | 2005 | getEventViewerDialog()->setSyncMode( true ); |
2006 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); | 2006 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); |
2007 | getEventViewerDialog()->setSyncMode( false ); | 2007 | getEventViewerDialog()->setSyncMode( false ); |
2008 | qApp->processEvents(); | 2008 | qApp->processEvents(); |
2009 | if ( syncOK ) { | 2009 | if ( syncOK ) { |
2010 | if ( mSyncManager->mWriteBackFile ) | 2010 | if ( mSyncManager->mWriteBackFile ) |
2011 | { | 2011 | { |
2012 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); | 2012 | QPtrList<Incidence> iL = mCalendar->rawIncidences(); |
2013 | Incidence* inc = iL.first(); | 2013 | Incidence* inc = iL.first(); |
2014 | if ( phoneFormat ) { | 2014 | if ( phoneFormat ) { |
2015 | while ( inc ) { | 2015 | while ( inc ) { |
2016 | inc->removeID(mCurrentSyncDevice); | 2016 | inc->removeID(mCurrentSyncDevice); |
2017 | inc = iL.next(); | 2017 | inc = iL.next(); |
2018 | } | 2018 | } |
2019 | } | 2019 | } |
2020 | #ifndef DESKTOP_VERSION | 2020 | #ifndef DESKTOP_VERSION |
2021 | if ( sharpFormat ) | 2021 | if ( sharpFormat ) |
2022 | sharpFormat->save(calendar); | 2022 | sharpFormat->save(calendar); |
2023 | #endif | 2023 | #endif |
2024 | if ( phoneFormat ) | 2024 | if ( phoneFormat ) |
2025 | phoneFormat->save(calendar); | 2025 | phoneFormat->save(calendar); |
2026 | iL = calendar->rawIncidences(); | 2026 | iL = calendar->rawIncidences(); |
2027 | inc = iL.first(); | 2027 | inc = iL.first(); |
2028 | Incidence* loc; | 2028 | Incidence* loc; |
2029 | while ( inc ) { | 2029 | while ( inc ) { |
2030 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { | 2030 | if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) { |
2031 | loc = mCalendar->incidence(inc->uid() ); | 2031 | loc = mCalendar->incidence(inc->uid() ); |
2032 | if ( loc ) { | 2032 | if ( loc ) { |
2033 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); | 2033 | loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) ); |
2034 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); | 2034 | loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) ); |
2035 | } | 2035 | } |
2036 | } | 2036 | } |
2037 | inc = iL.next(); | 2037 | inc = iL.next(); |
2038 | } | 2038 | } |
2039 | Incidence* lse = getLastSyncEvent(); | 2039 | Incidence* lse = getLastSyncEvent(); |
2040 | if ( lse ) { | 2040 | if ( lse ) { |
2041 | lse->setReadOnly( false ); | 2041 | lse->setReadOnly( false ); |
2042 | lse->setDescription( "" ); | 2042 | lse->setDescription( "" ); |
2043 | lse->setReadOnly( true ); | 2043 | lse->setReadOnly( true ); |
2044 | } | 2044 | } |
2045 | } | 2045 | } |
2046 | } else { | 2046 | } else { |
2047 | topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); | 2047 | topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); |
2048 | } | 2048 | } |
2049 | setModified( true ); | 2049 | setModified( true ); |
2050 | } else { | 2050 | } else { |
2051 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; | 2051 | QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; |
2052 | QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), | 2052 | QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), |
2053 | question, i18n("Ok")) ; | 2053 | question, i18n("Ok")) ; |
2054 | 2054 | ||
2055 | } | 2055 | } |
2056 | delete calendar; | 2056 | delete calendar; |
2057 | updateView(); | 2057 | updateView(); |
2058 | emit tempDisableBR(false); | 2058 | emit tempDisableBR(false); |
2059 | return ;//syncOK; | 2059 | return ;//syncOK; |
2060 | 2060 | ||
2061 | } | 2061 | } |
2062 | 2062 | ||
2063 | bool CalendarView::importBday() | 2063 | bool CalendarView::importBday() |
2064 | { | 2064 | { |
2065 | #ifndef KORG_NOKABC | 2065 | #ifndef KORG_NOKABC |
2066 | 2066 | ||
2067 | #ifdef DESKTOP_VERSION | 2067 | #ifdef DESKTOP_VERSION |
2068 | int curCal = mCalendar->defaultCalendar(); | 2068 | int curCal = mCalendar->defaultCalendar(); |
2069 | int bd = mCalEditView->getBirtdayID(); | 2069 | int bd = mCalEditView->getBirtdayID(); |
2070 | if ( bd == 0 ) | 2070 | if ( bd == 0 ) |
2071 | return false; | 2071 | return false; |
2072 | mCalendar->setDefaultCalendar( bd ); | 2072 | mCalendar->setDefaultCalendar( bd ); |
2073 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 2073 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
2074 | KABC::AddressBook::Iterator it; | 2074 | KABC::AddressBook::Iterator it; |
2075 | int count = 0; | 2075 | int count = 0; |
2076 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 2076 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
2077 | ++count; | 2077 | ++count; |
2078 | } | 2078 | } |
2079 | QProgressBar bar(count,0 ); | 2079 | QProgressBar bar(count,0 ); |
2080 | int w = 300; | 2080 | int w = 300; |
2081 | if ( QApplication::desktop()->width() < 320 ) | 2081 | if ( QApplication::desktop()->width() < 320 ) |
2082 | w = 220; | 2082 | w = 220; |
2083 | int h = bar.sizeHint().height() ; | 2083 | int h = bar.sizeHint().height() ; |
2084 | int dw = QApplication::desktop()->width(); | 2084 | int dw = QApplication::desktop()->width(); |
2085 | int dh = QApplication::desktop()->height(); | 2085 | int dh = QApplication::desktop()->height(); |
2086 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2086 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2087 | bar.show(); | 2087 | bar.show(); |
2088 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); | 2088 | bar.setCaption (i18n("Reading addressbook - close to abort!") ); |
2089 | qApp->processEvents(); | 2089 | qApp->processEvents(); |
2090 | count = 0; | 2090 | count = 0; |
2091 | int addCount = 0; | 2091 | int addCount = 0; |
2092 | KCal::Attendee* a = 0; | 2092 | KCal::Attendee* a = 0; |
2093 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 2093 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
2094 | if ( ! bar.isVisible() ) | 2094 | if ( ! bar.isVisible() ) |
2095 | return false; | 2095 | return false; |
2096 | bar.setProgress( count++ ); | 2096 | bar.setProgress( count++ ); |
2097 | qApp->processEvents(); | 2097 | qApp->processEvents(); |
2098 | //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); | 2098 | //qDebug("add BDay %s %s", (*it).realName().latin1(),(*it).birthday().date().toString().latin1() ); |
2099 | if ( (*it).birthday().date().isValid() ){ | 2099 | if ( (*it).birthday().date().isValid() ){ |
2100 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; | 2100 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; |
2101 | if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) | 2101 | if ( addAnniversary( (*it).birthday().date(), (*it).assembledName(), a, true ) ) |
2102 | ++addCount; | 2102 | ++addCount; |
2103 | } | 2103 | } |
2104 | QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); | 2104 | QDate anni = KGlobal::locale()->readDate( (*it).custom("KADDRESSBOOK", "X-Anniversary" ), "%Y-%m-%d"); |
2105 | if ( anni.isValid() ){ | 2105 | if ( anni.isValid() ){ |
2106 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; | 2106 | a = new KCal::Attendee( (*it).realName(), (*it).preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,(*it).uid()) ; |
2107 | if ( addAnniversary( anni, (*it).assembledName(), a, false ) ) | 2107 | if ( addAnniversary( anni, (*it).assembledName(), a, false ) ) |
2108 | ++addCount; | 2108 | ++addCount; |
2109 | } | 2109 | } |
2110 | } | 2110 | } |
2111 | mCalendar->setDefaultCalendar( curCal ); | 2111 | mCalendar->setDefaultCalendar( curCal ); |
2112 | updateView(); | 2112 | updateView(); |
2113 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 2113 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
2114 | #else //DESKTOP_VERSION | 2114 | #else //DESKTOP_VERSION |
2115 | 2115 | ||
2116 | ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); | 2116 | ExternalAppHandler::instance()->requestBirthdayListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); |
2117 | // the result should now arrive through method insertBirthdays | 2117 | // the result should now arrive through method insertBirthdays |
2118 | 2118 | ||
2119 | #endif //DESKTOP_VERSION | 2119 | #endif //DESKTOP_VERSION |
2120 | 2120 | ||
2121 | #endif //KORG_NOKABC | 2121 | #endif //KORG_NOKABC |
2122 | 2122 | ||
2123 | 2123 | ||
2124 | return true; | 2124 | return true; |
2125 | } | 2125 | } |
2126 | 2126 | ||
2127 | // This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI | 2127 | // This method will be called from Ka/Pi as a response to requestBirthdayListFromKAPI |
2128 | void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, | 2128 | void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthdayList, |
2129 | const QStringList& anniversaryList, const QStringList& realNameList, | 2129 | const QStringList& anniversaryList, const QStringList& realNameList, |
2130 | const QStringList& emailList, const QStringList& assembledNameList, | 2130 | const QStringList& emailList, const QStringList& assembledNameList, |
2131 | const QStringList& uidList) | 2131 | const QStringList& uidList) |
2132 | { | 2132 | { |
2133 | 2133 | ||
2134 | //qDebug("KO::CalendarView::insertBirthdays"); | 2134 | //qDebug("KO::CalendarView::insertBirthdays"); |
2135 | if (uid == this->name()) | 2135 | if (uid == this->name()) |
2136 | { | 2136 | { |
2137 | int curCal = mCalendar->defaultCalendar(); | 2137 | int curCal = mCalendar->defaultCalendar(); |
2138 | int bd = mCalEditView->getBirtdayID(); | 2138 | int bd = mCalEditView->getBirtdayID(); |
2139 | if ( bd == 0 ) | 2139 | if ( bd == 0 ) |
2140 | return; | 2140 | return; |
2141 | mCalendar->setDefaultCalendar( bd ); | 2141 | mCalendar->setDefaultCalendar( bd ); |
2142 | 2142 | ||
2143 | 2143 | ||
2144 | int count = birthdayList.count(); | 2144 | int count = birthdayList.count(); |
2145 | int addCount = 0; | 2145 | int addCount = 0; |
2146 | KCal::Attendee* a = 0; | 2146 | KCal::Attendee* a = 0; |
2147 | 2147 | ||
2148 | //qDebug("CalView 1 %i", count); | 2148 | //qDebug("CalView 1 %i", count); |
2149 | 2149 | ||
2150 | QProgressBar bar(count,0 ); | 2150 | QProgressBar bar(count,0 ); |
2151 | int w = 300; | 2151 | int w = 300; |
2152 | if ( QApplication::desktop()->width() < 320 ) | 2152 | if ( QApplication::desktop()->width() < 320 ) |
2153 | w = 220; | 2153 | w = 220; |
2154 | int h = bar.sizeHint().height() ; | 2154 | int h = bar.sizeHint().height() ; |
2155 | int dw = QApplication::desktop()->width(); | 2155 | int dw = QApplication::desktop()->width(); |
2156 | int dh = QApplication::desktop()->height(); | 2156 | int dh = QApplication::desktop()->height(); |
2157 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2157 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2158 | bar.show(); | 2158 | bar.show(); |
2159 | bar.setCaption (i18n("inserting birthdays - close to abort!") ); | 2159 | bar.setCaption (i18n("inserting birthdays - close to abort!") ); |
2160 | qApp->processEvents(); | 2160 | qApp->processEvents(); |
2161 | 2161 | ||
2162 | QDate birthday; | 2162 | QDate birthday; |
2163 | QDate anniversary; | 2163 | QDate anniversary; |
2164 | QString realName; | 2164 | QString realName; |
2165 | QString email; | 2165 | QString email; |
2166 | QString assembledName; | 2166 | QString assembledName; |
2167 | QString uid; | 2167 | QString uid; |
2168 | bool ok = true; | 2168 | bool ok = true; |
2169 | for ( int i = 0; i < count; i++) | 2169 | for ( int i = 0; i < count; i++) |
2170 | { | 2170 | { |
2171 | if ( ! bar.isVisible() ) | 2171 | if ( ! bar.isVisible() ) |
2172 | return; | 2172 | return; |
2173 | bar.setProgress( i ); | 2173 | bar.setProgress( i ); |
2174 | qApp->processEvents(); | 2174 | qApp->processEvents(); |
2175 | 2175 | ||
2176 | birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); | 2176 | birthday = KGlobal::locale()->readDate(birthdayList[i], KLocale::ISODate, &ok); |
2177 | if (!ok) { | 2177 | if (!ok) { |
2178 | ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); | 2178 | ;//qDebug("CalendarView::insertBirthdays found invalid birthday: %s",birthdayList[i].latin1()); |
2179 | } | 2179 | } |
2180 | 2180 | ||
2181 | anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); | 2181 | anniversary = KGlobal::locale()->readDate(anniversaryList[i], KLocale::ISODate, &ok); |
2182 | if (!ok) { | 2182 | if (!ok) { |
2183 | ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); | 2183 | ;//qDebug("CalendarView::insertBirthdays found invalid anniversary: %s",anniversaryList[i].latin1()); |
2184 | } | 2184 | } |
2185 | realName = realNameList[i]; | 2185 | realName = realNameList[i]; |
2186 | email = emailList[i]; | 2186 | email = emailList[i]; |
2187 | assembledName = assembledNameList[i]; | 2187 | assembledName = assembledNameList[i]; |
2188 | uid = uidList[i]; | 2188 | uid = uidList[i]; |
2189 | //qDebug("insert birthday in KO/Pi: %s,%s,%s,%s: %s, %s", realName.latin1(), email.latin1(), assembledName.latin1(), uid.latin1(), birthdayList[i].latin1(), anniversaryList[i].latin1() ); | 2189 | //qDebug("insert birthday in KO/Pi: %s,%s,%s,%s: %s, %s", realName.latin1(), email.latin1(), assembledName.latin1(), uid.latin1(), birthdayList[i].latin1(), anniversaryList[i].latin1() ); |
2190 | 2190 | ||
2191 | if ( birthday.isValid() ){ | 2191 | if ( birthday.isValid() ){ |
2192 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 2192 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
2193 | KCal::Attendee::ReqParticipant,uid) ; | 2193 | KCal::Attendee::ReqParticipant,uid) ; |
2194 | if ( addAnniversary( birthday, assembledName, a, true ) ) | 2194 | if ( addAnniversary( birthday, assembledName, a, true ) ) |
2195 | ++addCount; | 2195 | ++addCount; |
2196 | } | 2196 | } |
2197 | 2197 | ||
2198 | if ( anniversary.isValid() ){ | 2198 | if ( anniversary.isValid() ){ |
2199 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 2199 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
2200 | KCal::Attendee::ReqParticipant,uid) ; | 2200 | KCal::Attendee::ReqParticipant,uid) ; |
2201 | if ( addAnniversary( anniversary, assembledName, a, false ) ) | 2201 | if ( addAnniversary( anniversary, assembledName, a, false ) ) |
2202 | ++addCount; | 2202 | ++addCount; |
2203 | } | 2203 | } |
2204 | } | 2204 | } |
2205 | 2205 | ||
2206 | mCalendar->setDefaultCalendar( curCal ); | 2206 | mCalendar->setDefaultCalendar( curCal ); |
2207 | updateView(); | 2207 | updateView(); |
2208 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 2208 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
2209 | 2209 | ||
2210 | } | 2210 | } |
2211 | 2211 | ||
2212 | } | 2212 | } |
2213 | 2213 | ||
2214 | 2214 | ||
2215 | 2215 | ||
2216 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) | 2216 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) |
2217 | { | 2217 | { |
2218 | //qDebug("addAnni "); | 2218 | //qDebug("addAnni "); |
2219 | Event * ev = new Event(); | 2219 | Event * ev = new Event(); |
2220 | ev->setOrganizer(KOPrefs::instance()->email()); | 2220 | ev->setOrganizer(KOPrefs::instance()->email()); |
2221 | if ( a ) { | 2221 | if ( a ) { |
2222 | ev->addAttendee( a ); | 2222 | ev->addAttendee( a ); |
2223 | } | 2223 | } |
2224 | QString kind; | 2224 | QString kind; |
2225 | if ( birthday ) { | 2225 | if ( birthday ) { |
2226 | kind = i18n( "Birthday" ); | 2226 | kind = i18n( "Birthday" ); |
2227 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); | 2227 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); |
2228 | } | 2228 | } |
2229 | else { | 2229 | else { |
2230 | kind = i18n( "Anniversary" ); | 2230 | kind = i18n( "Anniversary" ); |
2231 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); | 2231 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); |
2232 | } | 2232 | } |
2233 | ev->setCategories( kind ); | 2233 | ev->setCategories( kind ); |
2234 | ev->setDtStart( QDateTime(date) ); | 2234 | ev->setDtStart( QDateTime(date) ); |
2235 | ev->setDtEnd( QDateTime(date) ); | 2235 | ev->setDtEnd( QDateTime(date) ); |
2236 | ev->setFloats( true ); | 2236 | ev->setFloats( true ); |
2237 | Recurrence * rec = ev->recurrence(); | 2237 | Recurrence * rec = ev->recurrence(); |
2238 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); | 2238 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); |
2239 | rec->addYearlyNum( date.month() ); | 2239 | rec->addYearlyNum( date.month() ); |
2240 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { | 2240 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { |
2241 | delete ev; | 2241 | delete ev; |
2242 | return false; | 2242 | return false; |
2243 | } | 2243 | } |
2244 | return true; | 2244 | return true; |
2245 | 2245 | ||
2246 | } | 2246 | } |
2247 | bool CalendarView::importQtopia( const QString &categories, | 2247 | bool CalendarView::importQtopia( const QString &categories, |
2248 | const QString &datebook, | 2248 | const QString &datebook, |
2249 | const QString &todolist ) | 2249 | const QString &todolist ) |
2250 | { | 2250 | { |
2251 | 2251 | ||
2252 | QtopiaFormat qtopiaFormat; | 2252 | QtopiaFormat qtopiaFormat; |
2253 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 2253 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
2254 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); | 2254 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); |
2255 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); | 2255 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); |
2256 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); | 2256 | if ( !todolist.isEmpty() ) qtopiaFormat.load( mCalendar, todolist ); |
2257 | 2257 | ||
2258 | updateView(); | 2258 | updateView(); |
2259 | return true; | 2259 | return true; |
2260 | 2260 | ||
2261 | #if 0 | 2261 | #if 0 |
2262 | mGlobalSyncMode = SYNC_MODE_QTOPIA; | 2262 | mGlobalSyncMode = SYNC_MODE_QTOPIA; |
2263 | mCurrentSyncDevice = "qtopia-XML"; | 2263 | mCurrentSyncDevice = "qtopia-XML"; |
2264 | if ( mSyncManager->mAskForPreferences ) | 2264 | if ( mSyncManager->mAskForPreferences ) |
2265 | edit_sync_options(); | 2265 | edit_sync_options(); |
2266 | qApp->processEvents(); | 2266 | qApp->processEvents(); |
2267 | CalendarLocal* calendar = new CalendarLocal(); | 2267 | CalendarLocal* calendar = new CalendarLocal(); |
2268 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 2268 | calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
2269 | bool syncOK = false; | 2269 | bool syncOK = false; |
2270 | QtopiaFormat qtopiaFormat; | 2270 | QtopiaFormat qtopiaFormat; |
2271 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 2271 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
2272 | bool loadOk = true; | 2272 | bool loadOk = true; |
2273 | if ( !categories.isEmpty() ) | 2273 | if ( !categories.isEmpty() ) |
2274 | loadOk = qtopiaFormat.load( calendar, categories ); | 2274 | loadOk = qtopiaFormat.load( calendar, categories ); |
2275 | if ( loadOk && !datebook.isEmpty() ) | 2275 | if ( loadOk && !datebook.isEmpty() ) |
2276 | loadOk = qtopiaFormat.load( calendar, datebook ); | 2276 | loadOk = qtopiaFormat.load( calendar, datebook ); |
2277 | if ( loadOk && !todolist.isEmpty() ) | 2277 | if ( loadOk && !todolist.isEmpty() ) |
2278 | loadOk = qtopiaFormat.load( calendar, todolist ); | 2278 | loadOk = qtopiaFormat.load( calendar, todolist ); |
2279 | 2279 | ||
2280 | if ( loadOk ) { | 2280 | if ( loadOk ) { |
2281 | getEventViewerDialog()->setSyncMode( true ); | 2281 | getEventViewerDialog()->setSyncMode( true ); |
2282 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); | 2282 | syncOK = synchronizeCalendar( mCalendar, calendar, mSyncManager->mSyncAlgoPrefs ); |
2283 | getEventViewerDialog()->setSyncMode( false ); | 2283 | getEventViewerDialog()->setSyncMode( false ); |
2284 | qApp->processEvents(); | 2284 | qApp->processEvents(); |
2285 | if ( syncOK ) { | 2285 | if ( syncOK ) { |
2286 | if ( mSyncManager->mWriteBackFile ) | 2286 | if ( mSyncManager->mWriteBackFile ) |
2287 | { | 2287 | { |
2288 | // write back XML file | 2288 | // write back XML file |
2289 | 2289 | ||
2290 | } | 2290 | } |
2291 | setModified( true ); | 2291 | setModified( true ); |
2292 | } | 2292 | } |
2293 | } else { | 2293 | } else { |
2294 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; | 2294 | QString question = i18n("Sorry, the file loading\ncommand failed!\n\nNothing synced!\n") ; |
2295 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), | 2295 | QMessageBox::information( 0, i18n("KO/Pi Sync - ERROR"), |
2296 | question, i18n("Ok")) ; | 2296 | question, i18n("Ok")) ; |
2297 | } | 2297 | } |
2298 | delete calendar; | 2298 | delete calendar; |
2299 | updateView(); | 2299 | updateView(); |
2300 | return syncOK; | 2300 | return syncOK; |
2301 | 2301 | ||
2302 | 2302 | ||
2303 | #endif | 2303 | #endif |
2304 | 2304 | ||
2305 | } | 2305 | } |
2306 | 2306 | ||
2307 | void CalendarView::setSyncEventsReadOnly() | 2307 | void CalendarView::setSyncEventsReadOnly() |
2308 | { | 2308 | { |
2309 | mCalendar->setSyncEventsReadOnly(); | 2309 | mCalendar->setSyncEventsReadOnly(); |
2310 | } | 2310 | } |
2311 | 2311 | ||
2312 | bool CalendarView::loadCalendars() | 2312 | bool CalendarView::loadCalendars() |
2313 | { | 2313 | { |
2314 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 2314 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
2315 | KopiCalendarFile * cal = calendars.first(); | 2315 | KopiCalendarFile * cal = calendars.first(); |
2316 | mCalendar->setDefaultCalendar( 1 ); | 2316 | mCalendar->setDefaultCalendar( 1 ); |
2317 | openCalendar( MainWindow::defaultFileName(), false ); | 2317 | openCalendar( MainWindow::defaultFileName(), false ); |
2318 | cal = calendars.next(); | 2318 | cal = calendars.next(); |
2319 | while ( cal ) { | 2319 | while ( cal ) { |
2320 | addCalendar( cal ); | 2320 | addCalendar( cal ); |
2321 | cal = calendars.next(); | 2321 | cal = calendars.next(); |
2322 | } | 2322 | } |
2323 | restoreCalendarSettings(); | 2323 | restoreCalendarSettings(); |
2324 | return true; | 2324 | return true; |
2325 | } | 2325 | } |
2326 | bool CalendarView::restoreCalendarSettings() | 2326 | bool CalendarView::restoreCalendarSettings() |
2327 | { | 2327 | { |
2328 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 2328 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
2329 | KopiCalendarFile * cal = calendars.first(); | 2329 | KopiCalendarFile * cal = calendars.first(); |
2330 | while ( cal ) { | 2330 | while ( cal ) { |
2331 | mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); | 2331 | mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); |
2332 | mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled ); | 2332 | mCalendar->setAlarmEnabled( cal->mCalNumber, cal->isAlarmEnabled ); |
2333 | mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly ); | 2333 | mCalendar->setReadOnly( cal->mCalNumber, cal->isReadOnly ); |
2334 | if ( cal->isStandard ) | 2334 | if ( cal->isStandard ) |
2335 | mCalendar->setDefaultCalendar( cal->mCalNumber ); | 2335 | mCalendar->setDefaultCalendar( cal->mCalNumber ); |
2336 | cal = calendars.next(); | 2336 | cal = calendars.next(); |
2337 | } | 2337 | } |
2338 | setSyncEventsReadOnly(); | 2338 | setSyncEventsReadOnly(); |
2339 | mCalendar->reInitAlarmSettings(); | 2339 | mCalendar->reInitAlarmSettings(); |
2340 | updateUnmanagedViews(); | 2340 | updateUnmanagedViews(); |
2341 | updateView(); | 2341 | updateView(); |
2342 | return true; | 2342 | return true; |
2343 | } | 2343 | } |
2344 | void CalendarView::addCalendarId( int id ) | 2344 | void CalendarView::addCalendarId( int id ) |
2345 | { | 2345 | { |
2346 | KopiCalendarFile * cal = KOPrefs::instance()->getCalendar( id ); | 2346 | KopiCalendarFile * cal = KOPrefs::instance()->getCalendar( id ); |
2347 | if ( cal ) | 2347 | if ( cal ) |
2348 | addCalendar( cal ); | 2348 | addCalendar( cal ); |
2349 | } | 2349 | } |
2350 | bool CalendarView::addCalendar( KopiCalendarFile * cal ) | 2350 | bool CalendarView::addCalendar( KopiCalendarFile * cal ) |
2351 | { | 2351 | { |
2352 | cal->mErrorOnLoad = false; | 2352 | cal->mErrorOnLoad = false; |
2353 | if ( mCalendar->addCalendarFile( cal->mFileName, cal->mCalNumber )) { | 2353 | if ( mCalendar->addCalendarFile( cal->mFileName, cal->mCalNumber )) { |
2354 | cal->mLoadDt = QDateTime::currentDateTime(); | 2354 | cal->mLoadDt = QDateTime::currentDateTime(); |
2355 | return true; | 2355 | return true; |
2356 | } | 2356 | } |
2357 | qDebug("KO: Error adding calendar file %s ",cal->mFileName.latin1() ); | 2357 | qDebug("KO: Error adding calendar file %s ",cal->mFileName.latin1() ); |
2358 | cal->mErrorOnLoad = true; | 2358 | cal->mErrorOnLoad = true; |
2359 | return false; | 2359 | return false; |
2360 | } | 2360 | } |
2361 | bool CalendarView::openCalendar(QString filename, bool merge) | 2361 | bool CalendarView::openCalendar(QString filename, bool merge) |
2362 | { | 2362 | { |
2363 | 2363 | ||
2364 | if (filename.isEmpty()) { | 2364 | if (filename.isEmpty()) { |
2365 | return false; | 2365 | return false; |
2366 | } | 2366 | } |
2367 | 2367 | ||
2368 | if (!QFile::exists(filename)) { | 2368 | if (!QFile::exists(filename)) { |
2369 | KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); | 2369 | KMessageBox::error(this,i18n("File does not exist:\n '%1'.").arg(filename)); |
2370 | return false; | 2370 | return false; |
2371 | } | 2371 | } |
2372 | 2372 | ||
2373 | globalFlagBlockAgenda = 1; | 2373 | globalFlagBlockAgenda = 1; |
2374 | clearAllViews(); | 2374 | clearAllViews(); |
2375 | if (!merge) { | 2375 | if (!merge) { |
2376 | mViewManager->setDocumentId( filename ); | 2376 | mViewManager->setDocumentId( filename ); |
2377 | mCalendar->close(); | 2377 | mCalendar->close(); |
2378 | } | 2378 | } |
2379 | mStorage->setFileName( filename ); | 2379 | mStorage->setFileName( filename ); |
2380 | 2380 | ||
2381 | if ( mStorage->load() ) { | 2381 | if ( mStorage->load() ) { |
2382 | if ( merge ) ;//setModified( true ); | 2382 | if ( merge ) ;//setModified( true ); |
2383 | else { | 2383 | else { |
2384 | //setModified( true ); | 2384 | //setModified( true ); |
2385 | mViewManager->setDocumentId( filename ); | 2385 | mViewManager->setDocumentId( filename ); |
2386 | mDialogManager->setDocumentId( filename ); | 2386 | mDialogManager->setDocumentId( filename ); |
2387 | mTodoList->setDocumentId( filename ); | 2387 | mTodoList->setDocumentId( filename ); |
2388 | } | 2388 | } |
2389 | globalFlagBlockAgenda = 2; | 2389 | globalFlagBlockAgenda = 2; |
2390 | // if ( getLastSyncEvent() ) | 2390 | // if ( getLastSyncEvent() ) |
2391 | // getLastSyncEvent()->setReadOnly( true ); | 2391 | // getLastSyncEvent()->setReadOnly( true ); |
2392 | mCalendar->reInitAlarmSettings(); | 2392 | mCalendar->reInitAlarmSettings(); |
2393 | setSyncEventsReadOnly(); | 2393 | setSyncEventsReadOnly(); |
2394 | //updateUnmanagedViews(); | 2394 | //updateUnmanagedViews(); |
2395 | //updateView(); | 2395 | //updateView(); |
2396 | if ( filename != MainWindow::defaultFileName() ) { | 2396 | if ( filename != MainWindow::defaultFileName() ) { |
2397 | saveCalendar( MainWindow::defaultFileName() ); | 2397 | saveCalendar( MainWindow::defaultFileName() ); |
2398 | } else { | 2398 | } else { |
2399 | QFileInfo finf ( MainWindow::defaultFileName()); | 2399 | QFileInfo finf ( MainWindow::defaultFileName()); |
2400 | if ( finf.exists() ) { | 2400 | if ( finf.exists() ) { |
2401 | setLoadedFileVersion( finf.lastModified () ); | 2401 | setLoadedFileVersion( finf.lastModified () ); |
2402 | } | 2402 | } |
2403 | } | 2403 | } |
2404 | return true; | 2404 | return true; |
2405 | } else { | 2405 | } else { |
2406 | // while failing to load, the calendar object could | 2406 | // while failing to load, the calendar object could |
2407 | // have become partially populated. Clear it out. | 2407 | // have become partially populated. Clear it out. |
2408 | if ( !merge ) { | 2408 | if ( !merge ) { |
2409 | mCalendar->close(); | 2409 | mCalendar->close(); |
2410 | mViewManager->setDocumentId( filename ); | 2410 | mViewManager->setDocumentId( filename ); |
2411 | mDialogManager->setDocumentId( filename ); | 2411 | mDialogManager->setDocumentId( filename ); |
2412 | mTodoList->setDocumentId( filename ); | 2412 | mTodoList->setDocumentId( filename ); |
2413 | } | 2413 | } |
2414 | 2414 | ||
2415 | //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); | 2415 | //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); |
2416 | 2416 | ||
2417 | QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); | 2417 | QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) ); |
2418 | globalFlagBlockAgenda = 2; | 2418 | globalFlagBlockAgenda = 2; |
2419 | mCalendar->reInitAlarmSettings(); | 2419 | mCalendar->reInitAlarmSettings(); |
2420 | setSyncEventsReadOnly(); | 2420 | setSyncEventsReadOnly(); |
2421 | updateUnmanagedViews(); | 2421 | updateUnmanagedViews(); |
2422 | updateView(); | 2422 | updateView(); |
2423 | } | 2423 | } |
2424 | return false; | 2424 | return false; |
2425 | } | 2425 | } |
2426 | void CalendarView::mergeFile( QString fn ) | 2426 | void CalendarView::mergeFile( QString fn ) |
2427 | { | 2427 | { |
2428 | clearAllViews(); | 2428 | clearAllViews(); |
2429 | mCalendar->mergeCalendarFile( fn ); | 2429 | mCalendar->mergeCalendarFile( fn ); |
2430 | mCalendar->reInitAlarmSettings(); | 2430 | mCalendar->reInitAlarmSettings(); |
2431 | setSyncEventsReadOnly(); | 2431 | setSyncEventsReadOnly(); |
2432 | updateUnmanagedViews(); | 2432 | updateUnmanagedViews(); |
2433 | updateView(); | 2433 | updateView(); |
2434 | } | 2434 | } |
2435 | void CalendarView::showOpenError() | 2435 | void CalendarView::showOpenError() |
2436 | { | 2436 | { |
2437 | KMessageBox::error(this,i18n("Couldn't load calendar\n.")); | 2437 | KMessageBox::error(this,i18n("Couldn't load calendar\n.")); |
2438 | } | 2438 | } |
2439 | void CalendarView::setLoadedFileVersion(QDateTime dt) | 2439 | void CalendarView::setLoadedFileVersion(QDateTime dt) |
2440 | { | 2440 | { |
2441 | loadedFileVersion = dt; | 2441 | loadedFileVersion = dt; |
2442 | } | 2442 | } |
2443 | bool CalendarView::checkFileChanged(QString fn) | 2443 | bool CalendarView::checkFileChanged(QString fn) |
2444 | { | 2444 | { |
2445 | QFileInfo finf ( fn ); | 2445 | QFileInfo finf ( fn ); |
2446 | if ( !finf.exists() ) | 2446 | if ( !finf.exists() ) |
2447 | return true; | 2447 | return true; |
2448 | QDateTime dt = finf.lastModified (); | 2448 | QDateTime dt = finf.lastModified (); |
2449 | if ( dt <= loadedFileVersion ) | 2449 | if ( dt <= loadedFileVersion ) |
2450 | return false; | 2450 | return false; |
2451 | return true; | 2451 | return true; |
2452 | 2452 | ||
2453 | } | 2453 | } |
2454 | void CalendarView::watchSavedFile() | 2454 | void CalendarView::watchSavedFile() |
2455 | { | 2455 | { |
2456 | QFileInfo finf ( MainWindow::defaultFileName()); | 2456 | QFileInfo finf ( MainWindow::defaultFileName()); |
2457 | if ( !finf.exists() ) | 2457 | if ( !finf.exists() ) |
2458 | return; | 2458 | return; |
2459 | QDateTime dt = finf.lastModified (); | 2459 | QDateTime dt = finf.lastModified (); |
2460 | if ( dt < loadedFileVersion ) { | 2460 | if ( dt < loadedFileVersion ) { |
2461 | //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); | 2461 | //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); |
2462 | QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); | 2462 | QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); |
2463 | return; | 2463 | return; |
2464 | } | 2464 | } |
2465 | loadedFileVersion = dt; | 2465 | loadedFileVersion = dt; |
2466 | } | 2466 | } |
2467 | bool CalendarView::checkAllFileVersions() | 2467 | bool CalendarView::checkAllFileVersions() |
2468 | { | 2468 | { |
2469 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 2469 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
2470 | KopiCalendarFile * cal = calendars.first(); | 2470 | KopiCalendarFile * cal = calendars.first(); |
2471 | mCalendar->setDefaultCalendar( 1 ); | 2471 | mCalendar->setDefaultCalendar( 1 ); |
2472 | mCalendar->setDefaultCalendarEnabledOnly(); | 2472 | mCalendar->setDefaultCalendarEnabledOnly(); |
2473 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { | 2473 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { |
2474 | if ( !checkFileVersion(MainWindow::defaultFileName())) { | 2474 | if ( !checkFileVersion(MainWindow::defaultFileName())) { |
2475 | restoreCalendarSettings(); | 2475 | restoreCalendarSettings(); |
2476 | return false; | 2476 | return false; |
2477 | } | 2477 | } |
2478 | } | 2478 | } |
2479 | cal = calendars.next(); | 2479 | cal = calendars.next(); |
2480 | QDateTime storeTemp = loadedFileVersion; | 2480 | QDateTime storeTemp = loadedFileVersion; |
2481 | while ( cal ) { | 2481 | while ( cal ) { |
2482 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { | 2482 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { |
2483 | mCalendar->setDefaultCalendar( cal->mCalNumber ); | 2483 | mCalendar->setDefaultCalendar( cal->mCalNumber ); |
2484 | mCalendar->setDefaultCalendarEnabledOnly(); | 2484 | mCalendar->setDefaultCalendarEnabledOnly(); |
2485 | loadedFileVersion = cal->mLoadDt.addSecs( 15 ); | 2485 | loadedFileVersion = cal->mLoadDt.addSecs( 15 ); |
2486 | if ( !checkFileVersion(cal->mFileName )) { | 2486 | if ( !checkFileVersion(cal->mFileName )) { |
2487 | loadedFileVersion = storeTemp; | 2487 | loadedFileVersion = storeTemp; |
2488 | restoreCalendarSettings(); | 2488 | restoreCalendarSettings(); |
2489 | return false; | 2489 | return false; |
2490 | } | 2490 | } |
2491 | } | 2491 | } |
2492 | cal = calendars.next(); | 2492 | cal = calendars.next(); |
2493 | } | 2493 | } |
2494 | loadedFileVersion = storeTemp; | 2494 | loadedFileVersion = storeTemp; |
2495 | return true; | 2495 | return true; |
2496 | } | 2496 | } |
2497 | bool CalendarView::checkFileVersion(QString fn) | 2497 | bool CalendarView::checkFileVersion(QString fn) |
2498 | { | 2498 | { |
2499 | QFileInfo finf ( fn ); | 2499 | QFileInfo finf ( fn ); |
2500 | if ( !finf.exists() ) | 2500 | if ( !finf.exists() ) |
2501 | return true; | 2501 | return true; |
2502 | QDateTime dt = finf.lastModified (); | 2502 | QDateTime dt = finf.lastModified (); |
2503 | //qDebug("loaded file version %s %s", fn.latin1(), loadedFileVersion.toString().latin1()); | 2503 | //qDebug("loaded file version %s %s", fn.latin1(), loadedFileVersion.toString().latin1()); |
2504 | //qDebug("file on disk version %s %s", fn.latin1(),dt.toString().latin1()); | 2504 | //qDebug("file on disk version %s %s", fn.latin1(),dt.toString().latin1()); |
2505 | if ( dt <= loadedFileVersion ) | 2505 | if ( dt <= loadedFileVersion ) |
2506 | return true; | 2506 | return true; |
2507 | int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg(KGlobal::formatMessage(fn,0)).arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , | 2507 | int km = KMessageBox::warningYesNoCancel(this, i18n("\nThe file\n%1\non disk has changed!\nFile size: %2 bytes.\nLast modified: %3\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n").arg(KGlobal::formatMessage(fn,0)).arg( QString::number( finf.size())).arg( KGlobal::locale()->formatDateTime(finf.lastModified (), true, true)) , |
2508 | i18n("KO/Pi Warning"),i18n("Overwrite"), | 2508 | i18n("KO/Pi Warning"),i18n("Overwrite"), |
2509 | i18n("Sync+save")); | 2509 | i18n("Sync+save")); |
2510 | 2510 | ||
2511 | if ( km == KMessageBox::Cancel ) | 2511 | if ( km == KMessageBox::Cancel ) |
2512 | return false; | 2512 | return false; |
2513 | if ( km == KMessageBox::Yes ) | 2513 | if ( km == KMessageBox::Yes ) |
2514 | return true; | 2514 | return true; |
2515 | 2515 | ||
2516 | setSyncDevice("deleteaftersync" ); | 2516 | setSyncDevice("deleteaftersync" ); |
2517 | mSyncManager->mAskForPreferences = true; | 2517 | mSyncManager->mAskForPreferences = true; |
2518 | mSyncManager->mSyncAlgoPrefs = 3; | 2518 | mSyncManager->mSyncAlgoPrefs = 3; |
2519 | mSyncManager->mWriteBackFile = false; | 2519 | mSyncManager->mWriteBackFile = false; |
2520 | mSyncManager->mWriteBackExistingOnly = false; | 2520 | mSyncManager->mWriteBackExistingOnly = false; |
2521 | mSyncManager->mShowSyncSummary = false; | 2521 | mSyncManager->mShowSyncSummary = false; |
2522 | syncCalendar( fn, 3 ); | 2522 | syncCalendar( fn, 3 ); |
2523 | Event * e = getLastSyncEvent(); | 2523 | Event * e = getLastSyncEvent(); |
2524 | if ( e ) | 2524 | if ( e ) |
2525 | mCalendar->deleteEvent( e ); | 2525 | mCalendar->deleteEvent( e ); |
2526 | return true; | 2526 | return true; |
2527 | } | 2527 | } |
2528 | bool CalendarView::saveCalendars() | 2528 | bool CalendarView::saveCalendars() |
2529 | { | 2529 | { |
2530 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 2530 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
2531 | KopiCalendarFile * cal = calendars.first(); | 2531 | KopiCalendarFile * cal = calendars.first(); |
2532 | mCalendar->setDefaultCalendar( 1 ); | 2532 | mCalendar->setDefaultCalendar( 1 ); |
2533 | mCalendar->setDefaultCalendarEnabledOnly(); | 2533 | mCalendar->setDefaultCalendarEnabledOnly(); |
2534 | QString saveError; | 2534 | QString saveError; |
2535 | if ( !saveCalendar( MainWindow::defaultFileName() ) ) | 2535 | if ( !saveCalendar( MainWindow::defaultFileName() ) ) |
2536 | saveError = cal->mName +"\n"; | 2536 | saveError = cal->mName +"\n"; |
2537 | cal = calendars.next(); | 2537 | cal = calendars.next(); |
2538 | while ( cal ) { | 2538 | while ( cal ) { |
2539 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { | 2539 | if ( !cal->isReadOnly && !cal->mErrorOnLoad ) { |
2540 | mCalendar->setDefaultCalendar( cal->mCalNumber ); | 2540 | mCalendar->setDefaultCalendar( cal->mCalNumber ); |
2541 | mCalendar->setDefaultCalendarEnabledOnly(); | 2541 | mCalendar->setDefaultCalendarEnabledOnly(); |
2542 | if ( saveCalendar( cal->mFileName ) ) | 2542 | if ( saveCalendar( cal->mFileName ) ) |
2543 | cal->mLoadDt = QDateTime::currentDateTime(); | 2543 | cal->mLoadDt = QDateTime::currentDateTime(); |
2544 | else | 2544 | else |
2545 | saveError += cal->mName + "\n"; | 2545 | saveError += cal->mName + "\n"; |
2546 | } | 2546 | } |
2547 | cal = calendars.next(); | 2547 | cal = calendars.next(); |
2548 | } | 2548 | } |
2549 | restoreCalendarSettings(); | 2549 | restoreCalendarSettings(); |
2550 | //saveError = "test error"; | ||
2550 | if ( !saveError.isEmpty() ) { | 2551 | if ( !saveError.isEmpty() ) { |
2551 | saveError = KGlobal::formatMessage( i18n("Calendar(s) not saved:"),0 )+"\n" + saveError; | 2552 | saveError = KGlobal::formatMessage( i18n("Calendar(s) not saved:"),0 )+"\n" + saveError; |
2552 | KMessageBox::error(this, saveError, i18n("Error saving data")); | 2553 | KMessageBox::error(this, saveError, i18n("Error saving data")); |
2553 | return false; | 2554 | return false; |
2554 | } | 2555 | } |
2555 | return true; | 2556 | return true; |
2556 | } | 2557 | } |
2557 | bool CalendarView::saveCalendar( QString filename ) | 2558 | bool CalendarView::saveCalendar( QString filename ) |
2558 | { | 2559 | { |
2559 | 2560 | ||
2560 | // Store back all unsaved data into calendar object | 2561 | // Store back all unsaved data into calendar object |
2561 | // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); | 2562 | // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); |
2562 | if ( mViewManager->currentView() ) | 2563 | if ( mViewManager->currentView() ) |
2563 | mViewManager->currentView()->flushView(); | 2564 | mViewManager->currentView()->flushView(); |
2564 | 2565 | ||
2565 | 2566 | ||
2566 | QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); | 2567 | QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); |
2567 | mStorage->setSaveFormat( new ICalFormat() ); | 2568 | mStorage->setSaveFormat( new ICalFormat() ); |
2568 | mStorage->setFileName( filename ); | 2569 | mStorage->setFileName( filename ); |
2569 | bool success; | 2570 | bool success; |
2570 | success = mStorage->save(); | 2571 | success = mStorage->save(); |
2571 | if ( !success ) { | 2572 | if ( !success ) { |
2572 | return false; | 2573 | return false; |
2573 | } | 2574 | } |
2574 | if ( filename == MainWindow::defaultFileName() ) { | 2575 | if ( filename == MainWindow::defaultFileName() ) { |
2575 | setLoadedFileVersion( lfv ); | 2576 | setLoadedFileVersion( lfv ); |
2576 | watchSavedFile(); | 2577 | watchSavedFile(); |
2577 | } | 2578 | } |
2578 | return true; | 2579 | return true; |
2579 | } | 2580 | } |
2580 | 2581 | ||
2581 | void CalendarView::closeCalendar() | 2582 | void CalendarView::closeCalendar() |
2582 | { | 2583 | { |
2583 | 2584 | ||
2584 | // child windows no longer valid | 2585 | // child windows no longer valid |
2585 | clearAllViews(); | 2586 | clearAllViews(); |
2586 | emit closingDown(); | 2587 | emit closingDown(); |
2587 | 2588 | ||
2588 | mCalendar->close(); | 2589 | mCalendar->close(); |
2589 | setModified(false); | 2590 | setModified(false); |
2590 | updateView(); | 2591 | updateView(); |
2591 | } | 2592 | } |
2592 | 2593 | ||
2593 | void CalendarView::archiveCalendar() | 2594 | void CalendarView::archiveCalendar() |
2594 | { | 2595 | { |
2595 | mDialogManager->showArchiveDialog(); | 2596 | mDialogManager->showArchiveDialog(); |
2596 | } | 2597 | } |
2597 | 2598 | ||
2598 | 2599 | ||
2599 | void CalendarView::readSettings() | 2600 | void CalendarView::readSettings() |
2600 | { | 2601 | { |
2601 | 2602 | ||
2602 | 2603 | ||
2603 | // mViewManager->showAgendaView(); | 2604 | // mViewManager->showAgendaView(); |
2604 | QString str; | 2605 | QString str; |
2605 | //qDebug("CalendarView::readSettings() "); | 2606 | //qDebug("CalendarView::readSettings() "); |
2606 | // read settings from the KConfig, supplying reasonable | 2607 | // read settings from the KConfig, supplying reasonable |
2607 | // defaults where none are to be found | 2608 | // defaults where none are to be found |
2608 | KConfig *config = KOGlobals::config(); | 2609 | KConfig *config = KOGlobals::config(); |
2609 | #ifndef KORG_NOSPLITTER | 2610 | #ifndef KORG_NOSPLITTER |
2610 | config->setGroup("KOrganizer Geometry"); | 2611 | config->setGroup("KOrganizer Geometry"); |
2611 | 2612 | ||
2612 | QValueList<int> sizes = config->readIntListEntry("Separator1"); | 2613 | QValueList<int> sizes = config->readIntListEntry("Separator1"); |
2613 | if (sizes.count() != 2) { | 2614 | if (sizes.count() != 2) { |
2614 | sizes << mDateNavigator->minimumSizeHint().width(); | 2615 | sizes << mDateNavigator->minimumSizeHint().width(); |
2615 | sizes << 300; | 2616 | sizes << 300; |
2616 | } | 2617 | } |
2617 | mPanner->setSizes(sizes); | 2618 | mPanner->setSizes(sizes); |
2618 | 2619 | ||
2619 | sizes = config->readIntListEntry("Separator2"); | 2620 | sizes = config->readIntListEntry("Separator2"); |
2620 | if ( ( mResourceView && sizes.count() == 4 ) || | 2621 | if ( ( mResourceView && sizes.count() == 4 ) || |
2621 | ( !mResourceView && sizes.count() == 3 ) ) { | 2622 | ( !mResourceView && sizes.count() == 3 ) ) { |
2622 | mLeftSplitter->setSizes(sizes); | 2623 | mLeftSplitter->setSizes(sizes); |
2623 | } | 2624 | } |
2624 | #endif | 2625 | #endif |
2625 | globalFlagBlockAgenda = 1; | 2626 | globalFlagBlockAgenda = 1; |
2626 | mViewManager->showAgendaView(); | 2627 | mViewManager->showAgendaView(); |
2627 | //mViewManager->readSettings( config ); | 2628 | //mViewManager->readSettings( config ); |
2628 | mTodoList->restoreLayout(config,QString("Todo Layout")); | 2629 | mTodoList->restoreLayout(config,QString("Todo Layout")); |
2629 | readFilterSettings(config); | 2630 | readFilterSettings(config); |
2630 | 2631 | ||
2631 | #ifdef DESKTOP_VERSION | 2632 | #ifdef DESKTOP_VERSION |
2632 | config->setGroup("WidgetLayout"); | 2633 | config->setGroup("WidgetLayout"); |
2633 | QStringList list; | 2634 | QStringList list; |
2634 | list = config->readListEntry("MainLayout"); | 2635 | list = config->readListEntry("MainLayout"); |
2635 | int x,y,w,h; | 2636 | int x,y,w,h; |
2636 | if ( ! list.isEmpty() ) { | 2637 | if ( ! list.isEmpty() ) { |
2637 | x = list[0].toInt(); | 2638 | x = list[0].toInt(); |
2638 | y = list[1].toInt(); | 2639 | y = list[1].toInt(); |
2639 | w = list[2].toInt(); | 2640 | w = list[2].toInt(); |
2640 | h = list[3].toInt(); | 2641 | h = list[3].toInt(); |
2641 | KApplication::testCoords( &x,&y,&w,&h ); | 2642 | KApplication::testCoords( &x,&y,&w,&h ); |
2642 | topLevelWidget()->setGeometry(x,y,w,h); | 2643 | topLevelWidget()->setGeometry(x,y,w,h); |
2643 | 2644 | ||
2644 | } else { | 2645 | } else { |
2645 | topLevelWidget()->setGeometry( 40 ,40 , 640, 440); | 2646 | topLevelWidget()->setGeometry( 40 ,40 , 640, 440); |
2646 | } | 2647 | } |
2647 | list = config->readListEntry("EditEventLayout"); | 2648 | list = config->readListEntry("EditEventLayout"); |
2648 | if ( ! list.isEmpty() ) { | 2649 | if ( ! list.isEmpty() ) { |
2649 | x = list[0].toInt(); | 2650 | x = list[0].toInt(); |
2650 | y = list[1].toInt(); | 2651 | y = list[1].toInt(); |
2651 | w = list[2].toInt(); | 2652 | w = list[2].toInt(); |
2652 | h = list[3].toInt(); | 2653 | h = list[3].toInt(); |
2653 | KApplication::testCoords( &x,&y,&w,&h ); | 2654 | KApplication::testCoords( &x,&y,&w,&h ); |
2654 | mEventEditor->setGeometry(x,y,w,h); | 2655 | mEventEditor->setGeometry(x,y,w,h); |
2655 | 2656 | ||
2656 | } | 2657 | } |
2657 | list = config->readListEntry("EditTodoLayout"); | 2658 | list = config->readListEntry("EditTodoLayout"); |
2658 | if ( ! list.isEmpty() ) { | 2659 | if ( ! list.isEmpty() ) { |
2659 | x = list[0].toInt(); | 2660 | x = list[0].toInt(); |
2660 | y = list[1].toInt(); | 2661 | y = list[1].toInt(); |
2661 | w = list[2].toInt(); | 2662 | w = list[2].toInt(); |
2662 | h = list[3].toInt(); | 2663 | h = list[3].toInt(); |
2663 | KApplication::testCoords( &x,&y,&w,&h ); | 2664 | KApplication::testCoords( &x,&y,&w,&h ); |
2664 | mTodoEditor->setGeometry(x,y,w,h); | 2665 | mTodoEditor->setGeometry(x,y,w,h); |
2665 | 2666 | ||
2666 | } | 2667 | } |
2667 | list = config->readListEntry("ViewerLayout"); | 2668 | list = config->readListEntry("ViewerLayout"); |
2668 | if ( ! list.isEmpty() ) { | 2669 | if ( ! list.isEmpty() ) { |
2669 | x = list[0].toInt(); | 2670 | x = list[0].toInt(); |
2670 | y = list[1].toInt(); | 2671 | y = list[1].toInt(); |
2671 | w = list[2].toInt(); | 2672 | w = list[2].toInt(); |
2672 | h = list[3].toInt(); | 2673 | h = list[3].toInt(); |
2673 | KApplication::testCoords( &x,&y,&w,&h ); | 2674 | KApplication::testCoords( &x,&y,&w,&h ); |
2674 | getEventViewerDialog()->setGeometry(x,y,w,h); | 2675 | getEventViewerDialog()->setGeometry(x,y,w,h); |
2675 | } | 2676 | } |
2676 | #endif | 2677 | #endif |
2677 | config->setGroup( "Views" ); | 2678 | config->setGroup( "Views" ); |
2678 | int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); | 2679 | int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); |
2679 | 2680 | ||
2680 | QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); | 2681 | QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); |
2681 | 2682 | ||
2682 | int resetval = 0; | 2683 | int resetval = 0; |
2683 | int maxVal = 0; | 2684 | int maxVal = 0; |
2684 | if (sizes.count() != 3) { | 2685 | if (sizes.count() != 3) { |
2685 | if ( KOPrefs::instance()->mVerticalScreen ) { | 2686 | if ( KOPrefs::instance()->mVerticalScreen ) { |
2686 | resetval = mDateNavigator->sizeHint().width()+2; | 2687 | resetval = mDateNavigator->sizeHint().width()+2; |
2687 | } else { | 2688 | } else { |
2688 | resetval = mDateNavigator->sizeHint().height()+2; | 2689 | resetval = mDateNavigator->sizeHint().height()+2; |
2689 | } | 2690 | } |
2690 | } | 2691 | } |
2691 | if ( resetval ) { | 2692 | if ( resetval ) { |
2692 | sizes.clear(); | 2693 | sizes.clear(); |
2693 | if ( KOPrefs::instance()->mVerticalScreen ) { | 2694 | if ( KOPrefs::instance()->mVerticalScreen ) { |
2694 | maxVal = QApplication::desktop()->width() -10; | 2695 | maxVal = QApplication::desktop()->width() -10; |
2695 | } else { | 2696 | } else { |
2696 | maxVal = QApplication::desktop()->height()-10; | 2697 | maxVal = QApplication::desktop()->height()-10; |
2697 | } | 2698 | } |
2698 | sizes << resetval; | 2699 | sizes << resetval; |
2699 | if ( maxVal < resetval + resetval) | 2700 | if ( maxVal < resetval + resetval) |
2700 | resetval = maxVal - resetval; | 2701 | resetval = maxVal - resetval; |
2701 | sizes << resetval; | 2702 | sizes << resetval; |
2702 | sizes << 100; | 2703 | sizes << 100; |
2703 | } | 2704 | } |
2704 | mLeftFrame->setSizes(sizes); | 2705 | mLeftFrame->setSizes(sizes); |
2705 | sizes = config->readIntListEntry("Main Splitter Frame"); | 2706 | sizes = config->readIntListEntry("Main Splitter Frame"); |
2706 | resetval = 0; | 2707 | resetval = 0; |
2707 | maxVal = 0; | 2708 | maxVal = 0; |
2708 | if (sizes.count() != 2) { | 2709 | if (sizes.count() != 2) { |
2709 | if ( !KOPrefs::instance()->mVerticalScreen ) { | 2710 | if ( !KOPrefs::instance()->mVerticalScreen ) { |
2710 | resetval = mDateNavigator->sizeHint().width()+2; | 2711 | resetval = mDateNavigator->sizeHint().width()+2; |
2711 | } else { | 2712 | } else { |
2712 | resetval = mDateNavigator->sizeHint().height()+2; | 2713 | resetval = mDateNavigator->sizeHint().height()+2; |
2713 | } | 2714 | } |
2714 | } | 2715 | } |
2715 | if ( resetval ) { | 2716 | if ( resetval ) { |
2716 | sizes.clear(); | 2717 | sizes.clear(); |
2717 | if ( !KOPrefs::instance()->mVerticalScreen ) { | 2718 | if ( !KOPrefs::instance()->mVerticalScreen ) { |
2718 | maxVal = QApplication::desktop()->width() -10; | 2719 | maxVal = QApplication::desktop()->width() -10; |
2719 | } else { | 2720 | } else { |
2720 | maxVal = QApplication::desktop()->height()-10; | 2721 | maxVal = QApplication::desktop()->height()-10; |
2721 | } | 2722 | } |
2722 | sizes << resetval; | 2723 | sizes << resetval; |
2723 | if ( maxVal < resetval + resetval) | 2724 | if ( maxVal < resetval + resetval) |
2724 | resetval = maxVal - resetval; | 2725 | resetval = maxVal - resetval; |
2725 | sizes << resetval; | 2726 | sizes << resetval; |
2726 | } | 2727 | } |
2727 | mMainFrame->setSizes(sizes); | 2728 | mMainFrame->setSizes(sizes); |
2728 | if ( dateCount == 5 ) mNavigator->selectWorkWeek(); | 2729 | if ( dateCount == 5 ) mNavigator->selectWorkWeek(); |
2729 | else if ( dateCount == 7 ) mNavigator->selectWeek(); | 2730 | else if ( dateCount == 7 ) mNavigator->selectWeek(); |
2730 | else mNavigator->selectDates( dateCount ); | 2731 | else mNavigator->selectDates( dateCount ); |
2731 | // mViewManager->readSettings( config ); | 2732 | // mViewManager->readSettings( config ); |
2732 | updateConfig(); | 2733 | updateConfig(); |
2733 | globalFlagBlockAgenda = 2; | 2734 | globalFlagBlockAgenda = 2; |
2734 | mViewManager->readSettings( config ); | 2735 | mViewManager->readSettings( config ); |
2735 | QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); | 2736 | QTimer::singleShot( 1, mDateNavigator, SLOT ( setResizeEnabled() ) ); |
2736 | } | 2737 | } |
2737 | 2738 | ||
2738 | void CalendarView::checkSuspendAlarm() | 2739 | void CalendarView::checkSuspendAlarm() |
2739 | { | 2740 | { |
2740 | if ( mSuspendTimer->isActive() ) { | 2741 | if ( mSuspendTimer->isActive() ) { |
2741 | KMessageBox::information( this, i18n("<b>WARNING:</b> There is a pending suspended alarm!"), i18n("Pending Suspend Alarm")); | 2742 | KMessageBox::information( this, i18n("<b>WARNING:</b> There is a pending suspended alarm!"), i18n("Pending Suspend Alarm")); |
2742 | } | 2743 | } |
2743 | } | 2744 | } |
2744 | void CalendarView::writeSettings() | 2745 | void CalendarView::writeSettings() |
2745 | { | 2746 | { |
2746 | // kdDebug() << "CalendarView::writeSettings" << endl; | 2747 | // kdDebug() << "CalendarView::writeSettings" << endl; |
2747 | 2748 | ||
2748 | KConfig *config = KOGlobals::config(); | 2749 | KConfig *config = KOGlobals::config(); |
2749 | 2750 | ||
2750 | mViewManager->writeSettings( config ); | 2751 | mViewManager->writeSettings( config ); |
2751 | mTodoList->saveLayout(config,QString("Todo Layout")); | 2752 | mTodoList->saveLayout(config,QString("Todo Layout")); |
2752 | mDialogManager->writeSettings( config ); | 2753 | mDialogManager->writeSettings( config ); |
2753 | //KOPrefs::instance()->usrWriteConfig(); | 2754 | //KOPrefs::instance()->usrWriteConfig(); |
2754 | KOPrefs::instance()->writeConfig(); | 2755 | KOPrefs::instance()->writeConfig(); |
2755 | 2756 | ||
2756 | writeFilterSettings(config); | 2757 | writeFilterSettings(config); |
2757 | config->setGroup( "AppRun" ); | 2758 | config->setGroup( "AppRun" ); |
2758 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); | 2759 | QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); |
2759 | int days = dt.daysTo( QDate::currentDate() ); | 2760 | int days = dt.daysTo( QDate::currentDate() ); |
2760 | dt = dt.addDays( days ); | 2761 | dt = dt.addDays( days ); |
2761 | int secs = dt.secsTo( QDateTime::currentDateTime() ); | 2762 | int secs = dt.secsTo( QDateTime::currentDateTime() ); |
2762 | config->writeEntry( "LatestProgramStopDays", days ); | 2763 | config->writeEntry( "LatestProgramStopDays", days ); |
2763 | config->writeEntry( "LatestProgramStopSecs", secs ); | 2764 | config->writeEntry( "LatestProgramStopSecs", secs ); |
2764 | //qDebug("KO: Writing stop time: %d ", secs); | 2765 | //qDebug("KO: Writing stop time: %d ", secs); |
2765 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); | 2766 | //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); |
2766 | //QDateTime latest = dt.addSecs ( secs ); | 2767 | //QDateTime latest = dt.addSecs ( secs ); |
2767 | //qDebug("KO: Termination on %s ", latest.toString().latin1()); | 2768 | //qDebug("KO: Termination on %s ", latest.toString().latin1()); |
2768 | config->setGroup( "Views" ); | 2769 | config->setGroup( "Views" ); |
2769 | config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); | 2770 | config->writeEntry( "ShownDatesCount", mNavigator->selectedDates().count() ); |
2770 | 2771 | ||
2771 | #if 0 | 2772 | #if 0 |
2772 | qDebug("********************* "); | 2773 | qDebug("********************* "); |
2773 | qDebug("Testcode secsto "); | 2774 | qDebug("Testcode secsto "); |
2774 | QDateTime dt_nodaylight ( QDate (2005,3,26), QTime( 0,0,0 ) ); | 2775 | QDateTime dt_nodaylight ( QDate (2005,3,26), QTime( 0,0,0 ) ); |
2775 | QDateTime dt_daylight ( QDate (2005,3,29), QTime( 0,0,0 ) ); | 2776 | QDateTime dt_daylight ( QDate (2005,3,29), QTime( 0,0,0 ) ); |
2776 | int secsto = dt_nodaylight.secsTo( dt_daylight ); | 2777 | int secsto = dt_nodaylight.secsTo( dt_daylight ); |
2777 | QDateTime dt_daylight_wrong = dt_nodaylight.addSecs( secsto ); | 2778 | QDateTime dt_daylight_wrong = dt_nodaylight.addSecs( secsto ); |
2778 | qDebug("dt nodaylight %s ",dt_nodaylight.toString().latin1() ); | 2779 | qDebug("dt nodaylight %s ",dt_nodaylight.toString().latin1() ); |
2779 | qDebug("dt daylight %s ",dt_daylight.toString().latin1() ); | 2780 | qDebug("dt daylight %s ",dt_daylight.toString().latin1() ); |
2780 | qDebug("dt daylight_wrong %s ",dt_daylight_wrong.toString().latin1() ); | 2781 | qDebug("dt daylight_wrong %s ",dt_daylight_wrong.toString().latin1() ); |
2781 | qDebug("Computed secsTo %d . in minutes: %d . in hours: %d ", secsto, secsto/60, secsto/3600); | 2782 | qDebug("Computed secsTo %d . in minutes: %d . in hours: %d ", secsto, secsto/60, secsto/3600); |
2782 | qDebug("********************* testcode end"); | 2783 | qDebug("********************* testcode end"); |
2783 | 2784 | ||
2784 | #endif | 2785 | #endif |
2785 | 2786 | ||
2786 | QValueList<int> listINT = mLeftFrame->sizes(); | 2787 | QValueList<int> listINT = mLeftFrame->sizes(); |
2787 | config->writeEntry("Left Splitter Frame",listINT); | 2788 | config->writeEntry("Left Splitter Frame",listINT); |
2788 | QValueList<int> listINT2 = mMainFrame->sizes(); | 2789 | QValueList<int> listINT2 = mMainFrame->sizes(); |
2789 | config->writeEntry("Main Splitter Frame",listINT2); | 2790 | config->writeEntry("Main Splitter Frame",listINT2); |
2790 | #ifdef DESKTOP_VERSION | 2791 | #ifdef DESKTOP_VERSION |
2791 | config->setGroup("WidgetLayout"); | 2792 | config->setGroup("WidgetLayout"); |
2792 | QStringList list ;//= config->readListEntry("MainLayout"); | 2793 | QStringList list ;//= config->readListEntry("MainLayout"); |
2793 | int x,y,w,h; | 2794 | int x,y,w,h; |
2794 | QWidget* wid; | 2795 | QWidget* wid; |
2795 | wid = topLevelWidget(); | 2796 | wid = topLevelWidget(); |
2796 | x = wid->geometry().x(); | 2797 | x = wid->geometry().x(); |
2797 | y = wid->geometry().y(); | 2798 | y = wid->geometry().y(); |
2798 | w = wid->width(); | 2799 | w = wid->width(); |
2799 | h = wid->height(); | 2800 | h = wid->height(); |
2800 | list.clear(); | 2801 | list.clear(); |
2801 | list << QString::number( x ); | 2802 | list << QString::number( x ); |
2802 | list << QString::number( y ); | 2803 | list << QString::number( y ); |
2803 | list << QString::number( w ); | 2804 | list << QString::number( w ); |
2804 | list << QString::number( h ); | 2805 | list << QString::number( h ); |
2805 | config->writeEntry("MainLayout",list ); | 2806 | config->writeEntry("MainLayout",list ); |
2806 | 2807 | ||
2807 | wid = mEventEditor; | 2808 | wid = mEventEditor; |
2808 | x = wid->geometry().x(); | 2809 | x = wid->geometry().x(); |
2809 | y = wid->geometry().y(); | 2810 | y = wid->geometry().y(); |
2810 | w = wid->width(); | 2811 | w = wid->width(); |
2811 | h = wid->height(); | 2812 | h = wid->height(); |
2812 | list.clear(); | 2813 | list.clear(); |
2813 | list << QString::number( x ); | 2814 | list << QString::number( x ); |
2814 | list << QString::number( y ); | 2815 | list << QString::number( y ); |
2815 | list << QString::number( w ); | 2816 | list << QString::number( w ); |
2816 | list << QString::number( h ); | 2817 | list << QString::number( h ); |
2817 | config->writeEntry("EditEventLayout",list ); | 2818 | config->writeEntry("EditEventLayout",list ); |
2818 | 2819 | ||
2819 | wid = mTodoEditor; | 2820 | wid = mTodoEditor; |
2820 | x = wid->geometry().x(); | 2821 | x = wid->geometry().x(); |
2821 | y = wid->geometry().y(); | 2822 | y = wid->geometry().y(); |
2822 | w = wid->width(); | 2823 | w = wid->width(); |
2823 | h = wid->height(); | 2824 | h = wid->height(); |
2824 | list.clear(); | 2825 | list.clear(); |
2825 | list << QString::number( x ); | 2826 | list << QString::number( x ); |
2826 | list << QString::number( y ); | 2827 | list << QString::number( y ); |
2827 | list << QString::number( w ); | 2828 | list << QString::number( w ); |
2828 | list << QString::number( h ); | 2829 | list << QString::number( h ); |
2829 | config->writeEntry("EditTodoLayout",list ); | 2830 | config->writeEntry("EditTodoLayout",list ); |
2830 | wid = getEventViewerDialog(); | 2831 | wid = getEventViewerDialog(); |
2831 | x = wid->geometry().x(); | 2832 | x = wid->geometry().x(); |
2832 | y = wid->geometry().y(); | 2833 | y = wid->geometry().y(); |
2833 | w = wid->width(); | 2834 | w = wid->width(); |
2834 | h = wid->height(); | 2835 | h = wid->height(); |
2835 | list.clear(); | 2836 | list.clear(); |
2836 | list << QString::number( x ); | 2837 | list << QString::number( x ); |
2837 | list << QString::number( y ); | 2838 | list << QString::number( y ); |
2838 | list << QString::number( w ); | 2839 | list << QString::number( w ); |
2839 | list << QString::number( h ); | 2840 | list << QString::number( h ); |
2840 | config->writeEntry("ViewerLayout",list ); | 2841 | config->writeEntry("ViewerLayout",list ); |
2841 | wid = mDialogManager->getSearchDialog(); | 2842 | wid = mDialogManager->getSearchDialog(); |
2842 | if ( wid ) { | 2843 | if ( wid ) { |
2843 | x = wid->geometry().x(); | 2844 | x = wid->geometry().x(); |
2844 | y = wid->geometry().y(); | 2845 | y = wid->geometry().y(); |
2845 | w = wid->width(); | 2846 | w = wid->width(); |
2846 | h = wid->height(); | 2847 | h = wid->height(); |
2847 | list.clear(); | 2848 | list.clear(); |
2848 | list << QString::number( x ); | 2849 | list << QString::number( x ); |
2849 | list << QString::number( y ); | 2850 | list << QString::number( y ); |
2850 | list << QString::number( w ); | 2851 | list << QString::number( w ); |
2851 | list << QString::number( h ); | 2852 | list << QString::number( h ); |
2852 | config->writeEntry("SearchLayout",list ); | 2853 | config->writeEntry("SearchLayout",list ); |
2853 | } | 2854 | } |
2854 | #endif | 2855 | #endif |
2855 | 2856 | ||
2856 | 2857 | ||
2857 | config->sync(); | 2858 | config->sync(); |
2858 | } | 2859 | } |
2859 | 2860 | ||
2860 | void CalendarView::readFilterSettings(KConfig *config) | 2861 | void CalendarView::readFilterSettings(KConfig *config) |
2861 | { | 2862 | { |
2862 | // kdDebug() << "CalendarView::readFilterSettings()" << endl; | 2863 | // kdDebug() << "CalendarView::readFilterSettings()" << endl; |
2863 | 2864 | ||
2864 | mFilters.clear(); | 2865 | mFilters.clear(); |
2865 | 2866 | ||
2866 | config->setGroup("General"); | 2867 | config->setGroup("General"); |
2867 | QStringList filterList = config->readListEntry("CalendarFilters"); | 2868 | QStringList filterList = config->readListEntry("CalendarFilters"); |
2868 | 2869 | ||
2869 | QStringList::ConstIterator it = filterList.begin(); | 2870 | QStringList::ConstIterator it = filterList.begin(); |
2870 | QStringList::ConstIterator end = filterList.end(); | 2871 | QStringList::ConstIterator end = filterList.end(); |
2871 | while(it != end) { | 2872 | while(it != end) { |
2872 | // kdDebug() << " filter: " << (*it) << endl; | 2873 | // kdDebug() << " filter: " << (*it) << endl; |
2873 | 2874 | ||
2874 | CalFilter *filter; | 2875 | CalFilter *filter; |
2875 | filter = new CalFilter(*it); | 2876 | filter = new CalFilter(*it); |
2876 | config->setGroup("Filter_" + (*it).utf8()); | 2877 | config->setGroup("Filter_" + (*it).utf8()); |
2877 | //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) ); | 2878 | //qDebug("readFilterSettings %d ",config->readNumEntry("Criteria",0) ); |
2878 | filter->setCriteria(config->readNumEntry("Criteria",0)); | 2879 | filter->setCriteria(config->readNumEntry("Criteria",0)); |
2879 | filter->setCategoryList(config->readListEntry("CategoryList")); | 2880 | filter->setCategoryList(config->readListEntry("CategoryList")); |
2880 | mFilters.append(filter); | 2881 | mFilters.append(filter); |
2881 | 2882 | ||
2882 | ++it; | 2883 | ++it; |
2883 | } | 2884 | } |
2884 | 2885 | ||
2885 | if (mFilters.count() == 0) { | 2886 | if (mFilters.count() == 0) { |
2886 | CalFilter *filter = new CalFilter(i18n("Default")); | 2887 | CalFilter *filter = new CalFilter(i18n("Default")); |
2887 | mFilters.append(filter); | 2888 | mFilters.append(filter); |
2888 | } | 2889 | } |
2889 | mFilterView->updateFilters(); | 2890 | mFilterView->updateFilters(); |
2890 | config->setGroup("FilterView"); | 2891 | config->setGroup("FilterView"); |
2891 | 2892 | ||
2892 | mFilterView->blockSignals(true); | 2893 | mFilterView->blockSignals(true); |
2893 | mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled")); | 2894 | mFilterView->setFiltersEnabled(config->readBoolEntry("FilterEnabled")); |
2894 | mFilterView->setSelectedFilter(config->readEntry("Current Filter")); | 2895 | mFilterView->setSelectedFilter(config->readEntry("Current Filter")); |
2895 | mFilterView->blockSignals(false); | 2896 | mFilterView->blockSignals(false); |
2896 | // We do it manually to avoid it being done twice by the above calls | 2897 | // We do it manually to avoid it being done twice by the above calls |
2897 | updateFilter(); | 2898 | updateFilter(); |
2898 | } | 2899 | } |
2899 | 2900 | ||
2900 | void CalendarView::writeFilterSettings(KConfig *config) | 2901 | void CalendarView::writeFilterSettings(KConfig *config) |
2901 | { | 2902 | { |
2902 | // kdDebug() << "CalendarView::writeFilterSettings()" << endl; | 2903 | // kdDebug() << "CalendarView::writeFilterSettings()" << endl; |
2903 | 2904 | ||
2904 | QStringList filterList; | 2905 | QStringList filterList; |
2905 | 2906 | ||
2906 | CalFilter *filter = mFilters.first(); | 2907 | CalFilter *filter = mFilters.first(); |
2907 | while(filter) { | 2908 | while(filter) { |
2908 | // kdDebug() << " fn: " << filter->name() << endl; | 2909 | // kdDebug() << " fn: " << filter->name() << endl; |
2909 | filterList << filter->name(); | 2910 | filterList << filter->name(); |
2910 | config->setGroup("Filter_" + filter->name().utf8()); | 2911 | config->setGroup("Filter_" + filter->name().utf8()); |
2911 | config->writeEntry("Criteria",filter->criteria()); | 2912 | config->writeEntry("Criteria",filter->criteria()); |
2912 | config->writeEntry("CategoryList",filter->categoryList()); | 2913 | config->writeEntry("CategoryList",filter->categoryList()); |
2913 | filter = mFilters.next(); | 2914 | filter = mFilters.next(); |
2914 | } | 2915 | } |
2915 | config->setGroup("General"); | 2916 | config->setGroup("General"); |
2916 | config->writeEntry("CalendarFilters",filterList); | 2917 | config->writeEntry("CalendarFilters",filterList); |
2917 | 2918 | ||
2918 | config->setGroup("FilterView"); | 2919 | config->setGroup("FilterView"); |
2919 | config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); | 2920 | config->writeEntry("FilterEnabled",mFilterView->filtersEnabled()); |
2920 | config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); | 2921 | config->writeEntry("Current Filter",mFilterView->selectedFilter()->name()); |
2921 | } | 2922 | } |
2922 | 2923 | ||
2923 | 2924 | ||
2924 | void CalendarView::goToday() | 2925 | void CalendarView::goToday() |
2925 | { | 2926 | { |
2926 | if ( mViewManager->currentView()->isMonthView() ) | 2927 | if ( mViewManager->currentView()->isMonthView() ) |
2927 | mNavigator->selectTodayMonth(); | 2928 | mNavigator->selectTodayMonth(); |
2928 | else | 2929 | else |
2929 | mNavigator->selectToday(); | 2930 | mNavigator->selectToday(); |
2930 | } | 2931 | } |
2931 | 2932 | ||
2932 | void CalendarView::goNext() | 2933 | void CalendarView::goNext() |
2933 | { | 2934 | { |
2934 | mNavigator->selectNext(); | 2935 | mNavigator->selectNext(); |
2935 | } | 2936 | } |
2936 | 2937 | ||
2937 | void CalendarView::goPrevious() | 2938 | void CalendarView::goPrevious() |
2938 | { | 2939 | { |
2939 | mNavigator->selectPrevious(); | 2940 | mNavigator->selectPrevious(); |
2940 | } | 2941 | } |
2941 | void CalendarView::goNextMonth() | 2942 | void CalendarView::goNextMonth() |
2942 | { | 2943 | { |
2943 | mNavigator->selectNextMonth(); | 2944 | mNavigator->selectNextMonth(); |
2944 | } | 2945 | } |
2945 | 2946 | ||
2946 | void CalendarView::goPreviousMonth() | 2947 | void CalendarView::goPreviousMonth() |
2947 | { | 2948 | { |
2948 | mNavigator->selectPreviousMonth(); | 2949 | mNavigator->selectPreviousMonth(); |
2949 | } | 2950 | } |
2950 | 2951 | ||
2951 | void CalendarView::updateConfig() | 2952 | void CalendarView::updateConfig() |
2952 | { | 2953 | { |
2953 | if ( KOPrefs::instance()->mUseAppColors ) | 2954 | if ( KOPrefs::instance()->mUseAppColors ) |
2954 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 2955 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
2955 | emit configChanged(); | 2956 | emit configChanged(); |
2956 | mTodoList->updateConfig(); | 2957 | mTodoList->updateConfig(); |
2957 | // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); | 2958 | // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); |
2958 | mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 2959 | mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
2959 | // To make the "fill window" configurations work | 2960 | // To make the "fill window" configurations work |
2960 | //mViewManager->raiseCurrentView(); | 2961 | //mViewManager->raiseCurrentView(); |
2961 | } | 2962 | } |
2962 | 2963 | ||
2963 | 2964 | ||
2964 | void CalendarView::eventChanged(Event *event) | 2965 | void CalendarView::eventChanged(Event *event) |
2965 | { | 2966 | { |
2966 | changeEventDisplay(event,KOGlobals::EVENTEDITED); | 2967 | changeEventDisplay(event,KOGlobals::EVENTEDITED); |
2967 | //updateUnmanagedViews(); | 2968 | //updateUnmanagedViews(); |
2968 | } | 2969 | } |
2969 | 2970 | ||
2970 | void CalendarView::eventAdded(Event *event) | 2971 | void CalendarView::eventAdded(Event *event) |
2971 | { | 2972 | { |
2972 | changeEventDisplay(event,KOGlobals::EVENTADDED); | 2973 | changeEventDisplay(event,KOGlobals::EVENTADDED); |
2973 | } | 2974 | } |
2974 | 2975 | ||
2975 | void CalendarView::eventToBeDeleted(Event *) | 2976 | void CalendarView::eventToBeDeleted(Event *) |
2976 | { | 2977 | { |
2977 | kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; | 2978 | kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; |
2978 | } | 2979 | } |
2979 | 2980 | ||
2980 | void CalendarView::eventDeleted() | 2981 | void CalendarView::eventDeleted() |
2981 | { | 2982 | { |
2982 | changeEventDisplay(0,KOGlobals::EVENTDELETED); | 2983 | changeEventDisplay(0,KOGlobals::EVENTDELETED); |
2983 | } | 2984 | } |
2984 | void CalendarView::changeTodoDisplay(Todo *which, int action) | 2985 | void CalendarView::changeTodoDisplay(Todo *which, int action) |
2985 | { | 2986 | { |
2986 | changeIncidenceDisplay((Incidence *)which, action); | 2987 | changeIncidenceDisplay((Incidence *)which, action); |
2987 | mDateNavigator->updateView(); //LR | 2988 | mDateNavigator->updateView(); //LR |
2988 | //mDialogManager->updateSearchDialog(); | 2989 | //mDialogManager->updateSearchDialog(); |
2989 | 2990 | ||
2990 | if (which) { | 2991 | if (which) { |
2991 | mViewManager->updateWNview(); | 2992 | mViewManager->updateWNview(); |
2992 | //mTodoList->updateView(); | 2993 | //mTodoList->updateView(); |
2993 | } | 2994 | } |
2994 | 2995 | ||
2995 | } | 2996 | } |
2996 | 2997 | ||
2997 | void CalendarView::changeIncidenceDisplay(Incidence *which, int action) | 2998 | void CalendarView::changeIncidenceDisplay(Incidence *which, int action) |
2998 | { | 2999 | { |
2999 | updateUnmanagedViews(); | 3000 | updateUnmanagedViews(); |
3000 | //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); | 3001 | //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); |
3001 | if ( action == KOGlobals::EVENTDELETED ) { //delete | 3002 | if ( action == KOGlobals::EVENTDELETED ) { //delete |
3002 | mCalendar->checkAlarmForIncidence( 0, true ); | 3003 | mCalendar->checkAlarmForIncidence( 0, true ); |
3003 | if ( mEventViewerDialog ) | 3004 | if ( mEventViewerDialog ) |
3004 | mEventViewerDialog->hide(); | 3005 | mEventViewerDialog->hide(); |
3005 | } | 3006 | } |
3006 | else | 3007 | else |
3007 | mCalendar->checkAlarmForIncidence( which , false ); | 3008 | mCalendar->checkAlarmForIncidence( which , false ); |
3008 | } | 3009 | } |
3009 | 3010 | ||
3010 | // most of the changeEventDisplays() right now just call the view's | 3011 | // most of the changeEventDisplays() right now just call the view's |
3011 | // total update mode, but they SHOULD be recoded to be more refresh-efficient. | 3012 | // total update mode, but they SHOULD be recoded to be more refresh-efficient. |
3012 | void CalendarView::changeEventDisplay(Event *which, int action) | 3013 | void CalendarView::changeEventDisplay(Event *which, int action) |
3013 | { | 3014 | { |
3014 | // kdDebug() << "CalendarView::changeEventDisplay" << endl; | 3015 | // kdDebug() << "CalendarView::changeEventDisplay" << endl; |
3015 | changeIncidenceDisplay((Incidence *)which, action); | 3016 | changeIncidenceDisplay((Incidence *)which, action); |
3016 | static bool clearallviews = false; | 3017 | static bool clearallviews = false; |
3017 | if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { | 3018 | if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { |
3018 | if ( clearallviews ) { | 3019 | if ( clearallviews ) { |
3019 | clearAllViews(); | 3020 | clearAllViews(); |
3020 | clearallviews = false; | 3021 | clearallviews = false; |
3021 | } | 3022 | } |
3022 | return; | 3023 | return; |
3023 | } | 3024 | } |
3024 | clearallviews = true; | 3025 | clearallviews = true; |
3025 | mDateNavigator->updateView(); | 3026 | mDateNavigator->updateView(); |
3026 | //mDialogManager->updateSearchDialog(); | 3027 | //mDialogManager->updateSearchDialog(); |
3027 | if (which) { | 3028 | if (which) { |
3028 | // If there is an event view visible update the display | 3029 | // If there is an event view visible update the display |
3029 | mViewManager->currentView()->changeEventDisplay(which,action); | 3030 | mViewManager->currentView()->changeEventDisplay(which,action); |
3030 | // TODO: check, if update needed | 3031 | // TODO: check, if update needed |
3031 | // if (which->getTodoStatus()) { | 3032 | // if (which->getTodoStatus()) { |
3032 | mTodoList->updateView(); | 3033 | mTodoList->updateView(); |
3033 | if ( action != KOGlobals::EVENTDELETED && KOPrefs::instance()->mDetectConflicts ) { | 3034 | if ( action != KOGlobals::EVENTDELETED && KOPrefs::instance()->mDetectConflicts ) { |
3034 | mConflictingEvent = which ; | 3035 | mConflictingEvent = which ; |
3035 | int time = 1000; | 3036 | int time = 1000; |
3036 | #ifdef DESKTOP_VERSION | 3037 | #ifdef DESKTOP_VERSION |
3037 | time = 500; | 3038 | time = 500; |
3038 | #endif | 3039 | #endif |
3039 | bool checkC = false; | 3040 | bool checkC = false; |
3040 | if ( mConflictingEvent->doesFloat() ) { | 3041 | if ( mConflictingEvent->doesFloat() ) { |
3041 | checkC = KOPrefs::instance()->mCheckConflictsAllDayAllDay | 3042 | checkC = KOPrefs::instance()->mCheckConflictsAllDayAllDay |
3042 | || KOPrefs::instance()->mCheckConflictsAllDayNonAD; | 3043 | || KOPrefs::instance()->mCheckConflictsAllDayNonAD; |
3043 | } else { | 3044 | } else { |
3044 | checkC = KOPrefs::instance()->mCheckConflictsNonADAllDay | 3045 | checkC = KOPrefs::instance()->mCheckConflictsNonADAllDay |
3045 | || KOPrefs::instance()->mCheckConflictsNonADNonAD; | 3046 | || KOPrefs::instance()->mCheckConflictsNonADNonAD; |
3046 | } | 3047 | } |
3047 | if ( !KOPrefs::instance()->mIncludeFree && mConflictingEvent->transparency() == KCal::Event::Transparent ) | 3048 | if ( !KOPrefs::instance()->mIncludeFree && mConflictingEvent->transparency() == KCal::Event::Transparent ) |
3048 | checkC = false; | 3049 | checkC = false; |
3049 | if ( checkC ) | 3050 | if ( checkC ) |
3050 | QTimer::singleShot( time, this, SLOT ( checkConflictForEvent() ) ); | 3051 | QTimer::singleShot( time, this, SLOT ( checkConflictForEvent() ) ); |
3051 | } | 3052 | } |
3052 | // } | 3053 | // } |
3053 | } else { | 3054 | } else { |
3054 | mViewManager->currentView()->updateView(); | 3055 | mViewManager->currentView()->updateView(); |
3055 | } | 3056 | } |
3056 | } | 3057 | } |
3057 | void CalendarView::checkConflictForEvent() | 3058 | void CalendarView::checkConflictForEvent() |
3058 | { | 3059 | { |
3059 | 3060 | ||
3060 | if (!KOPrefs::instance()->mConfirm) | 3061 | if (!KOPrefs::instance()->mConfirm) |
3061 | return; | 3062 | return; |
3062 | if ( ! mConflictingEvent ) return; | 3063 | if ( ! mConflictingEvent ) return; |
3063 | Event * conflictingEvent = mConflictingEvent; | 3064 | Event * conflictingEvent = mConflictingEvent; |
3064 | mConflictingEvent = 0; | 3065 | mConflictingEvent = 0; |
3065 | QDateTime current = QDateTime::currentDateTime(); | 3066 | QDateTime current = QDateTime::currentDateTime(); |
3066 | if ( ! conflictingEvent->matchTime( ¤t, 0 ) ) { | 3067 | if ( ! conflictingEvent->matchTime( ¤t, 0 ) ) { |
3067 | return; | 3068 | return; |
3068 | } | 3069 | } |
3069 | CalFilter *filterIN = 0; | 3070 | CalFilter *filterIN = 0; |
3070 | CalFilter *filterALL = 0; | 3071 | CalFilter *filterALL = 0; |
3071 | CalFilter *filter = mFilters.first(); | 3072 | CalFilter *filter = mFilters.first(); |
3072 | while(filter) { | 3073 | while(filter) { |
3073 | if ( filter->name() == KOPrefs::instance()->mFilterConflictEditItem) | 3074 | if ( filter->name() == KOPrefs::instance()->mFilterConflictEditItem) |
3074 | filterIN = filter; | 3075 | filterIN = filter; |
3075 | if ( filter->name() == KOPrefs::instance()->mFilterConflictAllItem ) | 3076 | if ( filter->name() == KOPrefs::instance()->mFilterConflictAllItem ) |
3076 | filterALL = filter; | 3077 | filterALL = filter; |
3077 | filter = mFilters.next(); | 3078 | filter = mFilters.next(); |
3078 | } | 3079 | } |
3079 | if ( filterIN ) { | 3080 | if ( filterIN ) { |
3080 | if ( !filterIN->filterCalendarItem( conflictingEvent ) ) { | 3081 | if ( !filterIN->filterCalendarItem( conflictingEvent ) ) { |
3081 | return; | 3082 | return; |
3082 | } | 3083 | } |
3083 | } | 3084 | } |
3084 | QPtrList<Event> testlist = mCalendar->events(); | 3085 | QPtrList<Event> testlist = mCalendar->events(); |
3085 | Event * test = testlist.first(); | 3086 | Event * test = testlist.first(); |
3086 | QDateTime conflict; | 3087 | QDateTime conflict; |
3087 | QDateTime retVal; | 3088 | QDateTime retVal; |
3088 | bool found = false; | 3089 | bool found = false; |
3089 | Event * cE = 0; | 3090 | Event * cE = 0; |
3090 | bool chAD = KOPrefs::instance()->mCheckConflictsAllDayAllDay; | 3091 | bool chAD = KOPrefs::instance()->mCheckConflictsAllDayAllDay; |
3091 | bool chNad = KOPrefs::instance()->mCheckConflictsAllDayNonAD; | 3092 | bool chNad = KOPrefs::instance()->mCheckConflictsAllDayNonAD; |
3092 | if ( !conflictingEvent->doesFloat() ) { | 3093 | if ( !conflictingEvent->doesFloat() ) { |
3093 | chAD = KOPrefs::instance()->mCheckConflictsNonADAllDay; | 3094 | chAD = KOPrefs::instance()->mCheckConflictsNonADAllDay; |
3094 | chNad = KOPrefs::instance()->mCheckConflictsNonADNonAD; | 3095 | chNad = KOPrefs::instance()->mCheckConflictsNonADNonAD; |
3095 | } | 3096 | } |
3096 | topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); | 3097 | topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); |
3097 | while ( test ) { | 3098 | while ( test ) { |
3098 | qApp->processEvents(); | 3099 | qApp->processEvents(); |
3099 | bool skip = ( test->doesFloat() && !chAD ) || ( !test->doesFloat() && !chNad ); | 3100 | bool skip = ( test->doesFloat() && !chAD ) || ( !test->doesFloat() && !chNad ); |
3100 | 3101 | ||
3101 | if ( !skip ) { | 3102 | if ( !skip ) { |
3102 | if ( !KOPrefs::instance()->mIncludeFree && test->transparency() == KCal::Event::Transparent ) | 3103 | if ( !KOPrefs::instance()->mIncludeFree && test->transparency() == KCal::Event::Transparent ) |
3103 | skip = true; | 3104 | skip = true; |
3104 | } | 3105 | } |
3105 | if ( !skip ) { | 3106 | if ( !skip ) { |
3106 | if ( filterALL ) { | 3107 | if ( filterALL ) { |
3107 | if ( !filterALL->filterCalendarItem( test ) ) { | 3108 | if ( !filterALL->filterCalendarItem( test ) ) { |
3108 | skip = true; | 3109 | skip = true; |
3109 | } | 3110 | } |
3110 | } | 3111 | } |
3111 | if ( !skip ) { | 3112 | if ( !skip ) { |
3112 | if ( found ) | 3113 | if ( found ) |
3113 | skip = !test->matchTime( ¤t, &conflict ); | 3114 | skip = !test->matchTime( ¤t, &conflict ); |
3114 | else | 3115 | else |
3115 | skip = !test->matchTime( ¤t, 0 ); | 3116 | skip = !test->matchTime( ¤t, 0 ); |
3116 | if ( !skip ) { | 3117 | if ( !skip ) { |
3117 | if ( conflictingEvent->isOverlapping ( test, &retVal, ¤t ) ) { | 3118 | if ( conflictingEvent->isOverlapping ( test, &retVal, ¤t ) ) { |
3118 | if ( ! found ) { | 3119 | if ( ! found ) { |
3119 | conflict = retVal; | 3120 | conflict = retVal; |
3120 | cE = test; | 3121 | cE = test; |
3121 | } else { | 3122 | } else { |
3122 | if ( retVal < conflict ) { | 3123 | if ( retVal < conflict ) { |
3123 | conflict = retVal; | 3124 | conflict = retVal; |
3124 | cE = test; | 3125 | cE = test; |
3125 | } | 3126 | } |
3126 | } | 3127 | } |
3127 | found = true; | 3128 | found = true; |
3128 | } | 3129 | } |
3129 | } | 3130 | } |
3130 | } | 3131 | } |
3131 | } | 3132 | } |
3132 | test = testlist.next(); | 3133 | test = testlist.next(); |
3133 | } | 3134 | } |
3134 | topLevelWidget()->setCaption( i18n("KO/Pi") ); | 3135 | topLevelWidget()->setCaption( i18n("KO/Pi") ); |
3135 | if ( found ) { | 3136 | if ( found ) { |
3136 | QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( conflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ; | 3137 | QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( conflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ; |
3137 | qApp->processEvents(); | 3138 | qApp->processEvents(); |
3138 | int km = KMessageBox::warningContinueCancel(this,mess, | 3139 | int km = KMessageBox::warningContinueCancel(this,mess, |
3139 | i18n("KO/Pi Conflict detected"),i18n("Show date"),i18n("No problem!")); | 3140 | i18n("KO/Pi Conflict detected"),i18n("Show date"),i18n("No problem!")); |
3140 | if ( km != KMessageBox::Continue ) { | 3141 | if ( km != KMessageBox::Continue ) { |
3141 | return; | 3142 | return; |
3142 | } | 3143 | } |
3143 | if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) | 3144 | if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) |
3144 | mViewManager->showDayView(); | 3145 | mViewManager->showDayView(); |
3145 | mNavigator->slotDaySelect( conflict.date() ); | 3146 | mNavigator->slotDaySelect( conflict.date() ); |
3146 | int hour = conflict.time().hour(); | 3147 | int hour = conflict.time().hour(); |
3147 | mViewManager->agendaView()->setStartHour( hour ); | 3148 | mViewManager->agendaView()->setStartHour( hour ); |
3148 | topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( conflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) ); | 3149 | topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( conflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) ); |
3149 | } else | 3150 | } else |
3150 | topLevelWidget()->setCaption( i18n("No conflict found") ); | 3151 | topLevelWidget()->setCaption( i18n("No conflict found") ); |
3151 | return; | 3152 | return; |
3152 | 3153 | ||
3153 | } | 3154 | } |
3154 | 3155 | ||
3155 | void CalendarView::updateTodoViews() | 3156 | void CalendarView::updateTodoViews() |
3156 | { | 3157 | { |
3157 | mTodoList->updateView(); | 3158 | mTodoList->updateView(); |
3158 | mViewManager->currentView()->updateView(); | 3159 | mViewManager->currentView()->updateView(); |
3159 | 3160 | ||
3160 | } | 3161 | } |
3161 | 3162 | ||
3162 | 3163 | ||
3163 | 3164 | ||
3164 | void CalendarView::clearAllViews() | 3165 | void CalendarView::clearAllViews() |
3165 | { | 3166 | { |
3166 | mTodoList->clearList(); | 3167 | mTodoList->clearList(); |
3167 | mViewManager->clearAllViews(); | 3168 | mViewManager->clearAllViews(); |
3168 | SearchDialog * sd = mDialogManager->getSearchDialog(); | 3169 | SearchDialog * sd = mDialogManager->getSearchDialog(); |
3169 | if ( sd ) { | 3170 | if ( sd ) { |
3170 | KOListView* kol = sd->listview(); | 3171 | KOListView* kol = sd->listview(); |
3171 | if ( kol ) | 3172 | if ( kol ) |
3172 | kol->clearList(); | 3173 | kol->clearList(); |
3173 | } | 3174 | } |
3174 | } | 3175 | } |
3175 | void CalendarView::updateView() | 3176 | void CalendarView::updateView() |
3176 | { | 3177 | { |
3177 | static bool clearallviews = false; | 3178 | static bool clearallviews = false; |
3178 | if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { | 3179 | if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { |
3179 | if ( clearallviews ) { | 3180 | if ( clearallviews ) { |
3180 | clearAllViews(); | 3181 | clearAllViews(); |
3181 | clearallviews = false; | 3182 | clearallviews = false; |
3182 | } | 3183 | } |
3183 | return; | 3184 | return; |
3184 | } | 3185 | } |
3185 | clearallviews = true; | 3186 | clearallviews = true; |
3186 | DateList tmpList = mNavigator->selectedDates(); | 3187 | DateList tmpList = mNavigator->selectedDates(); |
3187 | 3188 | ||
3188 | if ( KOPrefs::instance()->mHideNonStartedTodos ) | 3189 | if ( KOPrefs::instance()->mHideNonStartedTodos ) |
3189 | mTodoList->updateView(); | 3190 | mTodoList->updateView(); |
3190 | // We assume that the navigator only selects consecutive days. | 3191 | // We assume that the navigator only selects consecutive days. |
3191 | updateView( tmpList.first(), tmpList.last() ); | 3192 | updateView( tmpList.first(), tmpList.last() ); |
3192 | } | 3193 | } |
3193 | 3194 | ||
3194 | void CalendarView::updateUnmanagedViews() | 3195 | void CalendarView::updateUnmanagedViews() |
3195 | { | 3196 | { |
3196 | mDateNavigator->updateDayMatrix(); | 3197 | mDateNavigator->updateDayMatrix(); |
3197 | } | 3198 | } |
3198 | 3199 | ||
3199 | int CalendarView::msgItemDelete(const QString name) | 3200 | int CalendarView::msgItemDelete(const QString name) |
3200 | { | 3201 | { |
3201 | return KMessageBox::warningContinueCancel(this,name +"\n\n"+ | 3202 | return KMessageBox::warningContinueCancel(this,name +"\n\n"+ |
3202 | i18n("This item will be\npermanently deleted."), | 3203 | i18n("This item will be\npermanently deleted."), |
3203 | i18n("KO/Pi Confirmation"),i18n("Delete")); | 3204 | i18n("KO/Pi Confirmation"),i18n("Delete")); |
3204 | } | 3205 | } |
3205 | 3206 | ||
3206 | 3207 | ||
3207 | void CalendarView::edit_cut() | 3208 | void CalendarView::edit_cut() |
3208 | { | 3209 | { |
3209 | Event *anEvent=0; | 3210 | Event *anEvent=0; |
3210 | 3211 | ||
3211 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3212 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3212 | 3213 | ||
3213 | if (mViewManager->currentView()->isEventView()) { | 3214 | if (mViewManager->currentView()->isEventView()) { |
3214 | if ( incidence && incidence->typeID() == eventID ) { | 3215 | if ( incidence && incidence->typeID() == eventID ) { |
3215 | anEvent = static_cast<Event *>(incidence); | 3216 | anEvent = static_cast<Event *>(incidence); |
3216 | } | 3217 | } |
3217 | } | 3218 | } |
3218 | 3219 | ||
3219 | if (!anEvent) { | 3220 | if (!anEvent) { |
3220 | KNotifyClient::beep(); | 3221 | KNotifyClient::beep(); |
3221 | return; | 3222 | return; |
3222 | } | 3223 | } |
3223 | DndFactory factory( mCalendar ); | 3224 | DndFactory factory( mCalendar ); |
3224 | factory.cutIncidence(anEvent); | 3225 | factory.cutIncidence(anEvent); |
3225 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); | 3226 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); |
3226 | } | 3227 | } |
3227 | 3228 | ||
3228 | void CalendarView::edit_copy() | 3229 | void CalendarView::edit_copy() |
3229 | { | 3230 | { |
3230 | Event *anEvent=0; | 3231 | Event *anEvent=0; |
3231 | 3232 | ||
3232 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3233 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3233 | 3234 | ||
3234 | if (mViewManager->currentView()->isEventView()) { | 3235 | if (mViewManager->currentView()->isEventView()) { |
3235 | if ( incidence && incidence->typeID() == eventID ) { | 3236 | if ( incidence && incidence->typeID() == eventID ) { |
3236 | anEvent = static_cast<Event *>(incidence); | 3237 | anEvent = static_cast<Event *>(incidence); |
3237 | } | 3238 | } |
3238 | } | 3239 | } |
3239 | 3240 | ||
3240 | if (!anEvent) { | 3241 | if (!anEvent) { |
3241 | KNotifyClient::beep(); | 3242 | KNotifyClient::beep(); |
3242 | return; | 3243 | return; |
3243 | } | 3244 | } |
3244 | DndFactory factory( mCalendar ); | 3245 | DndFactory factory( mCalendar ); |
3245 | factory.copyIncidence(anEvent); | 3246 | factory.copyIncidence(anEvent); |
3246 | } | 3247 | } |
3247 | 3248 | ||
3248 | void CalendarView::edit_paste() | 3249 | void CalendarView::edit_paste() |
3249 | { | 3250 | { |
3250 | QDate date = mNavigator->selectedDates().first(); | 3251 | QDate date = mNavigator->selectedDates().first(); |
3251 | 3252 | ||
3252 | DndFactory factory( mCalendar ); | 3253 | DndFactory factory( mCalendar ); |
3253 | Event *pastedEvent = (Event *)factory.pasteIncidence( date ); | 3254 | Event *pastedEvent = (Event *)factory.pasteIncidence( date ); |
3254 | 3255 | ||
3255 | changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); | 3256 | changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); |
3256 | } | 3257 | } |
3257 | void CalendarView::edit_global_options() | 3258 | void CalendarView::edit_global_options() |
3258 | { | 3259 | { |
3259 | QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; | 3260 | QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; |
3260 | emit save(); | 3261 | emit save(); |
3261 | emit saveStopTimer(); | 3262 | emit saveStopTimer(); |
3262 | mDialogManager->showGlobalOptionsDialog(); | 3263 | mDialogManager->showGlobalOptionsDialog(); |
3263 | if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { | 3264 | if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { |
3264 | emit saveStopTimer(); | 3265 | emit saveStopTimer(); |
3265 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), | 3266 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), |
3266 | i18n("Timezone settings"),i18n("Reload"))) { | 3267 | i18n("Timezone settings"),i18n("Reload"))) { |
3267 | qDebug("KO: TZ reload cancelled "); | 3268 | qDebug("KO: TZ reload cancelled "); |
3268 | mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 3269 | mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
3269 | return; | 3270 | return; |
3270 | } | 3271 | } |
3271 | qDebug("KO: Timezone change "); | 3272 | qDebug("KO: Timezone change "); |
3272 | loadCalendars(); | 3273 | loadCalendars(); |
3273 | setModified(true); | 3274 | setModified(true); |
3274 | } | 3275 | } |
3275 | else | 3276 | else |
3276 | qDebug("KO: No tz change "); | 3277 | qDebug("KO: No tz change "); |
3277 | } | 3278 | } |
3278 | void CalendarView::edit_options() | 3279 | void CalendarView::edit_options() |
3279 | { | 3280 | { |
3280 | mDialogManager->showOptionsDialog(); | 3281 | mDialogManager->showOptionsDialog(); |
3281 | } | 3282 | } |
3282 | 3283 | ||
3283 | 3284 | ||
3284 | void CalendarView::slotSelectPickerDate( QDate d) | 3285 | void CalendarView::slotSelectPickerDate( QDate d) |
3285 | { | 3286 | { |
3286 | mDateFrame->hide(); | 3287 | mDateFrame->hide(); |
3287 | if ( mDatePickerMode == 1 ) { | 3288 | if ( mDatePickerMode == 1 ) { |
3288 | mNavigator->slotDaySelect( d ); | 3289 | mNavigator->slotDaySelect( d ); |
3289 | } else if ( mDatePickerMode == 2 ) { | 3290 | } else if ( mDatePickerMode == 2 ) { |
3290 | if ( mMoveIncidence->typeID() == todoID ) { | 3291 | if ( mMoveIncidence->typeID() == todoID ) { |
3291 | Todo * to = (Todo *) mMoveIncidence; | 3292 | Todo * to = (Todo *) mMoveIncidence; |
3292 | QTime tim; | 3293 | QTime tim; |
3293 | int len = 0; | 3294 | int len = 0; |
3294 | if ( to->hasStartDate() && to->hasDueDate() ) | 3295 | if ( to->hasStartDate() && to->hasDueDate() ) |
3295 | len = to->dtStart().secsTo( to->dtDue()); | 3296 | len = to->dtStart().secsTo( to->dtDue()); |
3296 | if ( to->hasDueDate() ) | 3297 | if ( to->hasDueDate() ) |
3297 | tim = to->dtDue().time(); | 3298 | tim = to->dtDue().time(); |
3298 | else { | 3299 | else { |
3299 | tim = QTime ( 0,0,0 ); | 3300 | tim = QTime ( 0,0,0 ); |
3300 | to->setFloats( true ); | 3301 | to->setFloats( true ); |
3301 | to->setHasDueDate( true ); | 3302 | to->setHasDueDate( true ); |
3302 | } | 3303 | } |
3303 | QDateTime dt ( d,tim ); | 3304 | QDateTime dt ( d,tim ); |
3304 | to->setDtDue( dt ); | 3305 | to->setDtDue( dt ); |
3305 | 3306 | ||
3306 | if ( to->hasStartDate() ) { | 3307 | if ( to->hasStartDate() ) { |
3307 | if ( len>0 ) | 3308 | if ( len>0 ) |
3308 | to->setDtStart(to->dtDue().addSecs( -len )); | 3309 | to->setDtStart(to->dtDue().addSecs( -len )); |
3309 | else | 3310 | else |
3310 | if (to->dtStart() > to->dtDue() ) | 3311 | if (to->dtStart() > to->dtDue() ) |
3311 | to->setDtStart(to->dtDue().addDays( -3 )); | 3312 | to->setDtStart(to->dtDue().addDays( -3 )); |
3312 | } | 3313 | } |
3313 | 3314 | ||
3314 | todoChanged( to ); | 3315 | todoChanged( to ); |
3315 | } else if ( mMoveIncidence->typeID() == eventID ) { | 3316 | } else if ( mMoveIncidence->typeID() == eventID ) { |
3316 | if ( mMoveIncidence->doesRecur() ) { | 3317 | if ( mMoveIncidence->doesRecur() ) { |
3317 | #if 0 | 3318 | #if 0 |
3318 | // PENDING implement this | 3319 | // PENDING implement this |
3319 | Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); | 3320 | Incidence* newInc = mMoveIncidence->recreateCloneException( mMoveIncidenceOldDate ); |
3320 | mCalendar()->addIncidence( newInc ); | 3321 | mCalendar()->addIncidence( newInc ); |
3321 | if ( mMoveIncidence->typeID() == todoID ) | 3322 | if ( mMoveIncidence->typeID() == todoID ) |
3322 | emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); | 3323 | emit todoMoved((Todo*)mMoveIncidence, KOGlobals::EVENTEDITED ); |
3323 | else | 3324 | else |
3324 | emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); | 3325 | emit incidenceChanged(mMoveIncidence, KOGlobals::EVENTEDITED); |
3325 | mMoveIncidence = newInc; | 3326 | mMoveIncidence = newInc; |
3326 | 3327 | ||
3327 | #endif | 3328 | #endif |
3328 | } | 3329 | } |
3329 | QTime tim = mMoveIncidence->dtStart().time(); | 3330 | QTime tim = mMoveIncidence->dtStart().time(); |
3330 | int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); | 3331 | int secs = mMoveIncidence->dtStart().secsTo( mMoveIncidence->dtEnd()); |
3331 | QDateTime dt ( d,tim ); | 3332 | QDateTime dt ( d,tim ); |
3332 | mMoveIncidence->setDtStart( dt ); | 3333 | mMoveIncidence->setDtStart( dt ); |
3333 | ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); | 3334 | ((Event*)mMoveIncidence)->setDtEnd( dt.addSecs( secs ) ); |
3334 | changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); | 3335 | changeEventDisplay((Event*)mMoveIncidence, KOGlobals::EVENTEDITED); |
3335 | } else if ( mMoveIncidence->typeID() == journalID ) { | 3336 | } else if ( mMoveIncidence->typeID() == journalID ) { |
3336 | QTime tim = mMoveIncidence->dtStart().time(); | 3337 | QTime tim = mMoveIncidence->dtStart().time(); |
3337 | QDateTime dt ( d,tim ); | 3338 | QDateTime dt ( d,tim ); |
3338 | mMoveIncidence->setDtStart( dt ); | 3339 | mMoveIncidence->setDtStart( dt ); |
3339 | updateView(); | 3340 | updateView(); |
3340 | } | 3341 | } |
3341 | mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); | 3342 | mMoveIncidence->setRevision( mMoveIncidence->revision()+1 ); |
3342 | } | 3343 | } |
3343 | } | 3344 | } |
3344 | 3345 | ||
3345 | void CalendarView::removeCategories() | 3346 | void CalendarView::removeCategories() |
3346 | { | 3347 | { |
3347 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); | 3348 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); |
3348 | QStringList catList = KOPrefs::instance()->mCustomCategories; | 3349 | QStringList catList = KOPrefs::instance()->mCustomCategories; |
3349 | QStringList catIncList; | 3350 | QStringList catIncList; |
3350 | QStringList newCatList; | 3351 | QStringList newCatList; |
3351 | Incidence* inc = incList.first(); | 3352 | Incidence* inc = incList.first(); |
3352 | uint i; | 3353 | uint i; |
3353 | while ( inc ) { | 3354 | while ( inc ) { |
3354 | newCatList.clear(); | 3355 | newCatList.clear(); |
3355 | catIncList = inc->categories() ; | 3356 | catIncList = inc->categories() ; |
3356 | for( i = 0; i< catIncList.count(); ++i ) { | 3357 | for( i = 0; i< catIncList.count(); ++i ) { |
3357 | if ( catList.contains (catIncList[i])) | 3358 | if ( catList.contains (catIncList[i])) |
3358 | newCatList.append( catIncList[i] ); | 3359 | newCatList.append( catIncList[i] ); |
3359 | } | 3360 | } |
3360 | newCatList.sort(); | 3361 | newCatList.sort(); |
3361 | inc->setCategories( newCatList.join(",") ); | 3362 | inc->setCategories( newCatList.join(",") ); |
3362 | inc = incList.next(); | 3363 | inc = incList.next(); |
3363 | } | 3364 | } |
3364 | } | 3365 | } |
3365 | 3366 | ||
3366 | int CalendarView::addCategories() | 3367 | int CalendarView::addCategories() |
3367 | { | 3368 | { |
3368 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); | 3369 | QPtrList<Incidence> incList = mCalendar->rawIncidences(); |
3369 | QStringList catList = KOPrefs::instance()->mCustomCategories; | 3370 | QStringList catList = KOPrefs::instance()->mCustomCategories; |
3370 | QStringList catIncList; | 3371 | QStringList catIncList; |
3371 | Incidence* inc = incList.first(); | 3372 | Incidence* inc = incList.first(); |
3372 | uint i; | 3373 | uint i; |
3373 | int count = 0; | 3374 | int count = 0; |
3374 | while ( inc ) { | 3375 | while ( inc ) { |
3375 | catIncList = inc->categories() ; | 3376 | catIncList = inc->categories() ; |
3376 | for( i = 0; i< catIncList.count(); ++i ) { | 3377 | for( i = 0; i< catIncList.count(); ++i ) { |
3377 | if ( !catList.contains (catIncList[i])) { | 3378 | if ( !catList.contains (catIncList[i])) { |
3378 | catList.append( catIncList[i] ); | 3379 | catList.append( catIncList[i] ); |
3379 | //qDebug("add cat %s ", catIncList[i].latin1()); | 3380 | //qDebug("add cat %s ", catIncList[i].latin1()); |
3380 | ++count; | 3381 | ++count; |
3381 | } | 3382 | } |
3382 | } | 3383 | } |
3383 | inc = incList.next(); | 3384 | inc = incList.next(); |
3384 | } | 3385 | } |
3385 | catList.sort(); | 3386 | catList.sort(); |
3386 | KOPrefs::instance()->mCustomCategories = catList; | 3387 | KOPrefs::instance()->mCustomCategories = catList; |
3387 | return count; | 3388 | return count; |
3388 | } | 3389 | } |
3389 | 3390 | ||
3390 | void CalendarView::editCategories() | 3391 | void CalendarView::editCategories() |
3391 | { | 3392 | { |
3392 | qDebug("CalendarView::editCategories() "); | 3393 | qDebug("CalendarView::editCategories() "); |
3393 | KPIM::CategoryEditDialog ced (KOPrefs::instance(),this ); | 3394 | KPIM::CategoryEditDialog ced (KOPrefs::instance(),this ); |
3394 | ced.exec(); | 3395 | ced.exec(); |
3395 | } | 3396 | } |
3396 | void CalendarView::manageCategories() | 3397 | void CalendarView::manageCategories() |
3397 | { | 3398 | { |
3398 | KOCatPrefs* cp = new KOCatPrefs(); | 3399 | KOCatPrefs* cp = new KOCatPrefs(); |
3399 | cp->show(); | 3400 | cp->show(); |
3400 | int w =cp->sizeHint().width() ; | 3401 | int w =cp->sizeHint().width() ; |
3401 | int h = cp->sizeHint().height() ; | 3402 | int h = cp->sizeHint().height() ; |
3402 | int dw = QApplication::desktop()->width(); | 3403 | int dw = QApplication::desktop()->width(); |
3403 | int dh = QApplication::desktop()->height(); | 3404 | int dh = QApplication::desktop()->height(); |
3404 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 3405 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
3405 | if ( !cp->exec() ) { | 3406 | if ( !cp->exec() ) { |
3406 | delete cp; | 3407 | delete cp; |
3407 | return; | 3408 | return; |
3408 | } | 3409 | } |
3409 | int count = 0; | 3410 | int count = 0; |
3410 | if ( cp->addCat() ) { | 3411 | if ( cp->addCat() ) { |
3411 | count = addCategories(); | 3412 | count = addCategories(); |
3412 | if ( count ) { | 3413 | if ( count ) { |
3413 | topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); | 3414 | topLevelWidget()->setCaption(QString::number( count )+ i18n(" Categories added to list! ")); |
3414 | writeSettings(); | 3415 | writeSettings(); |
3415 | } else | 3416 | } else |
3416 | topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); | 3417 | topLevelWidget()->setCaption(QString::number( 0 )+ i18n(" Categories added to list! ")); |
3417 | } else { | 3418 | } else { |
3418 | removeCategories(); | 3419 | removeCategories(); |
3419 | updateView(); | 3420 | updateView(); |
3420 | } | 3421 | } |
3421 | delete cp; | 3422 | delete cp; |
3422 | } | 3423 | } |
3423 | 3424 | ||
3424 | void CalendarView::beamIncidence(Incidence * Inc) | 3425 | void CalendarView::beamIncidence(Incidence * Inc) |
3425 | { | 3426 | { |
3426 | QPtrList<Incidence> delSel ; | 3427 | QPtrList<Incidence> delSel ; |
3427 | delSel.append(Inc); | 3428 | delSel.append(Inc); |
3428 | beamIncidenceList( delSel ); | 3429 | beamIncidenceList( delSel ); |
3429 | } | 3430 | } |
3430 | void CalendarView::beamCalendar() | 3431 | void CalendarView::beamCalendar() |
3431 | { | 3432 | { |
3432 | QPtrList<Incidence> delSel = mCalendar->rawIncidences(); | 3433 | QPtrList<Incidence> delSel = mCalendar->rawIncidences(); |
3433 | //qDebug("beamCalendar() "); | 3434 | //qDebug("beamCalendar() "); |
3434 | beamIncidenceList( delSel ); | 3435 | beamIncidenceList( delSel ); |
3435 | } | 3436 | } |
3436 | void CalendarView::beamFilteredCalendar() | 3437 | void CalendarView::beamFilteredCalendar() |
3437 | { | 3438 | { |
3438 | QPtrList<Incidence> delSel = mCalendar->incidences(); | 3439 | QPtrList<Incidence> delSel = mCalendar->incidences(); |
3439 | //qDebug("beamFilteredCalendar() "); | 3440 | //qDebug("beamFilteredCalendar() "); |
3440 | beamIncidenceList( delSel ); | 3441 | beamIncidenceList( delSel ); |
3441 | } | 3442 | } |
3442 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) | 3443 | void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) |
3443 | { | 3444 | { |
3444 | 3445 | ||
3445 | KOBeamPrefs beamDialog; | 3446 | KOBeamPrefs beamDialog; |
3446 | if ( beamDialog.exec () == QDialog::Rejected ) | 3447 | if ( beamDialog.exec () == QDialog::Rejected ) |
3447 | return; | 3448 | return; |
3448 | #ifdef DESKTOP_VERSION | 3449 | #ifdef DESKTOP_VERSION |
3449 | QString fn = locateLocal( "tmp", "kopibeamfile" ); | 3450 | QString fn = locateLocal( "tmp", "kopibeamfile" ); |
3450 | #else | 3451 | #else |
3451 | QString fn = "/tmp/kopibeamfile"; | 3452 | QString fn = "/tmp/kopibeamfile"; |
3452 | #endif | 3453 | #endif |
3453 | QString mes; | 3454 | QString mes; |
3454 | bool createbup = true; | 3455 | bool createbup = true; |
3455 | if ( createbup ) { | 3456 | if ( createbup ) { |
3456 | QString description = "\n"; | 3457 | QString description = "\n"; |
3457 | CalendarLocal* cal = new CalendarLocal(); | 3458 | CalendarLocal* cal = new CalendarLocal(); |
3458 | if ( beamDialog.beamLocal() ) | 3459 | if ( beamDialog.beamLocal() ) |
3459 | cal->setLocalTime(); | 3460 | cal->setLocalTime(); |
3460 | else | 3461 | else |
3461 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); | 3462 | cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); |
3462 | Incidence *incidence = delSel.first(); | 3463 | Incidence *incidence = delSel.first(); |
3463 | bool addText = false; | 3464 | bool addText = false; |
3464 | if ( delSel.count() < 10 ) | 3465 | if ( delSel.count() < 10 ) |
3465 | addText = true; | 3466 | addText = true; |
3466 | else { | 3467 | else { |
3467 | description.sprintf(i18n(" %d items?"),delSel.count() ); | 3468 | description.sprintf(i18n(" %d items?"),delSel.count() ); |
3468 | } | 3469 | } |
3469 | while ( incidence ) { | 3470 | while ( incidence ) { |
3470 | Incidence *in = incidence->clone(); | 3471 | Incidence *in = incidence->clone(); |
3471 | if ( ! in->summary().isEmpty() ) { | 3472 | if ( ! in->summary().isEmpty() ) { |
3472 | in->setDescription(""); | 3473 | in->setDescription(""); |
3473 | } else { | 3474 | } else { |
3474 | in->setSummary( in->description().left(20)); | 3475 | in->setSummary( in->description().left(20)); |
3475 | in->setDescription(""); | 3476 | in->setDescription(""); |
3476 | } | 3477 | } |
3477 | if ( addText ) | 3478 | if ( addText ) |
3478 | description += in->summary() + "\n"; | 3479 | description += in->summary() + "\n"; |
3479 | cal->addIncidence( in ); | 3480 | cal->addIncidence( in ); |
3480 | incidence = delSel.next(); | 3481 | incidence = delSel.next(); |
3481 | } | 3482 | } |
3482 | if ( beamDialog.beamVcal() ) { | 3483 | if ( beamDialog.beamVcal() ) { |
3483 | fn += ".vcs"; | 3484 | fn += ".vcs"; |
3484 | FileStorage storage( cal, fn, new VCalFormat ); | 3485 | FileStorage storage( cal, fn, new VCalFormat ); |
3485 | storage.save(); | 3486 | storage.save(); |
3486 | } else { | 3487 | } else { |
3487 | fn += ".ics"; | 3488 | fn += ".ics"; |
3488 | FileStorage storage( cal, fn, new ICalFormat( ) ); | 3489 | FileStorage storage( cal, fn, new ICalFormat( ) ); |
3489 | storage.save(); | 3490 | storage.save(); |
3490 | } | 3491 | } |
3491 | delete cal; | 3492 | delete cal; |
3492 | mes = i18n("KO/Pi: Ready for beaming"); | 3493 | mes = i18n("KO/Pi: Ready for beaming"); |
3493 | topLevelWidget()->setCaption(mes); | 3494 | topLevelWidget()->setCaption(mes); |
3494 | KApplication::convert2latin1( fn ); | 3495 | KApplication::convert2latin1( fn ); |
3495 | #ifndef DESKTOP_VERSION | 3496 | #ifndef DESKTOP_VERSION |
3496 | Ir *ir = new Ir( this ); | 3497 | Ir *ir = new Ir( this ); |
3497 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); | 3498 | connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); |
3498 | ir->send( fn, description, "text/x-vCalendar" ); | 3499 | ir->send( fn, description, "text/x-vCalendar" ); |
3499 | #endif | 3500 | #endif |
3500 | } | 3501 | } |
3501 | } | 3502 | } |
3502 | 3503 | ||
3503 | #ifndef DESKTOP_VERSION | 3504 | #ifndef DESKTOP_VERSION |
3504 | void CalendarView::beamDone( Ir *ir ) | 3505 | void CalendarView::beamDone( Ir *ir ) |
3505 | { | 3506 | { |
3506 | delete ir; | 3507 | delete ir; |
3507 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); | 3508 | topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); |
3508 | topLevelWidget()->raise(); | 3509 | topLevelWidget()->raise(); |
3509 | } | 3510 | } |
3510 | #else | 3511 | #else |
3511 | void CalendarView::beamDone( Ir *){;} | 3512 | void CalendarView::beamDone( Ir *){;} |
3512 | #endif | 3513 | #endif |
3513 | void CalendarView::moveIncidence(Incidence * inc ) | 3514 | void CalendarView::moveIncidence(Incidence * inc ) |
3514 | { | 3515 | { |
3515 | if ( !inc ) return; | 3516 | if ( !inc ) return; |
3516 | showDatePickerPopup(); | 3517 | showDatePickerPopup(); |
3517 | mDatePickerMode = 2; | 3518 | mDatePickerMode = 2; |
3518 | mMoveIncidence = inc ; | 3519 | mMoveIncidence = inc ; |
3519 | QDate da; | 3520 | QDate da; |
3520 | if ( mMoveIncidence->typeID() == todoID ) { | 3521 | if ( mMoveIncidence->typeID() == todoID ) { |
3521 | Todo * to = (Todo *) mMoveIncidence; | 3522 | Todo * to = (Todo *) mMoveIncidence; |
3522 | if ( to->hasDueDate() ) | 3523 | if ( to->hasDueDate() ) |
3523 | da = to->dtDue().date(); | 3524 | da = to->dtDue().date(); |
3524 | else | 3525 | else |
3525 | da = QDate::currentDate(); | 3526 | da = QDate::currentDate(); |
3526 | } else { | 3527 | } else { |
3527 | da = mMoveIncidence->dtStart().date(); | 3528 | da = mMoveIncidence->dtStart().date(); |
3528 | } | 3529 | } |
3529 | //PENDING set date for recurring incidence to date of recurrence | 3530 | //PENDING set date for recurring incidence to date of recurrence |
3530 | //mMoveIncidenceOldDate; | 3531 | //mMoveIncidenceOldDate; |
3531 | mDatePicker->setDate( da ); | 3532 | mDatePicker->setDate( da ); |
3532 | } | 3533 | } |
3533 | void CalendarView::showDatePickerPopup() | 3534 | void CalendarView::showDatePickerPopup() |
3534 | { | 3535 | { |
3535 | if ( mDateFrame->isVisible() ) | 3536 | if ( mDateFrame->isVisible() ) |
3536 | mDateFrame->hide(); | 3537 | mDateFrame->hide(); |
3537 | else { | 3538 | else { |
3538 | int offX = 0, offY = 0; | 3539 | int offX = 0, offY = 0; |
3539 | #ifdef DESKTOP_VERSION | 3540 | #ifdef DESKTOP_VERSION |
3540 | int w =mDatePicker->sizeHint().width() ; | 3541 | int w =mDatePicker->sizeHint().width() ; |
3541 | int h = mDatePicker->sizeHint().height() ; | 3542 | int h = mDatePicker->sizeHint().height() ; |
3542 | int dw = topLevelWidget()->width(); | 3543 | int dw = topLevelWidget()->width(); |
3543 | int dh = topLevelWidget()->height(); | 3544 | int dh = topLevelWidget()->height(); |
3544 | offX = topLevelWidget()->x(); | 3545 | offX = topLevelWidget()->x(); |
3545 | offY = topLevelWidget()->y(); | 3546 | offY = topLevelWidget()->y(); |
3546 | #else | 3547 | #else |
3547 | int w =mDatePicker->sizeHint().width() ; | 3548 | int w =mDatePicker->sizeHint().width() ; |
3548 | int h = mDatePicker->sizeHint().height() ; | 3549 | int h = mDatePicker->sizeHint().height() ; |
3549 | int dw = QApplication::desktop()->width(); | 3550 | int dw = QApplication::desktop()->width(); |
3550 | int dh = QApplication::desktop()->height(); | 3551 | int dh = QApplication::desktop()->height(); |
3551 | #endif | 3552 | #endif |
3552 | mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h ); | 3553 | mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h ); |
3553 | mDateFrame->show(); | 3554 | mDateFrame->show(); |
3554 | } | 3555 | } |
3555 | } | 3556 | } |
3556 | void CalendarView::showDatePicker( ) | 3557 | void CalendarView::showDatePicker( ) |
3557 | { | 3558 | { |
3558 | showDatePickerPopup(); | 3559 | showDatePickerPopup(); |
3559 | mDatePickerMode = 1; | 3560 | mDatePickerMode = 1; |
3560 | mDatePicker->setDate( mNavigator->selectedDates().first() ); | 3561 | mDatePicker->setDate( mNavigator->selectedDates().first() ); |
3561 | } | 3562 | } |
3562 | 3563 | ||
3563 | void CalendarView::showEventEditor() | 3564 | void CalendarView::showEventEditor() |
3564 | { | 3565 | { |
3565 | #ifdef DESKTOP_VERSION | 3566 | #ifdef DESKTOP_VERSION |
3566 | int x,y,w,h; | 3567 | int x,y,w,h; |
3567 | x = mEventEditor->geometry().x(); | 3568 | x = mEventEditor->geometry().x(); |
3568 | y = mEventEditor->geometry().y(); | 3569 | y = mEventEditor->geometry().y(); |
3569 | w = mEventEditor->width(); | 3570 | w = mEventEditor->width(); |
3570 | h = mEventEditor->height(); | 3571 | h = mEventEditor->height(); |
3571 | mEventEditor->show(); | 3572 | mEventEditor->show(); |
3572 | mEventEditor->setGeometry(x,y,w,h); | 3573 | mEventEditor->setGeometry(x,y,w,h); |
3573 | #else | 3574 | #else |
3574 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { | 3575 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { |
3575 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 3576 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
3576 | qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); | 3577 | qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); |
3577 | qApp->processEvents(); | 3578 | qApp->processEvents(); |
3578 | delete mEventEditor; | 3579 | delete mEventEditor; |
3579 | mEventEditor = mDialogManager->getEventEditor(); | 3580 | mEventEditor = mDialogManager->getEventEditor(); |
3580 | topLevelWidget()->setCaption( i18n("") ); | 3581 | topLevelWidget()->setCaption( i18n("") ); |
3581 | } | 3582 | } |
3582 | mEventEditor->showMaximized(); | 3583 | mEventEditor->showMaximized(); |
3583 | #endif | 3584 | #endif |
3584 | } | 3585 | } |
3585 | void CalendarView::showTodoEditor() | 3586 | void CalendarView::showTodoEditor() |
3586 | { | 3587 | { |
3587 | #ifdef DESKTOP_VERSION | 3588 | #ifdef DESKTOP_VERSION |
3588 | int x,y,w,h; | 3589 | int x,y,w,h; |
3589 | x = mTodoEditor->geometry().x(); | 3590 | x = mTodoEditor->geometry().x(); |
3590 | y = mTodoEditor->geometry().y(); | 3591 | y = mTodoEditor->geometry().y(); |
3591 | w = mTodoEditor->width(); | 3592 | w = mTodoEditor->width(); |
3592 | h = mTodoEditor->height(); | 3593 | h = mTodoEditor->height(); |
3593 | mTodoEditor->show(); | 3594 | mTodoEditor->show(); |
3594 | mTodoEditor->setGeometry(x,y,w,h); | 3595 | mTodoEditor->setGeometry(x,y,w,h); |
3595 | #else | 3596 | #else |
3596 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { | 3597 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { |
3597 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 3598 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
3598 | qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); | 3599 | qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); |
3599 | qApp->processEvents(); | 3600 | qApp->processEvents(); |
3600 | delete mTodoEditor; | 3601 | delete mTodoEditor; |
3601 | mTodoEditor = mDialogManager->getTodoEditor(); | 3602 | mTodoEditor = mDialogManager->getTodoEditor(); |
3602 | topLevelWidget()->setCaption( i18n("") ); | 3603 | topLevelWidget()->setCaption( i18n("") ); |
3603 | } | 3604 | } |
3604 | mTodoEditor->showMaximized(); | 3605 | mTodoEditor->showMaximized(); |
3605 | #endif | 3606 | #endif |
3606 | } | 3607 | } |
3607 | 3608 | ||
3608 | void CalendarView::cloneIncidence() | 3609 | void CalendarView::cloneIncidence() |
3609 | { | 3610 | { |
3610 | Incidence *incidence = currentSelection(); | 3611 | Incidence *incidence = currentSelection(); |
3611 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 3612 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
3612 | if ( incidence ) { | 3613 | if ( incidence ) { |
3613 | cloneIncidence(incidence); | 3614 | cloneIncidence(incidence); |
3614 | } | 3615 | } |
3615 | } | 3616 | } |
3616 | void CalendarView::moveIncidence() | 3617 | void CalendarView::moveIncidence() |
3617 | { | 3618 | { |
3618 | Incidence *incidence = currentSelection(); | 3619 | Incidence *incidence = currentSelection(); |
3619 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 3620 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
3620 | if ( incidence ) { | 3621 | if ( incidence ) { |
3621 | moveIncidence(incidence); | 3622 | moveIncidence(incidence); |
3622 | } | 3623 | } |
3623 | } | 3624 | } |
3624 | void CalendarView::beamIncidence() | 3625 | void CalendarView::beamIncidence() |
3625 | { | 3626 | { |
3626 | Incidence *incidence = currentSelection(); | 3627 | Incidence *incidence = currentSelection(); |
3627 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 3628 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
3628 | if ( incidence ) { | 3629 | if ( incidence ) { |
3629 | beamIncidence(incidence); | 3630 | beamIncidence(incidence); |
3630 | } | 3631 | } |
3631 | } | 3632 | } |
3632 | void CalendarView::toggleCancelIncidence() | 3633 | void CalendarView::toggleCancelIncidence() |
3633 | { | 3634 | { |
3634 | Incidence *incidence = currentSelection(); | 3635 | Incidence *incidence = currentSelection(); |
3635 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 3636 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
3636 | if ( incidence ) { | 3637 | if ( incidence ) { |
3637 | cancelIncidence(incidence); | 3638 | cancelIncidence(incidence); |
3638 | } | 3639 | } |
3639 | } | 3640 | } |
3640 | 3641 | ||
3641 | 3642 | ||
3642 | void CalendarView::cancelIncidence(Incidence * inc ) | 3643 | void CalendarView::cancelIncidence(Incidence * inc ) |
3643 | { | 3644 | { |
3644 | inc->setCancelled( ! inc->cancelled() ); | 3645 | inc->setCancelled( ! inc->cancelled() ); |
3645 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); | 3646 | changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); |
3646 | updateView(); | 3647 | updateView(); |
3647 | } | 3648 | } |
3648 | void CalendarView::cloneIncidence(Incidence * orgInc ) | 3649 | void CalendarView::cloneIncidence(Incidence * orgInc ) |
3649 | { | 3650 | { |
3650 | Incidence * newInc = orgInc->clone(); | 3651 | Incidence * newInc = orgInc->clone(); |
3651 | newInc->recreate(); | 3652 | newInc->recreate(); |
3652 | 3653 | ||
3653 | if ( newInc->typeID() == todoID ) { | 3654 | if ( newInc->typeID() == todoID ) { |
3654 | Todo* t = (Todo*) newInc; | 3655 | Todo* t = (Todo*) newInc; |
3655 | bool cloneSub = false; | 3656 | bool cloneSub = false; |
3656 | if ( orgInc->relations().count() ) { | 3657 | if ( orgInc->relations().count() ) { |
3657 | int result = KMessageBox::warningYesNoCancel(this, | 3658 | int result = KMessageBox::warningYesNoCancel(this, |
3658 | i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( KGlobal::formatMessage ( newInc->summary(),0 ) ), | 3659 | i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( KGlobal::formatMessage ( newInc->summary(),0 ) ), |
3659 | i18n("Todo has subtodos"), | 3660 | i18n("Todo has subtodos"), |
3660 | i18n("Yes"), | 3661 | i18n("Yes"), |
3661 | i18n("No")); | 3662 | i18n("No")); |
3662 | 3663 | ||
3663 | if ( result == KMessageBox::Cancel ) { | 3664 | if ( result == KMessageBox::Cancel ) { |
3664 | delete t; | 3665 | delete t; |
3665 | return; | 3666 | return; |
3666 | } | 3667 | } |
3667 | if (result == KMessageBox::Yes) cloneSub = true; | 3668 | if (result == KMessageBox::Yes) cloneSub = true; |
3668 | } | 3669 | } |
3669 | showTodoEditor(); | 3670 | showTodoEditor(); |
3670 | mTodoEditor->editTodo( t ); | 3671 | mTodoEditor->editTodo( t ); |
3671 | if ( mTodoEditor->exec() ) { | 3672 | if ( mTodoEditor->exec() ) { |
3672 | if ( cloneSub ) { | 3673 | if ( cloneSub ) { |
3673 | orgInc->cloneRelations( t ); | 3674 | orgInc->cloneRelations( t ); |
3674 | mCalendar->addIncidenceBranch( t ); | 3675 | mCalendar->addIncidenceBranch( t ); |
3675 | updateView(); | 3676 | updateView(); |
3676 | 3677 | ||
3677 | } else { | 3678 | } else { |
3678 | mCalendar->addTodo( t ); | 3679 | mCalendar->addTodo( t ); |
3679 | updateView(); | 3680 | updateView(); |
3680 | } | 3681 | } |
3681 | } else { | 3682 | } else { |
3682 | delete t; | 3683 | delete t; |
3683 | } | 3684 | } |
3684 | } | 3685 | } |
3685 | else if ( newInc->typeID() == eventID ) { | 3686 | else if ( newInc->typeID() == eventID ) { |
3686 | Event* e = (Event*) newInc; | 3687 | Event* e = (Event*) newInc; |
3687 | showEventEditor(); | 3688 | showEventEditor(); |
3688 | mEventEditor->editEvent( e ); | 3689 | mEventEditor->editEvent( e ); |
3689 | if ( mEventEditor->exec() ) { | 3690 | if ( mEventEditor->exec() ) { |
3690 | mCalendar->addEvent( e ); | 3691 | mCalendar->addEvent( e ); |
3691 | updateView(); | 3692 | updateView(); |
3692 | } else { | 3693 | } else { |
3693 | delete e; | 3694 | delete e; |
3694 | } | 3695 | } |
3695 | } else if ( newInc->typeID() == journalID ) { | 3696 | } else if ( newInc->typeID() == journalID ) { |
3696 | mCalendar->addJournal( (Journal*) newInc ); | 3697 | mCalendar->addJournal( (Journal*) newInc ); |
3697 | editJournal( (Journal*) newInc ); | 3698 | editJournal( (Journal*) newInc ); |
3698 | } | 3699 | } |
3699 | setActiveWindow(); | 3700 | setActiveWindow(); |
3700 | } | 3701 | } |
3701 | 3702 | ||
3702 | void CalendarView::newEvent() | 3703 | void CalendarView::newEvent() |
3703 | { | 3704 | { |
3704 | // TODO: Replace this code by a common eventDurationHint of KOBaseView. | 3705 | // TODO: Replace this code by a common eventDurationHint of KOBaseView. |
3705 | KOAgendaView *aView = mViewManager->agendaView(); | 3706 | KOAgendaView *aView = mViewManager->agendaView(); |
3706 | if (aView) { | 3707 | if (aView) { |
3707 | if (aView->selectionStart().isValid()) { | 3708 | if (aView->selectionStart().isValid()) { |
3708 | if (aView->selectedIsAllDay()) { | 3709 | if (aView->selectedIsAllDay()) { |
3709 | newEvent(aView->selectionStart(),aView->selectionEnd(),true); | 3710 | newEvent(aView->selectionStart(),aView->selectionEnd(),true); |
3710 | } else { | 3711 | } else { |
3711 | newEvent(aView->selectionStart(),aView->selectionEnd()); | 3712 | newEvent(aView->selectionStart(),aView->selectionEnd()); |
3712 | } | 3713 | } |
3713 | return; | 3714 | return; |
3714 | } | 3715 | } |
3715 | } | 3716 | } |
3716 | 3717 | ||
3717 | QDate date = mNavigator->selectedDates().first(); | 3718 | QDate date = mNavigator->selectedDates().first(); |
3718 | #if 0 | 3719 | #if 0 |
3719 | QDateTime current = QDateTime::currentDateTime(); | 3720 | QDateTime current = QDateTime::currentDateTime(); |
3720 | if ( date <= current.date() ) { | 3721 | if ( date <= current.date() ) { |
3721 | int hour = current.time().hour() +1; | 3722 | int hour = current.time().hour() +1; |
3722 | newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), | 3723 | newEvent( QDateTime( current.date(), QTime( hour, 0, 0 ) ), |
3723 | QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); | 3724 | QDateTime( current.date(), QTime( hour+ KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); |
3724 | } else | 3725 | } else |
3725 | #endif | 3726 | #endif |
3726 | newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), | 3727 | newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), |
3727 | QDateTime( date, QTime( KOPrefs::instance()->mStartTime + | 3728 | QDateTime( date, QTime( KOPrefs::instance()->mStartTime + |
3728 | KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); | 3729 | KOPrefs::instance()->mDefaultDuration, 0, 0 ) ) ); |
3729 | } | 3730 | } |
3730 | 3731 | ||
3731 | void CalendarView::newEvent(QDateTime fh) | 3732 | void CalendarView::newEvent(QDateTime fh) |
3732 | { | 3733 | { |
3733 | newEvent(fh, | 3734 | newEvent(fh, |
3734 | QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); | 3735 | QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration))); |
3735 | } | 3736 | } |
3736 | 3737 | ||
3737 | void CalendarView::newEvent(QDate dt) | 3738 | void CalendarView::newEvent(QDate dt) |
3738 | { | 3739 | { |
3739 | newEvent(QDateTime(dt, QTime(0,0,0)), | 3740 | newEvent(QDateTime(dt, QTime(0,0,0)), |
3740 | QDateTime(dt, QTime(0,0,0)), true); | 3741 | QDateTime(dt, QTime(0,0,0)), true); |
3741 | } | 3742 | } |
3742 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) | 3743 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint) |
3743 | { | 3744 | { |
3744 | newEvent(fromHint, toHint, false); | 3745 | newEvent(fromHint, toHint, false); |
3745 | } | 3746 | } |
3746 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) | 3747 | void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay) |
3747 | { | 3748 | { |
3748 | 3749 | ||
3749 | showEventEditor(); | 3750 | showEventEditor(); |
3750 | mEventEditor->newEvent(fromHint,toHint,allDay); | 3751 | mEventEditor->newEvent(fromHint,toHint,allDay); |
3751 | if ( mFilterView->filtersEnabled() ) { | 3752 | if ( mFilterView->filtersEnabled() ) { |
3752 | CalFilter *filter = mFilterView->selectedFilter(); | 3753 | CalFilter *filter = mFilterView->selectedFilter(); |
3753 | if (filter && filter->showCategories()) { | 3754 | if (filter && filter->showCategories()) { |
3754 | mEventEditor->setCategories(filter->categoryList().join(",") ); | 3755 | mEventEditor->setCategories(filter->categoryList().join(",") ); |
3755 | } | 3756 | } |
3756 | if ( filter ) | 3757 | if ( filter ) |
3757 | mEventEditor->setSecrecy( filter->getSecrecy() ); | 3758 | mEventEditor->setSecrecy( filter->getSecrecy() ); |
3758 | } | 3759 | } |
3759 | mEventEditor->exec(); | 3760 | mEventEditor->exec(); |
3760 | setActiveWindow(); | 3761 | setActiveWindow(); |
3761 | } | 3762 | } |
3762 | void CalendarView::todoAdded(Todo * t) | 3763 | void CalendarView::todoAdded(Todo * t) |
3763 | { | 3764 | { |
3764 | 3765 | ||
3765 | changeTodoDisplay ( t ,KOGlobals::EVENTADDED); | 3766 | changeTodoDisplay ( t ,KOGlobals::EVENTADDED); |
3766 | updateTodoViews(); | 3767 | updateTodoViews(); |
3767 | } | 3768 | } |
3768 | void CalendarView::todoChanged(Todo * t) | 3769 | void CalendarView::todoChanged(Todo * t) |
3769 | { | 3770 | { |
3770 | emit todoModified( t, 4 ); | 3771 | emit todoModified( t, 4 ); |
3771 | // updateTodoViews(); | 3772 | // updateTodoViews(); |
3772 | } | 3773 | } |
3773 | void CalendarView::todoToBeDeleted(Todo *) | 3774 | void CalendarView::todoToBeDeleted(Todo *) |
3774 | { | 3775 | { |
3775 | //qDebug("todoToBeDeleted(Todo *) "); | 3776 | //qDebug("todoToBeDeleted(Todo *) "); |
3776 | updateTodoViews(); | 3777 | updateTodoViews(); |
3777 | } | 3778 | } |
3778 | void CalendarView::todoDeleted() | 3779 | void CalendarView::todoDeleted() |
3779 | { | 3780 | { |
3780 | //qDebug(" todoDeleted()"); | 3781 | //qDebug(" todoDeleted()"); |
3781 | updateTodoViews(); | 3782 | updateTodoViews(); |
3782 | } | 3783 | } |
3783 | 3784 | ||
3784 | 3785 | ||
3785 | void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) | 3786 | void CalendarView::newTodoDateTime( QDateTime dt, bool allday ) |
3786 | { | 3787 | { |
3787 | showTodoEditor(); | 3788 | showTodoEditor(); |
3788 | mTodoEditor->newTodo(dt,0,allday); | 3789 | mTodoEditor->newTodo(dt,0,allday); |
3789 | if ( mFilterView->filtersEnabled() ) { | 3790 | if ( mFilterView->filtersEnabled() ) { |
3790 | CalFilter *filter = mFilterView->selectedFilter(); | 3791 | CalFilter *filter = mFilterView->selectedFilter(); |
3791 | if (filter && filter->showCategories()) { | 3792 | if (filter && filter->showCategories()) { |
3792 | mTodoEditor->setCategories(filter->categoryList().join(",") ); | 3793 | mTodoEditor->setCategories(filter->categoryList().join(",") ); |
3793 | } | 3794 | } |
3794 | if ( filter ) | 3795 | if ( filter ) |
3795 | mTodoEditor->setSecrecy( filter->getSecrecy() ); | 3796 | mTodoEditor->setSecrecy( filter->getSecrecy() ); |
3796 | } | 3797 | } |
3797 | mTodoEditor->exec(); | 3798 | mTodoEditor->exec(); |
3798 | setActiveWindow(); | 3799 | setActiveWindow(); |
3799 | } | 3800 | } |
3800 | 3801 | ||
3801 | void CalendarView::newTodo() | 3802 | void CalendarView::newTodo() |
3802 | { | 3803 | { |
3803 | newTodoDateTime( QDateTime(),true ); | 3804 | newTodoDateTime( QDateTime(),true ); |
3804 | } | 3805 | } |
3805 | 3806 | ||
3806 | void CalendarView::newSubTodo() | 3807 | void CalendarView::newSubTodo() |
3807 | { | 3808 | { |
3808 | Todo *todo = selectedTodo(); | 3809 | Todo *todo = selectedTodo(); |
3809 | if ( todo ) newSubTodo( todo ); | 3810 | if ( todo ) newSubTodo( todo ); |
3810 | } | 3811 | } |
3811 | 3812 | ||
3812 | void CalendarView::newSubTodo(Todo *parentEvent) | 3813 | void CalendarView::newSubTodo(Todo *parentEvent) |
3813 | { | 3814 | { |
3814 | 3815 | ||
3815 | showTodoEditor(); | 3816 | showTodoEditor(); |
3816 | mTodoEditor->newTodo(QDateTime(),parentEvent,true); | 3817 | mTodoEditor->newTodo(QDateTime(),parentEvent,true); |
3817 | mTodoEditor->exec(); | 3818 | mTodoEditor->exec(); |
3818 | setActiveWindow(); | 3819 | setActiveWindow(); |
3819 | } | 3820 | } |
3820 | 3821 | ||
3821 | void CalendarView::newFloatingEvent() | 3822 | void CalendarView::newFloatingEvent() |
3822 | { | 3823 | { |
3823 | DateList tmpList = mNavigator->selectedDates(); | 3824 | DateList tmpList = mNavigator->selectedDates(); |
3824 | QDate date = tmpList.first(); | 3825 | QDate date = tmpList.first(); |
3825 | 3826 | ||
3826 | newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), | 3827 | newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), |
3827 | QDateTime( date, QTime( 12, 0, 0 ) ), true ); | 3828 | QDateTime( date, QTime( 12, 0, 0 ) ), true ); |
3828 | } | 3829 | } |
3829 | 3830 | ||
3830 | 3831 | ||
3831 | void CalendarView::editEvent( Event *event ) | 3832 | void CalendarView::editEvent( Event *event ) |
3832 | { | 3833 | { |
3833 | 3834 | ||
3834 | if ( !event ) return; | 3835 | if ( !event ) return; |
3835 | if ( event->isReadOnly() ) { | 3836 | if ( event->isReadOnly() ) { |
3836 | showEvent( event ); | 3837 | showEvent( event ); |
3837 | return; | 3838 | return; |
3838 | } | 3839 | } |
3839 | showEventEditor(); | 3840 | showEventEditor(); |
3840 | mEventEditor->editEvent( event , mFlagEditDescription); | 3841 | mEventEditor->editEvent( event , mFlagEditDescription); |
3841 | mEventEditor->exec(); | 3842 | mEventEditor->exec(); |
3842 | setActiveWindow(); | 3843 | setActiveWindow(); |
3843 | 3844 | ||
3844 | } | 3845 | } |
3845 | void CalendarView::editJournal( Journal *jour ) | 3846 | void CalendarView::editJournal( Journal *jour ) |
3846 | { | 3847 | { |
3847 | if ( !jour ) return; | 3848 | if ( !jour ) return; |
3848 | mDialogManager->hideSearchDialog(); | 3849 | mDialogManager->hideSearchDialog(); |
3849 | mViewManager->showJournalView(); | 3850 | mViewManager->showJournalView(); |
3850 | mNavigator->slotDaySelect( jour->dtStart().date() ); | 3851 | mNavigator->slotDaySelect( jour->dtStart().date() ); |
3851 | } | 3852 | } |
3852 | void CalendarView::editTodo( Todo *todo ) | 3853 | void CalendarView::editTodo( Todo *todo ) |
3853 | { | 3854 | { |
3854 | if ( !todo ) return; | 3855 | if ( !todo ) return; |
3855 | 3856 | ||
3856 | if ( todo->isReadOnly() ) { | 3857 | if ( todo->isReadOnly() ) { |
3857 | showTodo( todo ); | 3858 | showTodo( todo ); |
3858 | return; | 3859 | return; |
3859 | } | 3860 | } |
3860 | showTodoEditor(); | 3861 | showTodoEditor(); |
3861 | mTodoEditor->editTodo( todo ,mFlagEditDescription); | 3862 | mTodoEditor->editTodo( todo ,mFlagEditDescription); |
3862 | mTodoEditor->exec(); | 3863 | mTodoEditor->exec(); |
3863 | setActiveWindow(); | 3864 | setActiveWindow(); |
3864 | 3865 | ||
3865 | } | 3866 | } |
3866 | 3867 | ||
3867 | KOEventViewerDialog* CalendarView::getEventViewerDialog() | 3868 | KOEventViewerDialog* CalendarView::getEventViewerDialog() |
3868 | { | 3869 | { |
3869 | if ( !mEventViewerDialog ) { | 3870 | if ( !mEventViewerDialog ) { |
3870 | mEventViewerDialog = new KOEventViewerDialog(0); | 3871 | mEventViewerDialog = new KOEventViewerDialog(0); |
3871 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); | 3872 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); |
3872 | connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); | 3873 | connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); |
3873 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), | 3874 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), |
3874 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 3875 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
3875 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), | 3876 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), |
3876 | viewManager(), SLOT( showAgendaView( bool ) ) ); | 3877 | viewManager(), SLOT( showAgendaView( bool ) ) ); |
3877 | connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), | 3878 | connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), |
3878 | this, SLOT( slotViewerClosed() ) ); | 3879 | this, SLOT( slotViewerClosed() ) ); |
3879 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), | 3880 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), |
3880 | this, SLOT( todoChanged(Todo *) ) ); | 3881 | this, SLOT( todoChanged(Todo *) ) ); |
3881 | connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); | 3882 | connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); |
3882 | mEventViewerDialog->resize( 640, 480 ); | 3883 | mEventViewerDialog->resize( 640, 480 ); |
3883 | 3884 | ||
3884 | } | 3885 | } |
3885 | return mEventViewerDialog; | 3886 | return mEventViewerDialog; |
3886 | } | 3887 | } |
3887 | void CalendarView::showEvent(Event *event) | 3888 | void CalendarView::showEvent(Event *event) |
3888 | { | 3889 | { |
3889 | getEventViewerDialog()->setEvent(event); | 3890 | getEventViewerDialog()->setEvent(event); |
3890 | getEventViewerDialog()->showMe(); | 3891 | getEventViewerDialog()->showMe(); |
3891 | } | 3892 | } |
3892 | 3893 | ||
3893 | void CalendarView::showTodo(Todo *event) | 3894 | void CalendarView::showTodo(Todo *event) |
3894 | { | 3895 | { |
3895 | getEventViewerDialog()->setTodo(event); | 3896 | getEventViewerDialog()->setTodo(event); |
3896 | getEventViewerDialog()->showMe(); | 3897 | getEventViewerDialog()->showMe(); |
3897 | } | 3898 | } |
3898 | void CalendarView::showJournal( Journal *jour ) | 3899 | void CalendarView::showJournal( Journal *jour ) |
3899 | { | 3900 | { |
3900 | getEventViewerDialog()->setJournal(jour); | 3901 | getEventViewerDialog()->setJournal(jour); |
3901 | getEventViewerDialog()->showMe(); | 3902 | getEventViewerDialog()->showMe(); |
3902 | 3903 | ||
3903 | } | 3904 | } |
3904 | // void CalendarView::todoModified (Todo *event, int changed) | 3905 | // void CalendarView::todoModified (Todo *event, int changed) |
3905 | // { | 3906 | // { |
3906 | // // if (mDialogList.find (event) != mDialogList.end ()) { | 3907 | // // if (mDialogList.find (event) != mDialogList.end ()) { |
3907 | // // kdDebug() << "Todo modified and open" << endl; | 3908 | // // kdDebug() << "Todo modified and open" << endl; |
3908 | // // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; | 3909 | // // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; |
3909 | // // temp->modified (changed); | 3910 | // // temp->modified (changed); |
3910 | 3911 | ||
3911 | // // } | 3912 | // // } |
3912 | 3913 | ||
3913 | // mViewManager->updateView(); | 3914 | // mViewManager->updateView(); |
3914 | // } | 3915 | // } |
3915 | 3916 | ||
3916 | void CalendarView::appointment_show() | 3917 | void CalendarView::appointment_show() |
3917 | { | 3918 | { |
3918 | Event *anEvent = 0; | 3919 | Event *anEvent = 0; |
3919 | 3920 | ||
3920 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3921 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3921 | 3922 | ||
3922 | if (mViewManager->currentView()->isEventView()) { | 3923 | if (mViewManager->currentView()->isEventView()) { |
3923 | if ( incidence && incidence->typeID() == eventID ) { | 3924 | if ( incidence && incidence->typeID() == eventID ) { |
3924 | anEvent = static_cast<Event *>(incidence); | 3925 | anEvent = static_cast<Event *>(incidence); |
3925 | } | 3926 | } |
3926 | } | 3927 | } |
3927 | 3928 | ||
3928 | if (!anEvent) { | 3929 | if (!anEvent) { |
3929 | KNotifyClient::beep(); | 3930 | KNotifyClient::beep(); |
3930 | return; | 3931 | return; |
3931 | } | 3932 | } |
3932 | 3933 | ||
3933 | showEvent(anEvent); | 3934 | showEvent(anEvent); |
3934 | } | 3935 | } |
3935 | 3936 | ||
3936 | void CalendarView::appointment_edit() | 3937 | void CalendarView::appointment_edit() |
3937 | { | 3938 | { |
3938 | Event *anEvent = 0; | 3939 | Event *anEvent = 0; |
3939 | 3940 | ||
3940 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3941 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3941 | 3942 | ||
3942 | if (mViewManager->currentView()->isEventView()) { | 3943 | if (mViewManager->currentView()->isEventView()) { |
3943 | if ( incidence && incidence->typeID() == eventID ) { | 3944 | if ( incidence && incidence->typeID() == eventID ) { |
3944 | anEvent = static_cast<Event *>(incidence); | 3945 | anEvent = static_cast<Event *>(incidence); |
3945 | } | 3946 | } |
3946 | } | 3947 | } |
3947 | 3948 | ||
3948 | if (!anEvent) { | 3949 | if (!anEvent) { |
3949 | KNotifyClient::beep(); | 3950 | KNotifyClient::beep(); |
3950 | return; | 3951 | return; |
3951 | } | 3952 | } |
3952 | 3953 | ||
3953 | editEvent(anEvent); | 3954 | editEvent(anEvent); |
3954 | } | 3955 | } |
3955 | 3956 | ||
3956 | void CalendarView::appointment_delete() | 3957 | void CalendarView::appointment_delete() |
3957 | { | 3958 | { |
3958 | Event *anEvent = 0; | 3959 | Event *anEvent = 0; |
3959 | 3960 | ||
3960 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3961 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3961 | 3962 | ||
3962 | if (mViewManager->currentView()->isEventView()) { | 3963 | if (mViewManager->currentView()->isEventView()) { |
3963 | if ( incidence && incidence->typeID() == eventID ) { | 3964 | if ( incidence && incidence->typeID() == eventID ) { |
3964 | anEvent = static_cast<Event *>(incidence); | 3965 | anEvent = static_cast<Event *>(incidence); |
3965 | } | 3966 | } |
3966 | } | 3967 | } |
3967 | 3968 | ||
3968 | if (!anEvent) { | 3969 | if (!anEvent) { |
3969 | KNotifyClient::beep(); | 3970 | KNotifyClient::beep(); |
3970 | return; | 3971 | return; |
3971 | } | 3972 | } |
3972 | 3973 | ||
3973 | deleteEvent(anEvent); | 3974 | deleteEvent(anEvent); |
3974 | } | 3975 | } |
3975 | 3976 | ||
3976 | void CalendarView::todo_resub( Todo * parent, Todo * sub ) | 3977 | void CalendarView::todo_resub( Todo * parent, Todo * sub ) |
3977 | { | 3978 | { |
3978 | if (!sub) return; | 3979 | if (!sub) return; |
3979 | if ( sub->relatedTo() == parent ) | 3980 | if ( sub->relatedTo() == parent ) |
3980 | return; | 3981 | return; |
3981 | sub->setRelatedTo(parent); | 3982 | sub->setRelatedTo(parent); |
3982 | sub->updated(); | 3983 | sub->updated(); |
3983 | setModified(true); | 3984 | setModified(true); |
3984 | updateView(); | 3985 | updateView(); |
3985 | } | 3986 | } |
3986 | void CalendarView::todo_unsub(Todo *anTodo ) | 3987 | void CalendarView::todo_unsub(Todo *anTodo ) |
3987 | { | 3988 | { |
3988 | todo_resub( 0, anTodo ); | 3989 | todo_resub( 0, anTodo ); |
3989 | } | 3990 | } |
3990 | 3991 | ||
3991 | void CalendarView::deleteTodo(Todo *todo) | 3992 | void CalendarView::deleteTodo(Todo *todo) |
3992 | { | 3993 | { |
3993 | if (!todo) { | 3994 | if (!todo) { |
3994 | KNotifyClient::beep(); | 3995 | KNotifyClient::beep(); |
3995 | return; | 3996 | return; |
3996 | } | 3997 | } |
3997 | if (KOPrefs::instance()->mConfirm) { | 3998 | if (KOPrefs::instance()->mConfirm) { |
3998 | QString text = KGlobal::formatMessage ( todo->summary(),0 ); | 3999 | QString text = KGlobal::formatMessage ( todo->summary(),0 ); |
3999 | if (!todo->relations().isEmpty()) { | 4000 | if (!todo->relations().isEmpty()) { |
4000 | text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); | 4001 | text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); |
4001 | 4002 | ||
4002 | } | 4003 | } |
4003 | switch (msgItemDelete(i18n("Todo:") +"\n"+text)) { | 4004 | switch (msgItemDelete(i18n("Todo:") +"\n"+text)) { |
4004 | case KMessageBox::Continue: // OK | 4005 | case KMessageBox::Continue: // OK |
4005 | bool deleteT = false; | 4006 | bool deleteT = false; |
4006 | if (!todo->relations().isEmpty()) { | 4007 | if (!todo->relations().isEmpty()) { |
4007 | deleteT = removeCompletedSubTodos( todo ); | 4008 | deleteT = removeCompletedSubTodos( todo ); |
4008 | } | 4009 | } |
4009 | // deleteT == true: todo already deleted in removeCompletedSubTodos | 4010 | // deleteT == true: todo already deleted in removeCompletedSubTodos |
4010 | if ( !deleteT ) { | 4011 | if ( !deleteT ) { |
4011 | checkExternalId( todo ); | 4012 | checkExternalId( todo ); |
4012 | calendar()->deleteTodo(todo); | 4013 | calendar()->deleteTodo(todo); |
4013 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); | 4014 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); |
4014 | updateView(); | 4015 | updateView(); |
4015 | } | 4016 | } |
4016 | break; | 4017 | break; |
4017 | } // switch | 4018 | } // switch |
4018 | } else { | 4019 | } else { |
4019 | checkExternalId( todo ); | 4020 | checkExternalId( todo ); |
4020 | mCalendar->deleteTodo(todo); | 4021 | mCalendar->deleteTodo(todo); |
4021 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); | 4022 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); |
4022 | updateView(); | 4023 | updateView(); |
4023 | } | 4024 | } |
4024 | 4025 | ||
4025 | emit updateSearchDialog(); | 4026 | emit updateSearchDialog(); |
4026 | } | 4027 | } |
4027 | void CalendarView::deleteJournal(Journal *jour) | 4028 | void CalendarView::deleteJournal(Journal *jour) |
4028 | { | 4029 | { |
4029 | if (!jour) { | 4030 | if (!jour) { |
4030 | KNotifyClient::beep(); | 4031 | KNotifyClient::beep(); |
4031 | return; | 4032 | return; |
4032 | } | 4033 | } |
4033 | if (KOPrefs::instance()->mConfirm) { | 4034 | if (KOPrefs::instance()->mConfirm) { |
4034 | 4035 | ||
4035 | QString des; | 4036 | QString des; |
4036 | if ( !jour->summary().isEmpty() ) { | 4037 | if ( !jour->summary().isEmpty() ) { |
4037 | des = jour->summary(); | 4038 | des = jour->summary(); |
4038 | } else { | 4039 | } else { |
4039 | des = jour->description().left(30); | 4040 | des = jour->description().left(30); |
4040 | des = des.simplifyWhiteSpace (); | 4041 | des = des.simplifyWhiteSpace (); |
4041 | des.replace (QRegExp ("\\n"),"" ); | 4042 | des.replace (QRegExp ("\\n"),"" ); |
4042 | des.replace (QRegExp ("\\r"),"" ); | 4043 | des.replace (QRegExp ("\\r"),"" ); |
4043 | } | 4044 | } |
4044 | switch (msgItemDelete( i18n("Journal:") +"\n"+KGlobal::formatMessage ( des,0 ))) { | 4045 | switch (msgItemDelete( i18n("Journal:") +"\n"+KGlobal::formatMessage ( des,0 ))) { |
4045 | case KMessageBox::Continue: // OK | 4046 | case KMessageBox::Continue: // OK |
4046 | calendar()->deleteJournal(jour); | 4047 | calendar()->deleteJournal(jour); |
4047 | updateView(); | 4048 | updateView(); |
4048 | break; | 4049 | break; |
4049 | } // switch | 4050 | } // switch |
4050 | } else { | 4051 | } else { |
4051 | calendar()->deleteJournal(jour);; | 4052 | calendar()->deleteJournal(jour);; |
4052 | updateView(); | 4053 | updateView(); |
4053 | } | 4054 | } |
4054 | emit updateSearchDialog(); | 4055 | emit updateSearchDialog(); |
4055 | } | 4056 | } |
4056 | 4057 | ||
4057 | void CalendarView::deleteEvent(Event *anEvent) | 4058 | void CalendarView::deleteEvent(Event *anEvent) |
4058 | { | 4059 | { |
4059 | if (!anEvent) { | 4060 | if (!anEvent) { |
4060 | KNotifyClient::beep(); | 4061 | KNotifyClient::beep(); |
4061 | return; | 4062 | return; |
4062 | } | 4063 | } |
4063 | 4064 | ||
4064 | if (anEvent->doesRecur()) { | 4065 | if (anEvent->doesRecur()) { |
4065 | QDate itemDate = mViewManager->currentSelectionDate(); | 4066 | QDate itemDate = mViewManager->currentSelectionDate(); |
4066 | int km; | 4067 | int km; |
4067 | if (!itemDate.isValid()) { | 4068 | if (!itemDate.isValid()) { |
4068 | //kdDebug() << "Date Not Valid" << endl; | 4069 | //kdDebug() << "Date Not Valid" << endl; |
4069 | if (KOPrefs::instance()->mConfirm) { | 4070 | if (KOPrefs::instance()->mConfirm) { |
4070 | km = KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + | 4071 | km = KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + |
4071 | i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), | 4072 | i18n("\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?"), |
4072 | i18n("KO/Pi Confirmation"),i18n("Delete All")); | 4073 | i18n("KO/Pi Confirmation"),i18n("Delete All")); |
4073 | if ( km == KMessageBox::Continue ) | 4074 | if ( km == KMessageBox::Continue ) |
4074 | km = KMessageBox::No; // No = all below | 4075 | km = KMessageBox::No; // No = all below |
4075 | } else | 4076 | } else |
4076 | km = KMessageBox::No; | 4077 | km = KMessageBox::No; |
4077 | } else { | 4078 | } else { |
4078 | km = KMessageBox::warningYesNoCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + | 4079 | km = KMessageBox::warningYesNoCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + |
4079 | i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ | 4080 | i18n("\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n")+ |
4080 | KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), | 4081 | KGlobal::locale()->formatDate(itemDate)+i18n(" ?\n\nDelete:\n"), |
4081 | i18n("KO/Pi Confirmation"),i18n("Current"), | 4082 | i18n("KO/Pi Confirmation"),i18n("Current"), |
4082 | i18n("All")); | 4083 | i18n("All")); |
4083 | } | 4084 | } |
4084 | switch(km) { | 4085 | switch(km) { |
4085 | 4086 | ||
4086 | case KMessageBox::No: // Continue // all | 4087 | case KMessageBox::No: // Continue // all |
4087 | //qDebug("KMessageBox::No "); | 4088 | //qDebug("KMessageBox::No "); |
4088 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 4089 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
4089 | schedule(Scheduler::Cancel,anEvent); | 4090 | schedule(Scheduler::Cancel,anEvent); |
4090 | 4091 | ||
4091 | checkExternalId( anEvent); | 4092 | checkExternalId( anEvent); |
4092 | mCalendar->deleteEvent(anEvent); | 4093 | mCalendar->deleteEvent(anEvent); |
4093 | changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); | 4094 | changeEventDisplay(anEvent,KOGlobals::EVENTDELETED); |
4094 | break; | 4095 | break; |
4095 | 4096 | ||
4096 | // Disabled because it does not work | 4097 | // Disabled because it does not work |
4097 | //#if 0 | 4098 | //#if 0 |
4098 | case KMessageBox::Yes: // just this one | 4099 | case KMessageBox::Yes: // just this one |
4099 | //QDate qd = mNavigator->selectedDates().first(); | 4100 | //QDate qd = mNavigator->selectedDates().first(); |
4100 | //if (!qd.isValid()) { | 4101 | //if (!qd.isValid()) { |
4101 | // kdDebug() << "no date selected, or invalid date" << endl; | 4102 | // kdDebug() << "no date selected, or invalid date" << endl; |
4102 | // KNotifyClient::beep(); | 4103 | // KNotifyClient::beep(); |
4103 | // return; | 4104 | // return; |
4104 | //} | 4105 | //} |
4105 | //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); | 4106 | //while (!anEvent->recursOn(qd)) qd = qd.addDays(1); |
4106 | if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { | 4107 | if (itemDate!=QDate(1,1,1) || itemDate.isValid()) { |
4107 | anEvent->addExDate(itemDate); | 4108 | anEvent->addExDate(itemDate); |
4108 | int duration = anEvent->recurrence()->duration(); | 4109 | int duration = anEvent->recurrence()->duration(); |
4109 | if ( duration > 0 ) { | 4110 | if ( duration > 0 ) { |
4110 | anEvent->recurrence()->setDuration( duration - 1 ); | 4111 | anEvent->recurrence()->setDuration( duration - 1 ); |
4111 | } | 4112 | } |
4112 | changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); | 4113 | changeEventDisplay(anEvent, KOGlobals::EVENTEDITED); |
4113 | } | 4114 | } |
4114 | break; | 4115 | break; |
4115 | //#endif | 4116 | //#endif |
4116 | } // switch | 4117 | } // switch |
4117 | } else { | 4118 | } else { |
4118 | if (KOPrefs::instance()->mConfirm) { | 4119 | if (KOPrefs::instance()->mConfirm) { |
4119 | switch (KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + | 4120 | switch (KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( anEvent->summary(),0 ) + |
4120 | i18n("\nAre you sure you want\nto delete this event?"), | 4121 | i18n("\nAre you sure you want\nto delete this event?"), |
4121 | i18n("KO/Pi Confirmation"),i18n("Delete"))) { | 4122 | i18n("KO/Pi Confirmation"),i18n("Delete"))) { |
4122 | case KMessageBox::Continue: // OK | 4123 | case KMessageBox::Continue: // OK |
4123 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 4124 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
4124 | schedule(Scheduler::Cancel,anEvent); | 4125 | schedule(Scheduler::Cancel,anEvent); |
4125 | checkExternalId( anEvent); | 4126 | checkExternalId( anEvent); |
4126 | mCalendar->deleteEvent(anEvent); | 4127 | mCalendar->deleteEvent(anEvent); |
4127 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); | 4128 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); |
4128 | break; | 4129 | break; |
4129 | } // switch | 4130 | } // switch |
4130 | } else { | 4131 | } else { |
4131 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) | 4132 | if (anEvent->organizer()==KOPrefs::instance()->email() && anEvent->attendeeCount()>0) |
4132 | schedule(Scheduler::Cancel,anEvent); | 4133 | schedule(Scheduler::Cancel,anEvent); |
4133 | checkExternalId( anEvent); | 4134 | checkExternalId( anEvent); |
4134 | mCalendar->deleteEvent(anEvent); | 4135 | mCalendar->deleteEvent(anEvent); |
4135 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); | 4136 | changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); |
4136 | } | 4137 | } |
4137 | } // if-else | 4138 | } // if-else |
4138 | emit updateSearchDialog(); | 4139 | emit updateSearchDialog(); |
4139 | } | 4140 | } |
4140 | 4141 | ||
4141 | bool CalendarView::deleteEvent(const QString &uid) | 4142 | bool CalendarView::deleteEvent(const QString &uid) |
4142 | { | 4143 | { |
4143 | Event *ev = mCalendar->event(uid); | 4144 | Event *ev = mCalendar->event(uid); |
4144 | if (ev) { | 4145 | if (ev) { |
4145 | deleteEvent(ev); | 4146 | deleteEvent(ev); |
4146 | return true; | 4147 | return true; |
4147 | } else { | 4148 | } else { |
4148 | return false; | 4149 | return false; |
4149 | } | 4150 | } |
4150 | } | 4151 | } |
4151 | 4152 | ||
4152 | /*****************************************************************************/ | 4153 | /*****************************************************************************/ |
4153 | 4154 | ||
4154 | void CalendarView::action_mail() | 4155 | void CalendarView::action_mail() |
4155 | { | 4156 | { |
4156 | #ifndef KORG_NOMAIL | 4157 | #ifndef KORG_NOMAIL |
4157 | KOMailClient mailClient; | 4158 | KOMailClient mailClient; |
4158 | 4159 | ||
4159 | Incidence *incidence = currentSelection(); | 4160 | Incidence *incidence = currentSelection(); |
4160 | 4161 | ||
4161 | if (!incidence) { | 4162 | if (!incidence) { |
4162 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); | 4163 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); |
4163 | return; | 4164 | return; |
4164 | } | 4165 | } |
4165 | if(incidence->attendeeCount() == 0 ) { | 4166 | if(incidence->attendeeCount() == 0 ) { |
4166 | KMessageBox::sorry(this, | 4167 | KMessageBox::sorry(this, |
4167 | i18n("Can't generate mail:\nNo attendees defined.\n")); | 4168 | i18n("Can't generate mail:\nNo attendees defined.\n")); |
4168 | return; | 4169 | return; |
4169 | } | 4170 | } |
4170 | 4171 | ||
4171 | CalendarLocal cal_tmp; | 4172 | CalendarLocal cal_tmp; |
4172 | Event *event = 0; | 4173 | Event *event = 0; |
4173 | Event *ev = 0; | 4174 | Event *ev = 0; |
4174 | if ( incidence && incidence->typeID() == eventID ) { | 4175 | if ( incidence && incidence->typeID() == eventID ) { |
4175 | event = static_cast<Event *>(incidence); | 4176 | event = static_cast<Event *>(incidence); |
4176 | ev = new Event(*event); | 4177 | ev = new Event(*event); |
4177 | cal_tmp.addEvent(ev); | 4178 | cal_tmp.addEvent(ev); |
4178 | } | 4179 | } |
4179 | ICalFormat mForm(); | 4180 | ICalFormat mForm(); |
4180 | QString attachment = mForm.toString( &cal_tmp ); | 4181 | QString attachment = mForm.toString( &cal_tmp ); |
4181 | if (ev) delete(ev); | 4182 | if (ev) delete(ev); |
4182 | 4183 | ||
4183 | mailClient.mailAttendees(currentSelection(), attachment); | 4184 | mailClient.mailAttendees(currentSelection(), attachment); |
4184 | 4185 | ||
4185 | #endif | 4186 | #endif |
4186 | 4187 | ||
4187 | #if 0 | 4188 | #if 0 |
4188 | Event *anEvent = 0; | 4189 | Event *anEvent = 0; |
4189 | if (mViewManager->currentView()->isEventView()) { | 4190 | if (mViewManager->currentView()->isEventView()) { |
4190 | anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first()); | 4191 | anEvent = dynamic_cast<Event *>((mViewManager->currentView()->selectedIncidences()).first()); |
4191 | } | 4192 | } |
4192 | 4193 | ||
4193 | if (!anEvent) { | 4194 | if (!anEvent) { |
4194 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); | 4195 | KMessageBox::sorry(this,i18n("Can't generate mail:\nNo event selected.")); |
4195 | return; | 4196 | return; |
4196 | } | 4197 | } |
4197 | if(anEvent->attendeeCount() == 0 ) { | 4198 | if(anEvent->attendeeCount() == 0 ) { |
4198 | KMessageBox::sorry(this, | 4199 | KMessageBox::sorry(this, |
4199 | i18n("Can't generate mail:\nNo attendees defined.\n")); | 4200 | i18n("Can't generate mail:\nNo attendees defined.\n")); |
4200 | return; | 4201 | return; |
4201 | } | 4202 | } |
4202 | 4203 | ||
4203 | mailobject.emailEvent(anEvent); | 4204 | mailobject.emailEvent(anEvent); |
4204 | #endif | 4205 | #endif |
4205 | } | 4206 | } |
4206 | 4207 | ||
4207 | 4208 | ||
4208 | void CalendarView::schedule_publish(Incidence *incidence) | 4209 | void CalendarView::schedule_publish(Incidence *incidence) |
4209 | { | 4210 | { |
4210 | Event *event = 0; | 4211 | Event *event = 0; |
4211 | Todo *todo = 0; | 4212 | Todo *todo = 0; |
4212 | 4213 | ||
4213 | if (incidence == 0) { | 4214 | if (incidence == 0) { |
4214 | incidence = mViewManager->currentView()->selectedIncidences().first(); | 4215 | incidence = mViewManager->currentView()->selectedIncidences().first(); |
4215 | if (incidence == 0) { | 4216 | if (incidence == 0) { |
4216 | incidence = mTodoList->selectedIncidences().first(); | 4217 | incidence = mTodoList->selectedIncidences().first(); |
4217 | } | 4218 | } |
4218 | } | 4219 | } |
4219 | if ( incidence && incidence->typeID() == eventID ) { | 4220 | if ( incidence && incidence->typeID() == eventID ) { |
4220 | event = static_cast<Event *>(incidence); | 4221 | event = static_cast<Event *>(incidence); |
4221 | } else { | 4222 | } else { |
4222 | if ( incidence && incidence->typeID() == todoID ) { | 4223 | if ( incidence && incidence->typeID() == todoID ) { |
4223 | todo = static_cast<Todo *>(incidence); | 4224 | todo = static_cast<Todo *>(incidence); |
4224 | } | 4225 | } |
4225 | } | 4226 | } |
4226 | 4227 | ||
4227 | if (!event && !todo) { | 4228 | if (!event && !todo) { |
4228 | KMessageBox::sorry(this,i18n("No event selected.")); | 4229 | KMessageBox::sorry(this,i18n("No event selected.")); |
4229 | return; | 4230 | return; |
4230 | } | 4231 | } |
4231 | 4232 | ||
4232 | PublishDialog *publishdlg = new PublishDialog(); | 4233 | PublishDialog *publishdlg = new PublishDialog(); |
4233 | if (incidence->attendeeCount()>0) { | 4234 | if (incidence->attendeeCount()>0) { |
4234 | QPtrList<Attendee> attendees = incidence->attendees(); | 4235 | QPtrList<Attendee> attendees = incidence->attendees(); |
4235 | attendees.first(); | 4236 | attendees.first(); |
4236 | while ( attendees.current()!=0 ) { | 4237 | while ( attendees.current()!=0 ) { |
4237 | publishdlg->addAttendee(attendees.current()); | 4238 | publishdlg->addAttendee(attendees.current()); |
4238 | attendees.next(); | 4239 | attendees.next(); |
4239 | } | 4240 | } |
4240 | } | 4241 | } |
4241 | bool send = true; | 4242 | bool send = true; |
4242 | if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) { | 4243 | if ( KOPrefs::instance()->mMailClient == KOPrefs::MailClientSendmail ) { |
4243 | if ( publishdlg->exec() != QDialog::Accepted ) | 4244 | if ( publishdlg->exec() != QDialog::Accepted ) |
4244 | send = false; | 4245 | send = false; |
4245 | } | 4246 | } |
4246 | if ( send ) { | 4247 | if ( send ) { |
4247 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); | 4248 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); |
4248 | if ( event ) { | 4249 | if ( event ) { |
4249 | Event *ev = new Event(*event); | 4250 | Event *ev = new Event(*event); |
4250 | ev->registerObserver(0); | 4251 | ev->registerObserver(0); |
4251 | ev->clearAttendees(); | 4252 | ev->clearAttendees(); |
4252 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { | 4253 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { |
4253 | delete(ev); | 4254 | delete(ev); |
4254 | } | 4255 | } |
4255 | } else { | 4256 | } else { |
4256 | if ( todo ) { | 4257 | if ( todo ) { |
4257 | Todo *ev = new Todo(*todo); | 4258 | Todo *ev = new Todo(*todo); |
4258 | ev->registerObserver(0); | 4259 | ev->registerObserver(0); |
4259 | ev->clearAttendees(); | 4260 | ev->clearAttendees(); |
4260 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { | 4261 | if (!dlg->addMessage(ev,Scheduler::Publish,publishdlg->addresses())) { |
4261 | delete(ev); | 4262 | delete(ev); |
4262 | } | 4263 | } |
4263 | } | 4264 | } |
4264 | } | 4265 | } |
4265 | } | 4266 | } |
4266 | delete publishdlg; | 4267 | delete publishdlg; |
4267 | } | 4268 | } |
4268 | 4269 | ||
4269 | void CalendarView::schedule_request(Incidence *incidence) | 4270 | void CalendarView::schedule_request(Incidence *incidence) |
4270 | { | 4271 | { |
4271 | schedule(Scheduler::Request,incidence); | 4272 | schedule(Scheduler::Request,incidence); |
4272 | } | 4273 | } |
4273 | 4274 | ||
4274 | void CalendarView::schedule_refresh(Incidence *incidence) | 4275 | void CalendarView::schedule_refresh(Incidence *incidence) |
4275 | { | 4276 | { |
4276 | schedule(Scheduler::Refresh,incidence); | 4277 | schedule(Scheduler::Refresh,incidence); |
4277 | } | 4278 | } |
4278 | 4279 | ||
4279 | void CalendarView::schedule_cancel(Incidence *incidence) | 4280 | void CalendarView::schedule_cancel(Incidence *incidence) |
4280 | { | 4281 | { |
4281 | schedule(Scheduler::Cancel,incidence); | 4282 | schedule(Scheduler::Cancel,incidence); |
4282 | } | 4283 | } |
4283 | 4284 | ||
4284 | void CalendarView::schedule_add(Incidence *incidence) | 4285 | void CalendarView::schedule_add(Incidence *incidence) |
4285 | { | 4286 | { |
4286 | schedule(Scheduler::Add,incidence); | 4287 | schedule(Scheduler::Add,incidence); |
4287 | } | 4288 | } |
4288 | 4289 | ||
4289 | void CalendarView::schedule_reply(Incidence *incidence) | 4290 | void CalendarView::schedule_reply(Incidence *incidence) |
4290 | { | 4291 | { |
4291 | schedule(Scheduler::Reply,incidence); | 4292 | schedule(Scheduler::Reply,incidence); |
4292 | } | 4293 | } |
4293 | 4294 | ||
4294 | void CalendarView::schedule_counter(Incidence *incidence) | 4295 | void CalendarView::schedule_counter(Incidence *incidence) |
4295 | { | 4296 | { |
4296 | schedule(Scheduler::Counter,incidence); | 4297 | schedule(Scheduler::Counter,incidence); |
4297 | } | 4298 | } |
4298 | 4299 | ||
4299 | void CalendarView::schedule_declinecounter(Incidence *incidence) | 4300 | void CalendarView::schedule_declinecounter(Incidence *incidence) |
4300 | { | 4301 | { |
4301 | schedule(Scheduler::Declinecounter,incidence); | 4302 | schedule(Scheduler::Declinecounter,incidence); |
4302 | } | 4303 | } |
4303 | 4304 | ||
4304 | void CalendarView::schedule_publish_freebusy(int daysToPublish) | 4305 | void CalendarView::schedule_publish_freebusy(int daysToPublish) |
4305 | { | 4306 | { |
4306 | QDateTime start = QDateTime::currentDateTime(); | 4307 | QDateTime start = QDateTime::currentDateTime(); |
4307 | QDateTime end = start.addDays(daysToPublish); | 4308 | QDateTime end = start.addDays(daysToPublish); |
4308 | 4309 | ||
4309 | FreeBusy *freebusy = new FreeBusy(mCalendar, start, end); | 4310 | FreeBusy *freebusy = new FreeBusy(mCalendar, start, end); |
4310 | freebusy->setOrganizer(KOPrefs::instance()->email()); | 4311 | freebusy->setOrganizer(KOPrefs::instance()->email()); |
4311 | 4312 | ||
4312 | 4313 | ||
4313 | PublishDialog *publishdlg = new PublishDialog(); | 4314 | PublishDialog *publishdlg = new PublishDialog(); |
4314 | if ( publishdlg->exec() == QDialog::Accepted ) { | 4315 | if ( publishdlg->exec() == QDialog::Accepted ) { |
4315 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); | 4316 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); |
4316 | if (!dlg->addMessage(freebusy,Scheduler::Publish,publishdlg->addresses())) { | 4317 | if (!dlg->addMessage(freebusy,Scheduler::Publish,publishdlg->addresses())) { |
4317 | delete(freebusy); | 4318 | delete(freebusy); |
4318 | } | 4319 | } |
4319 | } | 4320 | } |
4320 | delete publishdlg; | 4321 | delete publishdlg; |
4321 | } | 4322 | } |
4322 | 4323 | ||
4323 | void CalendarView::schedule(Scheduler::Method method, Incidence *incidence) | 4324 | void CalendarView::schedule(Scheduler::Method method, Incidence *incidence) |
4324 | { | 4325 | { |
4325 | Event *event = 0; | 4326 | Event *event = 0; |
4326 | Todo *todo = 0; | 4327 | Todo *todo = 0; |
4327 | 4328 | ||
4328 | if (incidence == 0) { | 4329 | if (incidence == 0) { |
4329 | incidence = mViewManager->currentView()->selectedIncidences().first(); | 4330 | incidence = mViewManager->currentView()->selectedIncidences().first(); |
4330 | if (incidence == 0) { | 4331 | if (incidence == 0) { |
4331 | incidence = mTodoList->selectedIncidences().first(); | 4332 | incidence = mTodoList->selectedIncidences().first(); |
4332 | } | 4333 | } |
4333 | } | 4334 | } |
4334 | if ( incidence && incidence->typeID() == eventID ) { | 4335 | if ( incidence && incidence->typeID() == eventID ) { |
4335 | event = static_cast<Event *>(incidence); | 4336 | event = static_cast<Event *>(incidence); |
4336 | } | 4337 | } |
4337 | if ( incidence && incidence->typeID() == todoID ) { | 4338 | if ( incidence && incidence->typeID() == todoID ) { |
4338 | todo = static_cast<Todo *>(incidence); | 4339 | todo = static_cast<Todo *>(incidence); |
4339 | } | 4340 | } |
4340 | 4341 | ||
4341 | if (!event && !todo) { | 4342 | if (!event && !todo) { |
4342 | KMessageBox::sorry(this,i18n("No event selected.")); | 4343 | KMessageBox::sorry(this,i18n("No event selected.")); |
4343 | return; | 4344 | return; |
4344 | } | 4345 | } |
4345 | 4346 | ||
4346 | if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) { | 4347 | if( incidence->attendeeCount() == 0 && method != Scheduler::Publish ) { |
4347 | KMessageBox::sorry(this,i18n("The event has no attendees.")); | 4348 | KMessageBox::sorry(this,i18n("The event has no attendees.")); |
4348 | return; | 4349 | return; |
4349 | } | 4350 | } |
4350 | 4351 | ||
4351 | Event *ev = 0; | 4352 | Event *ev = 0; |
4352 | if (event) ev = new Event(*event); | 4353 | if (event) ev = new Event(*event); |
4353 | Todo *to = 0; | 4354 | Todo *to = 0; |
4354 | if (todo) to = new Todo(*todo); | 4355 | if (todo) to = new Todo(*todo); |
4355 | 4356 | ||
4356 | if (method == Scheduler::Reply || method == Scheduler::Refresh) { | 4357 | if (method == Scheduler::Reply || method == Scheduler::Refresh) { |
4357 | Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); | 4358 | Attendee *me = incidence->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); |
4358 | if (!me) { | 4359 | if (!me) { |
4359 | KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails.")); | 4360 | KMessageBox::sorry(this,i18n("Could not find your attendee entry.\nPlease check the emails.")); |
4360 | return; | 4361 | return; |
4361 | } | 4362 | } |
4362 | if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) { | 4363 | if (me->status()==Attendee::NeedsAction && me->RSVP() && method==Scheduler::Reply) { |
4363 | StatusDialog *statdlg = new StatusDialog(this); | 4364 | StatusDialog *statdlg = new StatusDialog(this); |
4364 | if (!statdlg->exec()==QDialog::Accepted) return; | 4365 | if (!statdlg->exec()==QDialog::Accepted) return; |
4365 | me->setStatus( statdlg->status() ); | 4366 | me->setStatus( statdlg->status() ); |
4366 | delete(statdlg); | 4367 | delete(statdlg); |
4367 | } | 4368 | } |
4368 | Attendee *menew = new Attendee(*me); | 4369 | Attendee *menew = new Attendee(*me); |
4369 | if (ev) { | 4370 | if (ev) { |
4370 | ev->clearAttendees(); | 4371 | ev->clearAttendees(); |
4371 | ev->addAttendee(menew,false); | 4372 | ev->addAttendee(menew,false); |
4372 | } else { | 4373 | } else { |
4373 | if (to) { | 4374 | if (to) { |
4374 | todo->clearAttendees(); | 4375 | todo->clearAttendees(); |
4375 | todo->addAttendee(menew,false); | 4376 | todo->addAttendee(menew,false); |
4376 | } | 4377 | } |
4377 | } | 4378 | } |
4378 | } | 4379 | } |
4379 | 4380 | ||
4380 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); | 4381 | OutgoingDialog *dlg = mDialogManager->outgoingDialog(); |
4381 | if (ev) { | 4382 | if (ev) { |
4382 | if ( !dlg->addMessage(ev,method) ) delete(ev); | 4383 | if ( !dlg->addMessage(ev,method) ) delete(ev); |
4383 | } else { | 4384 | } else { |
4384 | if (to) { | 4385 | if (to) { |
4385 | if ( !dlg->addMessage(to,method) ) delete(to); | 4386 | if ( !dlg->addMessage(to,method) ) delete(to); |
4386 | } | 4387 | } |
4387 | } | 4388 | } |
4388 | } | 4389 | } |
4389 | 4390 | ||
4390 | void CalendarView::openAddressbook() | 4391 | void CalendarView::openAddressbook() |
4391 | { | 4392 | { |
4392 | KRun::runCommand("kaddressbook"); | 4393 | KRun::runCommand("kaddressbook"); |
4393 | } | 4394 | } |
4394 | 4395 | ||
4395 | void CalendarView::setModified(bool modified) | 4396 | void CalendarView::setModified(bool modified) |
4396 | { | 4397 | { |
4397 | //qDebug("CalendarView::setModified %d ", modified); | 4398 | //qDebug("CalendarView::setModified %d ", modified); |
4398 | if ( modified ) | 4399 | if ( modified ) |
4399 | emit signalmodified(); | 4400 | emit signalmodified(); |
4400 | mModified = modified; | 4401 | mModified = modified; |
4401 | if ( mModified ) | 4402 | if ( mModified ) |
4402 | emit modifiedChanged(mModified); | 4403 | emit modifiedChanged(mModified); |
4403 | 4404 | ||
4404 | } | 4405 | } |
4405 | 4406 | ||
4406 | bool CalendarView::isReadOnly() | 4407 | bool CalendarView::isReadOnly() |
4407 | { | 4408 | { |
4408 | return mReadOnly; | 4409 | return mReadOnly; |
4409 | } | 4410 | } |
4410 | 4411 | ||
4411 | void CalendarView::setReadOnly(bool readOnly) | 4412 | void CalendarView::setReadOnly(bool readOnly) |
4412 | { | 4413 | { |
4413 | if (mReadOnly != readOnly) { | 4414 | if (mReadOnly != readOnly) { |
4414 | mReadOnly = readOnly; | 4415 | mReadOnly = readOnly; |
4415 | emit readOnlyChanged(mReadOnly); | 4416 | emit readOnlyChanged(mReadOnly); |
4416 | } | 4417 | } |
4417 | } | 4418 | } |
4418 | 4419 | ||
4419 | bool CalendarView::isModified() | 4420 | bool CalendarView::isModified() |
4420 | { | 4421 | { |
4421 | return mModified; | 4422 | return mModified; |
4422 | } | 4423 | } |
4423 | void CalendarView::slotprintSelInc() | 4424 | void CalendarView::slotprintSelInc() |
4424 | { | 4425 | { |
4425 | if ( currentSelection() == 0 ) { | 4426 | if ( currentSelection() == 0 ) { |
4426 | KMessageBox::sorry(this,i18n("There is nothing selected!")); | 4427 | KMessageBox::sorry(this,i18n("There is nothing selected!")); |
4427 | return; | 4428 | return; |
4428 | } | 4429 | } |
4429 | showIncidence(); | 4430 | showIncidence(); |
4430 | getEventViewerDialog()->print(); | 4431 | getEventViewerDialog()->print(); |
4431 | 4432 | ||
4432 | } | 4433 | } |
4433 | void CalendarView::printSetup() | 4434 | void CalendarView::printSetup() |
4434 | { | 4435 | { |
4435 | #ifndef KORG_NOPRINTER | 4436 | #ifndef KORG_NOPRINTER |
4436 | createPrinter(); | 4437 | createPrinter(); |
4437 | 4438 | ||
4438 | mCalPrinter->setupPrinter(); | 4439 | mCalPrinter->setupPrinter(); |
4439 | #endif | 4440 | #endif |
4440 | } | 4441 | } |
4441 | 4442 | ||
4442 | void CalendarView::print() | 4443 | void CalendarView::print() |
4443 | { | 4444 | { |
4444 | #ifndef KORG_NOPRINTER | 4445 | #ifndef KORG_NOPRINTER |
4445 | createPrinter(); | 4446 | createPrinter(); |
4446 | 4447 | ||
4447 | DateList tmpDateList = mNavigator->selectedDates(); | 4448 | DateList tmpDateList = mNavigator->selectedDates(); |
4448 | mCalPrinter->print(CalPrinter::Month, | 4449 | mCalPrinter->print(CalPrinter::Month, |
4449 | tmpDateList.first(), tmpDateList.last()); | 4450 | tmpDateList.first(), tmpDateList.last()); |
4450 | #endif | 4451 | #endif |
4451 | } | 4452 | } |
4452 | 4453 | ||
4453 | void CalendarView::printPreview() | 4454 | void CalendarView::printPreview() |
4454 | { | 4455 | { |
4455 | #ifndef KORG_NOPRINTER | 4456 | #ifndef KORG_NOPRINTER |
4456 | kdDebug() << "CalendarView::printPreview()" << endl; | 4457 | kdDebug() << "CalendarView::printPreview()" << endl; |
4457 | 4458 | ||
4458 | createPrinter(); | 4459 | createPrinter(); |
4459 | 4460 | ||
4460 | DateList tmpDateList = mNavigator->selectedDates(); | 4461 | DateList tmpDateList = mNavigator->selectedDates(); |
4461 | 4462 | ||
4462 | mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(), | 4463 | mViewManager->currentView()->printPreview(mCalPrinter,tmpDateList.first(), |
4463 | tmpDateList.last()); | 4464 | tmpDateList.last()); |
4464 | #endif | 4465 | #endif |
4465 | } | 4466 | } |
4466 | 4467 | bool CalendarView::exportICalendar( QString filename ) | |
4467 | void CalendarView::exportICalendar() | ||
4468 | { | 4468 | { |
4469 | QString filename = KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); | ||
4470 | |||
4471 | // Force correct extension | 4469 | // Force correct extension |
4472 | if (filename.right(4) != ".ics") filename += ".ics"; | 4470 | if (filename.right(4) != ".ics") filename += ".ics"; |
4473 | 4471 | ||
4474 | FileStorage storage( mCalendar, filename, new ICalFormat() ); | 4472 | FileStorage storage( mCalendar, filename, new ICalFormat() ); |
4475 | storage.save(); | 4473 | return storage.save(); |
4474 | } | ||
4475 | |||
4476 | bool CalendarView::exportICalendar() | ||
4477 | { | ||
4478 | return exportICalendar( KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this) ); | ||
4476 | } | 4479 | } |
4477 | 4480 | ||
4478 | bool CalendarView::exportVCalendar( QString filename ) | 4481 | bool CalendarView::exportVCalendar( QString filename ) |
4479 | { | 4482 | { |
4480 | if (mCalendar->journals().count() > 0) { | 4483 | if (mCalendar->journals().count() > 0) { |
4481 | int result = KMessageBox::warningContinueCancel(this, | 4484 | int result = KMessageBox::warningContinueCancel(this, |
4482 | i18n("The journal entries can not be\nexported to a vCalendar file."), | 4485 | i18n("The journal entries can not be\nexported to a vCalendar file."), |
4483 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), | 4486 | i18n("Data Loss Warning"),i18n("Proceed"),i18n("Cancel"), |
4484 | true); | 4487 | true); |
4485 | if (result != KMessageBox::Continue) return false; | 4488 | if (result != KMessageBox::Continue) return false; |
4486 | } | 4489 | } |
4487 | 4490 | ||
4488 | //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this); | 4491 | //QString filename = KFileDialog::getSaveFileName("vcalout.vcs",i18n("*.vcs|VCalendars"),this); |
4489 | 4492 | ||
4490 | // Force correct extension | 4493 | // Force correct extension |
4491 | if (filename.right(4) != ".vcs") filename += ".vcs"; | 4494 | if (filename.right(4) != ".vcs") filename += ".vcs"; |
4492 | 4495 | ||
4493 | FileStorage storage( mCalendar, filename, new VCalFormat ); | 4496 | FileStorage storage( mCalendar, filename, new VCalFormat ); |
4494 | return storage.save(); | 4497 | return storage.save(); |
4495 | 4498 | ||
4496 | } | 4499 | } |
4497 | 4500 | ||
4498 | void CalendarView::eventUpdated(Incidence *) | 4501 | void CalendarView::eventUpdated(Incidence *) |
4499 | { | 4502 | { |
4500 | setModified(); | 4503 | setModified(); |
4501 | // Don't call updateView here. The code, which has caused the update of the | 4504 | // Don't call updateView here. The code, which has caused the update of the |
4502 | // event is responsible for updating the view. | 4505 | // event is responsible for updating the view. |
4503 | // updateView(); | 4506 | // updateView(); |
4504 | } | 4507 | } |
4505 | 4508 | ||
4506 | void CalendarView::adaptNavigationUnits() | 4509 | void CalendarView::adaptNavigationUnits() |
4507 | { | 4510 | { |
4508 | if (mViewManager->currentView()->isEventView()) { | 4511 | if (mViewManager->currentView()->isEventView()) { |
4509 | int days = mViewManager->currentView()->currentDateCount(); | 4512 | int days = mViewManager->currentView()->currentDateCount(); |
4510 | if (days == 1) { | 4513 | if (days == 1) { |
4511 | emit changeNavStringPrev(i18n("&Previous Day")); | 4514 | emit changeNavStringPrev(i18n("&Previous Day")); |
4512 | emit changeNavStringNext(i18n("&Next Day")); | 4515 | emit changeNavStringNext(i18n("&Next Day")); |
4513 | } else { | 4516 | } else { |
4514 | emit changeNavStringPrev(i18n("&Previous Week")); | 4517 | emit changeNavStringPrev(i18n("&Previous Week")); |
4515 | emit changeNavStringNext(i18n("&Next Week")); | 4518 | emit changeNavStringNext(i18n("&Next Week")); |
4516 | } | 4519 | } |
4517 | } | 4520 | } |
4518 | } | 4521 | } |
4519 | 4522 | ||
4520 | void CalendarView::processMainViewSelection( Incidence *incidence ) | 4523 | void CalendarView::processMainViewSelection( Incidence *incidence ) |
4521 | { | 4524 | { |
4522 | if ( incidence ) mTodoList->clearSelection(); | 4525 | if ( incidence ) mTodoList->clearSelection(); |
4523 | processIncidenceSelection( incidence ); | 4526 | processIncidenceSelection( incidence ); |
4524 | } | 4527 | } |
4525 | 4528 | ||
4526 | void CalendarView::processTodoListSelection( Incidence *incidence ) | 4529 | void CalendarView::processTodoListSelection( Incidence *incidence ) |
4527 | { | 4530 | { |
4528 | if ( incidence && mViewManager->currentView() ) { | 4531 | if ( incidence && mViewManager->currentView() ) { |
4529 | mViewManager->currentView()->clearSelection(); | 4532 | mViewManager->currentView()->clearSelection(); |
4530 | } | 4533 | } |
4531 | processIncidenceSelection( incidence ); | 4534 | processIncidenceSelection( incidence ); |
4532 | } | 4535 | } |
4533 | 4536 | ||
4534 | void CalendarView::processIncidenceSelection( Incidence *incidence ) | 4537 | void CalendarView::processIncidenceSelection( Incidence *incidence ) |
4535 | { | 4538 | { |
4536 | emit incidenceSelected( incidence ); | 4539 | emit incidenceSelected( incidence ); |
4537 | if ( incidence == mSelectedIncidence ) return; | 4540 | if ( incidence == mSelectedIncidence ) return; |
4538 | mSelectedIncidence = incidence; | 4541 | mSelectedIncidence = incidence; |
4539 | 4542 | ||
4540 | if ( incidence && incidence->typeID() == eventID ) { | 4543 | if ( incidence && incidence->typeID() == eventID ) { |
4541 | Event *event = static_cast<Event *>( incidence ); | 4544 | Event *event = static_cast<Event *>( incidence ); |
4542 | if ( event->organizer() == KOPrefs::instance()->email() ) { | 4545 | if ( event->organizer() == KOPrefs::instance()->email() ) { |
4543 | emit organizerEventsSelected( true ); | 4546 | emit organizerEventsSelected( true ); |
4544 | } else { | 4547 | } else { |
4545 | emit organizerEventsSelected(false); | 4548 | emit organizerEventsSelected(false); |
4546 | } | 4549 | } |
4547 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, | 4550 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, |
4548 | KOPrefs::instance()->email() ) ) { | 4551 | KOPrefs::instance()->email() ) ) { |
4549 | emit groupEventsSelected( true ); | 4552 | emit groupEventsSelected( true ); |
4550 | } else { | 4553 | } else { |
4551 | emit groupEventsSelected(false); | 4554 | emit groupEventsSelected(false); |
4552 | } | 4555 | } |
4553 | return; | 4556 | return; |
4554 | } else { | 4557 | } else { |
4555 | if ( incidence && incidence->typeID() == todoID ) { | 4558 | if ( incidence && incidence->typeID() == todoID ) { |
4556 | emit todoSelected( true ); | 4559 | emit todoSelected( true ); |
4557 | Todo *event = static_cast<Todo *>( incidence ); | 4560 | Todo *event = static_cast<Todo *>( incidence ); |
4558 | if ( event->organizer() == KOPrefs::instance()->email() ) { | 4561 | if ( event->organizer() == KOPrefs::instance()->email() ) { |
4559 | emit organizerEventsSelected( true ); | 4562 | emit organizerEventsSelected( true ); |
4560 | } else { | 4563 | } else { |
4561 | emit organizerEventsSelected(false); | 4564 | emit organizerEventsSelected(false); |
4562 | } | 4565 | } |
4563 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, | 4566 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, |
4564 | KOPrefs::instance()->email() ) ) { | 4567 | KOPrefs::instance()->email() ) ) { |
4565 | emit groupEventsSelected( true ); | 4568 | emit groupEventsSelected( true ); |
4566 | } else { | 4569 | } else { |
4567 | emit groupEventsSelected(false); | 4570 | emit groupEventsSelected(false); |
4568 | } | 4571 | } |
4569 | return; | 4572 | return; |
4570 | } else { | 4573 | } else { |
4571 | emit todoSelected( false ); | 4574 | emit todoSelected( false ); |
4572 | emit organizerEventsSelected(false); | 4575 | emit organizerEventsSelected(false); |
4573 | emit groupEventsSelected(false); | 4576 | emit groupEventsSelected(false); |
4574 | } | 4577 | } |
4575 | return; | 4578 | return; |
4576 | } | 4579 | } |
4577 | 4580 | ||
4578 | /* if ( incidence && incidence->typeID() == todoID ) { | 4581 | /* if ( incidence && incidence->typeID() == todoID ) { |
4579 | emit todoSelected( true ); | 4582 | emit todoSelected( true ); |
4580 | } else { | 4583 | } else { |
4581 | emit todoSelected( false ); | 4584 | emit todoSelected( false ); |
4582 | }*/ | 4585 | }*/ |
4583 | } | 4586 | } |
4584 | 4587 | ||
4585 | 4588 | ||
4586 | void CalendarView::checkClipboard() | 4589 | void CalendarView::checkClipboard() |
4587 | { | 4590 | { |
4588 | #ifndef KORG_NODND | 4591 | #ifndef KORG_NODND |
4589 | if (ICalDrag::canDecode(QApplication::clipboard()->data())) { | 4592 | if (ICalDrag::canDecode(QApplication::clipboard()->data())) { |
4590 | emit pasteEnabled(true); | 4593 | emit pasteEnabled(true); |
4591 | } else { | 4594 | } else { |
4592 | emit pasteEnabled(false); | 4595 | emit pasteEnabled(false); |
4593 | } | 4596 | } |
4594 | #endif | 4597 | #endif |
4595 | } | 4598 | } |
4596 | 4599 | ||
4597 | void CalendarView::showDates(const DateList &selectedDates) | 4600 | void CalendarView::showDates(const DateList &selectedDates) |
4598 | { | 4601 | { |
4599 | // kdDebug() << "CalendarView::selectDates()" << endl; | 4602 | // kdDebug() << "CalendarView::selectDates()" << endl; |
4600 | 4603 | ||
4601 | 4604 | ||
4602 | if ( !mBlockShowDates ) { | 4605 | if ( !mBlockShowDates ) { |
4603 | if ( mViewManager->currentView() ) { | 4606 | if ( mViewManager->currentView() ) { |
4604 | updateView( selectedDates.first(), selectedDates.last() ); | 4607 | updateView( selectedDates.first(), selectedDates.last() ); |
4605 | } else { | 4608 | } else { |
4606 | mViewManager->showAgendaView(); | 4609 | mViewManager->showAgendaView(); |
4607 | } | 4610 | } |
4608 | } | 4611 | } |
4609 | 4612 | ||
4610 | QDate date = selectedDates.first(); | 4613 | QDate date = selectedDates.first(); |
4611 | if ( ! date.isValid() ) { | 4614 | if ( ! date.isValid() ) { |
4612 | topLevelWidget()->setCaption(""); | 4615 | topLevelWidget()->setCaption(""); |
4613 | return; | 4616 | return; |
4614 | } | 4617 | } |
4615 | 4618 | ||
4616 | QString selDates; | 4619 | QString selDates; |
4617 | selDates = KGlobal::locale()->formatDate( date, true); | 4620 | selDates = KGlobal::locale()->formatDate( date, true); |
4618 | if (selectedDates.first() < selectedDates.last() ) | 4621 | if (selectedDates.first() < selectedDates.last() ) |
4619 | selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); | 4622 | selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); |
4620 | else { | 4623 | else { |
4621 | QString addString; | 4624 | QString addString; |
4622 | if ( date == QDateTime::currentDateTime().date() ) | 4625 | if ( date == QDateTime::currentDateTime().date() ) |
4623 | addString = i18n("Today"); | 4626 | addString = i18n("Today"); |
4624 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) | 4627 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) |
4625 | addString = i18n("Tomorrow"); | 4628 | addString = i18n("Tomorrow"); |
4626 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) | 4629 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) |
4627 | addString = i18n("Yesterday"); | 4630 | addString = i18n("Yesterday"); |
4628 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) | 4631 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) |
4629 | addString = i18n("Day before yesterday"); | 4632 | addString = i18n("Day before yesterday"); |
4630 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) | 4633 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) |
4631 | addString = i18n("Day after tomorrow"); | 4634 | addString = i18n("Day after tomorrow"); |
4632 | if ( !addString.isEmpty() ) { | 4635 | if ( !addString.isEmpty() ) { |
4633 | topLevelWidget()->setCaption( addString+", " + selDates ); | 4636 | topLevelWidget()->setCaption( addString+", " + selDates ); |
4634 | return; | 4637 | return; |
4635 | } | 4638 | } |
4636 | } | 4639 | } |
4637 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); | 4640 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); |
4638 | 4641 | ||
4639 | } | 4642 | } |
4640 | 4643 | ||
4641 | QPtrList<CalFilter> CalendarView::filters() | 4644 | QPtrList<CalFilter> CalendarView::filters() |
4642 | { | 4645 | { |
4643 | return mFilters; | 4646 | return mFilters; |
4644 | 4647 | ||
4645 | } | 4648 | } |
4646 | void CalendarView::editFilters() | 4649 | void CalendarView::editFilters() |
4647 | { | 4650 | { |
4648 | // kdDebug() << "CalendarView::editFilters()" << endl; | 4651 | // kdDebug() << "CalendarView::editFilters()" << endl; |
4649 | 4652 | ||
4650 | CalFilter *filter = mFilters.first(); | 4653 | CalFilter *filter = mFilters.first(); |
4651 | while(filter) { | 4654 | while(filter) { |
4652 | filter = mFilters.next(); | 4655 | filter = mFilters.next(); |
4653 | } | 4656 | } |
4654 | 4657 | ||
4655 | mDialogManager->showFilterEditDialog(&mFilters); | 4658 | mDialogManager->showFilterEditDialog(&mFilters); |
4656 | updateFilter(); | 4659 | updateFilter(); |
4657 | } | 4660 | } |
4658 | void CalendarView::toggleFilter() | 4661 | void CalendarView::toggleFilter() |
4659 | { | 4662 | { |
4660 | if ( mLeftFrame->isHidden() ) { | 4663 | if ( mLeftFrame->isHidden() ) { |
4661 | toggleExpand(); | 4664 | toggleExpand(); |
4662 | showFilter( true ); | 4665 | showFilter( true ); |
4663 | } else | 4666 | } else |
4664 | showFilter(! mCalEditView->isVisible()); | 4667 | showFilter(! mCalEditView->isVisible()); |
4665 | } | 4668 | } |
4666 | 4669 | ||
4667 | KOFilterView *CalendarView::filterView() | 4670 | KOFilterView *CalendarView::filterView() |
4668 | { | 4671 | { |
4669 | return mFilterView; | 4672 | return mFilterView; |
4670 | } | 4673 | } |
4671 | void CalendarView::selectFilter( int fil ) | 4674 | void CalendarView::selectFilter( int fil ) |
4672 | { | 4675 | { |
4673 | mFilterView->setSelectedFilter( fil ); | 4676 | mFilterView->setSelectedFilter( fil ); |
4674 | updateUnmanagedViews(); | 4677 | updateUnmanagedViews(); |
4675 | } | 4678 | } |
4676 | void CalendarView::showFilter(bool visible) | 4679 | void CalendarView::showFilter(bool visible) |
4677 | { | 4680 | { |
4678 | #if 1 | 4681 | #if 1 |
4679 | if (visible) { | 4682 | if (visible) { |
4680 | mCalEditView->readConfig(); | 4683 | mCalEditView->readConfig(); |
4681 | mCalEditView->show(); | 4684 | mCalEditView->show(); |
4682 | QValueList<int> sizes; | 4685 | QValueList<int> sizes; |
4683 | sizes = mLeftFrame->sizes(); | 4686 | sizes = mLeftFrame->sizes(); |
4684 | if ( sizes.count() == 4 && sizes[3] < 20 ) { | 4687 | if ( sizes.count() == 4 && sizes[3] < 20 ) { |
4685 | sizes.clear(); | 4688 | sizes.clear(); |
4686 | sizes << 100; | 4689 | sizes << 100; |
4687 | sizes << 0; | 4690 | sizes << 0; |
4688 | sizes << 0; | 4691 | sizes << 0; |
4689 | sizes << 100; | 4692 | sizes << 100; |
4690 | mLeftFrame->setSizes(sizes); | 4693 | mLeftFrame->setSizes(sizes); |
4691 | } | 4694 | } |
4692 | #if 0 | 4695 | #if 0 |
4693 | sizes = mLeftFrame->sizes(); | 4696 | sizes = mLeftFrame->sizes(); |
4694 | int ccc = 0; | 4697 | int ccc = 0; |
4695 | while ( ccc < sizes.count()) { | 4698 | while ( ccc < sizes.count()) { |
4696 | qDebug("size %d %d ", ccc, sizes[ccc]); | 4699 | qDebug("size %d %d ", ccc, sizes[ccc]); |
4697 | ++ccc; | 4700 | ++ccc; |
4698 | } | 4701 | } |
4699 | #endif | 4702 | #endif |
4700 | 4703 | ||
4701 | } | 4704 | } |
4702 | else { | 4705 | else { |
4703 | mCalEditView->hide(); | 4706 | mCalEditView->hide(); |
4704 | } | 4707 | } |
4705 | #else | 4708 | #else |
4706 | if (visible) mFilterView->show(); | 4709 | if (visible) mFilterView->show(); |
4707 | else mFilterView->hide(); | 4710 | else mFilterView->hide(); |
4708 | #endif | 4711 | #endif |
4709 | } | 4712 | } |
4710 | void CalendarView::toggleFilerEnabled( ) | 4713 | void CalendarView::toggleFilerEnabled( ) |
4711 | { | 4714 | { |
4712 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); | 4715 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); |
4713 | if ( !mFilterView->filtersEnabled() ) | 4716 | if ( !mFilterView->filtersEnabled() ) |
4714 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); | 4717 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); |
4715 | updateUnmanagedViews(); | 4718 | updateUnmanagedViews(); |
4716 | 4719 | ||
4717 | } | 4720 | } |
4718 | void CalendarView::updateFilter() | 4721 | void CalendarView::updateFilter() |
4719 | { | 4722 | { |
4720 | CalFilter *filter = mFilterView->selectedFilter(); | 4723 | CalFilter *filter = mFilterView->selectedFilter(); |
4721 | if (filter) { | 4724 | if (filter) { |
4722 | QString mess; | 4725 | QString mess; |
4723 | if (mFilterView->filtersEnabled()) { | 4726 | if (mFilterView->filtersEnabled()) { |
4724 | mess = i18n("Filter selected: ")+filter->name(); | 4727 | mess = i18n("Filter selected: ")+filter->name(); |
4725 | filter->setEnabled(true); | 4728 | filter->setEnabled(true); |
4726 | } | 4729 | } |
4727 | else filter->setEnabled(false); | 4730 | else filter->setEnabled(false); |
4728 | mCalendar->setFilter(filter); | 4731 | mCalendar->setFilter(filter); |
4729 | updateView(); | 4732 | updateView(); |
4730 | if ( !mess.isEmpty() ) | 4733 | if ( !mess.isEmpty() ) |
4731 | topLevelWidget()->setCaption( mess ); | 4734 | topLevelWidget()->setCaption( mess ); |
4732 | 4735 | ||
4733 | } | 4736 | } |
4734 | emit filtersUpdated(); | 4737 | emit filtersUpdated(); |
4735 | } | 4738 | } |
4736 | 4739 | ||
4737 | void CalendarView::filterEdited() | 4740 | void CalendarView::filterEdited() |
4738 | { | 4741 | { |
4739 | mFilterView->updateFilters(); | 4742 | mFilterView->updateFilters(); |
4740 | updateFilter(); | 4743 | updateFilter(); |
4741 | writeSettings(); | 4744 | writeSettings(); |
4742 | } | 4745 | } |
4743 | 4746 | ||
4744 | 4747 | ||
4745 | void CalendarView::takeOverEvent() | 4748 | void CalendarView::takeOverEvent() |
4746 | { | 4749 | { |
4747 | Incidence *incidence = currentSelection(); | 4750 | Incidence *incidence = currentSelection(); |
4748 | 4751 | ||
4749 | if (!incidence) return; | 4752 | if (!incidence) return; |
4750 | 4753 | ||
4751 | incidence->setOrganizer(KOPrefs::instance()->email()); | 4754 | incidence->setOrganizer(KOPrefs::instance()->email()); |
4752 | incidence->recreate(); | 4755 | incidence->recreate(); |
4753 | incidence->setReadOnly(false); | 4756 | incidence->setReadOnly(false); |
4754 | 4757 | ||
4755 | updateView(); | 4758 | updateView(); |
4756 | } | 4759 | } |
4757 | 4760 | ||
4758 | void CalendarView::takeOverCalendar() | 4761 | void CalendarView::takeOverCalendar() |
4759 | { | 4762 | { |
4760 | // TODO: Create Calendar::allIncidences() function and use it here | 4763 | // TODO: Create Calendar::allIncidences() function and use it here |
4761 | 4764 | ||
4762 | clearAllViews(); | 4765 | clearAllViews(); |
4763 | QPtrList<Event> events = mCalendar->events(); | 4766 | QPtrList<Event> events = mCalendar->events(); |
4764 | for(uint i=0; i<events.count(); ++i) { | 4767 | for(uint i=0; i<events.count(); ++i) { |
4765 | events.at(i)->setOrganizer(KOPrefs::instance()->email()); | 4768 | events.at(i)->setOrganizer(KOPrefs::instance()->email()); |
4766 | events.at(i)->recreate(); | 4769 | events.at(i)->recreate(); |
4767 | events.at(i)->setReadOnly(false); | 4770 | events.at(i)->setReadOnly(false); |
4768 | } | 4771 | } |
4769 | 4772 | ||
4770 | QPtrList<Todo> todos = mCalendar->todos(); | 4773 | QPtrList<Todo> todos = mCalendar->todos(); |
4771 | for(uint i=0; i<todos.count(); ++i) { | 4774 | for(uint i=0; i<todos.count(); ++i) { |
4772 | todos.at(i)->setOrganizer(KOPrefs::instance()->email()); | 4775 | todos.at(i)->setOrganizer(KOPrefs::instance()->email()); |
4773 | todos.at(i)->recreate(); | 4776 | todos.at(i)->recreate(); |
4774 | todos.at(i)->setReadOnly(false); | 4777 | todos.at(i)->setReadOnly(false); |
4775 | } | 4778 | } |
4776 | 4779 | ||
4777 | QPtrList<Journal> journals = mCalendar->journals(); | 4780 | QPtrList<Journal> journals = mCalendar->journals(); |
4778 | for(uint i=0; i<journals.count(); ++i) { | 4781 | for(uint i=0; i<journals.count(); ++i) { |
4779 | journals.at(i)->setOrganizer(KOPrefs::instance()->email()); | 4782 | journals.at(i)->setOrganizer(KOPrefs::instance()->email()); |
4780 | journals.at(i)->recreate(); | 4783 | journals.at(i)->recreate(); |
4781 | journals.at(i)->setReadOnly(false); | 4784 | journals.at(i)->setReadOnly(false); |
4782 | } | 4785 | } |
4783 | 4786 | ||
4784 | updateView(); | 4787 | updateView(); |
4785 | } | 4788 | } |
4786 | 4789 | ||
4787 | void CalendarView::showIntro() | 4790 | void CalendarView::showIntro() |
4788 | { | 4791 | { |
4789 | kdDebug() << "To be implemented." << endl; | 4792 | kdDebug() << "To be implemented." << endl; |
4790 | } | 4793 | } |
4791 | 4794 | ||
4792 | QWidgetStack *CalendarView::viewStack() | 4795 | QWidgetStack *CalendarView::viewStack() |
4793 | { | 4796 | { |
4794 | return mRightFrame; | 4797 | return mRightFrame; |
4795 | } | 4798 | } |
4796 | 4799 | ||
4797 | QWidget *CalendarView::leftFrame() | 4800 | QWidget *CalendarView::leftFrame() |
4798 | { | 4801 | { |
4799 | return ( QWidget *)mLeftFrame; | 4802 | return ( QWidget *)mLeftFrame; |
4800 | } | 4803 | } |
4801 | 4804 | ||
4802 | DateNavigator *CalendarView::dateNavigator() | 4805 | DateNavigator *CalendarView::dateNavigator() |
4803 | { | 4806 | { |
4804 | return mNavigator; | 4807 | return mNavigator; |
4805 | } | 4808 | } |
4806 | 4809 | ||
4807 | KDateNavigator* CalendarView::dateNavigatorWidget() | 4810 | KDateNavigator* CalendarView::dateNavigatorWidget() |
4808 | { | 4811 | { |
4809 | return mDateNavigator->navigatorView(); | 4812 | return mDateNavigator->navigatorView(); |
4810 | } | 4813 | } |
4811 | void CalendarView::toggleDateNavigatorWidget() | 4814 | void CalendarView::toggleDateNavigatorWidget() |
4812 | { | 4815 | { |
4813 | KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; | 4816 | KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; |
4814 | 4817 | ||
4815 | if (!KOPrefs::instance()->mShowDateNavigator ) | 4818 | if (!KOPrefs::instance()->mShowDateNavigator ) |
4816 | mDateNavigator->hide(); | 4819 | mDateNavigator->hide(); |
4817 | else | 4820 | else |
4818 | mDateNavigator->show(); | 4821 | mDateNavigator->show(); |
4819 | } | 4822 | } |
4820 | void CalendarView::addView(KOrg::BaseView *view) | 4823 | void CalendarView::addView(KOrg::BaseView *view) |
4821 | { | 4824 | { |
4822 | mViewManager->addView(view); | 4825 | mViewManager->addView(view); |
4823 | } | 4826 | } |
4824 | 4827 | ||
4825 | void CalendarView::showView(KOrg::BaseView *view) | 4828 | void CalendarView::showView(KOrg::BaseView *view) |
4826 | { | 4829 | { |
4827 | mViewManager->showView(view, mLeftFrame->isVisible()); | 4830 | mViewManager->showView(view, mLeftFrame->isVisible()); |
4828 | } | 4831 | } |
4829 | 4832 | ||
4830 | Incidence *CalendarView::currentSelection() | 4833 | Incidence *CalendarView::currentSelection() |
4831 | { | 4834 | { |
4832 | return mViewManager->currentSelection(); | 4835 | return mViewManager->currentSelection(); |
4833 | } | 4836 | } |
4834 | void CalendarView::toggleAllDaySize() | 4837 | void CalendarView::toggleAllDaySize() |
4835 | { | 4838 | { |
4836 | /* | 4839 | /* |
4837 | if ( KOPrefs::instance()->mAllDaySize > 47 ) | 4840 | if ( KOPrefs::instance()->mAllDaySize > 47 ) |
4838 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2; | 4841 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2; |
4839 | else | 4842 | else |
4840 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2; | 4843 | KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2; |
4841 | */ | 4844 | */ |
4842 | viewManager()->agendaView()->toggleAllDay(); | 4845 | viewManager()->agendaView()->toggleAllDay(); |
4843 | } | 4846 | } |
4844 | void CalendarView::toggleExpand() | 4847 | void CalendarView::toggleExpand() |
4845 | { | 4848 | { |
4846 | // if ( mLeftFrame->isHidden() ) { | 4849 | // if ( mLeftFrame->isHidden() ) { |
4847 | // mLeftFrame->show(); | 4850 | // mLeftFrame->show(); |
4848 | // emit calendarViewExpanded( false ); | 4851 | // emit calendarViewExpanded( false ); |
4849 | // } else { | 4852 | // } else { |
4850 | // mLeftFrame->hide(); | 4853 | // mLeftFrame->hide(); |
4851 | // emit calendarViewExpanded( true ); | 4854 | // emit calendarViewExpanded( true ); |
4852 | // } | 4855 | // } |
4853 | //qDebug(" CalendarView::toggleExpand()"); | 4856 | //qDebug(" CalendarView::toggleExpand()"); |
4854 | globalFlagBlockAgenda = 1; | 4857 | globalFlagBlockAgenda = 1; |
4855 | emit calendarViewExpanded( !mLeftFrame->isHidden() ); | 4858 | emit calendarViewExpanded( !mLeftFrame->isHidden() ); |
4856 | globalFlagBlockAgenda = 5; | 4859 | globalFlagBlockAgenda = 5; |
4857 | mViewManager->raiseCurrentView( !mLeftFrame->isHidden() ); | 4860 | mViewManager->raiseCurrentView( !mLeftFrame->isHidden() ); |
4858 | //mViewManager->showView( 0, true ); | 4861 | //mViewManager->showView( 0, true ); |
4859 | } | 4862 | } |
4860 | 4863 | ||
4861 | void CalendarView::calendarModified( bool modified, Calendar * ) | 4864 | void CalendarView::calendarModified( bool modified, Calendar * ) |
4862 | { | 4865 | { |
4863 | setModified( modified ); | 4866 | setModified( modified ); |
4864 | } | 4867 | } |
4865 | 4868 | ||
4866 | Todo *CalendarView::selectedTodo() | 4869 | Todo *CalendarView::selectedTodo() |
4867 | { | 4870 | { |
4868 | Incidence *incidence = currentSelection(); | 4871 | Incidence *incidence = currentSelection(); |
4869 | if ( incidence && incidence->typeID() == todoID ) { | 4872 | if ( incidence && incidence->typeID() == todoID ) { |
4870 | return static_cast<Todo *>( incidence ); | 4873 | return static_cast<Todo *>( incidence ); |
4871 | } | 4874 | } |
4872 | 4875 | ||
4873 | incidence = mTodoList->selectedIncidences().first(); | 4876 | incidence = mTodoList->selectedIncidences().first(); |
4874 | if ( incidence && incidence->typeID() == todoID ) { | 4877 | if ( incidence && incidence->typeID() == todoID ) { |
4875 | return static_cast<Todo *>( incidence ); | 4878 | return static_cast<Todo *>( incidence ); |
4876 | } | 4879 | } |
4877 | 4880 | ||
4878 | return 0; | 4881 | return 0; |
4879 | } | 4882 | } |
4880 | 4883 | ||
4881 | void CalendarView::showIncidence() | 4884 | void CalendarView::showIncidence() |
4882 | { | 4885 | { |
4883 | mViewerCallerIsSearchDialog = false; | 4886 | mViewerCallerIsSearchDialog = false; |
4884 | Incidence *incidence = currentSelection(); | 4887 | Incidence *incidence = currentSelection(); |
4885 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 4888 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
4886 | if ( incidence ) { | 4889 | if ( incidence ) { |
4887 | ShowIncidenceVisitor v; | 4890 | ShowIncidenceVisitor v; |
4888 | v.act( incidence, this ); | 4891 | v.act( incidence, this ); |
4889 | } | 4892 | } |
4890 | } | 4893 | } |
4891 | void CalendarView::editIncidenceDescription() | 4894 | void CalendarView::editIncidenceDescription() |
4892 | { | 4895 | { |
4893 | mFlagEditDescription = true; | 4896 | mFlagEditDescription = true; |
4894 | editIncidence(); | 4897 | editIncidence(); |
4895 | mFlagEditDescription = false; | 4898 | mFlagEditDescription = false; |
4896 | } | 4899 | } |
4897 | void CalendarView::editIncidence() | 4900 | void CalendarView::editIncidence() |
4898 | { | 4901 | { |
4899 | // qDebug("editIncidence() "); | 4902 | // qDebug("editIncidence() "); |
4900 | Incidence *incidence = currentSelection(); | 4903 | Incidence *incidence = currentSelection(); |
4901 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 4904 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
4902 | if ( incidence ) { | 4905 | if ( incidence ) { |
4903 | EditIncidenceVisitor v; | 4906 | EditIncidenceVisitor v; |
4904 | v.act( incidence, this ); | 4907 | v.act( incidence, this ); |
4905 | } | 4908 | } |
4906 | } | 4909 | } |
4907 | 4910 | ||
4908 | void CalendarView::deleteIncidence() | 4911 | void CalendarView::deleteIncidence() |
4909 | { | 4912 | { |
4910 | Incidence *incidence = currentSelection(); | 4913 | Incidence *incidence = currentSelection(); |
4911 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 4914 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
4912 | if ( incidence ) { | 4915 | if ( incidence ) { |
4913 | deleteIncidence(incidence); | 4916 | deleteIncidence(incidence); |
4914 | } | 4917 | } |
4915 | } | 4918 | } |
4916 | void CalendarView::showIncidence(QString uid) | 4919 | void CalendarView::showIncidence(QString uid) |
4917 | { | 4920 | { |
4918 | Incidence *inc = mCalendar->incidence( uid ); | 4921 | Incidence *inc = mCalendar->incidence( uid ); |
4919 | if ( inc ) | 4922 | if ( inc ) |
4920 | showIncidence( inc ); | 4923 | showIncidence( inc ); |
4921 | } | 4924 | } |
4922 | void CalendarView::showIncidence(Incidence *incidence) | 4925 | void CalendarView::showIncidence(Incidence *incidence) |
4923 | { | 4926 | { |
4924 | mViewerCallerIsSearchDialog = false; | 4927 | mViewerCallerIsSearchDialog = false; |
4925 | //qDebug("%x %x ",sender (), mDialogManager->getSearchDialog() ); | 4928 | //qDebug("%x %x ",sender (), mDialogManager->getSearchDialog() ); |
4926 | if ( sender() && mDialogManager->getSearchDialog() ) { | 4929 | if ( sender() && mDialogManager->getSearchDialog() ) { |
4927 | if ( sender () == mDialogManager->getSearchDialog()->listview() ) { | 4930 | if ( sender () == mDialogManager->getSearchDialog()->listview() ) { |
4928 | mViewerCallerIsSearchDialog = true; | 4931 | mViewerCallerIsSearchDialog = true; |
4929 | } | 4932 | } |
4930 | } | 4933 | } |
4931 | if ( incidence ) { | 4934 | if ( incidence ) { |
4932 | ShowIncidenceVisitor v; | 4935 | ShowIncidenceVisitor v; |
4933 | v.act( incidence, this ); | 4936 | v.act( incidence, this ); |
4934 | } | 4937 | } |
4935 | } | 4938 | } |
4936 | 4939 | ||
4937 | void CalendarView::editIncidence(Incidence *incidence) | 4940 | void CalendarView::editIncidence(Incidence *incidence) |
4938 | { | 4941 | { |
4939 | if ( incidence ) { | 4942 | if ( incidence ) { |
4940 | 4943 | ||
4941 | EditIncidenceVisitor v; | 4944 | EditIncidenceVisitor v; |
4942 | v.act( incidence, this ); | 4945 | v.act( incidence, this ); |
4943 | 4946 | ||
4944 | } | 4947 | } |
4945 | } | 4948 | } |
4946 | 4949 | ||
4947 | void CalendarView::deleteIncidence(Incidence *incidence) | 4950 | void CalendarView::deleteIncidence(Incidence *incidence) |
4948 | { | 4951 | { |
4949 | //qDebug(" CalendarView::deleteIncidence "); | 4952 | //qDebug(" CalendarView::deleteIncidence "); |
4950 | if ( incidence == 0 ) { | 4953 | if ( incidence == 0 ) { |
4951 | updateView(); | 4954 | updateView(); |
4952 | emit updateSearchDialog(); | 4955 | emit updateSearchDialog(); |
4953 | return; | 4956 | return; |
4954 | } | 4957 | } |
4955 | if ( incidence ) { | 4958 | if ( incidence ) { |
4956 | DeleteIncidenceVisitor v; | 4959 | DeleteIncidenceVisitor v; |
4957 | v.act( incidence, this ); | 4960 | v.act( incidence, this ); |
4958 | } | 4961 | } |
4959 | } | 4962 | } |
4960 | 4963 | ||
4961 | 4964 | ||
4962 | void CalendarView::lookForOutgoingMessages() | 4965 | void CalendarView::lookForOutgoingMessages() |
4963 | { | 4966 | { |
4964 | OutgoingDialog *ogd = mDialogManager->outgoingDialog(); | 4967 | OutgoingDialog *ogd = mDialogManager->outgoingDialog(); |
4965 | ogd->loadMessages(); | 4968 | ogd->loadMessages(); |
4966 | } | 4969 | } |
4967 | 4970 | ||
4968 | void CalendarView::lookForIncomingMessages() | 4971 | void CalendarView::lookForIncomingMessages() |
4969 | { | 4972 | { |
4970 | IncomingDialog *icd = mDialogManager->incomingDialog(); | 4973 | IncomingDialog *icd = mDialogManager->incomingDialog(); |
4971 | icd->retrieve(); | 4974 | icd->retrieve(); |
4972 | } | 4975 | } |
4973 | 4976 | ||
4974 | bool CalendarView::removeCompletedSubTodos( Todo* t ) | 4977 | bool CalendarView::removeCompletedSubTodos( Todo* t ) |
4975 | { | 4978 | { |
4976 | bool deleteTodo = true; | 4979 | bool deleteTodo = true; |
4977 | QPtrList<Incidence> subTodos; | 4980 | QPtrList<Incidence> subTodos; |
4978 | Incidence *aTodo; | 4981 | Incidence *aTodo; |
4979 | subTodos = t->relations(); | 4982 | subTodos = t->relations(); |
4980 | for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { | 4983 | for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { |
4981 | if (! removeCompletedSubTodos( (Todo*) aTodo )) | 4984 | if (! removeCompletedSubTodos( (Todo*) aTodo )) |
4982 | deleteTodo = false; | 4985 | deleteTodo = false; |
4983 | } | 4986 | } |
4984 | if ( deleteTodo ) { | 4987 | if ( deleteTodo ) { |
4985 | if ( t->isCompleted() && !t->doesRecur()) { | 4988 | if ( t->isCompleted() && !t->doesRecur()) { |
4986 | checkExternalId( t ); | 4989 | checkExternalId( t ); |
4987 | mCalendar->deleteTodo( t ); | 4990 | mCalendar->deleteTodo( t ); |
4988 | changeTodoDisplay( t,KOGlobals::EVENTDELETED ); | 4991 | changeTodoDisplay( t,KOGlobals::EVENTDELETED ); |
4989 | } | 4992 | } |
4990 | else | 4993 | else |
4991 | deleteTodo = false; | 4994 | deleteTodo = false; |
4992 | } | 4995 | } |
4993 | return deleteTodo; | 4996 | return deleteTodo; |
4994 | 4997 | ||
4995 | } | 4998 | } |
4996 | void CalendarView::purgeCompleted() | 4999 | void CalendarView::purgeCompleted() |
4997 | { | 5000 | { |
4998 | int result = KMessageBox::warningContinueCancel(this, | 5001 | int result = KMessageBox::warningContinueCancel(this, |
4999 | i18n("Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)"),i18n("Purge Todos"),i18n("Purge")); | 5002 | i18n("Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)"),i18n("Purge Todos"),i18n("Purge")); |
5000 | 5003 | ||
5001 | if (result == KMessageBox::Continue) { | 5004 | if (result == KMessageBox::Continue) { |
5002 | 5005 | ||
5003 | QPtrList<Todo> todoCal; | 5006 | QPtrList<Todo> todoCal; |
5004 | QPtrList<Todo> rootTodos; | 5007 | QPtrList<Todo> rootTodos; |
5005 | //QPtrList<Incidence> rel; | 5008 | //QPtrList<Incidence> rel; |
5006 | Todo *aTodo; | 5009 | Todo *aTodo; |
5007 | todoCal = calendar()->todos(); | 5010 | todoCal = calendar()->todos(); |
5008 | for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { | 5011 | for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { |
5009 | if ( !aTodo->relatedTo() ) | 5012 | if ( !aTodo->relatedTo() ) |
5010 | rootTodos.append( aTodo ); | 5013 | rootTodos.append( aTodo ); |
5011 | } | 5014 | } |
5012 | for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { | 5015 | for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { |
5013 | removeCompletedSubTodos( aTodo ); | 5016 | removeCompletedSubTodos( aTodo ); |
5014 | } | 5017 | } |
5015 | 5018 | ||
5016 | updateView(); | 5019 | updateView(); |
5017 | } | 5020 | } |
5018 | } | 5021 | } |
5019 | 5022 | ||
5020 | void CalendarView::slotCalendarChanged() | 5023 | void CalendarView::slotCalendarChanged() |
5021 | { | 5024 | { |
5022 | ; | 5025 | ; |
5023 | } | 5026 | } |
5024 | 5027 | ||
5025 | void CalendarView::keyPressEvent ( QKeyEvent *e) | 5028 | void CalendarView::keyPressEvent ( QKeyEvent *e) |
5026 | { | 5029 | { |
5027 | //qDebug("CalendarView::keyPressEvent "); | 5030 | //qDebug("CalendarView::keyPressEvent "); |
5028 | e->ignore(); | 5031 | e->ignore(); |
5029 | } | 5032 | } |
5030 | 5033 | ||
5031 | 5034 | ||
5032 | bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) | 5035 | bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) |
5033 | { | 5036 | { |
5034 | 5037 | ||
5035 | if ( manager != mSyncManager) | 5038 | if ( manager != mSyncManager) |
5036 | qDebug("KO: Internal error-1. SyncManager mismatch "); | 5039 | qDebug("KO: Internal error-1. SyncManager mismatch "); |
5037 | if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { | 5040 | if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { |
5038 | qDebug("KO: SyncKDE request detected!"); | 5041 | qDebug("KO: SyncKDE request detected!"); |
5039 | } | 5042 | } |
5040 | mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); | 5043 | mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); |
5041 | mCurrentSyncName = mSyncManager->getCurrentSyncName(); | 5044 | mCurrentSyncName = mSyncManager->getCurrentSyncName(); |
5042 | return syncCalendar( filename, mode ); | 5045 | return syncCalendar( filename, mode ); |
5043 | } | 5046 | } |
5044 | bool CalendarView::syncExternal(KSyncManager* manager, QString resource) | 5047 | bool CalendarView::syncExternal(KSyncManager* manager, QString resource) |
5045 | { | 5048 | { |
5046 | //mSyncManager = manager; | 5049 | //mSyncManager = manager; |
5047 | if ( manager != mSyncManager) | 5050 | if ( manager != mSyncManager) |
5048 | qDebug("KO: Internal error-2. SyncManager mismatch "); | 5051 | qDebug("KO: Internal error-2. SyncManager mismatch "); |
5049 | mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); | 5052 | mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); |
5050 | mCurrentSyncName = mSyncManager->getCurrentSyncName(); | 5053 | mCurrentSyncName = mSyncManager->getCurrentSyncName(); |
5051 | if ( resource == "sharp" ) | 5054 | if ( resource == "sharp" ) |
5052 | syncExternal( 0 ); | 5055 | syncExternal( 0 ); |
5053 | if ( resource == "phone" ) | 5056 | if ( resource == "phone" ) |
5054 | syncExternal( 1 ); | 5057 | syncExternal( 1 ); |
5055 | // pending setmodified | 5058 | // pending setmodified |
5056 | return true; | 5059 | return true; |
5057 | } | 5060 | } |
5058 | void CalendarView::setSyncManager(KSyncManager* manager) | 5061 | void CalendarView::setSyncManager(KSyncManager* manager) |
5059 | { | 5062 | { |
5060 | mSyncManager = manager; | 5063 | mSyncManager = manager; |
5061 | } | 5064 | } |
5062 | 5065 | ||
5063 | void CalendarView::removeSyncInfo( QString syncProfile) | 5066 | void CalendarView::removeSyncInfo( QString syncProfile) |
5064 | { | 5067 | { |
5065 | qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); | 5068 | qDebug("KO: removeSyncInfo for profile %s ", syncProfile.latin1()); |
5066 | mCalendar->removeSyncInfo( syncProfile ); | 5069 | mCalendar->removeSyncInfo( syncProfile ); |
5067 | 5070 | ||
5068 | } | 5071 | } |
5069 | 5072 | ||
5070 | void CalendarView::undo_delete() | 5073 | void CalendarView::undo_delete() |
5071 | { | 5074 | { |
5072 | //qDebug("undo_delete() "); | 5075 | //qDebug("undo_delete() "); |
5073 | Incidence* undo = mCalendar->undoIncidence(); | 5076 | Incidence* undo = mCalendar->undoIncidence(); |
5074 | if ( !undo ) { | 5077 | if ( !undo ) { |
5075 | KMessageBox::sorry(this,i18n("There is nothing to undo!"), | 5078 | KMessageBox::sorry(this,i18n("There is nothing to undo!"), |
5076 | i18n("KO/Pi")); | 5079 | i18n("KO/Pi")); |
5077 | return; | 5080 | return; |
5078 | } | 5081 | } |
5079 | if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( undo->summary(),0 ) + | 5082 | if ( KMessageBox::Continue ==KMessageBox::warningContinueCancel(this,KGlobal::formatMessage ( undo->summary(),0 ) + |
5080 | i18n("\nAre you sure you want\nto restore this?"), | 5083 | i18n("\nAre you sure you want\nto restore this?"), |
5081 | i18n("KO/Pi Confirmation"),i18n("Restore"))) { | 5084 | i18n("KO/Pi Confirmation"),i18n("Restore"))) { |
5082 | mCalendar->undoDeleteIncidence(); | 5085 | mCalendar->undoDeleteIncidence(); |
5083 | updateView(); | 5086 | updateView(); |
5084 | } | 5087 | } |
5085 | } | 5088 | } |
5086 | 5089 | ||
5087 | void CalendarView::slotViewerClosed() | 5090 | void CalendarView::slotViewerClosed() |
5088 | { | 5091 | { |
5089 | QTimer::singleShot( 50, this, SLOT ( resetFocus() ) ); | 5092 | QTimer::singleShot( 50, this, SLOT ( resetFocus() ) ); |
5090 | } | 5093 | } |
5091 | 5094 | ||
5092 | void CalendarView::resetFocus() | 5095 | void CalendarView::resetFocus() |
5093 | { | 5096 | { |
5094 | if ( mViewerCallerIsSearchDialog ) { | 5097 | if ( mViewerCallerIsSearchDialog ) { |
5095 | if ( mDialogManager->getSearchDialog()->isVisible() ){ | 5098 | if ( mDialogManager->getSearchDialog()->isVisible() ){ |
5096 | mDialogManager->getSearchDialog()->raise(); | 5099 | mDialogManager->getSearchDialog()->raise(); |
5097 | mDialogManager->getSearchDialog()->setActiveWindow(); | 5100 | mDialogManager->getSearchDialog()->setActiveWindow(); |
5098 | mDialogManager->getSearchDialog()->listview()->resetFocus(); | 5101 | mDialogManager->getSearchDialog()->listview()->resetFocus(); |
5099 | } else | 5102 | } else |
5100 | mViewerCallerIsSearchDialog = false; | 5103 | mViewerCallerIsSearchDialog = false; |
5101 | } | 5104 | } |
5102 | if ( !mViewerCallerIsSearchDialog ) { | 5105 | if ( !mViewerCallerIsSearchDialog ) { |
5103 | //mViewManager->currentView()->setFocus(); | 5106 | //mViewManager->currentView()->setFocus(); |
5104 | //qDebug("sssssssssssssssset focus "); | 5107 | //qDebug("sssssssssssssssset focus "); |
5105 | topLevelWidget()->raise(); | 5108 | topLevelWidget()->raise(); |
5106 | setActiveWindow(); | 5109 | setActiveWindow(); |
5107 | //setFocus(); | 5110 | //setFocus(); |
5108 | } | 5111 | } |
5109 | mViewerCallerIsSearchDialog = false; | 5112 | mViewerCallerIsSearchDialog = false; |
5110 | } | 5113 | } |
5111 | 5114 | ||
5112 | void CalendarView::showNextAlarms() | 5115 | void CalendarView::showNextAlarms() |
5113 | { | 5116 | { |
5114 | QString message; | 5117 | QString message; |
5115 | QDateTime nextAl = mCalendar->nextAlarmEventDateTime(); | 5118 | QDateTime nextAl = mCalendar->nextAlarmEventDateTime(); |
5116 | if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) { | 5119 | if ( nextAl.isValid() && mNextAlarmDateTime > QDateTime::currentDateTime() ) { |
5117 | QString sum = mCalendar->nextSummary(); | 5120 | QString sum = mCalendar->nextSummary(); |
5118 | QDateTime nextA = mNextAlarmDateTime; | 5121 | QDateTime nextA = mNextAlarmDateTime; |
5119 | QDateTime cur = QDateTime::currentDateTime(); | 5122 | QDateTime cur = QDateTime::currentDateTime(); |
5120 | int secs = cur.secsTo( nextA ); | 5123 | int secs = cur.secsTo( nextA ); |
5121 | int min = secs /60; | 5124 | int min = secs /60; |
5122 | int hours = min /60; | 5125 | int hours = min /60; |
5123 | min = min % 60; | 5126 | min = min % 60; |
5124 | int days = hours /24; | 5127 | int days = hours /24; |
5125 | hours = hours % 24; | 5128 | hours = hours % 24; |
5126 | 5129 | ||
5127 | //message = i18n("The next alarm is in:\n"); | 5130 | //message = i18n("The next alarm is in:\n"); |
5128 | if ( days > 1 ) | 5131 | if ( days > 1 ) |
5129 | message += i18n("%1 days\n").arg( days ); | 5132 | message += i18n("%1 days\n").arg( days ); |
5130 | else if ( days == 1 ) | 5133 | else if ( days == 1 ) |
5131 | message += i18n("1 day\n"); | 5134 | message += i18n("1 day\n"); |
5132 | if ( hours > 1 ) | 5135 | if ( hours > 1 ) |
5133 | message += i18n("%1 hours\n").arg( hours ); | 5136 | message += i18n("%1 hours\n").arg( hours ); |
5134 | else if ( hours == 1 ) | 5137 | else if ( hours == 1 ) |
5135 | message += i18n("1 hour\n"); | 5138 | message += i18n("1 hour\n"); |
5136 | if ( min > 1 ) | 5139 | if ( min > 1 ) |
5137 | message += i18n("%1 minutes\n").arg( min ); | 5140 | message += i18n("%1 minutes\n").arg( min ); |
5138 | else if ( min == 1 ) | 5141 | else if ( min == 1 ) |
5139 | message += i18n("1 minute\n"); | 5142 | message += i18n("1 minute\n"); |
5140 | if ( message.isEmpty() ) | 5143 | if ( message.isEmpty() ) |
5141 | message = i18n("The next alarm is in\nless than one minute!"); | 5144 | message = i18n("The next alarm is in\nless than one minute!"); |
5142 | else | 5145 | else |
5143 | message = i18n("The next alarm is in:\n") + message; | 5146 | message = i18n("The next alarm is in:\n") + message; |
5144 | message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; | 5147 | message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; |
5145 | } else { | 5148 | } else { |
5146 | message = i18n("There is no next alarm."); | 5149 | message = i18n("There is no next alarm."); |
5147 | 5150 | ||
5148 | } | 5151 | } |
5149 | #ifdef DESKTOP_VERSION | 5152 | #ifdef DESKTOP_VERSION |
5150 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { | 5153 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { |
5151 | message += i18n("\nThe internal alarm notification is disabled!\n"); | 5154 | message += i18n("\nThe internal alarm notification is disabled!\n"); |
5152 | message += i18n("Enable it in the settings menu, TAB alarm."); | 5155 | message += i18n("Enable it in the settings menu, TAB alarm."); |
5153 | } | 5156 | } |
5154 | 5157 | ||
5155 | #endif | 5158 | #endif |
5156 | KMessageBox::information( this, message); | 5159 | KMessageBox::information( this, message); |
5157 | } | 5160 | } |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index b223315..8670832 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -1,668 +1,669 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000, 2001 | 3 | Copyright (c) 2000, 2001 |
4 | Cornelius Schumacher <schumacher@kde.org> | 4 | Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | #ifndef CALENDARVIEW_H | 24 | #ifndef CALENDARVIEW_H |
25 | #define CALENDARVIEW_H | 25 | #define CALENDARVIEW_H |
26 | 26 | ||
27 | #include <qframe.h> | 27 | #include <qframe.h> |
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | #include <qwidget.h> | 29 | #include <qwidget.h> |
30 | #include <qptrlist.h> | 30 | #include <qptrlist.h> |
31 | #include <qvbox.h> | 31 | #include <qvbox.h> |
32 | #include <qmap.h> | 32 | #include <qmap.h> |
33 | #include <qscrollbar.h> | 33 | #include <qscrollbar.h> |
34 | #ifndef DESKTOP_VERSION | 34 | #ifndef DESKTOP_VERSION |
35 | #include <qtopia/ir.h> | 35 | #include <qtopia/ir.h> |
36 | #else | 36 | #else |
37 | #define Ir char | 37 | #define Ir char |
38 | #endif | 38 | #endif |
39 | #include <libkcal/calendar.h> | 39 | #include <libkcal/calendar.h> |
40 | #include <libkcal/scheduler.h> | 40 | #include <libkcal/scheduler.h> |
41 | #include <libkcal/calendarresources.h> | 41 | #include <libkcal/calendarresources.h> |
42 | #include <libkcal/resourcecalendar.h> | 42 | #include <libkcal/resourcecalendar.h> |
43 | #include <KDGanttMinimizeSplitter.h> | 43 | #include <KDGanttMinimizeSplitter.h> |
44 | 44 | ||
45 | #include <korganizer/calendarviewbase.h> | 45 | #include <korganizer/calendarviewbase.h> |
46 | 46 | ||
47 | #include <ksyncmanager.h> | 47 | #include <ksyncmanager.h> |
48 | //#include <koprefs.h> | 48 | //#include <koprefs.h> |
49 | 49 | ||
50 | class QWidgetStack; | 50 | class QWidgetStack; |
51 | class QSplitter; | 51 | class QSplitter; |
52 | class KopiCalendarFile; | 52 | class KopiCalendarFile; |
53 | class CalPrinter; | 53 | class CalPrinter; |
54 | class KOFilterView; | 54 | class KOFilterView; |
55 | class KOCalEditView; | 55 | class KOCalEditView; |
56 | class KOViewManager; | 56 | class KOViewManager; |
57 | class KODialogManager; | 57 | class KODialogManager; |
58 | class KOTodoView; | 58 | class KOTodoView; |
59 | class KDateNavigator; | 59 | class KDateNavigator; |
60 | class DateNavigatorContainer; | 60 | class DateNavigatorContainer; |
61 | class DateNavigator; | 61 | class DateNavigator; |
62 | class KOIncidenceEditor; | 62 | class KOIncidenceEditor; |
63 | class KDatePicker; | 63 | class KDatePicker; |
64 | class ResourceView; | 64 | class ResourceView; |
65 | class KOEventEditor; | 65 | class KOEventEditor; |
66 | class KOTodoEditor ; | 66 | class KOTodoEditor ; |
67 | class KOEventViewerDialog; | 67 | class KOEventViewerDialog; |
68 | class KOBeamPrefs; | 68 | class KOBeamPrefs; |
69 | class KSyncProfile; | 69 | class KSyncProfile; |
70 | class AlarmDialog; | 70 | class AlarmDialog; |
71 | class KCal::Attendee; | 71 | class KCal::Attendee; |
72 | 72 | ||
73 | namespace KCal { class FileStorage; } | 73 | namespace KCal { class FileStorage; } |
74 | 74 | ||
75 | using namespace KCal; | 75 | using namespace KCal; |
76 | 76 | ||
77 | /** | 77 | /** |
78 | This is the main calendar widget. It provides the different vies on t he | 78 | This is the main calendar widget. It provides the different vies on t he |
79 | calendar data as well as the date navigator. It also handles synchronisation | 79 | calendar data as well as the date navigator. It also handles synchronisation |
80 | of the different views and controls the different dialogs like preferences, | 80 | of the different views and controls the different dialogs like preferences, |
81 | event editor, search dialog etc. | 81 | event editor, search dialog etc. |
82 | 82 | ||
83 | @short main calendar view widget | 83 | @short main calendar view widget |
84 | @author Cornelius Schumacher | 84 | @author Cornelius Schumacher |
85 | */ | 85 | */ |
86 | 86 | ||
87 | #include <qtextbrowser.h> | 87 | #include <qtextbrowser.h> |
88 | #include <qtextcodec.h> | 88 | #include <qtextcodec.h> |
89 | 89 | ||
90 | class MissedAlarmTextBrowser : public QTextBrowser { | 90 | class MissedAlarmTextBrowser : public QTextBrowser { |
91 | Q_OBJECT | 91 | Q_OBJECT |
92 | public: | 92 | public: |
93 | MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); | 93 | MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); |
94 | ~MissedAlarmTextBrowser(); | 94 | ~MissedAlarmTextBrowser(); |
95 | void setSource(const QString & n); | 95 | void setSource(const QString & n); |
96 | 96 | ||
97 | private: | 97 | private: |
98 | Incidence * getNextInc(QDateTime start ); | 98 | Incidence * getNextInc(QDateTime start ); |
99 | QPtrList<Incidence> mAlarms; | 99 | QPtrList<Incidence> mAlarms; |
100 | signals: | 100 | signals: |
101 | void showIncidence( QString uid); | 101 | void showIncidence( QString uid); |
102 | }; | 102 | }; |
103 | 103 | ||
104 | 104 | ||
105 | class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface | 105 | class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Observer, public KSyncInterface |
106 | { | 106 | { |
107 | Q_OBJECT | 107 | Q_OBJECT |
108 | public: | 108 | public: |
109 | /** | 109 | /** |
110 | Constructs a new calendar view widget. | 110 | Constructs a new calendar view widget. |
111 | 111 | ||
112 | @param calendar calendar document | 112 | @param calendar calendar document |
113 | @param parent parent window | 113 | @param parent parent window |
114 | @param name Qt internal widget object name | 114 | @param name Qt internal widget object name |
115 | */ | 115 | */ |
116 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, | 116 | CalendarView( CalendarResources *calendar, QWidget *parent = 0, |
117 | const char *name = 0 ); | 117 | const char *name = 0 ); |
118 | CalendarView( Calendar *calendar, QWidget *parent = 0, | 118 | CalendarView( Calendar *calendar, QWidget *parent = 0, |
119 | const char *name = 0 ); | 119 | const char *name = 0 ); |
120 | virtual ~CalendarView(); | 120 | virtual ~CalendarView(); |
121 | 121 | ||
122 | Calendar *calendar() { return mCalendar; } | 122 | Calendar *calendar() { return mCalendar; } |
123 | 123 | ||
124 | KOViewManager *viewManager(); | 124 | KOViewManager *viewManager(); |
125 | KODialogManager *dialogManager(); | 125 | KODialogManager *dialogManager(); |
126 | 126 | ||
127 | QDate startDate(); | 127 | QDate startDate(); |
128 | QDate endDate(); | 128 | QDate endDate(); |
129 | 129 | ||
130 | QWidgetStack *viewStack(); | 130 | QWidgetStack *viewStack(); |
131 | QWidget *leftFrame(); | 131 | QWidget *leftFrame(); |
132 | 132 | ||
133 | DateNavigator *dateNavigator(); | 133 | DateNavigator *dateNavigator(); |
134 | KDateNavigator *dateNavigatorWidget(); | 134 | KDateNavigator *dateNavigatorWidget(); |
135 | 135 | ||
136 | void addView(KOrg::BaseView *); | 136 | void addView(KOrg::BaseView *); |
137 | void showView(KOrg::BaseView *); | 137 | void showView(KOrg::BaseView *); |
138 | KOEventViewerDialog* getEventViewerDialog(); | 138 | KOEventViewerDialog* getEventViewerDialog(); |
139 | Incidence *currentSelection(); | 139 | Incidence *currentSelection(); |
140 | void checkSuspendAlarm(); | 140 | void checkSuspendAlarm(); |
141 | void mergeFile( QString fn ); | 141 | void mergeFile( QString fn ); |
142 | 142 | ||
143 | signals: | 143 | signals: |
144 | void save (); | 144 | void save (); |
145 | void saveStopTimer (); | 145 | void saveStopTimer (); |
146 | void tempDisableBR(bool); | 146 | void tempDisableBR(bool); |
147 | /** This todo has been modified */ | 147 | /** This todo has been modified */ |
148 | void todoModified(Todo *, int); | 148 | void todoModified(Todo *, int); |
149 | 149 | ||
150 | /** when change is made to options dialog, the topwidget will catch this | 150 | /** when change is made to options dialog, the topwidget will catch this |
151 | * and emit this signal which notifies all widgets which have registered | 151 | * and emit this signal which notifies all widgets which have registered |
152 | * for notification to update their settings. */ | 152 | * for notification to update their settings. */ |
153 | void configChanged(); | 153 | void configChanged(); |
154 | /** emitted when the topwidget is closing down, so that any attached | 154 | /** emitted when the topwidget is closing down, so that any attached |
155 | child windows can also close. */ | 155 | child windows can also close. */ |
156 | void closingDown(); | 156 | void closingDown(); |
157 | /** emitted right before we die */ | 157 | /** emitted right before we die */ |
158 | void closed(QWidget *); | 158 | void closed(QWidget *); |
159 | 159 | ||
160 | /** Emitted when state of modified flag changes */ | 160 | /** Emitted when state of modified flag changes */ |
161 | void modifiedChanged(bool); | 161 | void modifiedChanged(bool); |
162 | void signalmodified(); | 162 | void signalmodified(); |
163 | 163 | ||
164 | /** Emitted when state of read-only flag changes */ | 164 | /** Emitted when state of read-only flag changes */ |
165 | void readOnlyChanged(bool); | 165 | void readOnlyChanged(bool); |
166 | 166 | ||
167 | /** Emitted when the unit of navigation changes */ | 167 | /** Emitted when the unit of navigation changes */ |
168 | void changeNavStringPrev(const QString &); | 168 | void changeNavStringPrev(const QString &); |
169 | void changeNavStringNext(const QString &); | 169 | void changeNavStringNext(const QString &); |
170 | 170 | ||
171 | /** Emitted when state of events selection has changed and user is organizer*/ | 171 | /** Emitted when state of events selection has changed and user is organizer*/ |
172 | void organizerEventsSelected(bool); | 172 | void organizerEventsSelected(bool); |
173 | /** Emitted when state of events selection has changed and user is attendee*/ | 173 | /** Emitted when state of events selection has changed and user is attendee*/ |
174 | void groupEventsSelected(bool); | 174 | void groupEventsSelected(bool); |
175 | /** | 175 | /** |
176 | Emitted when an incidence gets selected. If the selection is cleared the | 176 | Emitted when an incidence gets selected. If the selection is cleared the |
177 | signal is emitted with 0 as argument. | 177 | signal is emitted with 0 as argument. |
178 | */ | 178 | */ |
179 | void incidenceSelected( Incidence * ); | 179 | void incidenceSelected( Incidence * ); |
180 | /** Emitted, when a todoitem is selected or deselected. */ | 180 | /** Emitted, when a todoitem is selected or deselected. */ |
181 | void todoSelected( bool ); | 181 | void todoSelected( bool ); |
182 | 182 | ||
183 | /** | 183 | /** |
184 | Emitted, when clipboard content changes. Parameter indicates if paste | 184 | Emitted, when clipboard content changes. Parameter indicates if paste |
185 | is possible or not. | 185 | is possible or not. |
186 | */ | 186 | */ |
187 | void pasteEnabled(bool); | 187 | void pasteEnabled(bool); |
188 | 188 | ||
189 | /** Emitted, when the number of incoming messages has changed. */ | 189 | /** Emitted, when the number of incoming messages has changed. */ |
190 | void numIncomingChanged(int); | 190 | void numIncomingChanged(int); |
191 | 191 | ||
192 | /** Emitted, when the number of outgoing messages has changed. */ | 192 | /** Emitted, when the number of outgoing messages has changed. */ |
193 | void numOutgoingChanged(int); | 193 | void numOutgoingChanged(int); |
194 | 194 | ||
195 | /** Send status message, which can e.g. be displayed in the status bar. */ | 195 | /** Send status message, which can e.g. be displayed in the status bar. */ |
196 | void statusMessage(const QString &); | 196 | void statusMessage(const QString &); |
197 | 197 | ||
198 | void calendarViewExpanded( bool ); | 198 | void calendarViewExpanded( bool ); |
199 | void updateSearchDialog(); | 199 | void updateSearchDialog(); |
200 | void filtersUpdated(); | 200 | void filtersUpdated(); |
201 | 201 | ||
202 | 202 | ||
203 | public slots: | 203 | public slots: |
204 | void nextConflict( bool all, bool allday ); | 204 | void nextConflict( bool all, bool allday ); |
205 | void conflictAll(); | 205 | void conflictAll(); |
206 | void conflictAllday(); | 206 | void conflictAllday(); |
207 | void conflictNotAll(); | 207 | void conflictNotAll(); |
208 | void setCalReadOnly( int id, bool readO ); | 208 | void setCalReadOnly( int id, bool readO ); |
209 | void checkAlarms(); | 209 | void checkAlarms(); |
210 | void checkFiles(); | 210 | void checkFiles(); |
211 | void slotprintSelInc(); | 211 | void slotprintSelInc(); |
212 | void showNextAlarms(); | 212 | void showNextAlarms(); |
213 | void showOpenError(); | 213 | void showOpenError(); |
214 | void watchSavedFile(); | 214 | void watchSavedFile(); |
215 | void recheckTimerAlarm(); | 215 | void recheckTimerAlarm(); |
216 | void checkNextTimerAlarm(); | 216 | void checkNextTimerAlarm(); |
217 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 217 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
218 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); | 218 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); |
219 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 219 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
220 | 220 | ||
221 | /** options dialog made a changed to the configuration. we catch this | 221 | /** options dialog made a changed to the configuration. we catch this |
222 | * and notify all widgets which need to update their configuration. */ | 222 | * and notify all widgets which need to update their configuration. */ |
223 | void updateConfig(); | 223 | void updateConfig(); |
224 | 224 | ||
225 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, | 225 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, |
226 | const QStringList& anniversaryList, const QStringList& realNameList, | 226 | const QStringList& anniversaryList, const QStringList& realNameList, |
227 | const QStringList& emailList, const QStringList& assembledNameList, | 227 | const QStringList& emailList, const QStringList& assembledNameList, |
228 | const QStringList& uidList); | 228 | const QStringList& uidList); |
229 | 229 | ||
230 | /** | 230 | /** |
231 | Load calendar from file \a filename. If \a merge is true, load | 231 | Load calendar from file \a filename. If \a merge is true, load |
232 | calendar into existing one, if it is false, clear calendar, before | 232 | calendar into existing one, if it is false, clear calendar, before |
233 | loading. Return true, if calendar could be successfully loaded. | 233 | loading. Return true, if calendar could be successfully loaded. |
234 | */ | 234 | */ |
235 | bool openCalendar(QString filename, bool merge=false); | 235 | bool openCalendar(QString filename, bool merge=false); |
236 | bool loadCalendars(); | 236 | bool loadCalendars(); |
237 | bool saveCalendars(); | 237 | bool saveCalendars(); |
238 | bool restoreCalendarSettings(); | 238 | bool restoreCalendarSettings(); |
239 | bool addCalendar( KopiCalendarFile * ); | 239 | bool addCalendar( KopiCalendarFile * ); |
240 | void addCalendarId( int id ); | 240 | void addCalendarId( int id ); |
241 | bool syncCalendar(QString filename,int mode = 0 ); | 241 | bool syncCalendar(QString filename,int mode = 0 ); |
242 | 242 | ||
243 | /** | 243 | /** |
244 | Save calendar data to file. Return true if calendar could be | 244 | Save calendar data to file. Return true if calendar could be |
245 | successfully saved. | 245 | successfully saved. |
246 | */ | 246 | */ |
247 | bool saveCalendar(QString filename); | 247 | bool saveCalendar(QString filename); |
248 | 248 | ||
249 | /** | 249 | /** |
250 | Close calendar. Clear calendar data and reset views to display an empty | 250 | Close calendar. Clear calendar data and reset views to display an empty |
251 | calendar. | 251 | calendar. |
252 | */ | 252 | */ |
253 | void closeCalendar(); | 253 | void closeCalendar(); |
254 | 254 | ||
255 | /** Archive old events of calendar */ | 255 | /** Archive old events of calendar */ |
256 | void archiveCalendar(); | 256 | void archiveCalendar(); |
257 | 257 | ||
258 | void showIncidence(); | 258 | void showIncidence(); |
259 | void editIncidence(); | 259 | void editIncidence(); |
260 | void editIncidenceDescription(); | 260 | void editIncidenceDescription(); |
261 | void deleteIncidence(); | 261 | void deleteIncidence(); |
262 | void cloneIncidence(); | 262 | void cloneIncidence(); |
263 | void moveIncidence(); | 263 | void moveIncidence(); |
264 | void beamIncidence(); | 264 | void beamIncidence(); |
265 | void toggleCancelIncidence(); | 265 | void toggleCancelIncidence(); |
266 | 266 | ||
267 | /** create an editeventwin with supplied date/time, and if bool is true, | 267 | /** create an editeventwin with supplied date/time, and if bool is true, |
268 | * make the event take all day. */ | 268 | * make the event take all day. */ |
269 | void newEvent(QDateTime, QDateTime, bool allDay ); | 269 | void newEvent(QDateTime, QDateTime, bool allDay ); |
270 | void newEvent(QDateTime, QDateTime); | 270 | void newEvent(QDateTime, QDateTime); |
271 | void newEvent(QDateTime fh); | 271 | void newEvent(QDateTime fh); |
272 | void newEvent(QDate dt); | 272 | void newEvent(QDate dt); |
273 | /** create new event without having a date hint. Takes current date as | 273 | /** create new event without having a date hint. Takes current date as |
274 | default hint. */ | 274 | default hint. */ |
275 | void newEvent(); | 275 | void newEvent(); |
276 | void newFloatingEvent(); | 276 | void newFloatingEvent(); |
277 | 277 | ||
278 | /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ | 278 | /** Create a read-only viewer dialog for the supplied incidence. It calls the correct showXXX method*/ |
279 | void showIncidence(Incidence *); | 279 | void showIncidence(Incidence *); |
280 | void showIncidence(QString uid); | 280 | void showIncidence(QString uid); |
281 | /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ | 281 | /** Create an editor for the supplied incidence. It calls the correct editXXX method*/ |
282 | void editIncidence(Incidence *); | 282 | void editIncidence(Incidence *); |
283 | /** Delete the supplied incidence. It calls the correct deleteXXX method*/ | 283 | /** Delete the supplied incidence. It calls the correct deleteXXX method*/ |
284 | void deleteIncidence(Incidence *); | 284 | void deleteIncidence(Incidence *); |
285 | void cloneIncidence(Incidence *); | 285 | void cloneIncidence(Incidence *); |
286 | void cancelIncidence(Incidence *); | 286 | void cancelIncidence(Incidence *); |
287 | /** Create an editor for the supplied event. */ | 287 | /** Create an editor for the supplied event. */ |
288 | void editEvent(Event *); | 288 | void editEvent(Event *); |
289 | /** Delete the supplied event. */ | 289 | /** Delete the supplied event. */ |
290 | void deleteEvent(Event *); | 290 | void deleteEvent(Event *); |
291 | /** Delete the event with the given unique ID. Returns false, if event wasn't | 291 | /** Delete the event with the given unique ID. Returns false, if event wasn't |
292 | found. */ | 292 | found. */ |
293 | bool deleteEvent(const QString &uid); | 293 | bool deleteEvent(const QString &uid); |
294 | /** Create a read-only viewer dialog for the supplied event. */ | 294 | /** Create a read-only viewer dialog for the supplied event. */ |
295 | void showEvent(Event *); | 295 | void showEvent(Event *); |
296 | 296 | ||
297 | void editJournal(Journal *); | 297 | void editJournal(Journal *); |
298 | void showJournal(Journal *); | 298 | void showJournal(Journal *); |
299 | void deleteJournal(Journal *); | 299 | void deleteJournal(Journal *); |
300 | /** Create an editor dialog for a todo */ | 300 | /** Create an editor dialog for a todo */ |
301 | void editTodo(Todo *); | 301 | void editTodo(Todo *); |
302 | /** Create a read-only viewer dialog for the supplied todo */ | 302 | /** Create a read-only viewer dialog for the supplied todo */ |
303 | void showTodo(Todo *); | 303 | void showTodo(Todo *); |
304 | /** create new todo */ | 304 | /** create new todo */ |
305 | void newTodo(); | 305 | void newTodo(); |
306 | void newTodoDateTime(QDateTime, bool allday); | 306 | void newTodoDateTime(QDateTime, bool allday); |
307 | /** create new todo with a parent todo */ | 307 | /** create new todo with a parent todo */ |
308 | void newSubTodo(); | 308 | void newSubTodo(); |
309 | /** create new todo with a parent todo */ | 309 | /** create new todo with a parent todo */ |
310 | void newSubTodo(Todo *); | 310 | void newSubTodo(Todo *); |
311 | /** Delete todo */ | 311 | /** Delete todo */ |
312 | void deleteTodo(Todo *); | 312 | void deleteTodo(Todo *); |
313 | 313 | ||
314 | 314 | ||
315 | /** Check if clipboard contains vCalendar event. The signal pasteEnabled() is | 315 | /** Check if clipboard contains vCalendar event. The signal pasteEnabled() is |
316 | * emitted as result. */ | 316 | * emitted as result. */ |
317 | void checkClipboard(); | 317 | void checkClipboard(); |
318 | 318 | ||
319 | /** using the KConfig associated with the kapp variable, read in the | 319 | /** using the KConfig associated with the kapp variable, read in the |
320 | * settings from the config file. | 320 | * settings from the config file. |
321 | */ | 321 | */ |
322 | void readSettings(); | 322 | void readSettings(); |
323 | 323 | ||
324 | /** write current state to config file. */ | 324 | /** write current state to config file. */ |
325 | void writeSettings(); | 325 | void writeSettings(); |
326 | 326 | ||
327 | /** read settings for calendar filters */ | 327 | /** read settings for calendar filters */ |
328 | void readFilterSettings(KConfig *config); | 328 | void readFilterSettings(KConfig *config); |
329 | 329 | ||
330 | /** write settings for calendar filters */ | 330 | /** write settings for calendar filters */ |
331 | void writeFilterSettings(KConfig *config); | 331 | void writeFilterSettings(KConfig *config); |
332 | 332 | ||
333 | /** passes on the message that an event has changed to the currently | 333 | /** passes on the message that an event has changed to the currently |
334 | * activated view so that it can make appropriate display changes. */ | 334 | * activated view so that it can make appropriate display changes. */ |
335 | void changeEventDisplay(Event *, int); | 335 | void changeEventDisplay(Event *, int); |
336 | void changeIncidenceDisplay(Incidence *, int); | 336 | void changeIncidenceDisplay(Incidence *, int); |
337 | void changeTodoDisplay(Todo *, int); | 337 | void changeTodoDisplay(Todo *, int); |
338 | 338 | ||
339 | void eventAdded(Event *); | 339 | void eventAdded(Event *); |
340 | void eventChanged(Event *); | 340 | void eventChanged(Event *); |
341 | void eventToBeDeleted(Event *); | 341 | void eventToBeDeleted(Event *); |
342 | void eventDeleted(); | 342 | void eventDeleted(); |
343 | 343 | ||
344 | void todoAdded(Todo *); | 344 | void todoAdded(Todo *); |
345 | void todoChanged(Todo *); | 345 | void todoChanged(Todo *); |
346 | void todoToBeDeleted(Todo *); | 346 | void todoToBeDeleted(Todo *); |
347 | void todoDeleted(); | 347 | void todoDeleted(); |
348 | 348 | ||
349 | void updateView(const QDate &start, const QDate &end); | 349 | void updateView(const QDate &start, const QDate &end); |
350 | void updateView(); | 350 | void updateView(); |
351 | void clearAllViews(); | 351 | void clearAllViews(); |
352 | 352 | ||
353 | /** Full update of visible todo views */ | 353 | /** Full update of visible todo views */ |
354 | void updateTodoViews(); | 354 | void updateTodoViews(); |
355 | 355 | ||
356 | void updateUnmanagedViews(); | 356 | void updateUnmanagedViews(); |
357 | 357 | ||
358 | /** cut the current appointment to the clipboard */ | 358 | /** cut the current appointment to the clipboard */ |
359 | void edit_cut(); | 359 | void edit_cut(); |
360 | 360 | ||
361 | /** copy the current appointment(s) to the clipboard */ | 361 | /** copy the current appointment(s) to the clipboard */ |
362 | void edit_copy(); | 362 | void edit_copy(); |
363 | 363 | ||
364 | /** paste the current vobject(s) in the clipboard buffer into calendar */ | 364 | /** paste the current vobject(s) in the clipboard buffer into calendar */ |
365 | void edit_paste(); | 365 | void edit_paste(); |
366 | 366 | ||
367 | /** edit viewing and configuration options. */ | 367 | /** edit viewing and configuration options. */ |
368 | void edit_options(); | 368 | void edit_options(); |
369 | void edit_global_options(); | 369 | void edit_global_options(); |
370 | /** | 370 | /** |
371 | Functions for printing, previewing a print, and setting up printing | 371 | Functions for printing, previewing a print, and setting up printing |
372 | parameters. | 372 | parameters. |
373 | */ | 373 | */ |
374 | void print(); | 374 | void print(); |
375 | void printSetup(); | 375 | void printSetup(); |
376 | void printPreview(); | 376 | void printPreview(); |
377 | 377 | ||
378 | /** Export as iCalendar file */ | 378 | /** Export as iCalendar file */ |
379 | void exportICalendar(); | 379 | bool exportICalendar(); |
380 | bool exportICalendar( QString fn ); | ||
380 | 381 | ||
381 | /** Export as vCalendar file */ | 382 | /** Export as vCalendar file */ |
382 | bool exportVCalendar( QString fn); | 383 | bool exportVCalendar( QString fn); |
383 | 384 | ||
384 | /** pop up a dialog to show an existing appointment. */ | 385 | /** pop up a dialog to show an existing appointment. */ |
385 | void appointment_show(); | 386 | void appointment_show(); |
386 | /** | 387 | /** |
387 | * pop up an Appointment Dialog to edit an existing appointment.Get | 388 | * pop up an Appointment Dialog to edit an existing appointment.Get |
388 | * information on the appointment from the list of unique IDs that is | 389 | * information on the appointment from the list of unique IDs that is |
389 | * currently in the View, called currIds. | 390 | * currently in the View, called currIds. |
390 | */ | 391 | */ |
391 | void appointment_edit(); | 392 | void appointment_edit(); |
392 | /** | 393 | /** |
393 | * pop up dialog confirming deletion of currently selected event in the | 394 | * pop up dialog confirming deletion of currently selected event in the |
394 | * View. | 395 | * View. |
395 | */ | 396 | */ |
396 | void appointment_delete(); | 397 | void appointment_delete(); |
397 | 398 | ||
398 | /** mails the currently selected event to a particular user as a vCalendar | 399 | /** mails the currently selected event to a particular user as a vCalendar |
399 | attachment. */ | 400 | attachment. */ |
400 | void action_mail(); | 401 | void action_mail(); |
401 | 402 | ||
402 | /* frees a subtodo from it's relation */ | 403 | /* frees a subtodo from it's relation */ |
403 | void todo_unsub( Todo * ); | 404 | void todo_unsub( Todo * ); |
404 | void todo_resub( Todo * parent, Todo * sub ); | 405 | void todo_resub( Todo * parent, Todo * sub ); |
405 | 406 | ||
406 | /** Take ownership of selected event. */ | 407 | /** Take ownership of selected event. */ |
407 | void takeOverEvent(); | 408 | void takeOverEvent(); |
408 | 409 | ||
409 | /** Take ownership of all events in calendar. */ | 410 | /** Take ownership of all events in calendar. */ |
410 | void takeOverCalendar(); | 411 | void takeOverCalendar(); |
411 | 412 | ||
412 | /** query whether or not the calendar is "dirty". */ | 413 | /** query whether or not the calendar is "dirty". */ |
413 | bool isModified(); | 414 | bool isModified(); |
414 | /** set the state of calendar. Modified means "dirty", i.e. needing a save. */ | 415 | /** set the state of calendar. Modified means "dirty", i.e. needing a save. */ |
415 | void setModified(bool modified=true); | 416 | void setModified(bool modified=true); |
416 | 417 | ||
417 | /** query if the calendar is read-only. */ | 418 | /** query if the calendar is read-only. */ |
418 | bool isReadOnly(); | 419 | bool isReadOnly(); |
419 | /** set state of calendar to read-only */ | 420 | /** set state of calendar to read-only */ |
420 | void setReadOnly(bool readOnly=true); | 421 | void setReadOnly(bool readOnly=true); |
421 | 422 | ||
422 | void eventUpdated(Incidence *); | 423 | void eventUpdated(Incidence *); |
423 | 424 | ||
424 | /* iTIP scheduling actions */ | 425 | /* iTIP scheduling actions */ |
425 | void schedule_publish(Incidence *incidence = 0); | 426 | void schedule_publish(Incidence *incidence = 0); |
426 | void schedule_request(Incidence *incidence = 0); | 427 | void schedule_request(Incidence *incidence = 0); |
427 | void schedule_refresh(Incidence *incidence = 0); | 428 | void schedule_refresh(Incidence *incidence = 0); |
428 | void schedule_cancel(Incidence *incidence = 0); | 429 | void schedule_cancel(Incidence *incidence = 0); |
429 | void schedule_add(Incidence *incidence = 0); | 430 | void schedule_add(Incidence *incidence = 0); |
430 | void schedule_reply(Incidence *incidence = 0); | 431 | void schedule_reply(Incidence *incidence = 0); |
431 | void schedule_counter(Incidence *incidence = 0); | 432 | void schedule_counter(Incidence *incidence = 0); |
432 | void schedule_declinecounter(Incidence *incidence = 0); | 433 | void schedule_declinecounter(Incidence *incidence = 0); |
433 | void schedule_publish_freebusy(int daysToPublish = 30); | 434 | void schedule_publish_freebusy(int daysToPublish = 30); |
434 | 435 | ||
435 | void openAddressbook(); | 436 | void openAddressbook(); |
436 | 437 | ||
437 | void editFilters(); | 438 | void editFilters(); |
438 | void toggleFilerEnabled(); | 439 | void toggleFilerEnabled(); |
439 | QPtrList<CalFilter> filters(); | 440 | QPtrList<CalFilter> filters(); |
440 | void toggleFilter(); | 441 | void toggleFilter(); |
441 | void showFilter(bool visible); | 442 | void showFilter(bool visible); |
442 | void updateFilter(); | 443 | void updateFilter(); |
443 | void filterEdited(); | 444 | void filterEdited(); |
444 | void selectFilter( int ); | 445 | void selectFilter( int ); |
445 | KOFilterView *filterView(); | 446 | KOFilterView *filterView(); |
446 | 447 | ||
447 | void showIntro(); | 448 | void showIntro(); |
448 | 449 | ||
449 | /** Move the curdatepient view date to today */ | 450 | /** Move the curdatepient view date to today */ |
450 | void goToday(); | 451 | void goToday(); |
451 | 452 | ||
452 | /** Move to the next date(s) in the current view */ | 453 | /** Move to the next date(s) in the current view */ |
453 | void goNext(); | 454 | void goNext(); |
454 | 455 | ||
455 | /** Move to the previous date(s) in the current view */ | 456 | /** Move to the previous date(s) in the current view */ |
456 | void goPrevious(); | 457 | void goPrevious(); |
457 | /** Move to the next date(s) in the current view */ | 458 | /** Move to the next date(s) in the current view */ |
458 | void goNextMonth(); | 459 | void goNextMonth(); |
459 | 460 | ||
460 | /** Move to the previous date(s) in the current view */ | 461 | /** Move to the previous date(s) in the current view */ |
461 | void goPreviousMonth(); | 462 | void goPreviousMonth(); |
462 | 463 | ||
463 | void toggleExpand(); | 464 | void toggleExpand(); |
464 | void toggleDateNavigatorWidget(); | 465 | void toggleDateNavigatorWidget(); |
465 | void toggleAllDaySize(); | 466 | void toggleAllDaySize(); |
466 | 467 | ||
467 | /** Look for new messages in the inbox */ | 468 | /** Look for new messages in the inbox */ |
468 | void lookForIncomingMessages(); | 469 | void lookForIncomingMessages(); |
469 | /** Look for new messages in the outbox */ | 470 | /** Look for new messages in the outbox */ |
470 | void lookForOutgoingMessages(); | 471 | void lookForOutgoingMessages(); |
471 | 472 | ||
472 | void processMainViewSelection( Incidence * ); | 473 | void processMainViewSelection( Incidence * ); |
473 | void processTodoListSelection( Incidence * ); | 474 | void processTodoListSelection( Incidence * ); |
474 | 475 | ||
475 | void processIncidenceSelection( Incidence * ); | 476 | void processIncidenceSelection( Incidence * ); |
476 | 477 | ||
477 | void purgeCompleted(); | 478 | void purgeCompleted(); |
478 | bool removeCompletedSubTodos( Todo* ); | 479 | bool removeCompletedSubTodos( Todo* ); |
479 | void slotCalendarChanged(); | 480 | void slotCalendarChanged(); |
480 | bool importBday(); | 481 | bool importBday(); |
481 | bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); | 482 | bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); |
482 | bool importQtopia( const QString &categoriesFile, | 483 | bool importQtopia( const QString &categoriesFile, |
483 | const QString &datebookFile, | 484 | const QString &datebookFile, |
484 | const QString &tasklistFile ); | 485 | const QString &tasklistFile ); |
485 | void syncExternal( int mode ); | 486 | void syncExternal( int mode ); |
486 | void slotSelectPickerDate( QDate ) ; | 487 | void slotSelectPickerDate( QDate ) ; |
487 | void showDatePicker() ; | 488 | void showDatePicker() ; |
488 | void showDatePickerPopup() ; | 489 | void showDatePickerPopup() ; |
489 | void moveIncidence(Incidence *) ; | 490 | void moveIncidence(Incidence *) ; |
490 | void beamIncidence(Incidence *) ; | 491 | void beamIncidence(Incidence *) ; |
491 | void beamCalendar() ; | 492 | void beamCalendar() ; |
492 | void beamFilteredCalendar() ; | 493 | void beamFilteredCalendar() ; |
493 | void beamIncidenceList(QPtrList<Incidence>) ; | 494 | void beamIncidenceList(QPtrList<Incidence>) ; |
494 | void manageCategories(); | 495 | void manageCategories(); |
495 | void editCategories(); | 496 | void editCategories(); |
496 | int addCategories(); | 497 | int addCategories(); |
497 | void removeCategories(); | 498 | void removeCategories(); |
498 | void setSyncDevice( QString ); | 499 | void setSyncDevice( QString ); |
499 | void setSyncName( QString ); | 500 | void setSyncName( QString ); |
500 | void showDay( QDate ); | 501 | void showDay( QDate ); |
501 | void undo_delete(); | 502 | void undo_delete(); |
502 | protected slots: | 503 | protected slots: |
503 | void resetFocus(); | 504 | void resetFocus(); |
504 | void scrollBarValue(int); | 505 | void scrollBarValue(int); |
505 | void slotViewerClosed(); | 506 | void slotViewerClosed(); |
506 | void timerAlarm(); | 507 | void timerAlarm(); |
507 | void suspendAlarm(); | 508 | void suspendAlarm(); |
508 | void beamDone( Ir *ir ); | 509 | void beamDone( Ir *ir ); |
509 | /** Select a view or adapt the current view to display the specified dates. */ | 510 | /** Select a view or adapt the current view to display the specified dates. */ |
510 | void showDates( const KCal::DateList & ); | 511 | void showDates( const KCal::DateList & ); |
511 | void selectWeekNum ( int ); | 512 | void selectWeekNum ( int ); |
512 | void checkConflictForEvent(); | 513 | void checkConflictForEvent(); |
513 | 514 | ||
514 | public: | 515 | public: |
515 | void createRunningDate4Todo( Todo * runT, QDateTime start , QDateTime end, int secLenRunning, int secLenPausing,int dayInterval ); | 516 | void createRunningDate4Todo( Todo * runT, QDateTime start , QDateTime end, int secLenRunning, int secLenPausing,int dayInterval ); |
516 | // show a standard warning | 517 | // show a standard warning |
517 | // returns KMsgBox::yesNoCancel() | 518 | // returns KMsgBox::yesNoCancel() |
518 | int msgCalModified(); | 519 | int msgCalModified(); |
519 | virtual bool sync(KSyncManager* manager, QString filename, int mode); | 520 | virtual bool sync(KSyncManager* manager, QString filename, int mode); |
520 | 521 | ||
521 | virtual bool syncExternal(KSyncManager* manager, QString resource); | 522 | virtual bool syncExternal(KSyncManager* manager, QString resource); |
522 | virtual void removeSyncInfo( QString syncProfile); | 523 | virtual void removeSyncInfo( QString syncProfile); |
523 | void setSyncManager(KSyncManager* manager); | 524 | void setSyncManager(KSyncManager* manager); |
524 | void setLoadedFileVersion(QDateTime); | 525 | void setLoadedFileVersion(QDateTime); |
525 | bool checkFileVersion(QString fn); | 526 | bool checkFileVersion(QString fn); |
526 | bool checkAllFileVersions(); | 527 | bool checkAllFileVersions(); |
527 | bool checkFileChanged(QString fn); | 528 | bool checkFileChanged(QString fn); |
528 | Event* getLastSyncEvent(); | 529 | Event* getLastSyncEvent(); |
529 | /** Adapt navigation units correpsonding to step size of navigation of the | 530 | /** Adapt navigation units correpsonding to step size of navigation of the |
530 | * current view. | 531 | * current view. |
531 | */ | 532 | */ |
532 | void adaptNavigationUnits(); | 533 | void adaptNavigationUnits(); |
533 | bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); | 534 | bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); |
534 | int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); | 535 | int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); |
535 | //Attendee* getYourAttendee(Event *event); | 536 | //Attendee* getYourAttendee(Event *event); |
536 | void setBlockShowDates( bool b ) { mBlockShowDates = b ;} | 537 | void setBlockShowDates( bool b ) { mBlockShowDates = b ;} |
537 | void setScrollBarStep(int val ); | 538 | void setScrollBarStep(int val ); |
538 | 539 | ||
539 | protected: | 540 | protected: |
540 | Event *mConflictingEvent; | 541 | Event *mConflictingEvent; |
541 | void schedule(Scheduler::Method, Incidence *incidence = 0); | 542 | void schedule(Scheduler::Method, Incidence *incidence = 0); |
542 | 543 | ||
543 | // returns KMsgBox::OKCandel() | 544 | // returns KMsgBox::OKCandel() |
544 | int msgItemDelete(const QString name); | 545 | int msgItemDelete(const QString name); |
545 | void showEventEditor(); | 546 | void showEventEditor(); |
546 | void showTodoEditor(); | 547 | void showTodoEditor(); |
547 | Todo *selectedTodo(); | 548 | Todo *selectedTodo(); |
548 | private: | 549 | private: |
549 | #ifdef DESKTOP_VERSION | 550 | #ifdef DESKTOP_VERSION |
550 | QScrollBar * mDateScrollBar; | 551 | QScrollBar * mDateScrollBar; |
551 | #endif | 552 | #endif |
552 | QDateTime mNextAlarmDateTime; | 553 | QDateTime mNextAlarmDateTime; |
553 | bool mViewerCallerIsSearchDialog; | 554 | bool mViewerCallerIsSearchDialog; |
554 | bool mBlockShowDates; | 555 | bool mBlockShowDates; |
555 | KSyncManager* mSyncManager; | 556 | KSyncManager* mSyncManager; |
556 | AlarmDialog * mAlarmDialog; | 557 | AlarmDialog * mAlarmDialog; |
557 | QString mAlarmNotification; | 558 | QString mAlarmNotification; |
558 | QString mSuspendAlarmNotification; | 559 | QString mSuspendAlarmNotification; |
559 | QTimer* mSuspendTimer; | 560 | QTimer* mSuspendTimer; |
560 | QTimer* mAlarmTimer; | 561 | QTimer* mAlarmTimer; |
561 | QTimer* mRecheckAlarmTimer; | 562 | QTimer* mRecheckAlarmTimer; |
562 | void computeAlarm( QString ); | 563 | void computeAlarm( QString ); |
563 | void startAlarm( QString, QString ); | 564 | void startAlarm( QString, QString ); |
564 | void setSyncEventsReadOnly(); | 565 | void setSyncEventsReadOnly(); |
565 | 566 | ||
566 | QDateTime loadedFileVersion; | 567 | QDateTime loadedFileVersion; |
567 | void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); | 568 | void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); |
568 | void checkExternalId( Incidence * inc ); | 569 | void checkExternalId( Incidence * inc ); |
569 | int mGlobalSyncMode; | 570 | int mGlobalSyncMode; |
570 | QString mCurrentSyncDevice; | 571 | QString mCurrentSyncDevice; |
571 | QString mCurrentSyncName; | 572 | QString mCurrentSyncName; |
572 | void init(); | 573 | void init(); |
573 | int mDatePickerMode; | 574 | int mDatePickerMode; |
574 | bool mFlagEditDescription; | 575 | bool mFlagEditDescription; |
575 | QDateTime mLastCalendarSync; | 576 | QDateTime mLastCalendarSync; |
576 | void createPrinter(); | 577 | void createPrinter(); |
577 | 578 | ||
578 | void calendarModified( bool, Calendar * ); | 579 | void calendarModified( bool, Calendar * ); |
579 | 580 | ||
580 | CalPrinter *mCalPrinter; | 581 | CalPrinter *mCalPrinter; |
581 | 582 | ||
582 | QSplitter *mPanner; | 583 | QSplitter *mPanner; |
583 | QSplitter *mLeftSplitter; | 584 | QSplitter *mLeftSplitter; |
584 | KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; | 585 | KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; |
585 | QWidgetStack *mRightFrame; | 586 | QWidgetStack *mRightFrame; |
586 | 587 | ||
587 | KDatePicker* mDatePicker; | 588 | KDatePicker* mDatePicker; |
588 | QVBox* mDateFrame; | 589 | QVBox* mDateFrame; |
589 | 590 | ||
590 | DateNavigatorContainer *mDateNavigator; // widget showing small month view. | 591 | DateNavigatorContainer *mDateNavigator; // widget showing small month view. |
591 | 592 | ||
592 | KOFilterView *mFilterView; | 593 | KOFilterView *mFilterView; |
593 | KOCalEditView *mCalEditView; | 594 | KOCalEditView *mCalEditView; |
594 | 595 | ||
595 | ResourceView *mResourceView; | 596 | ResourceView *mResourceView; |
596 | 597 | ||
597 | // calendar object for this viewing instance | 598 | // calendar object for this viewing instance |
598 | Calendar *mCalendar; | 599 | Calendar *mCalendar; |
599 | 600 | ||
600 | CalendarResourceManager *mResourceManager; | 601 | CalendarResourceManager *mResourceManager; |
601 | 602 | ||
602 | FileStorage *mStorage; | 603 | FileStorage *mStorage; |
603 | 604 | ||
604 | DateNavigator *mNavigator; | 605 | DateNavigator *mNavigator; |
605 | 606 | ||
606 | KOViewManager *mViewManager; | 607 | KOViewManager *mViewManager; |
607 | KODialogManager *mDialogManager; | 608 | KODialogManager *mDialogManager; |
608 | 609 | ||
609 | // Calendar filters | 610 | // Calendar filters |
610 | QPtrList<CalFilter> mFilters; | 611 | QPtrList<CalFilter> mFilters; |
611 | 612 | ||
612 | // various housekeeping variables. | 613 | // various housekeeping variables. |
613 | bool mModified; // flag indicating if calendar is modified | 614 | bool mModified; // flag indicating if calendar is modified |
614 | bool mReadOnly; // flag indicating if calendar is read-only | 615 | bool mReadOnly; // flag indicating if calendar is read-only |
615 | QDate mSaveSingleDate; | 616 | QDate mSaveSingleDate; |
616 | 617 | ||
617 | Incidence *mSelectedIncidence; | 618 | Incidence *mSelectedIncidence; |
618 | Incidence *mMoveIncidence; | 619 | Incidence *mMoveIncidence; |
619 | QDate mMoveIncidenceOldDate; | 620 | QDate mMoveIncidenceOldDate; |
620 | KOTodoView *mTodoList; | 621 | KOTodoView *mTodoList; |
621 | KOEventEditor * mEventEditor; | 622 | KOEventEditor * mEventEditor; |
622 | KOTodoEditor * mTodoEditor; | 623 | KOTodoEditor * mTodoEditor; |
623 | KOEventViewerDialog * mEventViewerDialog; | 624 | KOEventViewerDialog * mEventViewerDialog; |
624 | void keyPressEvent ( QKeyEvent *e) ; | 625 | void keyPressEvent ( QKeyEvent *e) ; |
625 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; | 626 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; |
626 | }; | 627 | }; |
627 | 628 | ||
628 | 629 | ||
629 | class CalendarViewVisitor : public Incidence::Visitor | 630 | class CalendarViewVisitor : public Incidence::Visitor |
630 | { | 631 | { |
631 | public: | 632 | public: |
632 | CalendarViewVisitor() : mView( 0 ) {} | 633 | CalendarViewVisitor() : mView( 0 ) {} |
633 | 634 | ||
634 | bool act( Incidence *incidence, CalendarView *view ) | 635 | bool act( Incidence *incidence, CalendarView *view ) |
635 | { | 636 | { |
636 | mView = view; | 637 | mView = view; |
637 | return incidence->accept( *this ); | 638 | return incidence->accept( *this ); |
638 | } | 639 | } |
639 | 640 | ||
640 | protected: | 641 | protected: |
641 | CalendarView *mView; | 642 | CalendarView *mView; |
642 | }; | 643 | }; |
643 | 644 | ||
644 | class ShowIncidenceVisitor : public CalendarViewVisitor | 645 | class ShowIncidenceVisitor : public CalendarViewVisitor |
645 | { | 646 | { |
646 | protected: | 647 | protected: |
647 | bool visit( Event *event ) { mView->showEvent( event ); return true; } | 648 | bool visit( Event *event ) { mView->showEvent( event ); return true; } |
648 | bool visit( Todo *todo ) { mView->showTodo( todo ); return true; } | 649 | bool visit( Todo *todo ) { mView->showTodo( todo ); return true; } |
649 | bool visit( Journal * j ) { mView->showJournal( j );return true; } | 650 | bool visit( Journal * j ) { mView->showJournal( j );return true; } |
650 | }; | 651 | }; |
651 | 652 | ||
652 | class EditIncidenceVisitor : public CalendarViewVisitor | 653 | class EditIncidenceVisitor : public CalendarViewVisitor |
653 | { | 654 | { |
654 | protected: | 655 | protected: |
655 | bool visit( Event *event ) { mView->editEvent( event ); return true; } | 656 | bool visit( Event *event ) { mView->editEvent( event ); return true; } |
656 | bool visit( Todo *todo ) { mView->editTodo( todo ); return true; } | 657 | bool visit( Todo *todo ) { mView->editTodo( todo ); return true; } |
657 | bool visit( Journal *j ) { mView->editJournal( j); return true; } | 658 | bool visit( Journal *j ) { mView->editJournal( j); return true; } |
658 | }; | 659 | }; |
659 | 660 | ||
660 | class DeleteIncidenceVisitor : public CalendarViewVisitor | 661 | class DeleteIncidenceVisitor : public CalendarViewVisitor |
661 | { | 662 | { |
662 | protected: | 663 | protected: |
663 | bool visit( Event *event ) { mView->deleteEvent( event ); return true; } | 664 | bool visit( Event *event ) { mView->deleteEvent( event ); return true; } |
664 | bool visit( Todo *todo ) { mView->deleteTodo( todo ); return true; } | 665 | bool visit( Todo *todo ) { mView->deleteTodo( todo ); return true; } |
665 | bool visit( Journal * j) {mView->deleteJournal( j ); return true; } | 666 | bool visit( Journal * j) {mView->deleteJournal( j ); return true; } |
666 | }; | 667 | }; |
667 | 668 | ||
668 | #endif | 669 | #endif |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 2af605f..98d3e35 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1,2733 +1,2774 @@ | |||
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/qpetoolbar.h> | 24 | #include <qpe/qpetoolbar.h> |
25 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
26 | #include <qpe/qpeapplication.h> | 26 | #include <qpe/qpeapplication.h> |
27 | #include <qtopia/alarmserver.h> | 27 | #include <qtopia/alarmserver.h> |
28 | #include <qtopia/qcopenvelope_qws.h> | 28 | #include <qtopia/qcopenvelope_qws.h> |
29 | #include <unistd.h> // for sleep | 29 | #include <unistd.h> // for sleep |
30 | #else | 30 | #else |
31 | #include <qtoolbar.h> | 31 | #include <qtoolbar.h> |
32 | #include <qapplication.h> | 32 | #include <qapplication.h> |
33 | //#include <resource.h> | 33 | //#include <resource.h> |
34 | 34 | ||
35 | #endif | 35 | #endif |
36 | #include <libkcal/calendarlocal.h> | 36 | #include <libkcal/calendarlocal.h> |
37 | #include <libkcal/todo.h> | 37 | #include <libkcal/todo.h> |
38 | #include <libkcal/phoneformat.h> | 38 | #include <libkcal/phoneformat.h> |
39 | #include <libkdepim/ksyncprofile.h> | 39 | #include <libkdepim/ksyncprofile.h> |
40 | #include <libkdepim/phoneaccess.h> | 40 | #include <libkdepim/phoneaccess.h> |
41 | #include <libkcal/kincidenceformatter.h> | 41 | #include <libkcal/kincidenceformatter.h> |
42 | #include <libkdepim/kpimglobalprefs.h> | 42 | #include <libkdepim/kpimglobalprefs.h> |
43 | 43 | ||
44 | #include "calendarview.h" | 44 | #include "calendarview.h" |
45 | #include "koviewmanager.h" | 45 | #include "koviewmanager.h" |
46 | #include "datenavigator.h" | 46 | #include "datenavigator.h" |
47 | #include "koagendaview.h" | 47 | #include "koagendaview.h" |
48 | #include "kojournalview.h" | 48 | #include "kojournalview.h" |
49 | #include "koagenda.h" | 49 | #include "koagenda.h" |
50 | #include "kodialogmanager.h" | 50 | #include "kodialogmanager.h" |
51 | #include "kdialogbase.h" | 51 | #include "kdialogbase.h" |
52 | #include "kapplication.h" | 52 | #include "kapplication.h" |
53 | #include "kofilterview.h" | 53 | #include "kofilterview.h" |
54 | #include "kstandarddirs.h" | 54 | #include "kstandarddirs.h" |
55 | #include "koprefs.h" | 55 | #include "koprefs.h" |
56 | #include "kfiledialog.h" | 56 | #include "kfiledialog.h" |
57 | #include "koglobals.h" | 57 | #include "koglobals.h" |
58 | #include "kglobal.h" | 58 | #include "kglobal.h" |
59 | #include "ktoolbar.h" | 59 | #include "ktoolbar.h" |
60 | #include "klocale.h" | 60 | #include "klocale.h" |
61 | #include "kconfig.h" | 61 | #include "kconfig.h" |
62 | #include "externalapphandler.h" | 62 | #include "externalapphandler.h" |
63 | #include <kglobalsettings.h> | 63 | #include <kglobalsettings.h> |
64 | 64 | ||
65 | using namespace KCal; | 65 | using namespace KCal; |
66 | #ifndef _WIN32_ | 66 | #ifndef _WIN32_ |
67 | #include <unistd.h> | 67 | #include <unistd.h> |
68 | #else | 68 | #else |
69 | #ifdef _OL_IMPORT_ | 69 | #ifdef _OL_IMPORT_ |
70 | #include "koimportoldialog.h" | 70 | #include "koimportoldialog.h" |
71 | #endif | 71 | #endif |
72 | #endif | 72 | #endif |
73 | #include "mainwindow.h" | 73 | #include "mainwindow.h" |
74 | 74 | ||
75 | 75 | ||
76 | class KOex2phonePrefs : public QDialog | 76 | class KOex2phonePrefs : public QDialog |
77 | { | 77 | { |
78 | public: | 78 | public: |
79 | KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : | 79 | KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : |
80 | QDialog( parent, name, true ) | 80 | QDialog( parent, name, true ) |
81 | { | 81 | { |
82 | setCaption( i18n("Export to phone options") ); | 82 | setCaption( i18n("Export to phone options") ); |
83 | QVBoxLayout* lay = new QVBoxLayout( this ); | 83 | QVBoxLayout* lay = new QVBoxLayout( this ); |
84 | lay->setSpacing( 3 ); | 84 | lay->setSpacing( 3 ); |
85 | lay->setMargin( 3 ); | 85 | lay->setMargin( 3 ); |
86 | QLabel *lab; | 86 | QLabel *lab; |
87 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); | 87 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); |
88 | lab->setAlignment (AlignHCenter ); | 88 | lab->setAlignment (AlignHCenter ); |
89 | QHBox* temphb; | 89 | QHBox* temphb; |
90 | temphb = new QHBox( this ); | 90 | temphb = new QHBox( this ); |
91 | new QLabel( i18n("I/O device: "), temphb ); | 91 | new QLabel( i18n("I/O device: "), temphb ); |
92 | mPhoneDevice = new QLineEdit( temphb); | 92 | mPhoneDevice = new QLineEdit( temphb); |
93 | lay->addWidget( temphb ); | 93 | lay->addWidget( temphb ); |
94 | temphb = new QHBox( this ); | 94 | temphb = new QHBox( this ); |
95 | new QLabel( i18n("Connection: "), temphb ); | 95 | new QLabel( i18n("Connection: "), temphb ); |
96 | mPhoneConnection = new QLineEdit( temphb); | 96 | mPhoneConnection = new QLineEdit( temphb); |
97 | lay->addWidget( temphb ); | 97 | lay->addWidget( temphb ); |
98 | temphb = new QHBox( this ); | 98 | temphb = new QHBox( this ); |
99 | new QLabel( i18n("Model(opt.): "), temphb ); | 99 | new QLabel( i18n("Model(opt.): "), temphb ); |
100 | mPhoneModel = new QLineEdit( temphb); | 100 | mPhoneModel = new QLineEdit( temphb); |
101 | lay->addWidget( temphb ); | 101 | lay->addWidget( temphb ); |
102 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); | 102 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); |
103 | mWriteBackFuture->setChecked( true ); | 103 | mWriteBackFuture->setChecked( true ); |
104 | lay->addWidget( mWriteBackFuture ); | 104 | lay->addWidget( mWriteBackFuture ); |
105 | temphb = new QHBox( this ); | 105 | temphb = new QHBox( this ); |
106 | new QLabel( i18n("Max. weeks in future: ") , temphb ); | 106 | new QLabel( i18n("Max. weeks in future: ") , temphb ); |
107 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); | 107 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); |
108 | mWriteBackFutureWeeks->setValue( 8 ); | 108 | mWriteBackFutureWeeks->setValue( 8 ); |
109 | lay->addWidget( temphb ); | 109 | lay->addWidget( temphb ); |
110 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); | 110 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); |
111 | lab->setAlignment (AlignHCenter ); | 111 | lab->setAlignment (AlignHCenter ); |
112 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); | 112 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); |
113 | lay->addWidget( ok ); | 113 | lay->addWidget( ok ); |
114 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 114 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
115 | lay->addWidget( cancel ); | 115 | lay->addWidget( cancel ); |
116 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 116 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
117 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 117 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
118 | resize( 220, 240 ); | 118 | resize( 220, 240 ); |
119 | qApp->processEvents(); | 119 | qApp->processEvents(); |
120 | int dw = QApplication::desktop()->width(); | 120 | int dw = QApplication::desktop()->width(); |
121 | int dh = QApplication::desktop()->height(); | 121 | int dh = QApplication::desktop()->height(); |
122 | move( (dw-width())/2, (dh - height() )/2 ); | 122 | move( (dw-width())/2, (dh - height() )/2 ); |
123 | } | 123 | } |
124 | 124 | ||
125 | public: | 125 | public: |
126 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; | 126 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; |
127 | QCheckBox* mWriteBackFuture; | 127 | QCheckBox* mWriteBackFuture; |
128 | QSpinBox* mWriteBackFutureWeeks; | 128 | QSpinBox* mWriteBackFutureWeeks; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | QPixmap* sgListViewCompletedPix[6]; | 131 | QPixmap* sgListViewCompletedPix[6]; |
132 | QPixmap* sgListViewJournalPix; | 132 | QPixmap* sgListViewJournalPix; |
133 | 133 | ||
134 | 134 | ||
135 | int globalFlagBlockStartup; | 135 | int globalFlagBlockStartup; |
136 | MainWindow::MainWindow( QWidget *parent, const char *name ) : | 136 | MainWindow::MainWindow( QWidget *parent, const char *name ) : |
137 | QMainWindow( parent, name ) | 137 | QMainWindow( parent, name ) |
138 | { | 138 | { |
139 | sgListViewCompletedPix[5] = &listviewPix; | 139 | sgListViewCompletedPix[5] = &listviewPix; |
140 | sgListViewCompletedPix[0] = &listviewPix0; | 140 | sgListViewCompletedPix[0] = &listviewPix0; |
141 | sgListViewCompletedPix[1] = &listviewPix20; | 141 | sgListViewCompletedPix[1] = &listviewPix20; |
142 | sgListViewCompletedPix[2] = &listviewPix40; | 142 | sgListViewCompletedPix[2] = &listviewPix40; |
143 | sgListViewCompletedPix[3] = &listviewPix60; | 143 | sgListViewCompletedPix[3] = &listviewPix60; |
144 | sgListViewCompletedPix[4] = &listviewPix80; | 144 | sgListViewCompletedPix[4] = &listviewPix80; |
145 | //int size = 12; | 145 | //int size = 12; |
146 | { | 146 | { |
147 | sgListViewCompletedPix[5]->resize( 11, 11 ); | 147 | sgListViewCompletedPix[5]->resize( 11, 11 ); |
148 | sgListViewCompletedPix[5]->fill( Qt::white ); | 148 | sgListViewCompletedPix[5]->fill( Qt::white ); |
149 | QPainter p ( sgListViewCompletedPix[5] ); | 149 | QPainter p ( sgListViewCompletedPix[5] ); |
150 | p.drawRect( 0,0,11,11); | 150 | p.drawRect( 0,0,11,11); |
151 | p.drawLine ( 2, 5, 4 , 7 ) ; | 151 | p.drawLine ( 2, 5, 4 , 7 ) ; |
152 | p.drawLine ( 4 , 7 , 8, 3) ; | 152 | p.drawLine ( 4 , 7 , 8, 3) ; |
153 | int iii = 0; | 153 | int iii = 0; |
154 | for ( iii = 0; iii < 5; ++iii ) { | 154 | for ( iii = 0; iii < 5; ++iii ) { |
155 | sgListViewCompletedPix[iii]->resize( 11, 11 ); | 155 | sgListViewCompletedPix[iii]->resize( 11, 11 ); |
156 | sgListViewCompletedPix[iii]->fill( Qt::white ); | 156 | sgListViewCompletedPix[iii]->fill( Qt::white ); |
157 | QPainter p ( sgListViewCompletedPix[iii] ); | 157 | QPainter p ( sgListViewCompletedPix[iii] ); |
158 | p.drawRect( 0,0,11,11); | 158 | p.drawRect( 0,0,11,11); |
159 | if ( iii ) | 159 | if ( iii ) |
160 | p.fillRect( 1,1,iii*2,9,Qt::gray ); | 160 | p.fillRect( 1,1,iii*2,9,Qt::gray ); |
161 | } | 161 | } |
162 | sgListViewJournalPix = &journalPix; | 162 | sgListViewJournalPix = &journalPix; |
163 | sgListViewJournalPix->resize( 11, 11 ); | 163 | sgListViewJournalPix->resize( 11, 11 ); |
164 | sgListViewJournalPix->fill( Qt::white ); | 164 | sgListViewJournalPix->fill( Qt::white ); |
165 | { | 165 | { |
166 | QPainter p ( sgListViewJournalPix ); | 166 | QPainter p ( sgListViewJournalPix ); |
167 | p.drawRect( 0,0,11,11); | 167 | p.drawRect( 0,0,11,11); |
168 | p.drawLine( 2,3,5,3); | 168 | p.drawLine( 2,3,5,3); |
169 | p.drawLine( 2,5,8,5); | 169 | p.drawLine( 2,5,8,5); |
170 | p.drawLine( 2,7,6,7); | 170 | p.drawLine( 2,7,6,7); |
171 | } | 171 | } |
172 | } | 172 | } |
173 | mClosed = false; | 173 | mClosed = false; |
174 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; | 174 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; |
175 | QString confFile = locateLocal("config","korganizerrc"); | 175 | QString confFile = locateLocal("config","korganizerrc"); |
176 | QFileInfo finf ( confFile ); | 176 | QFileInfo finf ( confFile ); |
177 | bool showWarning = !finf.exists(); | 177 | bool showWarning = !finf.exists(); |
178 | setIcon(SmallIcon( "ko24" ) ); | 178 | setIcon(SmallIcon( "ko24" ) ); |
179 | mBlockAtStartup = true; | 179 | mBlockAtStartup = true; |
180 | mFlagKeyPressed = false; | 180 | mFlagKeyPressed = false; |
181 | setCaption("KO/Pi"); | 181 | setCaption("KO/Pi"); |
182 | KOPrefs *p = KOPrefs::instance(); | 182 | KOPrefs *p = KOPrefs::instance(); |
183 | //KPimGlobalPrefs::instance()->setGlobalConfig(); | 183 | //KPimGlobalPrefs::instance()->setGlobalConfig(); |
184 | p->mCurrentDisplayedView = 0; | 184 | p->mCurrentDisplayedView = 0; |
185 | if ( p->mHourSize > 22 ) | 185 | if ( p->mHourSize > 22 ) |
186 | p->mHourSize = 22; | 186 | p->mHourSize = 22; |
187 | QMainWindow::ToolBarDock tbd; | 187 | QMainWindow::ToolBarDock tbd; |
188 | if ( p->mToolBarHor ) { | 188 | if ( p->mToolBarHor ) { |
189 | if ( p->mToolBarUp ) | 189 | if ( p->mToolBarUp ) |
190 | tbd = Bottom; | 190 | tbd = Bottom; |
191 | else | 191 | else |
192 | tbd = Top; | 192 | tbd = Top; |
193 | } | 193 | } |
194 | else { | 194 | else { |
195 | if ( p->mToolBarUp ) | 195 | if ( p->mToolBarUp ) |
196 | tbd = Right; | 196 | tbd = Right; |
197 | else | 197 | else |
198 | tbd = Left; | 198 | tbd = Left; |
199 | } | 199 | } |
200 | if ( KOPrefs::instance()->mUseAppColors ) | 200 | if ( KOPrefs::instance()->mUseAppColors ) |
201 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 201 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
202 | globalFlagBlockStartup = 1; | 202 | globalFlagBlockStartup = 1; |
203 | iconToolBar = new QPEToolBar( this ); | 203 | iconToolBar = new QPEToolBar( this ); |
204 | addToolBar (iconToolBar , tbd ); | 204 | addToolBar (iconToolBar , tbd ); |
205 | 205 | ||
206 | #ifdef DESKTOP_VERSION | 206 | #ifdef DESKTOP_VERSION |
207 | if ( KOPrefs::instance()->mShowIconFilter ) | 207 | if ( KOPrefs::instance()->mShowIconFilter ) |
208 | #else | 208 | #else |
209 | if ( KOPrefs::instance()->mShowIconFilter || ( !p->mShowIconOnetoolbar &&!p->mShowIconFilterview ) ) | 209 | if ( KOPrefs::instance()->mShowIconFilter || ( !p->mShowIconOnetoolbar &&!p->mShowIconFilterview ) ) |
210 | #endif | 210 | #endif |
211 | 211 | ||
212 | { | 212 | { |
213 | if ( p->mToolBarHorF ) { | 213 | if ( p->mToolBarHorF ) { |
214 | if ( p->mToolBarUpF ) | 214 | if ( p->mToolBarUpF ) |
215 | tbd = Bottom; | 215 | tbd = Bottom; |
216 | else | 216 | else |
217 | tbd = Top; | 217 | tbd = Top; |
218 | } | 218 | } |
219 | else { | 219 | else { |
220 | if ( p->mToolBarUpF ) | 220 | if ( p->mToolBarUpF ) |
221 | tbd = Right; | 221 | tbd = Right; |
222 | else | 222 | else |
223 | tbd = Left; | 223 | tbd = Left; |
224 | } | 224 | } |
225 | filterToolBar = new QPEToolBar ( this ); | 225 | filterToolBar = new QPEToolBar ( this ); |
226 | filterMenubar = new KMenuBar( 0 ); | 226 | filterMenubar = new KMenuBar( 0 ); |
227 | QFontMetrics fm ( filterMenubar->font() ); | 227 | QFontMetrics fm ( filterMenubar->font() ); |
228 | #ifndef DESKTOP_VERSION | 228 | #ifndef DESKTOP_VERSION |
229 | filterToolBar->setFocusPolicy( NoFocus ); | 229 | filterToolBar->setFocusPolicy( NoFocus ); |
230 | filterMenubar->setFocusPolicy( NoFocus ); | 230 | filterMenubar->setFocusPolicy( NoFocus ); |
231 | #endif | 231 | #endif |
232 | filterPopupMenu = new QPopupMenu( this ); | 232 | filterPopupMenu = new QPopupMenu( this ); |
233 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); | 233 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); |
234 | QString addTest = "A"; | 234 | QString addTest = "A"; |
235 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); | 235 | filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); |
236 | #ifdef DESKTOP_VERSION | 236 | #ifdef DESKTOP_VERSION |
237 | addTest = "AAAAAABBBCCCx"; | 237 | addTest = "AAAAAABBBCCCx"; |
238 | #else | 238 | #else |
239 | addTest = "AAAAAx"; | 239 | addTest = "AAAAAx"; |
240 | #endif | 240 | #endif |
241 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); | 241 | filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); |
242 | addToolBar (filterToolBar , tbd ); | 242 | addToolBar (filterToolBar , tbd ); |
243 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); | 243 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); |
244 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); | 244 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); |
245 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) | 245 | if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) |
246 | filterToolBar->hide(); | 246 | filterToolBar->hide(); |
247 | } else { | 247 | } else { |
248 | filterToolBar = 0; | 248 | filterToolBar = 0; |
249 | filterMenubar = 0; | 249 | filterMenubar = 0; |
250 | filterPopupMenu = 0; | 250 | filterPopupMenu = 0; |
251 | } | 251 | } |
252 | if ( p->mShowIconOnetoolbar ) { | 252 | if ( p->mShowIconOnetoolbar ) { |
253 | viewToolBar = iconToolBar ; | 253 | viewToolBar = iconToolBar ; |
254 | navigatorToolBar = iconToolBar ; | 254 | navigatorToolBar = iconToolBar ; |
255 | } else { | 255 | } else { |
256 | #ifndef DESKTOP_VERSION | 256 | #ifndef DESKTOP_VERSION |
257 | setToolBarsMovable( false ); | 257 | setToolBarsMovable( false ); |
258 | #endif | 258 | #endif |
259 | if ( p->mToolBarHorV ) { | 259 | if ( p->mToolBarHorV ) { |
260 | if ( p->mToolBarUpV ) | 260 | if ( p->mToolBarUpV ) |
261 | tbd = Bottom; | 261 | tbd = Bottom; |
262 | else | 262 | else |
263 | tbd = Top; | 263 | tbd = Top; |
264 | } | 264 | } |
265 | else { | 265 | else { |
266 | if ( p->mToolBarUpV ) | 266 | if ( p->mToolBarUpV ) |
267 | tbd = Right; | 267 | tbd = Right; |
268 | else | 268 | else |
269 | tbd = Left; | 269 | tbd = Left; |
270 | } | 270 | } |
271 | viewToolBar = new QPEToolBar( this ); | 271 | viewToolBar = new QPEToolBar( this ); |
272 | addToolBar (viewToolBar , tbd ); | 272 | addToolBar (viewToolBar , tbd ); |
273 | if ( p->mToolBarHorN ) { | 273 | if ( p->mToolBarHorN ) { |
274 | if ( p->mToolBarUpN ) | 274 | if ( p->mToolBarUpN ) |
275 | tbd = Bottom; | 275 | tbd = Bottom; |
276 | else | 276 | else |
277 | tbd = Top; | 277 | tbd = Top; |
278 | } | 278 | } |
279 | else { | 279 | else { |
280 | if ( p->mToolBarUpN ) | 280 | if ( p->mToolBarUpN ) |
281 | tbd = Right; | 281 | tbd = Right; |
282 | else | 282 | else |
283 | tbd = Left; | 283 | tbd = Left; |
284 | } | 284 | } |
285 | navigatorToolBar = new QPEToolBar( this ); | 285 | navigatorToolBar = new QPEToolBar( this ); |
286 | addToolBar (navigatorToolBar , tbd ); | 286 | addToolBar (navigatorToolBar , tbd ); |
287 | } | 287 | } |
288 | 288 | ||
289 | 289 | ||
290 | 290 | ||
291 | mCalendarModifiedFlag = false; | 291 | mCalendarModifiedFlag = false; |
292 | // QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); | 292 | // QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); |
293 | //splash->setAlignment ( AlignCenter ); | 293 | //splash->setAlignment ( AlignCenter ); |
294 | //setCentralWidget( splash ); | 294 | //setCentralWidget( splash ); |
295 | #ifndef DESKTOP_VERSION | 295 | #ifndef DESKTOP_VERSION |
296 | //showMaximized(); | 296 | //showMaximized(); |
297 | #endif | 297 | #endif |
298 | 298 | ||
299 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); | 299 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); |
300 | setDefaultPreferences(); | 300 | setDefaultPreferences(); |
301 | mCalendar = new CalendarLocal(); | 301 | mCalendar = new CalendarLocal(); |
302 | mView = new CalendarView( mCalendar, this,"mCalendar " ); | 302 | mView = new CalendarView( mCalendar, this,"mCalendar " ); |
303 | setCentralWidget( mView ); | 303 | setCentralWidget( mView ); |
304 | //mView->hide(); | 304 | //mView->hide(); |
305 | //mView->resize(splash->size() ); | 305 | //mView->resize(splash->size() ); |
306 | initActions(); | 306 | initActions(); |
307 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); | 307 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); |
308 | mSyncManager->setBlockSave(false); | 308 | mSyncManager->setBlockSave(false); |
309 | mView->setSyncManager(mSyncManager); | 309 | mView->setSyncManager(mSyncManager); |
310 | #ifndef DESKTOP_VERSION | 310 | #ifndef DESKTOP_VERSION |
311 | iconToolBar->show(); | 311 | iconToolBar->show(); |
312 | qApp->processEvents(); | 312 | qApp->processEvents(); |
313 | #endif | 313 | #endif |
314 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); | 314 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); |
315 | int vh = height() ; | 315 | int vh = height() ; |
316 | int vw = width(); | 316 | int vw = width(); |
317 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); | 317 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); |
318 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 318 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
319 | vh -= iconToolBar->height(); | 319 | vh -= iconToolBar->height(); |
320 | } else { | 320 | } else { |
321 | vw -= iconToolBar->height(); | 321 | vw -= iconToolBar->height(); |
322 | } | 322 | } |
323 | //mView->setMaximumSize( splash->size() ); | 323 | //mView->setMaximumSize( splash->size() ); |
324 | //mView->resize( splash->size() ); | 324 | //mView->resize( splash->size() ); |
325 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 325 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
326 | mView->readSettings(); | 326 | mView->readSettings(); |
327 | bool newFile = false; | 327 | bool newFile = false; |
328 | if( !QFile::exists( defaultFileName() ) ) { | 328 | if( !QFile::exists( defaultFileName() ) ) { |
329 | QFileInfo finfo ( defaultFileName() ); | 329 | QFileInfo finfo ( defaultFileName() ); |
330 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); | 330 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); |
331 | 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"; | 331 | 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"; |
332 | finfo.setFile( oldFile ); | 332 | finfo.setFile( oldFile ); |
333 | if (finfo.exists() ) { | 333 | if (finfo.exists() ) { |
334 | KMessageBox::information( this, message); | 334 | KMessageBox::information( this, message); |
335 | mView->openCalendar( oldFile ); | 335 | mView->openCalendar( oldFile ); |
336 | qApp->processEvents(); | 336 | qApp->processEvents(); |
337 | } else { | 337 | } else { |
338 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); | 338 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); |
339 | finfo.setFile( oldFile ); | 339 | finfo.setFile( oldFile ); |
340 | if (finfo.exists() ) { | 340 | if (finfo.exists() ) { |
341 | KMessageBox::information( this, message); | 341 | KMessageBox::information( this, message); |
342 | mView->openCalendar( oldFile ); | 342 | mView->openCalendar( oldFile ); |
343 | qApp->processEvents(); | 343 | qApp->processEvents(); |
344 | } | 344 | } |
345 | } | 345 | } |
346 | mView->saveCalendar( defaultFileName() ); | 346 | mView->saveCalendar( defaultFileName() ); |
347 | newFile = true; | 347 | newFile = true; |
348 | } | 348 | } |
349 | 349 | ||
350 | //QTime neededSaveTime = QDateTime::currentDateTime().time(); | 350 | //QTime neededSaveTime = QDateTime::currentDateTime().time(); |
351 | //mView->loadCalendars(); | 351 | //mView->loadCalendars(); |
352 | //int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 352 | //int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
353 | //qDebug("KO: Calendar loading time: %d ms",msNeeded ); | 353 | //qDebug("KO: Calendar loading time: %d ms",msNeeded ); |
354 | 354 | ||
355 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { | 355 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { |
356 | KOPrefs::instance()->setAllDefaults(); | 356 | KOPrefs::instance()->setAllDefaults(); |
357 | } | 357 | } |
358 | 358 | ||
359 | 359 | ||
360 | connect( mView, SIGNAL( tempDisableBR(bool) ), | 360 | connect( mView, SIGNAL( tempDisableBR(bool) ), |
361 | SLOT( disableBR(bool) ) ); | 361 | SLOT( disableBR(bool) ) ); |
362 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); | 362 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); |
363 | setCentralWidget( mView ); | 363 | setCentralWidget( mView ); |
364 | globalFlagBlockStartup = 0; | 364 | globalFlagBlockStartup = 0; |
365 | //mView->show(); | 365 | //mView->show(); |
366 | //delete splash; | 366 | //delete splash; |
367 | if ( newFile ) | 367 | if ( newFile ) |
368 | mView->updateConfig(); | 368 | mView->updateConfig(); |
369 | // qApp->processEvents(); | 369 | // qApp->processEvents(); |
370 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 370 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
371 | //fillSyncMenu(); | 371 | //fillSyncMenu(); |
372 | 372 | ||
373 | 373 | ||
374 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); | 374 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); |
375 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); | 375 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); |
376 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 376 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
377 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 377 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
378 | mSyncManager->setDefaultFileName( sentSyncFile()); | 378 | mSyncManager->setDefaultFileName( sentSyncFile()); |
379 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); | 379 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); |
380 | mSyncManager->fillSyncMenu(); | 380 | mSyncManager->fillSyncMenu(); |
381 | 381 | ||
382 | 382 | ||
383 | 383 | ||
384 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 384 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
385 | if ( showWarning ) { | 385 | if ( showWarning ) { |
386 | KMessageBox::information( this, | 386 | KMessageBox::information( this, |
387 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); | 387 | "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"); |
388 | qApp->processEvents(); | 388 | qApp->processEvents(); |
389 | mView->dialogManager()->showSyncOptions(); | 389 | mView->dialogManager()->showSyncOptions(); |
390 | } | 390 | } |
391 | 391 | ||
392 | //US listen for result adressed from Ka/Pi | 392 | //US listen for result adressed from Ka/Pi |
393 | 393 | ||
394 | #ifndef DESKTOP_VERSION | 394 | #ifndef DESKTOP_VERSION |
395 | infrared = 0; | 395 | infrared = 0; |
396 | #endif | 396 | #endif |
397 | updateFilterToolbar(); | 397 | updateFilterToolbar(); |
398 | updateWeek( mView->startDate() ); | 398 | updateWeek( mView->startDate() ); |
399 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), | 399 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), |
400 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); | 400 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); |
401 | mBRdisabled = false; | 401 | mBRdisabled = false; |
402 | //toggleBeamReceive(); | 402 | //toggleBeamReceive(); |
403 | 403 | ||
404 | setCaption(i18n("Loading calendar files ... please wait" )); | 404 | setCaption(i18n("Loading calendar files ... please wait" )); |
405 | mSaveDelay = 0; | 405 | mSaveDelay = 0; |
406 | QTimer::singleShot( 1, this, SLOT ( loadDataAfterStart() )); | 406 | QTimer::singleShot( 1, this, SLOT ( loadDataAfterStart() )); |
407 | } | 407 | } |
408 | MainWindow::~MainWindow() | 408 | MainWindow::~MainWindow() |
409 | { | 409 | { |
410 | //qDebug("MainWindow::~MainWindow() "); | 410 | //qDebug("MainWindow::~MainWindow() "); |
411 | //save toolbar location | 411 | //save toolbar location |
412 | delete mCalendar; | 412 | delete mCalendar; |
413 | delete mSyncManager; | 413 | delete mSyncManager; |
414 | #ifndef DESKTOP_VERSION | 414 | #ifndef DESKTOP_VERSION |
415 | if ( infrared ) | 415 | if ( infrared ) |
416 | delete infrared; | 416 | delete infrared; |
417 | #endif | 417 | #endif |
418 | 418 | ||
419 | 419 | ||
420 | } | 420 | } |
421 | 421 | ||
422 | void MainWindow::loadDataAfterStart() | 422 | void MainWindow::loadDataAfterStart() |
423 | { | 423 | { |
424 | 424 | ||
425 | qDebug("KO: Start loading files..." ); | 425 | qDebug("KO: Start loading files..." ); |
426 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 426 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
427 | mView->loadCalendars(); | 427 | mView->loadCalendars(); |
428 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 428 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
429 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); | 429 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); |
430 | //QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); | 430 | //QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); |
431 | mView->setModified( false ); | 431 | mView->setModified( false ); |
432 | mBlockAtStartup = false; | 432 | mBlockAtStartup = false; |
433 | mView->setModified( false ); | 433 | mView->setModified( false ); |
434 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); | 434 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); |
435 | processIncidenceSelection( 0 ); | 435 | processIncidenceSelection( 0 ); |
436 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), | 436 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), |
437 | SLOT( processIncidenceSelection( Incidence * ) ) ); | 437 | SLOT( processIncidenceSelection( Incidence * ) ) ); |
438 | connect( mView, SIGNAL( modifiedChanged( bool ) ), | 438 | connect( mView, SIGNAL( modifiedChanged( bool ) ), |
439 | SLOT( slotModifiedChanged( bool ) ) ); | 439 | SLOT( slotModifiedChanged( bool ) ) ); |
440 | 440 | ||
441 | #ifndef DESKTOP_VERSION | 441 | #ifndef DESKTOP_VERSION |
442 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 442 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
443 | connect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(recieve( const QCString&, const QByteArray& ))); | 443 | connect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(recieve( const QCString&, const QByteArray& ))); |
444 | disconnect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(receiveStart( const QCString&, const QByteArray& ))); | 444 | disconnect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(receiveStart( const QCString&, const QByteArray& ))); |
445 | if ( !mCStringMess.isEmpty() ) | 445 | if ( !mCStringMess.isEmpty() ) |
446 | recieve( mCStringMess, mByteData ); | 446 | recieve( mCStringMess, mByteData ); |
447 | #endif | 447 | #endif |
448 | 448 | ||
449 | 449 | ||
450 | QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); | 450 | QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); |
451 | } | 451 | } |
452 | 452 | ||
453 | void MainWindow::slotResetFocus() | 453 | void MainWindow::slotResetFocus() |
454 | { | 454 | { |
455 | //qDebug(" CalendarView::slotResetFocus() %x %x %x %x", qApp->focusWidget(), menuBar1, mView,iconToolBar); | 455 | //qDebug(" CalendarView::slotResetFocus() %x %x %x %x", qApp->focusWidget(), menuBar1, mView,iconToolBar); |
456 | mFocusLoop = 3; | 456 | mFocusLoop = 3; |
457 | QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() )); | 457 | QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() )); |
458 | } | 458 | } |
459 | void MainWindow::slotResetFocusLoop() | 459 | void MainWindow::slotResetFocusLoop() |
460 | { | 460 | { |
461 | --mFocusLoop; | 461 | --mFocusLoop; |
462 | QWidget* fw = mView->viewManager()->currentView(); | 462 | QWidget* fw = mView->viewManager()->currentView(); |
463 | if ( fw ) { | 463 | if ( fw ) { |
464 | //qDebug("loop "); | 464 | //qDebug("loop "); |
465 | fw->setFocus(); | 465 | fw->setFocus(); |
466 | if ( qApp->focusWidget() != fw && mFocusLoop > 0 ) | 466 | if ( qApp->focusWidget() != fw && mFocusLoop > 0 ) |
467 | QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() )); | 467 | QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() )); |
468 | } | 468 | } |
469 | 469 | ||
470 | } | 470 | } |
471 | void MainWindow::disableBR(bool b) | 471 | void MainWindow::disableBR(bool b) |
472 | { | 472 | { |
473 | #ifndef DESKTOP_VERSION | 473 | #ifndef DESKTOP_VERSION |
474 | if ( b ) { | 474 | if ( b ) { |
475 | if ( infrared ) { | 475 | if ( infrared ) { |
476 | toggleBeamReceive(); | 476 | toggleBeamReceive(); |
477 | mBRdisabled = true; | 477 | mBRdisabled = true; |
478 | } | 478 | } |
479 | mBRdisabled = true; | 479 | mBRdisabled = true; |
480 | } else { | 480 | } else { |
481 | if ( mBRdisabled ) { | 481 | if ( mBRdisabled ) { |
482 | mBRdisabled = false; | 482 | mBRdisabled = false; |
483 | //makes no sense,because other cal ap is probably running | 483 | //makes no sense,because other cal ap is probably running |
484 | // toggleBeamReceive(); | 484 | // toggleBeamReceive(); |
485 | } | 485 | } |
486 | } | 486 | } |
487 | #endif | 487 | #endif |
488 | 488 | ||
489 | } | 489 | } |
490 | bool MainWindow::beamReceiveEnabled() | 490 | bool MainWindow::beamReceiveEnabled() |
491 | { | 491 | { |
492 | #ifndef DESKTOP_VERSION | 492 | #ifndef DESKTOP_VERSION |
493 | return ( infrared != 0 ); | 493 | return ( infrared != 0 ); |
494 | #endif | 494 | #endif |
495 | return false; | 495 | return false; |
496 | } | 496 | } |
497 | 497 | ||
498 | void MainWindow::toggleBeamReceive() | 498 | void MainWindow::toggleBeamReceive() |
499 | { | 499 | { |
500 | if ( mBRdisabled ) | 500 | if ( mBRdisabled ) |
501 | return; | 501 | return; |
502 | #ifndef DESKTOP_VERSION | 502 | #ifndef DESKTOP_VERSION |
503 | if ( infrared ) { | 503 | if ( infrared ) { |
504 | qDebug("KO: Disable BeamReceive "); | 504 | qDebug("KO: Disable BeamReceive "); |
505 | delete infrared; | 505 | delete infrared; |
506 | infrared = 0; | 506 | infrared = 0; |
507 | brAction->setOn(false); | 507 | brAction->setOn(false); |
508 | return; | 508 | return; |
509 | } | 509 | } |
510 | qDebug("KO: Enable BeamReceive "); | 510 | qDebug("KO: Enable BeamReceive "); |
511 | brAction->setOn(true); | 511 | brAction->setOn(true); |
512 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; | 512 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; |
513 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); | 513 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); |
514 | #endif | 514 | #endif |
515 | } | 515 | } |
516 | void MainWindow::showMaximized () | 516 | void MainWindow::showMaximized () |
517 | { | 517 | { |
518 | #ifndef DESKTOP_VERSION | 518 | #ifndef DESKTOP_VERSION |
519 | if ( ! globalFlagBlockStartup ) | 519 | if ( ! globalFlagBlockStartup ) |
520 | if ( mClosed ) | 520 | if ( mClosed ) |
521 | mView->goToday(); | 521 | mView->goToday(); |
522 | #endif | 522 | #endif |
523 | QWidget::showMaximized () ; | 523 | QWidget::showMaximized () ; |
524 | mClosed = false; | 524 | mClosed = false; |
525 | } | 525 | } |
526 | |||
527 | bool MainWindow::askForQuitOnSaveError() | ||
528 | { | ||
529 | bool retval = false; | ||
530 | switch( QMessageBox::information( this, "KO/Pi", | ||
531 | i18n("Error saving data") + "!\n" + | ||
532 | i18n("You can save all data\nto another file via\nFile->Export->Export All Data") + "!\n" + | ||
533 | i18n("Do you really want\nto close KO/Pi?"), | ||
534 | i18n(" Yes, close "), i18n("No"), | ||
535 | 0, 1 ) ) { | ||
536 | case 0: | ||
537 | retval = true; | ||
538 | break; | ||
539 | default: | ||
540 | break; | ||
541 | } | ||
542 | return retval; | ||
543 | } | ||
544 | |||
526 | void MainWindow::closeEvent( QCloseEvent* ce ) | 545 | void MainWindow::closeEvent( QCloseEvent* ce ) |
527 | { | 546 | { |
528 | 547 | ||
529 | 548 | ||
530 | 549 | ||
531 | if ( ! KOPrefs::instance()->mAskForQuit ) { | 550 | if ( ! KOPrefs::instance()->mAskForQuit ) { |
532 | saveOnClose(); | 551 | saveOnClose(); |
533 | if ( mCalendarModifiedFlag ) { | 552 | if ( mCalendarModifiedFlag && !askForQuitOnSaveError() ) { |
534 | ce->ignore(); | 553 | ce->ignore(); |
535 | return; | 554 | return; |
536 | } | 555 | } |
537 | mClosed = true; | 556 | mClosed = true; |
538 | ce->accept(); | 557 | ce->accept(); |
539 | return; | 558 | return; |
540 | 559 | ||
541 | } | 560 | } |
542 | 561 | ||
543 | switch( QMessageBox::information( this, "KO/Pi", | 562 | switch( QMessageBox::information( this, "KO/Pi", |
544 | i18n("Do you really want\nto close KO/Pi?"), | 563 | i18n("Do you really want\nto close KO/Pi?"), |
545 | i18n("Close"), i18n("No"), | 564 | i18n("Close"), i18n("No"), |
546 | 0, 0 ) ) { | 565 | 0, 0 ) ) { |
547 | case 0: | 566 | case 0: |
548 | saveOnClose(); | 567 | saveOnClose(); |
549 | if ( mCalendarModifiedFlag ) { | 568 | if ( mCalendarModifiedFlag && !askForQuitOnSaveError() ) { |
550 | ce->ignore(); | 569 | ce->ignore(); |
551 | return; | 570 | return; |
552 | } | 571 | } |
553 | mClosed = true; | 572 | mClosed = true; |
554 | ce->accept(); | 573 | ce->accept(); |
555 | break; | 574 | break; |
556 | case 1: | 575 | case 1: |
557 | ce->ignore(); | 576 | ce->ignore(); |
558 | break; | 577 | break; |
559 | case 2: | 578 | case 2: |
560 | 579 | ||
561 | default: | 580 | default: |
562 | break; | 581 | break; |
563 | } | 582 | } |
564 | 583 | ||
565 | 584 | ||
566 | } | 585 | } |
567 | void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) | 586 | void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) |
568 | { | 587 | { |
569 | qDebug("KO: QCOP start message received: %s ", cmsg.data() ); | 588 | qDebug("KO: QCOP start message received: %s ", cmsg.data() ); |
570 | mCStringMess = cmsg; | 589 | mCStringMess = cmsg; |
571 | mByteData = data; | 590 | mByteData = data; |
572 | } | 591 | } |
573 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | 592 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) |
574 | { | 593 | { |
575 | QDataStream stream( data, IO_ReadOnly ); | 594 | QDataStream stream( data, IO_ReadOnly ); |
576 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); | 595 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); |
577 | //QString datamess; | 596 | //QString datamess; |
578 | //qDebug("message "); | 597 | //qDebug("message "); |
579 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); | 598 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); |
580 | 599 | ||
581 | if ( cmsg == "setDocument(QString)" ) { | 600 | if ( cmsg == "setDocument(QString)" ) { |
582 | QDataStream stream( data, IO_ReadOnly ); | 601 | QDataStream stream( data, IO_ReadOnly ); |
583 | QString fileName; | 602 | QString fileName; |
584 | stream >> fileName; | 603 | stream >> fileName; |
585 | //qDebug("filename %s ", fileName.latin1()); | 604 | //qDebug("filename %s ", fileName.latin1()); |
586 | showMaximized(); | 605 | showMaximized(); |
587 | raise(); | 606 | raise(); |
588 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; | 607 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; |
589 | mSyncManager->slotSyncMenu( 1002 ); | 608 | mSyncManager->slotSyncMenu( 1002 ); |
590 | return; | 609 | return; |
591 | } | 610 | } |
592 | 611 | ||
593 | if ( cmsg == "-writeFile" ) { | 612 | if ( cmsg == "-writeFile" ) { |
594 | // I made from the "-writeFile" an "-writeAlarm" | 613 | // I made from the "-writeFile" an "-writeAlarm" |
595 | mView->viewManager()->showWhatsNextView(); | 614 | mView->viewManager()->showWhatsNextView(); |
596 | mCalendar->checkAlarmForIncidence( 0, true); | 615 | mCalendar->checkAlarmForIncidence( 0, true); |
597 | showMaximized(); | 616 | showMaximized(); |
598 | raise(); | 617 | raise(); |
599 | return; | 618 | return; |
600 | 619 | ||
601 | } | 620 | } |
602 | if ( cmsg == "-writeFileSilent" ) { | 621 | if ( cmsg == "-writeFileSilent" ) { |
603 | // I made from the "-writeFile" an "-writeAlarm" | 622 | // I made from the "-writeFile" an "-writeAlarm" |
604 | // mView->viewManager()->showWhatsNextView(); | 623 | // mView->viewManager()->showWhatsNextView(); |
605 | mCalendar->checkAlarmForIncidence( 0, true); | 624 | mCalendar->checkAlarmForIncidence( 0, true); |
606 | //showMaximized(); | 625 | //showMaximized(); |
607 | //raise(); | 626 | //raise(); |
608 | hide(); | 627 | hide(); |
609 | return; | 628 | return; |
610 | } | 629 | } |
611 | if ( cmsg == "-newCountdown" ) { | 630 | if ( cmsg == "-newCountdown" ) { |
612 | qDebug("newCountdown "); | 631 | qDebug("newCountdown "); |
613 | 632 | ||
614 | } | 633 | } |
615 | QString msg ; | 634 | QString msg ; |
616 | QString allmsg = cmsg; | 635 | QString allmsg = cmsg; |
617 | while ( allmsg.length() > 0 ) { | 636 | while ( allmsg.length() > 0 ) { |
618 | int nextC = allmsg.find( "-", 1 ); | 637 | int nextC = allmsg.find( "-", 1 ); |
619 | if ( nextC == -1 ) { | 638 | if ( nextC == -1 ) { |
620 | msg = allmsg; | 639 | msg = allmsg; |
621 | allmsg = ""; | 640 | allmsg = ""; |
622 | } else{ | 641 | } else{ |
623 | msg = allmsg.left( nextC ); | 642 | msg = allmsg.left( nextC ); |
624 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); | 643 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); |
625 | } | 644 | } |
626 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); | 645 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); |
627 | if ( msg == "-newEvent" ) { | 646 | if ( msg == "-newEvent" ) { |
628 | QTimer::singleShot( 0, mView, SLOT ( newEvent())); | 647 | QTimer::singleShot( 0, mView, SLOT ( newEvent())); |
629 | } | 648 | } |
630 | if ( msg == "-newTodo" ) { | 649 | if ( msg == "-newTodo" ) { |
631 | QTimer::singleShot( 0, mView, SLOT ( newTodo())); | 650 | QTimer::singleShot( 0, mView, SLOT ( newTodo())); |
632 | } | 651 | } |
633 | if ( msg == "-showWN" ) { | 652 | if ( msg == "-showWN" ) { |
634 | mView->viewManager()->showWhatsNextView(); | 653 | mView->viewManager()->showWhatsNextView(); |
635 | } | 654 | } |
636 | if ( msg == "-showTodo" ) { | 655 | if ( msg == "-showTodo" ) { |
637 | mView->viewManager()->showTodoView(); | 656 | mView->viewManager()->showTodoView(); |
638 | } | 657 | } |
639 | if ( msg == "-showList" ) { | 658 | if ( msg == "-showList" ) { |
640 | mView->viewManager()->showListView(); | 659 | mView->viewManager()->showListView(); |
641 | } | 660 | } |
642 | else if ( msg == "-showDay" ) { | 661 | else if ( msg == "-showDay" ) { |
643 | mView->viewManager()->showDayView(); | 662 | mView->viewManager()->showDayView(); |
644 | } | 663 | } |
645 | else if ( msg == "-showWWeek" ) { | 664 | else if ( msg == "-showWWeek" ) { |
646 | mView->viewManager()->showWorkWeekView(); | 665 | mView->viewManager()->showWorkWeekView(); |
647 | } | 666 | } |
648 | else if ( msg == "-ringSync" ) { | 667 | else if ( msg == "-ringSync" ) { |
649 | QTimer::singleShot( 0, this, SLOT (startMultiSync())); | 668 | QTimer::singleShot( 0, this, SLOT (startMultiSync())); |
650 | } | 669 | } |
651 | else if ( msg == "-showWeek" ) { | 670 | else if ( msg == "-showWeek" ) { |
652 | mView->viewManager()->showWeekView(); | 671 | mView->viewManager()->showWeekView(); |
653 | } | 672 | } |
654 | else if ( msg == "-showTodo" ) { | 673 | else if ( msg == "-showTodo" ) { |
655 | mView->viewManager()->showTodoView(); | 674 | mView->viewManager()->showTodoView(); |
656 | } | 675 | } |
657 | else if ( msg == "-showJournal" ) { | 676 | else if ( msg == "-showJournal" ) { |
658 | mView->dateNavigator()->selectDates( 1 ); | 677 | mView->dateNavigator()->selectDates( 1 ); |
659 | mView->dateNavigator()->selectToday(); | 678 | mView->dateNavigator()->selectToday(); |
660 | mView->viewManager()->showJournalView(); | 679 | mView->viewManager()->showJournalView(); |
661 | } | 680 | } |
662 | else if ( msg == "-showKO" ) { | 681 | else if ( msg == "-showKO" ) { |
663 | mView->viewManager()->showNextXView(); | 682 | mView->viewManager()->showNextXView(); |
664 | } | 683 | } |
665 | else if ( msg == "-showWNext" ) { | 684 | else if ( msg == "-showWNext" ) { |
666 | mView->viewManager()->showWhatsNextView(); | 685 | mView->viewManager()->showWhatsNextView(); |
667 | } | 686 | } |
668 | else if ( msg == "nextView()" ) { | 687 | else if ( msg == "nextView()" ) { |
669 | mView->viewManager()->showNextView(); | 688 | mView->viewManager()->showNextView(); |
670 | } | 689 | } |
671 | else if ( msg == "-showNextXView" ) { | 690 | else if ( msg == "-showNextXView" ) { |
672 | mView->viewManager()->showNextXView(); | 691 | mView->viewManager()->showNextXView(); |
673 | } | 692 | } |
674 | 693 | ||
675 | 694 | ||
676 | } | 695 | } |
677 | 696 | ||
678 | showMaximized(); | 697 | showMaximized(); |
679 | raise(); | 698 | raise(); |
680 | } | 699 | } |
681 | void MainWindow::startMultiSync() | 700 | void MainWindow::startMultiSync() |
682 | { | 701 | { |
683 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); | 702 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); |
684 | if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), | 703 | if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), |
685 | question, | 704 | question, |
686 | i18n("Yes"), i18n("No"), | 705 | i18n("Yes"), i18n("No"), |
687 | 0, 0 ) != 0 ) { | 706 | 0, 0 ) != 0 ) { |
688 | setCaption(i18n("Aborted! Nothing synced!")); | 707 | setCaption(i18n("Aborted! Nothing synced!")); |
689 | return; | 708 | return; |
690 | } | 709 | } |
691 | mSyncManager->multiSync( false ); | 710 | mSyncManager->multiSync( false ); |
692 | #ifndef DESKTOP_VERSION | 711 | #ifndef DESKTOP_VERSION |
693 | QCopEnvelope e("QPE/Application/kapi", "doRingSync"); | 712 | QCopEnvelope e("QPE/Application/kapi", "doRingSync"); |
694 | #endif | 713 | #endif |
695 | } | 714 | } |
696 | QPixmap MainWindow::loadPixmap( QString name ) | 715 | QPixmap MainWindow::loadPixmap( QString name ) |
697 | { | 716 | { |
698 | return SmallIcon( name ); | 717 | return SmallIcon( name ); |
699 | 718 | ||
700 | } | 719 | } |
701 | void MainWindow::setUsesBigPixmaps ( bool b ) | 720 | void MainWindow::setUsesBigPixmaps ( bool b ) |
702 | { | 721 | { |
703 | qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); | 722 | qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); |
704 | if ( b ) | 723 | if ( b ) |
705 | qDebug("KO: BigPixmaps are not supported "); | 724 | qDebug("KO: BigPixmaps are not supported "); |
706 | } | 725 | } |
707 | void MainWindow::initActions() | 726 | void MainWindow::initActions() |
708 | { | 727 | { |
709 | //KOPrefs::instance()->mShowFullMenu | 728 | //KOPrefs::instance()->mShowFullMenu |
710 | iconToolBar->clear(); | 729 | iconToolBar->clear(); |
711 | KOPrefs *p = KOPrefs::instance(); | 730 | KOPrefs *p = KOPrefs::instance(); |
712 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); | 731 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); |
713 | 732 | ||
714 | QPopupMenu *viewMenu = new QPopupMenu( this ); | 733 | QPopupMenu *viewMenu = new QPopupMenu( this ); |
715 | QPopupMenu *actionMenu = new QPopupMenu( this ); | 734 | QPopupMenu *actionMenu = new QPopupMenu( this ); |
716 | mCurrentItemMenu = new QPopupMenu ( this ); | 735 | mCurrentItemMenu = new QPopupMenu ( this ); |
717 | QPopupMenu *nextConflictMenu = new QPopupMenu ( this ); | 736 | QPopupMenu *nextConflictMenu = new QPopupMenu ( this ); |
718 | QPopupMenu *importMenu = new QPopupMenu( this ); | 737 | QPopupMenu *importMenu = new QPopupMenu( this ); |
719 | QPopupMenu *importMenu_X = new QPopupMenu( this ); | 738 | QPopupMenu *importMenu_X = new QPopupMenu( this ); |
720 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); | 739 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); |
721 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); | 740 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); |
722 | selectFilterMenu = new QPopupMenu( this ); | 741 | selectFilterMenu = new QPopupMenu( this ); |
723 | selectFilterMenu->setCheckable( true ); | 742 | selectFilterMenu->setCheckable( true ); |
724 | syncMenu = new QPopupMenu( this ); | 743 | syncMenu = new QPopupMenu( this ); |
725 | configureAgendaMenu = new QPopupMenu( this ); | 744 | configureAgendaMenu = new QPopupMenu( this ); |
726 | configureToolBarMenu = new QPopupMenu( this ); | 745 | configureToolBarMenu = new QPopupMenu( this ); |
727 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 746 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
728 | QIconSet icon; | 747 | QIconSet icon; |
729 | int pixWid = 22, pixHei = 22; | 748 | int pixWid = 22, pixHei = 22; |
730 | QString pathString = ""; | 749 | QString pathString = ""; |
731 | if ( !p->mToolBarMiniIcons ) { | 750 | if ( !p->mToolBarMiniIcons ) { |
732 | if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { | 751 | if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { |
733 | pathString += "icons16/"; | 752 | pathString += "icons16/"; |
734 | pixWid = 18; pixHei = 16; | 753 | pixWid = 18; pixHei = 16; |
735 | } | 754 | } |
736 | } else { | 755 | } else { |
737 | pathString += "iconsmini/"; | 756 | pathString += "iconsmini/"; |
738 | pixWid = 18; pixHei = 16; | 757 | pixWid = 18; pixHei = 16; |
739 | } | 758 | } |
740 | 759 | ||
741 | if ( KOPrefs::instance()->mShowFullMenu ) { | 760 | if ( KOPrefs::instance()->mShowFullMenu ) { |
742 | menuBar1 = new KMenuBar( this );//menuBar(); | 761 | menuBar1 = new KMenuBar( this );//menuBar(); |
743 | //setMenuBar( menuBar1 ); | 762 | //setMenuBar( menuBar1 ); |
744 | menuBar1->show(); | 763 | menuBar1->show(); |
745 | menuBar1->insertItem( i18n("File"), importMenu ); | 764 | menuBar1->insertItem( i18n("File"), importMenu ); |
746 | menuBar1->insertItem( i18n("View"), viewMenu ); | 765 | menuBar1->insertItem( i18n("View"), viewMenu ); |
747 | menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); | 766 | menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); |
748 | menuBar1->insertItem( i18n("Action"), actionMenu ); | 767 | menuBar1->insertItem( i18n("Action"), actionMenu ); |
749 | #ifdef DESKTOP_VERSION | 768 | #ifdef DESKTOP_VERSION |
750 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); | 769 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); |
751 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 770 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
752 | #else | 771 | #else |
753 | menuBar1->insertItem( i18n("Sync"), syncMenu ); | 772 | menuBar1->insertItem( i18n("Sync"), syncMenu ); |
754 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); | 773 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); |
755 | #endif | 774 | #endif |
756 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 775 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
757 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); | 776 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); |
758 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 777 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
759 | } else { | 778 | } else { |
760 | menuBar1 = new KMenuBar( iconToolBar ); | 779 | menuBar1 = new KMenuBar( iconToolBar ); |
761 | QPopupMenu *menuBar = new QPopupMenu( this ); | 780 | QPopupMenu *menuBar = new QPopupMenu( this ); |
762 | icon = loadPixmap( pathString + "z_menu" ); | 781 | icon = loadPixmap( pathString + "z_menu" ); |
763 | menuBar1->insertItem( icon.pixmap(), menuBar); | 782 | menuBar1->insertItem( icon.pixmap(), menuBar); |
764 | //menuBar1->insertItem( i18n("ME"), menuBar); | 783 | //menuBar1->insertItem( i18n("ME"), menuBar); |
765 | menuBar->insertItem( i18n("File"), importMenu ); | 784 | menuBar->insertItem( i18n("File"), importMenu ); |
766 | menuBar->insertItem( i18n("View"), viewMenu ); | 785 | menuBar->insertItem( i18n("View"), viewMenu ); |
767 | menuBar->insertItem( i18n("Edit"), mCurrentItemMenu ); | 786 | menuBar->insertItem( i18n("Edit"), mCurrentItemMenu ); |
768 | menuBar->insertItem( i18n("Action"), actionMenu ); | 787 | menuBar->insertItem( i18n("Action"), actionMenu ); |
769 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); | 788 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); |
770 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 789 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
771 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 790 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
772 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 791 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
773 | menuBar->insertItem( i18n("Help"), helpMenu ); | 792 | menuBar->insertItem( i18n("Help"), helpMenu ); |
774 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 793 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
775 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 794 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
776 | connect ( menuBar, SIGNAL( aboutToHide () ), this, SLOT ( slotResetFocus() ) ); | 795 | connect ( menuBar, SIGNAL( aboutToHide () ), this, SLOT ( slotResetFocus() ) ); |
777 | } | 796 | } |
778 | connect ( menuBar1, SIGNAL( lostFocus () ), this, SLOT ( slotResetFocus() ) ); | 797 | connect ( menuBar1, SIGNAL( lostFocus () ), this, SLOT ( slotResetFocus() ) ); |
779 | //connect ( menuBar1, SIGNAL( lostFocus () ), this, SLOT ( slotResetFocus() ) ); | 798 | //connect ( menuBar1, SIGNAL( lostFocus () ), this, SLOT ( slotResetFocus() ) ); |
780 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 799 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
781 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); | 800 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); |
782 | 801 | ||
783 | 802 | ||
784 | mWeekBgColor = iconToolBar->backgroundColor(); | 803 | mWeekBgColor = iconToolBar->backgroundColor(); |
785 | mWeekPixmap.resize( pixWid , pixHei ); | 804 | mWeekPixmap.resize( pixWid , pixHei ); |
786 | mWeekPixmap.fill( mWeekBgColor ); | 805 | mWeekPixmap.fill( mWeekBgColor ); |
787 | icon = mWeekPixmap; | 806 | icon = mWeekPixmap; |
788 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); | 807 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); |
789 | if ( p-> mShowIconWeekNum ) | 808 | if ( p-> mShowIconWeekNum ) |
790 | mWeekAction->addTo( iconToolBar ); | 809 | mWeekAction->addTo( iconToolBar ); |
791 | mWeekFont = font(); | 810 | mWeekFont = font(); |
792 | 811 | ||
793 | int fontPoint = mWeekFont.pointSize(); | 812 | int fontPoint = mWeekFont.pointSize(); |
794 | QFontMetrics f( mWeekFont ); | 813 | QFontMetrics f( mWeekFont ); |
795 | int fontWid = f.width( "30" ); | 814 | int fontWid = f.width( "30" ); |
796 | while ( fontWid > pixWid ) { | 815 | while ( fontWid > pixWid ) { |
797 | --fontPoint; | 816 | --fontPoint; |
798 | mWeekFont.setPointSize( fontPoint ); | 817 | mWeekFont.setPointSize( fontPoint ); |
799 | QFontMetrics f( mWeekFont ); | 818 | QFontMetrics f( mWeekFont ); |
800 | fontWid = f.width( "30" ); | 819 | fontWid = f.width( "30" ); |
801 | //qDebug("dec-- "); | 820 | //qDebug("dec-- "); |
802 | } | 821 | } |
803 | 822 | ||
804 | connect( mWeekAction, SIGNAL( activated() ), | 823 | connect( mWeekAction, SIGNAL( activated() ), |
805 | this, SLOT( weekAction() ) ); | 824 | this, SLOT( weekAction() ) ); |
806 | 825 | ||
807 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); | 826 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); |
808 | if ( p->mShowIconFilterview ) { | 827 | if ( p->mShowIconFilterview ) { |
809 | icon = loadPixmap( pathString + "filter" ); | 828 | icon = loadPixmap( pathString + "filter" ); |
810 | actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); | 829 | actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); |
811 | connect( actionFilterMenuTB, SIGNAL( activated() ), | 830 | connect( actionFilterMenuTB, SIGNAL( activated() ), |
812 | this, SLOT( fillFilterMenuTB() ) ); | 831 | this, SLOT( fillFilterMenuTB() ) ); |
813 | actionFilterMenuTB->addTo( iconToolBar ); | 832 | actionFilterMenuTB->addTo( iconToolBar ); |
814 | selectFilterMenuTB = new QPopupMenu( this ); | 833 | selectFilterMenuTB = new QPopupMenu( this ); |
815 | selectFilterMenuTB->setCheckable( true ); | 834 | selectFilterMenuTB->setCheckable( true ); |
816 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 835 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
817 | } | 836 | } |
818 | 837 | ||
819 | //#endif | 838 | //#endif |
820 | // ****************** | 839 | // ****************** |
821 | QAction *action; | 840 | QAction *action; |
822 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 841 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
823 | configureToolBarMenu->setCheckable( true ); | 842 | configureToolBarMenu->setCheckable( true ); |
824 | 843 | ||
825 | 844 | ||
826 | configureAgendaMenu->setCheckable( true ); | 845 | configureAgendaMenu->setCheckable( true ); |
827 | int iii ; | 846 | int iii ; |
828 | for ( iii = 1;iii<= 10 ;++iii ){ | 847 | for ( iii = 1;iii<= 10 ;++iii ){ |
829 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); | 848 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); |
830 | } | 849 | } |
831 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 850 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
832 | 851 | ||
833 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), | 852 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), |
834 | this, SLOT( showConfigureAgenda( ) ) ); | 853 | this, SLOT( showConfigureAgenda( ) ) ); |
835 | icon = loadPixmap( pathString + "today" ); | 854 | icon = loadPixmap( pathString + "today" ); |
836 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 855 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
837 | today_action->addTo( actionMenu ); | 856 | today_action->addTo( actionMenu ); |
838 | connect( today_action, SIGNAL( activated() ), | 857 | connect( today_action, SIGNAL( activated() ), |
839 | mView, SLOT( goToday() ) ); | 858 | mView, SLOT( goToday() ) ); |
840 | 859 | ||
841 | icon = loadPixmap( pathString + "picker" ); | 860 | icon = loadPixmap( pathString + "picker" ); |
842 | QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); | 861 | QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); |
843 | dPickerAction->addTo( actionMenu ); | 862 | dPickerAction->addTo( actionMenu ); |
844 | connect( dPickerAction, SIGNAL( activated() ), | 863 | connect( dPickerAction, SIGNAL( activated() ), |
845 | mView, SLOT( showDatePicker() ) ); | 864 | mView, SLOT( showDatePicker() ) ); |
846 | 865 | ||
847 | icon = loadPixmap( pathString + "search" ); | 866 | icon = loadPixmap( pathString + "search" ); |
848 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 867 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); |
849 | search_action->addTo( actionMenu ); | 868 | search_action->addTo( actionMenu ); |
850 | connect( search_action, SIGNAL( activated() ), | 869 | connect( search_action, SIGNAL( activated() ), |
851 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 870 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
852 | actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu ); | 871 | actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu ); |
853 | 872 | ||
854 | action = new QAction( "Undo Delete", i18n("All events"), 0, this ); | 873 | action = new QAction( "Undo Delete", i18n("All events"), 0, this ); |
855 | action->addTo( nextConflictMenu ); | 874 | action->addTo( nextConflictMenu ); |
856 | connect( action, SIGNAL( activated() ), | 875 | connect( action, SIGNAL( activated() ), |
857 | mView, SLOT( conflictAll() ) ); | 876 | mView, SLOT( conflictAll() ) ); |
858 | 877 | ||
859 | action = new QAction( "Undo Delete", i18n("Allday events"), 0, this ); | 878 | action = new QAction( "Undo Delete", i18n("Allday events"), 0, this ); |
860 | action->addTo( nextConflictMenu ); | 879 | action->addTo( nextConflictMenu ); |
861 | connect( action, SIGNAL( activated() ), | 880 | connect( action, SIGNAL( activated() ), |
862 | mView, SLOT( conflictAllday() ) ); | 881 | mView, SLOT( conflictAllday() ) ); |
863 | 882 | ||
864 | action = new QAction( "Undo Delete", i18n("Events with time"), 0, this ); | 883 | action = new QAction( "Undo Delete", i18n("Events with time"), 0, this ); |
865 | action->addTo( nextConflictMenu ); | 884 | action->addTo( nextConflictMenu ); |
866 | connect( action, SIGNAL( activated() ), | 885 | connect( action, SIGNAL( activated() ), |
867 | mView, SLOT( conflictNotAll() ) ); | 886 | mView, SLOT( conflictNotAll() ) ); |
868 | 887 | ||
869 | actionMenu->insertSeparator(); | 888 | actionMenu->insertSeparator(); |
870 | 889 | ||
871 | icon = loadPixmap( pathString + "newevent" ); | 890 | icon = loadPixmap( pathString + "newevent" ); |
872 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 891 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
873 | ne_action->addTo( mCurrentItemMenu ); | 892 | ne_action->addTo( mCurrentItemMenu ); |
874 | connect( ne_action, SIGNAL( activated() ), | 893 | connect( ne_action, SIGNAL( activated() ), |
875 | mView, SLOT( newEvent() ) ); | 894 | mView, SLOT( newEvent() ) ); |
876 | icon = loadPixmap( pathString + "newtodo" ); | 895 | icon = loadPixmap( pathString + "newtodo" ); |
877 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 896 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
878 | nt_action->addTo( mCurrentItemMenu ); | 897 | nt_action->addTo( mCurrentItemMenu ); |
879 | connect( nt_action, SIGNAL( activated() ), | 898 | connect( nt_action, SIGNAL( activated() ), |
880 | mView, SLOT( newTodo() ) ); | 899 | mView, SLOT( newTodo() ) ); |
881 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 900 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, |
882 | this ); | 901 | this ); |
883 | mNewSubTodoAction->addTo( mCurrentItemMenu ); | 902 | mNewSubTodoAction->addTo( mCurrentItemMenu ); |
884 | connect( mNewSubTodoAction, SIGNAL( activated() ), | 903 | connect( mNewSubTodoAction, SIGNAL( activated() ), |
885 | mView, SLOT( newSubTodo() ) ); | 904 | mView, SLOT( newSubTodo() ) ); |
886 | 905 | ||
887 | mCurrentItemMenu->insertSeparator(); | 906 | mCurrentItemMenu->insertSeparator(); |
888 | icon = loadPixmap( pathString + "newevent" ); | 907 | icon = loadPixmap( pathString + "newevent" ); |
889 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 908 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
890 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); | 909 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); |
891 | configureToolBarMenu->insertSeparator(); | 910 | configureToolBarMenu->insertSeparator(); |
892 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); | 911 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); |
893 | configureToolBarMenu->insertSeparator(); | 912 | configureToolBarMenu->insertSeparator(); |
894 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); | 913 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); |
895 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 914 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
896 | icon = loadPixmap( pathString + "newtodo" ); | 915 | icon = loadPixmap( pathString + "newtodo" ); |
897 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 916 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
898 | 917 | ||
899 | //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); | 918 | //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); |
900 | mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this ); | 919 | mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this ); |
901 | mShowAction->addTo( mCurrentItemMenu ); | 920 | mShowAction->addTo( mCurrentItemMenu ); |
902 | connect( mShowAction, SIGNAL( activated() ), | 921 | connect( mShowAction, SIGNAL( activated() ), |
903 | mView, SLOT( showIncidence() ) ); | 922 | mView, SLOT( showIncidence() ) ); |
904 | 923 | ||
905 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); | 924 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); |
906 | mEditAction->addTo( mCurrentItemMenu ); | 925 | mEditAction->addTo( mCurrentItemMenu ); |
907 | connect( mEditAction, SIGNAL( activated() ), | 926 | connect( mEditAction, SIGNAL( activated() ), |
908 | mView, SLOT( editIncidence() ) ); | 927 | mView, SLOT( editIncidence() ) ); |
909 | 928 | ||
910 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); | 929 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); |
911 | mDeleteAction->addTo( mCurrentItemMenu ); | 930 | mDeleteAction->addTo( mCurrentItemMenu ); |
912 | connect( mDeleteAction, SIGNAL( activated() ), | 931 | connect( mDeleteAction, SIGNAL( activated() ), |
913 | mView, SLOT( deleteIncidence() ) ); | 932 | mView, SLOT( deleteIncidence() ) ); |
914 | 933 | ||
915 | 934 | ||
916 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); | 935 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); |
917 | mCloneAction->addTo( mCurrentItemMenu ); | 936 | mCloneAction->addTo( mCurrentItemMenu ); |
918 | connect( mCloneAction, SIGNAL( activated() ), | 937 | connect( mCloneAction, SIGNAL( activated() ), |
919 | mView, SLOT( cloneIncidence() ) ); | 938 | mView, SLOT( cloneIncidence() ) ); |
920 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); | 939 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); |
921 | mMoveAction->addTo( mCurrentItemMenu ); | 940 | mMoveAction->addTo( mCurrentItemMenu ); |
922 | connect( mMoveAction, SIGNAL( activated() ), | 941 | connect( mMoveAction, SIGNAL( activated() ), |
923 | mView, SLOT( moveIncidence() ) ); | 942 | mView, SLOT( moveIncidence() ) ); |
924 | #ifndef DESKTOP_VERSION | 943 | #ifndef DESKTOP_VERSION |
925 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); | 944 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); |
926 | mBeamAction->addTo(mCurrentItemMenu ); | 945 | mBeamAction->addTo(mCurrentItemMenu ); |
927 | connect( mBeamAction, SIGNAL( activated() ), | 946 | connect( mBeamAction, SIGNAL( activated() ), |
928 | mView, SLOT( beamIncidence() ) ); | 947 | mView, SLOT( beamIncidence() ) ); |
929 | #endif | 948 | #endif |
930 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); | 949 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); |
931 | mCancelAction->addTo( mCurrentItemMenu ); | 950 | mCancelAction->addTo( mCurrentItemMenu ); |
932 | connect( mCancelAction, SIGNAL( activated() ), | 951 | connect( mCancelAction, SIGNAL( activated() ), |
933 | mView, SLOT( toggleCancelIncidence() ) ); | 952 | mView, SLOT( toggleCancelIncidence() ) ); |
934 | 953 | ||
935 | 954 | ||
936 | mCurrentItemMenu->insertSeparator(); | 955 | mCurrentItemMenu->insertSeparator(); |
937 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | 956 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
938 | action->addTo( mCurrentItemMenu ); | 957 | action->addTo( mCurrentItemMenu ); |
939 | connect( action, SIGNAL( activated() ), | 958 | connect( action, SIGNAL( activated() ), |
940 | mView, SLOT( undo_delete() ) ); | 959 | mView, SLOT( undo_delete() ) ); |
941 | 960 | ||
942 | // *********************** | 961 | // *********************** |
943 | if ( KOPrefs::instance()->mVerticalScreen ) { | 962 | if ( KOPrefs::instance()->mVerticalScreen ) { |
944 | icon = SmallIcon( "1updownarrow" ); | 963 | icon = SmallIcon( "1updownarrow" ); |
945 | } else { | 964 | } else { |
946 | icon = SmallIcon("1leftrightarrow" ); | 965 | icon = SmallIcon("1leftrightarrow" ); |
947 | } | 966 | } |
948 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); | 967 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); |
949 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); | 968 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); |
950 | FSaction->addTo( viewMenu ); | 969 | FSaction->addTo( viewMenu ); |
951 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); | 970 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); |
952 | 971 | ||
953 | 972 | ||
954 | icon = loadPixmap( pathString + "filter" ); | 973 | icon = loadPixmap( pathString + "filter" ); |
955 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); | 974 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); |
956 | icon = loadPixmap( pathString + "configure" ); | 975 | icon = loadPixmap( pathString + "configure" ); |
957 | action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); | 976 | action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); |
958 | action->addTo( viewMenu ); | 977 | action->addTo( viewMenu ); |
959 | connect( action, SIGNAL( activated() ), | 978 | connect( action, SIGNAL( activated() ), |
960 | mView, SLOT( toggleFilter() ) ); | 979 | mView, SLOT( toggleFilter() ) ); |
961 | mToggleFilter = action; | 980 | mToggleFilter = action; |
962 | icon = loadPixmap( pathString + "navi" ); | 981 | icon = loadPixmap( pathString + "navi" ); |
963 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); | 982 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); |
964 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 983 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
965 | action->addTo( viewMenu ); | 984 | action->addTo( viewMenu ); |
966 | connect( action, SIGNAL( activated() ), | 985 | connect( action, SIGNAL( activated() ), |
967 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 986 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
968 | mToggleNav = action ; | 987 | mToggleNav = action ; |
969 | icon = loadPixmap( pathString + "allday" ); | 988 | icon = loadPixmap( pathString + "allday" ); |
970 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); | 989 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); |
971 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); | 990 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); |
972 | action->addTo( viewMenu ); | 991 | action->addTo( viewMenu ); |
973 | connect( action, SIGNAL( activated() ), | 992 | connect( action, SIGNAL( activated() ), |
974 | mView, SLOT( toggleAllDaySize() ) ); | 993 | mView, SLOT( toggleAllDaySize() ) ); |
975 | mToggleAllday = action; | 994 | mToggleAllday = action; |
976 | 995 | ||
977 | 996 | ||
978 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 997 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
979 | mToggleNav, SLOT( setEnabled ( bool ) ) ); | 998 | mToggleNav, SLOT( setEnabled ( bool ) ) ); |
980 | //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 999 | //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
981 | // mToggleFilter, SLOT( setEnabled ( bool ) ) ); | 1000 | // mToggleFilter, SLOT( setEnabled ( bool ) ) ); |
982 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 1001 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
983 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); | 1002 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); |
984 | // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 1003 | // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
985 | // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); | 1004 | // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); |
986 | 1005 | ||
987 | 1006 | ||
988 | dPickerAction->addTo( iconToolBar ); | 1007 | dPickerAction->addTo( iconToolBar ); |
989 | viewMenu->insertSeparator(); | 1008 | viewMenu->insertSeparator(); |
990 | 1009 | ||
991 | if ( p-> mShowIconToggleFull ) | 1010 | if ( p-> mShowIconToggleFull ) |
992 | FSaction->addTo( iconToolBar ); | 1011 | FSaction->addTo( iconToolBar ); |
993 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); | 1012 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); |
994 | 1013 | ||
995 | //******************** | 1014 | //******************** |
996 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); | 1015 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); |
997 | 1016 | ||
998 | 1017 | ||
999 | icon = loadPixmap( pathString + "whatsnext" ); | 1018 | icon = loadPixmap( pathString + "whatsnext" ); |
1000 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); | 1019 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); |
1001 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 1020 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
1002 | whatsnext_action->addTo( viewMenu ); | 1021 | whatsnext_action->addTo( viewMenu ); |
1003 | connect( whatsnext_action, SIGNAL( activated() ), | 1022 | connect( whatsnext_action, SIGNAL( activated() ), |
1004 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 1023 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
1005 | 1024 | ||
1006 | icon = loadPixmap( pathString + "xdays" ); | 1025 | icon = loadPixmap( pathString + "xdays" ); |
1007 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); | 1026 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); |
1008 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 1027 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
1009 | xdays_action->addTo( viewMenu ); | 1028 | xdays_action->addTo( viewMenu ); |
1010 | connect( xdays_action, SIGNAL( activated() ), | 1029 | connect( xdays_action, SIGNAL( activated() ), |
1011 | mView->viewManager(), SLOT( showNextXView() ) ); | 1030 | mView->viewManager(), SLOT( showNextXView() ) ); |
1012 | 1031 | ||
1013 | 1032 | ||
1014 | icon = loadPixmap( pathString + "journal" ); | 1033 | icon = loadPixmap( pathString + "journal" ); |
1015 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 1034 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
1016 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 1035 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
1017 | viewjournal_action->addTo( viewMenu ); | 1036 | viewjournal_action->addTo( viewMenu ); |
1018 | connect( viewjournal_action, SIGNAL( activated() ), | 1037 | connect( viewjournal_action, SIGNAL( activated() ), |
1019 | mView->viewManager(), SLOT( showJournalView() ) ); | 1038 | mView->viewManager(), SLOT( showJournalView() ) ); |
1020 | 1039 | ||
1021 | 1040 | ||
1022 | icon = loadPixmap( pathString + "day" ); | 1041 | icon = loadPixmap( pathString + "day" ); |
1023 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 1042 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
1024 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 1043 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
1025 | day1_action->addTo( viewMenu ); | 1044 | day1_action->addTo( viewMenu ); |
1026 | // action->addTo( toolBar ); | 1045 | // action->addTo( toolBar ); |
1027 | connect( day1_action, SIGNAL( activated() ), | 1046 | connect( day1_action, SIGNAL( activated() ), |
1028 | mView->viewManager(), SLOT( showDayView() ) ); | 1047 | mView->viewManager(), SLOT( showDayView() ) ); |
1029 | 1048 | ||
1030 | icon = loadPixmap( pathString + "workweek" ); | 1049 | icon = loadPixmap( pathString + "workweek" ); |
1031 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 1050 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
1032 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 1051 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
1033 | day5_action->addTo( viewMenu ); | 1052 | day5_action->addTo( viewMenu ); |
1034 | connect( day5_action, SIGNAL( activated() ), | 1053 | connect( day5_action, SIGNAL( activated() ), |
1035 | mView->viewManager(), SLOT( showWorkWeekView() ) ); | 1054 | mView->viewManager(), SLOT( showWorkWeekView() ) ); |
1036 | 1055 | ||
1037 | icon = loadPixmap( pathString + "week" ); | 1056 | icon = loadPixmap( pathString + "week" ); |
1038 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 1057 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
1039 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 1058 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
1040 | day7_action->addTo( viewMenu ); | 1059 | day7_action->addTo( viewMenu ); |
1041 | connect( day7_action, SIGNAL( activated() ), | 1060 | connect( day7_action, SIGNAL( activated() ), |
1042 | mView->viewManager(), SLOT( showWeekView() ) ); | 1061 | mView->viewManager(), SLOT( showWeekView() ) ); |
1043 | 1062 | ||
1044 | icon = loadPixmap( pathString + "workweek2" ); | 1063 | icon = loadPixmap( pathString + "workweek2" ); |
1045 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); | 1064 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); |
1046 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); | 1065 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); |
1047 | day6_action->addTo( viewMenu ); | 1066 | day6_action->addTo( viewMenu ); |
1048 | connect( day6_action, SIGNAL( activated() ), | 1067 | connect( day6_action, SIGNAL( activated() ), |
1049 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); | 1068 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); |
1050 | 1069 | ||
1051 | icon = loadPixmap( pathString + "month" ); | 1070 | icon = loadPixmap( pathString + "month" ); |
1052 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 1071 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
1053 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 1072 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
1054 | month_action->addTo( viewMenu ); | 1073 | month_action->addTo( viewMenu ); |
1055 | connect( month_action, SIGNAL( activated() ), | 1074 | connect( month_action, SIGNAL( activated() ), |
1056 | mView->viewManager(), SLOT( showMonthView() ) ); | 1075 | mView->viewManager(), SLOT( showMonthView() ) ); |
1057 | 1076 | ||
1058 | icon = loadPixmap( pathString + "list" ); | 1077 | icon = loadPixmap( pathString + "list" ); |
1059 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | 1078 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); |
1060 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | 1079 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); |
1061 | showlist_action->addTo( viewMenu ); | 1080 | showlist_action->addTo( viewMenu ); |
1062 | connect( showlist_action, SIGNAL( activated() ), | 1081 | connect( showlist_action, SIGNAL( activated() ), |
1063 | mView->viewManager(), SLOT( showListView() ) ); | 1082 | mView->viewManager(), SLOT( showListView() ) ); |
1064 | 1083 | ||
1065 | icon = loadPixmap( pathString + "todo" ); | 1084 | icon = loadPixmap( pathString + "todo" ); |
1066 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 1085 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
1067 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 1086 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
1068 | todoview_action->addTo( viewMenu ); | 1087 | todoview_action->addTo( viewMenu ); |
1069 | connect( todoview_action, SIGNAL( activated() ), | 1088 | connect( todoview_action, SIGNAL( activated() ), |
1070 | mView->viewManager(), SLOT( showTodoView() ) ); | 1089 | mView->viewManager(), SLOT( showTodoView() ) ); |
1071 | 1090 | ||
1072 | 1091 | ||
1073 | 1092 | ||
1074 | #if 0 | 1093 | #if 0 |
1075 | action = new QAction( "view_timespan", "Time Span", 0, this ); | 1094 | action = new QAction( "view_timespan", "Time Span", 0, this ); |
1076 | action->addTo( viewMenu ); | 1095 | action->addTo( viewMenu ); |
1077 | connect( action, SIGNAL( activated() ), | 1096 | connect( action, SIGNAL( activated() ), |
1078 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 1097 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
1079 | #endif | 1098 | #endif |
1080 | 1099 | ||
1081 | 1100 | ||
1082 | 1101 | ||
1083 | action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, | 1102 | action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, |
1084 | this ); | 1103 | this ); |
1085 | action->addTo( actionMenu ); | 1104 | action->addTo( actionMenu ); |
1086 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); | 1105 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); |
1087 | 1106 | ||
1088 | 1107 | ||
1089 | icon = loadPixmap( pathString + "search" ); | 1108 | icon = loadPixmap( pathString + "search" ); |
1090 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); | 1109 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); |
1091 | 1110 | ||
1092 | 1111 | ||
1093 | 1112 | ||
1094 | actionMenu->insertSeparator(); | 1113 | actionMenu->insertSeparator(); |
1095 | action = new QAction( "manage cat", i18n("Edit category list..."), 0, | 1114 | action = new QAction( "manage cat", i18n("Edit category list..."), 0, |
1096 | this ); | 1115 | this ); |
1097 | action->addTo( actionMenu ); | 1116 | action->addTo( actionMenu ); |
1098 | connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); | 1117 | connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); |
1099 | 1118 | ||
1100 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 1119 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
1101 | this ); | 1120 | this ); |
1102 | action->addTo( actionMenu ); | 1121 | action->addTo( actionMenu ); |
1103 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 1122 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
1104 | 1123 | ||
1105 | 1124 | ||
1106 | actionMenu->insertSeparator(); | 1125 | actionMenu->insertSeparator(); |
1107 | icon = loadPixmap( pathString + "configure" ); | 1126 | icon = loadPixmap( pathString + "configure" ); |
1108 | action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); | 1127 | action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); |
1109 | action->addTo( actionMenu ); | 1128 | action->addTo( actionMenu ); |
1110 | connect( action, SIGNAL( activated() ), | 1129 | connect( action, SIGNAL( activated() ), |
1111 | mView, SLOT( edit_options() ) ); | 1130 | mView, SLOT( edit_options() ) ); |
1112 | action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this ); | 1131 | action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this ); |
1113 | action->addTo( actionMenu ); | 1132 | action->addTo( actionMenu ); |
1114 | connect( action, SIGNAL( activated() ), | 1133 | connect( action, SIGNAL( activated() ), |
1115 | this, SLOT( calHint() ) ); | 1134 | this, SLOT( calHint() ) ); |
1116 | action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); | 1135 | action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); |
1117 | action->addTo( actionMenu ); | 1136 | action->addTo( actionMenu ); |
1118 | connect( action, SIGNAL( activated() ), | 1137 | connect( action, SIGNAL( activated() ), |
1119 | mView, SLOT( edit_global_options() ) ); | 1138 | mView, SLOT( edit_global_options() ) ); |
1120 | if ( KOPrefs::instance()->mShowFullMenu ) { | 1139 | if ( KOPrefs::instance()->mShowFullMenu ) { |
1121 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); | 1140 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); |
1122 | 1141 | ||
1123 | } | 1142 | } |
1124 | // actionMenu->insertSeparator(); | 1143 | // actionMenu->insertSeparator(); |
1125 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, | 1144 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, |
1126 | this ); | 1145 | this ); |
1127 | action->addTo( importMenu_X ); | 1146 | action->addTo( importMenu_X ); |
1128 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); | 1147 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); |
1129 | action = new QAction( "import_quick", i18n("Import last file"), 0, | 1148 | action = new QAction( "import_quick", i18n("Import last file"), 0, |
1130 | this ); | 1149 | this ); |
1131 | action->addTo( importMenu_X ); | 1150 | action->addTo( importMenu_X ); |
1132 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); | 1151 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); |
1133 | importMenu_X->insertSeparator(); | 1152 | importMenu_X->insertSeparator(); |
1134 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, | 1153 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, |
1135 | this ); | 1154 | this ); |
1136 | action->addTo( importMenu_X ); | 1155 | action->addTo( importMenu_X ); |
1137 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); | 1156 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); |
1138 | //#ifndef DESKTOP_VERSION | 1157 | //#ifndef DESKTOP_VERSION |
1139 | importMenu_X->insertSeparator(); | 1158 | importMenu_X->insertSeparator(); |
1140 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, | 1159 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, |
1141 | this ); | 1160 | this ); |
1142 | action->addTo( importMenu_X ); | 1161 | action->addTo( importMenu_X ); |
1143 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); | 1162 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); |
1144 | //#else | 1163 | //#else |
1145 | #ifdef _OL_IMPORT_ | 1164 | #ifdef _OL_IMPORT_ |
1146 | importMenu_X->insertSeparator(); | 1165 | importMenu_X->insertSeparator(); |
1147 | action = new QAction( "import_ol", i18n("Import from OL"), 0, | 1166 | action = new QAction( "import_ol", i18n("Import from OL"), 0, |
1148 | this ); | 1167 | this ); |
1149 | action->addTo( importMenu_X ); | 1168 | action->addTo( importMenu_X ); |
1150 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); | 1169 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); |
1151 | #endif | 1170 | #endif |
1152 | //#endif | 1171 | //#endif |
1153 | 1172 | ||
1154 | //importMenu->insertSeparator(); | 1173 | //importMenu->insertSeparator(); |
1155 | #if 0 | 1174 | #if 0 |
1156 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, | 1175 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, |
1157 | this ); | 1176 | this ); |
1158 | action->addTo( importMenu ); | 1177 | action->addTo( importMenu ); |
1159 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); | 1178 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); |
1160 | #endif | 1179 | #endif |
1161 | action = new QAction( "save_cal", i18n("Save Backup..."), 0, | 1180 | action = new QAction( "save_cal", i18n("Save Backup..."), 0, |
1162 | this ); | 1181 | this ); |
1163 | action->addTo( importMenu ); | 1182 | action->addTo( importMenu ); |
1164 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 1183 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
1165 | importMenu->insertSeparator(); | 1184 | importMenu->insertSeparator(); |
1166 | importMenu->insertItem( i18n("Import"), importMenu_X ); | 1185 | importMenu->insertItem( i18n("Import"), importMenu_X ); |
1167 | //importMenu->insertSeparator(); | 1186 | //importMenu->insertSeparator(); |
1187 | action = new QAction( "export ical", i18n("Export All Data"), 0, | ||
1188 | this ); | ||
1189 | action->addTo( exportMenu_X ); | ||
1190 | connect( action, SIGNAL( activated() ), SLOT( exportICalendar() ) ); | ||
1168 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 1191 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, |
1169 | this ); | 1192 | this ); |
1170 | action->addTo( exportMenu_X ); | 1193 | action->addTo( exportMenu_X ); |
1171 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 1194 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
1172 | 1195 | ||
1173 | 1196 | ||
1174 | //LR | 1197 | //LR |
1175 | QPopupMenu *ex2phone = new QPopupMenu( this ); | 1198 | QPopupMenu *ex2phone = new QPopupMenu( this ); |
1176 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1199 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1177 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1200 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1178 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); | 1201 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); |
1179 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); | 1202 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); |
1180 | 1203 | ||
1181 | importMenu->insertItem( i18n("Export"), exportMenu_X ); | 1204 | importMenu->insertItem( i18n("Export"), exportMenu_X ); |
1182 | mPrintSelAction = 0; | 1205 | mPrintSelAction = 0; |
1183 | #ifndef DESKTOP_VERSION | 1206 | #ifndef DESKTOP_VERSION |
1184 | //importMenu->insertSeparator(); | 1207 | //importMenu->insertSeparator(); |
1185 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, | 1208 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, |
1186 | this ); | 1209 | this ); |
1187 | brAction->addTo( beamMenu_X ); | 1210 | brAction->addTo( beamMenu_X ); |
1188 | brAction->setToggleAction (true ) ; | 1211 | brAction->setToggleAction (true ) ; |
1189 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 1212 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
1190 | 1213 | ||
1191 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 1214 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
1192 | this ); | 1215 | this ); |
1193 | action->addTo( beamMenu_X ); | 1216 | action->addTo( beamMenu_X ); |
1194 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 1217 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
1195 | 1218 | ||
1196 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 1219 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
1197 | this ); | 1220 | this ); |
1198 | action->addTo( beamMenu_X ); | 1221 | action->addTo( beamMenu_X ); |
1199 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 1222 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
1200 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); | 1223 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); |
1201 | #else | 1224 | #else |
1202 | //importMenu->insertSeparator(); | 1225 | //importMenu->insertSeparator(); |
1203 | icon = loadPixmap( pathString + "print" ); | 1226 | icon = loadPixmap( pathString + "print" ); |
1204 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 1227 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
1205 | action->addTo( beamMenu_X ); | 1228 | action->addTo( beamMenu_X ); |
1206 | connect( action, SIGNAL( activated() ), | 1229 | connect( action, SIGNAL( activated() ), |
1207 | this, SLOT( printCal() ) ); | 1230 | this, SLOT( printCal() ) ); |
1208 | 1231 | ||
1209 | icon = loadPixmap( pathString + "week" ); | 1232 | icon = loadPixmap( pathString + "week" ); |
1210 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 1233 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
1211 | action->addTo( beamMenu_X ); | 1234 | action->addTo( beamMenu_X ); |
1212 | connect( action, SIGNAL( activated() ), | 1235 | connect( action, SIGNAL( activated() ), |
1213 | this, SLOT( printSel() ) ); | 1236 | this, SLOT( printSel() ) ); |
1214 | icon = loadPixmap( pathString + "whatsnext" ); | 1237 | icon = loadPixmap( pathString + "whatsnext" ); |
1215 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); | 1238 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); |
1216 | action->addTo( beamMenu_X ); | 1239 | action->addTo( beamMenu_X ); |
1217 | connect( action, SIGNAL( activated() ), | 1240 | connect( action, SIGNAL( activated() ), |
1218 | mView->viewManager(), SLOT( slotprintWNV() ) ); | 1241 | mView->viewManager(), SLOT( slotprintWNV() ) ); |
1219 | 1242 | ||
1220 | 1243 | ||
1221 | icon = loadPixmap( pathString + "list" ); | 1244 | icon = loadPixmap( pathString + "list" ); |
1222 | action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); | 1245 | action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); |
1223 | action->addTo( beamMenu_X ); | 1246 | action->addTo( beamMenu_X ); |
1224 | connect( action, SIGNAL( activated() ), | 1247 | connect( action, SIGNAL( activated() ), |
1225 | this, SLOT( printListView() ) ); | 1248 | this, SLOT( printListView() ) ); |
1226 | 1249 | ||
1227 | icon = loadPixmap( pathString + "newevent" ); | 1250 | icon = loadPixmap( pathString + "newevent" ); |
1228 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); | 1251 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); |
1229 | action->addTo( beamMenu_X ); | 1252 | action->addTo( beamMenu_X ); |
1230 | connect( action, SIGNAL( activated() ), | 1253 | connect( action, SIGNAL( activated() ), |
1231 | mView, SLOT( slotprintSelInc() ) ); | 1254 | mView, SLOT( slotprintSelInc() ) ); |
1232 | mPrintSelAction = action; | 1255 | mPrintSelAction = action; |
1233 | importMenu->insertItem( i18n("Print"), beamMenu_X ); | 1256 | importMenu->insertItem( i18n("Print"), beamMenu_X ); |
1234 | #endif | 1257 | #endif |
1235 | 1258 | ||
1236 | importMenu->insertSeparator(); | 1259 | importMenu->insertSeparator(); |
1237 | action = new QAction( "beam all", i18n("Save"), 0, | 1260 | action = new QAction( "beam all", i18n("Save"), 0, |
1238 | this ); | 1261 | this ); |
1239 | action->addTo( importMenu ); | 1262 | action->addTo( importMenu ); |
1240 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 1263 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
1241 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 1264 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
1242 | this ); | 1265 | this ); |
1243 | action->addTo( importMenu ); | 1266 | action->addTo( importMenu ); |
1244 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 1267 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
1245 | 1268 | ||
1246 | //menuBar->insertItem( "Configure",configureMenu ); | 1269 | //menuBar->insertItem( "Configure",configureMenu ); |
1247 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 1270 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
1248 | icon = loadPixmap( "korganizer/korganizer" ); | 1271 | icon = loadPixmap( "korganizer/korganizer" ); |
1249 | 1272 | ||
1250 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 1273 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
1251 | action->addTo( helpMenu ); | 1274 | action->addTo( helpMenu ); |
1252 | connect( action, SIGNAL( activated() ), | 1275 | connect( action, SIGNAL( activated() ), |
1253 | SLOT( whatsNew() ) ); | 1276 | SLOT( whatsNew() ) ); |
1254 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 1277 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
1255 | action->addTo( helpMenu ); | 1278 | action->addTo( helpMenu ); |
1256 | connect( action, SIGNAL( activated() ), | 1279 | connect( action, SIGNAL( activated() ), |
1257 | SLOT( features() ) ); | 1280 | SLOT( features() ) ); |
1258 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 1281 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
1259 | action->addTo( helpMenu ); | 1282 | action->addTo( helpMenu ); |
1260 | connect( action, SIGNAL( activated() ), | 1283 | connect( action, SIGNAL( activated() ), |
1261 | SLOT( keyBindings() ) ); | 1284 | SLOT( keyBindings() ) ); |
1262 | action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); | 1285 | action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); |
1263 | action->addTo( helpMenu ); | 1286 | action->addTo( helpMenu ); |
1264 | connect( action, SIGNAL( activated() ), | 1287 | connect( action, SIGNAL( activated() ), |
1265 | SLOT( storagehowto() ) ); | 1288 | SLOT( storagehowto() ) ); |
1266 | action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); | 1289 | action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); |
1267 | action->addTo( helpMenu ); | 1290 | action->addTo( helpMenu ); |
1268 | connect( action, SIGNAL( activated() ), | 1291 | connect( action, SIGNAL( activated() ), |
1269 | SLOT( timetrackinghowto() ) ); | 1292 | SLOT( timetrackinghowto() ) ); |
1270 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 1293 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
1271 | action->addTo( helpMenu ); | 1294 | action->addTo( helpMenu ); |
1272 | connect( action, SIGNAL( activated() ), | 1295 | connect( action, SIGNAL( activated() ), |
1273 | SLOT( synchowto() ) ); | 1296 | SLOT( synchowto() ) ); |
1274 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); | 1297 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); |
1275 | action->addTo( helpMenu ); | 1298 | action->addTo( helpMenu ); |
1276 | connect( action, SIGNAL( activated() ), | 1299 | connect( action, SIGNAL( activated() ), |
1277 | SLOT( kdesynchowto() ) ); | 1300 | SLOT( kdesynchowto() ) ); |
1278 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); | 1301 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); |
1279 | action->addTo( helpMenu ); | 1302 | action->addTo( helpMenu ); |
1280 | connect( action, SIGNAL( activated() ), | 1303 | connect( action, SIGNAL( activated() ), |
1281 | SLOT( multisynchowto() ) ); | 1304 | SLOT( multisynchowto() ) ); |
1282 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 1305 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
1283 | action->addTo( helpMenu ); | 1306 | action->addTo( helpMenu ); |
1284 | connect( action, SIGNAL( activated() ), | 1307 | connect( action, SIGNAL( activated() ), |
1285 | SLOT( aboutAutoSaving() ) ); | 1308 | SLOT( aboutAutoSaving() ) ); |
1286 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 1309 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
1287 | action->addTo( helpMenu ); | 1310 | action->addTo( helpMenu ); |
1288 | connect( action, SIGNAL( activated() ), | 1311 | connect( action, SIGNAL( activated() ), |
1289 | SLOT( aboutKnownBugs() ) ); | 1312 | SLOT( aboutKnownBugs() ) ); |
1290 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 1313 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
1291 | action->addTo( helpMenu ); | 1314 | action->addTo( helpMenu ); |
1292 | connect( action, SIGNAL( activated() ), | 1315 | connect( action, SIGNAL( activated() ), |
1293 | SLOT( usertrans() ) ); | 1316 | SLOT( usertrans() ) ); |
1294 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 1317 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
1295 | action->addTo( helpMenu ); | 1318 | action->addTo( helpMenu ); |
1296 | connect( action, SIGNAL( activated() ), | 1319 | connect( action, SIGNAL( activated() ), |
1297 | SLOT( faq() ) ); | 1320 | SLOT( faq() ) ); |
1298 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | 1321 | action = new QAction( "licence", i18n("Licence..."), 0, this ); |
1299 | action->addTo( helpMenu ); | 1322 | action->addTo( helpMenu ); |
1300 | connect( action, SIGNAL( activated() ), | 1323 | connect( action, SIGNAL( activated() ), |
1301 | SLOT( licence() ) ); | 1324 | SLOT( licence() ) ); |
1302 | action = new QAction( "about", i18n("About..."), 0, this ); | 1325 | action = new QAction( "about", i18n("About..."), 0, this ); |
1303 | action->addTo( helpMenu ); | 1326 | action->addTo( helpMenu ); |
1304 | connect( action, SIGNAL( activated() ), | 1327 | connect( action, SIGNAL( activated() ), |
1305 | SLOT( about() ) ); | 1328 | SLOT( about() ) ); |
1306 | //menuBar->insertSeparator(); | 1329 | //menuBar->insertSeparator(); |
1307 | 1330 | ||
1308 | // ****************************************************** | 1331 | // ****************************************************** |
1309 | // menubar icons | 1332 | // menubar icons |
1310 | 1333 | ||
1311 | 1334 | ||
1312 | 1335 | ||
1313 | //menuBar->insertItem( iconToolBar ); | 1336 | //menuBar->insertItem( iconToolBar ); |
1314 | //xdays_action | 1337 | //xdays_action |
1315 | if (p-> mShowIconNewEvent) | 1338 | if (p-> mShowIconNewEvent) |
1316 | ne_action->addTo( iconToolBar ); | 1339 | ne_action->addTo( iconToolBar ); |
1317 | if (p->mShowIconNewTodo ) | 1340 | if (p->mShowIconNewTodo ) |
1318 | nt_action->addTo( iconToolBar ); | 1341 | nt_action->addTo( iconToolBar ); |
1319 | if (p-> mShowIconSearch) | 1342 | if (p-> mShowIconSearch) |
1320 | search_action->addTo( iconToolBar ); | 1343 | search_action->addTo( iconToolBar ); |
1321 | if (p-> mShowIconWhatsThis) | 1344 | if (p-> mShowIconWhatsThis) |
1322 | QWhatsThis::whatsThisButton ( iconToolBar ); | 1345 | QWhatsThis::whatsThisButton ( iconToolBar ); |
1323 | if (p-> mShowIconNext) | 1346 | if (p-> mShowIconNext) |
1324 | whatsnext_action->addTo( viewToolBar ); | 1347 | whatsnext_action->addTo( viewToolBar ); |
1325 | if (p-> mShowIconNextDays) | 1348 | if (p-> mShowIconNextDays) |
1326 | xdays_action->addTo( viewToolBar ); | 1349 | xdays_action->addTo( viewToolBar ); |
1327 | if (p-> mShowIconJournal) | 1350 | if (p-> mShowIconJournal) |
1328 | viewjournal_action->addTo( viewToolBar ); | 1351 | viewjournal_action->addTo( viewToolBar ); |
1329 | if (p-> mShowIconDay1) | 1352 | if (p-> mShowIconDay1) |
1330 | day1_action->addTo( viewToolBar ); | 1353 | day1_action->addTo( viewToolBar ); |
1331 | if (p-> mShowIconDay5) | 1354 | if (p-> mShowIconDay5) |
1332 | day5_action->addTo( viewToolBar ); | 1355 | day5_action->addTo( viewToolBar ); |
1333 | if (p-> mShowIconDay7) | 1356 | if (p-> mShowIconDay7) |
1334 | day7_action->addTo( viewToolBar ); | 1357 | day7_action->addTo( viewToolBar ); |
1335 | if (p-> mShowIconDay6) | 1358 | if (p-> mShowIconDay6) |
1336 | day6_action->addTo( viewToolBar ); | 1359 | day6_action->addTo( viewToolBar ); |
1337 | if (p-> mShowIconMonth) | 1360 | if (p-> mShowIconMonth) |
1338 | month_action->addTo( viewToolBar ); | 1361 | month_action->addTo( viewToolBar ); |
1339 | if (p-> mShowIconList) | 1362 | if (p-> mShowIconList) |
1340 | showlist_action->addTo( viewToolBar ); | 1363 | showlist_action->addTo( viewToolBar ); |
1341 | if (p-> mShowIconTodoview) | 1364 | if (p-> mShowIconTodoview) |
1342 | todoview_action->addTo( viewToolBar ); | 1365 | todoview_action->addTo( viewToolBar ); |
1343 | 1366 | ||
1344 | icon = loadPixmap( pathString + "2leftarrowB" ); | 1367 | icon = loadPixmap( pathString + "2leftarrowB" ); |
1345 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); | 1368 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); |
1346 | if (p-> mShowIconBackFast) { | 1369 | if (p-> mShowIconBackFast) { |
1347 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 1370 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
1348 | connect( action, SIGNAL( activated() ), | 1371 | connect( action, SIGNAL( activated() ), |
1349 | mView, SLOT( goPreviousMonth() ) ); | 1372 | mView, SLOT( goPreviousMonth() ) ); |
1350 | action->addTo( navigatorToolBar ); | 1373 | action->addTo( navigatorToolBar ); |
1351 | } | 1374 | } |
1352 | icon = loadPixmap( pathString + "1leftarrowB" ); | 1375 | icon = loadPixmap( pathString + "1leftarrowB" ); |
1353 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); | 1376 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); |
1354 | if (p-> mShowIconBack) { | 1377 | if (p-> mShowIconBack) { |
1355 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 1378 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
1356 | connect( action, SIGNAL( activated() ), | 1379 | connect( action, SIGNAL( activated() ), |
1357 | mView, SLOT( goPrevious() ) ); | 1380 | mView, SLOT( goPrevious() ) ); |
1358 | action->addTo( navigatorToolBar ); | 1381 | action->addTo( navigatorToolBar ); |
1359 | } | 1382 | } |
1360 | icon = loadPixmap( pathString + "today" ); | 1383 | icon = loadPixmap( pathString + "today" ); |
1361 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 1384 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
1362 | if (p-> mShowIconToday) | 1385 | if (p-> mShowIconToday) |
1363 | today_action->addTo( navigatorToolBar ); | 1386 | today_action->addTo( navigatorToolBar ); |
1364 | icon = loadPixmap( pathString + "1rightarrowB" ); | 1387 | icon = loadPixmap( pathString + "1rightarrowB" ); |
1365 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 1388 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
1366 | if (p-> mShowIconForward) { | 1389 | if (p-> mShowIconForward) { |
1367 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 1390 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
1368 | connect( action, SIGNAL( activated() ), | 1391 | connect( action, SIGNAL( activated() ), |
1369 | mView, SLOT( goNext() ) ); | 1392 | mView, SLOT( goNext() ) ); |
1370 | action->addTo( navigatorToolBar ); | 1393 | action->addTo( navigatorToolBar ); |
1371 | } | 1394 | } |
1372 | icon = loadPixmap( pathString + "2rightarrowB" ); | 1395 | icon = loadPixmap( pathString + "2rightarrowB" ); |
1373 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 1396 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
1374 | if (p-> mShowIconForwardFast) { | 1397 | if (p-> mShowIconForwardFast) { |
1375 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); | 1398 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); |
1376 | connect( action, SIGNAL( activated() ), | 1399 | connect( action, SIGNAL( activated() ), |
1377 | mView, SLOT( goNextMonth() ) ); | 1400 | mView, SLOT( goNextMonth() ) ); |
1378 | action->addTo( navigatorToolBar ); | 1401 | action->addTo( navigatorToolBar ); |
1379 | } | 1402 | } |
1380 | 1403 | ||
1381 | 1404 | ||
1382 | configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); | 1405 | configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); |
1383 | 1406 | ||
1384 | 1407 | ||
1385 | if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); | 1408 | if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); |
1386 | if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); | 1409 | if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); |
1387 | if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); | 1410 | if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); |
1388 | if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); | 1411 | if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); |
1389 | 1412 | ||
1390 | if (p-> mShowIconNewEvent) | 1413 | if (p-> mShowIconNewEvent) |
1391 | configureToolBarMenu->setItemChecked( 10, true ); | 1414 | configureToolBarMenu->setItemChecked( 10, true ); |
1392 | if (p->mShowIconNewTodo ) | 1415 | if (p->mShowIconNewTodo ) |
1393 | configureToolBarMenu->setItemChecked( 20, true ); | 1416 | configureToolBarMenu->setItemChecked( 20, true ); |
1394 | if (p-> mShowIconSearch) | 1417 | if (p-> mShowIconSearch) |
1395 | configureToolBarMenu->setItemChecked( 120, true ); | 1418 | configureToolBarMenu->setItemChecked( 120, true ); |
1396 | if (p-> mShowIconList) | 1419 | if (p-> mShowIconList) |
1397 | configureToolBarMenu->setItemChecked( 30, true ); | 1420 | configureToolBarMenu->setItemChecked( 30, true ); |
1398 | if (p-> mShowIconDay1) | 1421 | if (p-> mShowIconDay1) |
1399 | configureToolBarMenu->setItemChecked( 40, true ); | 1422 | configureToolBarMenu->setItemChecked( 40, true ); |
1400 | if (p-> mShowIconDay5) | 1423 | if (p-> mShowIconDay5) |
1401 | configureToolBarMenu->setItemChecked( 50, true ); | 1424 | configureToolBarMenu->setItemChecked( 50, true ); |
1402 | if (p-> mShowIconDay6) | 1425 | if (p-> mShowIconDay6) |
1403 | configureToolBarMenu->setItemChecked( 75, true ); | 1426 | configureToolBarMenu->setItemChecked( 75, true ); |
1404 | if (p-> mShowIconDay7) | 1427 | if (p-> mShowIconDay7) |
1405 | configureToolBarMenu->setItemChecked( 60, true ); | 1428 | configureToolBarMenu->setItemChecked( 60, true ); |
1406 | if (p-> mShowIconMonth) | 1429 | if (p-> mShowIconMonth) |
1407 | configureToolBarMenu->setItemChecked( 70, true ); | 1430 | configureToolBarMenu->setItemChecked( 70, true ); |
1408 | if (p-> mShowIconTodoview) | 1431 | if (p-> mShowIconTodoview) |
1409 | configureToolBarMenu->setItemChecked( 80, true ); | 1432 | configureToolBarMenu->setItemChecked( 80, true ); |
1410 | if (p-> mShowIconBackFast) | 1433 | if (p-> mShowIconBackFast) |
1411 | configureToolBarMenu->setItemChecked( 200, true ); | 1434 | configureToolBarMenu->setItemChecked( 200, true ); |
1412 | if (p-> mShowIconBack) | 1435 | if (p-> mShowIconBack) |
1413 | configureToolBarMenu->setItemChecked( 210, true ); | 1436 | configureToolBarMenu->setItemChecked( 210, true ); |
1414 | if (p-> mShowIconToday) | 1437 | if (p-> mShowIconToday) |
1415 | configureToolBarMenu->setItemChecked( 130, true ); | 1438 | configureToolBarMenu->setItemChecked( 130, true ); |
1416 | if (p-> mShowIconForward) | 1439 | if (p-> mShowIconForward) |
1417 | configureToolBarMenu->setItemChecked( 220, true ); | 1440 | configureToolBarMenu->setItemChecked( 220, true ); |
1418 | if (p-> mShowIconForwardFast) | 1441 | if (p-> mShowIconForwardFast) |
1419 | configureToolBarMenu->setItemChecked( 230, true ); | 1442 | configureToolBarMenu->setItemChecked( 230, true ); |
1420 | if (p-> mShowIconNextDays) | 1443 | if (p-> mShowIconNextDays) |
1421 | configureToolBarMenu->setItemChecked( 100, true ); | 1444 | configureToolBarMenu->setItemChecked( 100, true ); |
1422 | if (p-> mShowIconNext) | 1445 | if (p-> mShowIconNext) |
1423 | configureToolBarMenu->setItemChecked( 110, true ); | 1446 | configureToolBarMenu->setItemChecked( 110, true ); |
1424 | if (p-> mShowIconJournal) | 1447 | if (p-> mShowIconJournal) |
1425 | configureToolBarMenu->setItemChecked( 90, true ); | 1448 | configureToolBarMenu->setItemChecked( 90, true ); |
1426 | if (p-> mShowIconWhatsThis) | 1449 | if (p-> mShowIconWhatsThis) |
1427 | configureToolBarMenu->setItemChecked( 300, true ); | 1450 | configureToolBarMenu->setItemChecked( 300, true ); |
1428 | if (p-> mShowIconWeekNum) | 1451 | if (p-> mShowIconWeekNum) |
1429 | configureToolBarMenu->setItemChecked( 400, true ); | 1452 | configureToolBarMenu->setItemChecked( 400, true ); |
1430 | if (!p-> mShowIconStretch) { | 1453 | if (!p-> mShowIconStretch) { |
1431 | QLabel* dummy = new QLabel( iconToolBar ); | 1454 | QLabel* dummy = new QLabel( iconToolBar ); |
1432 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 1455 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
1433 | dummy->setMinimumWidth( 0 ); | 1456 | dummy->setMinimumWidth( 0 ); |
1434 | iconToolBar->setStretchableWidget ( dummy ) ; | 1457 | iconToolBar->setStretchableWidget ( dummy ) ; |
1435 | } | 1458 | } |
1436 | else { | 1459 | else { |
1437 | iconToolBar->setHorizontalStretchable (true ); | 1460 | iconToolBar->setHorizontalStretchable (true ); |
1438 | viewToolBar->setHorizontalStretchable (true ); | 1461 | viewToolBar->setHorizontalStretchable (true ); |
1439 | navigatorToolBar->setHorizontalStretchable (true ); | 1462 | navigatorToolBar->setHorizontalStretchable (true ); |
1440 | iconToolBar->setVerticalStretchable (true ); | 1463 | iconToolBar->setVerticalStretchable (true ); |
1441 | viewToolBar->setVerticalStretchable (true ); | 1464 | viewToolBar->setVerticalStretchable (true ); |
1442 | navigatorToolBar->setVerticalStretchable (true ); | 1465 | navigatorToolBar->setVerticalStretchable (true ); |
1443 | configureToolBarMenu->setItemChecked( 5, true ); | 1466 | configureToolBarMenu->setItemChecked( 5, true ); |
1444 | } | 1467 | } |
1445 | if (p-> mShowIconFilter) | 1468 | if (p-> mShowIconFilter) |
1446 | configureToolBarMenu->setItemChecked( 7, true ); | 1469 | configureToolBarMenu->setItemChecked( 7, true ); |
1447 | if (p-> mShowIconOnetoolbar) | 1470 | if (p-> mShowIconOnetoolbar) |
1448 | configureToolBarMenu->setItemChecked( 6, true ); | 1471 | configureToolBarMenu->setItemChecked( 6, true ); |
1449 | 1472 | ||
1450 | 1473 | ||
1451 | if ( filterMenubar ) { | 1474 | if ( filterMenubar ) { |
1452 | filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); | 1475 | filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); |
1453 | connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) ); | 1476 | connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) ); |
1454 | } | 1477 | } |
1455 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 1478 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
1456 | configureAgenda( p->mHourSize ); | 1479 | configureAgenda( p->mHourSize ); |
1457 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 1480 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
1458 | } | 1481 | } |
1459 | void MainWindow::calHint() | 1482 | void MainWindow::calHint() |
1460 | { | 1483 | { |
1461 | QString message = i18n("You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>."); | 1484 | QString message = i18n("You can use and display <b>more than one</b> calendar file in KO/Pi. A calendar file is called a <b>resource</b>. To add a calendar or change calendar settings please use menu: <b>View -> Toggle Resource View</b>."); |
1462 | 1485 | ||
1463 | KMessageBox::information( this, message); | 1486 | KMessageBox::information( this, message); |
1464 | } | 1487 | } |
1465 | void MainWindow::exportToPhone( int mode ) | 1488 | void MainWindow::exportToPhone( int mode ) |
1466 | { | 1489 | { |
1467 | 1490 | ||
1468 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1491 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1469 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1492 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1470 | KOex2phonePrefs ex2phone; | 1493 | KOex2phonePrefs ex2phone; |
1471 | 1494 | ||
1472 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 1495 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |
1473 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); | 1496 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); |
1474 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1497 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1475 | if ( mode == 1 ) | 1498 | if ( mode == 1 ) |
1476 | ex2phone.setCaption(i18n("Export complete calendar")); | 1499 | ex2phone.setCaption(i18n("Export complete calendar")); |
1477 | if ( mode == 2 ) | 1500 | if ( mode == 2 ) |
1478 | ex2phone.setCaption(i18n("Export filtered calendar")); | 1501 | ex2phone.setCaption(i18n("Export filtered calendar")); |
1479 | 1502 | ||
1480 | if ( !ex2phone.exec() ) { | 1503 | if ( !ex2phone.exec() ) { |
1481 | return; | 1504 | return; |
1482 | } | 1505 | } |
1483 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); | 1506 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); |
1484 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); | 1507 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); |
1485 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); | 1508 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); |
1486 | 1509 | ||
1487 | int inFuture = 0; | 1510 | int inFuture = 0; |
1488 | if ( ex2phone.mWriteBackFuture->isChecked() ) | 1511 | if ( ex2phone.mWriteBackFuture->isChecked() ) |
1489 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); | 1512 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); |
1490 | QPtrList<Incidence> delSel; | 1513 | QPtrList<Incidence> delSel; |
1491 | if ( mode == 1 ) | 1514 | if ( mode == 1 ) |
1492 | delSel = mCalendar->rawIncidences(); | 1515 | delSel = mCalendar->rawIncidences(); |
1493 | if ( mode == 2 ) | 1516 | if ( mode == 2 ) |
1494 | delSel = mCalendar->incidences(); | 1517 | delSel = mCalendar->incidences(); |
1495 | CalendarLocal* cal = new CalendarLocal(); | 1518 | CalendarLocal* cal = new CalendarLocal(); |
1496 | cal->setLocalTime(); | 1519 | cal->setLocalTime(); |
1497 | Incidence *incidence = delSel.first(); | 1520 | Incidence *incidence = delSel.first(); |
1498 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); | 1521 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); |
1499 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); | 1522 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); |
1500 | while ( incidence ) { | 1523 | while ( incidence ) { |
1501 | if ( incidence->typeID() != journalID ) { | 1524 | if ( incidence->typeID() != journalID ) { |
1502 | bool add = true; | 1525 | bool add = true; |
1503 | if ( inFuture ) { | 1526 | if ( inFuture ) { |
1504 | QDateTime dt; | 1527 | QDateTime dt; |
1505 | if ( incidence->typeID() == todoID ) { | 1528 | if ( incidence->typeID() == todoID ) { |
1506 | Todo * t = (Todo*)incidence; | 1529 | Todo * t = (Todo*)incidence; |
1507 | if ( t->hasDueDate() ) | 1530 | if ( t->hasDueDate() ) |
1508 | dt = t->dtDue(); | 1531 | dt = t->dtDue(); |
1509 | else | 1532 | else |
1510 | dt = cur.addSecs( 62 ); | 1533 | dt = cur.addSecs( 62 ); |
1511 | } | 1534 | } |
1512 | else { | 1535 | else { |
1513 | bool ok; | 1536 | bool ok; |
1514 | dt = incidence->getNextOccurence( cur, &ok ); | 1537 | dt = incidence->getNextOccurence( cur, &ok ); |
1515 | if ( !ok ) | 1538 | if ( !ok ) |
1516 | dt = cur.addSecs( -62 ); | 1539 | dt = cur.addSecs( -62 ); |
1517 | } | 1540 | } |
1518 | if ( dt < cur || dt > end ) { | 1541 | if ( dt < cur || dt > end ) { |
1519 | add = false; | 1542 | add = false; |
1520 | } | 1543 | } |
1521 | } | 1544 | } |
1522 | if ( add ) { | 1545 | if ( add ) { |
1523 | Incidence *in = incidence->clone(); | 1546 | Incidence *in = incidence->clone(); |
1524 | cal->addIncidence( in ); | 1547 | cal->addIncidence( in ); |
1525 | } | 1548 | } |
1526 | } | 1549 | } |
1527 | incidence = delSel.next(); | 1550 | incidence = delSel.next(); |
1528 | } | 1551 | } |
1529 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 1552 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
1530 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 1553 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
1531 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1554 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1532 | 1555 | ||
1533 | setCaption( i18n("Writing to phone...")); | 1556 | setCaption( i18n("Writing to phone...")); |
1534 | if ( PhoneFormat::writeToPhone( cal ) ) | 1557 | if ( PhoneFormat::writeToPhone( cal ) ) |
1535 | setCaption( i18n("Export to phone successful!")); | 1558 | setCaption( i18n("Export to phone successful!")); |
1536 | else | 1559 | else |
1537 | setCaption( i18n("Error exporting to phone!")); | 1560 | setCaption( i18n("Error exporting to phone!")); |
1538 | delete cal; | 1561 | delete cal; |
1539 | } | 1562 | } |
1540 | 1563 | ||
1541 | 1564 | ||
1542 | void MainWindow::setDefaultPreferences() | 1565 | void MainWindow::setDefaultPreferences() |
1543 | { | 1566 | { |
1544 | KOPrefs *p = KOPrefs::instance(); | 1567 | KOPrefs *p = KOPrefs::instance(); |
1545 | 1568 | ||
1546 | p->mCompactDialogs = true; | 1569 | p->mCompactDialogs = true; |
1547 | p->mConfirm = true; | 1570 | p->mConfirm = true; |
1548 | // p->mEnableQuickTodo = false; | 1571 | // p->mEnableQuickTodo = false; |
1549 | 1572 | ||
1550 | } | 1573 | } |
1551 | 1574 | ||
1552 | QString MainWindow::resourcePath() | 1575 | QString MainWindow::resourcePath() |
1553 | { | 1576 | { |
1554 | return KGlobal::iconLoader()->iconPath(); | 1577 | return KGlobal::iconLoader()->iconPath(); |
1555 | } | 1578 | } |
1556 | 1579 | ||
1557 | void MainWindow::displayText( QString text ,QString cap ) | 1580 | void MainWindow::displayText( QString text ,QString cap ) |
1558 | { | 1581 | { |
1559 | QDialog dia( this, "name", true ); ; | 1582 | QDialog dia( this, "name", true ); ; |
1560 | dia.setCaption( cap ); | 1583 | dia.setCaption( cap ); |
1561 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 1584 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
1562 | lay->setSpacing( 3 ); | 1585 | lay->setSpacing( 3 ); |
1563 | lay->setMargin( 3 ); | 1586 | lay->setMargin( 3 ); |
1564 | QTextBrowser tb ( &dia ); | 1587 | QTextBrowser tb ( &dia ); |
1565 | lay->addWidget( &tb ); | 1588 | lay->addWidget( &tb ); |
1566 | tb.setText( text ); | 1589 | tb.setText( text ); |
1567 | #ifdef DESKTOP_VERSION | 1590 | #ifdef DESKTOP_VERSION |
1568 | dia.resize( 640, 480); | 1591 | dia.resize( 640, 480); |
1569 | #else | 1592 | #else |
1570 | dia.showMaximized(); | 1593 | dia.showMaximized(); |
1571 | #endif | 1594 | #endif |
1572 | dia.exec(); | 1595 | dia.exec(); |
1573 | } | 1596 | } |
1574 | 1597 | ||
1575 | void MainWindow::features() | 1598 | void MainWindow::features() |
1576 | { | 1599 | { |
1577 | 1600 | ||
1578 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); | 1601 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); |
1579 | } | 1602 | } |
1580 | 1603 | ||
1581 | void MainWindow::usertrans() | 1604 | void MainWindow::usertrans() |
1582 | { | 1605 | { |
1583 | 1606 | ||
1584 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); | 1607 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); |
1585 | } | 1608 | } |
1586 | 1609 | ||
1587 | void MainWindow::storagehowto() | 1610 | void MainWindow::storagehowto() |
1588 | { | 1611 | { |
1589 | KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); | 1612 | KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); |
1590 | } | 1613 | } |
1591 | void MainWindow::timetrackinghowto() | 1614 | void MainWindow::timetrackinghowto() |
1592 | { | 1615 | { |
1593 | KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" ); | 1616 | KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" ); |
1594 | } | 1617 | } |
1595 | void MainWindow::kdesynchowto() | 1618 | void MainWindow::kdesynchowto() |
1596 | { | 1619 | { |
1597 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 1620 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
1598 | } | 1621 | } |
1599 | void MainWindow::multisynchowto() | 1622 | void MainWindow::multisynchowto() |
1600 | { | 1623 | { |
1601 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 1624 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
1602 | } | 1625 | } |
1603 | void MainWindow::synchowto() | 1626 | void MainWindow::synchowto() |
1604 | { | 1627 | { |
1605 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 1628 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
1606 | } | 1629 | } |
1607 | void MainWindow::faq() | 1630 | void MainWindow::faq() |
1608 | { | 1631 | { |
1609 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); | 1632 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); |
1610 | 1633 | ||
1611 | } | 1634 | } |
1612 | void MainWindow::whatsNew() | 1635 | void MainWindow::whatsNew() |
1613 | { | 1636 | { |
1614 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 1637 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
1615 | 1638 | ||
1616 | } | 1639 | } |
1617 | void MainWindow::licence() | 1640 | void MainWindow::licence() |
1618 | { | 1641 | { |
1619 | KApplication::showLicence(); | 1642 | KApplication::showLicence(); |
1620 | 1643 | ||
1621 | } | 1644 | } |
1622 | void MainWindow::about() | 1645 | void MainWindow::about() |
1623 | { | 1646 | { |
1624 | QString version; | 1647 | QString version; |
1625 | #include <../version> | 1648 | #include <../version> |
1626 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), | 1649 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), |
1627 | i18n("KOrganizer/Platform-independent\n") + | 1650 | i18n("KOrganizer/Platform-independent\n") + |
1628 | "(KO/Pi) " + version + " - " + | 1651 | "(KO/Pi) " + version + " - " + |
1629 | 1652 | ||
1630 | #ifdef DESKTOP_VERSION | 1653 | #ifdef DESKTOP_VERSION |
1631 | i18n("Desktop Edition\n") + | 1654 | i18n("Desktop Edition\n") + |
1632 | #else | 1655 | #else |
1633 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + | 1656 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + |
1634 | #endif | 1657 | #endif |
1635 | 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!") ); | 1658 | 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!") ); |
1636 | } | 1659 | } |
1637 | void MainWindow::keyBindings() | 1660 | void MainWindow::keyBindings() |
1638 | { | 1661 | { |
1639 | QString cap = i18n("KO/Pi Keys + Colors"); | 1662 | QString cap = i18n("KO/Pi Keys + Colors"); |
1640 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1663 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1641 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1664 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1642 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + | 1665 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + |
1643 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + | 1666 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + |
1644 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1667 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1645 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1668 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1646 | i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ | 1669 | i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ |
1647 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1670 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1648 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1671 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1649 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ | 1672 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ |
1650 | i18n("<p><b>Q</b>: Show next date with conflicting events\n ")+ | 1673 | i18n("<p><b>Q</b>: Show next date with conflicting events\n ")+ |
1651 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1674 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1652 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1675 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1653 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1676 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1654 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ | 1677 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ |
1655 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1678 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1656 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1679 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1657 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ | 1680 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ |
1658 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1681 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1659 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1682 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1660 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1683 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1661 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1684 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1662 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1685 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1663 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1686 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1664 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1687 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1665 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1688 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1666 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1689 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1667 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1690 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1668 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | 1691 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ |
1669 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | 1692 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ |
1670 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | 1693 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ |
1671 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1694 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1672 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1695 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1673 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1696 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1674 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1697 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1675 | i18n("<p><h3>In list view:</h3></p>\n") + | 1698 | i18n("<p><h3>In list view:</h3></p>\n") + |
1676 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1699 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1677 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1700 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1678 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1701 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1679 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1702 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1680 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1703 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1681 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1704 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1682 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1705 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1683 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1706 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1684 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1707 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1685 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1708 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1686 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1709 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
1687 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1710 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1688 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1711 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1689 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1712 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1690 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1713 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1691 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1714 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
1692 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ | 1715 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ |
1693 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + | 1716 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + |
1694 | i18n("<p><b>White</b>: Item readonly</p>\n"); | 1717 | i18n("<p><b>White</b>: Item readonly</p>\n"); |
1695 | displayText( text, cap); | 1718 | displayText( text, cap); |
1696 | } | 1719 | } |
1697 | void MainWindow::aboutAutoSaving() | 1720 | void MainWindow::aboutAutoSaving() |
1698 | { | 1721 | { |
1699 | 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"); | 1722 | 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"); |
1700 | 1723 | ||
1701 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); | 1724 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); |
1702 | 1725 | ||
1703 | } | 1726 | } |
1704 | void MainWindow::aboutKnownBugs() | 1727 | void MainWindow::aboutKnownBugs() |
1705 | { | 1728 | { |
1706 | QMessageBox* msg; | 1729 | QMessageBox* msg; |
1707 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), | 1730 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), |
1708 | 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")+ | 1731 | 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")+ |
1709 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1732 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1710 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + | 1733 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + |
1711 | i18n("\nor report them in the bugtracker on\n") + | 1734 | i18n("\nor report them in the bugtracker on\n") + |
1712 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), | 1735 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), |
1713 | QMessageBox::NoIcon, | 1736 | QMessageBox::NoIcon, |
1714 | QMessageBox::Ok, | 1737 | QMessageBox::Ok, |
1715 | QMessageBox::NoButton, | 1738 | QMessageBox::NoButton, |
1716 | QMessageBox::NoButton); | 1739 | QMessageBox::NoButton); |
1717 | msg->exec(); | 1740 | msg->exec(); |
1718 | delete msg; | 1741 | delete msg; |
1719 | 1742 | ||
1720 | } | 1743 | } |
1721 | 1744 | ||
1722 | QString MainWindow::defaultFileName() | 1745 | QString MainWindow::defaultFileName() |
1723 | { | 1746 | { |
1724 | return QDir::convertSeparators( locateLocal( "data", "korganizer/mycalendar.ics" ) ); | 1747 | return QDir::convertSeparators( locateLocal( "data", "korganizer/mycalendar.ics" ) ); |
1725 | } | 1748 | } |
1726 | QString MainWindow::syncFileName() | 1749 | QString MainWindow::syncFileName() |
1727 | { | 1750 | { |
1728 | #ifdef DESKTOP_VERSION | 1751 | #ifdef DESKTOP_VERSION |
1729 | return QDir::convertSeparators( locateLocal( "tmp", "synccalendar.ics" ) ); | 1752 | return QDir::convertSeparators( locateLocal( "tmp", "synccalendar.ics" ) ); |
1730 | #else | 1753 | #else |
1731 | return QString( "/tmp/synccalendar.ics" ); | 1754 | return QString( "/tmp/synccalendar.ics" ); |
1732 | #endif | 1755 | #endif |
1733 | } | 1756 | } |
1734 | #include "koglobals.h" | 1757 | #include "koglobals.h" |
1735 | #include <kcalendarsystem.h> | 1758 | #include <kcalendarsystem.h> |
1736 | void MainWindow::updateWeek(QDate seda) | 1759 | void MainWindow::updateWeek(QDate seda) |
1737 | { | 1760 | { |
1738 | int weekNum = KGlobal::locale()->weekNum ( seda ); | 1761 | int weekNum = KGlobal::locale()->weekNum ( seda ); |
1739 | mWeekPixmap.fill( mWeekBgColor ); | 1762 | mWeekPixmap.fill( mWeekBgColor ); |
1740 | QPainter p ( &mWeekPixmap ); | 1763 | QPainter p ( &mWeekPixmap ); |
1741 | p.setFont( mWeekFont ); | 1764 | p.setFont( mWeekFont ); |
1742 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); | 1765 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); |
1743 | p.end(); | 1766 | p.end(); |
1744 | QIconSet icon3 ( mWeekPixmap ); | 1767 | QIconSet icon3 ( mWeekPixmap ); |
1745 | mWeekAction->setIconSet ( icon3 ); | 1768 | mWeekAction->setIconSet ( icon3 ); |
1746 | 1769 | ||
1747 | } | 1770 | } |
1748 | void MainWindow::updateWeekNum(const DateList &selectedDates) | 1771 | void MainWindow::updateWeekNum(const DateList &selectedDates) |
1749 | { | 1772 | { |
1750 | updateWeek( selectedDates.first() ); | 1773 | updateWeek( selectedDates.first() ); |
1751 | } | 1774 | } |
1752 | void MainWindow::processIncidenceSelection( Incidence *incidence ) | 1775 | void MainWindow::processIncidenceSelection( Incidence *incidence ) |
1753 | { | 1776 | { |
1754 | if ( !incidence ) { | 1777 | if ( !incidence ) { |
1755 | mShowAction->setMenuText( i18n("Show") ); | 1778 | mShowAction->setMenuText( i18n("Show") ); |
1756 | enableIncidenceActions( false ); | 1779 | enableIncidenceActions( false ); |
1757 | mNewSubTodoAction->setEnabled( false ); | 1780 | mNewSubTodoAction->setEnabled( false ); |
1758 | setCaptionToDates(); | 1781 | setCaptionToDates(); |
1759 | return; | 1782 | return; |
1760 | } | 1783 | } |
1761 | QString startString = ""; | 1784 | QString startString = ""; |
1762 | if ( incidence->typeID() != todoID ) { | 1785 | if ( incidence->typeID() != todoID ) { |
1763 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { | 1786 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { |
1764 | if ( incidence->doesFloat() ) { | 1787 | if ( incidence->doesFloat() ) { |
1765 | startString += ": "+incidence->dtStartDateStr( true ); | 1788 | startString += ": "+incidence->dtStartDateStr( true ); |
1766 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); | 1789 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); |
1767 | } else { | 1790 | } else { |
1768 | startString = ": "+incidence->dtStartStr(true); | 1791 | startString = ": "+incidence->dtStartStr(true); |
1769 | startString += " --- "+((Event*)incidence)->dtEndStr(true); | 1792 | startString += " --- "+((Event*)incidence)->dtEndStr(true); |
1770 | } | 1793 | } |
1771 | } else { | 1794 | } else { |
1772 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) | 1795 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) |
1773 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ | 1796 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ |
1774 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); | 1797 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); |
1775 | if ( incidence->isBirthday() || incidence->isAnniversary() ) { | 1798 | if ( incidence->isBirthday() || incidence->isAnniversary() ) { |
1776 | bool ok; | 1799 | bool ok; |
1777 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); | 1800 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); |
1778 | if ( ok ) { | 1801 | if ( ok ) { |
1779 | int years = noc.date().year() - incidence->dtStart().date().year(); | 1802 | int years = noc.date().year() - incidence->dtStart().date().year(); |
1780 | startString += i18n(" (%1 y.)"). arg( years ); | 1803 | startString += i18n(" (%1 y.)"). arg( years ); |
1781 | } | 1804 | } |
1782 | } | 1805 | } |
1783 | else | 1806 | else |
1784 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); | 1807 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); |
1785 | } | 1808 | } |
1786 | } | 1809 | } |
1787 | else { | 1810 | else { |
1788 | if ( (( KCal::Todo*)incidence)->percentComplete() == 100 ) | 1811 | if ( (( KCal::Todo*)incidence)->percentComplete() == 100 ) |
1789 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+i18n("completed on %1").arg( (( KCal::Todo*)incidence)->completedStr(true) ); | 1812 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+i18n("completed on %1").arg( (( KCal::Todo*)incidence)->completedStr(true) ); |
1790 | else | 1813 | else |
1791 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); | 1814 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); |
1792 | } | 1815 | } |
1793 | if ( !incidence->location().isEmpty() ) | 1816 | if ( !incidence->location().isEmpty() ) |
1794 | startString += " (" +incidence->location()+")"; | 1817 | startString += " (" +incidence->location()+")"; |
1795 | setCaption( incidence->summary()+startString); | 1818 | setCaption( incidence->summary()+startString); |
1796 | enableIncidenceActions( true ); | 1819 | enableIncidenceActions( true ); |
1797 | if ( incidence->typeID() == eventID ) { | 1820 | if ( incidence->typeID() == eventID ) { |
1798 | mShowAction->setMenuText( i18n("Show Event") ); | 1821 | mShowAction->setMenuText( i18n("Show Event") ); |
1799 | mNewSubTodoAction->setEnabled( false ); | 1822 | mNewSubTodoAction->setEnabled( false ); |
1800 | } else if ( incidence->typeID() == todoID ) { | 1823 | } else if ( incidence->typeID() == todoID ) { |
1801 | mShowAction->setMenuText( i18n("Show Todo") ); | 1824 | mShowAction->setMenuText( i18n("Show Todo") ); |
1802 | mNewSubTodoAction->setEnabled( true ); | 1825 | mNewSubTodoAction->setEnabled( true ); |
1803 | } else { | 1826 | } else { |
1804 | mShowAction->setMenuText( i18n("Show") ); | 1827 | mShowAction->setMenuText( i18n("Show") ); |
1805 | mNewSubTodoAction->setEnabled( false ); | 1828 | mNewSubTodoAction->setEnabled( false ); |
1806 | } | 1829 | } |
1807 | #ifdef DESKTOP_VERSION | 1830 | #ifdef DESKTOP_VERSION |
1808 | static QPixmap jP = SmallIcon( "journal" ); | 1831 | static QPixmap jP = SmallIcon( "journal" ); |
1809 | static QPixmap eP = SmallIcon( "newevent" ); | 1832 | static QPixmap eP = SmallIcon( "newevent" ); |
1810 | static QPixmap tP = SmallIcon( "newtodo" ); | 1833 | static QPixmap tP = SmallIcon( "newtodo" ); |
1811 | QIconSet icon; | 1834 | QIconSet icon; |
1812 | if ( incidence->typeID() == todoID ) | 1835 | if ( incidence->typeID() == todoID ) |
1813 | icon = QIconSet ( tP ); | 1836 | icon = QIconSet ( tP ); |
1814 | else if ( incidence->typeID() == eventID ) | 1837 | else if ( incidence->typeID() == eventID ) |
1815 | icon = QIconSet ( eP ); | 1838 | icon = QIconSet ( eP ); |
1816 | else if ( incidence->typeID() == journalID ) | 1839 | else if ( incidence->typeID() == journalID ) |
1817 | icon = QIconSet ( jP ); | 1840 | icon = QIconSet ( jP ); |
1818 | mPrintSelAction->setIconSet ( icon ); | 1841 | mPrintSelAction->setIconSet ( icon ); |
1819 | #endif | 1842 | #endif |
1820 | } | 1843 | } |
1821 | 1844 | ||
1822 | void MainWindow::enableIncidenceActions( bool enabled ) | 1845 | void MainWindow::enableIncidenceActions( bool enabled ) |
1823 | { | 1846 | { |
1824 | mShowAction->setEnabled( enabled ); | 1847 | mShowAction->setEnabled( enabled ); |
1825 | mEditAction->setEnabled( enabled ); | 1848 | mEditAction->setEnabled( enabled ); |
1826 | mDeleteAction->setEnabled( enabled ); | 1849 | mDeleteAction->setEnabled( enabled ); |
1827 | 1850 | ||
1828 | mCloneAction->setEnabled( enabled ); | 1851 | mCloneAction->setEnabled( enabled ); |
1829 | mMoveAction->setEnabled( enabled ); | 1852 | mMoveAction->setEnabled( enabled ); |
1830 | #ifndef DESKTOP_VERSION | 1853 | #ifndef DESKTOP_VERSION |
1831 | mBeamAction->setEnabled( enabled ); | 1854 | mBeamAction->setEnabled( enabled ); |
1832 | #else | 1855 | #else |
1833 | mPrintSelAction->setEnabled( enabled ); | 1856 | mPrintSelAction->setEnabled( enabled ); |
1834 | #endif | 1857 | #endif |
1835 | mCancelAction->setEnabled( enabled ); | 1858 | mCancelAction->setEnabled( enabled ); |
1836 | } | 1859 | } |
1837 | 1860 | ||
1838 | void MainWindow::importOL() | 1861 | void MainWindow::importOL() |
1839 | { | 1862 | { |
1840 | #ifdef _OL_IMPORT_ | 1863 | #ifdef _OL_IMPORT_ |
1841 | mView->clearAllViews(); | 1864 | mView->clearAllViews(); |
1842 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); | 1865 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); |
1843 | id->exec(); | 1866 | id->exec(); |
1844 | delete id; | 1867 | delete id; |
1845 | mView->calendar()->checkAlarmForIncidence( 0, true ); | 1868 | mView->calendar()->checkAlarmForIncidence( 0, true ); |
1846 | mView->updateView(); | 1869 | mView->updateView(); |
1847 | #endif | 1870 | #endif |
1848 | } | 1871 | } |
1849 | void MainWindow::importBday() | 1872 | void MainWindow::importBday() |
1850 | { | 1873 | { |
1851 | int result = QMessageBox::warning( this, i18n("KO/Pi import information!"), | 1874 | int result = QMessageBox::warning( this, i18n("KO/Pi import information!"), |
1852 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), | 1875 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), |
1853 | i18n("Import!"), i18n("Cancel"), 0, | 1876 | i18n("Import!"), i18n("Cancel"), 0, |
1854 | 0, 1 ); | 1877 | 0, 1 ); |
1855 | if ( result == 0 ) { | 1878 | if ( result == 0 ) { |
1856 | mView->importBday(); | 1879 | mView->importBday(); |
1857 | 1880 | ||
1858 | } | 1881 | } |
1859 | 1882 | ||
1860 | 1883 | ||
1861 | } | 1884 | } |
1862 | void MainWindow::importQtopia() | 1885 | void MainWindow::importQtopia() |
1863 | { | 1886 | { |
1864 | //#ifndef DESKTOP_VERSION | 1887 | //#ifndef DESKTOP_VERSION |
1865 | 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"); | 1888 | 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"); |
1866 | #ifdef DESKTOP_VERSION | 1889 | #ifdef DESKTOP_VERSION |
1867 | 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"); | 1890 | 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"); |
1868 | #endif | 1891 | #endif |
1869 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, | 1892 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, |
1870 | i18n("Import!"), i18n("Cancel"), 0, | 1893 | i18n("Import!"), i18n("Cancel"), 0, |
1871 | 0, 1 ); | 1894 | 0, 1 ); |
1872 | if ( result == 0 ) { | 1895 | if ( result == 0 ) { |
1873 | #ifndef DESKTOP_VERSION | 1896 | #ifndef DESKTOP_VERSION |
1874 | QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); | 1897 | QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); |
1875 | QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); | 1898 | QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); |
1876 | QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; | 1899 | QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; |
1877 | #else | 1900 | #else |
1878 | QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; | 1901 | QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; |
1879 | QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; | 1902 | QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; |
1880 | QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; | 1903 | QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; |
1881 | #endif | 1904 | #endif |
1882 | mView->importQtopia( categories, datebook, todolist ); | 1905 | mView->importQtopia( categories, datebook, todolist ); |
1883 | } | 1906 | } |
1884 | mView->calendar()->reInitAlarmSettings(); | 1907 | mView->calendar()->reInitAlarmSettings(); |
1885 | #if 0 | 1908 | #if 0 |
1886 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1909 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1887 | i18n("Not supported \non desktop!\n"), | 1910 | i18n("Not supported \non desktop!\n"), |
1888 | i18n("Ok"), i18n("Cancel"), 0, | 1911 | i18n("Ok"), i18n("Cancel"), 0, |
1889 | 0, 1 ); | 1912 | 0, 1 ); |
1890 | 1913 | ||
1891 | #endif | 1914 | #endif |
1892 | } | 1915 | } |
1893 | 1916 | ||
1894 | void MainWindow::saveOnClose() | 1917 | void MainWindow::saveOnClose() |
1895 | { | 1918 | { |
1896 | KOPrefs *p = KOPrefs::instance(); | 1919 | KOPrefs *p = KOPrefs::instance(); |
1897 | p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); | 1920 | p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); |
1898 | p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); | 1921 | p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); |
1899 | p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); | 1922 | p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); |
1900 | if ( filterToolBar ) { | 1923 | if ( filterToolBar ) { |
1901 | p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); | 1924 | p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); |
1902 | } | 1925 | } |
1903 | #ifdef DESKTOP_VERSION | 1926 | #ifdef DESKTOP_VERSION |
1904 | 1927 | ||
1905 | QPoint myP; | 1928 | QPoint myP; |
1906 | myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1929 | myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1907 | if ( p->mToolBarHor ) | 1930 | if ( p->mToolBarHor ) |
1908 | p->mToolBarUp = myP.y() > height()/2; | 1931 | p->mToolBarUp = myP.y() > height()/2; |
1909 | else | 1932 | else |
1910 | p->mToolBarUp = myP.x() > width()/2; | 1933 | p->mToolBarUp = myP.x() > width()/2; |
1911 | myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1934 | myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1912 | if ( p->mToolBarHorV ) | 1935 | if ( p->mToolBarHorV ) |
1913 | p->mToolBarUpV = myP.y() > height()/2; | 1936 | p->mToolBarUpV = myP.y() > height()/2; |
1914 | else | 1937 | else |
1915 | p->mToolBarUpV = myP.x() > width()/2 ; | 1938 | p->mToolBarUpV = myP.x() > width()/2 ; |
1916 | myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1939 | myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1917 | if ( p->mToolBarHorN ) | 1940 | if ( p->mToolBarHorN ) |
1918 | p->mToolBarUpN = myP.y() > height()/2; | 1941 | p->mToolBarUpN = myP.y() > height()/2; |
1919 | else | 1942 | else |
1920 | p->mToolBarUpN = myP.x() > width()/2 ; | 1943 | p->mToolBarUpN = myP.x() > width()/2 ; |
1921 | if ( filterToolBar ) { | 1944 | if ( filterToolBar ) { |
1922 | myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1945 | myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1923 | if ( p->mToolBarHorF ) | 1946 | if ( p->mToolBarHorF ) |
1924 | p->mToolBarUpF = myP.y() > height()/2; | 1947 | p->mToolBarUpF = myP.y() > height()/2; |
1925 | else | 1948 | else |
1926 | p->mToolBarUpF = myP.x() > width()/2 ; | 1949 | p->mToolBarUpF = myP.x() > width()/2 ; |
1927 | } | 1950 | } |
1928 | #else | 1951 | #else |
1929 | if ( p->mToolBarHor ) | 1952 | if ( p->mToolBarHor ) |
1930 | p->mToolBarUp = iconToolBar->y() > height()/2; | 1953 | p->mToolBarUp = iconToolBar->y() > height()/2; |
1931 | else | 1954 | else |
1932 | p->mToolBarUp = iconToolBar->x() > width()/2; | 1955 | p->mToolBarUp = iconToolBar->x() > width()/2; |
1933 | if ( p->mToolBarHorV ) | 1956 | if ( p->mToolBarHorV ) |
1934 | p->mToolBarUpV = viewToolBar->y() > height()/2; | 1957 | p->mToolBarUpV = viewToolBar->y() > height()/2; |
1935 | else | 1958 | else |
1936 | p->mToolBarUpV = viewToolBar->x() > width()/2 ; | 1959 | p->mToolBarUpV = viewToolBar->x() > width()/2 ; |
1937 | 1960 | ||
1938 | if ( p->mToolBarHorN ) | 1961 | if ( p->mToolBarHorN ) |
1939 | p->mToolBarUpN = navigatorToolBar->y() > height()/2; | 1962 | p->mToolBarUpN = navigatorToolBar->y() > height()/2; |
1940 | else | 1963 | else |
1941 | p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; | 1964 | p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; |
1942 | if ( filterToolBar ) { | 1965 | if ( filterToolBar ) { |
1943 | if ( p->mToolBarHorF ) | 1966 | if ( p->mToolBarHorF ) |
1944 | p->mToolBarUpF = filterToolBar->y() > height()/2; | 1967 | p->mToolBarUpF = filterToolBar->y() > height()/2; |
1945 | else | 1968 | else |
1946 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; | 1969 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; |
1947 | } | 1970 | } |
1948 | #endif | 1971 | #endif |
1949 | save(); | 1972 | save(); |
1950 | mView->writeSettings(); | 1973 | mView->writeSettings(); |
1951 | mView->checkSuspendAlarm(); | 1974 | mView->checkSuspendAlarm(); |
1952 | } | 1975 | } |
1953 | void MainWindow::slotModifiedChanged( bool ) | 1976 | void MainWindow::slotModifiedChanged( bool ) |
1954 | { | 1977 | { |
1955 | if ( mBlockAtStartup ) | 1978 | if ( mBlockAtStartup ) |
1956 | return; | 1979 | return; |
1957 | 1980 | ||
1958 | int msec; | 1981 | int msec; |
1959 | if ( mCalendarModifiedFlag ) { | 1982 | if ( mCalendarModifiedFlag ) { |
1960 | //qDebug(" MainWindow timer is running "); | 1983 | //qDebug(" MainWindow timer is running "); |
1961 | return; | 1984 | return; |
1962 | } | 1985 | } |
1963 | // we store the changes after 1 minute, | 1986 | // we store the changes after 1 minute, |
1964 | // and for safety reasons after 10 minutes again | 1987 | // and for safety reasons after 10 minutes again |
1965 | if ( !mSyncManager->blockSave() ) | 1988 | if ( !mSyncManager->blockSave() ) |
1966 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; | 1989 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; |
1967 | else | 1990 | else |
1968 | msec = 1000 * 600; | 1991 | msec = 1000 * 600; |
1969 | mSaveTimer.start( msec, true ); // 1 minute | 1992 | mSaveTimer.start( msec, true ); // 1 minute |
1970 | mSaveTime.restart(); | 1993 | mSaveTimerStart = QDateTime::currentDateTime(); |
1971 | mSaveDelay = msec/1000; | 1994 | mSaveDelay = msec/1000; |
1972 | qDebug("KO: Saving File in %d secs!", msec/1000); | 1995 | qDebug("KO: Saving File in %d secs!", msec/1000); |
1973 | mCalendarModifiedFlag = true; | 1996 | mCalendarModifiedFlag = true; |
1974 | } | 1997 | } |
1975 | void MainWindow::saveStopTimer() | 1998 | void MainWindow::saveStopTimer() |
1976 | { | 1999 | { |
1977 | mSaveTimer.stop(); | 2000 | mSaveTimer.stop(); |
1978 | } | 2001 | } |
1979 | void MainWindow::backupAllFiles() | 2002 | void MainWindow::backupAllFiles() |
1980 | { | 2003 | { |
1981 | QDate reference ( 2000,1,1); | 2004 | QDate reference ( 2000,1,1); |
1982 | int daysTo = reference.daysTo ( QDate::currentDate() ); | 2005 | int daysTo = reference.daysTo ( QDate::currentDate() ); |
1983 | setCaption(i18n("Creating backup ... please wait ..." )); | 2006 | setCaption(i18n("Creating backup ... please wait ..." )); |
1984 | qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); | 2007 | qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); |
1985 | // we need the file path, the backup dir and the number of bups as param | 2008 | // we need the file path, the backup dir and the number of bups as param |
1986 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; | 2009 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; |
1987 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) | 2010 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) |
1988 | bupDir = KGlobalSettings::backupDataDir(); | 2011 | bupDir = KGlobalSettings::backupDataDir(); |
1989 | int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); | 2012 | int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); |
1990 | if ( retval == 0 ) { | 2013 | if ( retval == 0 ) { |
1991 | setCaption(i18n("Backup cancelled" )); | 2014 | setCaption(i18n("Backup cancelled" )); |
1992 | qDebug("KO: Backup cancelled. Will try again tomorrow "); | 2015 | qDebug("KO: Backup cancelled. Will try again tomorrow "); |
1993 | // retval == 0 : backup skipped for today, try again tomorrow | 2016 | // retval == 0 : backup skipped for today, try again tomorrow |
1994 | KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; | 2017 | KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; |
1995 | } else if ( retval == 1 ){ | 2018 | } else if ( retval == 1 ){ |
1996 | qDebug("KO: Backup created."); | 2019 | qDebug("KO: Backup created."); |
1997 | // backup ok | 2020 | // backup ok |
1998 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; | 2021 | QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; |
1999 | KopiCalendarFile * cal = calendars.first(); | 2022 | KopiCalendarFile * cal = calendars.first(); |
2000 | cal = calendars.next(); | 2023 | cal = calendars.next(); |
2001 | while ( cal ) { | 2024 | while ( cal ) { |
2002 | if ( !cal->mErrorOnLoad ) { | 2025 | if ( !cal->mErrorOnLoad ) { |
2003 | KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); | 2026 | KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); |
2004 | } | 2027 | } |
2005 | cal = calendars.next(); | 2028 | cal = calendars.next(); |
2006 | } | 2029 | } |
2007 | KOPrefs::instance()->mLastBackupDate = daysTo; | 2030 | KOPrefs::instance()->mLastBackupDate = daysTo; |
2008 | setCaption(i18n("Backup succesfully finished" )); | 2031 | setCaption(i18n("Backup succesfully finished" )); |
2009 | } else if ( retval == 2 ){ | 2032 | } else if ( retval == 2 ){ |
2010 | setCaption(i18n("Backup globally disabled" )); | 2033 | setCaption(i18n("Backup globally disabled" )); |
2011 | qDebug("KO: Backup globally cancelled."); | 2034 | qDebug("KO: Backup globally cancelled."); |
2012 | // backup globally cancelled | 2035 | // backup globally cancelled |
2013 | KPimGlobalPrefs::instance()->mBackupEnabled = false; | 2036 | KPimGlobalPrefs::instance()->mBackupEnabled = false; |
2014 | } | 2037 | } |
2015 | // retval == 3: do nothing, try again later | 2038 | // retval == 3: do nothing, try again later |
2016 | } | 2039 | } |
2017 | void MainWindow::save() | 2040 | void MainWindow::save() |
2018 | { | 2041 | { |
2019 | if ( mSaveDelay ) { | 2042 | if ( mSaveDelay ) { |
2020 | if ( mSaveDelay + 60 < mSaveTime.elapsed()/1000 ) { | 2043 | int elapsed = mSaveTimerStart.secsTo( QDateTime::currentDateTime() ); |
2021 | qDebug("KO: Save delay %d. Elapsed save time %d ", mSaveDelay, mSaveTime.elapsed()/1000 ); | 2044 | if ( mSaveDelay < elapsed ) { |
2022 | qDebug("KO: Restarting save timer"); | 2045 | qDebug("KO: Pending save after wakeup from suspend detected."); |
2023 | int msec = 10000; | 2046 | qDebug("KO: Save delay %d sec. Elapsed save time %d sec.", mSaveDelay, elapsed ); |
2024 | mSaveTimer.start( msec, true ); // 1 minute | 2047 | qDebug("KO: Restarting save timer to save in 15 sec."); |
2025 | mSaveTime.restart(); | 2048 | int msec = 15000; |
2049 | mSaveTimer.start( msec, true ); | ||
2050 | mSaveTimerStart = QDateTime::currentDateTime(); | ||
2026 | mSaveDelay = msec/1000; | 2051 | mSaveDelay = msec/1000; |
2027 | return; | 2052 | return; |
2028 | } | 2053 | } |
2029 | } | 2054 | } |
2030 | 2055 | ||
2031 | if ( mView->viewManager()->journalView() ) | 2056 | if ( mView->viewManager()->journalView() ) |
2032 | mView->viewManager()->journalView()->checkModified(); | 2057 | mView->viewManager()->journalView()->checkModified(); |
2033 | if ( !mCalendarModifiedFlag ) { | 2058 | if ( !mCalendarModifiedFlag ) { |
2034 | qDebug("KO: Calendar not modified. Nothing saved."); | 2059 | qDebug("KO: Calendar not modified. Nothing saved."); |
2035 | return; | 2060 | return; |
2036 | } | 2061 | } |
2037 | if ( mSyncManager->blockSave() ) { | 2062 | if ( mSyncManager->blockSave() ) { |
2038 | slotModifiedChanged( true ); | 2063 | slotModifiedChanged( true ); |
2039 | return; | 2064 | return; |
2040 | } | 2065 | } |
2041 | mSaveDelay = 0; | 2066 | mSaveDelay = 0; |
2042 | mSyncManager->setBlockSave(true); | 2067 | mSyncManager->setBlockSave(true); |
2043 | if ( mView->checkAllFileVersions() ) { | 2068 | if ( mView->checkAllFileVersions() ) { |
2044 | if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ | 2069 | if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ |
2045 | QDate reference ( 2000,1,1); | 2070 | QDate reference ( 2000,1,1); |
2046 | int daysTo = reference.daysTo ( QDate::currentDate() ); | 2071 | int daysTo = reference.daysTo ( QDate::currentDate() ); |
2047 | if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { | 2072 | if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { |
2048 | backupAllFiles(); | 2073 | backupAllFiles(); |
2049 | } | 2074 | } |
2050 | ; // KPimGlobalPrefs::instance()->mLastBackupDate | 2075 | ; // KPimGlobalPrefs::instance()->mLastBackupDate |
2051 | } | 2076 | } |
2052 | QTime neededSaveTime; | 2077 | QTime neededSaveTime; |
2053 | neededSaveTime.start(); | 2078 | neededSaveTime.start(); |
2054 | if ( !isMinimized () ) | 2079 | if ( !isMinimized () ) |
2055 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); | 2080 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); |
2056 | qDebug("KO: Start saving data to file!"); | 2081 | qDebug("KO: Start saving data to file!"); |
2057 | if ( mView->saveCalendars() ) | 2082 | if ( mView->saveCalendars() ) |
2058 | mCalendarModifiedFlag = false; | 2083 | mCalendarModifiedFlag = false; |
2059 | int msNeeded = neededSaveTime.elapsed(); | 2084 | int msNeeded = neededSaveTime.elapsed(); |
2060 | qDebug("KO: Needed %d ms for saving.",msNeeded ); | 2085 | qDebug("KO: Needed %d ms for saving.",msNeeded ); |
2061 | QString savemes; | 2086 | QString savemes; |
2062 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); | 2087 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); |
2063 | if ( !isMinimized () ) | 2088 | if ( !isMinimized () ) |
2064 | setCaption(savemes); | 2089 | setCaption(savemes); |
2065 | else | 2090 | else |
2066 | qDebug(savemes); | 2091 | qDebug(savemes); |
2067 | } else { | 2092 | } else { |
2068 | setCaption(i18n("Saving cancelled!")); | 2093 | setCaption(i18n("Saving cancelled!")); |
2069 | mCalendarModifiedFlag = false; | 2094 | mCalendarModifiedFlag = false; |
2070 | slotModifiedChanged( true ); | 2095 | slotModifiedChanged( true ); |
2071 | } | 2096 | } |
2072 | mSyncManager->setBlockSave( false ); | 2097 | mSyncManager->setBlockSave( false ); |
2073 | } | 2098 | } |
2074 | 2099 | ||
2075 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) | 2100 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) |
2076 | { | 2101 | { |
2077 | if ( !e->isAutoRepeat() ) { | 2102 | if ( !e->isAutoRepeat() ) { |
2078 | mFlagKeyPressed = false; | 2103 | mFlagKeyPressed = false; |
2079 | } | 2104 | } |
2080 | } | 2105 | } |
2081 | void MainWindow::keyPressEvent ( QKeyEvent * e ) | 2106 | void MainWindow::keyPressEvent ( QKeyEvent * e ) |
2082 | { | 2107 | { |
2083 | qApp->processEvents(); | 2108 | qApp->processEvents(); |
2084 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { | 2109 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { |
2085 | e->ignore(); | 2110 | e->ignore(); |
2086 | // qDebug(" ignore %d",e->isAutoRepeat() ); | 2111 | // qDebug(" ignore %d",e->isAutoRepeat() ); |
2087 | return; | 2112 | return; |
2088 | } | 2113 | } |
2089 | if (! e->isAutoRepeat() ) | 2114 | if (! e->isAutoRepeat() ) |
2090 | mFlagKeyPressed = true; | 2115 | mFlagKeyPressed = true; |
2091 | KOPrefs *p = KOPrefs::instance(); | 2116 | KOPrefs *p = KOPrefs::instance(); |
2092 | bool showSelectedDates = false; | 2117 | bool showSelectedDates = false; |
2093 | int size; | 2118 | int size; |
2094 | int pro = 0; | 2119 | int pro = 0; |
2095 | //qDebug("MainWindow::keyPressEvent "); | 2120 | //qDebug("MainWindow::keyPressEvent "); |
2096 | switch ( e->key() ) { | 2121 | switch ( e->key() ) { |
2097 | case Qt::Key_Right: | 2122 | case Qt::Key_Right: |
2098 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 2123 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
2099 | mView->goNextMonth(); | 2124 | mView->goNextMonth(); |
2100 | else | 2125 | else |
2101 | mView->goNext(); | 2126 | mView->goNext(); |
2102 | showSelectedDates = true; | 2127 | showSelectedDates = true; |
2103 | break; | 2128 | break; |
2104 | case Qt::Key_Left: | 2129 | case Qt::Key_Left: |
2105 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 2130 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
2106 | mView->goPreviousMonth(); | 2131 | mView->goPreviousMonth(); |
2107 | else | 2132 | else |
2108 | mView->goPrevious(); | 2133 | mView->goPrevious(); |
2109 | showSelectedDates = true; | 2134 | showSelectedDates = true; |
2110 | break; | 2135 | break; |
2111 | case Qt::Key_Down: | 2136 | case Qt::Key_Down: |
2112 | mView->viewManager()->agendaView()->scrollOneHourDown(); | 2137 | mView->viewManager()->agendaView()->scrollOneHourDown(); |
2113 | break; | 2138 | break; |
2114 | case Qt::Key_Up: | 2139 | case Qt::Key_Up: |
2115 | mView->viewManager()->agendaView()->scrollOneHourUp(); | 2140 | mView->viewManager()->agendaView()->scrollOneHourUp(); |
2116 | break; | 2141 | break; |
2117 | case Qt::Key_K: | 2142 | case Qt::Key_K: |
2118 | mView->viewManager()->showMonthViewWeek(); | 2143 | mView->viewManager()->showMonthViewWeek(); |
2119 | break; | 2144 | break; |
2120 | case Qt::Key_I: | 2145 | case Qt::Key_I: |
2121 | mView->showIncidence(); | 2146 | mView->showIncidence(); |
2122 | break; | 2147 | break; |
2123 | case Qt::Key_Delete: | 2148 | case Qt::Key_Delete: |
2124 | case Qt::Key_Backspace: | 2149 | case Qt::Key_Backspace: |
2125 | mView->deleteIncidence(); | 2150 | mView->deleteIncidence(); |
2126 | break; | 2151 | break; |
2127 | case Qt::Key_D: | 2152 | case Qt::Key_D: |
2128 | mView->viewManager()->showDayView(); | 2153 | mView->viewManager()->showDayView(); |
2129 | showSelectedDates = true; | 2154 | showSelectedDates = true; |
2130 | break; | 2155 | break; |
2131 | case Qt::Key_O: | 2156 | case Qt::Key_O: |
2132 | mView->toggleFilerEnabled( ); | 2157 | mView->toggleFilerEnabled( ); |
2133 | break; | 2158 | break; |
2134 | case Qt::Key_0: | 2159 | case Qt::Key_0: |
2135 | case Qt::Key_1: | 2160 | case Qt::Key_1: |
2136 | case Qt::Key_2: | 2161 | case Qt::Key_2: |
2137 | case Qt::Key_3: | 2162 | case Qt::Key_3: |
2138 | case Qt::Key_4: | 2163 | case Qt::Key_4: |
2139 | case Qt::Key_5: | 2164 | case Qt::Key_5: |
2140 | case Qt::Key_6: | 2165 | case Qt::Key_6: |
2141 | case Qt::Key_7: | 2166 | case Qt::Key_7: |
2142 | case Qt::Key_8: | 2167 | case Qt::Key_8: |
2143 | case Qt::Key_9: | 2168 | case Qt::Key_9: |
2144 | pro = e->key()-48; | 2169 | pro = e->key()-48; |
2145 | if ( pro == 0 ) | 2170 | if ( pro == 0 ) |
2146 | pro = 10; | 2171 | pro = 10; |
2147 | if ( e->state() == Qt::ControlButton) | 2172 | if ( e->state() == Qt::ControlButton) |
2148 | pro += 10; | 2173 | pro += 10; |
2149 | break; | 2174 | break; |
2150 | case Qt::Key_M: | 2175 | case Qt::Key_M: |
2151 | mView->viewManager()->showMonthView(); | 2176 | mView->viewManager()->showMonthView(); |
2152 | showSelectedDates = true; | 2177 | showSelectedDates = true; |
2153 | break; | 2178 | break; |
2154 | case Qt::Key_Insert: | 2179 | case Qt::Key_Insert: |
2155 | mView->newEvent(); | 2180 | mView->newEvent(); |
2156 | break; | 2181 | break; |
2157 | case Qt::Key_S : | 2182 | case Qt::Key_S : |
2158 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 2183 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
2159 | mView->newSubTodo(); | 2184 | mView->newSubTodo(); |
2160 | else | 2185 | else |
2161 | mView->dialogManager()->showSearchDialog(); | 2186 | mView->dialogManager()->showSearchDialog(); |
2162 | break; | 2187 | break; |
2163 | case Qt::Key_Y : | 2188 | case Qt::Key_Y : |
2164 | case Qt::Key_Z : | 2189 | case Qt::Key_Z : |
2165 | mView->viewManager()->showWorkWeekView(); | 2190 | mView->viewManager()->showWorkWeekView(); |
2166 | showSelectedDates = true; | 2191 | showSelectedDates = true; |
2167 | break; | 2192 | break; |
2168 | case Qt::Key_U : | 2193 | case Qt::Key_U : |
2169 | mView->viewManager()->showWeekView(); | 2194 | mView->viewManager()->showWeekView(); |
2170 | showSelectedDates = true; | 2195 | showSelectedDates = true; |
2171 | break; | 2196 | break; |
2172 | case Qt::Key_H : | 2197 | case Qt::Key_H : |
2173 | keyBindings(); | 2198 | keyBindings(); |
2174 | break; | 2199 | break; |
2175 | case Qt::Key_W: | 2200 | case Qt::Key_W: |
2176 | mView->viewManager()->showWhatsNextView(); | 2201 | mView->viewManager()->showWhatsNextView(); |
2177 | break; | 2202 | break; |
2178 | case Qt::Key_L: | 2203 | case Qt::Key_L: |
2179 | mView->viewManager()->showListView(); | 2204 | mView->viewManager()->showListView(); |
2180 | break; | 2205 | break; |
2181 | case Qt::Key_N: | 2206 | case Qt::Key_N: |
2182 | mView->viewManager()->showNextView(); | 2207 | mView->viewManager()->showNextView(); |
2183 | break; | 2208 | break; |
2184 | case Qt::Key_V: | 2209 | case Qt::Key_V: |
2185 | mView->viewManager()->showTodoView(); | 2210 | mView->viewManager()->showTodoView(); |
2186 | break; | 2211 | break; |
2187 | case Qt::Key_C: | 2212 | case Qt::Key_C: |
2188 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); | 2213 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); |
2189 | break; | 2214 | break; |
2190 | case Qt::Key_P: | 2215 | case Qt::Key_P: |
2191 | mView->showDatePicker( ); | 2216 | mView->showDatePicker( ); |
2192 | break; | 2217 | break; |
2193 | case Qt::Key_F: | 2218 | case Qt::Key_F: |
2194 | mView->editFilters(); | 2219 | mView->editFilters(); |
2195 | break; | 2220 | break; |
2196 | case Qt::Key_R: | 2221 | case Qt::Key_R: |
2197 | mView->toggleFilter(); | 2222 | mView->toggleFilter(); |
2198 | break; | 2223 | break; |
2199 | case Qt::Key_X: | 2224 | case Qt::Key_X: |
2200 | if ( e->state() == Qt::ControlButton ) | 2225 | if ( e->state() == Qt::ControlButton ) |
2201 | mView->toggleDateNavigatorWidget(); | 2226 | mView->toggleDateNavigatorWidget(); |
2202 | else { | 2227 | else { |
2203 | mView->viewManager()->showNextXView(); | 2228 | mView->viewManager()->showNextXView(); |
2204 | showSelectedDates = true; | 2229 | showSelectedDates = true; |
2205 | } | 2230 | } |
2206 | break; | 2231 | break; |
2207 | case Qt::Key_Space: | 2232 | case Qt::Key_Space: |
2208 | mView->toggleExpand(); | 2233 | mView->toggleExpand(); |
2209 | break; | 2234 | break; |
2210 | case Qt::Key_A: | 2235 | case Qt::Key_A: |
2211 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) | 2236 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) |
2212 | mView->showNextAlarms(); | 2237 | mView->showNextAlarms(); |
2213 | else | 2238 | else |
2214 | mView->toggleAllDaySize(); | 2239 | mView->toggleAllDaySize(); |
2215 | break; | 2240 | break; |
2216 | case Qt::Key_T: | 2241 | case Qt::Key_T: |
2217 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 2242 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
2218 | mView->newTodo(); | 2243 | mView->newTodo(); |
2219 | else { | 2244 | else { |
2220 | mView->goToday(); | 2245 | mView->goToday(); |
2221 | showSelectedDates = true; | 2246 | showSelectedDates = true; |
2222 | } | 2247 | } |
2223 | break; | 2248 | break; |
2224 | case Qt::Key_Q: | 2249 | case Qt::Key_Q: |
2225 | if ( e->state() == Qt::ControlButton ) | 2250 | if ( e->state() == Qt::ControlButton ) |
2226 | mView->conflictNotAll(); | 2251 | mView->conflictNotAll(); |
2227 | else if ( e->state() == Qt::ShiftButton ) | 2252 | else if ( e->state() == Qt::ShiftButton ) |
2228 | mView->conflictAllday(); | 2253 | mView->conflictAllday(); |
2229 | else | 2254 | else |
2230 | mView->conflictAll(); | 2255 | mView->conflictAll(); |
2231 | break; | 2256 | break; |
2232 | case Qt::Key_J: | 2257 | case Qt::Key_J: |
2233 | mView->viewManager()->showJournalView(); | 2258 | mView->viewManager()->showJournalView(); |
2234 | break; | 2259 | break; |
2235 | case Qt::Key_B: | 2260 | case Qt::Key_B: |
2236 | mView->editIncidenceDescription();; | 2261 | mView->editIncidenceDescription();; |
2237 | break; | 2262 | break; |
2238 | // case Qt::Key_Return: | 2263 | // case Qt::Key_Return: |
2239 | case Qt::Key_E: | 2264 | case Qt::Key_E: |
2240 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 2265 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
2241 | mView->newEvent(); | 2266 | mView->newEvent(); |
2242 | else | 2267 | else |
2243 | mView->editIncidence(); | 2268 | mView->editIncidence(); |
2244 | break; | 2269 | break; |
2245 | case Qt::Key_Plus: | 2270 | case Qt::Key_Plus: |
2246 | size = p->mHourSize +2; | 2271 | size = p->mHourSize +2; |
2247 | if ( size <= 22 ) | 2272 | if ( size <= 22 ) |
2248 | configureAgenda( size ); | 2273 | configureAgenda( size ); |
2249 | break; | 2274 | break; |
2250 | case Qt::Key_Minus: | 2275 | case Qt::Key_Minus: |
2251 | size = p->mHourSize - 2; | 2276 | size = p->mHourSize - 2; |
2252 | if ( size >= 4 ) | 2277 | if ( size >= 4 ) |
2253 | configureAgenda( size ); | 2278 | configureAgenda( size ); |
2254 | break; | 2279 | break; |
2255 | 2280 | ||
2256 | 2281 | ||
2257 | default: | 2282 | default: |
2258 | e->ignore(); | 2283 | e->ignore(); |
2259 | } | 2284 | } |
2260 | if ( pro > 0 ) { | 2285 | if ( pro > 0 ) { |
2261 | selectFilter( pro+1 ); | 2286 | selectFilter( pro+1 ); |
2262 | } | 2287 | } |
2263 | if ( showSelectedDates ) { | 2288 | if ( showSelectedDates ) { |
2264 | ;// setCaptionToDates(); | 2289 | ;// setCaptionToDates(); |
2265 | } | 2290 | } |
2266 | 2291 | ||
2267 | } | 2292 | } |
2268 | void MainWindow::fillFilterMenuTB() | 2293 | void MainWindow::fillFilterMenuTB() |
2269 | { | 2294 | { |
2270 | selectFilterMenuTB->clear(); | 2295 | selectFilterMenuTB->clear(); |
2271 | selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); | 2296 | selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); |
2272 | selectFilterMenuTB->insertSeparator(); | 2297 | selectFilterMenuTB->insertSeparator(); |
2273 | selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); | 2298 | selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); |
2274 | 2299 | ||
2275 | selectFilterMenuTB->insertSeparator(); | 2300 | selectFilterMenuTB->insertSeparator(); |
2276 | QPtrList<CalFilter> fili = mView->filters(); | 2301 | QPtrList<CalFilter> fili = mView->filters(); |
2277 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2302 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2278 | CalFilter *filter = fili.first(); | 2303 | CalFilter *filter = fili.first(); |
2279 | int iii = 2; | 2304 | int iii = 2; |
2280 | bool checkitem = mView->filterView()->filtersEnabled(); | 2305 | bool checkitem = mView->filterView()->filtersEnabled(); |
2281 | while(filter) { | 2306 | while(filter) { |
2282 | selectFilterMenuTB->insertItem( filter->name(), iii ); | 2307 | selectFilterMenuTB->insertItem( filter->name(), iii ); |
2283 | if ( filter == curfilter) | 2308 | if ( filter == curfilter) |
2284 | selectFilterMenuTB->setItemChecked( iii, checkitem ); | 2309 | selectFilterMenuTB->setItemChecked( iii, checkitem ); |
2285 | filter = fili.next(); | 2310 | filter = fili.next(); |
2286 | ++iii; | 2311 | ++iii; |
2287 | } | 2312 | } |
2288 | if ( !checkitem ) | 2313 | if ( !checkitem ) |
2289 | selectFilterMenuTB->setItemChecked( 1, true ); | 2314 | selectFilterMenuTB->setItemChecked( 1, true ); |
2290 | 2315 | ||
2291 | int x = 0; | 2316 | int x = 0; |
2292 | int y = iconToolBar->height(); | 2317 | int y = iconToolBar->height(); |
2293 | int dX = 0; | 2318 | int dX = 0; |
2294 | int dY = 0; | 2319 | int dY = 0; |
2295 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 2320 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
2296 | if ( iconToolBar->y() > height()/2 ) { | 2321 | if ( iconToolBar->y() > height()/2 ) { |
2297 | dY = selectFilterMenuTB->sizeHint().height()+8; | 2322 | dY = selectFilterMenuTB->sizeHint().height()+8; |
2298 | y = 0; | 2323 | y = 0; |
2299 | } | 2324 | } |
2300 | } else { | 2325 | } else { |
2301 | if ( iconToolBar->x() > width()/2 ) { // right side | 2326 | if ( iconToolBar->x() > width()/2 ) { // right side |
2302 | x=0; | 2327 | x=0; |
2303 | dX= selectFilterMenuTB->sizeHint().width()+8; | 2328 | dX= selectFilterMenuTB->sizeHint().width()+8; |
2304 | y = 0; | 2329 | y = 0; |
2305 | } else { | 2330 | } else { |
2306 | x= iconToolBar->width(); | 2331 | x= iconToolBar->width(); |
2307 | y = 0; | 2332 | y = 0; |
2308 | } | 2333 | } |
2309 | } | 2334 | } |
2310 | //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); | 2335 | //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); |
2311 | selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))); | 2336 | selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))); |
2312 | } | 2337 | } |
2313 | void MainWindow::fillFilterMenu() | 2338 | void MainWindow::fillFilterMenu() |
2314 | { | 2339 | { |
2315 | selectFilterMenu->clear(); | 2340 | selectFilterMenu->clear(); |
2316 | selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); | 2341 | selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); |
2317 | selectFilterMenu->insertSeparator(); | 2342 | selectFilterMenu->insertSeparator(); |
2318 | selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); | 2343 | selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); |
2319 | 2344 | ||
2320 | selectFilterMenu->insertSeparator(); | 2345 | selectFilterMenu->insertSeparator(); |
2321 | QPtrList<CalFilter> fili = mView->filters(); | 2346 | QPtrList<CalFilter> fili = mView->filters(); |
2322 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2347 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2323 | CalFilter *filter = fili.first(); | 2348 | CalFilter *filter = fili.first(); |
2324 | int iii = 2; | 2349 | int iii = 2; |
2325 | bool checkitem = mView->filterView()->filtersEnabled(); | 2350 | bool checkitem = mView->filterView()->filtersEnabled(); |
2326 | while(filter) { | 2351 | while(filter) { |
2327 | selectFilterMenu->insertItem( filter->name(), iii ); | 2352 | selectFilterMenu->insertItem( filter->name(), iii ); |
2328 | if ( filter == curfilter) | 2353 | if ( filter == curfilter) |
2329 | selectFilterMenu->setItemChecked( iii, checkitem ); | 2354 | selectFilterMenu->setItemChecked( iii, checkitem ); |
2330 | filter = fili.next(); | 2355 | filter = fili.next(); |
2331 | ++iii; | 2356 | ++iii; |
2332 | } | 2357 | } |
2333 | if ( !checkitem ) | 2358 | if ( !checkitem ) |
2334 | selectFilterMenu->setItemChecked( 1, true ); | 2359 | selectFilterMenu->setItemChecked( 1, true ); |
2335 | } | 2360 | } |
2336 | void MainWindow::fillFilterMenuPopup() | 2361 | void MainWindow::fillFilterMenuPopup() |
2337 | { | 2362 | { |
2338 | filterPopupMenu->clear(); | 2363 | filterPopupMenu->clear(); |
2339 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); | 2364 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); |
2340 | 2365 | ||
2341 | filterPopupMenu->insertSeparator(); | 2366 | filterPopupMenu->insertSeparator(); |
2342 | QPtrList<CalFilter> fili = mView->filters(); | 2367 | QPtrList<CalFilter> fili = mView->filters(); |
2343 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2368 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2344 | CalFilter *filter = fili.first(); | 2369 | CalFilter *filter = fili.first(); |
2345 | int iii = 1; | 2370 | int iii = 1; |
2346 | bool checkitem = mView->filterView()->filtersEnabled(); | 2371 | bool checkitem = mView->filterView()->filtersEnabled(); |
2347 | while(filter) { | 2372 | while(filter) { |
2348 | filterPopupMenu->insertItem( filter->name(), iii ); | 2373 | filterPopupMenu->insertItem( filter->name(), iii ); |
2349 | if ( filter == curfilter) | 2374 | if ( filter == curfilter) |
2350 | filterPopupMenu->setItemChecked( iii, checkitem ); | 2375 | filterPopupMenu->setItemChecked( iii, checkitem ); |
2351 | filter = fili.next(); | 2376 | filter = fili.next(); |
2352 | ++iii; | 2377 | ++iii; |
2353 | } | 2378 | } |
2354 | if ( !checkitem ) | 2379 | if ( !checkitem ) |
2355 | filterPopupMenu->setItemChecked( 0, true ); | 2380 | filterPopupMenu->setItemChecked( 0, true ); |
2356 | } | 2381 | } |
2357 | void MainWindow::selectFilter( int fil ) | 2382 | void MainWindow::selectFilter( int fil ) |
2358 | { | 2383 | { |
2359 | 2384 | ||
2360 | if ( fil == 0 ) { | 2385 | if ( fil == 0 ) { |
2361 | mView->editFilters( ); | 2386 | mView->editFilters( ); |
2362 | } else if ( fil == 1 ){ | 2387 | } else if ( fil == 1 ){ |
2363 | if ( mView->filterView()->filtersEnabled() ) | 2388 | if ( mView->filterView()->filtersEnabled() ) |
2364 | mView->toggleFilerEnabled( ); | 2389 | mView->toggleFilerEnabled( ); |
2365 | } else { | 2390 | } else { |
2366 | if ( !mView->filterView()->filtersEnabled() ) { | 2391 | if ( !mView->filterView()->filtersEnabled() ) { |
2367 | mView->filterView()->blockSignals( true ); | 2392 | mView->filterView()->blockSignals( true ); |
2368 | mView->toggleFilerEnabled( ); | 2393 | mView->toggleFilerEnabled( ); |
2369 | mView->filterView()->blockSignals( false ); | 2394 | mView->filterView()->blockSignals( false ); |
2370 | } | 2395 | } |
2371 | mView->selectFilter( fil-2 ); | 2396 | mView->selectFilter( fil-2 ); |
2372 | } | 2397 | } |
2373 | } | 2398 | } |
2374 | void MainWindow::updateFilterToolbar() | 2399 | void MainWindow::updateFilterToolbar() |
2375 | { | 2400 | { |
2376 | if ( filterMenubar ) { | 2401 | if ( filterMenubar ) { |
2377 | if ( !mView->filterView()->filtersEnabled() ) { | 2402 | if ( !mView->filterView()->filtersEnabled() ) { |
2378 | filterMenubar->changeItem( 0, i18n("No Filter") ); | 2403 | filterMenubar->changeItem( 0, i18n("No Filter") ); |
2379 | } else { | 2404 | } else { |
2380 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2405 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2381 | if ( curfilter ) { | 2406 | if ( curfilter ) { |
2382 | QString name = curfilter->name(); | 2407 | QString name = curfilter->name(); |
2383 | if ( name.length() > 12 ) | 2408 | if ( name.length() > 12 ) |
2384 | name = name.left(10)+"..."; | 2409 | name = name.left(10)+"..."; |
2385 | filterMenubar->changeItem( 0, name ); | 2410 | filterMenubar->changeItem( 0, name ); |
2386 | } | 2411 | } |
2387 | } | 2412 | } |
2388 | } | 2413 | } |
2389 | } | 2414 | } |
2390 | void MainWindow::selectFilterPopup( int fil ) | 2415 | void MainWindow::selectFilterPopup( int fil ) |
2391 | { | 2416 | { |
2392 | selectFilter( fil + 1 ); | 2417 | selectFilter( fil + 1 ); |
2393 | 2418 | ||
2394 | } | 2419 | } |
2395 | void MainWindow::configureToolBar( int item ) | 2420 | void MainWindow::configureToolBar( int item ) |
2396 | { | 2421 | { |
2397 | 2422 | ||
2398 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); | 2423 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); |
2399 | KOPrefs *p = KOPrefs::instance(); | 2424 | KOPrefs *p = KOPrefs::instance(); |
2400 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); | 2425 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); |
2401 | p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); | 2426 | p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); |
2402 | p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); | 2427 | p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); |
2403 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); | 2428 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); |
2404 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); | 2429 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); |
2405 | p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); | 2430 | p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); |
2406 | p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); | 2431 | p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); |
2407 | p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); | 2432 | p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); |
2408 | p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); | 2433 | p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); |
2409 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); | 2434 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); |
2410 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); | 2435 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); |
2411 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); | 2436 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); |
2412 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); | 2437 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); |
2413 | p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); | 2438 | p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); |
2414 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); | 2439 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); |
2415 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); | 2440 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); |
2416 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); | 2441 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); |
2417 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); | 2442 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); |
2418 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); | 2443 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); |
2419 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); | 2444 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); |
2420 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); | 2445 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); |
2421 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); | 2446 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); |
2422 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); | 2447 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); |
2423 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); | 2448 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); |
2424 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); | 2449 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); |
2425 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); | 2450 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); |
2426 | p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); | 2451 | p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); |
2427 | // initActions(); | 2452 | // initActions(); |
2428 | setCaption ( i18n("Toolbar changes needs a restart!") ); | 2453 | setCaption ( i18n("Toolbar changes needs a restart!") ); |
2429 | } | 2454 | } |
2430 | void MainWindow::setCaption ( const QString & c ) | 2455 | void MainWindow::setCaption ( const QString & c ) |
2431 | { | 2456 | { |
2432 | QString cap = c; | 2457 | QString cap = c; |
2433 | cap.replace( QRegExp("\n"), " " ); | 2458 | cap.replace( QRegExp("\n"), " " ); |
2434 | cap = cap.stripWhiteSpace(); | 2459 | cap = cap.stripWhiteSpace(); |
2435 | if ( cap.isEmpty() ) | 2460 | if ( cap.isEmpty() ) |
2436 | cap = "KO/Pi"; | 2461 | cap = "KO/Pi"; |
2437 | QWidget::setCaption( cap ); | 2462 | QWidget::setCaption( cap ); |
2438 | } | 2463 | } |
2439 | void MainWindow::setCaptionToDates() | 2464 | void MainWindow::setCaptionToDates() |
2440 | { | 2465 | { |
2441 | QString selDates; | 2466 | QString selDates; |
2442 | QDate date = mView->startDate(); | 2467 | QDate date = mView->startDate(); |
2443 | if ( ! date.isValid() ) { | 2468 | if ( ! date.isValid() ) { |
2444 | setCaption(""); | 2469 | setCaption(""); |
2445 | return; | 2470 | return; |
2446 | } | 2471 | } |
2447 | selDates = KGlobal::locale()->formatDate( date, true); | 2472 | selDates = KGlobal::locale()->formatDate( date, true); |
2448 | if (mView->startDate() < mView->endDate() ) | 2473 | if (mView->startDate() < mView->endDate() ) |
2449 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); | 2474 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); |
2450 | else { | 2475 | else { |
2451 | QString addString; | 2476 | QString addString; |
2452 | if ( date == QDateTime::currentDateTime().date() ) | 2477 | if ( date == QDateTime::currentDateTime().date() ) |
2453 | addString = i18n("Today"); | 2478 | addString = i18n("Today"); |
2454 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) | 2479 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) |
2455 | addString = i18n("Tomorrow"); | 2480 | addString = i18n("Tomorrow"); |
2456 | if ( !addString.isEmpty() ) | 2481 | if ( !addString.isEmpty() ) |
2457 | selDates = addString+", "+selDates ; | 2482 | selDates = addString+", "+selDates ; |
2458 | } | 2483 | } |
2459 | setCaption( i18n("Dates: ") + selDates ); | 2484 | setCaption( i18n("Dates: ") + selDates ); |
2460 | 2485 | ||
2461 | } | 2486 | } |
2462 | void MainWindow::showConfigureAgenda( ) | 2487 | void MainWindow::showConfigureAgenda( ) |
2463 | { | 2488 | { |
2464 | int iii; | 2489 | int iii; |
2465 | for ( iii = 1;iii<= 10 ;++iii ){ | 2490 | for ( iii = 1;iii<= 10 ;++iii ){ |
2466 | configureAgendaMenu->setItemChecked( (iii+1)*2, false ); | 2491 | configureAgendaMenu->setItemChecked( (iii+1)*2, false ); |
2467 | } | 2492 | } |
2468 | configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); | 2493 | configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); |
2469 | } | 2494 | } |
2470 | void MainWindow::configureAgenda( int item ) | 2495 | void MainWindow::configureAgenda( int item ) |
2471 | { | 2496 | { |
2472 | if ( KOPrefs::instance()->mHourSize == item ) | 2497 | if ( KOPrefs::instance()->mHourSize == item ) |
2473 | return; | 2498 | return; |
2474 | KOPrefs::instance()->mHourSize=item; | 2499 | KOPrefs::instance()->mHourSize=item; |
2475 | mView->viewManager()->agendaView()->updateConfig(); | 2500 | mView->viewManager()->agendaView()->updateConfig(); |
2476 | } | 2501 | } |
2477 | 2502 | ||
2478 | void MainWindow::saveCalendar() | 2503 | void MainWindow::saveCalendar() |
2479 | { | 2504 | { |
2480 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; | 2505 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; |
2481 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) | 2506 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) |
2482 | bupDir = KGlobalSettings::backupDataDir(); | 2507 | bupDir = KGlobalSettings::backupDataDir(); |
2483 | bupDir = KGlobal::formatMessage ( bupDir, 0 ); | 2508 | bupDir = KGlobal::formatMessage ( bupDir, 0 ); |
2484 | QString bupHint; | 2509 | QString bupHint; |
2485 | if ( !KPimGlobalPrefs::instance()->mBackupEnabled ) | 2510 | if ( !KPimGlobalPrefs::instance()->mBackupEnabled ) |
2486 | bupHint = i18n("(Hint: You can enable automatic backup in the global settings!)"); | 2511 | bupHint = i18n("(Hint: You can enable automatic backup in the global settings!)"); |
2487 | if ( KMessageBox::warningContinueCancel( this, i18n("This will <b>backup all calendar files</b> to the directory %1 %2").arg(bupDir).arg(bupHint),i18n("Information") ) != KMessageBox::Continue ) return; | 2512 | if ( KMessageBox::warningContinueCancel( this, i18n("This will <b>backup all calendar files</b> to the directory %1 %2").arg(bupDir).arg(bupHint),i18n("Information") ) != KMessageBox::Continue ) return; |
2488 | bool enabled = KPimGlobalPrefs::instance()->mBackupEnabled; | 2513 | bool enabled = KPimGlobalPrefs::instance()->mBackupEnabled; |
2489 | KPimGlobalPrefs::instance()->mBackupEnabled = false; | 2514 | KPimGlobalPrefs::instance()->mBackupEnabled = false; |
2490 | save(); | 2515 | save(); |
2491 | KPimGlobalPrefs::instance()->mBackupEnabled = enabled; | 2516 | KPimGlobalPrefs::instance()->mBackupEnabled = enabled; |
2492 | backupAllFiles(); | 2517 | backupAllFiles(); |
2493 | } | 2518 | } |
2494 | void MainWindow::loadCalendar() | 2519 | void MainWindow::loadCalendar() |
2495 | { | 2520 | { |
2496 | 2521 | ||
2497 | 2522 | ||
2498 | #if 0 | 2523 | #if 0 |
2499 | QString fn = KOPrefs::instance()->mLastLoadFile; | 2524 | QString fn = KOPrefs::instance()->mLastLoadFile; |
2500 | fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); | 2525 | fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); |
2501 | 2526 | ||
2502 | if ( fn == "" ) | 2527 | if ( fn == "" ) |
2503 | return; | 2528 | return; |
2504 | QFileInfo info; | 2529 | QFileInfo info; |
2505 | info.setFile( fn ); | 2530 | info.setFile( fn ); |
2506 | QString mess; | 2531 | QString mess; |
2507 | bool loadbup = true; | 2532 | bool loadbup = true; |
2508 | if ( info. exists() ) { | 2533 | if ( info. exists() ) { |
2509 | mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); | 2534 | mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); |
2510 | int result = QMessageBox::warning( this, "KO/Pi: Warning!", | 2535 | int result = QMessageBox::warning( this, "KO/Pi: Warning!", |
2511 | mess, | 2536 | mess, |
2512 | i18n("Load!"), i18n("Cancel"), 0, | 2537 | i18n("Load!"), i18n("Cancel"), 0, |
2513 | 0, 1 ); | 2538 | 0, 1 ); |
2514 | if ( result != 0 ) { | 2539 | if ( result != 0 ) { |
2515 | loadbup = false; | 2540 | loadbup = false; |
2516 | } | 2541 | } |
2517 | } else { | 2542 | } else { |
2518 | QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 2543 | QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
2519 | i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, | 2544 | i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, |
2520 | 0, 1 ); | 2545 | 0, 1 ); |
2521 | 2546 | ||
2522 | return; | 2547 | return; |
2523 | } | 2548 | } |
2524 | if ( loadbup ) { | 2549 | if ( loadbup ) { |
2525 | mView->openCalendar( fn ); | 2550 | mView->openCalendar( fn ); |
2526 | KOPrefs::instance()->mLastLoadFile = fn; | 2551 | KOPrefs::instance()->mLastLoadFile = fn; |
2527 | mess = i18n("KO/Pi:Loaded %1").arg(fn) ; | 2552 | mess = i18n("KO/Pi:Loaded %1").arg(fn) ; |
2528 | setCaption(mess); | 2553 | setCaption(mess); |
2529 | } | 2554 | } |
2530 | #endif | 2555 | #endif |
2531 | 2556 | ||
2532 | } | 2557 | } |
2533 | void MainWindow::quickImportIcal() | 2558 | void MainWindow::quickImportIcal() |
2534 | { | 2559 | { |
2535 | importFile( KOPrefs::instance()->mLastImportFile, false ); | 2560 | importFile( KOPrefs::instance()->mLastImportFile, false ); |
2536 | } | 2561 | } |
2537 | void MainWindow::importFile( QString fn, bool quick ) | 2562 | void MainWindow::importFile( QString fn, bool quick ) |
2538 | { | 2563 | { |
2539 | QFileInfo info; | 2564 | QFileInfo info; |
2540 | info.setFile( fn ); | 2565 | info.setFile( fn ); |
2541 | QString mess; | 2566 | QString mess; |
2542 | if ( !info. exists() ) { | 2567 | if ( !info. exists() ) { |
2543 | mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); | 2568 | mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); |
2544 | QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 2569 | QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
2545 | mess ); | 2570 | mess ); |
2546 | return; | 2571 | return; |
2547 | } | 2572 | } |
2548 | int result = 0; | 2573 | int result = 0; |
2549 | if ( !quick ) { | 2574 | if ( !quick ) { |
2550 | mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); | 2575 | mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); |
2551 | result = QMessageBox::warning( this, "KO/Pi: Warning!", | 2576 | result = QMessageBox::warning( this, "KO/Pi: Warning!", |
2552 | mess, | 2577 | mess, |
2553 | "Import", "Cancel", 0, | 2578 | "Import", "Cancel", 0, |
2554 | 0, 1 ); | 2579 | 0, 1 ); |
2555 | } | 2580 | } |
2556 | if ( result == 0 ) { | 2581 | if ( result == 0 ) { |
2557 | if ( mView->openCalendar( fn, true )) { | 2582 | if ( mView->openCalendar( fn, true )) { |
2558 | KOPrefs::instance()->mLastImportFile = fn; | 2583 | KOPrefs::instance()->mLastImportFile = fn; |
2559 | setCaption(i18n("Imported file successfully")); | 2584 | setCaption(i18n("Imported file successfully")); |
2560 | } else { | 2585 | } else { |
2561 | setCaption(i18n("Error importing file")); | 2586 | setCaption(i18n("Error importing file")); |
2562 | } | 2587 | } |
2563 | mView->updateView(); | 2588 | mView->updateView(); |
2564 | } | 2589 | } |
2565 | } | 2590 | } |
2566 | 2591 | ||
2567 | void MainWindow::importIcal() | 2592 | void MainWindow::importIcal() |
2568 | { | 2593 | { |
2569 | 2594 | ||
2570 | QString fn =KOPrefs::instance()->mLastImportFile; | 2595 | QString fn =KOPrefs::instance()->mLastImportFile; |
2571 | 2596 | ||
2572 | fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); | 2597 | fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); |
2573 | if ( fn == "" ) | 2598 | if ( fn == "" ) |
2574 | return; | 2599 | return; |
2575 | importFile( fn, true ); | 2600 | importFile( fn, true ); |
2576 | 2601 | ||
2577 | } | 2602 | } |
2578 | 2603 | void MainWindow::exportCalendar( bool iCalFormat ) | |
2579 | void MainWindow::exportVCalendar() | ||
2580 | { | 2604 | { |
2581 | QString fn = KOPrefs::instance()->mLastVcalFile; | 2605 | QString fn = KOPrefs::instance()->mLastVcalFile; |
2582 | fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); | 2606 | if ( iCalFormat ) { |
2607 | fn = QDir::homeDirPath()+"/kopiexport.ics"; | ||
2608 | fn = KFileDialog::getSaveFileName( fn, i18n("Export iCal filename(*.ics)"), this ); | ||
2609 | } | ||
2610 | else | ||
2611 | fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); | ||
2583 | if ( fn == "" ) | 2612 | if ( fn == "" ) |
2584 | return; | 2613 | return; |
2585 | QFileInfo info; | 2614 | QFileInfo info; |
2586 | info.setFile( fn ); | 2615 | info.setFile( fn ); |
2587 | QString mes; | 2616 | QString mes; |
2588 | bool createbup = true; | 2617 | bool createbup = true; |
2589 | if ( info. exists() ) { | 2618 | if ( info. exists() ) { |
2590 | mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 2619 | mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
2591 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 2620 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
2592 | i18n("Overwrite!"), i18n("Cancel"), 0, | 2621 | i18n("Overwrite!"), i18n("Cancel"), 0, |
2593 | 0, 1 ); | 2622 | 0, 1 ); |
2594 | if ( result != 0 ) { | 2623 | if ( result != 0 ) { |
2595 | createbup = false; | 2624 | createbup = false; |
2596 | } | 2625 | } |
2597 | } | 2626 | } |
2598 | if ( createbup ) { | 2627 | if ( createbup ) { |
2599 | if ( mView->exportVCalendar( fn ) ) { | 2628 | bool success = false; |
2600 | KOPrefs::instance()->mLastVcalFile = fn; | 2629 | if ( iCalFormat ) |
2630 | success = mView->exportICalendar( fn ); | ||
2631 | else | ||
2632 | success = mView->exportVCalendar( fn ); | ||
2633 | if ( success ) { | ||
2601 | if ( fn.length() > 20 ) | 2634 | if ( fn.length() > 20 ) |
2602 | mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; | 2635 | mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; |
2603 | else | 2636 | else |
2604 | mes = i18n("KO/Pi:Exported to %1").arg(fn ); | 2637 | mes = i18n("KO/Pi:Exported to %1").arg(fn ); |
2605 | setCaption(mes); | 2638 | setCaption(mes); |
2606 | } | 2639 | } |
2607 | } | 2640 | } |
2608 | 2641 | ||
2609 | } | 2642 | } |
2643 | void MainWindow::exportICalendar() | ||
2644 | { | ||
2645 | exportCalendar( true ); | ||
2646 | } | ||
2647 | void MainWindow::exportVCalendar() | ||
2648 | { | ||
2649 | exportCalendar( false ); | ||
2650 | } | ||
2610 | QString MainWindow::sentSyncFile() | 2651 | QString MainWindow::sentSyncFile() |
2611 | { | 2652 | { |
2612 | #ifdef DESKTOP_VERSION | 2653 | #ifdef DESKTOP_VERSION |
2613 | return QDir::convertSeparators( locateLocal( "tmp", "copysynccal.ics" ) ); | 2654 | return QDir::convertSeparators( locateLocal( "tmp", "copysynccal.ics" ) ); |
2614 | #else | 2655 | #else |
2615 | return QString( "/tmp/copysynccal.ics" ); | 2656 | return QString( "/tmp/copysynccal.ics" ); |
2616 | #endif | 2657 | #endif |
2617 | } | 2658 | } |
2618 | 2659 | ||
2619 | void MainWindow::syncFileRequest() | 2660 | void MainWindow::syncFileRequest() |
2620 | { | 2661 | { |
2621 | while ( mSyncManager->blockSave() ) { | 2662 | while ( mSyncManager->blockSave() ) { |
2622 | qApp->processEvents(); | 2663 | qApp->processEvents(); |
2623 | } | 2664 | } |
2624 | mSyncManager->setBlockSave(true); | 2665 | mSyncManager->setBlockSave(true); |
2625 | 2666 | ||
2626 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { | 2667 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { |
2627 | mSyncManager->slotSyncMenu( 999 ); | 2668 | mSyncManager->slotSyncMenu( 999 ); |
2628 | } | 2669 | } |
2629 | 2670 | ||
2630 | setCaption(i18n("Saving Data to temp file ..." )); | 2671 | setCaption(i18n("Saving Data to temp file ..." )); |
2631 | mView->saveCalendar( sentSyncFile() ); | 2672 | mView->saveCalendar( sentSyncFile() ); |
2632 | setCaption(i18n("Data saved to temp file!" )); | 2673 | setCaption(i18n("Data saved to temp file!" )); |
2633 | mSyncManager->setBlockSave( false ); | 2674 | mSyncManager->setBlockSave( false ); |
2634 | 2675 | ||
2635 | } | 2676 | } |
2636 | void MainWindow::getFile( bool success ) | 2677 | void MainWindow::getFile( bool success ) |
2637 | { | 2678 | { |
2638 | if ( ! success ) { | 2679 | if ( ! success ) { |
2639 | setCaption( i18n("Error receiving file. Nothing changed!") ); | 2680 | setCaption( i18n("Error receiving file. Nothing changed!") ); |
2640 | return; | 2681 | return; |
2641 | } | 2682 | } |
2642 | mView->mergeFile( sentSyncFile() ); | 2683 | mView->mergeFile( sentSyncFile() ); |
2643 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { | 2684 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { |
2644 | mSyncManager->slotSyncMenu( 999 ); | 2685 | mSyncManager->slotSyncMenu( 999 ); |
2645 | } | 2686 | } |
2646 | setCaption( i18n("Pi-Sync successful!") ); | 2687 | setCaption( i18n("Pi-Sync successful!") ); |
2647 | } | 2688 | } |
2648 | void MainWindow::printListView() | 2689 | void MainWindow::printListView() |
2649 | { | 2690 | { |
2650 | 2691 | ||
2651 | QString message = i18n("You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items."); | 2692 | QString message = i18n("You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items."); |
2652 | 2693 | ||
2653 | KMessageBox::information( this, message); | 2694 | KMessageBox::information( this, message); |
2654 | } | 2695 | } |
2655 | void MainWindow::printSel( ) | 2696 | void MainWindow::printSel( ) |
2656 | { | 2697 | { |
2657 | mView->viewManager()->agendaView()->agenda()->printSelection(); | 2698 | mView->viewManager()->agendaView()->agenda()->printSelection(); |
2658 | } | 2699 | } |
2659 | 2700 | ||
2660 | void MainWindow::printCal() | 2701 | void MainWindow::printCal() |
2661 | { | 2702 | { |
2662 | mView->print();//mCp->showDialog(); | 2703 | mView->print();//mCp->showDialog(); |
2663 | } | 2704 | } |
2664 | 2705 | ||
2665 | 2706 | ||
2666 | #include "libkdepim/kdatepicker.h" | 2707 | #include "libkdepim/kdatepicker.h" |
2667 | #include <kdatetbl.h> | 2708 | #include <kdatetbl.h> |
2668 | 2709 | ||
2669 | void MainWindow::weekAction() | 2710 | void MainWindow::weekAction() |
2670 | { | 2711 | { |
2671 | int month; | 2712 | int month; |
2672 | KPopupFrame* popup = new KPopupFrame(this); | 2713 | KPopupFrame* popup = new KPopupFrame(this); |
2673 | KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); | 2714 | KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); |
2674 | // ----- | 2715 | // ----- |
2675 | picker->resize(picker->sizeHint()); | 2716 | picker->resize(picker->sizeHint()); |
2676 | popup->setMainWidget(picker); | 2717 | popup->setMainWidget(picker); |
2677 | picker->setFocus(); | 2718 | picker->setFocus(); |
2678 | connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); | 2719 | connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); |
2679 | int x = 0; | 2720 | int x = 0; |
2680 | int y = iconToolBar->height(); | 2721 | int y = iconToolBar->height(); |
2681 | int dX = 0; | 2722 | int dX = 0; |
2682 | int dY = 0; | 2723 | int dY = 0; |
2683 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 2724 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
2684 | if ( iconToolBar->y() > height()/2 ) { | 2725 | if ( iconToolBar->y() > height()/2 ) { |
2685 | dY = picker->sizeHint().height()+8; | 2726 | dY = picker->sizeHint().height()+8; |
2686 | y = 0; | 2727 | y = 0; |
2687 | } | 2728 | } |
2688 | } else { | 2729 | } else { |
2689 | if ( iconToolBar->x() > width()/2 ) { // right side | 2730 | if ( iconToolBar->x() > width()/2 ) { // right side |
2690 | x=0; | 2731 | x=0; |
2691 | dX= picker->sizeHint().width()+8; | 2732 | dX= picker->sizeHint().width()+8; |
2692 | y = 0; | 2733 | y = 0; |
2693 | } else { | 2734 | } else { |
2694 | x= iconToolBar->width(); | 2735 | x= iconToolBar->width(); |
2695 | y = 0; | 2736 | y = 0; |
2696 | } | 2737 | } |
2697 | } | 2738 | } |
2698 | //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); | 2739 | //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); |
2699 | if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) | 2740 | if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) |
2700 | { | 2741 | { |
2701 | month = picker->getResult(); | 2742 | month = picker->getResult(); |
2702 | emit selectWeek ( month ); | 2743 | emit selectWeek ( month ); |
2703 | //qDebug("weekSelected %d ", month); | 2744 | //qDebug("weekSelected %d ", month); |
2704 | } | 2745 | } |
2705 | delete popup; | 2746 | delete popup; |
2706 | } | 2747 | } |
2707 | 2748 | ||
2708 | void MainWindow::hideEvent ( QHideEvent * ) | 2749 | void MainWindow::hideEvent ( QHideEvent * ) |
2709 | { | 2750 | { |
2710 | QString message; | 2751 | QString message; |
2711 | QDateTime nextA = mCalendar->nextAlarmEventDateTime(); | 2752 | QDateTime nextA = mCalendar->nextAlarmEventDateTime(); |
2712 | if ( nextA.isValid() ) { | 2753 | if ( nextA.isValid() ) { |
2713 | QString sum = mCalendar->nextSummary(); | 2754 | QString sum = mCalendar->nextSummary(); |
2714 | 2755 | ||
2715 | message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false)); | 2756 | message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false)); |
2716 | setCaption( message ); | 2757 | setCaption( message ); |
2717 | } | 2758 | } |
2718 | } | 2759 | } |
2719 | 2760 | ||
2720 | void MainWindow::resizeEvent( QResizeEvent* e) | 2761 | void MainWindow::resizeEvent( QResizeEvent* e) |
2721 | { | 2762 | { |
2722 | #ifndef DESKTOP_VERSION | 2763 | #ifndef DESKTOP_VERSION |
2723 | if ( filterToolBar ) { | 2764 | if ( filterToolBar ) { |
2724 | if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) { | 2765 | if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) { |
2725 | if (QApplication::desktop()->width() > QApplication::desktop()->height() ) | 2766 | if (QApplication::desktop()->width() > QApplication::desktop()->height() ) |
2726 | filterToolBar->hide(); | 2767 | filterToolBar->hide(); |
2727 | else | 2768 | else |
2728 | filterToolBar->show(); | 2769 | filterToolBar->show(); |
2729 | } | 2770 | } |
2730 | } | 2771 | } |
2731 | #endif | 2772 | #endif |
2732 | QMainWindow::resizeEvent( e); | 2773 | QMainWindow::resizeEvent( e); |
2733 | } | 2774 | } |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 657c0a8..71c069b 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -1,186 +1,189 @@ | |||
1 | #ifndef KORGE_MAINWINDOW_H | 1 | #ifndef KORGE_MAINWINDOW_H |
2 | #define KORGE_MAINWINDOW_H | 2 | #define KORGE_MAINWINDOW_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
5 | #include <qtimer.h> | 5 | #include <qtimer.h> |
6 | #include <qdict.h> | 6 | #include <qdict.h> |
7 | #include <qfile.h> | 7 | #include <qfile.h> |
8 | #include <qmenubar.h> | 8 | #include <qmenubar.h> |
9 | #include <qtextstream.h> | 9 | #include <qtextstream.h> |
10 | #include <qregexp.h> | 10 | #include <qregexp.h> |
11 | 11 | ||
12 | #include <libkcal/incidence.h> | 12 | #include <libkcal/incidence.h> |
13 | #include <ksyncmanager.h> | 13 | #include <ksyncmanager.h> |
14 | #include <kpopupmenu.h> | 14 | #include <kpopupmenu.h> |
15 | #ifndef DESKTOP_VERSION | 15 | #ifndef DESKTOP_VERSION |
16 | #include <qcopchannel_qws.h> | 16 | #include <qcopchannel_qws.h> |
17 | #endif | 17 | #endif |
18 | class QAction; | 18 | class QAction; |
19 | class CalendarView; | 19 | class CalendarView; |
20 | class KSyncProfile; | 20 | class KSyncProfile; |
21 | #ifdef DESKTOP_VERSION | 21 | #ifdef DESKTOP_VERSION |
22 | 22 | ||
23 | #define QPEToolBar QToolBar | 23 | #define QPEToolBar QToolBar |
24 | #endif | 24 | #endif |
25 | class QPEToolBar; | 25 | class QPEToolBar; |
26 | 26 | ||
27 | 27 | ||
28 | namespace KCal { | 28 | namespace KCal { |
29 | class CalendarLocal; | 29 | class CalendarLocal; |
30 | } | 30 | } |
31 | 31 | ||
32 | using namespace KCal; | 32 | using namespace KCal; |
33 | 33 | ||
34 | class MainWindow : public QMainWindow | 34 | class MainWindow : public QMainWindow |
35 | { | 35 | { |
36 | Q_OBJECT | 36 | Q_OBJECT |
37 | public: | 37 | public: |
38 | MainWindow( QWidget *parent = 0, const char *name = 0 ); | 38 | MainWindow( QWidget *parent = 0, const char *name = 0 ); |
39 | ~MainWindow(); | 39 | ~MainWindow(); |
40 | bool beamReceiveEnabled(); | 40 | bool beamReceiveEnabled(); |
41 | static QString defaultFileName(); | 41 | static QString defaultFileName(); |
42 | static QString syncFileName(); | 42 | static QString syncFileName(); |
43 | static QString resourcePath(); | 43 | static QString resourcePath(); |
44 | public slots: | 44 | public slots: |
45 | void setUsesBigPixmaps ( bool ); | 45 | void setUsesBigPixmaps ( bool ); |
46 | void setCaption ( const QString & ); | 46 | void setCaption ( const QString & ); |
47 | void updateWeekNum(const KCal::DateList &); | 47 | void updateWeekNum(const KCal::DateList &); |
48 | void updateWeek(QDate); | 48 | void updateWeek(QDate); |
49 | void updateFilterToolbar(); | 49 | void updateFilterToolbar(); |
50 | virtual void showMaximized (); | 50 | virtual void showMaximized (); |
51 | void configureAgenda( int ); | 51 | void configureAgenda( int ); |
52 | void recieve( const QCString& msg, const QByteArray& data ); | 52 | void recieve( const QCString& msg, const QByteArray& data ); |
53 | void receiveStart( const QCString& msg, const QByteArray& data ); | 53 | void receiveStart( const QCString& msg, const QByteArray& data ); |
54 | protected slots: | 54 | protected slots: |
55 | void loadDataAfterStart(); | 55 | void loadDataAfterStart(); |
56 | void calHint(); | 56 | void calHint(); |
57 | void startMultiSync(); | 57 | void startMultiSync(); |
58 | void setCaptionToDates(); | 58 | void setCaptionToDates(); |
59 | void weekAction(); | 59 | void weekAction(); |
60 | void about(); | 60 | void about(); |
61 | void licence(); | 61 | void licence(); |
62 | void faq(); | 62 | void faq(); |
63 | void usertrans(); | 63 | void usertrans(); |
64 | void features(); | 64 | void features(); |
65 | void synchowto(); | 65 | void synchowto(); |
66 | void storagehowto(); | 66 | void storagehowto(); |
67 | void timetrackinghowto(); | 67 | void timetrackinghowto(); |
68 | void kdesynchowto(); | 68 | void kdesynchowto(); |
69 | void multisynchowto(); | 69 | void multisynchowto(); |
70 | void whatsNew(); | 70 | void whatsNew(); |
71 | void keyBindings(); | 71 | void keyBindings(); |
72 | void aboutAutoSaving();; | 72 | void aboutAutoSaving();; |
73 | void aboutKnownBugs(); | 73 | void aboutKnownBugs(); |
74 | 74 | ||
75 | void processIncidenceSelection( Incidence * ); | 75 | void processIncidenceSelection( Incidence * ); |
76 | 76 | ||
77 | void importQtopia(); | 77 | void importQtopia(); |
78 | void importBday(); | 78 | void importBday(); |
79 | void importOL(); | 79 | void importOL(); |
80 | void importIcal(); | 80 | void importIcal(); |
81 | void importFile( QString, bool ); | 81 | void importFile( QString, bool ); |
82 | void quickImportIcal(); | 82 | void quickImportIcal(); |
83 | 83 | ||
84 | void slotModifiedChanged( bool ); | 84 | void slotModifiedChanged( bool ); |
85 | 85 | ||
86 | void save(); | 86 | void save(); |
87 | void backupAllFiles(); | 87 | void backupAllFiles(); |
88 | void saveStopTimer(); | 88 | void saveStopTimer(); |
89 | void configureToolBar( int ); | 89 | void configureToolBar( int ); |
90 | void printSel(); | 90 | void printSel(); |
91 | void printCal(); | 91 | void printCal(); |
92 | void printListView(); | 92 | void printListView(); |
93 | void saveCalendar(); | 93 | void saveCalendar(); |
94 | void loadCalendar(); | 94 | void loadCalendar(); |
95 | void exportVCalendar(); | 95 | void exportVCalendar(); |
96 | void exportICalendar(); | ||
97 | void exportCalendar( bool ); | ||
96 | void fillFilterMenu(); | 98 | void fillFilterMenu(); |
97 | void fillFilterMenuTB(); | 99 | void fillFilterMenuTB(); |
98 | void selectFilter( int ); | 100 | void selectFilter( int ); |
99 | void fillFilterMenuPopup(); | 101 | void fillFilterMenuPopup(); |
100 | void selectFilterPopup( int ); | 102 | void selectFilterPopup( int ); |
101 | void exportToPhone( int ); | 103 | void exportToPhone( int ); |
102 | void toggleBeamReceive(); | 104 | void toggleBeamReceive(); |
103 | void disableBR(bool); | 105 | void disableBR(bool); |
104 | signals: | 106 | signals: |
105 | void selectWeek ( int ); | 107 | void selectWeek ( int ); |
106 | private slots: | 108 | private slots: |
107 | void slotResetFocus(); | 109 | void slotResetFocus(); |
108 | void slotResetFocusLoop(); | 110 | void slotResetFocusLoop(); |
109 | void showConfigureAgenda(); | 111 | void showConfigureAgenda(); |
110 | void getFile( bool ); | 112 | void getFile( bool ); |
111 | void syncFileRequest(); | 113 | void syncFileRequest(); |
112 | 114 | ||
113 | protected: | 115 | protected: |
114 | int mFocusLoop; | 116 | int mFocusLoop; |
115 | void hideEvent ( QHideEvent * ); | 117 | void hideEvent ( QHideEvent * ); |
116 | QString sentSyncFile(); | 118 | QString sentSyncFile(); |
117 | void displayText( QString, QString); | 119 | void displayText( QString, QString); |
118 | void enableIncidenceActions( bool ); | 120 | void enableIncidenceActions( bool ); |
121 | bool askForQuitOnSaveError(); | ||
119 | 122 | ||
120 | private: | 123 | private: |
121 | 124 | ||
122 | QCString mCStringMess; | 125 | QCString mCStringMess; |
123 | QByteArray mByteData; | 126 | QByteArray mByteData; |
124 | 127 | ||
125 | //void setMenuBar( QMenuBar * ); | 128 | //void setMenuBar( QMenuBar * ); |
126 | bool mBRdisabled; | 129 | bool mBRdisabled; |
127 | #ifndef DESKTOP_VERSION | 130 | #ifndef DESKTOP_VERSION |
128 | QCopChannel* infrared; | 131 | QCopChannel* infrared; |
129 | #endif | 132 | #endif |
130 | QAction* brAction; | 133 | QAction* brAction; |
131 | KSyncManager* mSyncManager; | 134 | KSyncManager* mSyncManager; |
132 | bool mClosed; | 135 | bool mClosed; |
133 | void saveOnClose(); | 136 | void saveOnClose(); |
134 | bool mFlagKeyPressed; | 137 | bool mFlagKeyPressed; |
135 | bool mBlockAtStartup; | 138 | bool mBlockAtStartup; |
136 | KMenuBar *menuBar1; | 139 | KMenuBar *menuBar1; |
137 | QPEToolBar *iconToolBar; | 140 | QPEToolBar *iconToolBar; |
138 | QPEToolBar *viewToolBar; | 141 | QPEToolBar *viewToolBar; |
139 | QPEToolBar *navigatorToolBar; | 142 | QPEToolBar *navigatorToolBar; |
140 | QPEToolBar *filterToolBar; | 143 | QPEToolBar *filterToolBar; |
141 | KMenuBar *filterMenubar; | 144 | KMenuBar *filterMenubar; |
142 | QPopupMenu * filterPopupMenu; | 145 | QPopupMenu * filterPopupMenu; |
143 | QPopupMenu * mCurrentItemMenu; | 146 | QPopupMenu * mCurrentItemMenu; |
144 | void initActions(); | 147 | void initActions(); |
145 | void setDefaultPreferences(); | 148 | void setDefaultPreferences(); |
146 | void resizeEvent( QResizeEvent* e); | 149 | void resizeEvent( QResizeEvent* e); |
147 | void keyPressEvent ( QKeyEvent * ) ; | 150 | void keyPressEvent ( QKeyEvent * ) ; |
148 | void keyReleaseEvent ( QKeyEvent * ) ; | 151 | void keyReleaseEvent ( QKeyEvent * ) ; |
149 | QPopupMenu *configureToolBarMenu; | 152 | QPopupMenu *configureToolBarMenu; |
150 | QPopupMenu *selectFilterMenu; | 153 | QPopupMenu *selectFilterMenu; |
151 | QPopupMenu *selectFilterMenuTB; | 154 | QPopupMenu *selectFilterMenuTB; |
152 | QPopupMenu *configureAgendaMenu, *syncMenu; | 155 | QPopupMenu *configureAgendaMenu, *syncMenu; |
153 | CalendarLocal *mCalendar; | 156 | CalendarLocal *mCalendar; |
154 | CalendarView *mView; | 157 | CalendarView *mView; |
155 | QAction *mNewSubTodoAction; | 158 | QAction *mNewSubTodoAction; |
156 | QAction *mWeekAction; | 159 | QAction *mWeekAction; |
157 | QFont mWeekFont; | 160 | QFont mWeekFont; |
158 | QPixmap mWeekPixmap; | 161 | QPixmap mWeekPixmap; |
159 | QColor mWeekBgColor; | 162 | QColor mWeekBgColor; |
160 | 163 | ||
161 | QAction *mShowAction; | 164 | QAction *mShowAction; |
162 | QAction *mEditAction; | 165 | QAction *mEditAction; |
163 | QAction *mDeleteAction; | 166 | QAction *mDeleteAction; |
164 | QAction *mCloneAction; | 167 | QAction *mCloneAction; |
165 | QAction *mMoveAction; | 168 | QAction *mMoveAction; |
166 | QAction *mBeamAction; | 169 | QAction *mBeamAction; |
167 | QAction *mCancelAction; | 170 | QAction *mCancelAction; |
168 | QAction *mPrintSelAction; | 171 | QAction *mPrintSelAction; |
169 | 172 | ||
170 | QAction *mToggleNav; | 173 | QAction *mToggleNav; |
171 | QAction *mToggleFilter; | 174 | QAction *mToggleFilter; |
172 | QAction *mToggleAllday; | 175 | QAction *mToggleAllday; |
173 | QAction *actionFilterMenuTB; | 176 | QAction *actionFilterMenuTB; |
174 | 177 | ||
175 | void closeEvent( QCloseEvent* ce ); | 178 | void closeEvent( QCloseEvent* ce ); |
176 | QTimer mSaveTimer; | 179 | QTimer mSaveTimer; |
177 | QTime mSaveTime; | 180 | QDateTime mSaveTimerStart; |
178 | int mSaveDelay; | 181 | int mSaveDelay; |
179 | //bool mBlockSaveFlag; | 182 | //bool mBlockSaveFlag; |
180 | bool mCalendarModifiedFlag; | 183 | bool mCalendarModifiedFlag; |
181 | QPixmap loadPixmap( QString ); | 184 | QPixmap loadPixmap( QString ); |
182 | QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80, journalPix; | 185 | QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80, journalPix; |
183 | }; | 186 | }; |
184 | 187 | ||
185 | 188 | ||
186 | #endif | 189 | #endif |