author | zautrix <zautrix> | 2005-03-29 17:05:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-29 17:05:50 (UTC) |
commit | a7c827aa0e555206b60dec3bc07f7afab4352883 (patch) (unidiff) | |
tree | 56dbda15314f27ffabd143d09ea036b092444198 | |
parent | 3116f249fc6ccd0e067213e826d3d924f6986972 (diff) | |
download | kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.zip kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.tar.gz kdepimpi-a7c827aa0e555206b60dec3bc07f7afab4352883.tar.bz2 |
fixes
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | kabc/addresseedialog.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 40 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 13 | ||||
-rw-r--r-- | libkdepim/externalapphandler.cpp | 9 | ||||
-rw-r--r-- | libkdepim/externalapphandler.h | 1 |
7 files changed, 59 insertions, 12 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index b3a406c..1a045f3 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1,1331 +1,1331 @@ | |||
1 | { "10 minutes","10 Minuten" }, | 1 | { "10 minutes","10 Minuten" }, |
2 | { "10th","10." }, | 2 | { "10th","10." }, |
3 | { "11th","11." }, | 3 | { "11th","11." }, |
4 | { "12 pm Format","12 AM/PM Format" }, | 4 | { "12 pm Format","12 AM/PM Format" }, |
5 | { "12th","12." }, | 5 | { "12th","12." }, |
6 | { "13th","13." }, | 6 | { "13th","13." }, |
7 | { "14th","14." }, | 7 | { "14th","14." }, |
8 | { "15th","15." }, | 8 | { "15th","15." }, |
9 | { "16th","16." }, | 9 | { "16th","16." }, |
10 | { "17th","17." }, | 10 | { "17th","17." }, |
11 | { "18th","18." }, | 11 | { "18th","18." }, |
12 | { "19th","19." }, | 12 | { "19th","19." }, |
13 | { "1 Day","1 Tag" }, | 13 | { "1 Day","1 Tag" }, |
14 | { "1 h","1 Std" }, | 14 | { "1 h","1 Std" }, |
15 | { "1 (high)","1 (hoch)" }, | 15 | { "1 (high)","1 (hoch)" }, |
16 | { "5 (low)","5" }, | 16 | { "5 (low)","5" }, |
17 | { "1st","1." }, | 17 | { "1st","1." }, |
18 | { "20th","20." }, | 18 | { "20th","20." }, |
19 | { "21st","21." }, | 19 | { "21st","21." }, |
20 | { "22nd","22." }, | 20 | { "22nd","22." }, |
21 | { "23rd","23." }, | 21 | { "23rd","23." }, |
22 | { "24:00 Hour Format","24:00 Stunden Format" }, | 22 | { "24:00 Hour Format","24:00 Stunden Format" }, |
23 | { "24th","24." }, | 23 | { "24th","24." }, |
24 | { "25th","25." }, | 24 | { "25th","25." }, |
25 | { "26th","26." }, | 25 | { "26th","26." }, |
26 | { "27th","27." }, | 26 | { "27th","27." }, |
27 | { "28th","28." }, | 27 | { "28th","28." }, |
28 | { "29th","29." }, | 28 | { "29th","29." }, |
29 | { "2nd","2." }, | 29 | { "2nd","2." }, |
30 | { "30 minutes","30 Minuten" }, | 30 | { "30 minutes","30 Minuten" }, |
31 | { "30th","30." }, | 31 | { "30th","30." }, |
32 | { "31st","31." }, | 32 | { "31st","31." }, |
33 | { "3rd","3." }, | 33 | { "3rd","3." }, |
34 | { "4th","4." }, | 34 | { "4th","4." }, |
35 | { "5 (lowest)","5 (Niedrigster)" }, | 35 | { "5 (lowest)","5 (Niedrigster)" }, |
36 | { "5th","5." }, | 36 | { "5th","5." }, |
37 | { "6th","6." }, | 37 | { "6th","6." }, |
38 | { "7th","7." }, | 38 | { "7th","7." }, |
39 | { "8th","8." }, | 39 | { "8th","8." }, |
40 | { "9th","9." }, | 40 | { "9th","9." }, |
41 | { "About...","Über..." }, | 41 | { "About...","Über..." }, |
42 | { "&Accept","&Akzeptieren" }, | 42 | { "&Accept","&Akzeptieren" }, |
43 | { "Accept","Akzeptieren" }, | 43 | { "Accept","Akzeptieren" }, |
44 | { "Accept A&ll","A&lles Akzepieren" }, | 44 | { "Accept A&ll","A&lles Akzepieren" }, |
45 | { "Access:","Zugriff:" }, | 45 | { "Access:","Zugriff:" }, |
46 | { "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, | 46 | { "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, |
47 | { "Actions","Aktionen" }, | 47 | { "Actions","Aktionen" }, |
48 | { "Add Filter","Filter Hinzufügen" }, | 48 | { "Add Filter","Filter Hinzufügen" }, |
49 | { "&Add","Hinzufügen" }, | 49 | { "&Add","Hinzufügen" }, |
50 | { "Add","Hinzufügen" }, | 50 | { "Add","Hinzufügen" }, |
51 | { "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, | 51 | { "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, |
52 | { "Additional email address:","Zusätzliche E-Mail Adresse:" }, | 52 | { "Additional email address:","Zusätzliche E-Mail Adresse:" }, |
53 | { "&Addressbook","&Adressbuch" }, | 53 | { "&Addressbook","&Adressbuch" }, |
54 | { "Address &Book...","Adress&buch..." }, | 54 | { "Address &Book...","Adress&buch..." }, |
55 | { "Agenda Size","Agende Größe" }, | 55 | { "Agenda Size","Agende Größe" }, |
56 | { "Agenda Size:","Größe der Agenda:" }, | 56 | { "Agenda Size:","Größe der Agenda:" }, |
57 | { "Agenda view:","Agenda Ansicht:" }, | 57 | { "Agenda view:","Agenda Ansicht:" }, |
58 | { "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, | 58 | { "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, |
59 | { "All attendees","Alle Teilnehmer" }, | 59 | { "All attendees","Alle Teilnehmer" }, |
60 | { "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, | 60 | { "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, |
61 | { "All day event","Ganztägig" }, | 61 | { "All day event","Ganztägig" }, |
62 | { "Anonymous","Anonym" }, | 62 | { "Anonymous","Anonym" }, |
63 | { "Apply","Anwenden" }, | 63 | { "Apply","Anwenden" }, |
64 | { "Apr","Apr" }, | 64 | { "Apr","Apr" }, |
65 | { "April","April" }, | 65 | { "April","April" }, |
66 | {"Ask for every entry on conflict","Frage bei Konflikten nach"}, | 66 | {"Ask for every entry on conflict","Frage bei Konflikten nach"}, |
67 | { "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, | 67 | { "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, |
68 | { "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, | 68 | { "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, |
69 | { "Attendees","Teilnehmer" }, | 69 | { "Attendees","Teilnehmer" }, |
70 | { "Aug","Aug" }, | 70 | { "Aug","Aug" }, |
71 | { "August","August" }, | 71 | { "August","August" }, |
72 | { "Auto-Save","Automatisches Abspeichern" }, | 72 | { "Auto-Save","Automatisches Abspeichern" }, |
73 | { "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, | 73 | { "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, |
74 | { "Auto saving...","Automatische Sicherung..." }, | 74 | { "Auto saving...","Automatische Sicherung..." }, |
75 | { "Begin on:","Starte mit:" }, | 75 | { "Begin on:","Starte mit:" }, |
76 | { "Begins on: %1","Starte mit: %1" }, | 76 | { "Begins on: %1","Starte mit: %1" }, |
77 | { "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, | 77 | { "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, |
78 | { "<b>On:</b> %1","<b>Am:</b> %1" }, | 78 | { "<b>On:</b> %1","<b>Am:</b> %1" }, |
79 | { "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, | 79 | { "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, |
80 | { "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, | 80 | { "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, |
81 | { " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, | 81 | { " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, |
82 | { "Busy","Belegt" }, | 82 | { "Busy","Belegt" }, |
83 | { "&Cancel","Abbre&chen" }, | 83 | { "&Cancel","Abbre&chen" }, |
84 | { "Cancel","Abbrechen" }, | 84 | { "Cancel","Abbrechen" }, |
85 | { "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, | 85 | { "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, |
86 | { "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, | 86 | { "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, |
87 | { "Categories...","Kategorien..." }, | 87 | { "Categories...","Kategorien..." }, |
88 | { "Categories","Kategorien" }, | 88 | { "Categories","Kategorien" }, |
89 | { "Category","Kategorie" }, | 89 | { "Category","Kategorie" }, |
90 | { "Center View","Zentriere Ansicht" }, | 90 | { "Center View","Zentriere Ansicht" }, |
91 | { "Change","Ändere" }, | 91 | { "Change","Ändere" }, |
92 | { "Cinema","Kino" }, | 92 | { "Cinema","Kino" }, |
93 | { "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" }, | 93 | { "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" }, |
94 | { "Clone Item","Klone Eintrag" }, | 94 | { "Clone Item","Klone Eintrag" }, |
95 | { "&Close","S&chließen" }, | 95 | { "&Close","S&chließen" }, |
96 | { "Close","Schließen" }, | 96 | { "Close","Schließen" }, |
97 | { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, | 97 | { "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, |
98 | { "Colors","Farben" }, | 98 | { "Colors","Farben" }, |
99 | { "completed","erledigt" }, | 99 | { "completed","erledigt" }, |
100 | { "completed on %1","erledigt am %1" }, | 100 | { "completed on %1","erledigt am %1" }, |
101 | { "Complete","Erledigt" }, | 101 | { "Complete","Erledigt" }, |
102 | { "Confidential","Vertraulich" }, | 102 | { "Confidential","Vertraulich" }, |
103 | { "Configure...","Einstellungen..." }, | 103 | { "Configure...","Einstellungen..." }, |
104 | { "Confirm &deletes","Löschvogang bestätigen" }, | 104 | { "Confirm &deletes","Löschvogang bestätigen" }, |
105 | { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, | 105 | { "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, |
106 | { "Counter-event Viewer","Terminzähler Ansicht" }, | 106 | { "Counter-event Viewer","Terminzähler Ansicht" }, |
107 | { "Daily ending hour:","Feierabend:" }, | 107 | { "Daily ending hour:","Feierabend:" }, |
108 | { "Daily starting hour:","Anfangszeit:" }, | 108 | { "Daily starting hour:","Anfangszeit:" }, |
109 | { "Daily","Täglich" }, | 109 | { "Daily","Täglich" }, |
110 | { "Date Format","Datums Format" }, | 110 | { "Date Format","Datums Format" }, |
111 | { "Date Format:","Datums Format:" }, | 111 | { "Date Format:","Datums Format:" }, |
112 | { "DateNavigator:(nr)","Datums Navigator" }, | 112 | { "DateNavigator:(nr)","Datums Navigator" }, |
113 | { "Dates: ","Datum: " }, | 113 | { "Dates: ","Datum: " }, |
114 | { "Date && Time","Datum && Zeit" }, | 114 | { "Date && Time","Datum && Zeit" }, |
115 | { "Day begins at:","Der Tag beginnt um:" }, | 115 | { "Day begins at:","Der Tag beginnt um:" }, |
116 | { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, | 116 | { "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, |
117 | { "Days in What's Next:","Tage in What's Next:" }, | 117 | { "Days in What's Next:","Tage in What's Next:" }, |
118 | { "day(s)","Tag(e)" }, | 118 | { "day(s)","Tag(e)" }, |
119 | { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, | 119 | { "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, |
120 | { "day","Tag" }, | 120 | { "day","Tag" }, |
121 | { "Dec","Dez" }, | 121 | { "Dec","Dez" }, |
122 | { "December","Dezember" }, | 122 | { "December","Dezember" }, |
123 | { "Default alarm time:","Standard Alarmzeit:" }, | 123 | { "Default alarm time:","Standard Alarmzeit:" }, |
124 | { "Default appointment time:","Standard Termin Startzeit:" }, | 124 | { "Default appointment time:","Standard Termin Startzeit:" }, |
125 | { "Default event color:","Standard Terminfarbe:" }, | 125 | { "Default event color:","Standard Terminfarbe:" }, |
126 | { "Default","Standard" }, | 126 | { "Default","Standard" }, |
127 | { "Def. duration of new app.:","Standard Termin Länge:" }, | 127 | { "Def. duration of new app.:","Standard Termin Länge:" }, |
128 | { "Delete all completed To-Dos?","Alle bereits erledigten Todos löschen?" }, | 128 | { "Delete all completed To-Dos?","Alle bereits erledigten Todos löschen?" }, |
129 | { "Delete All","Lösche alles" }, | 129 | { "Delete All","Lösche alles" }, |
130 | { "Delete all selected","Lösche alle Selektierten" }, | 130 | { "Delete all selected","Lösche alle Selektierten" }, |
131 | { "Delete Current","Aktuellen löschen" }, | 131 | { "Delete Current","Aktuellen löschen" }, |
132 | { "Delete Event...","Lösche Termin..." }, | 132 | { "Delete Event...","Lösche Termin..." }, |
133 | { "Delete Event","Lösche Termin" }, | 133 | { "Delete Event","Lösche Termin" }, |
134 | { "&Delete","Löschen" }, | 134 | { "&Delete","Löschen" }, |
135 | { "Delete...","Löschen..." }, | 135 | { "Delete...","Löschen..." }, |
136 | { "Delete","Löschen" }, | 136 | { "Delete","Löschen" }, |
137 | { "Delete Todo...","Lösche Todo..." }, | 137 | { "Delete Todo...","Lösche Todo..." }, |
138 | { "Delete To-Do","Lösche Todo" }, | 138 | { "Delete To-Do","Lösche Todo" }, |
139 | { "Deleting item %d ...","Lösche Eintrag %d..." }, | 139 | { "Deleting item %d ...","Lösche Eintrag %d..." }, |
140 | { "Descriptions","Beschreibungen" }, | 140 | { "Descriptions","Beschreibungen" }, |
141 | { "Deselect all","Deselektiere Alle" }, | 141 | { "Deselect all","Deselektiere Alle" }, |
142 | { "Details","Details" }, | 142 | { "Details","Details" }, |
143 | { "Dinner","Abendessen" }, | 143 | { "Dinner","Abendessen" }, |
144 | { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, | 144 | { "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, |
145 | { "Due Date","Fällig am" }, | 145 | { "Due Date","Fällig am" }, |
146 | { "Due: ","Fällig: "}, | 146 | { "Due: ","Fällig: "}, |
147 | { "Due Time","Fällig um" }, | 147 | { "Due Time","Fällig um" }, |
148 | { "Due:","Fällig:"}, | 148 | { "Due:","Fällig:"}, |
149 | { "Duration: ","Dauer: " }, | 149 | { "Duration: ","Dauer: " }, |
150 | { "Edit...","Bearbeite..." }, | 150 | { "Edit...","Bearbeite..." }, |
151 | { "Edit","Bearbeite" }, | 151 | { "Edit","Bearbeite" }, |
152 | { "Edit Event...","Bearbeite Termin..." }, | 152 | { "Edit Event...","Bearbeite Termin..." }, |
153 | { "Edit Event","Bearbeite Termin" }, | 153 | { "Edit Event","Bearbeite Termin" }, |
154 | { "Edit exceptions","Bearbeite Ausnahmen" }, | 154 | { "Edit exceptions","Bearbeite Ausnahmen" }, |
155 | { "EditorBox:","Editor Fenster:" }, | 155 | { "EditorBox:","Editor Fenster:" }, |
156 | { "Edit Recurrence Range","Bearbeite Wiederholung" }, | 156 | { "Edit Recurrence Range","Bearbeite Wiederholung" }, |
157 | { "Edit Todo...","Berabeite Todo..." }, | 157 | { "Edit Todo...","Berabeite Todo..." }, |
158 | { "Edit To-Do","Todo bearbeiten" }, | 158 | { "Edit To-Do","Todo bearbeiten" }, |
159 | { "E&mail address:","E&mail Adresse:" }, | 159 | { "E&mail address:","E&mail Adresse:" }, |
160 | { "(EmptyEmail)","(KeineEmail)" }, | 160 | { "(EmptyEmail)","(KeineEmail)" }, |
161 | { "(EmptyName)","(KeinName)" }, | 161 | { "(EmptyName)","(KeinName)" }, |
162 | { "Enable Recurrence","Wiederholender Termin" }, | 162 | { "Enable Recurrence","Wiederholender Termin" }, |
163 | { "End after","Endet nach"}, | 163 | { "End after","Endet nach"}, |
164 | { "End by:","Endet am"}, | 164 | { "End by:","Endet am"}, |
165 | { "End Date","End Datum" }, | 165 | { "End Date","End Datum" }, |
166 | { "End:","Ende:" }, | 166 | { "End:","Ende:" }, |
167 | { "End Time","End Zeit" }, | 167 | { "End Time","End Zeit" }, |
168 | { "English","Englisch" }, | 168 | { "English","Englisch" }, |
169 | { "Event","Termin" }, | 169 | { "Event","Termin" }, |
170 | { "Event list","Termin Liste" }, | 170 | { "Event list","Termin Liste" }, |
171 | { "Events","Termine" }, | 171 | { "Events","Termine" }, |
172 | { "Event Viewer:","Termin Übersicht:" }, | 172 | { "Event Viewer:","Termin Übersicht:" }, |
173 | { "every","jede" }, | 173 | { "every","jede" }, |
174 | { "Exceptions...","Ausnahmen..." }, | 174 | { "Exceptions...","Ausnahmen..." }, |
175 | { "Exceptions","Ausnahmen" }, | 175 | { "Exceptions","Ausnahmen" }, |
176 | { "Exclude holidays","Ohne freie Tage" }, | 176 | { "Exclude holidays","Ohne freie Tage" }, |
177 | { "Exclude Saturdays","Ohne Samstage" }, | 177 | { "Exclude Saturdays","Ohne Samstage" }, |
178 | { "Feb","Feb" }, | 178 | { "Feb","Feb" }, |
179 | { "February","Februar" }, | 179 | { "February","Februar" }, |
180 | { "&Find","Suche!" }, | 180 | { "&Find","Suche!" }, |
181 | { "Fonts","Schriftart" }, | 181 | { "Fonts","Schriftart" }, |
182 | { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, | 182 | { "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, |
183 | { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, | 183 | { "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, |
184 | { "Free","Frei" }, | 184 | { "Free","Frei" }, |
185 | { "Friday","Freitag" }, | 185 | { "Friday","Freitag" }, |
186 | { "Fri","Fr" }, | 186 | { "Fri","Fr" }, |
187 | { "From:","Vom:" }, | 187 | { "From:","Vom:" }, |
188 | { "Full &name:","Vor- und &Nachname:" }, | 188 | { "Full &name:","Vor- und &Nachname:" }, |
189 | { "General","Allgemein" }, | 189 | { "General","Allgemein" }, |
190 | { "German","Deutsch" }, | 190 | { "German","Deutsch" }, |
191 | { "Gifts","Geschenke" }, | 191 | { "Gifts","Geschenke" }, |
192 | { "Go to Today","Heute anzeigen" }, | 192 | { "Go to Today","Heute anzeigen" }, |
193 | { "Help","Hilfe" }, | 193 | { "Help","Hilfe" }, |
194 | { "Hide Dates","Daten ausblenden" }, | 194 | { "Hide Dates","Daten ausblenden" }, |
195 | { "Highlight color:","Markierungen:" }, | 195 | { "Highlight color:","Markierungen:" }, |
196 | { "Holiday color:","Freie Tage:" }, | 196 | { "Holiday color:","Freie Tage:" }, |
197 | { "hour(s)","Stunde(n)" }, | 197 | { "hour(s)","Stunde(n)" }, |
198 | { "In %1 days: ","In %1 Tagen: " }, | 198 | { "In %1 days: ","In %1 Tagen: " }, |
199 | { "Incomplete Todo:","Unerledigte Aufgaben:" }, | 199 | { "Incomplete Todo:","Unerledigte Aufgaben:" }, |
200 | { "Information","Information" }, | 200 | { "Information","Information" }, |
201 | { "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, | 201 | { "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, |
202 | { "Jan","Jan" }, | 202 | { "Jan","Jan" }, |
203 | { "January","Januar" }, | 203 | { "January","Januar" }, |
204 | { "JournalView:","Journal Ansicht:" }, | 204 | { "JournalView:","Journal Ansicht:" }, |
205 | { "Journals","Journale" }, | 205 | { "Journals","Journale" }, |
206 | { "Jul","Jul" }, | 206 | { "Jul","Jul" }, |
207 | { "July","Juli" }, | 207 | { "July","Juli" }, |
208 | { "Jump to date","Springe zum Datum" }, | 208 | { "Jump to date","Springe zum Datum" }, |
209 | { "June","Juni" }, | 209 | { "June","Juni" }, |
210 | { "Jun","Jun" }, | 210 | { "Jun","Jun" }, |
211 | { "Key Bindings...","Tastenzuordnung..." }, | 211 | { "Key Bindings...","Tastenzuordnung..." }, |
212 | { "Kids","Kinder" }, | 212 | { "Kids","Kinder" }, |
213 | { "Known Problems...","Bekannte Probleme..." }, | 213 | { "Known Problems...","Bekannte Probleme..." }, |
214 | { "KO/Pi Find ","KO/Pi Suchdialog " }, | 214 | { "KO/Pi Find ","KO/Pi Suchdialog " }, |
215 | { "KO/Pi Find: ","KO/Pi Suchen: " }, | 215 | { "KO/Pi Find: ","KO/Pi Suchen: " }, |
216 | { "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, | 216 | { "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, |
217 | { "Language:(needs restart)","Sprache (Neustart!)" }, | 217 | { "Language:(needs restart)","Sprache (Neustart!)" }, |
218 | { "Language:","Sprache" }, | 218 | { "Language:","Sprache" }, |
219 | { "Large","Etwas mehr" }, | 219 | { "Large","Etwas mehr" }, |
220 | { "List View:","Listenansicht:" }, | 220 | { "List View:","Listenansicht:" }, |
221 | { "List View","Listenansicht" }, | 221 | { "List View","Listenansicht" }, |
222 | { "Load/Save","Laden/Speichern" }, | 222 | { "Load/Save","Laden/Speichern" }, |
223 | { "Load Template","Lade Vorlage" }, | 223 | { "Load Template","Lade Vorlage" }, |
224 | { "Locale","Localisation" }, | 224 | { "Locale","Localisation" }, |
225 | { "Local temp file:","Lokale temp. Datei:" }, | 225 | { "Local temp file:","Lokale temp. Datei:" }, |
226 | { "Location: ","Ort: " }, | 226 | { "Location: ","Ort: " }, |
227 | { "Location:","Ort:" }, | 227 | { "Location:","Ort:" }, |
228 | { "Mail client","Mail Programm" }, | 228 | { "Mail client","Mail Programm" }, |
229 | { "Mail Client","Mail Programm" }, | 229 | { "Mail Client","Mail Programm" }, |
230 | { "March","März" }, | 230 | { "March","März" }, |
231 | { "Mar","Mär" }, | 231 | { "Mar","Mär" }, |
232 | { "May","Mai" }, | 232 | { "May","Mai" }, |
233 | { "M. Bains line:","M. Bains Linie:" }, | 233 | { "M. Bains line:","M. Bains Linie:" }, |
234 | { "Medium","Medium" }, | 234 | { "Medium","Medium" }, |
235 | { "Method","Methode" }, | 235 | { "Method","Methode" }, |
236 | { "minute(s)","Minute(n)" }, | 236 | { "minute(s)","Minute(n)" }, |
237 | { "Monday","Montag" }, | 237 | { "Monday","Montag" }, |
238 | { "Mon","Mo" }, | 238 | { "Mon","Mo" }, |
239 | { "Monthly","Monatlich" }, | 239 | { "Monthly","Monatlich" }, |
240 | { "Month not long enough","Monat ist nicht lang genug" }, | 240 | { "Month not long enough","Monat ist nicht lang genug" }, |
241 | { "month(s)","Monat(e)" }, | 241 | { "month(s)","Monat(e)" }, |
242 | { "Month view:","Monatsansicht:" }, | 242 | { "Month view:","Monatsansicht:" }, |
243 | { "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, | 243 | { "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, |
244 | { "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" }, | 244 | { "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" }, |
245 | { "Move &Down","Nach unten verschieben" }, | 245 | { "Move &Down","Nach unten verschieben" }, |
246 | { "Move &Up","Nach oben verschieben" }, | 246 | { "Move &Up","Nach oben verschieben" }, |
247 | { "Name:","Name:" }, | 247 | { "Name:","Name:" }, |
248 | { "Name","Name" }, | 248 | { "Name","Name" }, |
249 | { "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, | 249 | { "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, |
250 | { "%n Days","%n Tage" }, | 250 | { "%n Days","%n Tage" }, |
251 | { "Never","Nie" }, | 251 | { "Never","Nie" }, |
252 | { "New event...","Neuer Termin..." }, | 252 | { "New event...","Neuer Termin..." }, |
253 | { "New event","Neuer Termin" }, | 253 | { "New event","Neuer Termin" }, |
254 | { "New Event...","Neuer Termin..." }, | 254 | { "New Event...","Neuer Termin..." }, |
255 | { "New Events/Todos should","Neue Termine/Todos sollten" }, | 255 | { "New Events/Todos should","Neue Termine/Todos sollten" }, |
256 | { "&New","&Neu" }, | 256 | { "&New","&Neu" }, |
257 | { "New","Neu", }, | 257 | { "New","Neu", }, |
258 | { "New Sub-Todo...","Neues Sub-Todo..." }, | 258 | { "New Sub-Todo...","Neues Sub-Todo..." }, |
259 | { "New Todo...","Neues Todo..." }, | 259 | { "New Todo...","Neues Todo..." }, |
260 | { "Next Alarm: ","Nächster Alarm: ", }, | 260 | { "Next Alarm: ","Nächster Alarm: ", }, |
261 | { "&Next Day","&Nächster Tag", }, | 261 | { "&Next Day","&Nächster Tag", }, |
262 | { "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, | 262 | { "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, |
263 | { "Next month","Nächster Monat" }, | 263 | { "Next month","Nächster Monat" }, |
264 | { "&Next Week","&Nächste Woche" }, | 264 | { "&Next Week","&Nächste Woche" }, |
265 | { "Next year","Nächstes Jahr" }, | 265 | { "Next year","Nächstes Jahr" }, |
266 | { "Next Year","Nächstes Jahr" }, | 266 | { "Next Year","Nächstes Jahr" }, |
267 | { "%n h","%n Std" }, | 267 | { "%n h","%n Std" }, |
268 | { "No ending date","Kein End-Datum", }, | 268 | { "No ending date","Kein End-Datum", }, |
269 | { "No event, nothing to do.","Kein Termin, nichts zu tun.", }, | 269 | { "No event, nothing to do.","Kein Termin, nichts zu tun.", }, |
270 | { "No event selected.","Kein Termin selektiert" }, | 270 | { "No event selected.","Kein Termin selektiert" }, |
271 | { "No","Nein" }, | 271 | { "No","Nein" }, |
272 | { "No program set","Kein Programm ausgewählt", }, | 272 | { "No program set","Kein Programm ausgewählt", }, |
273 | { "Normal","Normal" }, | 273 | { "Normal","Normal" }, |
274 | { "[No selection]","Keine Selektion", }, | 274 | { "[No selection]","Keine Selektion", }, |
275 | { "No sound set","Kein Sound ausgewählt", }, | 275 | { "No sound set","Kein Sound ausgewählt", }, |
276 | { "no time ","keine Zeit ", }, | 276 | { "no time ","keine Zeit ", }, |
277 | { "no time","keine Zeit", }, | 277 | { "no time","keine Zeit", }, |
278 | { "No Time","Keine Zeit" }, | 278 | { "No Time","Keine Zeit" }, |
279 | { "November","November" }, | 279 | { "November","November" }, |
280 | { "Nov","Nov", }, | 280 | { "Nov","Nov", }, |
281 | { "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, | 281 | { "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, |
282 | { "occurrence(s)","Vorkommen" }, | 282 | { "occurrence(s)","Vorkommen" }, |
283 | { "October","Oktober" }, | 283 | { "October","Oktober" }, |
284 | { "Oct","Okt", }, | 284 | { "Oct","Okt", }, |
285 | { "O-due!","Ü-fällig! " }, | 285 | { "O-due!","Ü-fällig! " }, |
286 | { "&OK","&OK" }, | 286 | { "&OK","&OK" }, |
287 | { "Ok+Show!","Ok+Anzeigen" }, | 287 | { "Ok+Show!","Ok+Anzeigen" }, |
288 | { "Organizer: %1","Organisator %1" }, | 288 | { "Organizer: %1","Organisator %1" }, |
289 | { "Organizer","Organisator" }, | 289 | { "Organizer","Organisator" }, |
290 | { "Owner: ","Besitzer: " }, | 290 | { "Owner: ","Besitzer: " }, |
291 | { "Owner:","Besitzer:" }, | 291 | { "Owner:","Besitzer:" }, |
292 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, | 292 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, |
293 | { "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, | 293 | { "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, |
294 | { "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, | 294 | { "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, |
295 | { "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, | 295 | { "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, |
296 | { "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, | 296 | { "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, |
297 | { "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, | 297 | { "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, |
298 | { "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, | 298 | { "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, |
299 | { "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, | 299 | { "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, |
300 | { "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, | 300 | { "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, |
301 | { "&Previous Day","Vorheriger Tag" }, | 301 | { "&Previous Day","Vorheriger Tag" }, |
302 | { "Previous month","Vorheriger Monat" }, | 302 | { "Previous month","Vorheriger Monat" }, |
303 | { "Previous Month","Vorheriger Monat" }, | 303 | { "Previous Month","Vorheriger Monat" }, |
304 | { "&Previous Week","Vorherige Woche" }, | 304 | { "&Previous Week","Vorherige Woche" }, |
305 | { "Previous year","Vorheriges Jahr" }, | 305 | { "Previous year","Vorheriges Jahr" }, |
306 | { "Previous Year","Vorheriges Jahr" }, | 306 | { "Previous Year","Vorheriges Jahr" }, |
307 | { "Printing","Drucken" }, | 307 | { "Printing","Drucken" }, |
308 | { "Priority:","Priorität:" }, | 308 | { "Priority:","Priorität:" }, |
309 | { "Private","Privat" }, | 309 | { "Private","Privat" }, |
310 | { "Proceed","Weiter" }, | 310 | { "Proceed","Weiter" }, |
311 | { "Public","Öffentlich" }, | 311 | { "Public","Öffentlich" }, |
312 | { "Purge","Entferne" }, | 312 | { "Purge","Entferne" }, |
313 | { "Purge Completed","Entferne erledigte ToDos" }, | 313 | { "Purge Completed","Entferne erledigte ToDos" }, |
314 | { "Purge To-Dos","Todos bereinigen" }, | 314 | { "Purge To-Dos","Todos bereinigen" }, |
315 | { "read-only","schreibgeschützt" }, | 315 | { "read-only","schreibgeschützt" }, |
316 | { "Recur every","Wiederh. alle" }, | 316 | { "Recur every","Wiederh. alle" }, |
317 | { "Recur in the month of","Wiederh. im Monat" }, | 317 | { "Recur in the month of","Wiederh. im Monat" }, |
318 | { "Recur on the","Wiederh. am" }, | 318 | { "Recur on the","Wiederh. am" }, |
319 | { "Recur on this day","Wiederh. am diesen Tag" }, | 319 | { "Recur on this day","Wiederh. am diesen Tag" }, |
320 | { "Recurrence Range...","Wiederholungs Zeitraum..." }, | 320 | { "Recurrence Range...","Wiederholungs Zeitraum..." }, |
321 | { "Recurrence Range","Wiederholungs Zeitraum" }, | 321 | { "Recurrence Range","Wiederholungs Zeitraum" }, |
322 | { "Recurrence Rule","Wiederholungs Regel" }, | 322 | { "Recurrence Rule","Wiederholungs Regel" }, |
323 | { "Recurrence","Wiederholung" }, | 323 | { "Recurrence","Wiederholung" }, |
324 | { "Recurs","Wiederholung" }, | 324 | { "Recurs","Wiederholung" }, |
325 | {"&Reject","Abweisen"}, | 325 | {"&Reject","Abweisen"}, |
326 | { "Reminder:","Alarm:" }, | 326 | { "Reminder:","Alarm:" }, |
327 | { "Rem.:","Alarm:" }, | 327 | { "Rem.:","Alarm:" }, |
328 | { "Rem.","Alarm:" }, | 328 | { "Rem.","Alarm:" }, |
329 | { "Remote file:","Remote Datei:"}, | 329 | { "Remote file:","Remote Datei:"}, |
330 | { "Remote IP:","Remote (ferne) IP:" }, | 330 | { "Remote IP:","Remote (ferne) IP:" }, |
331 | { "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, | 331 | { "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, |
332 | { "Remote user:","Remote Benutzer"}, | 332 | { "Remote user:","Remote Benutzer"}, |
333 | { "&Remove","Entfe&rnen" }, | 333 | { "&Remove","Entfe&rnen" }, |
334 | { "Remove","Entfernen" }, | 334 | { "Remove","Entfernen" }, |
335 | { "Request response","Bemerkung anfordern" }, | 335 | { "Request response","Bemerkung anfordern" }, |
336 | { "Role:","Rolle:" }, | 336 | { "Role:","Rolle:" }, |
337 | { "Role","Rolle" }, | 337 | { "Role","Rolle" }, |
338 | { "Sat","Sa" }, | 338 | { "Sat","Sa" }, |
339 | { "Saturday","Samstag" }, | 339 | { "Saturday","Samstag" }, |
340 | { "Search for:","Suche nach:" }, | 340 | { "Search for:","Suche nach:" }, |
341 | { "Search In","Suche in" }, | 341 | { "Search In","Suche in" }, |
342 | { "Search...","Suche..." }, | 342 | { "Search...","Suche..." }, |
343 | { "Search","Suche" }, | 343 | { "Search","Suche" }, |
344 | { "Select Addresses","Wähle Adressen" }, | 344 | { "Select Addresses","Wähle Adressen" }, |
345 | { "Select all","Selektiere Alle" }, | 345 | { "Select all","Selektiere Alle" }, |
346 | { "Select a month","Wähle Monat" }, | 346 | { "Select a month","Wähle Monat" }, |
347 | { "Select a week","Wähle Woche" }, | 347 | { "Select a week","Wähle Woche" }, |
348 | { "Select a year","Wähle Jahr" }, | 348 | { "Select a year","Wähle Jahr" }, |
349 | { "Send directly","Sende direkt" }, | 349 | { "Send directly","Sende direkt" }, |
350 | { "&Send Messages","&Sende Nachrichten", }, | 350 | { "&Send Messages","&Sende Nachrichten", }, |
351 | { "Sep","Sep" }, | 351 | { "Sep","Sep" }, |
352 | { "September","September" }, | 352 | { "September","September" }, |
353 | { "Shopping","Einkaufen" }, | 353 | { "Shopping","Einkaufen" }, |
354 | { "Use short date in (WN/E) view","Kurzdatum in (WN/Termin) Ansicht" }, | 354 | { "Use short date in (WN/E) view","Kurzdatum in (WN/Termin) Ansicht" }, |
355 | { "Show Dates","Zeige Daten" }, | 355 | { "Show Dates","Zeige Daten" }, |
356 | { "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, | 356 | { "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, |
357 | { "Show Event...","Zeige Termin..." }, | 357 | { "Show Event...","Zeige Termin..." }, |
358 | { "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, | 358 | { "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, |
359 | { "Show Marcus Bains line","Zeige Marcus Bains Linie" }, | 359 | { "Show Marcus Bains line","Zeige Marcus Bains Linie" }, |
360 | { "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, | 360 | { "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, |
361 | { "Show time as:","Zeige Zeit als" }, | 361 | { "Show time as:","Zeige Zeit als" }, |
362 | { "Show Todo...","Zeige To-Do" }, | 362 | { "Show Todo...","Zeige To-Do" }, |
363 | { "Show topmost todo prios in What's N.:","Anz. höchster Prios in What's N.:"}, | 363 | { "Show topmost todo prios in What's N.:","Anz. höchster Prios in What's N.:"}, |
364 | { "Show topmost todo prios in What's Next:","Anz. höchster Prios in What's Next:"}, | 364 | { "Show topmost todo prios in What's Next:","Anz. höchster Prios in What's Next:"}, |
365 | { "Show vertical screen (Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, | 365 | { "Show vertical screen (Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, |
366 | { "&Show","Zeige" }, | 366 | { "&Show","Zeige" }, |
367 | { "Show...","Zeige..." }, | 367 | { "Show...","Zeige..." }, |
368 | { "Show","Zeige" }, | 368 | { "Show","Zeige" }, |
369 | { "Small","Klein" }, | 369 | { "Small","Klein" }, |
370 | { "Sorry","Entschuldigung" }, | 370 | { "Sorry","Entschuldigung" }, |
371 | {"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, | 371 | {"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, |
372 | { "Start:","Start:" }, | 372 | { "Start:","Start:" }, |
373 | { "Start Date","Start Datum" }, | 373 | { "Start Date","Start Datum" }, |
374 | { "Start date: %1","Start Datum: %1" }, | 374 | { "Start date: %1","Start Datum: %1" }, |
375 | { "Start Time","Start Zeit" }, | 375 | { "Start Time","Start Zeit" }, |
376 | { "Status:","Status:" }, | 376 | { "Status:","Status:" }, |
377 | { "Status","Status:" }, | 377 | { "Status","Status:" }, |
378 | { "Summaries","Titel" }, | 378 | { "Summaries","Titel" }, |
379 | { "Summary:","Titel:" }, | 379 | { "Summary:","Titel:" }, |
380 | { "Summary","Titel" }, | 380 | { "Summary","Titel" }, |
381 | { "Sunday","Sonntag" }, | 381 | { "Sunday","Sonntag" }, |
382 | { "Sun","So" }, | 382 | { "Sun","So" }, |
383 | { "Sync preferences:","Sync Einstellungen" }, | 383 | { "Sync preferences:","Sync Einstellungen" }, |
384 | { "Sync Prefs","Sync Einstellungen" }, | 384 | { "Sync Prefs","Sync Einstellungen" }, |
385 | { "Syncronize","Daten abgleich" }, | 385 | { "Syncronize","Daten abgleich" }, |
386 | { "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, | 386 | { "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, |
387 | { "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, | 387 | { "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, |
388 | { "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, | 388 | { "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, |
389 | { "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" }, | 389 | { "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" }, |
390 | { "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, | 390 | { "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, |
391 | { "Template...","Vorlage..." }, | 391 | { "Template...","Vorlage..." }, |
392 | { "This day","Dieser Tag" }, | 392 | { "This day","Dieser Tag" }, |
393 | { "This is an experimental feature. ","Dieses Feature ist experimentel" }, | 393 | { "This is an experimental feature. ","Dieses Feature ist experimentel" }, |
394 | { "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, | 394 | { "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, |
395 | { "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, | 395 | { "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, |
396 | { "Thu","Do" }, | 396 | { "Thu","Do" }, |
397 | { "Thursday","Donnerstag" }, | 397 | { "Thursday","Donnerstag" }, |
398 | { "Time associated","Mit Zeit" }, | 398 | { "Time associated","Mit Zeit" }, |
399 | { "Time bar:","Uhrzeit Zeile:" }, | 399 | { "Time bar:","Uhrzeit Zeile:" }, |
400 | { "Time && Date","Zeit und Datum" }, | 400 | { "Time && Date","Zeit und Datum" }, |
401 | { "Time Format","Zeit Format" }, | 401 | { "Time Format","Zeit Format" }, |
402 | { "Time Format(nr):","Zeit Format(Neustart!)" }, | 402 | { "Time Format(nr):","Zeit Format(Neustart!)" }, |
403 | { "Date Labels:","Datumsleiste:" }, | 403 | { "Date Labels:","Datumsleiste:" }, |
404 | { "Time: ","Zeit: " }, | 404 | { "Time: ","Zeit: " }, |
405 | { "Timezone:","Zeitzone:" }, | 405 | { "Timezone:","Zeitzone:" }, |
406 | { "To: ","Bis: " }, | 406 | { "To: ","Bis: " }, |
407 | { "To:","Bis:" }, | 407 | { "To:","Bis:" }, |
408 | { "Today: ","Heute: " }, | 408 | { "Today: ","Heute: " }, |
409 | { "Todo due today color:","Heute fällige To-Do's" }, | 409 | { "Todo due today color:","Heute fällige To-Do's" }, |
410 | { "To-do items:","To-Do items:" }, | 410 | { "To-do items:","To-Do items:" }, |
411 | { "Todo overdue color:","Überfällige To-Do's" }, | 411 | { "Todo overdue color:","Überfällige To-Do's" }, |
412 | { "Todo","Todo" }, | 412 | { "Todo","Todo" }, |
413 | { "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" }, | 413 | { "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" }, |
414 | { "ToDoView:","Todo Ansicht:" }, | 414 | { "ToDoView:","Todo Ansicht:" }, |
415 | { "Toggle Alarm","Wechsle Alarm" }, | 415 | { "Toggle Alarm","Wechsle Alarm" }, |
416 | { "Toggle Allday","Umschalten Ganztag" }, | 416 | { "Toggle Allday","Umschalten Ganztag" }, |
417 | { "Tomorrow: ","Morgen: " }, | 417 | { "Tomorrow: ","Morgen: " }, |
418 | { "Tue","Di" }, | 418 | { "Tue","Di" }, |
419 | { "Tuesday","Dienstag" }, | 419 | { "Tuesday","Dienstag" }, |
420 | { "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, | 420 | { "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, |
421 | { "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, | 421 | { "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, |
422 | { "Unknown","Unbekannt" }, | 422 | { "Unknown","Unbekannt" }, |
423 | { "Up","Hinauf" }, | 423 | { "Up","Hinauf" }, |
424 | { "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, | 424 | { "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, |
425 | { "User defined","Benutzerdefiniert" }, | 425 | { "User defined","Benutzerdefiniert" }, |
426 | { "User long date:","Format langes Datum:" }, | 426 | { "User long date:","Format langes Datum:" }, |
427 | { "User short date:","Forma kurzes Datum:" }, | 427 | { "User short date:","Forma kurzes Datum:" }, |
428 | { "View","Ansicht" }, | 428 | { "View","Ansicht" }, |
429 | { "View Fonts","Schriftarten Ansichten" }, | 429 | { "View Fonts","Schriftarten Ansichten" }, |
430 | { "Views","Ansichten" }, | 430 | { "Views","Ansichten" }, |
431 | { "Wed","Mi" }, | 431 | { "Wed","Mi" }, |
432 | { "Wednesday","Mittwoch" }, | 432 | { "Wednesday","Mittwoch" }, |
433 | { "Week %1","Woche %1" }, | 433 | { "Week %1","Woche %1" }, |
434 | { "Weekly","Wöchentlich" }, | 434 | { "Weekly","Wöchentlich" }, |
435 | { "Week starts on Sunday","Woche beginnt Sonntags" }, | 435 | { "Week starts on Sunday","Woche beginnt Sonntags" }, |
436 | { "What's Next View:","What's Next Anz." }, | 436 | { "What's Next View:","What's Next Anz." }, |
437 | { "What's next ?","Was kommt als nächstes?(What's Next)" }, | 437 | { "What's next ?","Was kommt als nächstes?(What's Next)" }, |
438 | { "Working Hours","Tägliche Arbeitszeit" }, | 438 | { "Working Hours","Tägliche Arbeitszeit" }, |
439 | { "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, | 439 | { "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, |
440 | { "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, | 440 | { "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, |
441 | { "Write back synced file","Syncronisierte Datei zurückschreiben" }, | 441 | { "Write back synced file","Syncronisierte Datei zurückschreiben" }, |
442 | { "Yearly","Jährlich" }, | 442 | { "Yearly","Jährlich" }, |
443 | { "year(s)","Jahr(e)" }, | 443 | { "year(s)","Jahr(e)" }, |
444 | { "Yes","Ja" }, | 444 | { "Yes","Ja" }, |
445 | { "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, | 445 | { "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, |
446 | { "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, | 446 | { "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, |
447 | { "week(s) on:","Woche(n) am: " }, | 447 | { "week(s) on:","Woche(n) am: " }, |
448 | { "Full menu bar(nr)","Volle Menuleiste(bn)" }, | 448 | { "Full menu bar(nr)","Volle Menuleiste(bn)" }, |
449 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, | 449 | { "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, |
450 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, | 450 | { "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, |
451 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, | 451 | { "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, |
452 | { "Daylight start:","Sommerzeit Beginn:" }, | 452 | { "Daylight start:","Sommerzeit Beginn:" }, |
453 | { "Daylight end:","Sommerzeit Ende:" }, | 453 | { "Daylight end:","Sommerzeit Ende:" }, |
454 | { "Time Zone","Zeitzone" }, | 454 | { "Time Zone","Zeitzone" }, |
455 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, | 455 | { "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, |
456 | { "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, | 456 | { "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, |
457 | { "minutely","minütlich" }, | 457 | { "minutely","minütlich" }, |
458 | { "hourly","stündlich" }, | 458 | { "hourly","stündlich" }, |
459 | { "daily","täglich" }, | 459 | { "daily","täglich" }, |
460 | { "weekly","wöchentlich" }, | 460 | { "weekly","wöchentlich" }, |
461 | { "monthly","monatlich" }, | 461 | { "monthly","monatlich" }, |
462 | { "day-monthly","tag-monatlich" }, | 462 | { "day-monthly","tag-monatlich" }, |
463 | { "month-yearly","monat-jährlich" }, | 463 | { "month-yearly","monat-jährlich" }, |
464 | { "day-yearly","tag-jährlich" }, | 464 | { "day-yearly","tag-jährlich" }, |
465 | { "position-yearly","pos-jährlich" }, | 465 | { "position-yearly","pos-jährlich" }, |
466 | { "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, | 466 | { "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, |
467 | { "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, | 467 | { "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, |
468 | { "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, | 468 | { "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, |
469 | { "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, | 469 | { "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, |
470 | { "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, | 470 | { "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, |
471 | { "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, | 471 | { "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, |
472 | { "Event list view uses full window","Listenansicht nutzt Vollbild" }, | 472 | { "Event list view uses full window","Listenansicht nutzt Vollbild" }, |
473 | { "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, | 473 | { "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, |
474 | { "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, | 474 | { "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, |
475 | { "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, | 475 | { "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, |
476 | { "ViewChange","Ansichtswechsel" }, | 476 | { "ViewChange","Ansichtswechsel" }, |
477 | { "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, | 477 | { "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, |
478 | { "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, | 478 | { "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, |
479 | { "File","Datei" }, | 479 | { "File","Datei" }, |
480 | { "Clone...","Dupliziere.." }, | 480 | { "Clone...","Dupliziere.." }, |
481 | { "Move...","Bewege..." }, | 481 | { "Move...","Bewege..." }, |
482 | { "Beam...","Sende via IR..." }, | 482 | { "Beam...","Sende via IR..." }, |
483 | { "&Clone...","Dupliziere.." }, | 483 | { "&Clone...","Dupliziere.." }, |
484 | { "&Move...","Bewege..." }, | 484 | { "&Move...","Bewege..." }, |
485 | { "&Beam...","Sende via IR..." }, | 485 | { "&Beam...","Sende via IR..." }, |
486 | { "Show Completed","Zeige erledigte Todos" }, | 486 | { "Show Completed","Zeige erledigte Todos" }, |
487 | { "Show Quick Todo","Zeige Quick Todo" }, | 487 | { "Show Quick Todo","Zeige Quick Todo" }, |
488 | { "Unparent Todo","Un-sub Todo" }, | 488 | { "Unparent Todo","Un-sub Todo" }, |
489 | { "Save selected to file...","Speichere Selektierte..." }, | 489 | { "Save selected to file...","Speichere Selektierte..." }, |
490 | { "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, | 490 | { "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, |
491 | { "Set Categ. for selected...","Setze Kateg. für Selekt." }, | 491 | { "Set Categ. for selected...","Setze Kateg. für Selekt." }, |
492 | { "Beam selected via IR","Sende Selekt. via IR..." }, | 492 | { "Beam selected via IR","Sende Selekt. via IR..." }, |
493 | { "Search","Suchen" }, | 493 | { "Search","Suchen" }, |
494 | { "Date Picker","Datum auswählen" }, | 494 | { "Date Picker","Datum auswählen" }, |
495 | { "Day View","Tagesansicht" }, | 495 | { "Day View","Tagesansicht" }, |
496 | { "Work Week","Arbeitswoche" }, | 496 | { "Work Week","Arbeitswoche" }, |
497 | { "Week","Wochenansicht" }, | 497 | { "Week","Wochenansicht" }, |
498 | { "Month","Monatsansicht" }, | 498 | { "Month","Monatsansicht" }, |
499 | { "Todo View","Todo Liste" }, | 499 | { "Todo View","Todo Liste" }, |
500 | { "Journal","Journal Ansicht" }, | 500 | { "Journal","Journal Ansicht" }, |
501 | { "Next days","Nächste Tage" }, | 501 | { "Next days","Nächste Tage" }, |
502 | { "Print agenda selection...","Drucke Agendaselektion..." }, | 502 | { "Print agenda selection...","Drucke Agendaselektion..." }, |
503 | { "Toggle DateNavigator","Navigator umschalten" }, | 503 | { "Toggle DateNavigator","Navigator umschalten" }, |
504 | { "Toggle FilterView","Filteransicht umschalten" }, | 504 | { "Toggle FilterView","Filteransicht umschalten" }, |
505 | { "Prev. month","Vorheriger Monat" }, | 505 | { "Prev. month","Vorheriger Monat" }, |
506 | { "Go backward","Gehe zurück" }, | 506 | { "Go backward","Gehe zurück" }, |
507 | { "Go forward","Gehe weiter" }, | 507 | { "Go forward","Gehe weiter" }, |
508 | { "Synchronize","Synchronisieren" }, | 508 | { "Synchronize","Synchronisieren" }, |
509 | { "AgendaSize","Agendagröße" }, | 509 | { "AgendaSize","Agendagröße" }, |
510 | { "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, | 510 | { "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, |
511 | { "Import last file","Importiere letzte Datei" }, | 511 | { "Import last file","Importiere letzte Datei" }, |
512 | { "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, | 512 | { "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, |
513 | { "Load Calendar Backup","Lade Kalender Backup" }, | 513 | { "Load Calendar Backup","Lade Kalender Backup" }, |
514 | { "Save Calendar Backup","Speichere Kalender Backup" }, | 514 | { "Save Calendar Backup","Speichere Kalender Backup" }, |
515 | { "Export VCalendar","Exportiere VCalendar" }, | 515 | { "Export VCalendar","Exportiere VCalendar" }, |
516 | { "Manage new categories...","Verwalte neue Kategorien..." }, | 516 | { "Manage new categories...","Verwalte neue Kategorien..." }, |
517 | { "Beam complete calendar...","Sende kompletten Kalender via IR" }, | 517 | { "Beam complete calendar...","Sende kompletten Kalender via IR" }, |
518 | { "Beam filtered calendar...","Sende gefilterten Kalender via IR" }, | 518 | { "Beam filtered calendar...","Sende gefilterten Kalender via IR" }, |
519 | { "Remote via ssh","Über Netzwerk via ssh" }, | 519 | { "Remote via ssh","Über Netzwerk via ssh" }, |
520 | { "With local file","Mit lokaler Datei" }, | 520 | { "With local file","Mit lokaler Datei" }, |
521 | { "With last file","Mit letzter Datei" }, | 521 | { "With last file","Mit letzter Datei" }, |
522 | { "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, | 522 | { "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, |
523 | { "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, | 523 | { "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, |
524 | { "Save filename","Speichern: Dateinamen wählen" }, | 524 | { "Save filename","Speichern: Dateinamen wählen" }, |
525 | { "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, | 525 | { "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, |
526 | { "KO/Pi: Warning!","KO/Pi: Warnung!" }, | 526 | { "KO/Pi: Warning!","KO/Pi: Warnung!" }, |
527 | { "Overwrite!","Überschreibe!" }, | 527 | { "Overwrite!","Überschreibe!" }, |
528 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 528 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
529 | { "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" }, | 529 | { "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" }, |
530 | { "KO/Pi Confirmation","KO/Pi Bestätigung" }, | 530 | { "KO/Pi Confirmation","KO/Pi Bestätigung" }, |
531 | { "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, | 531 | { "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, |
532 | { "Deleting item %d ...","Lösche Eintrag %d ..." }, | 532 | { "Deleting item %d ...","Lösche Eintrag %d ..." }, |
533 | { "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, | 533 | { "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, |
534 | { "Size","Größe" }, | 534 | { "Size","Größe" }, |
535 | { "Date","Datum" }, | 535 | { "Date","Datum" }, |
536 | { "Mime Type","Datei Typ" }, | 536 | { "Mime Type","Datei Typ" }, |
537 | { "All Files","Alle Dateien" }, | 537 | { "All Files","Alle Dateien" }, |
538 | { "Files","Dateien" }, | 538 | { "Files","Dateien" }, |
539 | { "Documents","DoKumente" }, | 539 | { "Documents","DoKumente" }, |
540 | { "Select Categories","Selektiere Kategorien" }, | 540 | { "Select Categories","Selektiere Kategorien" }, |
541 | { " &Deselect All "," Auswahl aufheben " }, | 541 | { " &Deselect All "," Auswahl aufheben " }, |
542 | { "A&dd","Hinzu" }, | 542 | { "A&dd","Hinzu" }, |
543 | { "&Modify","Ändern" }, | 543 | { "&Modify","Ändern" }, |
544 | { "Edit Categories","Editiere Kategorien" }, | 544 | { "Edit Categories","Editiere Kategorien" }, |
545 | { " &Edit Categories "," &Editiere Kategorien " }, | 545 | { " &Edit Categories "," &Editiere Kategorien " }, |
546 | { "Beam Options","Beam Einstellungen" }, | 546 | { "Beam Options","Beam Einstellungen" }, |
547 | { " With timezone "," Mit Zeitzone " }, | 547 | { " With timezone "," Mit Zeitzone " }, |
548 | { " Local time ", " Lokale Zeit " }, | 548 | { " Local time ", " Lokale Zeit " }, |
549 | { "Manage new Categories","Verwalte neue Kategorien" }, | 549 | { "Manage new Categories","Verwalte neue Kategorien" }, |
550 | { "Add to category list","Füge zur Kategorieliste hinzu" }, | 550 | { "Add to category list","Füge zur Kategorieliste hinzu" }, |
551 | { "Remove from Events/Todos","Entferne von Terminen/Todos" }, | 551 | { "Remove from Events/Todos","Entferne von Terminen/Todos" }, |
552 | { "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, | 552 | { "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, |
553 | { "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, | 553 | { "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, |
554 | { "File format","Datei Format" }, | 554 | { "File format","Datei Format" }, |
555 | { "Time format","Zeit Format" }, | 555 | { "Time format","Zeit Format" }, |
556 | { "Delete all\ncompleted To-Dos?","Lösche alle\nerledigten To-Dos?" }, | 556 | { "Delete all\ncompleted To-Dos?","Lösche alle\nerledigten To-Dos?" }, |
557 | { "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, | 557 | { "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, |
558 | { "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, | 558 | { "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, |
559 | { "h","Std" }, | 559 | { "h","Std" }, |
560 | { "min","Min" }, | 560 | { "min","Min" }, |
561 | { "hou","Std" }, | 561 | { "hou","Std" }, |
562 | { "day","Tag" }, | 562 | { "day","Tag" }, |
563 | { "French","Französich" }, | 563 | { "French","Französich" }, |
564 | { "Time","Zeit" }, | 564 | { "Time","Zeit" }, |
565 | { "Event Viewer","Termin Ansicht" }, | 565 | { "Event Viewer","Termin Ansicht" }, |
566 | { "Cancel Sync","Sync Abbrechen" }, | 566 | { "Cancel Sync","Sync Abbrechen" }, |
567 | { "Remote","Fern" }, | 567 | { "Remote","Fern" }, |
568 | { "Local","Lokal" }, | 568 | { "Local","Lokal" }, |
569 | { "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, | 569 | { "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, |
570 | { "Local: ","Lokal: " }, | 570 | { "Local: ","Lokal: " }, |
571 | { "Remote: ","Fern: " }, | 571 | { "Remote: ","Fern: " }, |
572 | { "Last modified: ","Zuletzt geändert: " }, | 572 | { "Last modified: ","Zuletzt geändert: " }, |
573 | { "Location: ","Ort: " }, | 573 | { "Location: ","Ort: " }, |
574 | { "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, | 574 | { "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, |
575 | { "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, | 575 | { "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, |
576 | { "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, | 576 | { "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, |
577 | { "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, | 577 | { "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, |
578 | { "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, | 578 | { "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, |
579 | { "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, | 579 | { "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, |
580 | { "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, | 580 | { "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, |
581 | { "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, | 581 | { "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, |
582 | { "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, | 582 | { "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, |
583 | { "( %1 min before )","( %1 min vorher )" }, | 583 | { "( %1 min before )","( %1 min vorher )" }, |
584 | { "<b>Alarm on: ","<b>Alarm am: " }, | 584 | { "<b>Alarm on: ","<b>Alarm am: " }, |
585 | { "<b>Details: </b>","<b>Details: </b>" }, | 585 | { "<b>Details: </b>","<b>Details: </b>" }, |
586 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, | 586 | { "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, |
587 | { "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, | 587 | { "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, |
588 | { "Organizer","Organisator" }, | 588 | { "Organizer","Organisator" }, |
589 | { "Save","Speichern" }, | 589 | { "Save","Speichern" }, |
590 | { "Exit (+save)","Beenden (+ speichern)" }, | 590 | { "Exit (+save)","Beenden (+ speichern)" }, |
591 | { "Home","Zuhause" }, | 591 | { "Home","Zuhause" }, |
592 | { "Office","Büro" }, | 592 | { "Office","Büro" }, |
593 | { "Libary","Bücherei" }, | 593 | { "Libary","Bücherei" }, |
594 | { "Doctor","Arzt" }, | 594 | { "Doctor","Arzt" }, |
595 | { "Beach","Strand" }, | 595 | { "Beach","Strand" }, |
596 | { "Conference room","Konferenzraum" }, | 596 | { "Conference room","Konferenzraum" }, |
597 | { "Drive Home","Heimfahrt" }, | 597 | { "Drive Home","Heimfahrt" }, |
598 | { "Watch TV","Tv gucken" }, | 598 | { "Watch TV","Tv gucken" }, |
599 | { "Phone call","Telefonanruf" }, | 599 | { "Phone call","Telefonanruf" }, |
600 | { "Pay bill","Rechnung bezahlen" }, | 600 | { "Pay bill","Rechnung bezahlen" }, |
601 | { "Read book","Buch lesen" }, | 601 | { "Read book","Buch lesen" }, |
602 | { "Watering plants","Pflanzen giessen" }, | 602 | { "Watering plants","Pflanzen giessen" }, |
603 | {"Appointment","Verabredung" }, | 603 | {"Appointment","Verabredung" }, |
604 | {"Birthday","Geburtstag" }, | 604 | {"Birthday","Geburtstag" }, |
605 | {"Business","Geschäft" }, | 605 | {"Business","Geschäft" }, |
606 | {"Business Travel","Geschäftsreise" }, | 606 | {"Business Travel","Geschäftsreise" }, |
607 | {"Cinema","Kino" }, | 607 | {"Cinema","Kino" }, |
608 | {"Customer","Kunde" }, | 608 | {"Customer","Kunde" }, |
609 | {"Break","Pause" }, | 609 | {"Break","Pause" }, |
610 | {"Breakfast","Frühstück" }, | 610 | {"Breakfast","Frühstück" }, |
611 | {"Competition","Wettkampf" }, | 611 | {"Competition","Wettkampf" }, |
612 | {"Dinner","Abendessen" }, | 612 | {"Dinner","Abendessen" }, |
613 | {"Education","Erziehung" }, | 613 | {"Education","Erziehung" }, |
614 | {"Family","Familie" }, | 614 | {"Family","Familie" }, |
615 | {"Favorites","Favoriten" }, | 615 | {"Favorites","Favoriten" }, |
616 | {"Festival","Festival" }, | 616 | {"Festival","Festival" }, |
617 | {"Fishing","Angeln" }, | 617 | {"Fishing","Angeln" }, |
618 | {"Flight","Flug" }, | 618 | {"Flight","Flug" }, |
619 | {"Gifts","Geschenk" }, | 619 | {"Gifts","Geschenk" }, |
620 | {"Holiday","Feiertag" }, | 620 | {"Holiday","Feiertag" }, |
621 | {"Holiday Cards","Ansichtskarten" }, | 621 | {"Holiday Cards","Ansichtskarten" }, |
622 | {"Hot Contacts","Heisse Kontakte" }, | 622 | {"Hot Contacts","Heisse Kontakte" }, |
623 | {"Hiking","Wandern" }, | 623 | {"Hiking","Wandern" }, |
624 | {"Hunting","Jagen" }, | 624 | {"Hunting","Jagen" }, |
625 | {"Key Customer","Wichtiger Kunde" }, | 625 | {"Key Customer","Wichtiger Kunde" }, |
626 | {"Kids","Kinder" }, | 626 | {"Kids","Kinder" }, |
627 | {"Lunch","Mittagessen" }, | 627 | {"Lunch","Mittagessen" }, |
628 | {"Meeting","Treffen" }, | 628 | {"Meeting","Treffen" }, |
629 | {"Miscellaneous","Verschiedenes" }, | 629 | {"Miscellaneous","Verschiedenes" }, |
630 | {"Partner","Partner" }, | 630 | {"Partner","Partner" }, |
631 | {"Party","Partie" }, | 631 | {"Party","Partie" }, |
632 | {"Personal","Privat" }, | 632 | {"Personal","Privat" }, |
633 | {"Personal Travel","Privatreise"}, | 633 | {"Personal Travel","Privatreise"}, |
634 | {"PHB","PHB" }, | 634 | {"PHB","PHB" }, |
635 | {"Phone Calls","Telefonanruf" }, | 635 | {"Phone Calls","Telefonanruf" }, |
636 | {"Projects","Projekt" }, | 636 | {"Projects","Projekt" }, |
637 | {"Recurring","Wiederholend" }, | 637 | {"Recurring","Wiederholend" }, |
638 | {"School","Schule" }, | 638 | {"School","Schule" }, |
639 | {"Shopping","Einkaufen" }, | 639 | {"Shopping","Einkaufen" }, |
640 | {"Speach","Rede" }, | 640 | {"Speach","Rede" }, |
641 | {"Special Occasion","Spez.Gelegenheit" }, | 641 | {"Special Occasion","Spez.Gelegenheit" }, |
642 | {"Sports","Sport" }, | 642 | {"Sports","Sport" }, |
643 | {"Talk","Vortrag" }, | 643 | {"Talk","Vortrag" }, |
644 | {"Travel","Reise" }, | 644 | {"Travel","Reise" }, |
645 | {"TV","TV" }, | 645 | {"TV","TV" }, |
646 | {"Germany","Deutschland" }, | 646 | {"Germany","Deutschland" }, |
647 | {"Sweden","Schweden" }, | 647 | {"Sweden","Schweden" }, |
648 | {"Forest","Wald" }, | 648 | {"Forest","Wald" }, |
649 | { "Desert","Wüste" }, | 649 | { "Desert","Wüste" }, |
650 | { "Kitchen","Küche" }, | 650 | { "Kitchen","Küche" }, |
651 | { "Lake","See" }, | 651 | { "Lake","See" }, |
652 | {"University","Universität"}, | 652 | {"University","Universität"}, |
653 | {"Vacation","Urlaub" }, | 653 | {"Vacation","Urlaub" }, |
654 | {"VIP","VIP" }, | 654 | {"VIP","VIP" }, |
655 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, | 655 | { "Import Sharp Calendar","Importiere Sharp Kalender" }, |
656 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, | 656 | { "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, |
657 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, | 657 | { "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, |
658 | { "Cancelled","Gecancelt" }, | 658 | { "Cancelled","Gecancelt" }, |
659 | { "Multiple sync","Mehrfach Sync" }, | 659 | { "Multiple sync","Mehrfach Sync" }, |
660 | { "Local file","Lokale Datei" }, | 660 | { "Local file","Lokale Datei" }, |
661 | { "Last file","Letzte Datei" }, | 661 | { "Last file","Letzte Datei" }, |
662 | { "Keys + Colors...","Tasten + Farben..." }, | 662 | { "Keys + Colors...","Tasten + Farben..." }, |
663 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, | 663 | { "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, |
664 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, | 664 | { "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, |
665 | { "Choose...","Wähle..." }, | 665 | { "Choose...","Wähle..." }, |
666 | { "Use colors for application:","Setze Farben für Programm:" }, | 666 | { "Use colors for application:","Setze Farben für Programm:" }, |
667 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, | 667 | { "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, |
668 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, | 668 | { "Frames, labels, etc.:","Rahmen, Label, etc.:" }, |
669 | { "Show parent To-Do's in What's Next view","Zeige Ober-Todo in What's Next Anz." }, | 669 | { "Show parent To-Do's in What's Next view","Zeige Ober-Todo in What's Next Anz." }, |
670 | { "Show location in What's Next view","Zeige Ort in What's Next Anz." }, | 670 | { "Show location in What's Next view","Zeige Ort in What's Next Anz." }, |
671 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, | 671 | { "Show events that recur ","Zeige Termine, die sich wiederholen:" }, |
672 | { "Show in every cell ","Zeige in jeder Zelle " }, | 672 | { "Show in every cell ","Zeige in jeder Zelle " }, |
673 | { "short month","kurzen Monat" }, | 673 | { "short month","kurzen Monat" }, |
674 | { "icons","Icons" }, | 674 | { "icons","Icons" }, |
675 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, | 675 | { "Show Sat/Sun together","Zeige Sam/Son zusammen" }, |
676 | { "Categorie colors are applied to text","Kategorie Farben färben Text" }, | 676 | { "Categorie colors are applied to text","Kategorie Farben färben Text" }, |
677 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, | 677 | { "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, |
678 | { "Day color odd months","Tagesfarbe ungerade Monate" }, | 678 | { "Day color odd months","Tagesfarbe ungerade Monate" }, |
679 | { "Day color even months","Tagesfarbe gerade Monate" }, | 679 | { "Day color even months","Tagesfarbe gerade Monate" }, |
680 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, | 680 | { "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, |
681 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, | 681 | { "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, |
682 | { "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, | 682 | { "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, |
683 | { "Colors are applied to text","Farben werden auf Text angewendet" }, | 683 | { "Colors are applied to text","Farben werden auf Text angewendet" }, |
684 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, | 684 | { "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, |
685 | { "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" }, | 685 | { "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" }, |
686 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, | 686 | { "Play beeps count:","Anzahl der Alarmpiepse: " }, |
687 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, | 687 | { "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, |
688 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, | 688 | { "Default suspend time in min:","Standard Supendierungs Zeit: " }, |
689 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, | 689 | { "Auto suspend count:","Anzahl der auto Suspendierungen" }, |
690 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, | 690 | { "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, |
691 | { "New profile","Neues Profil" }, | 691 | { "New profile","Neues Profil" }, |
692 | { "Clone profile","Klone Profil" }, | 692 | { "Clone profile","Klone Profil" }, |
693 | { "Delete profile","Lösche Profil" }, | 693 | { "Delete profile","Lösche Profil" }, |
694 | { "Profile:","Profil:" }, | 694 | { "Profile:","Profil:" }, |
695 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, | 695 | { "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, |
696 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, | 696 | { "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, |
697 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, | 697 | { "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, |
698 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, | 698 | { "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, |
699 | { "Write back file","Schreibe Datei zurück" }, | 699 | { "Write back file","Schreibe Datei zurück" }, |
700 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, | 700 | { "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, |
701 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, | 701 | { "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, |
702 | { "Local device name:","Name dieses Gerätes:" }, | 702 | { "Local device name:","Name dieses Gerätes:" }, |
703 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, | 703 | { "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, |
704 | { "Sync preferences","Synchronisations Einstellungen" }, | 704 | { "Sync preferences","Synchronisations Einstellungen" }, |
705 | { "Profile kind","Profil Art" }, | 705 | { "Profile kind","Profil Art" }, |
706 | { "Local file","Lokale Datei" }, | 706 | { "Local file","Lokale Datei" }, |
707 | { "Local file:","Lokale Datei:" }, | 707 | { "Local file:","Lokale Datei:" }, |
708 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, | 708 | { "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, |
709 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, | 709 | { "Fill in default values for:","Setze Beispiel Werte ein für:" }, |
710 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, | 710 | { "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, |
711 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, | 711 | { "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, |
712 | { "Device","Gerät:" }, | 712 | { "Device","Gerät:" }, |
713 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, | 713 | { "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, |
714 | { "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" }, | 714 | { "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" }, |
715 | { "Synchronization successful","Synchronisation erfolgreich" }, | 715 | { "Synchronization successful","Synchronisation erfolgreich" }, |
716 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, | 716 | { "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, |
717 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, | 717 | { "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, |
718 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, | 718 | { "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, |
719 | { "Enter password","Passwort eingeben" }, | 719 | { "Enter password","Passwort eingeben" }, |
720 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, | 720 | { "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, |
721 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, | 721 | { "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, |
722 | { "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" }, | 722 | { "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" }, |
723 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, | 723 | { "Writing back file result: ","Resultat des Dateizurückschreibens: " }, |
724 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, | 724 | { "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, |
725 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, | 725 | { "Edit Calendar Filters","Editiere Kalendar Filter" }, |
726 | { "Enter filter name:","Neuer Filter Name:" }, | 726 | { "Enter filter name:","Neuer Filter Name:" }, |
727 | { "Add Filter","Filter hinzufügen" }, | 727 | { "Add Filter","Filter hinzufügen" }, |
728 | { "Question","Frage" }, | 728 | { "Question","Frage" }, |
729 | { "Filter position: ","Filter Position: " }, | 729 | { "Filter position: ","Filter Position: " }, |
730 | { "Month View","Monatsansicht" }, | 730 | { "Month View","Monatsansicht" }, |
731 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, | 731 | { "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, |
732 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, | 732 | { "KO/Pi config error","KO/Pi Konfig. Fehler" }, |
733 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, | 733 | { "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, |
734 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, | 734 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, |
735 | { "Access: ","Zugriff: " }, | 735 | { "Access: ","Zugriff: " }, |
736 | { "Needs Action","Aktion notwendig" }, | 736 | { "Needs Action","Aktion notwendig" }, |
737 | { "Accepted","Akzeptiert" }, | 737 | { "Accepted","Akzeptiert" }, |
738 | { "Declined","Abgelehnt" }, | 738 | { "Declined","Abgelehnt" }, |
739 | { "Tentative","Vorläufig" }, | 739 | { "Tentative","Vorläufig" }, |
740 | { "Delegated","Beauftragt" }, | 740 | { "Delegated","Beauftragt" }, |
741 | { "Completed","Vollständig" }, | 741 | { "Completed","Vollständig" }, |
742 | { "In Process","In Bearbeitung" }, | 742 | { "In Process","In Bearbeitung" }, |
743 | { "Participant","Teilnehmer" }, | 743 | { "Participant","Teilnehmer" }, |
744 | { "Optional Participant","Möglicher Teilnehmer" }, | 744 | { "Optional Participant","Möglicher Teilnehmer" }, |
745 | { "Observer","Beobachter" }, | 745 | { "Observer","Beobachter" }, |
746 | { "Chair","Vorsitzender" }, | 746 | { "Chair","Vorsitzender" }, |
747 | { "Not supported \non desktop!\n","" }, | 747 | { "Not supported \non desktop!\n","" }, |
748 | { "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) " }, | 748 | { "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) " }, |
749 | { "Date range: ","Datums Zeitspanne: " }, | 749 | { "Date range: ","Datums Zeitspanne: " }, |
750 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, | 750 | { "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, |
751 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, | 751 | { "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, |
752 | { "Add / remove events","Add./entferne Termine" }, | 752 | { "Add / remove events","Add./entferne Termine" }, |
753 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, | 753 | { "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, |
754 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, | 754 | { "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, |
755 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, | 755 | { "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, |
756 | { "Overwrite","Überschreiben" }, | 756 | { "Overwrite","Überschreiben" }, |
757 | { "Sync+save","Syncen+speichern" }, | 757 | { "Sync+save","Syncen+speichern" }, |
758 | { "Default","Standard" }, | 758 | { "Default","Standard" }, |
759 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, | 759 | { " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, |
760 | { " %d items?"," %d Einträge?" }, | 760 | { " %d items?"," %d Einträge?" }, |
761 | { "\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?" }, | 761 | { "\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?" }, |
762 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, | 762 | { " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, |
763 | { "Current","Aktuelle" }, | 763 | { "Current","Aktuelle" }, |
764 | { "\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" }, | 764 | { "\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" }, |
765 | { "All","Alle" }, | 765 | { "All","Alle" }, |
766 | { "Data Loss Warning","Datenverlust Warnung" }, | 766 | { "Data Loss Warning","Datenverlust Warnung" }, |
767 | { "Proceed","Weitermachen" }, | 767 | { "Proceed","Weitermachen" }, |
768 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, | 768 | { "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, |
769 | { "Filter disabled ","Filter abgeschaltet" }, | 769 | { "Filter disabled ","Filter abgeschaltet" }, |
770 | { "Filter selected: ","Gewählter Filter: " }, | 770 | { "Filter selected: ","Gewählter Filter: " }, |
771 | { "Toggle Cancel","Gecancelt ändern" }, | 771 | { "Toggle Cancel","Gecancelt ändern" }, |
772 | { "&Toggle Cancel","Gecancel&t ändern" }, | 772 | { "&Toggle Cancel","Gecancel&t ändern" }, |
773 | { "Configure Toolbar","Konfiguriere Toolbar" }, | 773 | { "Configure Toolbar","Konfiguriere Toolbar" }, |
774 | { "Stretched TB","Gedehnte TB" }, | 774 | { "Stretched TB","Gedehnte TB" }, |
775 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, | 775 | { "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, |
776 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, | 776 | { "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, |
777 | { "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" }, | 777 | { "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" }, |
778 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, | 778 | { "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, |
779 | { "Imported file successfully","Datei erfolgreich importiert" }, | 779 | { "Imported file successfully","Datei erfolgreich importiert" }, |
780 | { "Error importing file","Fehler beim Importieren der Datei" }, | 780 | { "Error importing file","Fehler beim Importieren der Datei" }, |
781 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, | 781 | { "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, |
782 | { "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" }, | 782 | { "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" }, |
783 | { "Overwrite!","Überschreiben!" }, | 783 | { "Overwrite!","Überschreiben!" }, |
784 | { "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" }, | 784 | { "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" }, |
785 | { "Load backup filename","Lade Backup Dateiname" }, | 785 | { "Load backup filename","Lade Backup Dateiname" }, |
786 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, | 786 | { "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, |
787 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, | 787 | { "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, |
788 | { "Save backup filename","Speichere Backup Dateiname" }, | 788 | { "Save backup filename","Speichere Backup Dateiname" }, |
789 | { "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" }, | 789 | { "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" }, |
790 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, | 790 | { "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, |
791 | { "Details of attendee","Teilnehmerdetails" }, | 791 | { "Details of attendee","Teilnehmerdetails" }, |
792 | { "Work phone:\n","Telefon Arbeit:\n" }, | 792 | { "Work phone:\n","Telefon Arbeit:\n" }, |
793 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, | 793 | { "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, |
794 | { "Home phone:\n","Telefon privat:\n" }, | 794 | { "Home phone:\n","Telefon privat:\n" }, |
795 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, | 795 | { "Mobile home phone:\n","Mobiltelefon privat:\n" }, |
796 | { "Email:\n","Email:\n" }, | 796 | { "Email:\n","Email:\n" }, |
797 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, | 797 | { "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, |
798 | { "Audio Al.: ","Audio Al.: " }, | 798 | { "Audio Al.: ","Audio Al.: " }, |
799 | { "Proc.Al.: ","Proz.Al.: " }, | 799 | { "Proc.Al.: ","Proz.Al.: " }, |
800 | { "No sound set","Kein Sound definiert" }, | 800 | { "No sound set","Kein Sound definiert" }, |
801 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, | 801 | { "*.wav|Wav Files","*.wav|Wav Dateien" }, |
802 | { "No program set","Kein Programm definiert" }, | 802 | { "No program set","Kein Programm definiert" }, |
803 | { "Running '%1'","Ausführen '%1'" }, | 803 | { "Running '%1'","Ausführen '%1'" }, |
804 | { "Playing '%1'","Abspielen '%1'" }, | 804 | { "Playing '%1'","Abspielen '%1'" }, |
805 | { "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" }, | 805 | { "Show Sync Events in WN/Agenda view","Zeige Sync Events in WN/Agenda Ansicht" }, |
806 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, | 806 | { "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, |
807 | { "Load!","Laden!" }, | 807 | { "Load!","Laden!" }, |
808 | { "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" }, | 808 | { "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" }, |
809 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, | 809 | { "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, |
810 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, | 810 | { "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, |
811 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, | 811 | { "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, |
812 | { "Features + hints...","Eigenschaften + Tipps..." }, | 812 | { "Features + hints...","Eigenschaften + Tipps..." }, |
813 | { "User translation...","Benutzer Übersetzung..." }, | 813 | { "User translation...","Benutzer Übersetzung..." }, |
814 | { "Sync HowTo...","Synchronisation HowTo..." }, | 814 | { "Sync HowTo...","Synchronisation HowTo..." }, |
815 | { "Print calendar...","Drucke Kalender..." }, | 815 | { "Print calendar...","Drucke Kalender..." }, |
816 | { "Anniversary","Jahrestag" }, | 816 | { "Anniversary","Jahrestag" }, |
817 | { "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" }, | 817 | { "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" }, |
818 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, | 818 | { "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, |
819 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, | 819 | { "Next recurrence is on: ","Nächste Wiederholung ist am:" }, |
820 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, | 820 | { "<b>Alarm on: </b>","<b>Alarm am: </b>" }, |
821 | { "<b>Access: </b>","<b>Zugriff: </b>" }, | 821 | { "<b>Access: </b>","<b>Zugriff: </b>" }, |
822 | { "(%1 min before)","(%1 min vorher)" }, | 822 | { "(%1 min before)","(%1 min vorher)" }, |
823 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, | 823 | { "<b>Categories: </b>","<b>Kategorien: </b>" }, |
824 | { "Save Journal/Description...","Speichere Journal/Details..." }, | 824 | { "Save Journal/Description...","Speichere Journal/Details..." }, |
825 | { "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." }, | 825 | { "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." }, |
826 | { "Continue","Weitermachen" }, | 826 | { "Continue","Weitermachen" }, |
827 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, | 827 | { " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, |
828 | { "Attendee:","Teilnehmer:" }, | 828 | { "Attendee:","Teilnehmer:" }, |
829 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, | 829 | { "Click OK to search ->","Klicke zum Suchen auf OK ->" }, |
830 | { "On day ","Am Tag " }, | 830 | { "On day ","Am Tag " }, |
831 | { "%1 of ","%1 des Monats" }, | 831 | { "%1 of ","%1 des Monats" }, |
832 | { "%1 of the year","%1 des Jahres" }, | 832 | { "%1 of the year","%1 des Jahres" }, |
833 | { "Anonymous","Anonymo" }, | 833 | { "Anonymous","Anonymo" }, |
834 | { "nobody@nowhere","niemand@nirgendwo" }, | 834 | { "nobody@nowhere","niemand@nirgendwo" }, |
835 | { "calendar.html","calendar.html" }, | 835 | { "calendar.html","calendar.html" }, |
836 | { " Local Time"," Locale Zeit" }, | 836 | { " Local Time"," Locale Zeit" }, |
837 | { "Unknown Name","Unbekannter Name" }, | 837 | { "Unknown Name","Unbekannter Name" }, |
838 | { "unknown@nowhere","unbekannt@nirgendwo" }, | 838 | { "unknown@nowhere","unbekannt@nirgendwo" }, |
839 | { "Beam via IR!","Beam via IR!" }, | 839 | { "Beam via IR!","Beam via IR!" }, |
840 | { "Next Month","Nächster Monat" }, | 840 | { "Next Month","Nächster Monat" }, |
841 | { "Prio","Prio" }, | 841 | { "Prio","Prio" }, |
842 | { "Reparent Todo","Mache Sub-Todo" }, | 842 | { "Reparent Todo","Mache Sub-Todo" }, |
843 | { "tomorrow","morgen" }, | 843 | { "tomorrow","morgen" }, |
844 | { "today","heute" }, | 844 | { "today","heute" }, |
845 | { "yesterday","gestern" }, | 845 | { "yesterday","gestern" }, |
846 | { "Ok","Ok" }, | 846 | { "Ok","Ok" }, |
847 | { "Ok+Agenda","Ok+Agenda" }, | 847 | { "Ok+Agenda","Ok+Agenda" }, |
848 | { "Email","Email" }, | 848 | { "Email","Email" }, |
849 | { "RSVP","RSVP" }, | 849 | { "RSVP","RSVP" }, |
850 | { "Email:","Email:" }, | 850 | { "Email:","Email:" }, |
851 | { "Appointment Time ","Termin Zeit " }, | 851 | { "Appointment Time ","Termin Zeit " }, |
852 | { "2","2" }, | 852 | { "2","2" }, |
853 | { "3","3" }, | 853 | { "3","3" }, |
854 | { "4","4" }, | 854 | { "4","4" }, |
855 | { " 0 %"," 0 %" }, | 855 | { " 0 %"," 0 %" }, |
856 | { " 20 %"," 20 %" }, | 856 | { " 20 %"," 20 %" }, |
857 | { " 40 %"," 40 %" }, | 857 | { " 40 %"," 40 %" }, |
858 | { " 60 %"," 60 %" }, | 858 | { " 60 %"," 60 %" }, |
859 | { " 80 %"," 80 %" }, | 859 | { " 80 %"," 80 %" }, |
860 | { "100 %","100 %" }, | 860 | { "100 %","100 %" }, |
861 | { "Filter","Filter" }, | 861 | { "Filter","Filter" }, |
862 | { "Configure","Konfiguriere" }, | 862 | { "Configure","Konfiguriere" }, |
863 | { "What's Next","What's Next" }, | 863 | { "What's Next","What's Next" }, |
864 | { "Complete calendar...","Kompletten Kalender..." }, | 864 | { "Complete calendar...","Kompletten Kalender..." }, |
865 | { "Filtered calendar...","Gefilterten Kalender..." }, | 865 | { "Filtered calendar...","Gefilterten Kalender..." }, |
866 | { "Export to phone","Exportiere zum Handy" }, | 866 | { "Export to phone","Exportiere zum Handy" }, |
867 | { "Beam receive enabled","Beam Empfang an" }, | 867 | { "Beam receive enabled","Beam Empfang an" }, |
868 | { "What's new?","Was ist neu?" }, | 868 | { "What's new?","Was ist neu?" }, |
869 | { "FAQ...","FAQ..." }, | 869 | { "FAQ...","FAQ..." }, |
870 | { "Licence...","Licence..." }, | 870 | { "Licence...","Licence..." }, |
871 | { "What's This?","What's This?" }, | 871 | { "What's This?","What's This?" }, |
872 | { "&Edit...","&Editiere..." }, | 872 | { "&Edit...","&Editiere..." }, |
873 | { "Oktober","Oktober" }, | 873 | { "Oktober","Oktober" }, |
874 | { "Title","Titel" }, | 874 | { "Title","Titel" }, |
875 | { "%1 %","%1 %" }, | 875 | { "%1 %","%1 %" }, |
876 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, | 876 | { "Enable Pi-Sync","Schalte Pi-Sync an" }, |
877 | { "Import!","Importiere!" }, | 877 | { "Import!","Importiere!" }, |
878 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, | 878 | { "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, |
879 | { "Export to phone options","Export ans Handy Optionen" }, | 879 | { "Export to phone options","Export ans Handy Optionen" }, |
880 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, | 880 | { "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, |
881 | { "I/O device: ","I/O device: " }, | 881 | { "I/O device: ","I/O device: " }, |
882 | { "Connection: ","Connection: " }, | 882 | { "Connection: ","Connection: " }, |
883 | { "Model(opt.): ","Model(opt.): " }, | 883 | { "Model(opt.): ","Model(opt.): " }, |
884 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, | 884 | { "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, |
885 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, | 885 | { "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, |
886 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" }, | 886 | { "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nToDo/Kalender Daten auf dem Handy!" }, |
887 | { "Export to mobile phone!","Exportiere auf das Handy!" }, | 887 | { "Export to mobile phone!","Exportiere auf das Handy!" }, |
888 | { "Export complete calendar","Exportiere kompletten Kalender" }, | 888 | { "Export complete calendar","Exportiere kompletten Kalender" }, |
889 | { "Writing to phone...","Sende Daten ans Handy..." }, | 889 | { "Writing to phone...","Sende Daten ans Handy..." }, |
890 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, | 890 | { " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, |
891 | { "Retry","Nochmal versuchen" }, | 891 | { "Retry","Nochmal versuchen" }, |
892 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, | 892 | { "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, |
893 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, | 893 | { "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, |
894 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, | 894 | { "Error exporting to phone!","Fehler beim Export auf das Handy!" }, |
895 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, | 895 | { "Export filtered calendar","Exportiere gefilterten Kalender" }, |
896 | { "Preferences","Vorlieben" }, | 896 | { "Preferences","Vorlieben" }, |
897 | { "Global","Global" }, | 897 | { "Global","Global" }, |
898 | { "Phone","Phone" }, | 898 | { "Phone","Phone" }, |
899 | { "SMS","SMS" }, | 899 | { "SMS","SMS" }, |
900 | { "Fax","Fax" }, | 900 | { "Fax","Fax" }, |
901 | { "Pager","Pager" }, | 901 | { "Pager","Pager" }, |
902 | { "SIP","SIP" }, | 902 | { "SIP","SIP" }, |
903 | { "Italian","Italienisch" }, | 903 | { "Italian","Italienisch" }, |
904 | { "24:00","24:00" }, | 904 | { "24:00","24:00" }, |
905 | { "12:00am","12:00am" }, | 905 | { "12:00am","12:00am" }, |
906 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, | 906 | { "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, |
907 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, | 907 | { "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, |
908 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, | 908 | { "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, |
909 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, | 909 | { "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, |
910 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, | 910 | { "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, |
911 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, | 911 | { "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, |
912 | { "Used Mail Client","Benutzter Mail Client" }, | 912 | { "Used Mail Client","Benutzter Mail Client" }, |
913 | { "Channel:","Channel:" }, | 913 | { "Channel:","Channel:" }, |
914 | { "Message:","Message:" }, | 914 | { "Message:","Message:" }, |
915 | { "Parameters:","Parameter:" }, | 915 | { "Parameters:","Parameter:" }, |
916 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, | 916 | { "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, |
917 | { "extra Message:","extra Message:" }, | 917 | { "extra Message:","extra Message:" }, |
918 | { "extra Parameters:","extra Parameter:" }, | 918 | { "extra Parameters:","extra Parameter:" }, |
919 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, | 919 | { "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, |
920 | { "External Apps.","Externe Appl." }, | 920 | { "External Apps.","Externe Appl." }, |
921 | { "24 hours","24 Std." }, | 921 | { "24 hours","24 Std." }, |
922 | { "3 hours","3 Std." }, | 922 | { "3 hours","3 Std." }, |
923 | { "1 hour","1 Std." }, | 923 | { "1 hour","1 Std." }, |
924 | { "15 minutes","15 Min." }, | 924 | { "15 minutes","15 Min." }, |
925 | { "5 minutes","5 Min." }, | 925 | { "5 minutes","5 Min." }, |
926 | { "1 minute","1 Min." }, | 926 | { "1 minute","1 Min." }, |
927 | { "23","23" }, | 927 | { "23","23" }, |
928 | { "Mon 15","Mon 15" }, | 928 | { "Mon 15","Mon 15" }, |
929 | { "Configure KO","Konfiguriere KO" }, | 929 | { "Configure KO","Konfiguriere KO" }, |
930 | { "Event text","Termin Text" }, | 930 | { "Event text","Termin Text" }, |
931 | { "ToDo","ToDo" }, | 931 | { "ToDo","ToDo" }, |
932 | { "Today","Heute" }, | 932 | { "Today","Heute" }, |
933 | { "What's Next View","What's Next Ansicht" }, | 933 | { "What's Next View","What's Next Ansicht" }, |
934 | { "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" }, | 934 | { "Show Sync Events in \nWhat's Next/Agenda view","Zeige Sync Termine in \nWhat's Next/Agenda view" }, |
935 | { "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" }, | 935 | { "Use short date in \nWhat's Next/Event view","Zeige Kurzdatum in \nWhat's Next/Event view" }, |
936 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, | 936 | { "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, |
937 | { "Alarm","Alarm" }, | 937 | { "Alarm","Alarm" }, |
938 | { "Used %1 Client","Benutzter %1 Client" }, | 938 | { "Used %1 Client","Benutzter %1 Client" }, |
939 | { "No email client installed","Kein Email Klient installiert" }, | 939 | { "No email client installed","Kein Email Klient installiert" }, |
940 | { "Userdefined email client","Benutzerdef. Email Klient" }, | 940 | { "Userdefined email client","Benutzerdef. Email Klient" }, |
941 | { "OM/Pi email client","OM/Pi Email Klient" }, | 941 | { "OM/Pi email client","OM/Pi Email Klient" }, |
942 | { "Include in multiple ","Beziehe in multiple " }, | 942 | { "Include in multiple ","Beziehe in multiple " }, |
943 | { "calendar ","Kalender " }, | 943 | { "calendar ","Kalender " }, |
944 | { "addressbook ","Adressbuch " }, | 944 | { "addressbook ","Adressbuch " }, |
945 | { "pwmanager","PWmanager" }, | 945 | { "pwmanager","PWmanager" }, |
946 | { " sync"," Sync ein" }, | 946 | { " sync"," Sync ein" }, |
947 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, | 947 | { "Write back synced data","Schreibe gesyncte Daten zurück" }, |
948 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, | 948 | { "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, |
949 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, | 949 | { "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, |
950 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, | 950 | { "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, |
951 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, | 951 | { "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, |
952 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, | 952 | { "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, |
953 | { "Help...","Hilfe..." }, | 953 | { "Help...","Hilfe..." }, |
954 | { "Local file Cal:","Lokale Datei Kal:" }, | 954 | { "Local file Cal:","Lokale Datei Kal:" }, |
955 | { "Local file ABook:","Lokale Datei ABuch:" }, | 955 | { "Local file ABook:","Lokale Datei ABuch:" }, |
956 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, | 956 | { "Local file PWMgr:","Lokale Datei PWMgr:" }, |
957 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, | 957 | { "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, |
958 | { "Calendar:","Kalender:" }, | 958 | { "Calendar:","Kalender:" }, |
959 | { "AddressBook:","AdressBuch:" }, | 959 | { "AddressBook:","AdressBuch:" }, |
960 | { "PWManager:","PWManager:" }, | 960 | { "PWManager:","PWManager:" }, |
961 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, | 961 | { "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, |
962 | { "ssh/scp","ssh/scp" }, | 962 | { "ssh/scp","ssh/scp" }, |
963 | { "ftp","ftp" }, | 963 | { "ftp","ftp" }, |
964 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, | 964 | { "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, |
965 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, | 965 | { "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, |
966 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, | 966 | { "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, |
967 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, | 967 | { "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, |
968 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, | 968 | { "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, |
969 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, | 969 | { "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, |
970 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, | 970 | { "KDE-Pim sync config","KDE-Pim sync Konfig" }, |
971 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, | 971 | { "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, |
972 | { "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" }, | 972 | { "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" }, |
973 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, | 973 | { "Port number (Default: %1)","Port Nummer (Default: %1)" }, |
974 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, | 974 | { "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, |
975 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, | 975 | { "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, |
976 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, | 976 | { "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, |
977 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, | 977 | { "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, |
978 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, | 978 | { "Disable Pi-Sync","Schalte Pi-Sync aus" }, |
979 | { "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!" }, | 979 | { "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!" }, |
980 | { "KDE-Pim Sync","KDE-Pim Sync" }, | 980 | { "KDE-Pim Sync","KDE-Pim Sync" }, |
981 | { "Multiple profiles","Multi-Sync Profile" }, | 981 | { "Multiple profiles","Multi-Sync Profile" }, |
982 | { "Device: ","Gerät: " }, | 982 | { "Device: ","Gerät: " }, |
983 | { "Multiple sync started.","Multi-Sync gestartet." }, | 983 | { "Multiple sync started.","Multi-Sync gestartet." }, |
984 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, | 984 | { "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, |
985 | { "Turn filter on","Schalte Filter an" }, | 985 | { "Turn filter on","Schalte Filter an" }, |
986 | { "Turn filter off","Schalte Filter aus" }, | 986 | { "Turn filter off","Schalte Filter aus" }, |
987 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, | 987 | { "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, |
988 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, | 988 | { "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, |
989 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, | 989 | { "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, |
990 | { "<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" }, | 990 | { "<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" }, |
991 | { "<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" }, | 991 | { "<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" }, |
992 | { "<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" }, | 992 | { "<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" }, |
993 | { "<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" }, | 993 | { "<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" }, |
994 | { "<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" }, | 994 | { "<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" }, |
995 | { "<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" }, | 995 | { "<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" }, |
996 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, | 996 | { "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, |
997 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, | 997 | { "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, |
998 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, | 998 | { "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, |
999 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, | 999 | { "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, |
1000 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, | 1000 | { "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, |
1001 | { "<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" }, | 1001 | { "<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" }, |
1002 | { "<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" }, | 1002 | { "<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" }, |
1003 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, | 1003 | { "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, |
1004 | { "<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" }, | 1004 | { "<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" }, |
1005 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, | 1005 | { "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, |
1006 | { "<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" }, | 1006 | { "<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" }, |
1007 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, | 1007 | { "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, |
1008 | { "<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" }, | 1008 | { "<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" }, |
1009 | { "<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" }, | 1009 | { "<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" }, |
1010 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, | 1010 | { "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, |
1011 | { "<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" }, | 1011 | { "<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" }, |
1012 | { "<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" }, | 1012 | { "<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" }, |
1013 | { "<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" }, | 1013 | { "<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" }, |
1014 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, | 1014 | { "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, |
1015 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, | 1015 | { "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, |
1016 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, | 1016 | { "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, |
1017 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, | 1017 | { "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, |
1018 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, | 1018 | { "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, |
1019 | { "<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" }, | 1019 | { "<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" }, |
1020 | { "<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" }, | 1020 | { "<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" }, |
1021 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, | 1021 | { "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, |
1022 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, | 1022 | { "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, |
1023 | { "<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" }, | 1023 | { "<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" }, |
1024 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datumsnavigator</p>\n" }, | 1024 | { "<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X</b>: Zeige/verstecke Datumsnavigator</p>\n" }, |
1025 | { "<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" }, | 1025 | { "<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" }, |
1026 | { "<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" }, | 1026 | { "<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" }, |
1027 | { "<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" }, | 1027 | { "<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" }, |
1028 | { "<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" }, | 1028 | { "<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" }, |
1029 | { "<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" }, | 1029 | { "<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" }, |
1030 | { "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, | 1030 | { "<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ","<p><b>N</b>: Nächste-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, |
1031 | { "<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" }, | 1031 | { "<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" }, |
1032 | { "<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" }, | 1032 | { "<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" }, |
1033 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, | 1033 | { "<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n","<p><b>F</b>: Zeige/verstecke Filter Ansicht |<b>F+ctrl</b>: Editiere Filter </p>\n" }, |
1034 | { "<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" }, | 1034 | { "<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" }, |
1035 | { "<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" }, | 1035 | { "<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" }, |
1036 | { "<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" }, | 1036 | { "<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" }, |
1037 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, | 1037 | { "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, |
1038 | { "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" }, | 1038 | { "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" }, |
1039 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, | 1039 | { "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, |
1040 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, | 1040 | { "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, |
1041 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, | 1041 | { "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, |
1042 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, | 1042 | { "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, |
1043 | { "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" }, | 1043 | { "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" }, |
1044 | { "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" }, | 1044 | { "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" }, |
1045 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, | 1045 | { "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, |
1046 | { "KO/Pi FAQ","KO/Pi FAQ" }, | 1046 | { "KO/Pi FAQ","KO/Pi FAQ" }, |
1047 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, | 1047 | { "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, |
1048 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, | 1048 | { "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, |
1049 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, | 1049 | { "About KOrganizer/Pi","Über KOrganizer/Pi" }, |
1050 | { "From: ","Von: " }, | 1050 | { "From: ","Von: " }, |
1051 | { "Remove sync info","Entferne Sync Info" }, | 1051 | { "Remove sync info","Entferne Sync Info" }, |
1052 | { "For all profiles","Für alle Profile" }, | 1052 | { "For all profiles","Für alle Profile" }, |
1053 | { "Hide not Running","Verstecke nicht Laufende" }, | 1053 | { "Hide not Running","Verstecke nicht Laufende" }, |
1054 | { "ME","ME" }, | 1054 | { "ME","ME" }, |
1055 | { "Toolbar","Toolbar" }, | 1055 | { "Toolbar","Toolbar" }, |
1056 | { "Undo Delete...","Löschen rückgängig machen..." }, | 1056 | { "Undo Delete...","Löschen rückgängig machen..." }, |
1057 | { "Undo Delete","Löschen rückgängig machen" }, | 1057 | { "Undo Delete","Löschen rückgängig machen" }, |
1058 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, | 1058 | { "KDE Sync HowTo...","KDE Sync HowTo..." }, |
1059 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, | 1059 | { "Multi Sync HowTo...","Multi Sync HowTo..." }, |
1060 | { "Januar","Januar" }, | 1060 | { "Januar","Januar" }, |
1061 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, | 1061 | { "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, |
1062 | { "No Filter","Kein Filter" }, | 1062 | { "No Filter","Kein Filter" }, |
1063 | { "Multiple Sync options","Multi Sync Optionen" }, | 1063 | { "Multiple Sync options","Multi Sync Optionen" }, |
1064 | { "Sync algo options","Sync Ablauf Optionen" }, | 1064 | { "Sync algo options","Sync Ablauf Optionen" }, |
1065 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, | 1065 | { "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, |
1066 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, | 1066 | { "Incoming calendar filter:","Eingehender Kalender Filter:" }, |
1067 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, | 1067 | { "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, |
1068 | { "Write back options","Optionen zum Zurückschreiben" }, | 1068 | { "Write back options","Optionen zum Zurückschreiben" }, |
1069 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, | 1069 | { "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, |
1070 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, | 1070 | { "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, |
1071 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, | 1071 | { "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, |
1072 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, | 1072 | { "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, |
1073 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, | 1073 | { "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, |
1074 | { "Time period","Zeitspanne" }, | 1074 | { "Time period","Zeitspanne" }, |
1075 | { "From ","Von " }, | 1075 | { "From ","Von " }, |
1076 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, | 1076 | { " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, |
1077 | { " weeks in the future "," Wochen in der Zukunft " }, | 1077 | { " weeks in the future "," Wochen in der Zukunft " }, |
1078 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, | 1078 | { "Profile kind specific settings","Profil Art abhängige Einstellungen" }, |
1079 | { "Local temp file:","Lokale temp Datei:" }, | 1079 | { "Local temp file:","Lokale temp Datei:" }, |
1080 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, | 1080 | { "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, |
1081 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, | 1081 | { "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, |
1082 | { "Language","Sprache" }, | 1082 | { "Language","Sprache" }, |
1083 | { "Time Format","Zeit Format" }, | 1083 | { "Time Format","Zeit Format" }, |
1084 | { "Time Zone","Zeit Zone" }, | 1084 | { "Time Zone","Zeit Zone" }, |
1085 | { "%1 groups subscribed","%1 Guppen abboniert" }, | 1085 | { "%1 groups subscribed","%1 Guppen abboniert" }, |
1086 | { "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" }, | 1086 | { "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" }, |
1087 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, | 1087 | { "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, |
1088 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, | 1088 | { "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, |
1089 | { "Save settings","Speichere Einstellungen" }, | 1089 | { "Save settings","Speichere Einstellungen" }, |
1090 | { "Save standard","Speichere Standard" }, | 1090 | { "Save standard","Speichere Standard" }, |
1091 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, | 1091 | { "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, |
1092 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, | 1092 | { "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, |
1093 | { "Data storage path","Daten Speicherpfad" }, | 1093 | { "Data storage path","Daten Speicherpfad" }, |
1094 | { "Language","Sprache" }, | 1094 | { "Language","Sprache" }, |
1095 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, | 1095 | { "Show time in agenda items","Zeige Zeit in Agenda Items" }, |
1096 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, | 1096 | { "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, |
1097 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, | 1097 | { "Show events, that are done in \nWhat's Next view","Zeige abgelaufene Termine in\nWhat's Next Ansicht" }, |
1098 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, | 1098 | { "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, |
1099 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, | 1099 | { "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, |
1100 | { "KO/Pi","KO/Pi" }, | 1100 | { "KO/Pi","KO/Pi" }, |
1101 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, | 1101 | { "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, |
1102 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, | 1102 | { "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, |
1103 | { "Sound.Al.: ","Sound.Al.: " }, | 1103 | { "Sound.Al.: ","Sound.Al.: " }, |
1104 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, | 1104 | { "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, |
1105 | { "Restore","Wiederherstellen" }, | 1105 | { "Restore","Wiederherstellen" }, |
1106 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, | 1106 | { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, |
1107 | { "% completed","% erledigt" }, | 1107 | { "% completed","% erledigt" }, |
1108 | { "%d item(s) found.","%d Item(s) gefunden." }, | 1108 | { "%d item(s) found.","%d Item(s) gefunden." }, |
1109 | { "Set complete","Setze auf erledigt" }, | 1109 | { "Set complete","Setze auf erledigt" }, |
1110 | { "(cancelled)","(gecancelt)" }, | 1110 | { "(cancelled)","(gecancelt)" }, |
1111 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, | 1111 | { "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, |
1112 | { " Local time "," Locale Zeit " }, | 1112 | { " Local time "," Locale Zeit " }, |
1113 | { "Form2","Form2" }, | 1113 | { "Form2","Form2" }, |
1114 | { "Filter enabled","Filter angeschaltet" }, | 1114 | { "Filter enabled","Filter angeschaltet" }, |
1115 | { "Edit Filters","Ändere Filter" }, | 1115 | { "Edit Filters","Ändere Filter" }, |
1116 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, | 1116 | { "Print What's Next View...","Drucke What's Next Ansicht..." }, |
1117 | { "Agenda","Agenda" }, | 1117 | { "Agenda","Agenda" }, |
1118 | { " ("," (" }, | 1118 | { " ("," (" }, |
1119 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, | 1119 | { "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, |
1120 | { "Print","Print" }, | 1120 | { "Print","Print" }, |
1121 | { "&Setup Printer...","Drucker &Setup..." }, | 1121 | { "&Setup Printer...","Drucker &Setup..." }, |
1122 | { "View Type","Zeige Typ" }, | 1122 | { "View Type","Zeige Typ" }, |
1123 | { "Page &orientation:","Seiten Ausrichtung:" }, | 1123 | { "Page &orientation:","Seiten Ausrichtung:" }, |
1124 | { "Use Default of Selected Style","Default des selektierten Stils" }, | 1124 | { "Use Default of Selected Style","Default des selektierten Stils" }, |
1125 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, | 1125 | { "Use Default Setting of Printer","Default Einstellung des Druckers" }, |
1126 | { "Portrait","Portrait" }, | 1126 | { "Portrait","Portrait" }, |
1127 | { "Landscape","Landschaft" }, | 1127 | { "Landscape","Landschaft" }, |
1128 | { "Print day","Drucke Tag" }, | 1128 | { "Print day","Drucke Tag" }, |
1129 | { "CalPrintDay_Base","CalPrintDay_Base" }, | 1129 | { "CalPrintDay_Base","CalPrintDay_Base" }, |
1130 | { "Date && Time Range","Datum && Zeitspanne" }, | 1130 | { "Date && Time Range","Datum && Zeitspanne" }, |
1131 | { "&End date:","&Enddatum:" }, | 1131 | { "&End date:","&Enddatum:" }, |
1132 | { "&Start date:","&Startdatum:" }, | 1132 | { "&Start date:","&Startdatum:" }, |
1133 | { "Start &time:","Startzeit:" }, | 1133 | { "Start &time:","Startzeit:" }, |
1134 | { "End ti&me:","Endzeit:" }, | 1134 | { "End ti&me:","Endzeit:" }, |
1135 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, | 1135 | { "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, |
1136 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, | 1136 | { "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, |
1137 | { "Alt+D","Alt+D" }, | 1137 | { "Alt+D","Alt+D" }, |
1138 | { "&Use colors","Nutze Farben" }, | 1138 | { "&Use colors","Nutze Farben" }, |
1139 | { "Alt+U","Alt+U" }, | 1139 | { "Alt+U","Alt+U" }, |
1140 | { "Print week","Drucke Woche" }, | 1140 | { "Print week","Drucke Woche" }, |
1141 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, | 1141 | { "CalPrintWeek_Base","CalPrintWeek_Base" }, |
1142 | { "Use &colors","Nutze Farben" }, | 1142 | { "Use &colors","Nutze Farben" }, |
1143 | { "Type of View","Typ der Ansicht" }, | 1143 | { "Type of View","Typ der Ansicht" }, |
1144 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, | 1144 | { "Print as &Filofax page","Drucke als &Filofax Seite" }, |
1145 | { "Alt+F","Alt+F" }, | 1145 | { "Alt+F","Alt+F" }, |
1146 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, | 1146 | { "Print as &timetable view:","Drucke als Zeittabelle:" }, |
1147 | { "Alt+T","Alt+T" }, | 1147 | { "Alt+T","Alt+T" }, |
1148 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, | 1148 | { "Print as split week view","Drucke als gesplittete Wochenansicht" }, |
1149 | { "Print month","Drucke Monat" }, | 1149 | { "Print month","Drucke Monat" }, |
1150 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, | 1150 | { "CalPrintMonth_Base","CalPrintMonth_Base" }, |
1151 | { "&Start month:","&Startmonat:" }, | 1151 | { "&Start month:","&Startmonat:" }, |
1152 | { "&End month:","&Endmonat:" }, | 1152 | { "&End month:","&Endmonat:" }, |
1153 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, | 1153 | { "Print week &numbers","Drucke Wochen Nummer(n)" }, |
1154 | { "Print todos","Drucke Todos" }, | 1154 | { "Print todos","Drucke Todos" }, |
1155 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, | 1155 | { "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, |
1156 | { "Include &description of the item","Inclusive Itembeschreibung" }, | 1156 | { "Include &description of the item","Inclusive Itembeschreibung" }, |
1157 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, | 1157 | { "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, |
1158 | { "Include &priority of the item","Inclusive Priorität des Items" }, | 1158 | { "Include &priority of the item","Inclusive Priorität des Items" }, |
1159 | { "Items to Print","Zu druckende Items" }, | 1159 | { "Items to Print","Zu druckende Items" }, |
1160 | { "&From:","Von:" }, | 1160 | { "&From:","Von:" }, |
1161 | { "&To:","Bis:" }, | 1161 | { "&To:","Bis:" }, |
1162 | { "Print &all todo items","Drucke alle Todo Items" }, | 1162 | { "Print &all todo items","Drucke alle Todo Items" }, |
1163 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, | 1163 | { "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, |
1164 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, | 1164 | { "Only items due in the &range:","Nur Items in dem Zeitraum:" }, |
1165 | { "Todo List","Todo Liste" }, | 1165 | { "Todo List","Todo Liste" }, |
1166 | { "&Title:","&Titel:" }, | 1166 | { "&Title:","&Titel:" }, |
1167 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, | 1167 | { "Co&nnect subtodos with its parent","Verbinde Unter-Todos mit ihren Ober-Todos" }, |
1168 | { "Todo list","Todo Liste" }, | 1168 | { "Todo list","Todo Liste" }, |
1169 | { "&Print...","Drucke..." }, | 1169 | { "&Print...","Drucke..." }, |
1170 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1170 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1171 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1171 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1172 | { "OK","OK" }, | 1172 | { "OK","OK" }, |
1173 | { "FilterEditor","FilterEditor" }, | 1173 | { "FilterEditor","FilterEditor" }, |
1174 | { "Include","Inclusive" }, | 1174 | { "Include","Inclusive" }, |
1175 | { "Exclude","Exclusive" }, | 1175 | { "Exclude","Exclusive" }, |
1176 | { "Edit Selection...","Editiere Auswahl" }, | 1176 | { "Edit Selection...","Editiere Auswahl" }, |
1177 | { "recurring events","wiederholende Termine" }, | 1177 | { "recurring events","wiederholende Termine" }, |
1178 | { "recurr. events","wiederh.Termine" }, | 1178 | { "recurr. events","wiederh.Termine" }, |
1179 | { "completed to-dos","erledigte Todos" }, | 1179 | { "completed to-dos","erledigte Todos" }, |
1180 | { "events","Termine" }, | 1180 | { "events","Termine" }, |
1181 | { "todos","Todos" }, | 1181 | { "todos","Todos" }, |
1182 | { "journals","Journale" }, | 1182 | { "journals","Journale" }, |
1183 | { "public","öffentl." }, | 1183 | { "public","öffentl." }, |
1184 | { "private","privat" }, | 1184 | { "private","privat" }, |
1185 | { "confidential","vertraul." }, | 1185 | { "confidential","vertraul." }, |
1186 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, | 1186 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, |
1187 | { "Yesterday","Gestern" }, | 1187 | { "Yesterday","Gestern" }, |
1188 | { "Day after tomorrow","Übermorgen" }, | 1188 | { "Day after tomorrow","Übermorgen" }, |
1189 | { "Tomorrow","Morgen" }, | 1189 | { "Tomorrow","Morgen" }, |
1190 | { "Day before yesterday","Vorgestern" }, | 1190 | { "Day before yesterday","Vorgestern" }, |
1191 | { "Size %1","Größe %1" }, | 1191 | { "Size %1","Größe %1" }, |
1192 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1192 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1193 | { " (%1 y.)"," (%1 J.)" }, | 1193 | { " (%1 y.)"," (%1 J.)" }, |
1194 | { "Allday:","Ganztägig:" }, | 1194 | { "Allday:","Ganztägig:" }, |
1195 | { "compl.todos","erled.Todos" }, | 1195 | { "compl.todos","erled.Todos" }, |
1196 | { "Day view","Tagesansicht" }, | 1196 | { "Day view","Tagesansicht" }, |
1197 | { "Next days","Nächste Tage" }, | 1197 | { "Next days","Nächste Tage" }, |
1198 | { "Next week","Nächste Woche" }, | 1198 | { "Next week","Nächste Woche" }, |
1199 | { "Next two weeks","Nächste zwei Wochen" }, | 1199 | { "Next two weeks","Nächste zwei Wochen" }, |
1200 | { "Next month","Nächster Monat" }, | 1200 | { "Next month","Nächster Monat" }, |
1201 | { "Journal view","Journal" }, | 1201 | { "Journal view","Journal" }, |
1202 | { "Display all opened","Zeige alle geöffnet" }, | 1202 | { "Display all opened","Zeige alle geöffnet" }, |
1203 | { "Display all closed","Zeige alle geschlossen" }, | 1203 | { "Display all closed","Zeige alle geschlossen" }, |
1204 | { "Display all flat","Zeige alle flach" }, | 1204 | { "Display all flat","Zeige alle flach" }, |
1205 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, | 1205 | { "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, |
1206 | { "Default todo done color:","Standard Todo erledigt Farbe" }, | 1206 | { "Default todo done color:","Standard Todo erledigt Farbe" }, |
1207 | { "Select week %1-%2","Wähle Woche %1-%2" }, | 1207 | { "Select week %1-%2","Wähle Woche %1-%2" }, |
1208 | { "Select Week","Wähle Woche" }, | 1208 | { "Select Week","Wähle Woche" }, |
1209 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, | 1209 | { "Set alarm for selected...","Setze Alarm für Selekt..." }, |
1210 | { "Set Alarm!","Setze Alarm!" }, | 1210 | { "Set Alarm!","Setze Alarm!" }, |
1211 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, | 1211 | { "Canged alarm for %1 items","Alarm für %1 Items geändert" }, |
1212 | { " and "," und " }, | 1212 | { " and "," und " }, |
1213 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, | 1213 | { "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, |
1214 | { "Mail to selected","Mail an Ausgewählte" }, | 1214 | { "Mail to selected","Mail an Ausgewählte" }, |
1215 | { "Mail to all","Mail an Alle" }, | 1215 | { "Mail to all","Mail an Alle" }, |
1216 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1216 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1217 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1217 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1218 | { " on"," am" }, | 1218 | { " on"," am" }, |
1219 | { " completed on "," erledigt am " }, | 1219 | { " completed on "," erledigt am " }, |
1220 | { "Save as Event template","Speichere als Vorlage" }, | 1220 | { "Save as Event template","Speichere als Vorlage" }, |
1221 | { "Load Event template","Lade Termin Vorlage" }, | 1221 | { "Load Event template","Lade Termin Vorlage" }, |
1222 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1222 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1223 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1223 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1224 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1224 | { "Sub todos:<br>","Unter Todos:<br>" }, |
1225 | { "Parent todo:<br>","Über Todo:<br>" }, | 1225 | { "Parent todo:<br>","Über Todo:<br>" }, |
1226 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1226 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1227 | { " completed"," erledigt" }, | 1227 | { " completed"," erledigt" }, |
1228 | { "(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!" }, | 1228 | { "(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!" }, |
1229 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1229 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1230 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1230 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1231 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1231 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1232 | { "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?" }, | 1232 | { "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?" }, |
1233 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1233 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
1234 | { "Error","Fehler" }, | 1234 | { "Error","Fehler" }, |
1235 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, | 1235 | { ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, |
1236 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, | 1236 | { "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, |
1237 | { "Warning","Warnung" }, | 1237 | { "Warning","Warnung" }, |
1238 | { "Select week number","Wähle Wochen Nummer" }, | 1238 | { "Select week number","Wähle Wochen Nummer" }, |
1239 | { "Februar","Februar" }, | 1239 | { "Februar","Februar" }, |
1240 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, | 1240 | { "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, |
1241 | { "W","W" }, | 1241 | { "W","W" }, |
1242 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, | 1242 | { "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, |
1243 | { "T: %1","T: %1" }, | 1243 | { "T: %1","T: %1" }, |
1244 | { "Start: ","Start: " }, | 1244 | { "Start: ","Start: " }, |
1245 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, | 1245 | { "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, |
1246 | { "Password for remote access:","Passwort für fernen Zugriff:" }, | 1246 | { "Password for remote access:","Passwort für fernen Zugriff:" }, |
1247 | { "Remote IP address:","Ferne IP Adresse:" }, | 1247 | { "Remote IP address:","Ferne IP Adresse:" }, |
1248 | { "Remote port number:","Ferne Port Nummer:" }, | 1248 | { "Remote port number:","Ferne Port Nummer:" }, |
1249 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, | 1249 | { "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, |
1250 | { "Remote from: ","Fern von: " }, | 1250 | { "Remote from: ","Fern von: " }, |
1251 | { "Local from: ","Lokal von: " }, | 1251 | { "Local from: ","Lokal von: " }, |
1252 | { "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" }, | 1252 | { "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" }, |
1253 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, | 1253 | { "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, |
1254 | { "Write back","Schreibe zurück" }, | 1254 | { "Write back","Schreibe zurück" }, |
1255 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, | 1255 | { "KO/Pi Synchronization","KO/Pi Synchronisation" }, |
1256 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, | 1256 | { "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, |
1257 | { "Received sync request","Sync Anfrage erhalten" }, | 1257 | { "Received sync request","Sync Anfrage erhalten" }, |
1258 | { "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." }, | 1258 | { "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." }, |
1259 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, | 1259 | { "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, |
1260 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, | 1260 | { "Data saved to temp file!","Daten in temp Datei gespeichert!" }, |
1261 | { "Sending file...","Sende Datei..." }, | 1261 | { "Sending file...","Sende Datei..." }, |
1262 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, | 1262 | { "Waiting for synced file...","Warte auf gesyncte Daten..." }, |
1263 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, | 1263 | { "Receiving synced file...","Gesyncte Daten erhalten..." }, |
1264 | { "Received %1 bytes","%1 Bytes erhalten" }, | 1264 | { "Received %1 bytes","%1 Bytes erhalten" }, |
1265 | { "Writing file to disk...","Speichere Datei..." }, | 1265 | { "Writing file to disk...","Speichere Datei..." }, |
1266 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, | 1266 | { "Pi-Sync successful!","Pi-Sync erfolgreich!" }, |
1267 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, | 1267 | { "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, |
1268 | { "Synchronize!","Synchronisiere!" }, | 1268 | { "Synchronize!","Synchronisiere!" }, |
1269 | { "High clock skew!","Großer Uhrzeitunterschied!" }, | 1269 | { "High clock skew!","Großer Uhrzeitunterschied!" }, |
1270 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, | 1270 | { "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, |
1271 | { "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!" }, | 1271 | { "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!" }, |
1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, | 1272 | { "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, |
1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, | 1273 | { "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, |
1274 | { "List week view","Listenwochenansicht" }, | 1274 | { "List week view","Listenwochenansicht" }, |
1275 | { "List week","Listenwochenansicht" }, | 1275 | { "List week","Listenwochenansicht" }, |
1276 | { "Next Week","Nächste Woche" }, | 1276 | { "Next Week","Nächste Woche" }, |
1277 | { "Previous Week","Vorherige Woche" }, | 1277 | { "Previous Week","Vorherige Woche" }, |
1278 | { "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." }, | 1278 | { "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." }, |
1279 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, | 1279 | { "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, |
1280 | { "Details","Details" }, | 1280 | { "Details","Details" }, |
1281 | { "Created time","Erstellt Zeit" }, | 1281 | { "Created time","Erstellt Zeit" }, |
1282 | { "Last modified time","Geändert Zeit" }, | 1282 | { "Last modified time","Geändert Zeit" }, |
1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, | 1283 | { "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, |
1284 | { "View Options","Anzeige Optionen" }, | 1284 | { "View Options","Anzeige Optionen" }, |
1285 | { "<b>Created: ","<b>Erstellt am: " }, | 1285 | { "<b>Created: ","<b>Erstellt am: " }, |
1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, | 1286 | { "<b>Last modified: ","<b>Zuletzt geändert am: " }, |
1287 | { "Journal: ","Journal: " }, | 1287 | { "Journal: ","Journal: " }, |
1288 | { "yearly","jährlich" }, | 1288 | { "yearly","jährlich" }, |
1289 | { "(%1) ","%1-" }, | 1289 | { "(%1) ","%1-" }, |
1290 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, | 1290 | { "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, |
1291 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, | 1291 | { "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, |
1292 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, | 1292 | { "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, |
1293 | { "Summary/Loc.","Titel/Ort" }, | 1293 | { "Summary/Loc.","Titel/Ort" }, |
1294 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, | 1294 | { "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, |
1295 | { "Week Number","Wochennummer" }, | 1295 | { "Week Number","Wochennummer" }, |
1296 | { "Import","Importiere" }, | 1296 | { "Import","Importiere" }, |
1297 | { "Export","Exportiere" }, | 1297 | { "Export","Exportiere" }, |
1298 | { "Beam","Beame" }, | 1298 | { "Beam","Beame" }, |
1299 | { "Export selected","Exportiere Selektierte" }, | 1299 | { "Export selected","Exportiere Selektierte" }, |
1300 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, | 1300 | { "As iCal (ics) file...","Als iCal (ics) Datei..." }, |
1301 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, | 1301 | { "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, |
1302 | { "Journal/Details...","Journale/Details..." }, | 1302 | { "Journal/Details...","Journale/Details..." }, |
1303 | { "Agenda View","Agenda Ansicht" }, | 1303 | { "Agenda View","Agenda Ansicht" }, |
1304 | { "Show current time","Zeige aktuelle Zeit" }, | 1304 | { "Show current time","Zeige aktuelle Zeit" }, |
1305 | { "Edit new item","Bearbeite neuen Eintrag" }, | 1305 | { "Edit new item","Bearbeite neuen Eintrag" }, |
1306 | { "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" }, | 1306 | { "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" }, |
1307 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, | 1307 | { "There is no next alarm.","Es gibt keinen nächsten Alarm." }, |
1308 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, | 1308 | { "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, |
1309 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, | 1309 | { "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, |
1310 | { "%1 days\n","%1 Tagen\n" }, | 1310 | { "%1 days\n","%1 Tagen\n" }, |
1311 | { "1 day\n","1 Tag\n" }, | 1311 | { "1 day\n","1 Tag\n" }, |
1312 | { "%1 hours\n","%1 Stunden\n" }, | 1312 | { "%1 hours\n","%1 Stunden\n" }, |
1313 | { "1 hour\n","1 Stunde\n" }, | 1313 | { "1 hour\n","1 Stunde\n" }, |
1314 | { "%1 minutes\n","%1 Minuten\n" }, | 1314 | { "%1 minutes\n","%1 Minuten\n" }, |
1315 | { "1 minute\n","1 Minute\n" }, | 1315 | { "1 minute\n","1 Minute\n" }, |
1316 | { "Only one toolbar","Nur eine Toolbar" }, | 1316 | { "Only one toolbar","Nur eine Toolbar" }, |
1317 | { "Print","Drucke" }, | 1317 | { "Print","Drucke" }, |
1318 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, | 1318 | { "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, |
1319 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, | 1319 | { "There is nothing selected!","Es ist nichts ausgewählt!" }, |
1320 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, | 1320 | { "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, |
1321 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, | 1321 | { "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, |
1322 | { "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" }, | 1322 | { "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" }, |
1323 | { "KO/Pi Printout","KO/Pi Ausdruck" }, | 1323 | { "KO/Pi Printout","KO/Pi Ausdruck" }, |
1324 | { "Print unscaled","Drucke unskaliert" }, | 1324 | { "Print unscaled","Drucke unskaliert" }, |
1325 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, | 1325 | { "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, |
1326 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, | 1326 | { "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, |
1327 | { "Printout Mode","Druck Modus" }, | 1327 | { "Printout Mode","Druck Modus" }, |
1328 | { "","" }, | 1328 | { "Filter menu icon","Filtermenu Icon" }, |
1329 | { "","" }, | 1329 | { "","" }, |
1330 | { "","" }, | 1330 | { "","" }, |
1331 | { "","" }, \ No newline at end of file | 1331 | { "","" }, \ No newline at end of file |
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index b3429e3..648e780 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp | |||
@@ -1,309 +1,311 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkabc. | 2 | This file is part of libkabc. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library 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 GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <qlayout.h> | 21 | #include <qlayout.h> |
22 | #include <qpushbutton.h> | 22 | #include <qpushbutton.h> |
23 | #include <qgroupbox.h> | 23 | #include <qgroupbox.h> |
24 | #include <qapplication.h> | 24 | #include <qapplication.h> |
25 | #include <qregexp.h> | 25 | #include <qregexp.h> |
26 | #include <qvbox.h> | 26 | #include <qvbox.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | 28 | ||
29 | #include <klocale.h> | 29 | #include <klocale.h> |
30 | #include <kdebug.h> | 30 | #include <kdebug.h> |
31 | #include <kglobalsettings.h> | 31 | #include <kglobalsettings.h> |
32 | 32 | ||
33 | #include "stdaddressbook.h" | 33 | #include "stdaddressbook.h" |
34 | 34 | ||
35 | #include "addresseedialog.h" | 35 | #include "addresseedialog.h" |
36 | #include "KDGanttMinimizeSplitter.h" | 36 | #include "KDGanttMinimizeSplitter.h" |
37 | //#include "addresseedialog.moc" | 37 | //#include "addresseedialog.moc" |
38 | 38 | ||
39 | using namespace KABC; | 39 | using namespace KABC; |
40 | 40 | ||
41 | AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : | 41 | AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : |
42 | QListViewItem( parent ), | 42 | QListViewItem( parent ), |
43 | mAddressee( addressee ) | 43 | mAddressee( addressee ) |
44 | { | 44 | { |
45 | QString name = addressee.familyName()+", "+ addressee.givenName(); | 45 | QString name = addressee.familyName()+", "+ addressee.givenName(); |
46 | if ( name.length() == 2 ) | 46 | if ( name.length() == 2 ) |
47 | name = addressee.organization(); | 47 | name = addressee.organization(); |
48 | setText( Name,name); | 48 | setText( Name,name); |
49 | setText( Email, addressee.preferredEmail() ); | 49 | setText( Email, addressee.preferredEmail() ); |
50 | } | 50 | } |
51 | 51 | ||
52 | QString AddresseeItem::key( int column, bool ) const | 52 | QString AddresseeItem::key( int column, bool ) const |
53 | { | 53 | { |
54 | 54 | ||
55 | if (column == Email) { | 55 | if (column == Email) { |
56 | QString value = text(Email); | 56 | QString value = text(Email); |
57 | int val = value.findRev("@"); | 57 | int val = value.findRev("@"); |
58 | return value.mid( val) + value.left( val ); | 58 | return value.mid( val) + value.left( val ); |
59 | } | 59 | } |
60 | return text(column).lower(); | 60 | return text(column).lower(); |
61 | } | 61 | } |
62 | 62 | ||
63 | AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : | 63 | AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : |
64 | KDialogBase( KDialogBase::Plain, i18n("Select Addressee"), | 64 | KDialogBase( KDialogBase::Plain, i18n("Select Addressee"), |
65 | Ok|Cancel, No, parent ), mMultiple( multiple ) | 65 | Ok|Cancel, No, parent ), mMultiple( multiple ) |
66 | { | 66 | { |
67 | qDebug("NEW AddresseeDialog "); | ||
67 | QWidget *topWidget = plainPage(); | 68 | QWidget *topWidget = plainPage(); |
68 | 69 | ||
69 | QBoxLayout *topLayout = new QHBoxLayout( topWidget ); | 70 | QBoxLayout *topLayout = new QHBoxLayout( topWidget ); |
70 | 71 | ||
71 | 72 | ||
72 | KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, topWidget); | 73 | KDGanttMinimizeSplitter* mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, topWidget); |
73 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 74 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
74 | 75 | ||
75 | topLayout->addWidget(mMiniSplitter ); | 76 | topLayout->addWidget(mMiniSplitter ); |
76 | 77 | ||
77 | QWidget *listWidget = new QWidget( mMiniSplitter ); | 78 | QWidget *listWidget = new QWidget( mMiniSplitter ); |
78 | 79 | ||
79 | QBoxLayout *listLayout = new QVBoxLayout (listWidget) ; | 80 | QBoxLayout *listLayout = new QVBoxLayout (listWidget) ; |
80 | //topLayout->addLayout( listLayout ); | 81 | //topLayout->addLayout( listLayout ); |
81 | 82 | ||
82 | mAddresseeList = new KListView( listWidget ); | 83 | mAddresseeList = new KListView( listWidget ); |
83 | mAddresseeList->addColumn( i18n("Name") ); | 84 | mAddresseeList->addColumn( i18n("Name") ); |
84 | mAddresseeList->addColumn( i18n("Email") ); | 85 | mAddresseeList->addColumn( i18n("Email") ); |
85 | mAddresseeList->setAllColumnsShowFocus( true ); | 86 | mAddresseeList->setAllColumnsShowFocus( true ); |
86 | mAddresseeList->setFullWidth( true ); | 87 | mAddresseeList->setFullWidth( true ); |
87 | listLayout->addWidget( mAddresseeList ); | 88 | listLayout->addWidget( mAddresseeList ); |
88 | connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ), | 89 | connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ), |
89 | SLOT( slotOk() ) ); | 90 | SLOT( slotOk() ) ); |
90 | 91 | ||
91 | mAddresseeEdit = new QLineEdit( listWidget ); | 92 | mAddresseeEdit = new QLineEdit( listWidget ); |
92 | connect( mAddresseeEdit, SIGNAL( returnPressed() ), | 93 | connect( mAddresseeEdit, SIGNAL( returnPressed() ), |
93 | SLOT( loadAddressBook() ) ); | 94 | SLOT( loadAddressBook() ) ); |
94 | mAddresseeEdit->setFocus(); | 95 | mAddresseeEdit->setFocus(); |
95 | 96 | ||
96 | listLayout->addWidget( mAddresseeEdit ); | 97 | listLayout->addWidget( mAddresseeEdit ); |
97 | 98 | ||
98 | if ( mMultiple ) { | 99 | if ( mMultiple ) { |
99 | //QBoxLayout *selectedLayout = new QVBoxLayout; | 100 | //QBoxLayout *selectedLayout = new QVBoxLayout; |
100 | //topLayout->addLayout( selectedLayout ); | 101 | //topLayout->addLayout( selectedLayout ); |
101 | //topLayout->setSpacing( spacingHint() ); | 102 | //topLayout->setSpacing( spacingHint() ); |
102 | 103 | ||
103 | QVBox *selectedGroup = new QVBox( mMiniSplitter ); | 104 | QVBox *selectedGroup = new QVBox( mMiniSplitter ); |
104 | new QLabel ( i18n("Selected:"), selectedGroup ); | 105 | new QLabel ( i18n("Selected:"), selectedGroup ); |
105 | //selectedLayout->addWidget( selectedGroup ); | 106 | //selectedLayout->addWidget( selectedGroup ); |
106 | 107 | ||
107 | mSelectedList = new KListView( selectedGroup ); | 108 | mSelectedList = new KListView( selectedGroup ); |
108 | mSelectedList->addColumn( i18n("Name") ); | 109 | mSelectedList->addColumn( i18n("Name") ); |
109 | mSelectedList->addColumn( i18n("Email") ); | 110 | mSelectedList->addColumn( i18n("Email") ); |
110 | mSelectedList->setAllColumnsShowFocus( true ); | 111 | mSelectedList->setAllColumnsShowFocus( true ); |
111 | mSelectedList->setFullWidth( true ); | 112 | mSelectedList->setFullWidth( true ); |
112 | connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ), | 113 | connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ), |
113 | SLOT( removeSelected() ) ); | 114 | SLOT( removeSelected() ) ); |
114 | 115 | ||
115 | QPushButton *unselectButton = new QPushButton( i18n("Unselect"), selectedGroup ); | 116 | QPushButton *unselectButton = new QPushButton( i18n("Unselect"), selectedGroup ); |
116 | connect ( unselectButton, SIGNAL( clicked() ), SLOT( removeSelected() ) ); | 117 | connect ( unselectButton, SIGNAL( clicked() ), SLOT( removeSelected() ) ); |
117 | 118 | ||
118 | connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ), | 119 | connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ), |
119 | SLOT( addSelected( QListViewItem * ) ) ); | 120 | SLOT( addSelected( QListViewItem * ) ) ); |
120 | connect( mAddresseeList, SIGNAL( returnPressed( QListViewItem * ) ), | 121 | connect( mAddresseeList, SIGNAL( returnPressed( QListViewItem * ) ), |
121 | SLOT( selectNextItem( QListViewItem * ) ) ); | 122 | SLOT( selectNextItem( QListViewItem * ) ) ); |
122 | 123 | ||
123 | } | 124 | } |
124 | 125 | ||
125 | mAddressBook = StdAddressBook::self( true ); | 126 | mAddressBook = StdAddressBook::self( true ); |
126 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ), | 127 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ), |
127 | SLOT( addressBookChanged() ) ); | 128 | SLOT( addressBookChanged() ) ); |
128 | connect( mAddressBook, SIGNAL( loadingFinished( Resource* ) ), | 129 | connect( mAddressBook, SIGNAL( loadingFinished( Resource* ) ), |
129 | SLOT( addressBookChanged() ) ); | 130 | SLOT( addressBookChanged() ) ); |
130 | 131 | ||
131 | loadAddressBook(); | 132 | loadAddressBook(); |
132 | QValueList<int> splitterSize; | 133 | QValueList<int> splitterSize; |
133 | splitterSize.append( ( width() / 5 ) * 3 ); | 134 | splitterSize.append( ( width() / 5 ) * 3 ); |
134 | splitterSize.append( ( width() / 5 ) *2 ); | 135 | splitterSize.append( ( width() / 5 ) *2 ); |
135 | mMiniSplitter->setSizes( splitterSize ); | 136 | mMiniSplitter->setSizes( splitterSize ); |
136 | } | 137 | } |
137 | 138 | ||
138 | AddresseeDialog::~AddresseeDialog() | 139 | AddresseeDialog::~AddresseeDialog() |
139 | { | 140 | { |
141 | qDebug("DELETE AddresseeDialog "); | ||
140 | } | 142 | } |
141 | 143 | ||
142 | void AddresseeDialog::loadAddressBook() | 144 | void AddresseeDialog::loadAddressBook() |
143 | { | 145 | { |
144 | mAddresseeList->clear(); | 146 | mAddresseeList->clear(); |
145 | mItemDict.clear(); | 147 | mItemDict.clear(); |
146 | if ( mAddresseeEdit->text().isEmpty() ) { | 148 | if ( mAddresseeEdit->text().isEmpty() ) { |
147 | AddressBook::Iterator it; | 149 | AddressBook::Iterator it; |
148 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 150 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
149 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 151 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
150 | continue; | 152 | continue; |
151 | new AddresseeItem( mAddresseeList, (*it) ); | 153 | new AddresseeItem( mAddresseeList, (*it) ); |
152 | } | 154 | } |
153 | return; | 155 | return; |
154 | } | 156 | } |
155 | //mAddresseeEdit->completionObject()->clear(); | 157 | //mAddresseeEdit->completionObject()->clear(); |
156 | QRegExp re; | 158 | QRegExp re; |
157 | re.setWildcard(true); // most people understand these better. | 159 | re.setWildcard(true); // most people understand these better. |
158 | re.setCaseSensitive(false); | 160 | re.setCaseSensitive(false); |
159 | re.setPattern( "*"+ mAddresseeEdit->text() + "*"); | 161 | re.setPattern( "*"+ mAddresseeEdit->text() + "*"); |
160 | 162 | ||
161 | AddressBook::Iterator it; | 163 | AddressBook::Iterator it; |
162 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 164 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
163 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) | 165 | if ( (*it).uid().left(2) == "la" && (*it).uid().left(19) == QString("last-syncAddressee-") ) |
164 | continue; | 166 | continue; |
165 | QString name = (*it).familyName()+", "+ (*it).givenName(); | 167 | QString name = (*it).familyName()+", "+ (*it).givenName(); |
166 | if ( name.length() == 2 ) | 168 | if ( name.length() == 2 ) |
167 | name = (*it).realName(); | 169 | name = (*it).realName(); |
168 | name += (*it).preferredEmail(); | 170 | name += (*it).preferredEmail(); |
169 | #if QT_VERSION >= 0x030000 | 171 | #if QT_VERSION >= 0x030000 |
170 | if (re.search(name) != -1) | 172 | if (re.search(name) != -1) |
171 | #else | 173 | #else |
172 | if (re.match(name) != -1) | 174 | if (re.match(name) != -1) |
173 | #endif | 175 | #endif |
174 | AddresseeItem *item = new AddresseeItem( mAddresseeList, (*it) ); | 176 | AddresseeItem *item = new AddresseeItem( mAddresseeList, (*it) ); |
175 | } | 177 | } |
176 | } | 178 | } |
177 | 179 | ||
178 | void AddresseeDialog::addCompletionItem( const QString &str, QListViewItem *item ) | 180 | void AddresseeDialog::addCompletionItem( const QString &str, QListViewItem *item ) |
179 | { | 181 | { |
180 | if ( str.isEmpty() ) return; | 182 | if ( str.isEmpty() ) return; |
181 | 183 | ||
182 | mItemDict.insert( str, item ); | 184 | mItemDict.insert( str, item ); |
183 | //mAddresseeEdit->completionObject()->addItem( str ); | 185 | //mAddresseeEdit->completionObject()->addItem( str ); |
184 | } | 186 | } |
185 | 187 | ||
186 | void AddresseeDialog::selectItem( const QString &str ) | 188 | void AddresseeDialog::selectItem( const QString &str ) |
187 | { | 189 | { |
188 | if ( str.isEmpty() ) return; | 190 | if ( str.isEmpty() ) return; |
189 | 191 | ||
190 | QListViewItem *item = mItemDict.find( str ); | 192 | QListViewItem *item = mItemDict.find( str ); |
191 | if ( item ) { | 193 | if ( item ) { |
192 | mAddresseeList->blockSignals( true ); | 194 | mAddresseeList->blockSignals( true ); |
193 | mAddresseeList->setSelected( item, true ); | 195 | mAddresseeList->setSelected( item, true ); |
194 | mAddresseeList->ensureItemVisible( item ); | 196 | mAddresseeList->ensureItemVisible( item ); |
195 | mAddresseeList->blockSignals( false ); | 197 | mAddresseeList->blockSignals( false ); |
196 | } | 198 | } |
197 | } | 199 | } |
198 | 200 | ||
199 | void AddresseeDialog::updateEdit( QListViewItem *item ) | 201 | void AddresseeDialog::updateEdit( QListViewItem *item ) |
200 | { | 202 | { |
201 | mAddresseeEdit->setText( item->text( 0 ) ); | 203 | mAddresseeEdit->setText( item->text( 0 ) ); |
202 | mAddresseeEdit->setSelection( 0, item->text( 0 ).length() ); | 204 | mAddresseeEdit->setSelection( 0, item->text( 0 ).length() ); |
203 | } | 205 | } |
204 | 206 | ||
205 | void AddresseeDialog::selectNextItem( QListViewItem *item ) | 207 | void AddresseeDialog::selectNextItem( QListViewItem *item ) |
206 | { | 208 | { |
207 | addSelected( item ); | 209 | addSelected( item ); |
208 | QListViewItem *next = item->nextSibling(); | 210 | QListViewItem *next = item->nextSibling(); |
209 | if ( next ) { | 211 | if ( next ) { |
210 | next->setSelected( true ); | 212 | next->setSelected( true ); |
211 | item->setSelected( false ); | 213 | item->setSelected( false ); |
212 | mAddresseeList->setCurrentItem( next ); | 214 | mAddresseeList->setCurrentItem( next ); |
213 | } | 215 | } |
214 | } | 216 | } |
215 | void AddresseeDialog::addSelected( QListViewItem *item ) | 217 | void AddresseeDialog::addSelected( QListViewItem *item ) |
216 | { | 218 | { |
217 | AddresseeItem *addrItem = (AddresseeItem *)( item ); | 219 | AddresseeItem *addrItem = (AddresseeItem *)( item ); |
218 | if ( !addrItem ) return; | 220 | if ( !addrItem ) return; |
219 | 221 | ||
220 | Addressee a = addrItem->addressee(); | 222 | Addressee a = addrItem->addressee(); |
221 | 223 | ||
222 | QListViewItem *selectedItem = mSelectedDict.find( a.uid() ); | 224 | QListViewItem *selectedItem = mSelectedDict.find( a.uid() ); |
223 | if ( !selectedItem ) { | 225 | if ( !selectedItem ) { |
224 | selectedItem = new AddresseeItem( mSelectedList, a ); | 226 | selectedItem = new AddresseeItem( mSelectedList, a ); |
225 | mSelectedDict.insert( a.uid(), selectedItem ); | 227 | mSelectedDict.insert( a.uid(), selectedItem ); |
226 | } | 228 | } |
227 | 229 | ||
228 | } | 230 | } |
229 | 231 | ||
230 | void AddresseeDialog::removeSelected() | 232 | void AddresseeDialog::removeSelected() |
231 | { | 233 | { |
232 | QListViewItem *item = mSelectedList->selectedItem(); | 234 | QListViewItem *item = mSelectedList->selectedItem(); |
233 | AddresseeItem *addrItem = (AddresseeItem *)( item ); | 235 | AddresseeItem *addrItem = (AddresseeItem *)( item ); |
234 | if ( !addrItem ) return; | 236 | if ( !addrItem ) return; |
235 | QListViewItem *next = item->nextSibling(); | 237 | QListViewItem *next = item->nextSibling(); |
236 | mSelectedDict.remove( addrItem->addressee().uid() ); | 238 | mSelectedDict.remove( addrItem->addressee().uid() ); |
237 | delete addrItem; | 239 | delete addrItem; |
238 | if ( next ) | 240 | if ( next ) |
239 | next->setSelected( true ); | 241 | next->setSelected( true ); |
240 | } | 242 | } |
241 | 243 | ||
242 | Addressee AddresseeDialog::addressee() | 244 | Addressee AddresseeDialog::addressee() |
243 | { | 245 | { |
244 | AddresseeItem *aItem = 0; | 246 | AddresseeItem *aItem = 0; |
245 | 247 | ||
246 | if ( mMultiple ) | 248 | if ( mMultiple ) |
247 | aItem = (AddresseeItem *)( mSelectedList->firstChild() ); | 249 | aItem = (AddresseeItem *)( mSelectedList->firstChild() ); |
248 | else | 250 | else |
249 | aItem = (AddresseeItem *)( mAddresseeList->selectedItem() ); | 251 | aItem = (AddresseeItem *)( mAddresseeList->selectedItem() ); |
250 | 252 | ||
251 | if (aItem) return aItem->addressee(); | 253 | if (aItem) return aItem->addressee(); |
252 | return Addressee(); | 254 | return Addressee(); |
253 | } | 255 | } |
254 | 256 | ||
255 | Addressee::List AddresseeDialog::addressees() | 257 | Addressee::List AddresseeDialog::addressees() |
256 | { | 258 | { |
257 | Addressee::List al; | 259 | Addressee::List al; |
258 | AddresseeItem *aItem = 0; | 260 | AddresseeItem *aItem = 0; |
259 | 261 | ||
260 | if ( mMultiple ) { | 262 | if ( mMultiple ) { |
261 | QListViewItem *item = mSelectedList->firstChild(); | 263 | QListViewItem *item = mSelectedList->firstChild(); |
262 | while( item ) { | 264 | while( item ) { |
263 | aItem = (AddresseeItem *)( item ); | 265 | aItem = (AddresseeItem *)( item ); |
264 | if ( aItem ) al.append( aItem->addressee() ); | 266 | if ( aItem ) al.append( aItem->addressee() ); |
265 | item = item->nextSibling(); | 267 | item = item->nextSibling(); |
266 | } | 268 | } |
267 | } | 269 | } |
268 | else | 270 | else |
269 | { | 271 | { |
270 | aItem = (AddresseeItem *)( mAddresseeList->selectedItem() ); | 272 | aItem = (AddresseeItem *)( mAddresseeList->selectedItem() ); |
271 | if (aItem) al.append( aItem->addressee() ); | 273 | if (aItem) al.append( aItem->addressee() ); |
272 | } | 274 | } |
273 | 275 | ||
274 | return al; | 276 | return al; |
275 | } | 277 | } |
276 | 278 | ||
277 | Addressee AddresseeDialog::getAddressee( QWidget *parent ) | 279 | Addressee AddresseeDialog::getAddressee( QWidget *parent ) |
278 | { | 280 | { |
279 | AddresseeDialog *dlg = new AddresseeDialog( parent ); | 281 | AddresseeDialog *dlg = new AddresseeDialog( parent ); |
280 | Addressee addressee; | 282 | Addressee addressee; |
281 | int result = dlg->exec(); | 283 | int result = dlg->exec(); |
282 | 284 | ||
283 | if ( result == QDialog::Accepted ) { | 285 | if ( result == QDialog::Accepted ) { |
284 | addressee = dlg->addressee(); | 286 | addressee = dlg->addressee(); |
285 | } | 287 | } |
286 | 288 | ||
287 | delete dlg; | 289 | delete dlg; |
288 | return addressee; | 290 | return addressee; |
289 | } | 291 | } |
290 | 292 | ||
291 | Addressee::List AddresseeDialog::getAddressees( QWidget *parent ) | 293 | Addressee::List AddresseeDialog::getAddressees( QWidget *parent ) |
292 | { | 294 | { |
293 | AddresseeDialog *dlg = new AddresseeDialog( parent, true ); | 295 | AddresseeDialog *dlg = new AddresseeDialog( parent, true ); |
294 | Addressee::List addressees; | 296 | Addressee::List addressees; |
295 | if ( QApplication::desktop()->width() <= 640 ) | 297 | if ( QApplication::desktop()->width() <= 640 ) |
296 | dlg->showMaximized(); | 298 | dlg->showMaximized(); |
297 | int result = dlg->exec(); | 299 | int result = dlg->exec(); |
298 | if ( result == QDialog::Accepted ) { | 300 | if ( result == QDialog::Accepted ) { |
299 | addressees = dlg->addressees(); | 301 | addressees = dlg->addressees(); |
300 | } | 302 | } |
301 | 303 | ||
302 | delete dlg; | 304 | delete dlg; |
303 | return addressees; | 305 | return addressees; |
304 | } | 306 | } |
305 | 307 | ||
306 | void AddresseeDialog::addressBookChanged() | 308 | void AddresseeDialog::addressBookChanged() |
307 | { | 309 | { |
308 | loadAddressBook(); | 310 | loadAddressBook(); |
309 | } | 311 | } |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 27aca2d..3f9b546 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -1,3366 +1,3390 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KAddressbook. | 2 | This file is part of KAddressbook. |
3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> | 3 | Copyright (c) 2003 Tobias Koenig <tokoe@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 | Async a special exception, permission is given to link this program | 19 | Async 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 | /*s | 24 | /*s |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "kabcore.h" | 31 | #include "kabcore.h" |
32 | 32 | ||
33 | #include <stdaddressbook.h> | 33 | #include <stdaddressbook.h> |
34 | #include <klocale.h> | 34 | #include <klocale.h> |
35 | #include <kfiledialog.h> | 35 | #include <kfiledialog.h> |
36 | #include <qtimer.h> | 36 | #include <qtimer.h> |
37 | #include <qlabel.h> | 37 | #include <qlabel.h> |
38 | #include <qregexp.h> | 38 | #include <qregexp.h> |
39 | #include <qlineedit.h> | 39 | #include <qlineedit.h> |
40 | #include <qcheckbox.h> | 40 | #include <qcheckbox.h> |
41 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
42 | #include <qprogressbar.h> | 42 | #include <qprogressbar.h> |
43 | #include <libkdepim/phoneaccess.h> | 43 | #include <libkdepim/phoneaccess.h> |
44 | 44 | ||
45 | #ifndef KAB_EMBEDDED | 45 | #ifndef KAB_EMBEDDED |
46 | #include <qclipboard.h> | 46 | #include <qclipboard.h> |
47 | #include <qdir.h> | 47 | #include <qdir.h> |
48 | #include <qfile.h> | 48 | #include <qfile.h> |
49 | #include <qapplicaton.h> | 49 | #include <qapplicaton.h> |
50 | #include <qprogressbar.h> | 50 | #include <qprogressbar.h> |
51 | #include <qlayout.h> | 51 | #include <qlayout.h> |
52 | #include <qregexp.h> | 52 | #include <qregexp.h> |
53 | #include <qvbox.h> | 53 | #include <qvbox.h> |
54 | #include <kabc/addresseelist.h> | 54 | #include <kabc/addresseelist.h> |
55 | #include <kabc/errorhandler.h> | 55 | #include <kabc/errorhandler.h> |
56 | #include <kabc/resource.h> | 56 | #include <kabc/resource.h> |
57 | #include <kabc/vcardconverter.h> | 57 | #include <kabc/vcardconverter.h> |
58 | #include <kapplication.h> | 58 | #include <kapplication.h> |
59 | #include <kactionclasses.h> | 59 | #include <kactionclasses.h> |
60 | #include <kcmultidialog.h> | 60 | #include <kcmultidialog.h> |
61 | #include <kdebug.h> | 61 | #include <kdebug.h> |
62 | #include <kdeversion.h> | 62 | #include <kdeversion.h> |
63 | #include <kkeydialog.h> | 63 | #include <kkeydialog.h> |
64 | #include <kmessagebox.h> | 64 | #include <kmessagebox.h> |
65 | #include <kprinter.h> | 65 | #include <kprinter.h> |
66 | #include <kprotocolinfo.h> | 66 | #include <kprotocolinfo.h> |
67 | #include <kresources/selectdialog.h> | 67 | #include <kresources/selectdialog.h> |
68 | #include <kstandarddirs.h> | 68 | #include <kstandarddirs.h> |
69 | #include <ktempfile.h> | 69 | #include <ktempfile.h> |
70 | #include <kxmlguiclient.h> | 70 | #include <kxmlguiclient.h> |
71 | #include <kaboutdata.h> | 71 | #include <kaboutdata.h> |
72 | #include <libkdepim/categoryselectdialog.h> | 72 | #include <libkdepim/categoryselectdialog.h> |
73 | 73 | ||
74 | #include "addresseeutil.h" | 74 | #include "addresseeutil.h" |
75 | #include "addresseeeditordialog.h" | 75 | #include "addresseeeditordialog.h" |
76 | #include "extensionmanager.h" | 76 | #include "extensionmanager.h" |
77 | #include "kstdaction.h" | 77 | #include "kstdaction.h" |
78 | #include "kaddressbookservice.h" | 78 | #include "kaddressbookservice.h" |
79 | #include "ldapsearchdialog.h" | 79 | #include "ldapsearchdialog.h" |
80 | #include "printing/printingwizard.h" | 80 | #include "printing/printingwizard.h" |
81 | #else // KAB_EMBEDDED | 81 | #else // KAB_EMBEDDED |
82 | 82 | ||
83 | #include <kapplication.h> | 83 | #include <kapplication.h> |
84 | #include "KDGanttMinimizeSplitter.h" | 84 | #include "KDGanttMinimizeSplitter.h" |
85 | #include "kaddressbookmain.h" | 85 | #include "kaddressbookmain.h" |
86 | #include "kactioncollection.h" | 86 | #include "kactioncollection.h" |
87 | #include "addresseedialog.h" | 87 | #include "addresseedialog.h" |
88 | //US | 88 | //US |
89 | #include <addresseeview.h> | 89 | #include <addresseeview.h> |
90 | 90 | ||
91 | #include <qapp.h> | 91 | #include <qapp.h> |
92 | #include <qmenubar.h> | 92 | #include <qmenubar.h> |
93 | //#include <qtoolbar.h> | 93 | //#include <qtoolbar.h> |
94 | #include <qmessagebox.h> | 94 | #include <qmessagebox.h> |
95 | #include <kdebug.h> | 95 | #include <kdebug.h> |
96 | #include <kiconloader.h> // needed for SmallIcon | 96 | #include <kiconloader.h> // needed for SmallIcon |
97 | #include <kresources/kcmkresources.h> | 97 | #include <kresources/kcmkresources.h> |
98 | #include <ktoolbar.h> | 98 | #include <ktoolbar.h> |
99 | 99 | ||
100 | 100 | ||
101 | //#include <qlabel.h> | 101 | //#include <qlabel.h> |
102 | 102 | ||
103 | 103 | ||
104 | #ifndef DESKTOP_VERSION | 104 | #ifndef DESKTOP_VERSION |
105 | #include <qpe/ir.h> | 105 | #include <qpe/ir.h> |
106 | #include <qpe/qpemenubar.h> | 106 | #include <qpe/qpemenubar.h> |
107 | #include <qtopia/qcopenvelope_qws.h> | 107 | #include <qtopia/qcopenvelope_qws.h> |
108 | #else | 108 | #else |
109 | 109 | ||
110 | #include <qmenubar.h> | 110 | #include <qmenubar.h> |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | #endif // KAB_EMBEDDED | 113 | #endif // KAB_EMBEDDED |
114 | #include "kcmconfigs/kcmkabconfig.h" | 114 | #include "kcmconfigs/kcmkabconfig.h" |
115 | #include "kcmconfigs/kcmkdepimconfig.h" | 115 | #include "kcmconfigs/kcmkdepimconfig.h" |
116 | #include "kpimglobalprefs.h" | 116 | #include "kpimglobalprefs.h" |
117 | #include "externalapphandler.h" | 117 | #include "externalapphandler.h" |
118 | #include "xxportselectdialog.h" | 118 | #include "xxportselectdialog.h" |
119 | 119 | ||
120 | 120 | ||
121 | #include <kresources/selectdialog.h> | 121 | #include <kresources/selectdialog.h> |
122 | #include <kmessagebox.h> | 122 | #include <kmessagebox.h> |
123 | 123 | ||
124 | #include <picture.h> | 124 | #include <picture.h> |
125 | #include <resource.h> | 125 | #include <resource.h> |
126 | 126 | ||
127 | //US#include <qsplitter.h> | 127 | //US#include <qsplitter.h> |
128 | #include <qmap.h> | 128 | #include <qmap.h> |
129 | #include <qdir.h> | 129 | #include <qdir.h> |
130 | #include <qfile.h> | 130 | #include <qfile.h> |
131 | #include <qvbox.h> | 131 | #include <qvbox.h> |
132 | #include <qlayout.h> | 132 | #include <qlayout.h> |
133 | #include <qclipboard.h> | 133 | #include <qclipboard.h> |
134 | #include <qtextstream.h> | 134 | #include <qtextstream.h> |
135 | #include <qradiobutton.h> | 135 | #include <qradiobutton.h> |
136 | #include <qbuttongroup.h> | 136 | #include <qbuttongroup.h> |
137 | 137 | ||
138 | #include <libkdepim/categoryselectdialog.h> | 138 | #include <libkdepim/categoryselectdialog.h> |
139 | #include <libkdepim/categoryeditdialog.h> | 139 | #include <libkdepim/categoryeditdialog.h> |
140 | #include <kabc/vcardconverter.h> | 140 | #include <kabc/vcardconverter.h> |
141 | 141 | ||
142 | 142 | ||
143 | #include "addresseeutil.h" | 143 | #include "addresseeutil.h" |
144 | #include "undocmds.h" | 144 | #include "undocmds.h" |
145 | #include "addresseeeditordialog.h" | 145 | #include "addresseeeditordialog.h" |
146 | #include "viewmanager.h" | 146 | #include "viewmanager.h" |
147 | #include "details/detailsviewcontainer.h" | 147 | #include "details/detailsviewcontainer.h" |
148 | #include "kabprefs.h" | 148 | #include "kabprefs.h" |
149 | #include "xxportmanager.h" | 149 | #include "xxportmanager.h" |
150 | #include "incsearchwidget.h" | 150 | #include "incsearchwidget.h" |
151 | #include "jumpbuttonbar.h" | 151 | #include "jumpbuttonbar.h" |
152 | #include "extensionmanager.h" | 152 | #include "extensionmanager.h" |
153 | #include "addresseeconfig.h" | 153 | #include "addresseeconfig.h" |
154 | #include "nameeditdialog.h" | 154 | #include "nameeditdialog.h" |
155 | #include <kcmultidialog.h> | 155 | #include <kcmultidialog.h> |
156 | 156 | ||
157 | #ifdef _WIN32_ | 157 | #ifdef _WIN32_ |
158 | #ifdef _OL_IMPORT_ | 158 | #ifdef _OL_IMPORT_ |
159 | #include "kaimportoldialog.h" | 159 | #include "kaimportoldialog.h" |
160 | #endif | 160 | #endif |
161 | #else | 161 | #else |
162 | #include <unistd.h> | 162 | #include <unistd.h> |
163 | #endif | 163 | #endif |
164 | // sync includes | 164 | // sync includes |
165 | #include <libkdepim/ksyncprofile.h> | 165 | #include <libkdepim/ksyncprofile.h> |
166 | #include <libkdepim/ksyncprefsdialog.h> | 166 | #include <libkdepim/ksyncprefsdialog.h> |
167 | 167 | ||
168 | 168 | ||
169 | class KABCatPrefs : public QDialog | 169 | class KABCatPrefs : public QDialog |
170 | { | 170 | { |
171 | public: | 171 | public: |
172 | KABCatPrefs( QWidget *parent=0, const char *name=0 ) : | 172 | KABCatPrefs( QWidget *parent=0, const char *name=0 ) : |
173 | QDialog( parent, name, true ) | 173 | QDialog( parent, name, true ) |
174 | { | 174 | { |
175 | setCaption( i18n("Manage new Categories") ); | 175 | setCaption( i18n("Manage new Categories") ); |
176 | QVBoxLayout* lay = new QVBoxLayout( this ); | 176 | QVBoxLayout* lay = new QVBoxLayout( this ); |
177 | lay->setSpacing( 3 ); | 177 | lay->setSpacing( 3 ); |
178 | lay->setMargin( 3 ); | 178 | lay->setMargin( 3 ); |
179 | QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); | 179 | QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); |
180 | lay->addWidget( lab ); | 180 | lay->addWidget( lab ); |
181 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); | 181 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); |
182 | lay->addWidget( format ); | 182 | lay->addWidget( format ); |
183 | format->setExclusive ( true ) ; | 183 | format->setExclusive ( true ) ; |
184 | addCatBut = new QRadioButton(i18n("Add to category list"), format ); | 184 | addCatBut = new QRadioButton(i18n("Add to category list"), format ); |
185 | new QRadioButton(i18n("Remove from addressees"), format ); | 185 | new QRadioButton(i18n("Remove from addressees"), format ); |
186 | addCatBut->setChecked( true ); | 186 | addCatBut->setChecked( true ); |
187 | QPushButton * ok = new QPushButton( i18n("OK"), this ); | 187 | QPushButton * ok = new QPushButton( i18n("OK"), this ); |
188 | lay->addWidget( ok ); | 188 | lay->addWidget( ok ); |
189 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 189 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
190 | lay->addWidget( cancel ); | 190 | lay->addWidget( cancel ); |
191 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 191 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
192 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 192 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
193 | resize( 200, 200 ); | 193 | resize( 200, 200 ); |
194 | } | 194 | } |
195 | 195 | ||
196 | bool addCat() { return addCatBut->isChecked(); } | 196 | bool addCat() { return addCatBut->isChecked(); } |
197 | private: | 197 | private: |
198 | QRadioButton* addCatBut; | 198 | QRadioButton* addCatBut; |
199 | }; | 199 | }; |
200 | 200 | ||
201 | class KABFormatPrefs : public QDialog | 201 | class KABFormatPrefs : public QDialog |
202 | { | 202 | { |
203 | public: | 203 | public: |
204 | KABFormatPrefs( QWidget *parent=0, const char *name=0 ) : | 204 | KABFormatPrefs( QWidget *parent=0, const char *name=0 ) : |
205 | QDialog( parent, name, true ) | 205 | QDialog( parent, name, true ) |
206 | { | 206 | { |
207 | setCaption( i18n("Set formatted name") ); | 207 | setCaption( i18n("Set formatted name") ); |
208 | QVBoxLayout* lay = new QVBoxLayout( this ); | 208 | QVBoxLayout* lay = new QVBoxLayout( this ); |
209 | lay->setSpacing( 3 ); | 209 | lay->setSpacing( 3 ); |
210 | lay->setMargin( 3 ); | 210 | lay->setMargin( 3 ); |
211 | QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this ); | 211 | QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this ); |
212 | lay->addWidget( lab ); | 212 | lay->addWidget( lab ); |
213 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this ); | 213 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this ); |
214 | lay->addWidget( format ); | 214 | lay->addWidget( format ); |
215 | format->setExclusive ( true ) ; | 215 | format->setExclusive ( true ) ; |
216 | simple = new QRadioButton(i18n("Simple: James Bond"), format ); | 216 | simple = new QRadioButton(i18n("Simple: James Bond"), format ); |
217 | full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format ); | 217 | full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format ); |
218 | reverse = new QRadioButton(i18n("Reverse: Bond, James"), format ); | 218 | reverse = new QRadioButton(i18n("Reverse: Bond, James"), format ); |
219 | company = new QRadioButton(i18n("Organization: MI6"), format ); | 219 | company = new QRadioButton(i18n("Organization: MI6"), format ); |
220 | simple->setChecked( true ); | 220 | simple->setChecked( true ); |
221 | setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this); | 221 | setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this); |
222 | lay->addWidget( setCompany ); | 222 | lay->addWidget( setCompany ); |
223 | QPushButton * ok = new QPushButton( i18n("Select contact list"), this ); | 223 | QPushButton * ok = new QPushButton( i18n("Select contact list"), this ); |
224 | lay->addWidget( ok ); | 224 | lay->addWidget( ok ); |
225 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 225 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
226 | lay->addWidget( cancel ); | 226 | lay->addWidget( cancel ); |
227 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 227 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
228 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 228 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
229 | //resize( 200, 200 ); | 229 | //resize( 200, 200 ); |
230 | 230 | ||
231 | } | 231 | } |
232 | public: | 232 | public: |
233 | QRadioButton* simple, *full, *reverse, *company; | 233 | QRadioButton* simple, *full, *reverse, *company; |
234 | QCheckBox* setCompany; | 234 | QCheckBox* setCompany; |
235 | }; | 235 | }; |
236 | 236 | ||
237 | 237 | ||
238 | 238 | ||
239 | class KAex2phonePrefs : public QDialog | 239 | class KAex2phonePrefs : public QDialog |
240 | { | 240 | { |
241 | public: | 241 | public: |
242 | KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) : | 242 | KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) : |
243 | QDialog( parent, name, true ) | 243 | QDialog( parent, name, true ) |
244 | { | 244 | { |
245 | setCaption( i18n("Export to phone options") ); | 245 | setCaption( i18n("Export to phone options") ); |
246 | QVBoxLayout* lay = new QVBoxLayout( this ); | 246 | QVBoxLayout* lay = new QVBoxLayout( this ); |
247 | lay->setSpacing( 3 ); | 247 | lay->setSpacing( 3 ); |
248 | lay->setMargin( 3 ); | 248 | lay->setMargin( 3 ); |
249 | QLabel *lab; | 249 | QLabel *lab; |
250 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); | 250 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); |
251 | lab->setAlignment (AlignHCenter ); | 251 | lab->setAlignment (AlignHCenter ); |
252 | QHBox* temphb; | 252 | QHBox* temphb; |
253 | temphb = new QHBox( this ); | 253 | temphb = new QHBox( this ); |
254 | new QLabel( i18n("I/O device: "), temphb ); | 254 | new QLabel( i18n("I/O device: "), temphb ); |
255 | mPhoneDevice = new QLineEdit( temphb); | 255 | mPhoneDevice = new QLineEdit( temphb); |
256 | lay->addWidget( temphb ); | 256 | lay->addWidget( temphb ); |
257 | temphb = new QHBox( this ); | 257 | temphb = new QHBox( this ); |
258 | new QLabel( i18n("Connection: "), temphb ); | 258 | new QLabel( i18n("Connection: "), temphb ); |
259 | mPhoneConnection = new QLineEdit( temphb); | 259 | mPhoneConnection = new QLineEdit( temphb); |
260 | lay->addWidget( temphb ); | 260 | lay->addWidget( temphb ); |
261 | temphb = new QHBox( this ); | 261 | temphb = new QHBox( this ); |
262 | new QLabel( i18n("Model(opt.): "), temphb ); | 262 | new QLabel( i18n("Model(opt.): "), temphb ); |
263 | mPhoneModel = new QLineEdit( temphb); | 263 | mPhoneModel = new QLineEdit( temphb); |
264 | lay->addWidget( temphb ); | 264 | lay->addWidget( temphb ); |
265 | // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); | 265 | // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); |
266 | // lay->addWidget( mWriteToSim ); | 266 | // lay->addWidget( mWriteToSim ); |
267 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); | 267 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); |
268 | lab->setAlignment (AlignHCenter); | 268 | lab->setAlignment (AlignHCenter); |
269 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); | 269 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); |
270 | lay->addWidget( ok ); | 270 | lay->addWidget( ok ); |
271 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 271 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
272 | lay->addWidget( cancel ); | 272 | lay->addWidget( cancel ); |
273 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 273 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
274 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 274 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
275 | resize( 220, 240 ); | 275 | resize( 220, 240 ); |
276 | 276 | ||
277 | } | 277 | } |
278 | 278 | ||
279 | public: | 279 | public: |
280 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; | 280 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; |
281 | QCheckBox* mWriteToSim; | 281 | QCheckBox* mWriteToSim; |
282 | }; | 282 | }; |
283 | 283 | ||
284 | 284 | ||
285 | bool pasteWithNewUid = true; | 285 | bool pasteWithNewUid = true; |
286 | 286 | ||
287 | #ifdef KAB_EMBEDDED | 287 | #ifdef KAB_EMBEDDED |
288 | KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) | 288 | KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) |
289 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), | 289 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), |
290 | mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ | 290 | mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ |
291 | mReadWrite( readWrite ), mModified( false ), mMainWindow(client) | 291 | mReadWrite( readWrite ), mModified( false ), mMainWindow(client) |
292 | #else //KAB_EMBEDDED | 292 | #else //KAB_EMBEDDED |
293 | KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) | 293 | KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) |
294 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), | 294 | : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), |
295 | mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), | 295 | mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), |
296 | mReadWrite( readWrite ), mModified( false ) | 296 | mReadWrite( readWrite ), mModified( false ) |
297 | #endif //KAB_EMBEDDED | 297 | #endif //KAB_EMBEDDED |
298 | { | 298 | { |
299 | // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); | 299 | // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); |
300 | // syncManager->setBlockSave(false); | 300 | // syncManager->setBlockSave(false); |
301 | mIncSearchWidget = 0; | 301 | mIncSearchWidget = 0; |
302 | mMiniSplitter = 0; | 302 | mMiniSplitter = 0; |
303 | mExtensionBarSplitter = 0; | 303 | mExtensionBarSplitter = 0; |
304 | mIsPart = !parent->inherits( "KAddressBookMain" ); | 304 | mIsPart = !parent->inherits( "KAddressBookMain" ); |
305 | mAddressBook = KABC::StdAddressBook::self(); | 305 | mAddressBook = KABC::StdAddressBook::self(); |
306 | KABC::StdAddressBook::setAutomaticSave( false ); | 306 | KABC::StdAddressBook::setAutomaticSave( false ); |
307 | 307 | ||
308 | #ifndef KAB_EMBEDDED | 308 | #ifndef KAB_EMBEDDED |
309 | mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); | 309 | mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); |
310 | #endif //KAB_EMBEDDED | 310 | #endif //KAB_EMBEDDED |
311 | 311 | ||
312 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), | 312 | connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), |
313 | SLOT( addressBookChanged() ) ); | 313 | SLOT( addressBookChanged() ) ); |
314 | 314 | ||
315 | #if 0 | 315 | #if 0 |
316 | // LP moved to addressbook init method | 316 | // LP moved to addressbook init method |
317 | mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, | 317 | mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, |
318 | "X-Department", "KADDRESSBOOK" ); | 318 | "X-Department", "KADDRESSBOOK" ); |
319 | mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, | 319 | mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, |
320 | "X-Profession", "KADDRESSBOOK" ); | 320 | "X-Profession", "KADDRESSBOOK" ); |
321 | mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, | 321 | mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, |
322 | "X-AssistantsName", "KADDRESSBOOK" ); | 322 | "X-AssistantsName", "KADDRESSBOOK" ); |
323 | mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, | 323 | mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, |
324 | "X-ManagersName", "KADDRESSBOOK" ); | 324 | "X-ManagersName", "KADDRESSBOOK" ); |
325 | mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, | 325 | mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, |
326 | "X-SpousesName", "KADDRESSBOOK" ); | 326 | "X-SpousesName", "KADDRESSBOOK" ); |
327 | mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, | 327 | mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, |
328 | "X-Office", "KADDRESSBOOK" ); | 328 | "X-Office", "KADDRESSBOOK" ); |
329 | mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, | 329 | mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, |
330 | "X-IMAddress", "KADDRESSBOOK" ); | 330 | "X-IMAddress", "KADDRESSBOOK" ); |
331 | mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, | 331 | mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, |
332 | "X-Anniversary", "KADDRESSBOOK" ); | 332 | "X-Anniversary", "KADDRESSBOOK" ); |
333 | 333 | ||
334 | //US added this field to become compatible with Opie/qtopia addressbook | 334 | //US added this field to become compatible with Opie/qtopia addressbook |
335 | // values can be "female" or "male" or "". An empty field represents undefined. | 335 | // values can be "female" or "male" or "". An empty field represents undefined. |
336 | mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, | 336 | mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, |
337 | "X-Gender", "KADDRESSBOOK" ); | 337 | "X-Gender", "KADDRESSBOOK" ); |
338 | mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, | 338 | mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, |
339 | "X-Children", "KADDRESSBOOK" ); | 339 | "X-Children", "KADDRESSBOOK" ); |
340 | mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, | 340 | mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, |
341 | "X-FreeBusyUrl", "KADDRESSBOOK" ); | 341 | "X-FreeBusyUrl", "KADDRESSBOOK" ); |
342 | #endif | 342 | #endif |
343 | initGUI(); | 343 | initGUI(); |
344 | 344 | ||
345 | mIncSearchWidget->setFocus(); | 345 | mIncSearchWidget->setFocus(); |
346 | 346 | ||
347 | 347 | ||
348 | connect( mViewManager, SIGNAL( selected( const QString& ) ), | 348 | connect( mViewManager, SIGNAL( selected( const QString& ) ), |
349 | SLOT( setContactSelected( const QString& ) ) ); | 349 | SLOT( setContactSelected( const QString& ) ) ); |
350 | connect( mViewManager, SIGNAL( executed( const QString& ) ), | 350 | connect( mViewManager, SIGNAL( executed( const QString& ) ), |
351 | SLOT( executeContact( const QString& ) ) ); | 351 | SLOT( executeContact( const QString& ) ) ); |
352 | 352 | ||
353 | connect( mViewManager, SIGNAL( deleteRequest( ) ), | 353 | connect( mViewManager, SIGNAL( deleteRequest( ) ), |
354 | SLOT( deleteContacts( ) ) ); | 354 | SLOT( deleteContacts( ) ) ); |
355 | connect( mViewManager, SIGNAL( modified() ), | 355 | connect( mViewManager, SIGNAL( modified() ), |
356 | SLOT( setModified() ) ); | 356 | SLOT( setModified() ) ); |
357 | 357 | ||
358 | connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); | 358 | connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); |
359 | connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); | 359 | connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); |
360 | 360 | ||
361 | connect( mXXPortManager, SIGNAL( modified() ), | 361 | connect( mXXPortManager, SIGNAL( modified() ), |
362 | SLOT( setModified() ) ); | 362 | SLOT( setModified() ) ); |
363 | 363 | ||
364 | connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), | 364 | connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), |
365 | SLOT( incrementalSearch( const QString& ) ) ); | 365 | SLOT( incrementalSearch( const QString& ) ) ); |
366 | connect( mIncSearchWidget, SIGNAL( fieldChanged() ), | 366 | connect( mIncSearchWidget, SIGNAL( fieldChanged() ), |
367 | mJumpButtonBar, SLOT( recreateButtons() ) ); | 367 | mJumpButtonBar, SLOT( recreateButtons() ) ); |
368 | 368 | ||
369 | connect( mDetails, SIGNAL( sendEmail( const QString& ) ), | 369 | connect( mDetails, SIGNAL( sendEmail( const QString& ) ), |
370 | SLOT( sendMail( const QString& ) ) ); | 370 | SLOT( sendMail( const QString& ) ) ); |
371 | 371 | ||
372 | 372 | ||
373 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); | 373 | connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); |
374 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); | 374 | connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); |
375 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); | 375 | connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); |
376 | connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); | 376 | connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); |
377 | connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); | ||
377 | 378 | ||
378 | 379 | ||
379 | #ifndef KAB_EMBEDDED | 380 | #ifndef KAB_EMBEDDED |
380 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), | 381 | connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), |
381 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); | 382 | mXXPortManager, SLOT( importVCard( const KURL& ) ) ); |
382 | 383 | ||
383 | connect( mDetails, SIGNAL( browse( const QString& ) ), | 384 | connect( mDetails, SIGNAL( browse( const QString& ) ), |
384 | SLOT( browse( const QString& ) ) ); | 385 | SLOT( browse( const QString& ) ) ); |
385 | 386 | ||
386 | 387 | ||
387 | mAddressBookService = new KAddressBookService( this ); | 388 | mAddressBookService = new KAddressBookService( this ); |
388 | 389 | ||
389 | #endif //KAB_EMBEDDED | 390 | #endif //KAB_EMBEDDED |
390 | 391 | ||
391 | mMessageTimer = new QTimer( this ); | 392 | mMessageTimer = new QTimer( this ); |
392 | connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); | 393 | connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); |
393 | mEditorDialog = 0; | 394 | mEditorDialog = 0; |
394 | createAddresseeEditorDialog( this ); | 395 | createAddresseeEditorDialog( this ); |
395 | setModified( false ); | 396 | setModified( false ); |
396 | mBRdisabled = false; | 397 | mBRdisabled = false; |
397 | #ifndef DESKTOP_VERSION | 398 | #ifndef DESKTOP_VERSION |
398 | infrared = 0; | 399 | infrared = 0; |
399 | #endif | 400 | #endif |
400 | //toggleBeamReceive( ); | 401 | //toggleBeamReceive( ); |
401 | //mMainWindow->toolBar()->show(); | 402 | //mMainWindow->toolBar()->show(); |
402 | // we have a toolbar repainting error on the Zaurus when starting KA/Pi | 403 | // we have a toolbar repainting error on the Zaurus when starting KA/Pi |
403 | QTimer::singleShot( 10, this , SLOT ( updateToolBar())); | 404 | QTimer::singleShot( 10, this , SLOT ( updateToolBar())); |
404 | } | 405 | } |
405 | 406 | ||
406 | void KABCore::updateToolBar() | 407 | void KABCore::updateToolBar() |
407 | { | 408 | { |
408 | static int iii = 0; | 409 | static int iii = 0; |
409 | ++iii; | 410 | ++iii; |
410 | mMainWindow->toolBar()->repaintMe(); | 411 | mMainWindow->toolBar()->repaintMe(); |
411 | if ( iii < 4 ) | 412 | if ( iii < 4 ) |
412 | QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); | 413 | QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); |
413 | } | 414 | } |
414 | KABCore::~KABCore() | 415 | KABCore::~KABCore() |
415 | { | 416 | { |
416 | // save(); | 417 | // save(); |
417 | //saveSettings(); | 418 | //saveSettings(); |
418 | //KABPrefs::instance()->writeConfig(); | 419 | //KABPrefs::instance()->writeConfig(); |
419 | delete AddresseeConfig::instance(); | 420 | delete AddresseeConfig::instance(); |
420 | mAddressBook = 0; | 421 | mAddressBook = 0; |
421 | KABC::StdAddressBook::close(); | 422 | KABC::StdAddressBook::close(); |
422 | 423 | ||
423 | delete syncManager; | 424 | delete syncManager; |
424 | #ifndef DESKTOP_VERSION | 425 | #ifndef DESKTOP_VERSION |
425 | if ( infrared ) | 426 | if ( infrared ) |
426 | delete infrared; | 427 | delete infrared; |
427 | #endif | 428 | #endif |
428 | } | 429 | } |
429 | void KABCore::receive( const QCString& cmsg, const QByteArray& data ) | 430 | void KABCore::receive( const QCString& cmsg, const QByteArray& data ) |
430 | { | 431 | { |
431 | //qDebug("KA: QCOP message received: %s ", cmsg.data() ); | 432 | //qDebug("KA: QCOP message received: %s ", cmsg.data() ); |
432 | if ( cmsg == "setDocument(QString)" ) { | 433 | if ( cmsg == "setDocument(QString)" ) { |
433 | QDataStream stream( data, IO_ReadOnly ); | 434 | QDataStream stream( data, IO_ReadOnly ); |
434 | QString fileName; | 435 | QString fileName; |
435 | stream >> fileName; | 436 | stream >> fileName; |
436 | recieve( fileName ); | 437 | recieve( fileName ); |
437 | return; | 438 | return; |
438 | } | 439 | } |
439 | } | 440 | } |
440 | void KABCore::toggleBeamReceive( ) | 441 | void KABCore::toggleBeamReceive( ) |
441 | { | 442 | { |
442 | if ( mBRdisabled ) | 443 | if ( mBRdisabled ) |
443 | return; | 444 | return; |
444 | #ifndef DESKTOP_VERSION | 445 | #ifndef DESKTOP_VERSION |
445 | if ( infrared ) { | 446 | if ( infrared ) { |
446 | qDebug("KA: AB disable BeamReceive "); | 447 | qDebug("KA: AB disable BeamReceive "); |
447 | delete infrared; | 448 | delete infrared; |
448 | infrared = 0; | 449 | infrared = 0; |
449 | mActionBR->setChecked(false); | 450 | mActionBR->setChecked(false); |
450 | return; | 451 | return; |
451 | } | 452 | } |
452 | qDebug("KA: AB enable BeamReceive "); | 453 | qDebug("KA: AB enable BeamReceive "); |
453 | mActionBR->setChecked(true); | 454 | mActionBR->setChecked(true); |
454 | 455 | ||
455 | infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; | 456 | infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; |
456 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); | 457 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); |
457 | #endif | 458 | #endif |
458 | } | 459 | } |
459 | 460 | ||
460 | 461 | ||
461 | void KABCore::disableBR(bool b) | 462 | void KABCore::disableBR(bool b) |
462 | { | 463 | { |
463 | #ifndef DESKTOP_VERSION | 464 | #ifndef DESKTOP_VERSION |
464 | if ( b ) { | 465 | if ( b ) { |
465 | if ( infrared ) { | 466 | if ( infrared ) { |
466 | toggleBeamReceive( ); | 467 | toggleBeamReceive( ); |
467 | } | 468 | } |
468 | mBRdisabled = true; | 469 | mBRdisabled = true; |
469 | } else { | 470 | } else { |
470 | if ( mBRdisabled ) { | 471 | if ( mBRdisabled ) { |
471 | mBRdisabled = false; | 472 | mBRdisabled = false; |
472 | //toggleBeamReceive( ); | 473 | //toggleBeamReceive( ); |
473 | } | 474 | } |
474 | } | 475 | } |
475 | #endif | 476 | #endif |
476 | 477 | ||
477 | } | 478 | } |
478 | void KABCore::recieve( QString fn ) | 479 | void KABCore::recieve( QString fn ) |
479 | { | 480 | { |
480 | //qDebug("KABCore::recieve "); | 481 | //qDebug("KABCore::recieve "); |
481 | int count = mAddressBook->importFromFile( fn, true ); | 482 | int count = mAddressBook->importFromFile( fn, true ); |
482 | if ( count ) | 483 | if ( count ) |
483 | setModified( true ); | 484 | setModified( true ); |
484 | mViewManager->refreshView(); | 485 | mViewManager->refreshView(); |
485 | message(i18n("%1 contact(s) received!").arg( count )); | 486 | message(i18n("%1 contact(s) received!").arg( count )); |
486 | topLevelWidget()->showMaximized(); | 487 | topLevelWidget()->showMaximized(); |
487 | topLevelWidget()->raise(); | 488 | topLevelWidget()->raise(); |
488 | } | 489 | } |
489 | void KABCore::restoreSettings() | 490 | void KABCore::restoreSettings() |
490 | { | 491 | { |
491 | mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; | 492 | mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; |
492 | 493 | ||
493 | bool state; | 494 | bool state; |
494 | 495 | ||
495 | if (mMultipleViewsAtOnce) | 496 | if (mMultipleViewsAtOnce) |
496 | state = KABPrefs::instance()->mDetailsPageVisible; | 497 | state = KABPrefs::instance()->mDetailsPageVisible; |
497 | else | 498 | else |
498 | state = false; | 499 | state = false; |
499 | 500 | ||
500 | mActionDetails->setChecked( state ); | 501 | mActionDetails->setChecked( state ); |
501 | setDetailsVisible( state ); | 502 | setDetailsVisible( state ); |
502 | 503 | ||
503 | state = KABPrefs::instance()->mJumpButtonBarVisible; | 504 | state = KABPrefs::instance()->mJumpButtonBarVisible; |
504 | 505 | ||
505 | mActionJumpBar->setChecked( state ); | 506 | mActionJumpBar->setChecked( state ); |
506 | setJumpButtonBarVisible( state ); | 507 | setJumpButtonBarVisible( state ); |
507 | /*US | 508 | /*US |
508 | QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; | 509 | QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; |
509 | if ( splitterSize.count() == 0 ) { | 510 | if ( splitterSize.count() == 0 ) { |
510 | splitterSize.append( width() / 2 ); | 511 | splitterSize.append( width() / 2 ); |
511 | splitterSize.append( width() / 2 ); | 512 | splitterSize.append( width() / 2 ); |
512 | } | 513 | } |
513 | mMiniSplitter->setSizes( splitterSize ); | 514 | mMiniSplitter->setSizes( splitterSize ); |
514 | if ( mExtensionBarSplitter ) { | 515 | if ( mExtensionBarSplitter ) { |
515 | splitterSize = KABPrefs::instance()->mExtensionsSplitter; | 516 | splitterSize = KABPrefs::instance()->mExtensionsSplitter; |
516 | if ( splitterSize.count() == 0 ) { | 517 | if ( splitterSize.count() == 0 ) { |
517 | splitterSize.append( width() / 2 ); | 518 | splitterSize.append( width() / 2 ); |
518 | splitterSize.append( width() / 2 ); | 519 | splitterSize.append( width() / 2 ); |
519 | } | 520 | } |
520 | mExtensionBarSplitter->setSizes( splitterSize ); | 521 | mExtensionBarSplitter->setSizes( splitterSize ); |
521 | 522 | ||
522 | } | 523 | } |
523 | */ | 524 | */ |
524 | mViewManager->restoreSettings(); | 525 | mViewManager->restoreSettings(); |
525 | mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField ); | 526 | mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField ); |
526 | mExtensionManager->restoreSettings(); | 527 | mExtensionManager->restoreSettings(); |
527 | #ifdef DESKTOP_VERSION | 528 | #ifdef DESKTOP_VERSION |
528 | int wid = width(); | 529 | int wid = width(); |
529 | if ( wid < 10 ) | 530 | if ( wid < 10 ) |
530 | wid = 400; | 531 | wid = 400; |
531 | #else | 532 | #else |
532 | int wid = QApplication::desktop()->width(); | 533 | int wid = QApplication::desktop()->width(); |
533 | if ( wid < 640 ) | 534 | if ( wid < 640 ) |
534 | wid = QApplication::desktop()->height(); | 535 | wid = QApplication::desktop()->height(); |
535 | #endif | 536 | #endif |
536 | QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; | 537 | QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; |
537 | if ( true /*splitterSize.count() == 0*/ ) { | 538 | if ( true /*splitterSize.count() == 0*/ ) { |
538 | splitterSize.append( wid / 2 ); | 539 | splitterSize.append( wid / 2 ); |
539 | splitterSize.append( wid / 2 ); | 540 | splitterSize.append( wid / 2 ); |
540 | } | 541 | } |
541 | mMiniSplitter->setSizes( splitterSize ); | 542 | mMiniSplitter->setSizes( splitterSize ); |
542 | if ( mExtensionBarSplitter ) { | 543 | if ( mExtensionBarSplitter ) { |
543 | //splitterSize = KABPrefs::instance()->mExtensionsSplitter; | 544 | //splitterSize = KABPrefs::instance()->mExtensionsSplitter; |
544 | if ( true /*splitterSize.count() == 0*/ ) { | 545 | if ( true /*splitterSize.count() == 0*/ ) { |
545 | splitterSize.append( wid / 2 ); | 546 | splitterSize.append( wid / 2 ); |
546 | splitterSize.append( wid / 2 ); | 547 | splitterSize.append( wid / 2 ); |
547 | } | 548 | } |
548 | mExtensionBarSplitter->setSizes( splitterSize ); | 549 | mExtensionBarSplitter->setSizes( splitterSize ); |
549 | 550 | ||
550 | } | 551 | } |
551 | 552 | ||
552 | 553 | ||
553 | } | 554 | } |
554 | 555 | ||
555 | void KABCore::saveSettings() | 556 | void KABCore::saveSettings() |
556 | { | 557 | { |
557 | KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); | 558 | KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); |
558 | if ( mExtensionBarSplitter ) | 559 | if ( mExtensionBarSplitter ) |
559 | KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); | 560 | KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); |
560 | KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); | 561 | KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); |
561 | KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); | 562 | KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); |
562 | #ifndef KAB_EMBEDDED | 563 | #ifndef KAB_EMBEDDED |
563 | 564 | ||
564 | KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); | 565 | KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); |
565 | KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); | 566 | KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); |
566 | #endif //KAB_EMBEDDED | 567 | #endif //KAB_EMBEDDED |
567 | mExtensionManager->saveSettings(); | 568 | mExtensionManager->saveSettings(); |
568 | mViewManager->saveSettings(); | 569 | mViewManager->saveSettings(); |
569 | 570 | ||
570 | KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); | 571 | KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); |
571 | KABPrefs::instance()->writeConfig(); | 572 | KABPrefs::instance()->writeConfig(); |
572 | qDebug("KA: KABCore::saveSettings() "); | 573 | qDebug("KA: KABCore::saveSettings() "); |
573 | } | 574 | } |
574 | 575 | ||
575 | KABC::AddressBook *KABCore::addressBook() const | 576 | KABC::AddressBook *KABCore::addressBook() const |
576 | { | 577 | { |
577 | return mAddressBook; | 578 | return mAddressBook; |
578 | } | 579 | } |
579 | 580 | ||
580 | KConfig *KABCore::config() | 581 | KConfig *KABCore::config() |
581 | { | 582 | { |
582 | #ifndef KAB_EMBEDDED | 583 | #ifndef KAB_EMBEDDED |
583 | return KABPrefs::instance()->config(); | 584 | return KABPrefs::instance()->config(); |
584 | #else //KAB_EMBEDDED | 585 | #else //KAB_EMBEDDED |
585 | return KABPrefs::instance()->getConfig(); | 586 | return KABPrefs::instance()->getConfig(); |
586 | #endif //KAB_EMBEDDED | 587 | #endif //KAB_EMBEDDED |
587 | } | 588 | } |
588 | 589 | ||
589 | KActionCollection *KABCore::actionCollection() const | 590 | KActionCollection *KABCore::actionCollection() const |
590 | { | 591 | { |
591 | return mGUIClient->actionCollection(); | 592 | return mGUIClient->actionCollection(); |
592 | } | 593 | } |
593 | 594 | ||
594 | KABC::Field *KABCore::currentSearchField() const | 595 | KABC::Field *KABCore::currentSearchField() const |
595 | { | 596 | { |
596 | if (mIncSearchWidget) | 597 | if (mIncSearchWidget) |
597 | return mIncSearchWidget->currentField(); | 598 | return mIncSearchWidget->currentField(); |
598 | else | 599 | else |
599 | return 0; | 600 | return 0; |
600 | } | 601 | } |
601 | 602 | ||
602 | QStringList KABCore::selectedUIDs() const | 603 | QStringList KABCore::selectedUIDs() const |
603 | { | 604 | { |
604 | return mViewManager->selectedUids(); | 605 | return mViewManager->selectedUids(); |
605 | } | 606 | } |
606 | 607 | ||
607 | KABC::Resource *KABCore::requestResource( QWidget *parent ) | 608 | KABC::Resource *KABCore::requestResource( QWidget *parent ) |
608 | { | 609 | { |
609 | QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); | 610 | QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); |
610 | 611 | ||
611 | QPtrList<KRES::Resource> kresResources; | 612 | QPtrList<KRES::Resource> kresResources; |
612 | QPtrListIterator<KABC::Resource> resIt( kabcResources ); | 613 | QPtrListIterator<KABC::Resource> resIt( kabcResources ); |
613 | KABC::Resource *resource; | 614 | KABC::Resource *resource; |
614 | while ( ( resource = resIt.current() ) != 0 ) { | 615 | while ( ( resource = resIt.current() ) != 0 ) { |
615 | ++resIt; | 616 | ++resIt; |
616 | if ( !resource->readOnly() ) { | 617 | if ( !resource->readOnly() ) { |
617 | KRES::Resource *res = static_cast<KRES::Resource*>( resource ); | 618 | KRES::Resource *res = static_cast<KRES::Resource*>( resource ); |
618 | if ( res ) | 619 | if ( res ) |
619 | kresResources.append( res ); | 620 | kresResources.append( res ); |
620 | } | 621 | } |
621 | } | 622 | } |
622 | 623 | ||
623 | KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent ); | 624 | KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent ); |
624 | return static_cast<KABC::Resource*>( res ); | 625 | return static_cast<KABC::Resource*>( res ); |
625 | } | 626 | } |
626 | 627 | ||
627 | #ifndef KAB_EMBEDDED | 628 | #ifndef KAB_EMBEDDED |
628 | KAboutData *KABCore::createAboutData() | 629 | KAboutData *KABCore::createAboutData() |
629 | #else //KAB_EMBEDDED | 630 | #else //KAB_EMBEDDED |
630 | void KABCore::createAboutData() | 631 | void KABCore::createAboutData() |
631 | #endif //KAB_EMBEDDED | 632 | #endif //KAB_EMBEDDED |
632 | { | 633 | { |
633 | #ifndef KAB_EMBEDDED | 634 | #ifndef KAB_EMBEDDED |
634 | KAboutData *about = new KAboutData( "kaddressbook", I18N_NOOP( "KAddressBook" ), | 635 | KAboutData *about = new KAboutData( "kaddressbook", I18N_NOOP( "KAddressBook" ), |
635 | "3.1", I18N_NOOP( "The KDE Address Book" ), | 636 | "3.1", I18N_NOOP( "The KDE Address Book" ), |
636 | KAboutData::License_GPL_V2, | 637 | KAboutData::License_GPL_V2, |
637 | I18N_NOOP( "(c) 1997-2003, The KDE PIM Team" ) ); | 638 | I18N_NOOP( "(c) 1997-2003, The KDE PIM Team" ) ); |
638 | about->addAuthor( "Tobias Koenig", I18N_NOOP( "Current maintainer " ), "tokoe@kde.org" ); | 639 | about->addAuthor( "Tobias Koenig", I18N_NOOP( "Current maintainer " ), "tokoe@kde.org" ); |
639 | about->addAuthor( "Don Sanders", I18N_NOOP( "Original author " ) ); | 640 | about->addAuthor( "Don Sanders", I18N_NOOP( "Original author " ) ); |
640 | about->addAuthor( "Cornelius Schumacher", | 641 | about->addAuthor( "Cornelius Schumacher", |
641 | I18N_NOOP( "Co-maintainer, libkabc port, CSV import/export " ), | 642 | I18N_NOOP( "Co-maintainer, libkabc port, CSV import/export " ), |
642 | "schumacher@kde.org" ); | 643 | "schumacher@kde.org" ); |
643 | about->addAuthor( "Mike Pilone", I18N_NOOP( "GUI and framework redesign " ), | 644 | about->addAuthor( "Mike Pilone", I18N_NOOP( "GUI and framework redesign " ), |
644 | "mpilone@slac.com" ); | 645 | "mpilone@slac.com" ); |
645 | about->addAuthor( "Greg Stern", I18N_NOOP( "DCOP interface" ) ); | 646 | about->addAuthor( "Greg Stern", I18N_NOOP( "DCOP interface" ) ); |
646 | about->addAuthor( "Mark Westcott", I18N_NOOP( "Contact pinning" ) ); | 647 | about->addAuthor( "Mark Westcott", I18N_NOOP( "Contact pinning" ) ); |
647 | about->addAuthor( "Michel Boyer de la Giroday", I18N_NOOP( "LDAP Lookup\n" ), | 648 | about->addAuthor( "Michel Boyer de la Giroday", I18N_NOOP( "LDAP Lookup\n" ), |
648 | "michel@klaralvdalens-datakonsult.se" ); | 649 | "michel@klaralvdalens-datakonsult.se" ); |
649 | about->addAuthor( "Steffen Hansen", I18N_NOOP( "LDAP Lookup " ), | 650 | about->addAuthor( "Steffen Hansen", I18N_NOOP( "LDAP Lookup " ), |
650 | "hansen@kde.org" ); | 651 | "hansen@kde.org" ); |
651 | 652 | ||
652 | return about; | 653 | return about; |
653 | #endif //KAB_EMBEDDED | 654 | #endif //KAB_EMBEDDED |
654 | 655 | ||
655 | QString version; | 656 | QString version; |
656 | #include <../version> | 657 | #include <../version> |
657 | QMessageBox::about( this, "About KAddressbook/Pi", | 658 | QMessageBox::about( this, "About KAddressbook/Pi", |
658 | "KAddressbook/Platform-independent\n" | 659 | "KAddressbook/Platform-independent\n" |
659 | "(KA/Pi) " +version + " - " + | 660 | "(KA/Pi) " +version + " - " + |
660 | #ifdef DESKTOP_VERSION | 661 | #ifdef DESKTOP_VERSION |
661 | "Desktop Edition\n" | 662 | "Desktop Edition\n" |
662 | #else | 663 | #else |
663 | "PDA-Edition\n" | 664 | "PDA-Edition\n" |
664 | "for: Zaurus 5500 / 7x0 / 8x0\n" | 665 | "for: Zaurus 5500 / 7x0 / 8x0\n" |
665 | #endif | 666 | #endif |
666 | 667 | ||
667 | "(c) 2004 Ulf Schenk\n" | 668 | "(c) 2004 Ulf Schenk\n" |
668 | "(c) 2004 Lutz Rogowski\n" | 669 | "(c) 2004 Lutz Rogowski\n" |
669 | "(c) 1997-2003, The KDE PIM Team\n" | 670 | "(c) 1997-2003, The KDE PIM Team\n" |
670 | "Tobias Koenig Current maintainer\ntokoe@kde.org\n" | 671 | "Tobias Koenig Current maintainer\ntokoe@kde.org\n" |
671 | "Don Sanders Original author\n" | 672 | "Don Sanders Original author\n" |
672 | "Cornelius Schumacher Co-maintainer\nschumacher@kde.org\n" | 673 | "Cornelius Schumacher Co-maintainer\nschumacher@kde.org\n" |
673 | "Mike Pilone GUI and framework redesign\nmpilone@slac.com\n" | 674 | "Mike Pilone GUI and framework redesign\nmpilone@slac.com\n" |
674 | "Greg Stern DCOP interface\n" | 675 | "Greg Stern DCOP interface\n" |
675 | "Mark Westcot Contact pinning\n" | 676 | "Mark Westcot Contact pinning\n" |
676 | "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n" | 677 | "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n" |
677 | "Steffen Hansen LDAP Lookup\nhansen@kde.org\n" | 678 | "Steffen Hansen LDAP Lookup\nhansen@kde.org\n" |
678 | #ifdef _WIN32_ | 679 | #ifdef _WIN32_ |
679 | "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n" | 680 | "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n" |
680 | #endif | 681 | #endif |
681 | ); | 682 | ); |
682 | } | 683 | } |
683 | 684 | ||
684 | void KABCore::setContactSelected( const QString &uid ) | 685 | void KABCore::setContactSelected( const QString &uid ) |
685 | { | 686 | { |
686 | KABC::Addressee addr = mAddressBook->findByUid( uid ); | 687 | KABC::Addressee addr = mAddressBook->findByUid( uid ); |
687 | if ( !mDetails->isHidden() ) | 688 | if ( !mDetails->isHidden() ) |
688 | mDetails->setAddressee( addr ); | 689 | mDetails->setAddressee( addr ); |
689 | 690 | ||
690 | if ( !addr.isEmpty() ) { | 691 | if ( !addr.isEmpty() ) { |
691 | emit contactSelected( addr.formattedName() ); | 692 | emit contactSelected( addr.formattedName() ); |
692 | KABC::Picture pic = addr.photo(); | 693 | KABC::Picture pic = addr.photo(); |
693 | if ( pic.isIntern() ) { | 694 | if ( pic.isIntern() ) { |
694 | //US emit contactSelected( pic.data() ); | 695 | //US emit contactSelected( pic.data() ); |
695 | //US instead use: | 696 | //US instead use: |
696 | QPixmap px; | 697 | QPixmap px; |
697 | if (pic.data().isNull() != true) | 698 | if (pic.data().isNull() != true) |
698 | { | 699 | { |
699 | px.convertFromImage(pic.data()); | 700 | px.convertFromImage(pic.data()); |
700 | } | 701 | } |
701 | 702 | ||
702 | emit contactSelected( px ); | 703 | emit contactSelected( px ); |
703 | } | 704 | } |
704 | } | 705 | } |
705 | 706 | ||
706 | 707 | ||
707 | mExtensionManager->setSelectionChanged(); | 708 | mExtensionManager->setSelectionChanged(); |
708 | 709 | ||
709 | // update the actions | 710 | // update the actions |
710 | bool selected = !uid.isEmpty(); | 711 | bool selected = !uid.isEmpty(); |
711 | 712 | ||
712 | if ( mReadWrite ) { | 713 | if ( mReadWrite ) { |
713 | mActionCut->setEnabled( selected ); | 714 | mActionCut->setEnabled( selected ); |
714 | mActionPaste->setEnabled( selected ); | 715 | mActionPaste->setEnabled( selected ); |
715 | } | 716 | } |
716 | 717 | ||
717 | mActionCopy->setEnabled( selected ); | 718 | mActionCopy->setEnabled( selected ); |
718 | mActionDelete->setEnabled( selected ); | 719 | mActionDelete->setEnabled( selected ); |
719 | mActionEditAddressee->setEnabled( selected ); | 720 | mActionEditAddressee->setEnabled( selected ); |
720 | mActionMail->setEnabled( selected ); | 721 | mActionMail->setEnabled( selected ); |
721 | mActionMailVCard->setEnabled( selected ); | 722 | mActionMailVCard->setEnabled( selected ); |
722 | //if (mActionBeam) | 723 | //if (mActionBeam) |
723 | //mActionBeam->setEnabled( selected ); | 724 | //mActionBeam->setEnabled( selected ); |
724 | mActionWhoAmI->setEnabled( selected ); | 725 | mActionWhoAmI->setEnabled( selected ); |
725 | } | 726 | } |
726 | 727 | ||
727 | void KABCore::sendMail() | 728 | void KABCore::sendMail() |
728 | { | 729 | { |
729 | sendMail( mViewManager->selectedEmails().join( ", " ) ); | 730 | sendMail( mViewManager->selectedEmails().join( ", " ) ); |
730 | } | 731 | } |
731 | 732 | ||
732 | void KABCore::sendMail( const QString& emaillist ) | 733 | void KABCore::sendMail( const QString& emaillist ) |
733 | { | 734 | { |
734 | // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " | 735 | // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " |
735 | if (emaillist.contains(",") > 0) | 736 | if (emaillist.contains(",") > 0) |
736 | ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); | 737 | ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); |
737 | else | 738 | else |
738 | ExternalAppHandler::instance()->mailToOneContact( emaillist ); | 739 | ExternalAppHandler::instance()->mailToOneContact( emaillist ); |
739 | } | 740 | } |
740 | 741 | ||
741 | 742 | ||
742 | 743 | ||
743 | void KABCore::mailVCard() | 744 | void KABCore::mailVCard() |
744 | { | 745 | { |
745 | QStringList uids = mViewManager->selectedUids(); | 746 | QStringList uids = mViewManager->selectedUids(); |
746 | if ( !uids.isEmpty() ) | 747 | if ( !uids.isEmpty() ) |
747 | mailVCard( uids ); | 748 | mailVCard( uids ); |
748 | } | 749 | } |
749 | 750 | ||
750 | void KABCore::mailVCard( const QStringList& uids ) | 751 | void KABCore::mailVCard( const QStringList& uids ) |
751 | { | 752 | { |
752 | QStringList urls; | 753 | QStringList urls; |
753 | 754 | ||
754 | // QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); | 755 | // QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); |
755 | 756 | ||
756 | QString dirName = "/tmp/" + KApplication::randomString( 8 ); | 757 | QString dirName = "/tmp/" + KApplication::randomString( 8 ); |
757 | 758 | ||
758 | 759 | ||
759 | 760 | ||
760 | QDir().mkdir( dirName, true ); | 761 | QDir().mkdir( dirName, true ); |
761 | 762 | ||
762 | for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { | 763 | for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { |
763 | KABC::Addressee a = mAddressBook->findByUid( *it ); | 764 | KABC::Addressee a = mAddressBook->findByUid( *it ); |
764 | 765 | ||
765 | if ( a.isEmpty() ) | 766 | if ( a.isEmpty() ) |
766 | continue; | 767 | continue; |
767 | 768 | ||
768 | QString name = a.givenName() + "_" + a.familyName() + ".vcf"; | 769 | QString name = a.givenName() + "_" + a.familyName() + ".vcf"; |
769 | 770 | ||
770 | QString fileName = dirName + "/" + name; | 771 | QString fileName = dirName + "/" + name; |
771 | 772 | ||
772 | QFile outFile(fileName); | 773 | QFile outFile(fileName); |
773 | 774 | ||
774 | if ( outFile.open(IO_WriteOnly) ) { // file opened successfully | 775 | if ( outFile.open(IO_WriteOnly) ) { // file opened successfully |
775 | KABC::VCardConverter converter; | 776 | KABC::VCardConverter converter; |
776 | QString vcard; | 777 | QString vcard; |
777 | 778 | ||
778 | converter.addresseeToVCard( a, vcard ); | 779 | converter.addresseeToVCard( a, vcard ); |
779 | 780 | ||
780 | QTextStream t( &outFile ); // use a text stream | 781 | QTextStream t( &outFile ); // use a text stream |
781 | t.setEncoding( QTextStream::UnicodeUTF8 ); | 782 | t.setEncoding( QTextStream::UnicodeUTF8 ); |
782 | t << vcard; | 783 | t << vcard; |
783 | 784 | ||
784 | outFile.close(); | 785 | outFile.close(); |
785 | 786 | ||
786 | urls.append( fileName ); | 787 | urls.append( fileName ); |
787 | } | 788 | } |
788 | } | 789 | } |
789 | 790 | ||
790 | bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") ); | 791 | bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") ); |
791 | 792 | ||
792 | 793 | ||
793 | /*US | 794 | /*US |
794 | kapp->invokeMailer( QString::null, QString::null, QString::null, | 795 | kapp->invokeMailer( QString::null, QString::null, QString::null, |
795 | QString::null, // subject | 796 | QString::null, // subject |
796 | QString::null, // body | 797 | QString::null, // body |
797 | QString::null, | 798 | QString::null, |
798 | urls ); // attachments | 799 | urls ); // attachments |
799 | */ | 800 | */ |
800 | 801 | ||
801 | } | 802 | } |
802 | 803 | ||
803 | /** | 804 | /** |
804 | Beams the "WhoAmI contact. | 805 | Beams the "WhoAmI contact. |
805 | */ | 806 | */ |
806 | void KABCore::beamMySelf() | 807 | void KABCore::beamMySelf() |
807 | { | 808 | { |
808 | KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); | 809 | KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); |
809 | if (!a.isEmpty()) | 810 | if (!a.isEmpty()) |
810 | { | 811 | { |
811 | QStringList uids; | 812 | QStringList uids; |
812 | uids << a.uid(); | 813 | uids << a.uid(); |
813 | 814 | ||
814 | beamVCard(uids); | 815 | beamVCard(uids); |
815 | } else { | 816 | } else { |
816 | KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); | 817 | KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); |
817 | 818 | ||
818 | 819 | ||
819 | } | 820 | } |
820 | } | 821 | } |
821 | void KABCore::updateMainWindow() | 822 | void KABCore::updateMainWindow() |
822 | { | 823 | { |
823 | mMainWindow->showMaximized(); | 824 | mMainWindow->showMaximized(); |
824 | mMainWindow->update(); | 825 | mMainWindow->update(); |
825 | } | 826 | } |
826 | void KABCore::resizeEvent(QResizeEvent* e ) | 827 | void KABCore::resizeEvent(QResizeEvent* e ) |
827 | { | 828 | { |
828 | if ( !mMiniSplitter ) | 829 | if ( !mMiniSplitter ) |
829 | return; | 830 | return; |
830 | //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); | 831 | //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); |
831 | if ( QApplication::desktop()->width() >= 480 ) { | 832 | if ( QApplication::desktop()->width() >= 480 ) { |
832 | if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 | 833 | if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 |
833 | if ( mMiniSplitter->orientation() == Qt::Vertical ) { | 834 | if ( mMiniSplitter->orientation() == Qt::Vertical ) { |
834 | mMiniSplitter->setOrientation( Qt::Horizontal); | 835 | mMiniSplitter->setOrientation( Qt::Horizontal); |
835 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 836 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
836 | } | 837 | } |
837 | if ( QApplication::desktop()->width() <= 640 ) { | 838 | if ( QApplication::desktop()->width() <= 640 ) { |
839 | mMainWindow->showMinimized(); | ||
838 | //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); | 840 | //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); |
839 | mViewManager->getFilterAction()->setComboWidth( 150 ); | 841 | mViewManager->getFilterAction()->setComboWidth( 150 ); |
840 | if ( mIncSearchWidget ) | 842 | if ( mIncSearchWidget ) |
841 | mIncSearchWidget->setSize(); | 843 | mIncSearchWidget->setSize(); |
842 | QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); | 844 | QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); |
843 | } | 845 | } |
844 | 846 | ||
845 | } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 | 847 | } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 |
846 | if ( mMiniSplitter->orientation() == Qt::Horizontal ) { | 848 | if ( mMiniSplitter->orientation() == Qt::Horizontal ) { |
847 | mMiniSplitter->setOrientation( Qt::Vertical ); | 849 | mMiniSplitter->setOrientation( Qt::Vertical ); |
848 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); | 850 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); |
849 | } | 851 | } |
850 | if ( QApplication::desktop()->width() <= 640 ) { | 852 | if ( QApplication::desktop()->width() <= 640 ) { |
851 | //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); | 853 | //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); |
852 | mMainWindow->showMinimized(); | 854 | mMainWindow->showMinimized(); |
853 | if ( KABPrefs::instance()->mHideSearchOnSwitch ) { | 855 | if ( KABPrefs::instance()->mHideSearchOnSwitch ) { |
854 | if ( mIncSearchWidget ) { | 856 | if ( mIncSearchWidget ) { |
855 | mIncSearchWidget->setSize(); | 857 | mIncSearchWidget->setSize(); |
856 | } | 858 | } |
857 | } else { | 859 | } else { |
858 | mViewManager->getFilterAction()->setComboWidth( 0 ); | 860 | mViewManager->getFilterAction()->setComboWidth( 0 ); |
859 | } | 861 | } |
860 | QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); | 862 | QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); |
861 | } | 863 | } |
862 | } | 864 | } |
863 | } | 865 | } |
866 | QWidget::resizeEvent( e ); | ||
864 | 867 | ||
865 | } | 868 | } |
866 | void KABCore::export2phone() | 869 | void KABCore::export2phone() |
867 | { | 870 | { |
868 | 871 | ||
869 | QStringList uids; | 872 | QStringList uids; |
870 | XXPortSelectDialog dlg( this, false, this ); | 873 | XXPortSelectDialog dlg( this, false, this ); |
871 | if ( dlg.exec() ) | 874 | if ( dlg.exec() ) |
872 | uids = dlg.uids(); | 875 | uids = dlg.uids(); |
873 | else | 876 | else |
874 | return; | 877 | return; |
875 | if ( uids.isEmpty() ) | 878 | if ( uids.isEmpty() ) |
876 | return; | 879 | return; |
877 | // qDebug("count %d ", uids.count()); | 880 | // qDebug("count %d ", uids.count()); |
878 | 881 | ||
879 | KAex2phonePrefs ex2phone; | 882 | KAex2phonePrefs ex2phone; |
880 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 883 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |
881 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); | 884 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); |
882 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 885 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
883 | 886 | ||
884 | if ( !ex2phone.exec() ) { | 887 | if ( !ex2phone.exec() ) { |
885 | return; | 888 | return; |
886 | } | 889 | } |
887 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); | 890 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); |
888 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); | 891 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); |
889 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); | 892 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); |
890 | 893 | ||
891 | 894 | ||
892 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 895 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
893 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 896 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
894 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 897 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
895 | 898 | ||
896 | QString fileName = getPhoneFile(); | 899 | QString fileName = getPhoneFile(); |
897 | if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) | 900 | if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) |
898 | return; | 901 | return; |
899 | 902 | ||
900 | message(i18n("Exporting to phone...")); | 903 | message(i18n("Exporting to phone...")); |
901 | QTimer::singleShot( 1, this , SLOT ( writeToPhone())); | 904 | QTimer::singleShot( 1, this , SLOT ( writeToPhone())); |
902 | 905 | ||
903 | } | 906 | } |
904 | QString KABCore::getPhoneFile() | 907 | QString KABCore::getPhoneFile() |
905 | { | 908 | { |
906 | #ifdef DESKTOP_VERSION | 909 | #ifdef DESKTOP_VERSION |
907 | return locateLocal("tmp", "phonefile.vcf"); | 910 | return locateLocal("tmp", "phonefile.vcf"); |
908 | #else | 911 | #else |
909 | return "/tmp/phonefile.vcf"; | 912 | return "/tmp/phonefile.vcf"; |
910 | #endif | 913 | #endif |
911 | 914 | ||
912 | } | 915 | } |
913 | void KABCore::writeToPhone( ) | 916 | void KABCore::writeToPhone( ) |
914 | { | 917 | { |
915 | if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) | 918 | if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) |
916 | message(i18n("Export to phone finished!")); | 919 | message(i18n("Export to phone finished!")); |
917 | else | 920 | else |
918 | qDebug(i18n("KA: Error exporting to phone")); | 921 | qDebug(i18n("KA: Error exporting to phone")); |
919 | } | 922 | } |
920 | void KABCore::beamVCard() | 923 | void KABCore::beamVCard() |
921 | { | 924 | { |
922 | QStringList uids; | 925 | QStringList uids; |
923 | XXPortSelectDialog dlg( this, false, this ); | 926 | XXPortSelectDialog dlg( this, false, this ); |
924 | if ( dlg.exec() ) | 927 | if ( dlg.exec() ) |
925 | uids = dlg.uids(); | 928 | uids = dlg.uids(); |
926 | else | 929 | else |
927 | return; | 930 | return; |
928 | if ( uids.isEmpty() ) | 931 | if ( uids.isEmpty() ) |
929 | return; | 932 | return; |
930 | beamVCard( uids ); | 933 | beamVCard( uids ); |
931 | } | 934 | } |
932 | 935 | ||
933 | 936 | ||
934 | void KABCore::beamVCard(const QStringList& uids) | 937 | void KABCore::beamVCard(const QStringList& uids) |
935 | { | 938 | { |
936 | 939 | ||
937 | // LR: we should use the /tmp dir on the Zaurus, | 940 | // LR: we should use the /tmp dir on the Zaurus, |
938 | // because: /tmp = RAM, (HOME)/kdepim = flash memory | 941 | // because: /tmp = RAM, (HOME)/kdepim = flash memory |
939 | 942 | ||
940 | #ifdef DESKTOP_VERSION | 943 | #ifdef DESKTOP_VERSION |
941 | QString fileName = locateLocal("tmp", "kapibeamfile.vcf"); | 944 | QString fileName = locateLocal("tmp", "kapibeamfile.vcf"); |
942 | #else | 945 | #else |
943 | QString fileName = "/tmp/kapibeamfile.vcf"; | 946 | QString fileName = "/tmp/kapibeamfile.vcf"; |
944 | #endif | 947 | #endif |
945 | 948 | ||
946 | KABC::VCardConverter converter; | 949 | KABC::VCardConverter converter; |
947 | QString description; | 950 | QString description; |
948 | QString datastream; | 951 | QString datastream; |
949 | for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { | 952 | for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { |
950 | KABC::Addressee a = mAddressBook->findByUid( *it ); | 953 | KABC::Addressee a = mAddressBook->findByUid( *it ); |
951 | 954 | ||
952 | if ( a.isEmpty() ) | 955 | if ( a.isEmpty() ) |
953 | continue; | 956 | continue; |
954 | 957 | ||
955 | if (description.isEmpty()) | 958 | if (description.isEmpty()) |
956 | description = a.formattedName(); | 959 | description = a.formattedName(); |
957 | 960 | ||
958 | QString vcard; | 961 | QString vcard; |
959 | converter.addresseeToVCard( a, vcard ); | 962 | converter.addresseeToVCard( a, vcard ); |
960 | int start = 0; | 963 | int start = 0; |
961 | int next; | 964 | int next; |
962 | while ( (next = vcard.find("TYPE=", start) )>= 0 ) { | 965 | while ( (next = vcard.find("TYPE=", start) )>= 0 ) { |
963 | int semi = vcard.find(";", next); | 966 | int semi = vcard.find(";", next); |
964 | int dopp = vcard.find(":", next); | 967 | int dopp = vcard.find(":", next); |
965 | int sep; | 968 | int sep; |
966 | if ( semi < dopp && semi >= 0 ) | 969 | if ( semi < dopp && semi >= 0 ) |
967 | sep = semi ; | 970 | sep = semi ; |
968 | else | 971 | else |
969 | sep = dopp; | 972 | sep = dopp; |
970 | datastream +=vcard.mid( start, next - start); | 973 | datastream +=vcard.mid( start, next - start); |
971 | datastream +=vcard.mid( next+5,sep -next -5 ).upper(); | 974 | datastream +=vcard.mid( next+5,sep -next -5 ).upper(); |
972 | start = sep; | 975 | start = sep; |
973 | } | 976 | } |
974 | datastream += vcard.mid( start,vcard.length() ); | 977 | datastream += vcard.mid( start,vcard.length() ); |
975 | } | 978 | } |
976 | #ifndef DESKTOP_VERSION | 979 | #ifndef DESKTOP_VERSION |
977 | QFile outFile(fileName); | 980 | QFile outFile(fileName); |
978 | if ( outFile.open(IO_WriteOnly) ) { | 981 | if ( outFile.open(IO_WriteOnly) ) { |
979 | datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); | 982 | datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); |
980 | QTextStream t( &outFile ); // use a text stream | 983 | QTextStream t( &outFile ); // use a text stream |
981 | //t.setEncoding( QTextStream::UnicodeUTF8 ); | 984 | //t.setEncoding( QTextStream::UnicodeUTF8 ); |
982 | t.setEncoding( QTextStream::Latin1 ); | 985 | t.setEncoding( QTextStream::Latin1 ); |
983 | t <<datastream.latin1(); | 986 | t <<datastream.latin1(); |
984 | outFile.close(); | 987 | outFile.close(); |
985 | Ir *ir = new Ir( this ); | 988 | Ir *ir = new Ir( this ); |
986 | connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); | 989 | connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); |
987 | ir->send( fileName, description, "text/x-vCard" ); | 990 | ir->send( fileName, description, "text/x-vCard" ); |
988 | } else { | 991 | } else { |
989 | qDebug("KA: Error open temp beam file "); | 992 | qDebug("KA: Error open temp beam file "); |
990 | return; | 993 | return; |
991 | } | 994 | } |
992 | #endif | 995 | #endif |
993 | 996 | ||
994 | } | 997 | } |
995 | 998 | ||
996 | void KABCore::beamDone( Ir *ir ) | 999 | void KABCore::beamDone( Ir *ir ) |
997 | { | 1000 | { |
998 | #ifndef DESKTOP_VERSION | 1001 | #ifndef DESKTOP_VERSION |
999 | delete ir; | 1002 | delete ir; |
1000 | #endif | 1003 | #endif |
1001 | topLevelWidget()->raise(); | 1004 | topLevelWidget()->raise(); |
1002 | message( i18n("Beaming finished!") ); | 1005 | message( i18n("Beaming finished!") ); |
1003 | } | 1006 | } |
1004 | 1007 | ||
1005 | 1008 | ||
1006 | void KABCore::browse( const QString& url ) | 1009 | void KABCore::browse( const QString& url ) |
1007 | { | 1010 | { |
1008 | #ifndef KAB_EMBEDDED | 1011 | #ifndef KAB_EMBEDDED |
1009 | kapp->invokeBrowser( url ); | 1012 | kapp->invokeBrowser( url ); |
1010 | #else //KAB_EMBEDDED | 1013 | #else //KAB_EMBEDDED |
1011 | qDebug("KABCore::browse must be fixed"); | 1014 | qDebug("KABCore::browse must be fixed"); |
1012 | #endif //KAB_EMBEDDED | 1015 | #endif //KAB_EMBEDDED |
1013 | } | 1016 | } |
1014 | 1017 | ||
1015 | void KABCore::selectAllContacts() | 1018 | void KABCore::selectAllContacts() |
1016 | { | 1019 | { |
1017 | mViewManager->setSelected( QString::null, true ); | 1020 | mViewManager->setSelected( QString::null, true ); |
1018 | } | 1021 | } |
1019 | 1022 | ||
1020 | void KABCore::deleteContacts() | 1023 | void KABCore::deleteContacts() |
1021 | { | 1024 | { |
1022 | QStringList uidList = mViewManager->selectedUids(); | 1025 | QStringList uidList = mViewManager->selectedUids(); |
1023 | deleteContacts( uidList ); | 1026 | deleteContacts( uidList ); |
1024 | } | 1027 | } |
1025 | 1028 | ||
1026 | void KABCore::deleteContacts( const QStringList &uids ) | 1029 | void KABCore::deleteContacts( const QStringList &uids ) |
1027 | { | 1030 | { |
1028 | if ( uids.count() > 0 ) { | 1031 | if ( uids.count() > 0 ) { |
1029 | PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); | 1032 | PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); |
1030 | UndoStack::instance()->push( command ); | 1033 | UndoStack::instance()->push( command ); |
1031 | RedoStack::instance()->clear(); | 1034 | RedoStack::instance()->clear(); |
1032 | 1035 | ||
1033 | // now if we deleted anything, refresh | 1036 | // now if we deleted anything, refresh |
1034 | setContactSelected( QString::null ); | 1037 | setContactSelected( QString::null ); |
1035 | setModified( true ); | 1038 | setModified( true ); |
1036 | } | 1039 | } |
1037 | } | 1040 | } |
1038 | 1041 | ||
1039 | void KABCore::copyContacts() | 1042 | void KABCore::copyContacts() |
1040 | { | 1043 | { |
1041 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); | 1044 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); |
1042 | 1045 | ||
1043 | QString clipText = AddresseeUtil::addresseesToClipboard( addrList ); | 1046 | QString clipText = AddresseeUtil::addresseesToClipboard( addrList ); |
1044 | 1047 | ||
1045 | kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl; | 1048 | kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl; |
1046 | 1049 | ||
1047 | QClipboard *cb = QApplication::clipboard(); | 1050 | QClipboard *cb = QApplication::clipboard(); |
1048 | cb->setText( clipText ); | 1051 | cb->setText( clipText ); |
1049 | } | 1052 | } |
1050 | 1053 | ||
1051 | void KABCore::cutContacts() | 1054 | void KABCore::cutContacts() |
1052 | { | 1055 | { |
1053 | QStringList uidList = mViewManager->selectedUids(); | 1056 | QStringList uidList = mViewManager->selectedUids(); |
1054 | 1057 | ||
1055 | //US if ( uidList.size() > 0 ) { | 1058 | //US if ( uidList.size() > 0 ) { |
1056 | if ( uidList.count() > 0 ) { | 1059 | if ( uidList.count() > 0 ) { |
1057 | PwCutCommand *command = new PwCutCommand( mAddressBook, uidList ); | 1060 | PwCutCommand *command = new PwCutCommand( mAddressBook, uidList ); |
1058 | UndoStack::instance()->push( command ); | 1061 | UndoStack::instance()->push( command ); |
1059 | RedoStack::instance()->clear(); | 1062 | RedoStack::instance()->clear(); |
1060 | 1063 | ||
1061 | setModified( true ); | 1064 | setModified( true ); |
1062 | } | 1065 | } |
1063 | } | 1066 | } |
1064 | 1067 | ||
1065 | void KABCore::pasteContacts() | 1068 | void KABCore::pasteContacts() |
1066 | { | 1069 | { |
1067 | QClipboard *cb = QApplication::clipboard(); | 1070 | QClipboard *cb = QApplication::clipboard(); |
1068 | 1071 | ||
1069 | KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); | 1072 | KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); |
1070 | 1073 | ||
1071 | pasteContacts( list ); | 1074 | pasteContacts( list ); |
1072 | } | 1075 | } |
1073 | 1076 | ||
1074 | void KABCore::pasteContacts( KABC::Addressee::List &list ) | 1077 | void KABCore::pasteContacts( KABC::Addressee::List &list ) |
1075 | { | 1078 | { |
1076 | KABC::Resource *resource = requestResource( this ); | 1079 | KABC::Resource *resource = requestResource( this ); |
1077 | KABC::Addressee::List::Iterator it; | 1080 | KABC::Addressee::List::Iterator it; |
1078 | for ( it = list.begin(); it != list.end(); ++it ) | 1081 | for ( it = list.begin(); it != list.end(); ++it ) |
1079 | (*it).setResource( resource ); | 1082 | (*it).setResource( resource ); |
1080 | 1083 | ||
1081 | PwPasteCommand *command = new PwPasteCommand( this, list ); | 1084 | PwPasteCommand *command = new PwPasteCommand( this, list ); |
1082 | UndoStack::instance()->push( command ); | 1085 | UndoStack::instance()->push( command ); |
1083 | RedoStack::instance()->clear(); | 1086 | RedoStack::instance()->clear(); |
1084 | 1087 | ||
1085 | setModified( true ); | 1088 | setModified( true ); |
1086 | } | 1089 | } |
1087 | 1090 | ||
1088 | void KABCore::setWhoAmI() | 1091 | void KABCore::setWhoAmI() |
1089 | { | 1092 | { |
1090 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); | 1093 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); |
1091 | 1094 | ||
1092 | if ( addrList.count() > 1 ) { | 1095 | if ( addrList.count() > 1 ) { |
1093 | KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); | 1096 | KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); |
1094 | return; | 1097 | return; |
1095 | } | 1098 | } |
1096 | 1099 | ||
1097 | QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); | 1100 | QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); |
1098 | if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) | 1101 | if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) |
1099 | static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); | 1102 | static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); |
1100 | } | 1103 | } |
1101 | void KABCore::editCategories() | 1104 | void KABCore::editCategories() |
1102 | { | 1105 | { |
1103 | KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true ); | 1106 | KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true ); |
1104 | dlg.exec(); | 1107 | dlg.exec(); |
1105 | } | 1108 | } |
1106 | void KABCore::setCategories() | 1109 | void KABCore::setCategories() |
1107 | { | 1110 | { |
1108 | 1111 | ||
1109 | QStringList uids; | 1112 | QStringList uids; |
1110 | XXPortSelectDialog dlgx( this, false, this ); | 1113 | XXPortSelectDialog dlgx( this, false, this ); |
1111 | if ( dlgx.exec() ) | 1114 | if ( dlgx.exec() ) |
1112 | uids = dlgx.uids(); | 1115 | uids = dlgx.uids(); |
1113 | else | 1116 | else |
1114 | return; | 1117 | return; |
1115 | if ( uids.isEmpty() ) | 1118 | if ( uids.isEmpty() ) |
1116 | return; | 1119 | return; |
1117 | // qDebug("count %d ", uids.count()); | 1120 | // qDebug("count %d ", uids.count()); |
1118 | 1121 | ||
1119 | 1122 | ||
1120 | KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); | 1123 | KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); |
1121 | if ( !dlg.exec() ) { | 1124 | if ( !dlg.exec() ) { |
1122 | message( i18n("Setting categories cancelled") ); | 1125 | message( i18n("Setting categories cancelled") ); |
1123 | return; | 1126 | return; |
1124 | } | 1127 | } |
1125 | bool merge = false; | 1128 | bool merge = false; |
1126 | QString msg = i18n( "Merge with existing categories?" ); | 1129 | QString msg = i18n( "Merge with existing categories?" ); |
1127 | if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) | 1130 | if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) |
1128 | merge = true; | 1131 | merge = true; |
1129 | 1132 | ||
1130 | message( i18n("Setting categories ... please wait!") ); | 1133 | message( i18n("Setting categories ... please wait!") ); |
1131 | QStringList categories = dlg.selectedCategories(); | 1134 | QStringList categories = dlg.selectedCategories(); |
1132 | 1135 | ||
1133 | //QStringList uids = mViewManager->selectedUids(); | 1136 | //QStringList uids = mViewManager->selectedUids(); |
1134 | QStringList::Iterator it; | 1137 | QStringList::Iterator it; |
1135 | for ( it = uids.begin(); it != uids.end(); ++it ) { | 1138 | for ( it = uids.begin(); it != uids.end(); ++it ) { |
1136 | KABC::Addressee addr = mAddressBook->findByUid( *it ); | 1139 | KABC::Addressee addr = mAddressBook->findByUid( *it ); |
1137 | if ( !addr.isEmpty() ) { | 1140 | if ( !addr.isEmpty() ) { |
1138 | if ( !merge ) | 1141 | if ( !merge ) |
1139 | addr.setCategories( categories ); | 1142 | addr.setCategories( categories ); |
1140 | else { | 1143 | else { |
1141 | QStringList addrCategories = addr.categories(); | 1144 | QStringList addrCategories = addr.categories(); |
1142 | QStringList::Iterator catIt; | 1145 | QStringList::Iterator catIt; |
1143 | for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { | 1146 | for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { |
1144 | if ( !addrCategories.contains( *catIt ) ) | 1147 | if ( !addrCategories.contains( *catIt ) ) |
1145 | addrCategories.append( *catIt ); | 1148 | addrCategories.append( *catIt ); |
1146 | } | 1149 | } |
1147 | addr.setCategories( addrCategories ); | 1150 | addr.setCategories( addrCategories ); |
1148 | } | 1151 | } |
1149 | mAddressBook->insertAddressee( addr ); | 1152 | mAddressBook->insertAddressee( addr ); |
1150 | } | 1153 | } |
1151 | } | 1154 | } |
1152 | 1155 | ||
1153 | if ( uids.count() > 0 ) | 1156 | if ( uids.count() > 0 ) |
1154 | setModified( true ); | 1157 | setModified( true ); |
1155 | message( i18n("Setting categories completed!") ); | 1158 | message( i18n("Setting categories completed!") ); |
1156 | } | 1159 | } |
1157 | 1160 | ||
1158 | void KABCore::setSearchFields( const KABC::Field::List &fields ) | 1161 | void KABCore::setSearchFields( const KABC::Field::List &fields ) |
1159 | { | 1162 | { |
1160 | mIncSearchWidget->setFields( fields ); | 1163 | mIncSearchWidget->setFields( fields ); |
1161 | } | 1164 | } |
1162 | 1165 | ||
1163 | void KABCore::incrementalSearch( const QString& text ) | 1166 | void KABCore::incrementalSearch( const QString& text ) |
1164 | { | 1167 | { |
1165 | QString stext; | 1168 | QString stext; |
1166 | if ( KABPrefs::instance()->mAutoSearchWithWildcard ) { | 1169 | if ( KABPrefs::instance()->mAutoSearchWithWildcard ) { |
1167 | stext = "*" + text; | 1170 | stext = "*" + text; |
1168 | } else { | 1171 | } else { |
1169 | stext = text; | 1172 | stext = text; |
1170 | } | 1173 | } |
1171 | mViewManager->doSearch( stext, mIncSearchWidget->currentField() ); | 1174 | mViewManager->doSearch( stext, mIncSearchWidget->currentField() ); |
1172 | } | 1175 | } |
1173 | 1176 | ||
1174 | void KABCore::setModified() | 1177 | void KABCore::setModified() |
1175 | { | 1178 | { |
1176 | setModified( true ); | 1179 | setModified( true ); |
1177 | } | 1180 | } |
1178 | 1181 | ||
1179 | void KABCore::setModifiedWOrefresh() | 1182 | void KABCore::setModifiedWOrefresh() |
1180 | { | 1183 | { |
1181 | // qDebug("KABCore::setModifiedWOrefresh() "); | 1184 | // qDebug("KABCore::setModifiedWOrefresh() "); |
1182 | mModified = true; | 1185 | mModified = true; |
1183 | mActionSave->setEnabled( mModified ); | 1186 | mActionSave->setEnabled( mModified ); |
1184 | 1187 | ||
1185 | 1188 | ||
1186 | } | 1189 | } |
1187 | void KABCore::setModified( bool modified ) | 1190 | void KABCore::setModified( bool modified ) |
1188 | { | 1191 | { |
1189 | mModified = modified; | 1192 | mModified = modified; |
1190 | mActionSave->setEnabled( mModified ); | 1193 | mActionSave->setEnabled( mModified ); |
1191 | 1194 | ||
1192 | if ( modified ) | 1195 | if ( modified ) |
1193 | mJumpButtonBar->recreateButtons(); | 1196 | mJumpButtonBar->recreateButtons(); |
1194 | 1197 | ||
1195 | mViewManager->refreshView(); | 1198 | mViewManager->refreshView(); |
1196 | 1199 | ||
1197 | } | 1200 | } |
1198 | 1201 | ||
1199 | bool KABCore::modified() const | 1202 | bool KABCore::modified() const |
1200 | { | 1203 | { |
1201 | return mModified; | 1204 | return mModified; |
1202 | } | 1205 | } |
1203 | 1206 | ||
1204 | void KABCore::contactModified( const KABC::Addressee &addr ) | 1207 | void KABCore::contactModified( const KABC::Addressee &addr ) |
1205 | { | 1208 | { |
1206 | addrModified( addr ); | 1209 | addrModified( addr ); |
1207 | #if 0 // debug only | 1210 | #if 0 // debug only |
1208 | KABC::Addressee ad = addr; | 1211 | KABC::Addressee ad = addr; |
1209 | ad.computeCsum( "123"); | 1212 | ad.computeCsum( "123"); |
1210 | #endif | 1213 | #endif |
1211 | } | 1214 | } |
1212 | 1215 | ||
1213 | void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails ) | 1216 | void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails ) |
1214 | { | 1217 | { |
1215 | 1218 | ||
1216 | Command *command = 0; | 1219 | Command *command = 0; |
1217 | QString uid; | 1220 | QString uid; |
1218 | 1221 | ||
1219 | // check if it exists already | 1222 | // check if it exists already |
1220 | KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() ); | 1223 | KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() ); |
1221 | if ( origAddr.isEmpty() ) | 1224 | if ( origAddr.isEmpty() ) |
1222 | command = new PwNewCommand( mAddressBook, addr ); | 1225 | command = new PwNewCommand( mAddressBook, addr ); |
1223 | else { | 1226 | else { |
1224 | command = new PwEditCommand( mAddressBook, origAddr, addr ); | 1227 | command = new PwEditCommand( mAddressBook, origAddr, addr ); |
1225 | uid = addr.uid(); | 1228 | uid = addr.uid(); |
1226 | } | 1229 | } |
1227 | 1230 | ||
1228 | UndoStack::instance()->push( command ); | 1231 | UndoStack::instance()->push( command ); |
1229 | RedoStack::instance()->clear(); | 1232 | RedoStack::instance()->clear(); |
1230 | if ( updateDetails ) | 1233 | if ( updateDetails ) |
1231 | mDetails->setAddressee( addr ); | 1234 | mDetails->setAddressee( addr ); |
1232 | setModified( true ); | 1235 | setModified( true ); |
1233 | } | 1236 | } |
1234 | 1237 | ||
1235 | void KABCore::newContact() | 1238 | void KABCore::newContact() |
1236 | { | 1239 | { |
1237 | 1240 | ||
1238 | 1241 | ||
1239 | QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); | 1242 | QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); |
1240 | 1243 | ||
1241 | QPtrList<KRES::Resource> kresResources; | 1244 | QPtrList<KRES::Resource> kresResources; |
1242 | QPtrListIterator<KABC::Resource> it( kabcResources ); | 1245 | QPtrListIterator<KABC::Resource> it( kabcResources ); |
1243 | KABC::Resource *resource; | 1246 | KABC::Resource *resource; |
1244 | while ( ( resource = it.current() ) != 0 ) { | 1247 | while ( ( resource = it.current() ) != 0 ) { |
1245 | ++it; | 1248 | ++it; |
1246 | if ( !resource->readOnly() ) { | 1249 | if ( !resource->readOnly() ) { |
1247 | KRES::Resource *res = static_cast<KRES::Resource*>( resource ); | 1250 | KRES::Resource *res = static_cast<KRES::Resource*>( resource ); |
1248 | if ( res ) | 1251 | if ( res ) |
1249 | kresResources.append( res ); | 1252 | kresResources.append( res ); |
1250 | } | 1253 | } |
1251 | } | 1254 | } |
1252 | 1255 | ||
1253 | KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this ); | 1256 | KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this ); |
1254 | resource = static_cast<KABC::Resource*>( res ); | 1257 | resource = static_cast<KABC::Resource*>( res ); |
1255 | 1258 | ||
1256 | if ( resource ) { | 1259 | if ( resource ) { |
1257 | KABC::Addressee addr; | 1260 | KABC::Addressee addr; |
1258 | addr.setResource( resource ); | 1261 | addr.setResource( resource ); |
1259 | mEditorDialog->setAddressee( addr ); | 1262 | mEditorDialog->setAddressee( addr ); |
1260 | KApplication::execDialog ( mEditorDialog ); | 1263 | KApplication::execDialog ( mEditorDialog ); |
1261 | 1264 | ||
1262 | } else | 1265 | } else |
1263 | return; | 1266 | return; |
1264 | 1267 | ||
1265 | // mEditorDict.insert( dialog->addressee().uid(), dialog ); | 1268 | // mEditorDict.insert( dialog->addressee().uid(), dialog ); |
1266 | 1269 | ||
1267 | 1270 | ||
1268 | } | 1271 | } |
1269 | 1272 | ||
1270 | void KABCore::addEmail( QString aStr ) | 1273 | void KABCore::addEmail( QString aStr ) |
1271 | { | 1274 | { |
1272 | #ifndef KAB_EMBEDDED | 1275 | #ifndef KAB_EMBEDDED |
1273 | QString fullName, email; | 1276 | QString fullName, email; |
1274 | 1277 | ||
1275 | KABC::Addressee::parseEmailAddress( aStr, fullName, email ); | 1278 | KABC::Addressee::parseEmailAddress( aStr, fullName, email ); |
1276 | 1279 | ||
1277 | // Try to lookup the addressee matching the email address | 1280 | // Try to lookup the addressee matching the email address |
1278 | bool found = false; | 1281 | bool found = false; |
1279 | QStringList emailList; | 1282 | QStringList emailList; |
1280 | KABC::AddressBook::Iterator it; | 1283 | KABC::AddressBook::Iterator it; |
1281 | for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) { | 1284 | for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) { |
1282 | emailList = (*it).emails(); | 1285 | emailList = (*it).emails(); |
1283 | if ( emailList.contains( email ) > 0 ) { | 1286 | if ( emailList.contains( email ) > 0 ) { |
1284 | found = true; | 1287 | found = true; |
1285 | (*it).setNameFromString( fullName ); | 1288 | (*it).setNameFromString( fullName ); |
1286 | editContact( (*it).uid() ); | 1289 | editContact( (*it).uid() ); |
1287 | } | 1290 | } |
1288 | } | 1291 | } |
1289 | 1292 | ||
1290 | if ( !found ) { | 1293 | if ( !found ) { |
1291 | KABC::Addressee addr; | 1294 | KABC::Addressee addr; |
1292 | addr.setNameFromString( fullName ); | 1295 | addr.setNameFromString( fullName ); |
1293 | addr.insertEmail( email, true ); | 1296 | addr.insertEmail( email, true ); |
1294 | 1297 | ||
1295 | mAddressBook->insertAddressee( addr ); | 1298 | mAddressBook->insertAddressee( addr ); |
1296 | mViewManager->refreshView( addr.uid() ); | 1299 | mViewManager->refreshView( addr.uid() ); |
1297 | editContact( addr.uid() ); | 1300 | editContact( addr.uid() ); |
1298 | } | 1301 | } |
1299 | #else //KAB_EMBEDDED | 1302 | #else //KAB_EMBEDDED |
1300 | qDebug("KABCore::addEmail finsih method"); | 1303 | qDebug("KABCore::addEmail finsih method"); |
1301 | #endif //KAB_EMBEDDED | 1304 | #endif //KAB_EMBEDDED |
1302 | } | 1305 | } |
1303 | 1306 | ||
1304 | void KABCore::importVCard( const KURL &url, bool showPreview ) | 1307 | void KABCore::importVCard( const KURL &url, bool showPreview ) |
1305 | { | 1308 | { |
1306 | mXXPortManager->importVCard( url, showPreview ); | 1309 | mXXPortManager->importVCard( url, showPreview ); |
1307 | } | 1310 | } |
1308 | void KABCore::importFromOL() | 1311 | void KABCore::importFromOL() |
1309 | { | 1312 | { |
1310 | #ifdef _OL_IMPORT_ | 1313 | #ifdef _OL_IMPORT_ |
1311 | KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); | 1314 | KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); |
1312 | idgl->exec(); | 1315 | idgl->exec(); |
1313 | KABC::Addressee::List list = idgl->getAddressList(); | 1316 | KABC::Addressee::List list = idgl->getAddressList(); |
1314 | if ( list.count() > 0 ) { | 1317 | if ( list.count() > 0 ) { |
1315 | KABC::Addressee::List listNew; | 1318 | KABC::Addressee::List listNew; |
1316 | KABC::Addressee::List listExisting; | 1319 | KABC::Addressee::List listExisting; |
1317 | KABC::Addressee::List::Iterator it; | 1320 | KABC::Addressee::List::Iterator it; |
1318 | KABC::AddressBook::Iterator iter; | 1321 | KABC::AddressBook::Iterator iter; |
1319 | for ( it = list.begin(); it != list.end(); ++it ) { | 1322 | for ( it = list.begin(); it != list.end(); ++it ) { |
1320 | if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) | 1323 | if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) |
1321 | listNew.append( (*it) ); | 1324 | listNew.append( (*it) ); |
1322 | else | 1325 | else |
1323 | listExisting.append( (*it) ); | 1326 | listExisting.append( (*it) ); |
1324 | } | 1327 | } |
1325 | if ( listExisting.count() > 0 ) | 1328 | if ( listExisting.count() > 0 ) |
1326 | KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() )); | 1329 | KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() )); |
1327 | if ( listNew.count() > 0 ) { | 1330 | if ( listNew.count() > 0 ) { |
1328 | pasteWithNewUid = false; | 1331 | pasteWithNewUid = false; |
1329 | pasteContacts( listNew ); | 1332 | pasteContacts( listNew ); |
1330 | pasteWithNewUid = true; | 1333 | pasteWithNewUid = true; |
1331 | } | 1334 | } |
1332 | } | 1335 | } |
1333 | delete idgl; | 1336 | delete idgl; |
1334 | #endif | 1337 | #endif |
1335 | } | 1338 | } |
1336 | 1339 | ||
1337 | void KABCore::importVCard( const QString &vCard, bool showPreview ) | 1340 | void KABCore::importVCard( const QString &vCard, bool showPreview ) |
1338 | { | 1341 | { |
1339 | mXXPortManager->importVCard( vCard, showPreview ); | 1342 | mXXPortManager->importVCard( vCard, showPreview ); |
1340 | } | 1343 | } |
1341 | 1344 | ||
1342 | //US added a second method without defaultparameter | 1345 | //US added a second method without defaultparameter |
1343 | void KABCore::editContact2() { | 1346 | void KABCore::editContact2() { |
1344 | editContact( QString::null ); | 1347 | editContact( QString::null ); |
1345 | } | 1348 | } |
1346 | 1349 | ||
1347 | void KABCore::editContact( const QString &uid ) | 1350 | void KABCore::editContact( const QString &uid ) |
1348 | { | 1351 | { |
1349 | 1352 | ||
1350 | if ( mExtensionManager->isQuickEditVisible() ) | 1353 | if ( mExtensionManager->isQuickEditVisible() ) |
1351 | return; | 1354 | return; |
1352 | 1355 | ||
1353 | // First, locate the contact entry | 1356 | // First, locate the contact entry |
1354 | QString localUID = uid; | 1357 | QString localUID = uid; |
1355 | if ( localUID.isNull() ) { | 1358 | if ( localUID.isNull() ) { |
1356 | QStringList uidList = mViewManager->selectedUids(); | 1359 | QStringList uidList = mViewManager->selectedUids(); |
1357 | if ( uidList.count() > 0 ) | 1360 | if ( uidList.count() > 0 ) |
1358 | localUID = *( uidList.at( 0 ) ); | 1361 | localUID = *( uidList.at( 0 ) ); |
1359 | } | 1362 | } |
1360 | 1363 | ||
1361 | KABC::Addressee addr = mAddressBook->findByUid( localUID ); | 1364 | KABC::Addressee addr = mAddressBook->findByUid( localUID ); |
1362 | if ( !addr.isEmpty() ) { | 1365 | if ( !addr.isEmpty() ) { |
1363 | mEditorDialog->setAddressee( addr ); | 1366 | mEditorDialog->setAddressee( addr ); |
1364 | KApplication::execDialog ( mEditorDialog ); | 1367 | KApplication::execDialog ( mEditorDialog ); |
1365 | } | 1368 | } |
1366 | } | 1369 | } |
1367 | 1370 | ||
1368 | /** | 1371 | /** |
1369 | Shows or edits the detail view for the given uid. If the uid is QString::null, | 1372 | Shows or edits the detail view for the given uid. If the uid is QString::null, |
1370 | the method will try to find a selected addressee in the view. | 1373 | the method will try to find a selected addressee in the view. |
1371 | */ | 1374 | */ |
1372 | void KABCore::executeContact( const QString &uid /*US = QString::null*/ ) | 1375 | void KABCore::executeContact( const QString &uid /*US = QString::null*/ ) |
1373 | { | 1376 | { |
1374 | if ( mMultipleViewsAtOnce ) | 1377 | if ( mMultipleViewsAtOnce ) |
1375 | { | 1378 | { |
1376 | editContact( uid ); | 1379 | editContact( uid ); |
1377 | } | 1380 | } |
1378 | else | 1381 | else |
1379 | { | 1382 | { |
1380 | setDetailsVisible( true ); | 1383 | setDetailsVisible( true ); |
1381 | mActionDetails->setChecked(true); | 1384 | mActionDetails->setChecked(true); |
1382 | } | 1385 | } |
1383 | 1386 | ||
1384 | } | 1387 | } |
1385 | 1388 | ||
1386 | void KABCore::save() | 1389 | void KABCore::save() |
1387 | { | 1390 | { |
1388 | if (syncManager->blockSave()) | 1391 | if (syncManager->blockSave()) |
1389 | return; | 1392 | return; |
1390 | if ( !mModified ) | 1393 | if ( !mModified ) |
1391 | return; | 1394 | return; |
1392 | 1395 | ||
1393 | syncManager->setBlockSave(true); | 1396 | syncManager->setBlockSave(true); |
1394 | QString text = i18n( "There was an error while attempting to save\n the " | 1397 | QString text = i18n( "There was an error while attempting to save\n the " |
1395 | "address book. Please check that some \nother application is " | 1398 | "address book. Please check that some \nother application is " |
1396 | "not using it. " ); | 1399 | "not using it. " ); |
1397 | message(i18n("Saving ... please wait! "), false); | 1400 | message(i18n("Saving ... please wait! "), false); |
1398 | //qApp->processEvents(); | 1401 | //qApp->processEvents(); |
1399 | #ifndef KAB_EMBEDDED | 1402 | #ifndef KAB_EMBEDDED |
1400 | KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); | 1403 | KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); |
1401 | if ( !b || !b->save() ) { | 1404 | if ( !b || !b->save() ) { |
1402 | KMessageBox::error( this, text, i18n( "Unable to Save" ) ); | 1405 | KMessageBox::error( this, text, i18n( "Unable to Save" ) ); |
1403 | } | 1406 | } |
1404 | #else //KAB_EMBEDDED | 1407 | #else //KAB_EMBEDDED |
1405 | KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); | 1408 | KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); |
1406 | if ( !b || !b->save() ) { | 1409 | if ( !b || !b->save() ) { |
1407 | QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); | 1410 | QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); |
1408 | } | 1411 | } |
1409 | #endif //KAB_EMBEDDED | 1412 | #endif //KAB_EMBEDDED |
1410 | 1413 | ||
1411 | message(i18n("Addressbook saved!")); | 1414 | message(i18n("Addressbook saved!")); |
1412 | setModified( false ); | 1415 | setModified( false ); |
1413 | syncManager->setBlockSave(false); | 1416 | syncManager->setBlockSave(false); |
1414 | } | 1417 | } |
1415 | 1418 | ||
1416 | 1419 | ||
1417 | void KABCore::undo() | 1420 | void KABCore::undo() |
1418 | { | 1421 | { |
1419 | UndoStack::instance()->undo(); | 1422 | UndoStack::instance()->undo(); |
1420 | 1423 | ||
1421 | // Refresh the view | 1424 | // Refresh the view |
1422 | mViewManager->refreshView(); | 1425 | mViewManager->refreshView(); |
1423 | } | 1426 | } |
1424 | 1427 | ||
1425 | void KABCore::redo() | 1428 | void KABCore::redo() |
1426 | { | 1429 | { |
1427 | RedoStack::instance()->redo(); | 1430 | RedoStack::instance()->redo(); |
1428 | 1431 | ||
1429 | // Refresh the view | 1432 | // Refresh the view |
1430 | mViewManager->refreshView(); | 1433 | mViewManager->refreshView(); |
1431 | } | 1434 | } |
1432 | void KABCore::setJumpButtonBar( bool visible ) | 1435 | void KABCore::setJumpButtonBar( bool visible ) |
1433 | { | 1436 | { |
1434 | setJumpButtonBarVisible(visible ); | 1437 | setJumpButtonBarVisible(visible ); |
1435 | saveSettings(); | 1438 | saveSettings(); |
1436 | } | 1439 | } |
1437 | void KABCore::setJumpButtonBarVisible( bool visible ) | 1440 | void KABCore::setJumpButtonBarVisible( bool visible ) |
1438 | { | 1441 | { |
1439 | if (mMultipleViewsAtOnce) | 1442 | if (mMultipleViewsAtOnce) |
1440 | { | 1443 | { |
1441 | if ( visible ) | 1444 | if ( visible ) |
1442 | mJumpButtonBar->show(); | 1445 | mJumpButtonBar->show(); |
1443 | else | 1446 | else |
1444 | mJumpButtonBar->hide(); | 1447 | mJumpButtonBar->hide(); |
1445 | } | 1448 | } |
1446 | else | 1449 | else |
1447 | { | 1450 | { |
1448 | // show the jumpbar only if "the details are hidden" == "viewmanager are shown" | 1451 | // show the jumpbar only if "the details are hidden" == "viewmanager are shown" |
1449 | if (mViewManager->isVisible()) | 1452 | if (mViewManager->isVisible()) |
1450 | { | 1453 | { |
1451 | if ( visible ) | 1454 | if ( visible ) |
1452 | mJumpButtonBar->show(); | 1455 | mJumpButtonBar->show(); |
1453 | else | 1456 | else |
1454 | mJumpButtonBar->hide(); | 1457 | mJumpButtonBar->hide(); |
1455 | } | 1458 | } |
1456 | else | 1459 | else |
1457 | { | 1460 | { |
1458 | mJumpButtonBar->hide(); | 1461 | mJumpButtonBar->hide(); |
1459 | } | 1462 | } |
1460 | } | 1463 | } |
1461 | if ( visible ) { | 1464 | if ( visible ) { |
1462 | if ( mIncSearchWidget->currentItem() == 0 ) { | 1465 | if ( mIncSearchWidget->currentItem() == 0 ) { |
1463 | message( i18n("Change search field enable jump bar") ); | 1466 | message( i18n("Change search field enable jump bar") ); |
1464 | } | 1467 | } |
1465 | } | 1468 | } |
1466 | } | 1469 | } |
1467 | 1470 | ||
1468 | 1471 | ||
1469 | void KABCore::setDetailsToState() | 1472 | void KABCore::setDetailsToState() |
1470 | { | 1473 | { |
1471 | setDetailsVisible( mActionDetails->isChecked() ); | 1474 | setDetailsVisible( mActionDetails->isChecked() ); |
1472 | } | 1475 | } |
1473 | void KABCore::setDetailsToggle() | 1476 | void KABCore::setDetailsToggle() |
1474 | { | 1477 | { |
1475 | mActionDetails->setChecked( !mActionDetails->isChecked() ); | 1478 | mActionDetails->setChecked( !mActionDetails->isChecked() ); |
1476 | setDetailsToState(); | 1479 | setDetailsToState(); |
1477 | } | 1480 | } |
1478 | 1481 | ||
1479 | 1482 | ||
1480 | 1483 | ||
1481 | void KABCore::setDetailsVisible( bool visible ) | 1484 | void KABCore::setDetailsVisible( bool visible ) |
1482 | { | 1485 | { |
1483 | if (visible && mDetails->isHidden()) | 1486 | if (visible && mDetails->isHidden()) |
1484 | { | 1487 | { |
1485 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); | 1488 | KABC::Addressee::List addrList = mViewManager->selectedAddressees(); |
1486 | if ( addrList.count() > 0 ) | 1489 | if ( addrList.count() > 0 ) |
1487 | mDetails->setAddressee( addrList[ 0 ] ); | 1490 | mDetails->setAddressee( addrList[ 0 ] ); |
1488 | } | 1491 | } |
1489 | 1492 | ||
1490 | // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between | 1493 | // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between |
1491 | // the listview and the detailview. We do that by changing the splitbar size. | 1494 | // the listview and the detailview. We do that by changing the splitbar size. |
1492 | if (mMultipleViewsAtOnce) | 1495 | if (mMultipleViewsAtOnce) |
1493 | { | 1496 | { |
1494 | if ( visible ) | 1497 | if ( visible ) |
1495 | mDetails->show(); | 1498 | mDetails->show(); |
1496 | else | 1499 | else |
1497 | mDetails->hide(); | 1500 | mDetails->hide(); |
1498 | } | 1501 | } |
1499 | else | 1502 | else |
1500 | { | 1503 | { |
1501 | if ( visible ) { | 1504 | if ( visible ) { |
1502 | mViewManager->hide(); | 1505 | mViewManager->hide(); |
1503 | mDetails->show(); | 1506 | mDetails->show(); |
1504 | mIncSearchWidget->setFocus(); | 1507 | mIncSearchWidget->setFocus(); |
1505 | } | 1508 | } |
1506 | else { | 1509 | else { |
1507 | mViewManager->show(); | 1510 | mViewManager->show(); |
1508 | mDetails->hide(); | 1511 | mDetails->hide(); |
1509 | mViewManager->setFocusAV(); | 1512 | mViewManager->setFocusAV(); |
1510 | } | 1513 | } |
1511 | setJumpButtonBarVisible( !visible ); | 1514 | setJumpButtonBarVisible( !visible ); |
1512 | } | 1515 | } |
1513 | 1516 | ||
1514 | } | 1517 | } |
1515 | 1518 | ||
1516 | void KABCore::extensionChanged( int id ) | 1519 | void KABCore::extensionChanged( int id ) |
1517 | { | 1520 | { |
1518 | //change the details view only for non desktop systems | 1521 | //change the details view only for non desktop systems |
1519 | #ifndef DESKTOP_VERSION | 1522 | #ifndef DESKTOP_VERSION |
1520 | 1523 | ||
1521 | if (id == 0) | 1524 | if (id == 0) |
1522 | { | 1525 | { |
1523 | //the user disabled the extension. | 1526 | //the user disabled the extension. |
1524 | 1527 | ||
1525 | if (mMultipleViewsAtOnce) | 1528 | if (mMultipleViewsAtOnce) |
1526 | { // enable detailsview again | 1529 | { // enable detailsview again |
1527 | setDetailsVisible( true ); | 1530 | setDetailsVisible( true ); |
1528 | mActionDetails->setChecked( true ); | 1531 | mActionDetails->setChecked( true ); |
1529 | } | 1532 | } |
1530 | else | 1533 | else |
1531 | { //go back to the listview | 1534 | { //go back to the listview |
1532 | setDetailsVisible( false ); | 1535 | setDetailsVisible( false ); |
1533 | mActionDetails->setChecked( false ); | 1536 | mActionDetails->setChecked( false ); |
1534 | mActionDetails->setEnabled(true); | 1537 | mActionDetails->setEnabled(true); |
1535 | } | 1538 | } |
1536 | 1539 | ||
1537 | } | 1540 | } |
1538 | else | 1541 | else |
1539 | { | 1542 | { |
1540 | //the user enabled the extension. | 1543 | //the user enabled the extension. |
1541 | setDetailsVisible( false ); | 1544 | setDetailsVisible( false ); |
1542 | mActionDetails->setChecked( false ); | 1545 | mActionDetails->setChecked( false ); |
1543 | 1546 | ||
1544 | if (!mMultipleViewsAtOnce) | 1547 | if (!mMultipleViewsAtOnce) |
1545 | { | 1548 | { |
1546 | mActionDetails->setEnabled(false); | 1549 | mActionDetails->setEnabled(false); |
1547 | } | 1550 | } |
1548 | 1551 | ||
1549 | mExtensionManager->setSelectionChanged(); | 1552 | mExtensionManager->setSelectionChanged(); |
1550 | 1553 | ||
1551 | } | 1554 | } |
1552 | 1555 | ||
1553 | #endif// DESKTOP_VERSION | 1556 | #endif// DESKTOP_VERSION |
1554 | 1557 | ||
1555 | } | 1558 | } |
1556 | 1559 | ||
1557 | 1560 | ||
1558 | void KABCore::extensionModified( const KABC::Addressee::List &list ) | 1561 | void KABCore::extensionModified( const KABC::Addressee::List &list ) |
1559 | { | 1562 | { |
1560 | 1563 | ||
1561 | if ( list.count() != 0 ) { | 1564 | if ( list.count() != 0 ) { |
1562 | KABC::Addressee::List::ConstIterator it; | 1565 | KABC::Addressee::List::ConstIterator it; |
1563 | for ( it = list.begin(); it != list.end(); ++it ) | 1566 | for ( it = list.begin(); it != list.end(); ++it ) |
1564 | mAddressBook->insertAddressee( *it ); | 1567 | mAddressBook->insertAddressee( *it ); |
1565 | if ( list.count() > 1 ) | 1568 | if ( list.count() > 1 ) |
1566 | setModified(); | 1569 | setModified(); |
1567 | else | 1570 | else |
1568 | setModifiedWOrefresh(); | 1571 | setModifiedWOrefresh(); |
1569 | } | 1572 | } |
1570 | if ( list.count() == 0 ) | 1573 | if ( list.count() == 0 ) |
1571 | mViewManager->refreshView(); | 1574 | mViewManager->refreshView(); |
1572 | else | 1575 | else |
1573 | mViewManager->refreshView( list[ 0 ].uid() ); | 1576 | mViewManager->refreshView( list[ 0 ].uid() ); |
1574 | 1577 | ||
1575 | 1578 | ||
1576 | 1579 | ||
1577 | } | 1580 | } |
1578 | 1581 | ||
1579 | QString KABCore::getNameByPhone( const QString &phone ) | 1582 | QString KABCore::getNameByPhone( const QString &phone ) |
1580 | { | 1583 | { |
1581 | #ifndef KAB_EMBEDDED | 1584 | #ifndef KAB_EMBEDDED |
1582 | QRegExp r( "[/*/-/ ]" ); | 1585 | QRegExp r( "[/*/-/ ]" ); |
1583 | QString localPhone( phone ); | 1586 | QString localPhone( phone ); |
1584 | 1587 | ||
1585 | bool found = false; | 1588 | bool found = false; |
1586 | QString ownerName = ""; | 1589 | QString ownerName = ""; |
1587 | KABC::AddressBook::Iterator iter; | 1590 | KABC::AddressBook::Iterator iter; |
1588 | KABC::PhoneNumber::List::Iterator phoneIter; | 1591 | KABC::PhoneNumber::List::Iterator phoneIter; |
1589 | KABC::PhoneNumber::List phoneList; | 1592 | KABC::PhoneNumber::List phoneList; |
1590 | for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) { | 1593 | for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) { |
1591 | phoneList = (*iter).phoneNumbers(); | 1594 | phoneList = (*iter).phoneNumbers(); |
1592 | for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() ); | 1595 | for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() ); |
1593 | ++phoneIter) { | 1596 | ++phoneIter) { |
1594 | // Get rid of separator chars so just the numbers are compared. | 1597 | // Get rid of separator chars so just the numbers are compared. |
1595 | if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { | 1598 | if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { |
1596 | ownerName = (*iter).formattedName(); | 1599 | ownerName = (*iter).formattedName(); |
1597 | found = true; | 1600 | found = true; |
1598 | } | 1601 | } |
1599 | } | 1602 | } |
1600 | } | 1603 | } |
1601 | 1604 | ||
1602 | return ownerName; | 1605 | return ownerName; |
1603 | #else //KAB_EMBEDDED | 1606 | #else //KAB_EMBEDDED |
1604 | qDebug("KABCore::getNameByPhone finsih method"); | 1607 | qDebug("KABCore::getNameByPhone finsih method"); |
1605 | return ""; | 1608 | return ""; |
1606 | #endif //KAB_EMBEDDED | 1609 | #endif //KAB_EMBEDDED |
1607 | 1610 | ||
1608 | } | 1611 | } |
1609 | 1612 | ||
1610 | void KABCore::openConfigDialog() | 1613 | void KABCore::openConfigDialog() |
1611 | { | 1614 | { |
1612 | KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true ); | 1615 | KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true ); |
1613 | KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" ); | 1616 | KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" ); |
1614 | ConfigureDialog->addModule(kabcfg ); | 1617 | ConfigureDialog->addModule(kabcfg ); |
1615 | KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); | 1618 | KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); |
1616 | ConfigureDialog->addModule(kdelibcfg ); | 1619 | ConfigureDialog->addModule(kdelibcfg ); |
1617 | 1620 | ||
1618 | connect( ConfigureDialog, SIGNAL( applyClicked() ), | 1621 | connect( ConfigureDialog, SIGNAL( applyClicked() ), |
1619 | this, SLOT( configurationChanged() ) ); | 1622 | this, SLOT( configurationChanged() ) ); |
1620 | connect( ConfigureDialog, SIGNAL( okClicked() ), | 1623 | connect( ConfigureDialog, SIGNAL( okClicked() ), |
1621 | this, SLOT( configurationChanged() ) ); | 1624 | this, SLOT( configurationChanged() ) ); |
1622 | saveSettings(); | 1625 | saveSettings(); |
1623 | #ifndef DESKTOP_VERSION | 1626 | #ifndef DESKTOP_VERSION |
1624 | ConfigureDialog->showMaximized(); | 1627 | ConfigureDialog->showMaximized(); |
1625 | #endif | 1628 | #endif |
1626 | if ( ConfigureDialog->exec() ) | 1629 | if ( ConfigureDialog->exec() ) |
1627 | KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); | 1630 | KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); |
1628 | delete ConfigureDialog; | 1631 | delete ConfigureDialog; |
1629 | } | 1632 | } |
1630 | 1633 | ||
1631 | void KABCore::openLDAPDialog() | 1634 | void KABCore::openLDAPDialog() |
1632 | { | 1635 | { |
1633 | #ifndef KAB_EMBEDDED | 1636 | #ifndef KAB_EMBEDDED |
1634 | if ( !mLdapSearchDialog ) { | 1637 | if ( !mLdapSearchDialog ) { |
1635 | mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); | 1638 | mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); |
1636 | connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, | 1639 | connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, |
1637 | SLOT( refreshView() ) ); | 1640 | SLOT( refreshView() ) ); |
1638 | connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, | 1641 | connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, |
1639 | SLOT( setModified() ) ); | 1642 | SLOT( setModified() ) ); |
1640 | } else | 1643 | } else |
1641 | mLdapSearchDialog->restoreSettings(); | 1644 | mLdapSearchDialog->restoreSettings(); |
1642 | 1645 | ||
1643 | if ( mLdapSearchDialog->isOK() ) | 1646 | if ( mLdapSearchDialog->isOK() ) |
1644 | mLdapSearchDialog->exec(); | 1647 | mLdapSearchDialog->exec(); |
1645 | #else //KAB_EMBEDDED | 1648 | #else //KAB_EMBEDDED |
1646 | qDebug("KABCore::openLDAPDialog() finsih method"); | 1649 | qDebug("KABCore::openLDAPDialog() finsih method"); |
1647 | #endif //KAB_EMBEDDED | 1650 | #endif //KAB_EMBEDDED |
1648 | } | 1651 | } |
1649 | 1652 | ||
1650 | void KABCore::print() | 1653 | void KABCore::print() |
1651 | { | 1654 | { |
1652 | #ifndef KAB_EMBEDDED | 1655 | #ifndef KAB_EMBEDDED |
1653 | KPrinter printer; | 1656 | KPrinter printer; |
1654 | if ( !printer.setup( this ) ) | 1657 | if ( !printer.setup( this ) ) |
1655 | return; | 1658 | return; |
1656 | 1659 | ||
1657 | KABPrinting::PrintingWizard wizard( &printer, mAddressBook, | 1660 | KABPrinting::PrintingWizard wizard( &printer, mAddressBook, |
1658 | mViewManager->selectedUids(), this ); | 1661 | mViewManager->selectedUids(), this ); |
1659 | 1662 | ||
1660 | wizard.exec(); | 1663 | wizard.exec(); |
1661 | #else //KAB_EMBEDDED | 1664 | #else //KAB_EMBEDDED |
1662 | qDebug("KABCore::print() finsih method"); | 1665 | qDebug("KABCore::print() finsih method"); |
1663 | #endif //KAB_EMBEDDED | 1666 | #endif //KAB_EMBEDDED |
1664 | 1667 | ||
1665 | } | 1668 | } |
1666 | 1669 | ||
1667 | 1670 | ||
1668 | void KABCore::addGUIClient( KXMLGUIClient *client ) | 1671 | void KABCore::addGUIClient( KXMLGUIClient *client ) |
1669 | { | 1672 | { |
1670 | if ( mGUIClient ) | 1673 | if ( mGUIClient ) |
1671 | mGUIClient->insertChildClient( client ); | 1674 | mGUIClient->insertChildClient( client ); |
1672 | else | 1675 | else |
1673 | KMessageBox::error( this, "no KXMLGUICLient"); | 1676 | KMessageBox::error( this, "no KXMLGUICLient"); |
1674 | } | 1677 | } |
1675 | 1678 | ||
1676 | 1679 | ||
1677 | void KABCore::configurationChanged() | 1680 | void KABCore::configurationChanged() |
1678 | { | 1681 | { |
1679 | mExtensionManager->reconfigure(); | 1682 | mExtensionManager->reconfigure(); |
1680 | } | 1683 | } |
1681 | 1684 | ||
1682 | void KABCore::addressBookChanged() | 1685 | void KABCore::addressBookChanged() |
1683 | { | 1686 | { |
1684 | /*US | 1687 | /*US |
1685 | QDictIterator<AddresseeEditorDialog> it( mEditorDict ); | 1688 | QDictIterator<AddresseeEditorDialog> it( mEditorDict ); |
1686 | while ( it.current() ) { | 1689 | while ( it.current() ) { |
1687 | if ( it.current()->dirty() ) { | 1690 | if ( it.current()->dirty() ) { |
1688 | QString text = i18n( "Data has been changed externally. Unsaved " | 1691 | QString text = i18n( "Data has been changed externally. Unsaved " |
1689 | "changes will be lost." ); | 1692 | "changes will be lost." ); |
1690 | KMessageBox::information( this, text ); | 1693 | KMessageBox::information( this, text ); |
1691 | } | 1694 | } |
1692 | it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); | 1695 | it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); |
1693 | ++it; | 1696 | ++it; |
1694 | } | 1697 | } |
1695 | */ | 1698 | */ |
1696 | if (mEditorDialog) | 1699 | if (mEditorDialog) |
1697 | { | 1700 | { |
1698 | if (mEditorDialog->dirty()) | 1701 | if (mEditorDialog->dirty()) |
1699 | { | 1702 | { |
1700 | QString text = i18n( "Data has been changed externally. Unsaved " | 1703 | QString text = i18n( "Data has been changed externally. Unsaved " |
1701 | "changes will be lost." ); | 1704 | "changes will be lost." ); |
1702 | KMessageBox::information( this, text ); | 1705 | KMessageBox::information( this, text ); |
1703 | } | 1706 | } |
1704 | QString currentuid = mEditorDialog->addressee().uid(); | 1707 | QString currentuid = mEditorDialog->addressee().uid(); |
1705 | mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); | 1708 | mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); |
1706 | } | 1709 | } |
1707 | mViewManager->refreshView(); | 1710 | mViewManager->refreshView(); |
1708 | 1711 | ||
1709 | 1712 | ||
1710 | } | 1713 | } |
1711 | 1714 | ||
1712 | AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, | 1715 | AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, |
1713 | const char *name ) | 1716 | const char *name ) |
1714 | { | 1717 | { |
1715 | 1718 | ||
1716 | if ( mEditorDialog == 0 ) { | 1719 | if ( mEditorDialog == 0 ) { |
1717 | mEditorDialog = new AddresseeEditorDialog( this, parent, | 1720 | mEditorDialog = new AddresseeEditorDialog( this, parent, |
1718 | name ? name : "editorDialog" ); | 1721 | name ? name : "editorDialog" ); |
1719 | 1722 | ||
1720 | 1723 | ||
1721 | connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ), | 1724 | connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ), |
1722 | SLOT( contactModified( const KABC::Addressee& ) ) ); | 1725 | SLOT( contactModified( const KABC::Addressee& ) ) ); |
1723 | //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ), | 1726 | //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ), |
1724 | // SLOT( slotEditorDestroyed( const QString& ) ) ; | 1727 | // SLOT( slotEditorDestroyed( const QString& ) ) ; |
1725 | } | 1728 | } |
1726 | 1729 | ||
1727 | return mEditorDialog; | 1730 | return mEditorDialog; |
1728 | } | 1731 | } |
1729 | 1732 | ||
1730 | void KABCore::slotEditorDestroyed( const QString &uid ) | 1733 | void KABCore::slotEditorDestroyed( const QString &uid ) |
1731 | { | 1734 | { |
1732 | //mEditorDict.remove( uid ); | 1735 | //mEditorDict.remove( uid ); |
1733 | } | 1736 | } |
1734 | 1737 | ||
1735 | void KABCore::initGUI() | 1738 | void KABCore::initGUI() |
1736 | { | 1739 | { |
1737 | #ifndef KAB_EMBEDDED | 1740 | #ifndef KAB_EMBEDDED |
1738 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1741 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1739 | topLayout->setSpacing( KDialogBase::spacingHint() ); | 1742 | topLayout->setSpacing( KDialogBase::spacingHint() ); |
1740 | 1743 | ||
1741 | mExtensionBarSplitter = new QSplitter( this ); | 1744 | mExtensionBarSplitter = new QSplitter( this ); |
1742 | mExtensionBarSplitter->setOrientation( Qt::Vertical ); | 1745 | mExtensionBarSplitter->setOrientation( Qt::Vertical ); |
1743 | 1746 | ||
1744 | mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); | 1747 | mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); |
1745 | 1748 | ||
1746 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); | 1749 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); |
1747 | mIncSearchWidget = new IncSearchWidget( viewSpace ); | 1750 | mIncSearchWidget = new IncSearchWidget( viewSpace ); |
1748 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 1751 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
1749 | SLOT( incrementalSearch( const QString& ) ) ); | 1752 | SLOT( incrementalSearch( const QString& ) ) ); |
1750 | 1753 | ||
1751 | mViewManager = new ViewManager( this, viewSpace ); | 1754 | mViewManager = new ViewManager( this, viewSpace ); |
1752 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1755 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1753 | 1756 | ||
1754 | mDetails = new ViewContainer( mDetailsSplitter ); | 1757 | mDetails = new ViewContainer( mDetailsSplitter ); |
1755 | 1758 | ||
1756 | mJumpButtonBar = new JumpButtonBar( this, this ); | 1759 | mJumpButtonBar = new JumpButtonBar( this, this ); |
1757 | 1760 | ||
1758 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); | 1761 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); |
1759 | 1762 | ||
1760 | topLayout->addWidget( mExtensionBarSplitter ); | 1763 | topLayout->addWidget( mExtensionBarSplitter ); |
1761 | topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); | 1764 | topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); |
1762 | topLayout->addWidget( mJumpButtonBar ); | 1765 | topLayout->addWidget( mJumpButtonBar ); |
1763 | //topLayout->setStretchFactor( mJumpButtonBar, 1 ); | 1766 | //topLayout->setStretchFactor( mJumpButtonBar, 1 ); |
1764 | 1767 | ||
1765 | mXXPortManager = new XXPortManager( this, this ); | 1768 | mXXPortManager = new XXPortManager( this, this ); |
1766 | 1769 | ||
1767 | #else //KAB_EMBEDDED | 1770 | #else //KAB_EMBEDDED |
1768 | //US initialize viewMenu before settingup viewmanager. | 1771 | //US initialize viewMenu before settingup viewmanager. |
1769 | // Viewmanager needs this menu to plugin submenues. | 1772 | // Viewmanager needs this menu to plugin submenues. |
1770 | viewMenu = new QPopupMenu( this ); | 1773 | viewMenu = new QPopupMenu( this ); |
1771 | settingsMenu = new QPopupMenu( this ); | 1774 | settingsMenu = new QPopupMenu( this ); |
1772 | //filterMenu = new QPopupMenu( this ); | 1775 | //filterMenu = new QPopupMenu( this ); |
1773 | ImportMenu = new QPopupMenu( this ); | 1776 | ImportMenu = new QPopupMenu( this ); |
1774 | ExportMenu = new QPopupMenu( this ); | 1777 | ExportMenu = new QPopupMenu( this ); |
1775 | syncMenu = new QPopupMenu( this ); | 1778 | syncMenu = new QPopupMenu( this ); |
1776 | changeMenu= new QPopupMenu( this ); | 1779 | changeMenu= new QPopupMenu( this ); |
1777 | beamMenu= new QPopupMenu( this ); | 1780 | beamMenu= new QPopupMenu( this ); |
1778 | 1781 | ||
1779 | //US since we have no splitter for the embedded system, setup | 1782 | //US since we have no splitter for the embedded system, setup |
1780 | // a layout with two frames. One left and one right. | 1783 | // a layout with two frames. One left and one right. |
1781 | 1784 | ||
1782 | QBoxLayout *topLayout; | 1785 | QBoxLayout *topLayout; |
1783 | 1786 | ||
1784 | // = new QHBoxLayout( this ); | 1787 | // = new QHBoxLayout( this ); |
1785 | // QBoxLayout *topLayout = (QBoxLayout*)layout(); | 1788 | // QBoxLayout *topLayout = (QBoxLayout*)layout(); |
1786 | 1789 | ||
1787 | // QWidget *mainBox = new QWidget( this ); | 1790 | // QWidget *mainBox = new QWidget( this ); |
1788 | // QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); | 1791 | // QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); |
1789 | 1792 | ||
1790 | #ifdef DESKTOP_VERSION | 1793 | #ifdef DESKTOP_VERSION |
1791 | topLayout = new QHBoxLayout( this ); | 1794 | topLayout = new QHBoxLayout( this ); |
1792 | 1795 | ||
1793 | 1796 | ||
1794 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 1797 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
1795 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 1798 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
1796 | 1799 | ||
1797 | topLayout->addWidget(mMiniSplitter ); | 1800 | topLayout->addWidget(mMiniSplitter ); |
1798 | 1801 | ||
1799 | mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); | 1802 | mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); |
1800 | mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); | 1803 | mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); |
1801 | mViewManager = new ViewManager( this, mExtensionBarSplitter ); | 1804 | mViewManager = new ViewManager( this, mExtensionBarSplitter ); |
1802 | mDetails = new ViewContainer( mMiniSplitter ); | 1805 | mDetails = new ViewContainer( mMiniSplitter ); |
1803 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); | 1806 | mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); |
1804 | #else | 1807 | #else |
1805 | if ( QApplication::desktop()->width() > 480 ) { | 1808 | if ( QApplication::desktop()->width() > 480 ) { |
1806 | topLayout = new QHBoxLayout( this ); | 1809 | topLayout = new QHBoxLayout( this ); |
1807 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 1810 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
1808 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 1811 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
1809 | } else { | 1812 | } else { |
1810 | 1813 | ||
1811 | topLayout = new QHBoxLayout( this ); | 1814 | topLayout = new QHBoxLayout( this ); |
1812 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); | 1815 | mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); |
1813 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); | 1816 | mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); |
1814 | } | 1817 | } |
1815 | 1818 | ||
1816 | topLayout->addWidget(mMiniSplitter ); | 1819 | topLayout->addWidget(mMiniSplitter ); |
1817 | mViewManager = new ViewManager( this, mMiniSplitter ); | 1820 | mViewManager = new ViewManager( this, mMiniSplitter ); |
1818 | mDetails = new ViewContainer( mMiniSplitter ); | 1821 | mDetails = new ViewContainer( mMiniSplitter ); |
1819 | 1822 | ||
1820 | 1823 | ||
1821 | mExtensionManager = new ExtensionManager( this, mMiniSplitter ); | 1824 | mExtensionManager = new ExtensionManager( this, mMiniSplitter ); |
1822 | #endif | 1825 | #endif |
1823 | //eh->hide(); | 1826 | //eh->hide(); |
1824 | // topLayout->addWidget(mExtensionManager ); | 1827 | // topLayout->addWidget(mExtensionManager ); |
1825 | 1828 | ||
1826 | 1829 | ||
1827 | /*US | 1830 | /*US |
1828 | #ifndef KAB_NOSPLITTER | 1831 | #ifndef KAB_NOSPLITTER |
1829 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1832 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1830 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); | 1833 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); |
1831 | topLayout->setSpacing( 10 ); | 1834 | topLayout->setSpacing( 10 ); |
1832 | 1835 | ||
1833 | mDetailsSplitter = new QSplitter( this ); | 1836 | mDetailsSplitter = new QSplitter( this ); |
1834 | 1837 | ||
1835 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); | 1838 | QVBox *viewSpace = new QVBox( mDetailsSplitter ); |
1836 | 1839 | ||
1837 | mViewManager = new ViewManager( this, viewSpace ); | 1840 | mViewManager = new ViewManager( this, viewSpace ); |
1838 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1841 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1839 | 1842 | ||
1840 | mDetails = new ViewContainer( mDetailsSplitter ); | 1843 | mDetails = new ViewContainer( mDetailsSplitter ); |
1841 | 1844 | ||
1842 | topLayout->addWidget( mDetailsSplitter ); | 1845 | topLayout->addWidget( mDetailsSplitter ); |
1843 | topLayout->setStretchFactor( mDetailsSplitter, 100 ); | 1846 | topLayout->setStretchFactor( mDetailsSplitter, 100 ); |
1844 | #else //KAB_NOSPLITTER | 1847 | #else //KAB_NOSPLITTER |
1845 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1848 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1846 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); | 1849 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); |
1847 | topLayout->setSpacing( 10 ); | 1850 | topLayout->setSpacing( 10 ); |
1848 | 1851 | ||
1849 | // mDetailsSplitter = new QSplitter( this ); | 1852 | // mDetailsSplitter = new QSplitter( this ); |
1850 | 1853 | ||
1851 | QVBox *viewSpace = new QVBox( this ); | 1854 | QVBox *viewSpace = new QVBox( this ); |
1852 | 1855 | ||
1853 | mViewManager = new ViewManager( this, viewSpace ); | 1856 | mViewManager = new ViewManager( this, viewSpace ); |
1854 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1857 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1855 | 1858 | ||
1856 | mDetails = new ViewContainer( this ); | 1859 | mDetails = new ViewContainer( this ); |
1857 | 1860 | ||
1858 | topLayout->addWidget( viewSpace ); | 1861 | topLayout->addWidget( viewSpace ); |
1859 | // topLayout->setStretchFactor( mDetailsSplitter, 100 ); | 1862 | // topLayout->setStretchFactor( mDetailsSplitter, 100 ); |
1860 | topLayout->addWidget( mDetails ); | 1863 | topLayout->addWidget( mDetails ); |
1861 | #endif //KAB_NOSPLITTER | 1864 | #endif //KAB_NOSPLITTER |
1862 | */ | 1865 | */ |
1863 | 1866 | ||
1864 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); | 1867 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); |
1865 | syncManager->setBlockSave(false); | 1868 | syncManager->setBlockSave(false); |
1866 | 1869 | ||
1867 | connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 1870 | connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
1868 | connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 1871 | connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
1869 | QString sync_file = sentSyncFile(); | 1872 | QString sync_file = sentSyncFile(); |
1870 | //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1()); | 1873 | //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1()); |
1871 | syncManager->setDefaultFileName( sync_file ); | 1874 | syncManager->setDefaultFileName( sync_file ); |
1872 | //connect(syncManager , SIGNAL( ), this, SLOT( ) ); | 1875 | //connect(syncManager , SIGNAL( ), this, SLOT( ) ); |
1873 | 1876 | ||
1874 | #endif //KAB_EMBEDDED | 1877 | #endif //KAB_EMBEDDED |
1875 | initActions(); | 1878 | initActions(); |
1876 | 1879 | ||
1877 | #ifdef KAB_EMBEDDED | 1880 | #ifdef KAB_EMBEDDED |
1878 | addActionsManually(); | 1881 | addActionsManually(); |
1879 | //US make sure the export and import menues are initialized before creating the xxPortManager. | 1882 | //US make sure the export and import menues are initialized before creating the xxPortManager. |
1880 | mXXPortManager = new XXPortManager( this, this ); | 1883 | mXXPortManager = new XXPortManager( this, this ); |
1881 | 1884 | ||
1882 | // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); | 1885 | // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); |
1883 | //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); | 1886 | //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); |
1884 | // mActionQuit->plug ( mMainWindow->toolBar()); | 1887 | // mActionQuit->plug ( mMainWindow->toolBar()); |
1885 | //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); | 1888 | //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); |
1886 | //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); | 1889 | //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); |
1887 | // mIncSearchWidget->hide(); | 1890 | // mIncSearchWidget->hide(); |
1888 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 1891 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
1889 | SLOT( incrementalSearch( const QString& ) ) ); | 1892 | SLOT( incrementalSearch( const QString& ) ) ); |
1890 | connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) ); | 1893 | connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) ); |
1891 | connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) ); | 1894 | connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) ); |
1892 | 1895 | ||
1893 | mJumpButtonBar = new JumpButtonBar( this, this ); | 1896 | mJumpButtonBar = new JumpButtonBar( this, this ); |
1894 | 1897 | ||
1895 | topLayout->addWidget( mJumpButtonBar ); | 1898 | topLayout->addWidget( mJumpButtonBar ); |
1896 | //US topLayout->setStretchFactor( mJumpButtonBar, 10 ); | 1899 | //US topLayout->setStretchFactor( mJumpButtonBar, 10 ); |
1897 | 1900 | ||
1898 | // mMainWindow->getIconToolBar()->raise(); | 1901 | // mMainWindow->getIconToolBar()->raise(); |
1899 | 1902 | ||
1900 | #endif //KAB_EMBEDDED | 1903 | #endif //KAB_EMBEDDED |
1901 | 1904 | ||
1902 | } | 1905 | } |
1903 | void KABCore::initActions() | 1906 | void KABCore::initActions() |
1904 | { | 1907 | { |
1905 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 1908 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
1906 | 1909 | ||
1907 | #ifndef KAB_EMBEDDED | 1910 | #ifndef KAB_EMBEDDED |
1908 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), | 1911 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), |
1909 | SLOT( clipboardDataChanged() ) ); | 1912 | SLOT( clipboardDataChanged() ) ); |
1910 | #endif //KAB_EMBEDDED | 1913 | #endif //KAB_EMBEDDED |
1911 | 1914 | ||
1912 | // file menu | 1915 | // file menu |
1913 | 1916 | ||
1914 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); | 1917 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); |
1915 | //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); | 1918 | //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); |
1916 | mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager, | 1919 | mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager, |
1917 | SLOT( printView() ), actionCollection(), "kaddressbook_print" ); | 1920 | SLOT( printView() ), actionCollection(), "kaddressbook_print" ); |
1918 | 1921 | ||
1919 | 1922 | ||
1920 | mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails, | 1923 | mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails, |
1921 | SLOT( printView() ), actionCollection(), "kaddressbook_print2" ); | 1924 | SLOT( printView() ), actionCollection(), "kaddressbook_print2" ); |
1922 | 1925 | ||
1923 | mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, | 1926 | mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, |
1924 | SLOT( save() ), actionCollection(), "file_sync" ); | 1927 | SLOT( save() ), actionCollection(), "file_sync" ); |
1925 | 1928 | ||
1926 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, | 1929 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, |
1927 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); | 1930 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); |
1928 | 1931 | ||
1929 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, | 1932 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, |
1930 | this, SLOT( mailVCard() ), | 1933 | this, SLOT( mailVCard() ), |
1931 | actionCollection(), "file_mail_vcard"); | 1934 | actionCollection(), "file_mail_vcard"); |
1932 | 1935 | ||
1933 | mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this, | 1936 | mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this, |
1934 | SLOT( export2phone() ), actionCollection(), | 1937 | SLOT( export2phone() ), actionCollection(), |
1935 | "kaddressbook_ex2phone" ); | 1938 | "kaddressbook_ex2phone" ); |
1936 | 1939 | ||
1937 | mActionBeamVCard = 0; | 1940 | mActionBeamVCard = 0; |
1938 | mActionBeam = 0; | 1941 | mActionBeam = 0; |
1939 | 1942 | ||
1940 | #ifndef DESKTOP_VERSION | 1943 | #ifndef DESKTOP_VERSION |
1941 | if ( Ir::supported() ) { | 1944 | if ( Ir::supported() ) { |
1942 | mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this, | 1945 | mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this, |
1943 | SLOT( beamVCard() ), actionCollection(), | 1946 | SLOT( beamVCard() ), actionCollection(), |
1944 | "kaddressbook_beam_vcard" ); | 1947 | "kaddressbook_beam_vcard" ); |
1945 | 1948 | ||
1946 | mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, | 1949 | mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, |
1947 | SLOT( beamMySelf() ), actionCollection(), | 1950 | SLOT( beamMySelf() ), actionCollection(), |
1948 | "kaddressbook_beam_myself" ); | 1951 | "kaddressbook_beam_myself" ); |
1949 | } | 1952 | } |
1950 | #endif | 1953 | #endif |
1951 | 1954 | ||
1952 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, | 1955 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, |
1953 | this, SLOT( editContact2() ), | 1956 | this, SLOT( editContact2() ), |
1954 | actionCollection(), "file_properties" ); | 1957 | actionCollection(), "file_properties" ); |
1955 | 1958 | ||
1956 | #ifdef KAB_EMBEDDED | 1959 | #ifdef KAB_EMBEDDED |
1957 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); | 1960 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); |
1958 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, | 1961 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, |
1959 | mMainWindow, SLOT( exit() ), | 1962 | mMainWindow, SLOT( exit() ), |
1960 | actionCollection(), "quit" ); | 1963 | actionCollection(), "quit" ); |
1961 | #endif //KAB_EMBEDDED | 1964 | #endif //KAB_EMBEDDED |
1962 | 1965 | ||
1963 | // edit menu | 1966 | // edit menu |
1964 | if ( mIsPart ) { | 1967 | if ( mIsPart ) { |
1965 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, | 1968 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, |
1966 | SLOT( copyContacts() ), actionCollection(), | 1969 | SLOT( copyContacts() ), actionCollection(), |
1967 | "kaddressbook_copy" ); | 1970 | "kaddressbook_copy" ); |
1968 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, | 1971 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, |
1969 | SLOT( cutContacts() ), actionCollection(), | 1972 | SLOT( cutContacts() ), actionCollection(), |
1970 | "kaddressbook_cut" ); | 1973 | "kaddressbook_cut" ); |
1971 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, | 1974 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, |
1972 | SLOT( pasteContacts() ), actionCollection(), | 1975 | SLOT( pasteContacts() ), actionCollection(), |
1973 | "kaddressbook_paste" ); | 1976 | "kaddressbook_paste" ); |
1974 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, | 1977 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, |
1975 | SLOT( selectAllContacts() ), actionCollection(), | 1978 | SLOT( selectAllContacts() ), actionCollection(), |
1976 | "kaddressbook_select_all" ); | 1979 | "kaddressbook_select_all" ); |
1977 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, | 1980 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, |
1978 | SLOT( undo() ), actionCollection(), | 1981 | SLOT( undo() ), actionCollection(), |
1979 | "kaddressbook_undo" ); | 1982 | "kaddressbook_undo" ); |
1980 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, | 1983 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, |
1981 | this, SLOT( redo() ), actionCollection(), | 1984 | this, SLOT( redo() ), actionCollection(), |
1982 | "kaddressbook_redo" ); | 1985 | "kaddressbook_redo" ); |
1983 | } else { | 1986 | } else { |
1984 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); | 1987 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); |
1985 | mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); | 1988 | mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); |
1986 | mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); | 1989 | mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); |
1987 | mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); | 1990 | mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); |
1988 | mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); | 1991 | mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); |
1989 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); | 1992 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); |
1990 | } | 1993 | } |
1991 | 1994 | ||
1992 | mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", | 1995 | mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", |
1993 | Key_Delete, this, SLOT( deleteContacts() ), | 1996 | Key_Delete, this, SLOT( deleteContacts() ), |
1994 | actionCollection(), "edit_delete" ); | 1997 | actionCollection(), "edit_delete" ); |
1995 | 1998 | ||
1996 | mActionUndo->setEnabled( false ); | 1999 | mActionUndo->setEnabled( false ); |
1997 | mActionRedo->setEnabled( false ); | 2000 | mActionRedo->setEnabled( false ); |
1998 | 2001 | ||
1999 | // settings menu | 2002 | // settings menu |
2000 | #ifdef KAB_EMBEDDED | 2003 | #ifdef KAB_EMBEDDED |
2001 | //US special menuentry to configure the addressbook resources. On KDE | 2004 | //US special menuentry to configure the addressbook resources. On KDE |
2002 | // you do that through the control center !!! | 2005 | // you do that through the control center !!! |
2003 | mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, | 2006 | mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, |
2004 | SLOT( configureResources() ), actionCollection(), | 2007 | SLOT( configureResources() ), actionCollection(), |
2005 | "kaddressbook_configure_resources" ); | 2008 | "kaddressbook_configure_resources" ); |
2006 | #endif //KAB_EMBEDDED | 2009 | #endif //KAB_EMBEDDED |
2007 | 2010 | ||
2008 | if ( mIsPart ) { | 2011 | if ( mIsPart ) { |
2009 | mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, | 2012 | mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, |
2010 | SLOT( openConfigDialog() ), actionCollection(), | 2013 | SLOT( openConfigDialog() ), actionCollection(), |
2011 | "kaddressbook_configure" ); | 2014 | "kaddressbook_configure" ); |
2012 | 2015 | ||
2013 | //US not implemented yet | 2016 | //US not implemented yet |
2014 | //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, | 2017 | //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, |
2015 | // this, SLOT( configureKeyBindings() ), actionCollection(), | 2018 | // this, SLOT( configureKeyBindings() ), actionCollection(), |
2016 | // "kaddressbook_configure_shortcuts" ); | 2019 | // "kaddressbook_configure_shortcuts" ); |
2017 | #ifdef KAB_EMBEDDED | 2020 | #ifdef KAB_EMBEDDED |
2018 | mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); | 2021 | mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); |
2019 | mActionConfigureToolbars->setEnabled( false ); | 2022 | mActionConfigureToolbars->setEnabled( false ); |
2020 | #endif //KAB_EMBEDDED | 2023 | #endif //KAB_EMBEDDED |
2021 | 2024 | ||
2022 | } else { | 2025 | } else { |
2023 | mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); | 2026 | mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); |
2024 | 2027 | ||
2025 | //US not implemented yet | 2028 | //US not implemented yet |
2026 | //mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); | 2029 | //mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); |
2027 | } | 2030 | } |
2028 | 2031 | ||
2029 | mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, | 2032 | mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, |
2030 | actionCollection(), "options_show_jump_bar" ); | 2033 | actionCollection(), "options_show_jump_bar" ); |
2031 | connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) ); | 2034 | connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) ); |
2032 | 2035 | ||
2033 | mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0, | 2036 | mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0, |
2034 | actionCollection(), "options_show_details" ); | 2037 | actionCollection(), "options_show_details" ); |
2035 | connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); | 2038 | connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); |
2036 | 2039 | ||
2037 | 2040 | ||
2038 | mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this, | 2041 | mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this, |
2039 | SLOT( toggleBeamReceive() ), actionCollection(), | 2042 | SLOT( toggleBeamReceive() ), actionCollection(), |
2040 | "kaddressbook_beam_rec" ); | 2043 | "kaddressbook_beam_rec" ); |
2041 | 2044 | ||
2042 | 2045 | ||
2043 | // misc | 2046 | // misc |
2044 | // only enable LDAP lookup if we can handle the protocol | 2047 | // only enable LDAP lookup if we can handle the protocol |
2045 | #ifndef KAB_EMBEDDED | 2048 | #ifndef KAB_EMBEDDED |
2046 | if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { | 2049 | if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { |
2047 | new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, | 2050 | new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, |
2048 | this, SLOT( openLDAPDialog() ), actionCollection(), | 2051 | this, SLOT( openLDAPDialog() ), actionCollection(), |
2049 | "ldap_lookup" ); | 2052 | "ldap_lookup" ); |
2050 | } | 2053 | } |
2051 | #else //KAB_EMBEDDED | 2054 | #else //KAB_EMBEDDED |
2052 | //qDebug("KABCore::initActions() LDAP has to be implemented"); | 2055 | //qDebug("KABCore::initActions() LDAP has to be implemented"); |
2053 | #endif //KAB_EMBEDDED | 2056 | #endif //KAB_EMBEDDED |
2054 | 2057 | ||
2055 | 2058 | ||
2056 | mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, | 2059 | mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, |
2057 | SLOT( setWhoAmI() ), actionCollection(), | 2060 | SLOT( setWhoAmI() ), actionCollection(), |
2058 | "set_personal" ); | 2061 | "set_personal" ); |
2059 | 2062 | ||
2060 | 2063 | ||
2061 | mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this, | 2064 | mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this, |
2062 | SLOT( setCategories() ), actionCollection(), | 2065 | SLOT( setCategories() ), actionCollection(), |
2063 | "edit_set_categories" ); | 2066 | "edit_set_categories" ); |
2064 | mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this, | 2067 | mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this, |
2065 | SLOT( editCategories() ), actionCollection(), | 2068 | SLOT( editCategories() ), actionCollection(), |
2066 | "edit__categories" ); | 2069 | "edit__categories" ); |
2067 | 2070 | ||
2068 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, | 2071 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, |
2069 | SLOT( removeVoice() ), actionCollection(), | 2072 | SLOT( removeVoice() ), actionCollection(), |
2070 | "remove_voice" ); | 2073 | "remove_voice" ); |
2071 | mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this, | 2074 | mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this, |
2072 | SLOT( setFormattedName() ), actionCollection(), | 2075 | SLOT( setFormattedName() ), actionCollection(), |
2073 | "set_formatted" ); | 2076 | "set_formatted" ); |
2074 | 2077 | ||
2075 | mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, | 2078 | mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, |
2076 | SLOT( manageCategories() ), actionCollection(), | 2079 | SLOT( manageCategories() ), actionCollection(), |
2077 | "remove_voice" ); | 2080 | "remove_voice" ); |
2078 | 2081 | ||
2079 | 2082 | ||
2080 | mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, | 2083 | mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, |
2081 | SLOT( importFromOL() ), actionCollection(), | 2084 | SLOT( importFromOL() ), actionCollection(), |
2082 | "import_OL" ); | 2085 | "import_OL" ); |
2083 | #ifdef KAB_EMBEDDED | 2086 | #ifdef KAB_EMBEDDED |
2084 | mActionLicence = new KAction( i18n( "Licence" ), 0, | 2087 | mActionLicence = new KAction( i18n( "Licence" ), 0, |
2085 | this, SLOT( showLicence() ), actionCollection(), | 2088 | this, SLOT( showLicence() ), actionCollection(), |
2086 | "licence_about_data" ); | 2089 | "licence_about_data" ); |
2087 | mActionFaq = new KAction( i18n( "Faq" ), 0, | 2090 | mActionFaq = new KAction( i18n( "Faq" ), 0, |
2088 | this, SLOT( faq() ), actionCollection(), | 2091 | this, SLOT( faq() ), actionCollection(), |
2089 | "faq_about_data" ); | 2092 | "faq_about_data" ); |
2090 | mActionWN = new KAction( i18n( "What's New?" ), 0, | 2093 | mActionWN = new KAction( i18n( "What's New?" ), 0, |
2091 | this, SLOT( whatsnew() ), actionCollection(), | 2094 | this, SLOT( whatsnew() ), actionCollection(), |
2092 | "wn" ); | 2095 | "wn" ); |
2093 | mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, | 2096 | mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, |
2094 | this, SLOT( synchowto() ), actionCollection(), | 2097 | this, SLOT( synchowto() ), actionCollection(), |
2095 | "sync" ); | 2098 | "sync" ); |
2096 | mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, | 2099 | mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, |
2097 | this, SLOT( kdesynchowto() ), actionCollection(), | 2100 | this, SLOT( kdesynchowto() ), actionCollection(), |
2098 | "kdesync" ); | 2101 | "kdesync" ); |
2099 | mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, | 2102 | mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, |
2100 | this, SLOT( multisynchowto() ), actionCollection(), | 2103 | this, SLOT( multisynchowto() ), actionCollection(), |
2101 | "multisync" ); | 2104 | "multisync" ); |
2102 | 2105 | ||
2103 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, | 2106 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, |
2104 | this, SLOT( createAboutData() ), actionCollection(), | 2107 | this, SLOT( createAboutData() ), actionCollection(), |
2105 | "kaddressbook_about_data" ); | 2108 | "kaddressbook_about_data" ); |
2106 | #endif //KAB_EMBEDDED | 2109 | #endif //KAB_EMBEDDED |
2107 | 2110 | ||
2108 | clipboardDataChanged(); | 2111 | clipboardDataChanged(); |
2109 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 2112 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
2110 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 2113 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
2111 | } | 2114 | } |
2112 | 2115 | ||
2113 | //US we need this function, to plug all actions into the correct menues. | 2116 | //US we need this function, to plug all actions into the correct menues. |
2114 | // KDE uses a XML format to plug the actions, but we work her without this overhead. | 2117 | // KDE uses a XML format to plug the actions, but we work her without this overhead. |
2115 | void KABCore::addActionsManually() | 2118 | void KABCore::addActionsManually() |
2116 | { | 2119 | { |
2117 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 2120 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
2118 | 2121 | ||
2119 | #ifdef KAB_EMBEDDED | 2122 | #ifdef KAB_EMBEDDED |
2120 | QPopupMenu *fileMenu = new QPopupMenu( this ); | 2123 | QPopupMenu *fileMenu = new QPopupMenu( this ); |
2121 | QPopupMenu *editMenu = new QPopupMenu( this ); | 2124 | QPopupMenu *editMenu = new QPopupMenu( this ); |
2122 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 2125 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
2123 | 2126 | ||
2124 | KToolBar* tb = mMainWindow->toolBar(); | 2127 | KToolBar* tb = mMainWindow->toolBar(); |
2125 | 2128 | ||
2126 | #ifndef DESKTOP_VERSION | 2129 | #ifndef DESKTOP_VERSION |
2127 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { | 2130 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { |
2128 | #endif | 2131 | #endif |
2129 | QMenuBar* mb = mMainWindow->menuBar(); | 2132 | QMenuBar* mb = mMainWindow->menuBar(); |
2130 | 2133 | ||
2131 | //US setup menubar. | 2134 | //US setup menubar. |
2132 | //Disable the following block if you do not want to have a menubar. | 2135 | //Disable the following block if you do not want to have a menubar. |
2133 | mb->insertItem( i18n("&File"), fileMenu ); | 2136 | mb->insertItem( i18n("&File"), fileMenu ); |
2134 | mb->insertItem( i18n("&Edit"), editMenu ); | 2137 | mb->insertItem( i18n("&Edit"), editMenu ); |
2135 | mb->insertItem( i18n("&View"), viewMenu ); | 2138 | mb->insertItem( i18n("&View"), viewMenu ); |
2136 | mb->insertItem( i18n("&Settings"), settingsMenu ); | 2139 | mb->insertItem( i18n("&Settings"), settingsMenu ); |
2137 | #ifdef DESKTOP_VERSION | 2140 | #ifdef DESKTOP_VERSION |
2138 | mb->insertItem( i18n("Synchronize"), syncMenu ); | 2141 | mb->insertItem( i18n("Synchronize"), syncMenu ); |
2139 | #else | 2142 | #else |
2140 | mb->insertItem( i18n("Sync"), syncMenu ); | 2143 | mb->insertItem( i18n("Sync"), syncMenu ); |
2141 | #endif | 2144 | #endif |
2142 | //mb->insertItem( i18n("&Change"), changeMenu ); | 2145 | //mb->insertItem( i18n("&Change"), changeMenu ); |
2143 | mb->insertItem( i18n("&Help"), helpMenu ); | 2146 | mb->insertItem( i18n("&Help"), helpMenu ); |
2144 | mIncSearchWidget = new IncSearchWidget( tb ); | 2147 | mIncSearchWidget = new IncSearchWidget( tb ); |
2145 | // tb->insertWidget(-1, 0, mIncSearchWidget); | 2148 | // tb->insertWidget(-1, 0, mIncSearchWidget); |
2146 | #ifndef DESKTOP_VERSION | 2149 | #ifndef DESKTOP_VERSION |
2147 | } else { | 2150 | } else { |
2148 | //US setup toolbar | 2151 | //US setup toolbar |
2149 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | 2152 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); |
2150 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | 2153 | QPopupMenu *popupBarTB = new QPopupMenu( this ); |
2151 | menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); | 2154 | menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); |
2152 | tb->insertWidget(-1, 0, menuBarTB); | 2155 | tb->insertWidget(-1, 0, menuBarTB); |
2153 | mIncSearchWidget = new IncSearchWidget( tb ); | 2156 | mIncSearchWidget = new IncSearchWidget( tb ); |
2154 | tb->enableMoving(false); | 2157 | tb->enableMoving(false); |
2155 | popupBarTB->insertItem( i18n("&File"), fileMenu ); | 2158 | popupBarTB->insertItem( i18n("&File"), fileMenu ); |
2156 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); | 2159 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); |
2157 | popupBarTB->insertItem( i18n("&View"), viewMenu ); | 2160 | popupBarTB->insertItem( i18n("&View"), viewMenu ); |
2158 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); | 2161 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); |
2159 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); | 2162 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); |
2160 | mViewManager->getFilterAction()->plug ( popupBarTB); | 2163 | mViewManager->getFilterAction()->plug ( popupBarTB); |
2161 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); | 2164 | //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); |
2162 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); | 2165 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); |
2163 | if (QApplication::desktop()->width() > 320 ) { | 2166 | if (QApplication::desktop()->width() > 320 ) { |
2164 | // mViewManager->getFilterAction()->plug ( tb); | 2167 | // mViewManager->getFilterAction()->plug ( tb); |
2165 | } | 2168 | } |
2166 | } | 2169 | } |
2167 | #endif | 2170 | #endif |
2168 | // mActionQuit->plug ( mMainWindow->toolBar()); | 2171 | // mActionQuit->plug ( mMainWindow->toolBar()); |
2169 | 2172 | ||
2170 | 2173 | ||
2171 | 2174 | ||
2172 | //US Now connect the actions with the menue entries. | 2175 | //US Now connect the actions with the menue entries. |
2173 | #ifdef DESKTOP_VERSION | 2176 | #ifdef DESKTOP_VERSION |
2174 | mActionPrint->plug( fileMenu ); | 2177 | mActionPrint->plug( fileMenu ); |
2175 | mActionPrintDetails->plug( fileMenu ); | 2178 | mActionPrintDetails->plug( fileMenu ); |
2176 | fileMenu->insertSeparator(); | 2179 | fileMenu->insertSeparator(); |
2177 | #endif | 2180 | #endif |
2178 | mActionMail->plug( fileMenu ); | 2181 | mActionMail->plug( fileMenu ); |
2179 | fileMenu->insertSeparator(); | 2182 | fileMenu->insertSeparator(); |
2180 | 2183 | ||
2181 | mActionNewContact->plug( fileMenu ); | 2184 | mActionNewContact->plug( fileMenu ); |
2182 | mActionNewContact->plug( tb ); | 2185 | mActionNewContact->plug( tb ); |
2183 | 2186 | ||
2184 | mActionEditAddressee->plug( fileMenu ); | 2187 | mActionEditAddressee->plug( fileMenu ); |
2185 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || | 2188 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || |
2186 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) | 2189 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) |
2187 | mActionEditAddressee->plug( tb ); | 2190 | mActionEditAddressee->plug( tb ); |
2188 | 2191 | ||
2189 | fileMenu->insertSeparator(); | 2192 | fileMenu->insertSeparator(); |
2190 | mActionSave->plug( fileMenu ); | 2193 | mActionSave->plug( fileMenu ); |
2191 | fileMenu->insertItem( "&Import", ImportMenu ); | 2194 | fileMenu->insertItem( "&Import", ImportMenu ); |
2192 | fileMenu->insertItem( "&Export", ExportMenu ); | 2195 | fileMenu->insertItem( "&Export", ExportMenu ); |
2193 | fileMenu->insertItem( i18n("&Change"), changeMenu ); | 2196 | fileMenu->insertItem( i18n("&Change"), changeMenu ); |
2194 | #ifndef DESKTOP_VERSION | 2197 | #ifndef DESKTOP_VERSION |
2195 | if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); | 2198 | if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); |
2196 | #endif | 2199 | #endif |
2197 | #if 0 | 2200 | #if 0 |
2198 | // PENDING fix MailVCard | 2201 | // PENDING fix MailVCard |
2199 | fileMenu->insertSeparator(); | 2202 | fileMenu->insertSeparator(); |
2200 | mActionMailVCard->plug( fileMenu ); | 2203 | mActionMailVCard->plug( fileMenu ); |
2201 | #endif | 2204 | #endif |
2202 | #ifndef DESKTOP_VERSION | 2205 | #ifndef DESKTOP_VERSION |
2203 | if ( Ir::supported() ) mActionBR->plug( beamMenu ); | 2206 | if ( Ir::supported() ) mActionBR->plug( beamMenu ); |
2204 | if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); | 2207 | if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); |
2205 | if ( Ir::supported() ) mActionBeam->plug( beamMenu ); | 2208 | if ( Ir::supported() ) mActionBeam->plug( beamMenu ); |
2206 | #endif | 2209 | #endif |
2207 | fileMenu->insertSeparator(); | 2210 | fileMenu->insertSeparator(); |
2208 | mActionQuit->plug( fileMenu ); | 2211 | mActionQuit->plug( fileMenu ); |
2209 | #ifdef _OL_IMPORT_ | 2212 | #ifdef _OL_IMPORT_ |
2210 | mActionImportOL->plug( ImportMenu ); | 2213 | mActionImportOL->plug( ImportMenu ); |
2211 | #endif | 2214 | #endif |
2212 | // edit menu | 2215 | // edit menu |
2213 | mActionUndo->plug( editMenu ); | 2216 | mActionUndo->plug( editMenu ); |
2214 | mActionRedo->plug( editMenu ); | 2217 | mActionRedo->plug( editMenu ); |
2215 | editMenu->insertSeparator(); | 2218 | editMenu->insertSeparator(); |
2216 | mActionCut->plug( editMenu ); | 2219 | mActionCut->plug( editMenu ); |
2217 | mActionCopy->plug( editMenu ); | 2220 | mActionCopy->plug( editMenu ); |
2218 | mActionPaste->plug( editMenu ); | 2221 | mActionPaste->plug( editMenu ); |
2219 | mActionDelete->plug( editMenu ); | 2222 | mActionDelete->plug( editMenu ); |
2220 | editMenu->insertSeparator(); | 2223 | editMenu->insertSeparator(); |
2221 | mActionSelectAll->plug( editMenu ); | 2224 | mActionSelectAll->plug( editMenu ); |
2222 | 2225 | ||
2223 | mActionSetFormattedName->plug( changeMenu ); | 2226 | mActionSetFormattedName->plug( changeMenu ); |
2224 | mActionRemoveVoice->plug( changeMenu ); | 2227 | mActionRemoveVoice->plug( changeMenu ); |
2225 | // settingsmings menu | 2228 | // settingsmings menu |
2226 | //US special menuentry to configure the addressbook resources. On KDE | 2229 | //US special menuentry to configure the addressbook resources. On KDE |
2227 | // you do that through the control center !!! | 2230 | // you do that through the control center !!! |
2228 | // settingsMenu->insertSeparator(); | 2231 | // settingsMenu->insertSeparator(); |
2229 | 2232 | ||
2230 | mActionConfigKAddressbook->plug( settingsMenu, 0 ); | 2233 | mActionConfigKAddressbook->plug( settingsMenu, 0 ); |
2231 | mActionConfigResources->plug( settingsMenu,1 ); | 2234 | mActionConfigResources->plug( settingsMenu,1 ); |
2232 | settingsMenu->insertSeparator(2); | 2235 | settingsMenu->insertSeparator(2); |
2233 | 2236 | ||
2234 | if ( mIsPart ) { | 2237 | if ( mIsPart ) { |
2235 | //US not implemented yet | 2238 | //US not implemented yet |
2236 | //mActionConfigShortcuts->plug( settingsMenu ); | 2239 | //mActionConfigShortcuts->plug( settingsMenu ); |
2237 | //mActionConfigureToolbars->plug( settingsMenu ); | 2240 | //mActionConfigureToolbars->plug( settingsMenu ); |
2238 | 2241 | ||
2239 | } else { | 2242 | } else { |
2240 | //US not implemented yet | 2243 | //US not implemented yet |
2241 | //mActionKeyBindings->plug( settingsMenu ); | 2244 | //mActionKeyBindings->plug( settingsMenu ); |
2242 | } | 2245 | } |
2243 | 2246 | ||
2244 | settingsMenu->insertSeparator(); | 2247 | settingsMenu->insertSeparator(); |
2245 | 2248 | ||
2246 | mActionJumpBar->plug( settingsMenu ); | 2249 | mActionJumpBar->plug( settingsMenu ); |
2247 | mActionDetails->plug( settingsMenu ); | 2250 | mActionDetails->plug( settingsMenu ); |
2248 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) | 2251 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) |
2249 | mActionDetails->plug( tb ); | 2252 | mActionDetails->plug( tb ); |
2250 | settingsMenu->insertSeparator(); | 2253 | settingsMenu->insertSeparator(); |
2251 | #ifndef DESKTOP_VERSION | 2254 | #ifndef DESKTOP_VERSION |
2252 | if ( Ir::supported() ) mActionBR->plug(settingsMenu ); | 2255 | if ( Ir::supported() ) mActionBR->plug(settingsMenu ); |
2253 | settingsMenu->insertSeparator(); | 2256 | settingsMenu->insertSeparator(); |
2254 | #endif | 2257 | #endif |
2255 | 2258 | ||
2256 | mActionWhoAmI->plug( settingsMenu ); | 2259 | mActionWhoAmI->plug( settingsMenu ); |
2257 | mActionEditCategories->plug( settingsMenu ); | 2260 | mActionEditCategories->plug( settingsMenu ); |
2258 | mActionEditCategories->plug( changeMenu ); | 2261 | mActionEditCategories->plug( changeMenu ); |
2259 | mActionCategories->plug( changeMenu ); | 2262 | mActionCategories->plug( changeMenu ); |
2260 | mActionManageCategories->plug( changeMenu ); | 2263 | mActionManageCategories->plug( changeMenu ); |
2261 | 2264 | ||
2262 | mActionCategories->plug( settingsMenu ); | 2265 | mActionCategories->plug( settingsMenu ); |
2263 | mActionManageCategories->plug( settingsMenu ); | 2266 | mActionManageCategories->plug( settingsMenu ); |
2264 | 2267 | ||
2265 | 2268 | ||
2266 | mActionWN->plug( helpMenu ); | 2269 | mActionWN->plug( helpMenu ); |
2267 | mActionSyncHowto->plug( helpMenu ); | 2270 | mActionSyncHowto->plug( helpMenu ); |
2268 | mActionKdeSyncHowto->plug( helpMenu ); | 2271 | mActionKdeSyncHowto->plug( helpMenu ); |
2269 | mActionMultiSyncHowto->plug( helpMenu ); | 2272 | mActionMultiSyncHowto->plug( helpMenu ); |
2270 | mActionFaq->plug( helpMenu ); | 2273 | mActionFaq->plug( helpMenu ); |
2271 | mActionLicence->plug( helpMenu ); | 2274 | mActionLicence->plug( helpMenu ); |
2272 | mActionAboutKAddressbook->plug( helpMenu ); | 2275 | mActionAboutKAddressbook->plug( helpMenu ); |
2273 | 2276 | ||
2274 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { | 2277 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { |
2275 | 2278 | ||
2276 | mActionSave->plug( tb ); | 2279 | mActionSave->plug( tb ); |
2277 | mViewManager->getFilterAction()->plug ( tb); | 2280 | mViewManager->getFilterAction()->plug ( tb); |
2278 | //LR hide filteraction on started in 480x640 | 2281 | //LR hide filteraction on started in 480x640 |
2279 | if (QApplication::desktop()->width() == 480 ) { | 2282 | if (QApplication::desktop()->width() == 480 ) { |
2280 | mViewManager->getFilterAction()->setComboWidth( 0 ); | 2283 | mViewManager->getFilterAction()->setComboWidth( 0 ); |
2281 | } | 2284 | } |
2282 | mActionUndo->plug( tb ); | 2285 | mActionUndo->plug( tb ); |
2283 | mActionDelete->plug( tb ); | 2286 | mActionDelete->plug( tb ); |
2284 | mActionRedo->plug( tb ); | 2287 | mActionRedo->plug( tb ); |
2285 | } else { | 2288 | } else { |
2286 | mActionSave->plug( tb ); | 2289 | mActionSave->plug( tb ); |
2287 | tb->enableMoving(false); | 2290 | tb->enableMoving(false); |
2288 | } | 2291 | } |
2289 | //mActionQuit->plug ( tb ); | 2292 | //mActionQuit->plug ( tb ); |
2290 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); | 2293 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); |
2291 | 2294 | ||
2292 | //US link the searchwidget first to this. | 2295 | //US link the searchwidget first to this. |
2293 | // The real linkage to the toolbar happens later. | 2296 | // The real linkage to the toolbar happens later. |
2294 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); | 2297 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); |
2295 | //US tb->insertItem( mIncSearchWidget ); | 2298 | //US tb->insertItem( mIncSearchWidget ); |
2296 | /*US | 2299 | /*US |
2297 | mIncSearchWidget = new IncSearchWidget( tb ); | 2300 | mIncSearchWidget = new IncSearchWidget( tb ); |
2298 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 2301 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
2299 | SLOT( incrementalSearch( const QString& ) ) ); | 2302 | SLOT( incrementalSearch( const QString& ) ) ); |
2300 | 2303 | ||
2301 | mJumpButtonBar = new JumpButtonBar( this, this ); | 2304 | mJumpButtonBar = new JumpButtonBar( this, this ); |
2302 | 2305 | ||
2303 | //US topLayout->addWidget( mJumpButtonBar ); | 2306 | //US topLayout->addWidget( mJumpButtonBar ); |
2304 | this->layout()->add( mJumpButtonBar ); | 2307 | this->layout()->add( mJumpButtonBar ); |
2305 | */ | 2308 | */ |
2306 | 2309 | ||
2307 | #endif //KAB_EMBEDDED | 2310 | #endif //KAB_EMBEDDED |
2308 | 2311 | ||
2309 | mActionExport2phone->plug( ExportMenu ); | 2312 | mActionExport2phone->plug( ExportMenu ); |
2310 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); | 2313 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); |
2311 | syncManager->fillSyncMenu(); | 2314 | syncManager->fillSyncMenu(); |
2312 | 2315 | ||
2313 | } | 2316 | } |
2314 | void KABCore::showLicence() | 2317 | void KABCore::showLicence() |
2315 | { | 2318 | { |
2316 | KApplication::showLicence(); | 2319 | KApplication::showLicence(); |
2317 | } | 2320 | } |
2318 | 2321 | ||
2319 | void KABCore::manageCategories( ) | 2322 | void KABCore::manageCategories( ) |
2320 | { | 2323 | { |
2321 | KABCatPrefs* cp = new KABCatPrefs(); | 2324 | KABCatPrefs* cp = new KABCatPrefs(); |
2322 | cp->show(); | 2325 | cp->show(); |
2323 | int w =cp->sizeHint().width() ; | 2326 | int w =cp->sizeHint().width() ; |
2324 | int h = cp->sizeHint().height() ; | 2327 | int h = cp->sizeHint().height() ; |
2325 | int dw = QApplication::desktop()->width(); | 2328 | int dw = QApplication::desktop()->width(); |
2326 | int dh = QApplication::desktop()->height(); | 2329 | int dh = QApplication::desktop()->height(); |
2327 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2330 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2328 | if ( !cp->exec() ) { | 2331 | if ( !cp->exec() ) { |
2329 | delete cp; | 2332 | delete cp; |
2330 | return; | 2333 | return; |
2331 | } | 2334 | } |
2332 | int count = 0; | 2335 | int count = 0; |
2333 | int cc = 0; | 2336 | int cc = 0; |
2334 | message( i18n("Please wait, processing categories...")); | 2337 | message( i18n("Please wait, processing categories...")); |
2335 | if ( cp->addCat() ) { | 2338 | if ( cp->addCat() ) { |
2336 | KABC::AddressBook::Iterator it; | 2339 | KABC::AddressBook::Iterator it; |
2337 | QStringList catList = KABPrefs::instance()->mCustomCategories; | 2340 | QStringList catList = KABPrefs::instance()->mCustomCategories; |
2338 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2341 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2339 | ++cc; | 2342 | ++cc; |
2340 | if ( cc %10 == 0) | 2343 | if ( cc %10 == 0) |
2341 | message(i18n("Processing contact #%1").arg(cc)); | 2344 | message(i18n("Processing contact #%1").arg(cc)); |
2342 | QStringList catIncList = (*it).categories(); | 2345 | QStringList catIncList = (*it).categories(); |
2343 | int i; | 2346 | int i; |
2344 | for( i = 0; i< catIncList.count(); ++i ) { | 2347 | for( i = 0; i< catIncList.count(); ++i ) { |
2345 | if ( !catList.contains (catIncList[i])) { | 2348 | if ( !catList.contains (catIncList[i])) { |
2346 | catList.append( catIncList[i] ); | 2349 | catList.append( catIncList[i] ); |
2347 | //qDebug("add cat %s ", catIncList[i].latin1()); | 2350 | //qDebug("add cat %s ", catIncList[i].latin1()); |
2348 | ++count; | 2351 | ++count; |
2349 | } | 2352 | } |
2350 | } | 2353 | } |
2351 | } | 2354 | } |
2352 | catList.sort(); | 2355 | catList.sort(); |
2353 | KABPrefs::instance()->mCustomCategories = catList; | 2356 | KABPrefs::instance()->mCustomCategories = catList; |
2354 | KABPrefs::instance()->writeConfig(); | 2357 | KABPrefs::instance()->writeConfig(); |
2355 | message(QString::number( count )+ i18n(" categories added to list! ")); | 2358 | message(QString::number( count )+ i18n(" categories added to list! ")); |
2356 | } else { | 2359 | } else { |
2357 | QStringList catList = KABPrefs::instance()->mCustomCategories; | 2360 | QStringList catList = KABPrefs::instance()->mCustomCategories; |
2358 | QStringList catIncList; | 2361 | QStringList catIncList; |
2359 | QStringList newCatList; | 2362 | QStringList newCatList; |
2360 | KABC::AddressBook::Iterator it; | 2363 | KABC::AddressBook::Iterator it; |
2361 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2364 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2362 | ++cc; | 2365 | ++cc; |
2363 | if ( cc %10 == 0) | 2366 | if ( cc %10 == 0) |
2364 | message(i18n("Processing contact #%1").arg(cc)); | 2367 | message(i18n("Processing contact #%1").arg(cc)); |
2365 | QStringList catIncList = (*it).categories(); | 2368 | QStringList catIncList = (*it).categories(); |
2366 | int i; | 2369 | int i; |
2367 | if ( catIncList.count() ) { | 2370 | if ( catIncList.count() ) { |
2368 | newCatList.clear(); | 2371 | newCatList.clear(); |
2369 | for( i = 0; i< catIncList.count(); ++i ) { | 2372 | for( i = 0; i< catIncList.count(); ++i ) { |
2370 | if ( catList.contains (catIncList[i])) { | 2373 | if ( catList.contains (catIncList[i])) { |
2371 | newCatList.append( catIncList[i] ); | 2374 | newCatList.append( catIncList[i] ); |
2372 | } | 2375 | } |
2373 | } | 2376 | } |
2374 | newCatList.sort(); | 2377 | newCatList.sort(); |
2375 | (*it).setCategories( newCatList ); | 2378 | (*it).setCategories( newCatList ); |
2376 | mAddressBook->insertAddressee( (*it) ); | 2379 | mAddressBook->insertAddressee( (*it) ); |
2377 | } | 2380 | } |
2378 | } | 2381 | } |
2379 | setModified( true ); | 2382 | setModified( true ); |
2380 | mViewManager->refreshView(); | 2383 | mViewManager->refreshView(); |
2381 | message( i18n("Removing categories done!")); | 2384 | message( i18n("Removing categories done!")); |
2382 | } | 2385 | } |
2383 | delete cp; | 2386 | delete cp; |
2384 | } | 2387 | } |
2385 | void KABCore::removeVoice() | 2388 | void KABCore::removeVoice() |
2386 | { | 2389 | { |
2387 | if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) | 2390 | if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) |
2388 | return; | 2391 | return; |
2389 | XXPortSelectDialog dlg( this, false, this ); | 2392 | XXPortSelectDialog dlg( this, false, this ); |
2390 | if ( !dlg.exec() ) | 2393 | if ( !dlg.exec() ) |
2391 | return; | 2394 | return; |
2392 | mAddressBook->setUntagged(); | 2395 | mAddressBook->setUntagged(); |
2393 | dlg.tagSelected(); | 2396 | dlg.tagSelected(); |
2394 | message(i18n("Removing voice..."), false ); | 2397 | message(i18n("Removing voice..."), false ); |
2395 | KABC::AddressBook::Iterator it; | 2398 | KABC::AddressBook::Iterator it; |
2396 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2399 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2397 | if ( (*it).tagged() ) { | 2400 | if ( (*it).tagged() ) { |
2398 | (*it).removeVoice(); | 2401 | (*it).removeVoice(); |
2399 | } | 2402 | } |
2400 | } | 2403 | } |
2401 | message(i18n("Refreshing view...") ); | 2404 | message(i18n("Refreshing view...") ); |
2402 | qApp->processEvents(); | 2405 | qApp->processEvents(); |
2403 | mViewManager->refreshView( "" ); | 2406 | mViewManager->refreshView( "" ); |
2404 | Addressee add; | 2407 | Addressee add; |
2405 | mDetails->setAddressee( add ); | 2408 | mDetails->setAddressee( add ); |
2406 | message(i18n("Remove voice completed!") ); | 2409 | message(i18n("Remove voice completed!") ); |
2407 | 2410 | ||
2408 | 2411 | ||
2409 | 2412 | ||
2410 | } | 2413 | } |
2411 | 2414 | ||
2412 | void KABCore::setFormattedName() | 2415 | void KABCore::setFormattedName() |
2413 | { | 2416 | { |
2414 | KABFormatPrefs setpref; | 2417 | KABFormatPrefs setpref; |
2415 | if ( !setpref.exec() ) { | 2418 | if ( !setpref.exec() ) { |
2416 | return; | 2419 | return; |
2417 | } | 2420 | } |
2418 | XXPortSelectDialog dlg( this, false, this ); | 2421 | XXPortSelectDialog dlg( this, false, this ); |
2419 | if ( !dlg.exec() ) | 2422 | if ( !dlg.exec() ) |
2420 | return; | 2423 | return; |
2421 | mAddressBook->setUntagged(); | 2424 | mAddressBook->setUntagged(); |
2422 | dlg.tagSelected(); | 2425 | dlg.tagSelected(); |
2423 | int count = 0; | 2426 | int count = 0; |
2424 | KABC::AddressBook::Iterator it; | 2427 | KABC::AddressBook::Iterator it; |
2425 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2428 | for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2426 | if ( (*it).tagged() ) { | 2429 | if ( (*it).tagged() ) { |
2427 | ++count; | 2430 | ++count; |
2428 | if ( count %10 == 0 ) | 2431 | if ( count %10 == 0 ) |
2429 | message(i18n("Changing contact #%1").arg( count ) ); | 2432 | message(i18n("Changing contact #%1").arg( count ) ); |
2430 | qApp->processEvents(); | 2433 | qApp->processEvents(); |
2431 | QString fName; | 2434 | QString fName; |
2432 | if ( setpref.simple->isChecked() ) | 2435 | if ( setpref.simple->isChecked() ) |
2433 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); | 2436 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); |
2434 | else if ( setpref.full->isChecked() ) | 2437 | else if ( setpref.full->isChecked() ) |
2435 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); | 2438 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); |
2436 | else if ( setpref.reverse->isChecked() ) | 2439 | else if ( setpref.reverse->isChecked() ) |
2437 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); | 2440 | fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); |
2438 | else | 2441 | else |
2439 | fName = (*it).organization(); | 2442 | fName = (*it).organization(); |
2440 | if ( setpref.setCompany->isChecked() ) | 2443 | if ( setpref.setCompany->isChecked() ) |
2441 | if ( fName.isEmpty() || fName =="," ) | 2444 | if ( fName.isEmpty() || fName =="," ) |
2442 | fName = (*it).organization(); | 2445 | fName = (*it).organization(); |
2443 | (*it).setFormattedName( fName ); | 2446 | (*it).setFormattedName( fName ); |
2444 | } | 2447 | } |
2445 | } | 2448 | } |
2446 | message(i18n("Refreshing view...") ); | 2449 | message(i18n("Refreshing view...") ); |
2447 | qApp->processEvents(); | 2450 | qApp->processEvents(); |
2448 | mViewManager->refreshView( "" ); | 2451 | mViewManager->refreshView( "" ); |
2449 | Addressee add; | 2452 | Addressee add; |
2450 | mDetails->setAddressee( add ); | 2453 | mDetails->setAddressee( add ); |
2451 | message(i18n("Setting formatted name completed!") ); | 2454 | message(i18n("Setting formatted name completed!") ); |
2452 | } | 2455 | } |
2453 | 2456 | ||
2454 | void KABCore::clipboardDataChanged() | 2457 | void KABCore::clipboardDataChanged() |
2455 | { | 2458 | { |
2456 | 2459 | ||
2457 | if ( mReadWrite ) | 2460 | if ( mReadWrite ) |
2458 | mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); | 2461 | mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); |
2459 | 2462 | ||
2460 | } | 2463 | } |
2461 | 2464 | ||
2462 | void KABCore::updateActionMenu() | 2465 | void KABCore::updateActionMenu() |
2463 | { | 2466 | { |
2464 | UndoStack *undo = UndoStack::instance(); | 2467 | UndoStack *undo = UndoStack::instance(); |
2465 | RedoStack *redo = RedoStack::instance(); | 2468 | RedoStack *redo = RedoStack::instance(); |
2466 | 2469 | ||
2467 | if ( undo->isEmpty() ) | 2470 | if ( undo->isEmpty() ) |
2468 | mActionUndo->setText( i18n( "Undo" ) ); | 2471 | mActionUndo->setText( i18n( "Undo" ) ); |
2469 | else | 2472 | else |
2470 | mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); | 2473 | mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); |
2471 | 2474 | ||
2472 | mActionUndo->setEnabled( !undo->isEmpty() ); | 2475 | mActionUndo->setEnabled( !undo->isEmpty() ); |
2473 | 2476 | ||
2474 | if ( !redo->top() ) | 2477 | if ( !redo->top() ) |
2475 | mActionRedo->setText( i18n( "Redo" ) ); | 2478 | mActionRedo->setText( i18n( "Redo" ) ); |
2476 | else | 2479 | else |
2477 | mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); | 2480 | mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); |
2478 | 2481 | ||
2479 | mActionRedo->setEnabled( !redo->isEmpty() ); | 2482 | mActionRedo->setEnabled( !redo->isEmpty() ); |
2480 | } | 2483 | } |
2481 | 2484 | ||
2482 | void KABCore::configureKeyBindings() | 2485 | void KABCore::configureKeyBindings() |
2483 | { | 2486 | { |
2484 | #ifndef KAB_EMBEDDED | 2487 | #ifndef KAB_EMBEDDED |
2485 | KKeyDialog::configure( actionCollection(), true ); | 2488 | KKeyDialog::configure( actionCollection(), true ); |
2486 | #else //KAB_EMBEDDED | 2489 | #else //KAB_EMBEDDED |
2487 | qDebug("KABCore::configureKeyBindings() not implemented"); | 2490 | qDebug("KABCore::configureKeyBindings() not implemented"); |
2488 | #endif //KAB_EMBEDDED | 2491 | #endif //KAB_EMBEDDED |
2489 | } | 2492 | } |
2490 | 2493 | ||
2491 | #ifdef KAB_EMBEDDED | 2494 | #ifdef KAB_EMBEDDED |
2492 | void KABCore::configureResources() | 2495 | void KABCore::configureResources() |
2493 | { | 2496 | { |
2494 | KRES::KCMKResources dlg( this, "" , 0 ); | 2497 | KRES::KCMKResources dlg( this, "" , 0 ); |
2495 | 2498 | ||
2496 | if ( !dlg.exec() ) | 2499 | if ( !dlg.exec() ) |
2497 | return; | 2500 | return; |
2498 | KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); | 2501 | KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); |
2499 | } | 2502 | } |
2500 | #endif //KAB_EMBEDDED | 2503 | #endif //KAB_EMBEDDED |
2501 | 2504 | ||
2502 | 2505 | ||
2503 | /* this method will be called through the QCop interface from Ko/Pi to select addresses | 2506 | /* this method will be called through the QCop interface from Ko/Pi to select addresses |
2504 | * for the attendees list of an event. | 2507 | * for the attendees list of an event. |
2505 | */ | 2508 | */ |
2506 | void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) | 2509 | void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) |
2507 | { | 2510 | { |
2508 | QStringList nameList; | 2511 | |
2509 | QStringList emailList; | ||
2510 | QStringList uidList; | ||
2511 | bool ok = false; | 2512 | bool ok = false; |
2513 | mEmailSourceChannel = sourceChannel; | ||
2512 | int wid = uid.toInt( &ok ); | 2514 | int wid = uid.toInt( &ok ); |
2515 | qDebug("UID %s ", uid.latin1()); | ||
2513 | if ( ok ) { | 2516 | if ( ok ) { |
2514 | if ( wid != QApplication::desktop()->width() ) { | 2517 | if ( wid != QApplication::desktop()->width() ) { |
2515 | qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); | 2518 | qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); |
2516 | message( i18n("Resizing, please wait...") ); | 2519 | message( i18n("Resizing, please wait...") ); |
2517 | raise(); | 2520 | mMainWindow->showMinimized(); |
2518 | qApp->processEvents(); | 2521 | /* |
2522 | { | ||
2523 | QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); | ||
2524 | } | ||
2525 | */ | ||
2526 | QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) ); | ||
2527 | return; | ||
2519 | } | 2528 | } |
2520 | 2529 | ||
2521 | } else { | 2530 | } else { |
2522 | qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); | 2531 | qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); |
2523 | } | 2532 | } |
2524 | 2533 | callContactdialog(); | |
2534 | //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); | ||
2535 | |||
2536 | } | ||
2537 | void KABCore::resizeAndCallContactdialog() | ||
2538 | { | ||
2539 | updateMainWindow(); | ||
2540 | QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) ); | ||
2541 | } | ||
2542 | |||
2543 | void KABCore::callContactdialog() | ||
2544 | { | ||
2545 | QStringList nameList; | ||
2546 | QStringList emailList; | ||
2547 | QStringList uidList; | ||
2548 | qDebug("WIDTH %d ", QApplication::desktop()->width() ); | ||
2525 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); | 2549 | KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); |
2526 | uint i=0; | 2550 | uint i=0; |
2527 | for (i=0; i < list.count(); i++) | 2551 | for (i=0; i < list.count(); i++) |
2528 | { | 2552 | { |
2529 | nameList.append(list[i].realName()); | 2553 | nameList.append(list[i].realName()); |
2530 | emailList.append(list[i].preferredEmail()); | 2554 | emailList.append(list[i].preferredEmail()); |
2531 | uidList.append(list[i].uid()); | 2555 | uidList.append(list[i].uid()); |
2532 | } | 2556 | } |
2557 | QString uid = "unnamed"; | ||
2533 | //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); | 2558 | //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); |
2534 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); | 2559 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList); |
2535 | 2560 | ||
2536 | } | 2561 | } |
2537 | |||
2538 | /* this method will be called through the QCop interface from Ko/Pi to select birthdays | 2562 | /* this method will be called through the QCop interface from Ko/Pi to select birthdays |
2539 | * to put them into the calendar. | 2563 | * to put them into the calendar. |
2540 | */ | 2564 | */ |
2541 | void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) | 2565 | void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) |
2542 | { | 2566 | { |
2543 | // qDebug("KABCore::requestForBirthdayList"); | 2567 | // qDebug("KABCore::requestForBirthdayList"); |
2544 | QStringList birthdayList; | 2568 | QStringList birthdayList; |
2545 | QStringList anniversaryList; | 2569 | QStringList anniversaryList; |
2546 | QStringList realNameList; | 2570 | QStringList realNameList; |
2547 | QStringList preferredEmailList; | 2571 | QStringList preferredEmailList; |
2548 | QStringList assembledNameList; | 2572 | QStringList assembledNameList; |
2549 | QStringList uidList; | 2573 | QStringList uidList; |
2550 | 2574 | ||
2551 | KABC::AddressBook::Iterator it; | 2575 | KABC::AddressBook::Iterator it; |
2552 | 2576 | ||
2553 | int count = 0; | 2577 | int count = 0; |
2554 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2578 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2555 | ++count; | 2579 | ++count; |
2556 | } | 2580 | } |
2557 | QProgressBar bar(count,0 ); | 2581 | QProgressBar bar(count,0 ); |
2558 | int w = 300; | 2582 | int w = 300; |
2559 | if ( QApplication::desktop()->width() < 320 ) | 2583 | if ( QApplication::desktop()->width() < 320 ) |
2560 | w = 220; | 2584 | w = 220; |
2561 | int h = bar.sizeHint().height() ; | 2585 | int h = bar.sizeHint().height() ; |
2562 | int dw = QApplication::desktop()->width(); | 2586 | int dw = QApplication::desktop()->width(); |
2563 | int dh = QApplication::desktop()->height(); | 2587 | int dh = QApplication::desktop()->height(); |
2564 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2588 | bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2565 | bar.show(); | 2589 | bar.show(); |
2566 | bar.setCaption (i18n("Collecting birthdays - close to abort!") ); | 2590 | bar.setCaption (i18n("Collecting birthdays - close to abort!") ); |
2567 | qApp->processEvents(); | 2591 | qApp->processEvents(); |
2568 | 2592 | ||
2569 | QDate bday; | 2593 | QDate bday; |
2570 | QString anni; | 2594 | QString anni; |
2571 | QString formattedbday; | 2595 | QString formattedbday; |
2572 | 2596 | ||
2573 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) | 2597 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) |
2574 | { | 2598 | { |
2575 | if ( ! bar.isVisible() ) | 2599 | if ( ! bar.isVisible() ) |
2576 | return; | 2600 | return; |
2577 | bar.setProgress( count++ ); | 2601 | bar.setProgress( count++ ); |
2578 | qApp->processEvents(); | 2602 | qApp->processEvents(); |
2579 | bday = (*it).birthday().date(); | 2603 | bday = (*it).birthday().date(); |
2580 | anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); | 2604 | anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); |
2581 | 2605 | ||
2582 | if ( bday.isValid() || !anni.isEmpty()) | 2606 | if ( bday.isValid() || !anni.isEmpty()) |
2583 | { | 2607 | { |
2584 | if (bday.isValid()) | 2608 | if (bday.isValid()) |
2585 | formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); | 2609 | formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); |
2586 | else | 2610 | else |
2587 | formattedbday = "NOTVALID"; | 2611 | formattedbday = "NOTVALID"; |
2588 | if (anni.isEmpty()) | 2612 | if (anni.isEmpty()) |
2589 | anni = "INVALID"; | 2613 | anni = "INVALID"; |
2590 | 2614 | ||
2591 | birthdayList.append(formattedbday); | 2615 | birthdayList.append(formattedbday); |
2592 | anniversaryList.append(anni); //should be ISODate | 2616 | anniversaryList.append(anni); //should be ISODate |
2593 | realNameList.append((*it).realName()); | 2617 | realNameList.append((*it).realName()); |
2594 | preferredEmailList.append((*it).preferredEmail()); | 2618 | preferredEmailList.append((*it).preferredEmail()); |
2595 | assembledNameList.append((*it).assembledName()); | 2619 | assembledNameList.append((*it).assembledName()); |
2596 | uidList.append((*it).uid()); | 2620 | uidList.append((*it).uid()); |
2597 | 2621 | ||
2598 | //qDebug("found birthday in KA/Pi: %s,%s,%s,%s: %s, %s", (*it).realName().latin1(), (*it).preferredEmail().latin1(), (*it).assembledName().latin1(), (*it).uid().latin1(), formattedbday.latin1(), anni.latin1() ); | 2622 | //qDebug("found birthday in KA/Pi: %s,%s,%s,%s: %s, %s", (*it).realName().latin1(), (*it).preferredEmail().latin1(), (*it).assembledName().latin1(), (*it).uid().latin1(), formattedbday.latin1(), anni.latin1() ); |
2599 | } | 2623 | } |
2600 | } | 2624 | } |
2601 | 2625 | ||
2602 | bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); | 2626 | bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); |
2603 | 2627 | ||
2604 | } | 2628 | } |
2605 | 2629 | ||
2606 | /* this method will be called through the QCop interface from other apps to show details of a contact. | 2630 | /* this method will be called through the QCop interface from other apps to show details of a contact. |
2607 | */ | 2631 | */ |
2608 | void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) | 2632 | void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) |
2609 | { | 2633 | { |
2610 | //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); | 2634 | //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); |
2611 | 2635 | ||
2612 | QString foundUid = QString::null; | 2636 | QString foundUid = QString::null; |
2613 | if ( ! uid.isEmpty() ) { | 2637 | if ( ! uid.isEmpty() ) { |
2614 | Addressee adrr = mAddressBook->findByUid( uid ); | 2638 | Addressee adrr = mAddressBook->findByUid( uid ); |
2615 | if ( !adrr.isEmpty() ) { | 2639 | if ( !adrr.isEmpty() ) { |
2616 | foundUid = uid; | 2640 | foundUid = uid; |
2617 | } | 2641 | } |
2618 | if ( email == "sendbacklist" ) { | 2642 | if ( email == "sendbacklist" ) { |
2619 | //qDebug("ssssssssssssssssssssssend "); | 2643 | //qDebug("ssssssssssssssssssssssend "); |
2620 | QStringList nameList; | 2644 | QStringList nameList; |
2621 | QStringList emailList; | 2645 | QStringList emailList; |
2622 | QStringList uidList; | 2646 | QStringList uidList; |
2623 | nameList.append(adrr.realName()); | 2647 | nameList.append(adrr.realName()); |
2624 | emailList = adrr.emails(); | 2648 | emailList = adrr.emails(); |
2625 | uidList.append( adrr.preferredEmail()); | 2649 | uidList.append( adrr.preferredEmail()); |
2626 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); | 2650 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); |
2627 | return; | 2651 | return; |
2628 | } | 2652 | } |
2629 | 2653 | ||
2630 | } | 2654 | } |
2631 | 2655 | ||
2632 | if ( email == "sendbacklist" ) | 2656 | if ( email == "sendbacklist" ) |
2633 | return; | 2657 | return; |
2634 | if (foundUid.isEmpty()) | 2658 | if (foundUid.isEmpty()) |
2635 | { | 2659 | { |
2636 | //find the uid of the person first | 2660 | //find the uid of the person first |
2637 | Addressee::List namelist; | 2661 | Addressee::List namelist; |
2638 | Addressee::List emaillist; | 2662 | Addressee::List emaillist; |
2639 | 2663 | ||
2640 | if (!name.isEmpty()) | 2664 | if (!name.isEmpty()) |
2641 | namelist = mAddressBook->findByName( name ); | 2665 | namelist = mAddressBook->findByName( name ); |
2642 | 2666 | ||
2643 | if (!email.isEmpty()) | 2667 | if (!email.isEmpty()) |
2644 | emaillist = mAddressBook->findByEmail( email ); | 2668 | emaillist = mAddressBook->findByEmail( email ); |
2645 | //qDebug("count %d %d ", namelist.count(),emaillist.count() ); | 2669 | //qDebug("count %d %d ", namelist.count(),emaillist.count() ); |
2646 | //check if we have a match in Namelist and Emaillist | 2670 | //check if we have a match in Namelist and Emaillist |
2647 | if ((namelist.count() == 0) && (emaillist.count() > 0)) { | 2671 | if ((namelist.count() == 0) && (emaillist.count() > 0)) { |
2648 | foundUid = emaillist[0].uid(); | 2672 | foundUid = emaillist[0].uid(); |
2649 | } | 2673 | } |
2650 | else if ((namelist.count() > 0) && (emaillist.count() == 0)) | 2674 | else if ((namelist.count() > 0) && (emaillist.count() == 0)) |
2651 | foundUid = namelist[0].uid(); | 2675 | foundUid = namelist[0].uid(); |
2652 | else | 2676 | else |
2653 | { | 2677 | { |
2654 | for (int i = 0; i < namelist.count(); i++) | 2678 | for (int i = 0; i < namelist.count(); i++) |
2655 | { | 2679 | { |
2656 | for (int j = 0; j < emaillist.count(); j++) | 2680 | for (int j = 0; j < emaillist.count(); j++) |
2657 | { | 2681 | { |
2658 | if (namelist[i] == emaillist[j]) | 2682 | if (namelist[i] == emaillist[j]) |
2659 | { | 2683 | { |
2660 | foundUid = namelist[i].uid(); | 2684 | foundUid = namelist[i].uid(); |
2661 | } | 2685 | } |
2662 | } | 2686 | } |
2663 | } | 2687 | } |
2664 | } | 2688 | } |
2665 | } | 2689 | } |
2666 | else | 2690 | else |
2667 | { | 2691 | { |
2668 | foundUid = uid; | 2692 | foundUid = uid; |
2669 | } | 2693 | } |
2670 | 2694 | ||
2671 | if (!foundUid.isEmpty()) | 2695 | if (!foundUid.isEmpty()) |
2672 | { | 2696 | { |
2673 | 2697 | ||
2674 | // raise Ka/Pi if it is in the background | 2698 | // raise Ka/Pi if it is in the background |
2675 | #ifndef DESKTOP_VERSION | 2699 | #ifndef DESKTOP_VERSION |
2676 | #ifndef KORG_NODCOP | 2700 | #ifndef KORG_NODCOP |
2677 | //QCopEnvelope e("QPE/Application/kapi", "raise()"); | 2701 | //QCopEnvelope e("QPE/Application/kapi", "raise()"); |
2678 | #endif | 2702 | #endif |
2679 | #endif | 2703 | #endif |
2680 | 2704 | ||
2681 | mMainWindow->showMaximized(); | 2705 | mMainWindow->showMaximized(); |
2682 | mMainWindow-> raise(); | 2706 | mMainWindow-> raise(); |
2683 | 2707 | ||
2684 | mViewManager->setSelected( "", false); | 2708 | mViewManager->setSelected( "", false); |
2685 | mViewManager->refreshView( "" ); | 2709 | mViewManager->refreshView( "" ); |
2686 | mViewManager->setSelected( foundUid, true ); | 2710 | mViewManager->setSelected( foundUid, true ); |
2687 | mViewManager->refreshView( foundUid ); | 2711 | mViewManager->refreshView( foundUid ); |
2688 | 2712 | ||
2689 | if ( !mMultipleViewsAtOnce ) | 2713 | if ( !mMultipleViewsAtOnce ) |
2690 | { | 2714 | { |
2691 | setDetailsVisible( true ); | 2715 | setDetailsVisible( true ); |
2692 | mActionDetails->setChecked(true); | 2716 | mActionDetails->setChecked(true); |
2693 | } | 2717 | } |
2694 | } | 2718 | } |
2695 | } | 2719 | } |
2696 | 2720 | ||
2697 | void KABCore::whatsnew() | 2721 | void KABCore::whatsnew() |
2698 | { | 2722 | { |
2699 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 2723 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
2700 | } | 2724 | } |
2701 | void KABCore::synchowto() | 2725 | void KABCore::synchowto() |
2702 | { | 2726 | { |
2703 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 2727 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
2704 | } | 2728 | } |
2705 | void KABCore::kdesynchowto() | 2729 | void KABCore::kdesynchowto() |
2706 | { | 2730 | { |
2707 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 2731 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
2708 | } | 2732 | } |
2709 | void KABCore::multisynchowto() | 2733 | void KABCore::multisynchowto() |
2710 | { | 2734 | { |
2711 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 2735 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
2712 | } | 2736 | } |
2713 | void KABCore::faq() | 2737 | void KABCore::faq() |
2714 | { | 2738 | { |
2715 | KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); | 2739 | KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); |
2716 | } | 2740 | } |
2717 | 2741 | ||
2718 | #include <libkcal/syncdefines.h> | 2742 | #include <libkcal/syncdefines.h> |
2719 | 2743 | ||
2720 | KABC::Addressee KABCore::getLastSyncAddressee() | 2744 | KABC::Addressee KABCore::getLastSyncAddressee() |
2721 | { | 2745 | { |
2722 | Addressee lse; | 2746 | Addressee lse; |
2723 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2747 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2724 | 2748 | ||
2725 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); | 2749 | //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); |
2726 | lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); | 2750 | lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); |
2727 | if (lse.isEmpty()) { | 2751 | if (lse.isEmpty()) { |
2728 | qDebug("KA: Creating new last-syncAddressee "); | 2752 | qDebug("KA: Creating new last-syncAddressee "); |
2729 | lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); | 2753 | lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); |
2730 | QString sum = ""; | 2754 | QString sum = ""; |
2731 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) | 2755 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) |
2732 | sum = "E: "; | 2756 | sum = "E: "; |
2733 | lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); | 2757 | lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); |
2734 | lse.setRevision( mLastAddressbookSync ); | 2758 | lse.setRevision( mLastAddressbookSync ); |
2735 | lse.setCategories( i18n("SyncEvent") ); | 2759 | lse.setCategories( i18n("SyncEvent") ); |
2736 | mAddressBook->insertAddressee( lse ); | 2760 | mAddressBook->insertAddressee( lse ); |
2737 | } | 2761 | } |
2738 | return lse; | 2762 | return lse; |
2739 | } | 2763 | } |
2740 | int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) | 2764 | int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) |
2741 | { | 2765 | { |
2742 | 2766 | ||
2743 | //void setZaurusId(int id); | 2767 | //void setZaurusId(int id); |
2744 | // int zaurusId() const; | 2768 | // int zaurusId() const; |
2745 | // void setZaurusUid(int id); | 2769 | // void setZaurusUid(int id); |
2746 | // int zaurusUid() const; | 2770 | // int zaurusUid() const; |
2747 | // void setZaurusStat(int id); | 2771 | // void setZaurusStat(int id); |
2748 | // int zaurusStat() const; | 2772 | // int zaurusStat() const; |
2749 | // 0 equal | 2773 | // 0 equal |
2750 | // 1 take local | 2774 | // 1 take local |
2751 | // 2 take remote | 2775 | // 2 take remote |
2752 | // 3 cancel | 2776 | // 3 cancel |
2753 | QDateTime lastSync = mLastAddressbookSync; | 2777 | QDateTime lastSync = mLastAddressbookSync; |
2754 | QDateTime localMod = local->revision(); | 2778 | QDateTime localMod = local->revision(); |
2755 | QDateTime remoteMod = remote->revision(); | 2779 | QDateTime remoteMod = remote->revision(); |
2756 | 2780 | ||
2757 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2781 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2758 | 2782 | ||
2759 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2783 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2760 | bool remCh, locCh; | 2784 | bool remCh, locCh; |
2761 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); | 2785 | remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); |
2762 | //if ( remCh ) | 2786 | //if ( remCh ) |
2763 | // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); | 2787 | // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); |
2764 | locCh = ( localMod > mLastAddressbookSync ); | 2788 | locCh = ( localMod > mLastAddressbookSync ); |
2765 | //qDebug("cahnged rem %d loc %d",remCh, locCh ); | 2789 | //qDebug("cahnged rem %d loc %d",remCh, locCh ); |
2766 | if ( !remCh && ! locCh ) { | 2790 | if ( !remCh && ! locCh ) { |
2767 | //qDebug("both not changed "); | 2791 | //qDebug("both not changed "); |
2768 | lastSync = localMod.addDays(1); | 2792 | lastSync = localMod.addDays(1); |
2769 | if ( mode <= SYNC_PREF_ASK ) | 2793 | if ( mode <= SYNC_PREF_ASK ) |
2770 | return 0; | 2794 | return 0; |
2771 | } else { | 2795 | } else { |
2772 | if ( locCh ) { | 2796 | if ( locCh ) { |
2773 | //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); | 2797 | //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); |
2774 | lastSync = localMod.addDays( -1 ); | 2798 | lastSync = localMod.addDays( -1 ); |
2775 | if ( !remCh ) | 2799 | if ( !remCh ) |
2776 | remoteMod =( lastSync.addDays( -1 ) ); | 2800 | remoteMod =( lastSync.addDays( -1 ) ); |
2777 | } else { | 2801 | } else { |
2778 | //qDebug(" not loc changed "); | 2802 | //qDebug(" not loc changed "); |
2779 | lastSync = localMod.addDays( 1 ); | 2803 | lastSync = localMod.addDays( 1 ); |
2780 | if ( remCh ) { | 2804 | if ( remCh ) { |
2781 | //qDebug("rem changed "); | 2805 | //qDebug("rem changed "); |
2782 | remoteMod =( lastSync.addDays( 1 ) ); | 2806 | remoteMod =( lastSync.addDays( 1 ) ); |
2783 | } | 2807 | } |
2784 | 2808 | ||
2785 | } | 2809 | } |
2786 | } | 2810 | } |
2787 | full = true; | 2811 | full = true; |
2788 | if ( mode < SYNC_PREF_ASK ) | 2812 | if ( mode < SYNC_PREF_ASK ) |
2789 | mode = SYNC_PREF_ASK; | 2813 | mode = SYNC_PREF_ASK; |
2790 | } else { | 2814 | } else { |
2791 | if ( localMod == remoteMod ) | 2815 | if ( localMod == remoteMod ) |
2792 | return 0; | 2816 | return 0; |
2793 | 2817 | ||
2794 | } | 2818 | } |
2795 | //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec()); | 2819 | //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec()); |
2796 | //qDebug("lastsync %s ", lastSync.toString().latin1() ); | 2820 | //qDebug("lastsync %s ", lastSync.toString().latin1() ); |
2797 | //full = true; //debug only | 2821 | //full = true; //debug only |
2798 | if ( full ) { | 2822 | if ( full ) { |
2799 | bool equ = ( (*local) == (*remote) ); | 2823 | bool equ = ( (*local) == (*remote) ); |
2800 | if ( equ ) { | 2824 | if ( equ ) { |
2801 | //qDebug("equal "); | 2825 | //qDebug("equal "); |
2802 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2826 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2803 | local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); | 2827 | local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); |
2804 | } | 2828 | } |
2805 | if ( mode < SYNC_PREF_FORCE_LOCAL ) | 2829 | if ( mode < SYNC_PREF_FORCE_LOCAL ) |
2806 | return 0; | 2830 | return 0; |
2807 | 2831 | ||
2808 | }//else //debug only | 2832 | }//else //debug only |
2809 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); | 2833 | //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); |
2810 | } | 2834 | } |
2811 | int result; | 2835 | int result; |
2812 | bool localIsNew; | 2836 | bool localIsNew; |
2813 | //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , local->lastModified().toString().latin1() , remote->lastModified().toString().latin1() ); | 2837 | //qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , local->lastModified().toString().latin1() , remote->lastModified().toString().latin1() ); |
2814 | 2838 | ||
2815 | if ( full && mode < SYNC_PREF_NEWEST ) | 2839 | if ( full && mode < SYNC_PREF_NEWEST ) |
2816 | mode = SYNC_PREF_ASK; | 2840 | mode = SYNC_PREF_ASK; |
2817 | 2841 | ||
2818 | switch( mode ) { | 2842 | switch( mode ) { |
2819 | case SYNC_PREF_LOCAL: | 2843 | case SYNC_PREF_LOCAL: |
2820 | if ( lastSync > remoteMod ) | 2844 | if ( lastSync > remoteMod ) |
2821 | return 1; | 2845 | return 1; |
2822 | if ( lastSync > localMod ) | 2846 | if ( lastSync > localMod ) |
2823 | return 2; | 2847 | return 2; |
2824 | return 1; | 2848 | return 1; |
2825 | break; | 2849 | break; |
2826 | case SYNC_PREF_REMOTE: | 2850 | case SYNC_PREF_REMOTE: |
2827 | if ( lastSync > remoteMod ) | 2851 | if ( lastSync > remoteMod ) |
2828 | return 1; | 2852 | return 1; |
2829 | if ( lastSync > localMod ) | 2853 | if ( lastSync > localMod ) |
2830 | return 2; | 2854 | return 2; |
2831 | return 2; | 2855 | return 2; |
2832 | break; | 2856 | break; |
2833 | case SYNC_PREF_NEWEST: | 2857 | case SYNC_PREF_NEWEST: |
2834 | if ( localMod > remoteMod ) | 2858 | if ( localMod > remoteMod ) |
2835 | return 1; | 2859 | return 1; |
2836 | else | 2860 | else |
2837 | return 2; | 2861 | return 2; |
2838 | break; | 2862 | break; |
2839 | case SYNC_PREF_ASK: | 2863 | case SYNC_PREF_ASK: |
2840 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 2864 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
2841 | if ( lastSync > remoteMod ) | 2865 | if ( lastSync > remoteMod ) |
2842 | return 1; | 2866 | return 1; |
2843 | if ( lastSync > localMod ) { | 2867 | if ( lastSync > localMod ) { |
2844 | return 2; | 2868 | return 2; |
2845 | } | 2869 | } |
2846 | localIsNew = localMod >= remoteMod; | 2870 | localIsNew = localMod >= remoteMod; |
2847 | //qDebug("conflict! ************************************** "); | 2871 | //qDebug("conflict! ************************************** "); |
2848 | { | 2872 | { |
2849 | KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this ); | 2873 | KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this ); |
2850 | result = acd.executeD(localIsNew); | 2874 | result = acd.executeD(localIsNew); |
2851 | return result; | 2875 | return result; |
2852 | } | 2876 | } |
2853 | break; | 2877 | break; |
2854 | case SYNC_PREF_FORCE_LOCAL: | 2878 | case SYNC_PREF_FORCE_LOCAL: |
2855 | return 1; | 2879 | return 1; |
2856 | break; | 2880 | break; |
2857 | case SYNC_PREF_FORCE_REMOTE: | 2881 | case SYNC_PREF_FORCE_REMOTE: |
2858 | return 2; | 2882 | return 2; |
2859 | break; | 2883 | break; |
2860 | 2884 | ||
2861 | default: | 2885 | default: |
2862 | // SYNC_PREF_TAKE_BOTH not implemented | 2886 | // SYNC_PREF_TAKE_BOTH not implemented |
2863 | break; | 2887 | break; |
2864 | } | 2888 | } |
2865 | return 0; | 2889 | return 0; |
2866 | } | 2890 | } |
2867 | 2891 | ||
2868 | 2892 | ||
2869 | bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode) | 2893 | bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode) |
2870 | { | 2894 | { |
2871 | bool syncOK = true; | 2895 | bool syncOK = true; |
2872 | int addedAddressee = 0; | 2896 | int addedAddressee = 0; |
2873 | int addedAddresseeR = 0; | 2897 | int addedAddresseeR = 0; |
2874 | int deletedAddresseeR = 0; | 2898 | int deletedAddresseeR = 0; |
2875 | int deletedAddresseeL = 0; | 2899 | int deletedAddresseeL = 0; |
2876 | int changedLocal = 0; | 2900 | int changedLocal = 0; |
2877 | int changedRemote = 0; | 2901 | int changedRemote = 0; |
2878 | int filteredIN = 0; | 2902 | int filteredIN = 0; |
2879 | int filteredOUT = 0; | 2903 | int filteredOUT = 0; |
2880 | 2904 | ||
2881 | QString mCurrentSyncName = syncManager->getCurrentSyncName(); | 2905 | QString mCurrentSyncName = syncManager->getCurrentSyncName(); |
2882 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 2906 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
2883 | 2907 | ||
2884 | //QPtrList<Addressee> el = local->rawAddressees(); | 2908 | //QPtrList<Addressee> el = local->rawAddressees(); |
2885 | Addressee addresseeR; | 2909 | Addressee addresseeR; |
2886 | QString uid; | 2910 | QString uid; |
2887 | int take; | 2911 | int take; |
2888 | Addressee addresseeL; | 2912 | Addressee addresseeL; |
2889 | Addressee addresseeRSync; | 2913 | Addressee addresseeRSync; |
2890 | Addressee addresseeLSync; | 2914 | Addressee addresseeLSync; |
2891 | // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees(); | 2915 | // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees(); |
2892 | //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); | 2916 | //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); |
2893 | bool fullDateRange = false; | 2917 | bool fullDateRange = false; |
2894 | local->resetTempSyncStat(); | 2918 | local->resetTempSyncStat(); |
2895 | mLastAddressbookSync = QDateTime::currentDateTime(); | 2919 | mLastAddressbookSync = QDateTime::currentDateTime(); |
2896 | if ( syncManager->syncWithDesktop() ) { | 2920 | if ( syncManager->syncWithDesktop() ) { |
2897 | // remote->removeSyncInfo( QString());//remove all info | 2921 | // remote->removeSyncInfo( QString());//remove all info |
2898 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { | 2922 | if ( KSyncManager::mRequestedSyncEvent.isValid() ) { |
2899 | mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; | 2923 | mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; |
2900 | qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); | 2924 | qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); |
2901 | } else { | 2925 | } else { |
2902 | qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime "); | 2926 | qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime "); |
2903 | } | 2927 | } |
2904 | } | 2928 | } |
2905 | QDateTime modifiedCalendar = mLastAddressbookSync; | 2929 | QDateTime modifiedCalendar = mLastAddressbookSync; |
2906 | addresseeLSync = getLastSyncAddressee(); | 2930 | addresseeLSync = getLastSyncAddressee(); |
2907 | qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1()); | 2931 | qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1()); |
2908 | addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); | 2932 | addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); |
2909 | if ( !addresseeR.isEmpty() ) { | 2933 | if ( !addresseeR.isEmpty() ) { |
2910 | addresseeRSync = addresseeR; | 2934 | addresseeRSync = addresseeR; |
2911 | remote->removeAddressee(addresseeR ); | 2935 | remote->removeAddressee(addresseeR ); |
2912 | 2936 | ||
2913 | } else { | 2937 | } else { |
2914 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2938 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2915 | addresseeRSync = addresseeLSync ; | 2939 | addresseeRSync = addresseeLSync ; |
2916 | } else { | 2940 | } else { |
2917 | //qDebug("FULLDATE 1"); | 2941 | //qDebug("FULLDATE 1"); |
2918 | fullDateRange = true; | 2942 | fullDateRange = true; |
2919 | Addressee newAdd; | 2943 | Addressee newAdd; |
2920 | addresseeRSync = newAdd; | 2944 | addresseeRSync = newAdd; |
2921 | addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); | 2945 | addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); |
2922 | addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); | 2946 | addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); |
2923 | addresseeRSync.setRevision( mLastAddressbookSync ); | 2947 | addresseeRSync.setRevision( mLastAddressbookSync ); |
2924 | addresseeRSync.setCategories( i18n("SyncAddressee") ); | 2948 | addresseeRSync.setCategories( i18n("SyncAddressee") ); |
2925 | } | 2949 | } |
2926 | } | 2950 | } |
2927 | if ( addresseeLSync.revision() == mLastAddressbookSync ) { | 2951 | if ( addresseeLSync.revision() == mLastAddressbookSync ) { |
2928 | // qDebug("FULLDATE 2"); | 2952 | // qDebug("FULLDATE 2"); |
2929 | fullDateRange = true; | 2953 | fullDateRange = true; |
2930 | } | 2954 | } |
2931 | if ( ! fullDateRange ) { | 2955 | if ( ! fullDateRange ) { |
2932 | if ( addresseeLSync.revision() != addresseeRSync.revision() ) { | 2956 | if ( addresseeLSync.revision() != addresseeRSync.revision() ) { |
2933 | 2957 | ||
2934 | // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() ); | 2958 | // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() ); |
2935 | //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec()); | 2959 | //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec()); |
2936 | fullDateRange = true; | 2960 | fullDateRange = true; |
2937 | //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() ); | 2961 | //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() ); |
2938 | } | 2962 | } |
2939 | } | 2963 | } |
2940 | // fullDateRange = true; // debug only! | 2964 | // fullDateRange = true; // debug only! |
2941 | if ( fullDateRange ) | 2965 | if ( fullDateRange ) |
2942 | mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365); | 2966 | mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365); |
2943 | else | 2967 | else |
2944 | mLastAddressbookSync = addresseeLSync.revision(); | 2968 | mLastAddressbookSync = addresseeLSync.revision(); |
2945 | // for resyncing if own file has changed | 2969 | // for resyncing if own file has changed |
2946 | // PENDING fixme later when implemented | 2970 | // PENDING fixme later when implemented |
2947 | #if 0 | 2971 | #if 0 |
2948 | if ( mCurrentSyncDevice == "deleteaftersync" ) { | 2972 | if ( mCurrentSyncDevice == "deleteaftersync" ) { |
2949 | mLastAddressbookSync = loadedFileVersion; | 2973 | mLastAddressbookSync = loadedFileVersion; |
2950 | qDebug("setting mLastAddressbookSync "); | 2974 | qDebug("setting mLastAddressbookSync "); |
2951 | } | 2975 | } |
2952 | #endif | 2976 | #endif |
2953 | 2977 | ||
2954 | 2978 | ||
2955 | // ********** setting filters **************** | 2979 | // ********** setting filters **************** |
2956 | Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB ); | 2980 | Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB ); |
2957 | Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB ); | 2981 | Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB ); |
2958 | 2982 | ||
2959 | //qDebug("*************************** "); | 2983 | //qDebug("*************************** "); |
2960 | // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() ); | 2984 | // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() ); |
2961 | QStringList er = remote->uidList(); | 2985 | QStringList er = remote->uidList(); |
2962 | Addressee inR ;//= er.first(); | 2986 | Addressee inR ;//= er.first(); |
2963 | Addressee inL; | 2987 | Addressee inL; |
2964 | 2988 | ||
2965 | syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count()); | 2989 | syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count()); |
2966 | 2990 | ||
2967 | int modulo = (er.count()/10)+1; | 2991 | int modulo = (er.count()/10)+1; |
2968 | int incCounter = 0; | 2992 | int incCounter = 0; |
2969 | while ( incCounter < er.count()) { | 2993 | while ( incCounter < er.count()) { |
2970 | if (syncManager->isProgressBarCanceled()) | 2994 | if (syncManager->isProgressBarCanceled()) |
2971 | return false; | 2995 | return false; |
2972 | if ( incCounter % modulo == 0 ) | 2996 | if ( incCounter % modulo == 0 ) |
2973 | syncManager->showProgressBar(incCounter); | 2997 | syncManager->showProgressBar(incCounter); |
2974 | 2998 | ||
2975 | uid = er[ incCounter ]; | 2999 | uid = er[ incCounter ]; |
2976 | bool skipIncidence = false; | 3000 | bool skipIncidence = false; |
2977 | if ( uid.left(19) == QString("last-syncAddressee-") ) | 3001 | if ( uid.left(19) == QString("last-syncAddressee-") ) |
2978 | skipIncidence = true; | 3002 | skipIncidence = true; |
2979 | QString idS,OidS; | 3003 | QString idS,OidS; |
2980 | qApp->processEvents(); | 3004 | qApp->processEvents(); |
2981 | if ( !skipIncidence ) { | 3005 | if ( !skipIncidence ) { |
2982 | inL = local->findByUid( uid ); | 3006 | inL = local->findByUid( uid ); |
2983 | inR = remote->findByUid( uid ); | 3007 | inR = remote->findByUid( uid ); |
2984 | //inL.setResource( 0 ); | 3008 | //inL.setResource( 0 ); |
2985 | //inR.setResource( 0 ); | 3009 | //inR.setResource( 0 ); |
2986 | if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars | 3010 | if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars |
2987 | if ( !inL.resource() || inL.resource()->includeInSync() ) { | 3011 | if ( !inL.resource() || inL.resource()->includeInSync() ) { |
2988 | if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) { | 3012 | if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) { |
2989 | //qDebug("take %d %s ", take, inL.summary().latin1()); | 3013 | //qDebug("take %d %s ", take, inL.summary().latin1()); |
2990 | if ( take == 3 ) | 3014 | if ( take == 3 ) |
2991 | return false; | 3015 | return false; |
2992 | if ( take == 1 ) {// take local ********************** | 3016 | if ( take == 1 ) {// take local ********************** |
2993 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 3017 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2994 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | 3018 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); |
2995 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | 3019 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); |
2996 | local->insertAddressee( inL, false ); | 3020 | local->insertAddressee( inL, false ); |
2997 | idS = inR.externalUID(); | 3021 | idS = inR.externalUID(); |
2998 | OidS = inR.originalExternalUID(); | 3022 | OidS = inR.originalExternalUID(); |
2999 | } | 3023 | } |
3000 | else | 3024 | else |
3001 | idS = inR.IDStr(); | 3025 | idS = inR.IDStr(); |
3002 | remote->removeAddressee( inR ); | 3026 | remote->removeAddressee( inR ); |
3003 | inR = inL; | 3027 | inR = inL; |
3004 | inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 3028 | inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
3005 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 3029 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
3006 | inR.setOriginalExternalUID( OidS ); | 3030 | inR.setOriginalExternalUID( OidS ); |
3007 | inR.setExternalUID( idS ); | 3031 | inR.setExternalUID( idS ); |
3008 | if ( syncManager->syncWithDesktop() ) { | 3032 | if ( syncManager->syncWithDesktop() ) { |
3009 | inR.setIDStr("changed" ); | 3033 | inR.setIDStr("changed" ); |
3010 | } | 3034 | } |
3011 | //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); | 3035 | //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); |
3012 | } else { | 3036 | } else { |
3013 | inR.setIDStr( idS ); | 3037 | inR.setIDStr( idS ); |
3014 | } | 3038 | } |
3015 | inR.setResource( 0 ); | 3039 | inR.setResource( 0 ); |
3016 | remote->insertAddressee( inR , false); | 3040 | remote->insertAddressee( inR , false); |
3017 | ++changedRemote; | 3041 | ++changedRemote; |
3018 | } else { // take == 2 take remote ********************** | 3042 | } else { // take == 2 take remote ********************** |
3019 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 3043 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
3020 | if ( inR.revision().date().year() < 2004 ) | 3044 | if ( inR.revision().date().year() < 2004 ) |
3021 | inR.setRevision( modifiedCalendar ); | 3045 | inR.setRevision( modifiedCalendar ); |
3022 | } | 3046 | } |
3023 | idS = inL.IDStr(); | 3047 | idS = inL.IDStr(); |
3024 | local->removeAddressee( inL ); | 3048 | local->removeAddressee( inL ); |
3025 | inL = inR; | 3049 | inL = inR; |
3026 | inL.setIDStr( idS ); | 3050 | inL.setIDStr( idS ); |
3027 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 3051 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
3028 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | 3052 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); |
3029 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | 3053 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); |
3030 | } | 3054 | } |
3031 | inL.setResource( 0 ); | 3055 | inL.setResource( 0 ); |
3032 | local->insertAddressee( inL , false ); | 3056 | local->insertAddressee( inL , false ); |
3033 | ++changedLocal; | 3057 | ++changedLocal; |
3034 | } | 3058 | } |
3035 | } | 3059 | } |
3036 | } | 3060 | } |
3037 | } else { // no conflict ********** add or delete remote | 3061 | } else { // no conflict ********** add or delete remote |
3038 | if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) { | 3062 | if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) { |
3039 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 3063 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
3040 | QString des = addresseeLSync.note(); | 3064 | QString des = addresseeLSync.note(); |
3041 | if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it | 3065 | if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it |
3042 | inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); | 3066 | inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); |
3043 | remote->insertAddressee( inR, false ); | 3067 | remote->insertAddressee( inR, false ); |
3044 | ++deletedAddresseeR; | 3068 | ++deletedAddresseeR; |
3045 | } else { | 3069 | } else { |
3046 | inR.setRevision( modifiedCalendar ); | 3070 | inR.setRevision( modifiedCalendar ); |
3047 | remote->insertAddressee( inR, false ); | 3071 | remote->insertAddressee( inR, false ); |
3048 | inL = inR; | 3072 | inL = inR; |
3049 | inL.setIDStr( ":" ); | 3073 | inL.setIDStr( ":" ); |
3050 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | 3074 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); |
3051 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | 3075 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); |
3052 | inL.setResource( 0 ); | 3076 | inL.setResource( 0 ); |
3053 | local->insertAddressee( inL , false); | 3077 | local->insertAddressee( inL , false); |
3054 | ++addedAddressee; | 3078 | ++addedAddressee; |
3055 | } | 3079 | } |
3056 | } else { | 3080 | } else { |
3057 | if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { | 3081 | if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { |
3058 | inR.setRevision( modifiedCalendar ); | 3082 | inR.setRevision( modifiedCalendar ); |
3059 | remote->insertAddressee( inR, false ); | 3083 | remote->insertAddressee( inR, false ); |
3060 | inR.setResource( 0 ); | 3084 | inR.setResource( 0 ); |
3061 | local->insertAddressee( inR, false ); | 3085 | local->insertAddressee( inR, false ); |
3062 | ++addedAddressee; | 3086 | ++addedAddressee; |
3063 | } else { | 3087 | } else { |
3064 | // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); | 3088 | // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); |
3065 | remote->removeAddressee( inR ); | 3089 | remote->removeAddressee( inR ); |
3066 | ++deletedAddresseeR; | 3090 | ++deletedAddresseeR; |
3067 | } | 3091 | } |
3068 | } | 3092 | } |
3069 | } else { | 3093 | } else { |
3070 | ++filteredIN; | 3094 | ++filteredIN; |
3071 | } | 3095 | } |
3072 | } | 3096 | } |
3073 | } | 3097 | } |
3074 | ++incCounter; | 3098 | ++incCounter; |
3075 | } | 3099 | } |
3076 | er.clear(); | 3100 | er.clear(); |
3077 | QStringList el = local->uidList(); | 3101 | QStringList el = local->uidList(); |
3078 | modulo = (el.count()/10)+1; | 3102 | modulo = (el.count()/10)+1; |
3079 | 3103 | ||
3080 | syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); | 3104 | syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); |
3081 | incCounter = 0; | 3105 | incCounter = 0; |
3082 | while ( incCounter < el.count()) { | 3106 | while ( incCounter < el.count()) { |
3083 | qApp->processEvents(); | 3107 | qApp->processEvents(); |
3084 | if (syncManager->isProgressBarCanceled()) | 3108 | if (syncManager->isProgressBarCanceled()) |
3085 | return false; | 3109 | return false; |
3086 | if ( incCounter % modulo == 0 ) | 3110 | if ( incCounter % modulo == 0 ) |
3087 | syncManager->showProgressBar(incCounter); | 3111 | syncManager->showProgressBar(incCounter); |
3088 | uid = el[ incCounter ]; | 3112 | uid = el[ incCounter ]; |
3089 | bool skipIncidence = false; | 3113 | bool skipIncidence = false; |
3090 | if ( uid.left(19) == QString("last-syncAddressee-") ) | 3114 | if ( uid.left(19) == QString("last-syncAddressee-") ) |
3091 | skipIncidence = true; | 3115 | skipIncidence = true; |
3092 | if ( !skipIncidence ) { | 3116 | if ( !skipIncidence ) { |
3093 | inL = local->findByUid( uid ); | 3117 | inL = local->findByUid( uid ); |
3094 | if ( !inL.resource() || inL.resource()->includeInSync() ) { | 3118 | if ( !inL.resource() || inL.resource()->includeInSync() ) { |
3095 | inR = remote->findByUid( uid ); | 3119 | inR = remote->findByUid( uid ); |
3096 | if ( inR.isEmpty() ){ | 3120 | if ( inR.isEmpty() ){ |
3097 | if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) { | 3121 | if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) { |
3098 | // no conflict ********** add or delete local | 3122 | // no conflict ********** add or delete local |
3099 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 3123 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
3100 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { | 3124 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { |
3101 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 3125 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
3102 | local->removeAddressee( inL ); | 3126 | local->removeAddressee( inL ); |
3103 | ++deletedAddresseeL; | 3127 | ++deletedAddresseeL; |
3104 | } else { | 3128 | } else { |
3105 | if ( ! syncManager->mWriteBackExistingOnly ) { | 3129 | if ( ! syncManager->mWriteBackExistingOnly ) { |
3106 | inL.removeID(mCurrentSyncDevice ); | 3130 | inL.removeID(mCurrentSyncDevice ); |
3107 | ++addedAddresseeR; | 3131 | ++addedAddresseeR; |
3108 | inL.setRevision( modifiedCalendar ); | 3132 | inL.setRevision( modifiedCalendar ); |
3109 | local->insertAddressee( inL, false ); | 3133 | local->insertAddressee( inL, false ); |
3110 | inR = inL; | 3134 | inR = inL; |
3111 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); | 3135 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); |
3112 | inR.setResource( 0 ); | 3136 | inR.setResource( 0 ); |
3113 | remote->insertAddressee( inR, false ); | 3137 | remote->insertAddressee( inR, false ); |
3114 | } | 3138 | } |
3115 | } | 3139 | } |
3116 | } else { | 3140 | } else { |
3117 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { | 3141 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { |
3118 | //qDebug("data %s ", inL.revision().toString().latin1()); | 3142 | //qDebug("data %s ", inL.revision().toString().latin1()); |
3119 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 3143 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
3120 | local->removeAddressee( inL ); | 3144 | local->removeAddressee( inL ); |
3121 | ++deletedAddresseeL; | 3145 | ++deletedAddresseeL; |
3122 | } else { | 3146 | } else { |
3123 | if ( ! syncManager->mWriteBackExistingOnly ) { | 3147 | if ( ! syncManager->mWriteBackExistingOnly ) { |
3124 | ++addedAddresseeR; | 3148 | ++addedAddresseeR; |
3125 | inL.setRevision( modifiedCalendar ); | 3149 | inL.setRevision( modifiedCalendar ); |
3126 | local->insertAddressee( inL, false ); | 3150 | local->insertAddressee( inL, false ); |
3127 | inR = inL; | 3151 | inR = inL; |
3128 | inR.setIDStr( ":" ); | 3152 | inR.setIDStr( ":" ); |
3129 | inR.setResource( 0 ); | 3153 | inR.setResource( 0 ); |
3130 | remote->insertAddressee( inR, false ); | 3154 | remote->insertAddressee( inR, false ); |
3131 | } | 3155 | } |
3132 | } | 3156 | } |
3133 | } | 3157 | } |
3134 | } else { | 3158 | } else { |
3135 | ++filteredOUT; | 3159 | ++filteredOUT; |
3136 | } | 3160 | } |
3137 | } | 3161 | } |
3138 | } | 3162 | } |
3139 | } | 3163 | } |
3140 | ++incCounter; | 3164 | ++incCounter; |
3141 | } | 3165 | } |
3142 | el.clear(); | 3166 | el.clear(); |
3143 | syncManager->hideProgressBar(); | 3167 | syncManager->hideProgressBar(); |
3144 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); | 3168 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); |
3145 | // get rid of micro seconds | 3169 | // get rid of micro seconds |
3146 | QTime t = mLastAddressbookSync.time(); | 3170 | QTime t = mLastAddressbookSync.time(); |
3147 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); | 3171 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); |
3148 | addresseeLSync.setRevision( mLastAddressbookSync ); | 3172 | addresseeLSync.setRevision( mLastAddressbookSync ); |
3149 | addresseeRSync.setRevision( mLastAddressbookSync ); | 3173 | addresseeRSync.setRevision( mLastAddressbookSync ); |
3150 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; | 3174 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; |
3151 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); | 3175 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); |
3152 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; | 3176 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; |
3153 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); | 3177 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); |
3154 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; | 3178 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; |
3155 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); | 3179 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); |
3156 | addresseeRSync.setNote( "" ) ; | 3180 | addresseeRSync.setNote( "" ) ; |
3157 | addresseeLSync.setNote( "" ); | 3181 | addresseeLSync.setNote( "" ); |
3158 | 3182 | ||
3159 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) | 3183 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) |
3160 | remote->insertAddressee( addresseeRSync, false ); | 3184 | remote->insertAddressee( addresseeRSync, false ); |
3161 | local->insertAddressee( addresseeLSync, false ); | 3185 | local->insertAddressee( addresseeLSync, false ); |
3162 | QString mes; | 3186 | QString mes; |
3163 | 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"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR, filteredIN, filteredOUT ); | 3187 | 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"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR, filteredIN, filteredOUT ); |
3164 | qDebug( mes ); | 3188 | qDebug( mes ); |
3165 | mes = i18n("Local addressbook changed!\n") +mes; | 3189 | mes = i18n("Local addressbook changed!\n") +mes; |
3166 | if ( syncManager->mShowSyncSummary ) { | 3190 | if ( syncManager->mShowSyncSummary ) { |
3167 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, | 3191 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, |
3168 | i18n("KA/Pi Synchronization"),i18n("Write back"))) { | 3192 | i18n("KA/Pi Synchronization"),i18n("Write back"))) { |
3169 | qDebug("KA: WB cancelled "); | 3193 | qDebug("KA: WB cancelled "); |
3170 | syncManager->mWriteBackFile = false; | 3194 | syncManager->mWriteBackFile = false; |
3171 | return syncOK; | 3195 | return syncOK; |
3172 | } | 3196 | } |
3173 | } | 3197 | } |
3174 | return syncOK; | 3198 | return syncOK; |
3175 | } | 3199 | } |
3176 | 3200 | ||
3177 | 3201 | ||
3178 | //this is a overwritten callbackmethods from the syncinterface | 3202 | //this is a overwritten callbackmethods from the syncinterface |
3179 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | 3203 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) |
3180 | { | 3204 | { |
3181 | 3205 | ||
3182 | //pending prepare addresseeview for output | 3206 | //pending prepare addresseeview for output |
3183 | //pending detect, if remote file has REV field. if not switch to external sync | 3207 | //pending detect, if remote file has REV field. if not switch to external sync |
3184 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 3208 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
3185 | if ( manager != syncManager ) | 3209 | if ( manager != syncManager ) |
3186 | qDebug("KABCore::sync:: ERROR! :: manager != syncManager "); | 3210 | qDebug("KABCore::sync:: ERROR! :: manager != syncManager "); |
3187 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 3211 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
3188 | 3212 | ||
3189 | AddressBook abLocal(filename,"syncContact"); | 3213 | AddressBook abLocal(filename,"syncContact"); |
3190 | bool syncOK = false; | 3214 | bool syncOK = false; |
3191 | if ( abLocal.load() ) { | 3215 | if ( abLocal.load() ) { |
3192 | qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode ); | 3216 | qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode ); |
3193 | bool external = false; | 3217 | bool external = false; |
3194 | bool isXML = false; | 3218 | bool isXML = false; |
3195 | if ( filename.right(4) == ".xml") { | 3219 | if ( filename.right(4) == ".xml") { |
3196 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3220 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3197 | isXML = true; | 3221 | isXML = true; |
3198 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); | 3222 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); |
3199 | } else { | 3223 | } else { |
3200 | external = !manager->mIsKapiFile; | 3224 | external = !manager->mIsKapiFile; |
3201 | if ( external ) { | 3225 | if ( external ) { |
3202 | qDebug("KA: Sync::Setting vcf mode to external "); | 3226 | qDebug("KA: Sync::Setting vcf mode to external "); |
3203 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3227 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3204 | AddressBook::Iterator it; | 3228 | AddressBook::Iterator it; |
3205 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 3229 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
3206 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); | 3230 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); |
3207 | (*it).computeCsum( mCurrentSyncDevice ); | 3231 | (*it).computeCsum( mCurrentSyncDevice ); |
3208 | } | 3232 | } |
3209 | } | 3233 | } |
3210 | } | 3234 | } |
3211 | //AddressBook::Iterator it; | 3235 | //AddressBook::Iterator it; |
3212 | //QStringList vcards; | 3236 | //QStringList vcards; |
3213 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 3237 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
3214 | // qDebug("Name %s ", (*it).familyName().latin1()); | 3238 | // qDebug("Name %s ", (*it).familyName().latin1()); |
3215 | //} | 3239 | //} |
3216 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); | 3240 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); |
3217 | syncManager->hideProgressBar(); | 3241 | syncManager->hideProgressBar(); |
3218 | if ( syncOK ) { | 3242 | if ( syncOK ) { |
3219 | if ( syncManager->mWriteBackFile ) | 3243 | if ( syncManager->mWriteBackFile ) |
3220 | { | 3244 | { |
3221 | if ( external ) | 3245 | if ( external ) |
3222 | abLocal.removeSyncAddressees( !isXML); | 3246 | abLocal.removeSyncAddressees( !isXML); |
3223 | qDebug("KA: Sync::Saving remote AB "); | 3247 | qDebug("KA: Sync::Saving remote AB "); |
3224 | if ( ! abLocal.saveAB()) | 3248 | if ( ! abLocal.saveAB()) |
3225 | qDebug("KA: sync::Error writing back AB to file "); | 3249 | qDebug("KA: sync::Error writing back AB to file "); |
3226 | if ( external ) { | 3250 | if ( external ) { |
3227 | // afterwrite processing | 3251 | // afterwrite processing |
3228 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); | 3252 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); |
3229 | } | 3253 | } |
3230 | } | 3254 | } |
3231 | } | 3255 | } |
3232 | setModified(); | 3256 | setModified(); |
3233 | 3257 | ||
3234 | } | 3258 | } |
3235 | abLocal.removeResources(); | 3259 | abLocal.removeResources(); |
3236 | if ( syncOK ) | 3260 | if ( syncOK ) |
3237 | mViewManager->refreshView(); | 3261 | mViewManager->refreshView(); |
3238 | return syncOK; | 3262 | return syncOK; |
3239 | 3263 | ||
3240 | } | 3264 | } |
3241 | void KABCore::removeSyncInfo( QString syncProfile) | 3265 | void KABCore::removeSyncInfo( QString syncProfile) |
3242 | { | 3266 | { |
3243 | qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1()); | 3267 | qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1()); |
3244 | mAddressBook->removeSyncInfo( syncProfile ); | 3268 | mAddressBook->removeSyncInfo( syncProfile ); |
3245 | setModified(); | 3269 | setModified(); |
3246 | } | 3270 | } |
3247 | 3271 | ||
3248 | 3272 | ||
3249 | //this is a overwritten callbackmethods from the syncinterface | 3273 | //this is a overwritten callbackmethods from the syncinterface |
3250 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) | 3274 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) |
3251 | { | 3275 | { |
3252 | if ( resource == "phone" ) | 3276 | if ( resource == "phone" ) |
3253 | return syncPhone(); | 3277 | return syncPhone(); |
3254 | disableBR( true ); | 3278 | disableBR( true ); |
3255 | if ( manager != syncManager ) | 3279 | if ( manager != syncManager ) |
3256 | qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); | 3280 | qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); |
3257 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 3281 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
3258 | 3282 | ||
3259 | AddressBook abLocal( resource,"syncContact"); | 3283 | AddressBook abLocal( resource,"syncContact"); |
3260 | bool syncOK = false; | 3284 | bool syncOK = false; |
3261 | message(i18n("Loading DTM address data..."), false); | 3285 | message(i18n("Loading DTM address data..."), false); |
3262 | if ( abLocal.load() ) { | 3286 | if ( abLocal.load() ) { |
3263 | qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 3287 | qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
3264 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3288 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3265 | message(i18n("Sync preprocessing..."),false); | 3289 | message(i18n("Sync preprocessing..."),false); |
3266 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); | 3290 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); |
3267 | message(i18n("Synchronizing..."),false); | 3291 | message(i18n("Synchronizing..."),false); |
3268 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 3292 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
3269 | syncManager->hideProgressBar(); | 3293 | syncManager->hideProgressBar(); |
3270 | if ( syncOK ) { | 3294 | if ( syncOK ) { |
3271 | if ( syncManager->mWriteBackFile ) { | 3295 | if ( syncManager->mWriteBackFile ) { |
3272 | abLocal.removeSyncAddressees( false ); | 3296 | abLocal.removeSyncAddressees( false ); |
3273 | message(i18n("Saving DTM address data..."),false); | 3297 | message(i18n("Saving DTM address data..."),false); |
3274 | abLocal.saveAB(); | 3298 | abLocal.saveAB(); |
3275 | message(i18n("Sync postprocessing..."),false); | 3299 | message(i18n("Sync postprocessing..."),false); |
3276 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); | 3300 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); |
3277 | } | 3301 | } |
3278 | } else | 3302 | } else |
3279 | message( i18n("Sync cancelled or failed.") ); | 3303 | message( i18n("Sync cancelled or failed.") ); |
3280 | setModified(); | 3304 | setModified(); |
3281 | } | 3305 | } |
3282 | abLocal.removeResources(); | 3306 | abLocal.removeResources(); |
3283 | if ( syncOK ) { | 3307 | if ( syncOK ) { |
3284 | mViewManager->refreshView(); | 3308 | mViewManager->refreshView(); |
3285 | message(i18n("DTM syncing finished.")); | 3309 | message(i18n("DTM syncing finished.")); |
3286 | } | 3310 | } |
3287 | disableBR( false ); | 3311 | disableBR( false ); |
3288 | return syncOK; | 3312 | return syncOK; |
3289 | 3313 | ||
3290 | } | 3314 | } |
3291 | void KABCore::message( QString m, bool startTimer) | 3315 | void KABCore::message( QString m, bool startTimer) |
3292 | { | 3316 | { |
3293 | topLevelWidget()->setCaption( m ); | 3317 | topLevelWidget()->setCaption( m ); |
3294 | qApp->processEvents(); | 3318 | qApp->processEvents(); |
3295 | if ( startTimer ) | 3319 | if ( startTimer ) |
3296 | mMessageTimer->start( 15000, true ); | 3320 | mMessageTimer->start( 15000, true ); |
3297 | else | 3321 | else |
3298 | mMessageTimer->stop(); | 3322 | mMessageTimer->stop(); |
3299 | } | 3323 | } |
3300 | bool KABCore::syncPhone() | 3324 | bool KABCore::syncPhone() |
3301 | { | 3325 | { |
3302 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); | 3326 | QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); |
3303 | QString fileName = getPhoneFile(); | 3327 | QString fileName = getPhoneFile(); |
3304 | if ( !PhoneAccess::readFromPhone( fileName) ) { | 3328 | if ( !PhoneAccess::readFromPhone( fileName) ) { |
3305 | message(i18n("Phone access failed!")); | 3329 | message(i18n("Phone access failed!")); |
3306 | return false; | 3330 | return false; |
3307 | } | 3331 | } |
3308 | AddressBook abLocal( fileName,"syncContact"); | 3332 | AddressBook abLocal( fileName,"syncContact"); |
3309 | bool syncOK = false; | 3333 | bool syncOK = false; |
3310 | { | 3334 | { |
3311 | abLocal.importFromFile( fileName ); | 3335 | abLocal.importFromFile( fileName ); |
3312 | qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 3336 | qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
3313 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 3337 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
3314 | abLocal.preparePhoneSync( mCurrentSyncDevice, true ); | 3338 | abLocal.preparePhoneSync( mCurrentSyncDevice, true ); |
3315 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); | 3339 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); |
3316 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 3340 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
3317 | syncManager->hideProgressBar(); | 3341 | syncManager->hideProgressBar(); |
3318 | if ( syncOK ) { | 3342 | if ( syncOK ) { |
3319 | if ( syncManager->mWriteBackFile ) { | 3343 | if ( syncManager->mWriteBackFile ) { |
3320 | abLocal.removeSyncAddressees( true ); | 3344 | abLocal.removeSyncAddressees( true ); |
3321 | abLocal.saveABphone( fileName ); | 3345 | abLocal.saveABphone( fileName ); |
3322 | abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); | 3346 | abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); |
3323 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); | 3347 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); |
3324 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); | 3348 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); |
3325 | } | 3349 | } |
3326 | } | 3350 | } |
3327 | setModified(); | 3351 | setModified(); |
3328 | } | 3352 | } |
3329 | abLocal.removeResources(); | 3353 | abLocal.removeResources(); |
3330 | if ( syncOK ) | 3354 | if ( syncOK ) |
3331 | mViewManager->refreshView(); | 3355 | mViewManager->refreshView(); |
3332 | return syncOK; | 3356 | return syncOK; |
3333 | } | 3357 | } |
3334 | void KABCore::getFile( bool success ) | 3358 | void KABCore::getFile( bool success ) |
3335 | { | 3359 | { |
3336 | if ( ! success ) { | 3360 | if ( ! success ) { |
3337 | message( i18n("Error receiving file. Nothing changed!") ); | 3361 | message( i18n("Error receiving file. Nothing changed!") ); |
3338 | return; | 3362 | return; |
3339 | } | 3363 | } |
3340 | int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); | 3364 | int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); |
3341 | if ( count ) | 3365 | if ( count ) |
3342 | setModified( true ); | 3366 | setModified( true ); |
3343 | message( i18n("Pi-Sync successful!") ); | 3367 | message( i18n("Pi-Sync successful!") ); |
3344 | mViewManager->refreshView(); | 3368 | mViewManager->refreshView(); |
3345 | } | 3369 | } |
3346 | void KABCore::syncFileRequest() | 3370 | void KABCore::syncFileRequest() |
3347 | { | 3371 | { |
3348 | if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { | 3372 | if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { |
3349 | syncManager->slotSyncMenu( 999 ); | 3373 | syncManager->slotSyncMenu( 999 ); |
3350 | } | 3374 | } |
3351 | mAddressBook->export2File( sentSyncFile() ); | 3375 | mAddressBook->export2File( sentSyncFile() ); |
3352 | } | 3376 | } |
3353 | QString KABCore::sentSyncFile() | 3377 | QString KABCore::sentSyncFile() |
3354 | { | 3378 | { |
3355 | #ifdef DESKTOP_VERSION | 3379 | #ifdef DESKTOP_VERSION |
3356 | return locateLocal( "tmp", "copysyncab.vcf" ); | 3380 | return locateLocal( "tmp", "copysyncab.vcf" ); |
3357 | #else | 3381 | #else |
3358 | return QString( "/tmp/copysyncab.vcf" ); | 3382 | return QString( "/tmp/copysyncab.vcf" ); |
3359 | #endif | 3383 | #endif |
3360 | } | 3384 | } |
3361 | 3385 | ||
3362 | void KABCore::setCaptionBack() | 3386 | void KABCore::setCaptionBack() |
3363 | { | 3387 | { |
3364 | mMessageTimer->stop(); | 3388 | mMessageTimer->stop(); |
3365 | topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); | 3389 | topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); |
3366 | } | 3390 | } |
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index c185117..47ea152 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -1,520 +1,524 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KAddressbook. | 2 | This file is part of KAddressbook. |
3 | Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> | 3 | Copyright (c) 2003 Tobias Koenig <tokoe@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 | #ifndef KABCORE_H | 24 | #ifndef KABCORE_H |
25 | #define KABCORE_H | 25 | #define KABCORE_H |
26 | 26 | ||
27 | #include <kabc/field.h> | 27 | #include <kabc/field.h> |
28 | 28 | ||
29 | #ifndef KAB_EMBEDDED | 29 | #ifndef KAB_EMBEDDED |
30 | #endif //KAB_EMBEDDED | 30 | #endif //KAB_EMBEDDED |
31 | #include <qdict.h> | 31 | #include <qdict.h> |
32 | #include <qtimer.h> | 32 | #include <qtimer.h> |
33 | 33 | ||
34 | #include <qwidget.h> | 34 | #include <qwidget.h> |
35 | #include <qpopupmenu.h> | 35 | #include <qpopupmenu.h> |
36 | #include <ksyncmanager.h> | 36 | #include <ksyncmanager.h> |
37 | #ifndef DESKTOP_VERSION | 37 | #ifndef DESKTOP_VERSION |
38 | #include <qcopchannel_qws.h> | 38 | #include <qcopchannel_qws.h> |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | namespace KABC { | 41 | namespace KABC { |
42 | class AddressBook; | 42 | class AddressBook; |
43 | } | 43 | } |
44 | 44 | ||
45 | #ifndef KAB_EMBEDDED | 45 | #ifndef KAB_EMBEDDED |
46 | class KAboutData; | 46 | class KAboutData; |
47 | class KConfig; | 47 | class KConfig; |
48 | 48 | ||
49 | class KAddressBookService; | 49 | class KAddressBookService; |
50 | class LDAPSearchDialog; | 50 | class LDAPSearchDialog; |
51 | #else //KAB_EMBEDDED | 51 | #else //KAB_EMBEDDED |
52 | class KAddressBookMain; | 52 | class KAddressBookMain; |
53 | //US class QAction; | 53 | //US class QAction; |
54 | #endif //KAB_EMBEDDED | 54 | #endif //KAB_EMBEDDED |
55 | class KCMultiDialog; | 55 | class KCMultiDialog; |
56 | class KXMLGUIClient; | 56 | class KXMLGUIClient; |
57 | class ExtensionManager; | 57 | class ExtensionManager; |
58 | class XXPortManager; | 58 | class XXPortManager; |
59 | class JumpButtonBar; | 59 | class JumpButtonBar; |
60 | class IncSearchWidget; | 60 | class IncSearchWidget; |
61 | class KDGanttMinimizeSplitter; | 61 | class KDGanttMinimizeSplitter; |
62 | class KAction; | 62 | class KAction; |
63 | class KActionCollection; | 63 | class KActionCollection; |
64 | class KToggleAction; | 64 | class KToggleAction; |
65 | class KSyncProfile; | 65 | class KSyncProfile; |
66 | 66 | ||
67 | class QAction; | 67 | class QAction; |
68 | class QMenuBar; | 68 | class QMenuBar; |
69 | class QSplitter; | 69 | class QSplitter; |
70 | class ViewContainer; | 70 | class ViewContainer; |
71 | class ViewManager; | 71 | class ViewManager; |
72 | class AddresseeEditorDialog; | 72 | class AddresseeEditorDialog; |
73 | class Ir; | 73 | class Ir; |
74 | 74 | ||
75 | class KABCore : public QWidget, public KSyncInterface | 75 | class KABCore : public QWidget, public KSyncInterface |
76 | { | 76 | { |
77 | Q_OBJECT | 77 | Q_OBJECT |
78 | 78 | ||
79 | public: | 79 | public: |
80 | KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name = 0 ); | 80 | KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name = 0 ); |
81 | 81 | ||
82 | 82 | ||
83 | ~KABCore(); | 83 | ~KABCore(); |
84 | 84 | ||
85 | 85 | ||
86 | #ifdef KAB_EMBEDDED | 86 | #ifdef KAB_EMBEDDED |
87 | //US added functionality | 87 | //US added functionality |
88 | QPopupMenu* getViewMenu() {return viewMenu;} | 88 | QPopupMenu* getViewMenu() {return viewMenu;} |
89 | QPopupMenu* getFilterMenu() {return filterMenu;} | 89 | QPopupMenu* getFilterMenu() {return filterMenu;} |
90 | QPopupMenu* getSettingsMenu() {return settingsMenu;} | 90 | QPopupMenu* getSettingsMenu() {return settingsMenu;} |
91 | void addActionsManually(); | 91 | void addActionsManually(); |
92 | #endif //KAB_EMBEDDED | 92 | #endif //KAB_EMBEDDED |
93 | /** | 93 | /** |
94 | Restores the global settings. | 94 | Restores the global settings. |
95 | */ | 95 | */ |
96 | void restoreSettings(); | 96 | void restoreSettings(); |
97 | 97 | ||
98 | 98 | ||
99 | 99 | ||
100 | /** | 100 | /** |
101 | Returns a pointer to the StdAddressBook of the application. | 101 | Returns a pointer to the StdAddressBook of the application. |
102 | */ | 102 | */ |
103 | KABC::AddressBook *addressBook() const; | 103 | KABC::AddressBook *addressBook() const; |
104 | 104 | ||
105 | /** | 105 | /** |
106 | Returns a pointer to the KConfig object of the application. | 106 | Returns a pointer to the KConfig object of the application. |
107 | */ | 107 | */ |
108 | static KConfig *config(); | 108 | static KConfig *config(); |
109 | 109 | ||
110 | /** | 110 | /** |
111 | Returns a pointer to the global KActionCollection object. So | 111 | Returns a pointer to the global KActionCollection object. So |
112 | other classes can register their actions easily. | 112 | other classes can register their actions easily. |
113 | */ | 113 | */ |
114 | KActionCollection *actionCollection() const; | 114 | KActionCollection *actionCollection() const; |
115 | 115 | ||
116 | /** | 116 | /** |
117 | Returns the current search field of the Incremental Search Widget. | 117 | Returns the current search field of the Incremental Search Widget. |
118 | */ | 118 | */ |
119 | KABC::Field *currentSearchField() const; | 119 | KABC::Field *currentSearchField() const; |
120 | 120 | ||
121 | /** | 121 | /** |
122 | Returns the uid list of the currently selected contacts. | 122 | Returns the uid list of the currently selected contacts. |
123 | */ | 123 | */ |
124 | QStringList selectedUIDs() const; | 124 | QStringList selectedUIDs() const; |
125 | 125 | ||
126 | /** | 126 | /** |
127 | Displays the ResourceSelectDialog and returns the selected | 127 | Displays the ResourceSelectDialog and returns the selected |
128 | resource or a null pointer if no resource was selected by | 128 | resource or a null pointer if no resource was selected by |
129 | the user. | 129 | the user. |
130 | */ | 130 | */ |
131 | KABC::Resource *requestResource( QWidget *parent ); | 131 | KABC::Resource *requestResource( QWidget *parent ); |
132 | 132 | ||
133 | #ifndef KAB_EMBEDDED | 133 | #ifndef KAB_EMBEDDED |
134 | static KAboutData *createAboutData(); | 134 | static KAboutData *createAboutData(); |
135 | #endif //KAB_EMBEDDED | 135 | #endif //KAB_EMBEDDED |
136 | 136 | ||
137 | #ifdef KAB_EMBEDDED | 137 | #ifdef KAB_EMBEDDED |
138 | inline QPopupMenu* getImportMenu() { return ImportMenu;} | 138 | inline QPopupMenu* getImportMenu() { return ImportMenu;} |
139 | inline QPopupMenu* getExportMenu() { return ExportMenu;} | 139 | inline QPopupMenu* getExportMenu() { return ExportMenu;} |
140 | #endif //KAB_EMBEDDED | 140 | #endif //KAB_EMBEDDED |
141 | 141 | ||
142 | public slots: | 142 | public slots: |
143 | #ifdef KAB_EMBEDDED | 143 | #ifdef KAB_EMBEDDED |
144 | void createAboutData(); | 144 | void createAboutData(); |
145 | #endif //KAB_EMBEDDED | 145 | #endif //KAB_EMBEDDED |
146 | void setDetailsToggle(); | 146 | void setDetailsToggle(); |
147 | 147 | ||
148 | void showLicence(); | 148 | void showLicence(); |
149 | void faq(); | 149 | void faq(); |
150 | void whatsnew() ; | 150 | void whatsnew() ; |
151 | void synchowto() ; | 151 | void synchowto() ; |
152 | void multisynchowto() ; | 152 | void multisynchowto() ; |
153 | void kdesynchowto() ; | 153 | void kdesynchowto() ; |
154 | void writeToPhone(); | 154 | void writeToPhone(); |
155 | 155 | ||
156 | /** | 156 | /** |
157 | Is called whenever a contact is selected in the view. | 157 | Is called whenever a contact is selected in the view. |
158 | */ | 158 | */ |
159 | void setContactSelected( const QString &uid ); | 159 | void setContactSelected( const QString &uid ); |
160 | 160 | ||
161 | /** | 161 | /** |
162 | Opens the preferred mail composer with all selected contacts as | 162 | Opens the preferred mail composer with all selected contacts as |
163 | arguments. | 163 | arguments. |
164 | */ | 164 | */ |
165 | void sendMail(); | 165 | void sendMail(); |
166 | 166 | ||
167 | /** | 167 | /** |
168 | Opens the preferred mail composer with the given contacts as | 168 | Opens the preferred mail composer with the given contacts as |
169 | arguments. | 169 | arguments. |
170 | */ | 170 | */ |
171 | void sendMail( const QString& email ); | 171 | void sendMail( const QString& email ); |
172 | 172 | ||
173 | 173 | ||
174 | void mailVCard(); | 174 | void mailVCard(); |
175 | void mailVCard(const QStringList& uids); | 175 | void mailVCard(const QStringList& uids); |
176 | 176 | ||
177 | /** | 177 | /** |
178 | Beams the "WhoAmI contact. | 178 | Beams the "WhoAmI contact. |
179 | */ | 179 | */ |
180 | void beamMySelf(); | 180 | void beamMySelf(); |
181 | 181 | ||
182 | void beamVCard(); | 182 | void beamVCard(); |
183 | void export2phone(); | 183 | void export2phone(); |
184 | void beamVCard(const QStringList& uids); | 184 | void beamVCard(const QStringList& uids); |
185 | void beamDone( Ir *ir ); | 185 | void beamDone( Ir *ir ); |
186 | 186 | ||
187 | 187 | ||
188 | /** | 188 | /** |
189 | Starts the preferred web browser with the given URL as argument. | 189 | Starts the preferred web browser with the given URL as argument. |
190 | */ | 190 | */ |
191 | void browse( const QString& url ); | 191 | void browse( const QString& url ); |
192 | 192 | ||
193 | /** | 193 | /** |
194 | Select all contacts in the view. | 194 | Select all contacts in the view. |
195 | */ | 195 | */ |
196 | void selectAllContacts(); | 196 | void selectAllContacts(); |
197 | 197 | ||
198 | /** | 198 | /** |
199 | Deletes all selected contacts from the address book. | 199 | Deletes all selected contacts from the address book. |
200 | */ | 200 | */ |
201 | void deleteContacts(); | 201 | void deleteContacts(); |
202 | 202 | ||
203 | /** | 203 | /** |
204 | Deletes given contacts from the address book. | 204 | Deletes given contacts from the address book. |
205 | 205 | ||
206 | @param uids The uids of the contacts, which shall be deleted. | 206 | @param uids The uids of the contacts, which shall be deleted. |
207 | */ | 207 | */ |
208 | void deleteContacts( const QStringList &uids ); | 208 | void deleteContacts( const QStringList &uids ); |
209 | 209 | ||
210 | /** | 210 | /** |
211 | Copys the selected contacts into clipboard for later pasting. | 211 | Copys the selected contacts into clipboard for later pasting. |
212 | */ | 212 | */ |
213 | void copyContacts(); | 213 | void copyContacts(); |
214 | 214 | ||
215 | /** | 215 | /** |
216 | Cuts the selected contacts and stores them for later pasting. | 216 | Cuts the selected contacts and stores them for later pasting. |
217 | */ | 217 | */ |
218 | void cutContacts(); | 218 | void cutContacts(); |
219 | 219 | ||
220 | /** | 220 | /** |
221 | Paste contacts from clipboard into the address book. | 221 | Paste contacts from clipboard into the address book. |
222 | */ | 222 | */ |
223 | void pasteContacts(); | 223 | void pasteContacts(); |
224 | 224 | ||
225 | /** | 225 | /** |
226 | Paste given contacts into the address book. | 226 | Paste given contacts into the address book. |
227 | 227 | ||
228 | @param list The list of addressee, which shall be pasted. | 228 | @param list The list of addressee, which shall be pasted. |
229 | */ | 229 | */ |
230 | void pasteContacts( KABC::Addressee::List &list ); | 230 | void pasteContacts( KABC::Addressee::List &list ); |
231 | 231 | ||
232 | /** | 232 | /** |
233 | Sets the whoAmI contact, that is used by many other programs to | 233 | Sets the whoAmI contact, that is used by many other programs to |
234 | get personal information about the current user. | 234 | get personal information about the current user. |
235 | */ | 235 | */ |
236 | void setWhoAmI(); | 236 | void setWhoAmI(); |
237 | 237 | ||
238 | /** | 238 | /** |
239 | Displays the category dialog and applies the result to all | 239 | Displays the category dialog and applies the result to all |
240 | selected contacts. | 240 | selected contacts. |
241 | */ | 241 | */ |
242 | void setCategories(); | 242 | void setCategories(); |
243 | void manageCategories(); | 243 | void manageCategories(); |
244 | void editCategories(); | 244 | void editCategories(); |
245 | 245 | ||
246 | /** | 246 | /** |
247 | Sets the field list of the Incremental Search Widget. | 247 | Sets the field list of the Incremental Search Widget. |
248 | */ | 248 | */ |
249 | void setSearchFields( const KABC::Field::List &fields ); | 249 | void setSearchFields( const KABC::Field::List &fields ); |
250 | 250 | ||
251 | /** | 251 | /** |
252 | Search with the current search field for a contact, that matches | 252 | Search with the current search field for a contact, that matches |
253 | the given text, and selects it in the view. | 253 | the given text, and selects it in the view. |
254 | */ | 254 | */ |
255 | void incrementalSearch( const QString& text ); | 255 | void incrementalSearch( const QString& text ); |
256 | 256 | ||
257 | /** | 257 | /** |
258 | Marks the address book as modified. | 258 | Marks the address book as modified. |
259 | */ | 259 | */ |
260 | void setModified(); | 260 | void setModified(); |
261 | /** | 261 | /** |
262 | Marks the address book as modified without refreshing the view. | 262 | Marks the address book as modified without refreshing the view. |
263 | */ | 263 | */ |
264 | void setModifiedWOrefresh(); | 264 | void setModifiedWOrefresh(); |
265 | 265 | ||
266 | /** | 266 | /** |
267 | Marks the address book as modified concerning the argument. | 267 | Marks the address book as modified concerning the argument. |
268 | */ | 268 | */ |
269 | void setModified( bool modified ); | 269 | void setModified( bool modified ); |
270 | 270 | ||
271 | /** | 271 | /** |
272 | Returns whether the address book is modified. | 272 | Returns whether the address book is modified. |
273 | */ | 273 | */ |
274 | bool modified() const; | 274 | bool modified() const; |
275 | 275 | ||
276 | /** | 276 | /** |
277 | Called whenever an contact is modified in the contact editor | 277 | Called whenever an contact is modified in the contact editor |
278 | dialog or the quick edit. | 278 | dialog or the quick edit. |
279 | */ | 279 | */ |
280 | void contactModified( const KABC::Addressee &addr ); | 280 | void contactModified( const KABC::Addressee &addr ); |
281 | void addrModified( const KABC::Addressee &addr, bool updateDetails = true ); | 281 | void addrModified( const KABC::Addressee &addr, bool updateDetails = true ); |
282 | 282 | ||
283 | /** | 283 | /** |
284 | DCOP METHODS. | 284 | DCOP METHODS. |
285 | */ | 285 | */ |
286 | void addEmail( QString addr ); | 286 | void addEmail( QString addr ); |
287 | void importVCard( const KURL& url, bool showPreview ); | 287 | void importVCard( const KURL& url, bool showPreview ); |
288 | void importVCard( const QString& vCard, bool showPreview ); | 288 | void importVCard( const QString& vCard, bool showPreview ); |
289 | void newContact(); | 289 | void newContact(); |
290 | QString getNameByPhone( const QString& phone ); | 290 | QString getNameByPhone( const QString& phone ); |
291 | /** | 291 | /** |
292 | END DCOP METHODS | 292 | END DCOP METHODS |
293 | */ | 293 | */ |
294 | 294 | ||
295 | /** | 295 | /** |
296 | Saves the contents of the AddressBook back to disk. | 296 | Saves the contents of the AddressBook back to disk. |
297 | */ | 297 | */ |
298 | void save(); | 298 | void save(); |
299 | 299 | ||
300 | /** | 300 | /** |
301 | Undos the last command using the undo stack. | 301 | Undos the last command using the undo stack. |
302 | */ | 302 | */ |
303 | void undo(); | 303 | void undo(); |
304 | 304 | ||
305 | /** | 305 | /** |
306 | Redos the last command that was undone, using the redo stack. | 306 | Redos the last command that was undone, using the redo stack. |
307 | */ | 307 | */ |
308 | void redo(); | 308 | void redo(); |
309 | 309 | ||
310 | /** | 310 | /** |
311 | Shows the edit dialog for the given uid. If the uid is QString::null, | 311 | Shows the edit dialog for the given uid. If the uid is QString::null, |
312 | the method will try to find a selected addressee in the view. | 312 | the method will try to find a selected addressee in the view. |
313 | */ | 313 | */ |
314 | void editContact( const QString &uid /*US = QString::null*/ ); | 314 | void editContact( const QString &uid /*US = QString::null*/ ); |
315 | //US added a second method without defaultparameter | 315 | //US added a second method without defaultparameter |
316 | void editContact2(); | 316 | void editContact2(); |
317 | 317 | ||
318 | /** | 318 | /** |
319 | Shows or edits the detail view for the given uid. If the uid is QString::null, | 319 | Shows or edits the detail view for the given uid. If the uid is QString::null, |
320 | the method will try to find a selected addressee in the view. | 320 | the method will try to find a selected addressee in the view. |
321 | */ | 321 | */ |
322 | void executeContact( const QString &uid /*US = QString::null*/ ); | 322 | void executeContact( const QString &uid /*US = QString::null*/ ); |
323 | 323 | ||
324 | /** | 324 | /** |
325 | Launches the configuration dialog. | 325 | Launches the configuration dialog. |
326 | */ | 326 | */ |
327 | void openConfigDialog(); | 327 | void openConfigDialog(); |
328 | 328 | ||
329 | /** | 329 | /** |
330 | Launches the ldap search dialog. | 330 | Launches the ldap search dialog. |
331 | */ | 331 | */ |
332 | void openLDAPDialog(); | 332 | void openLDAPDialog(); |
333 | 333 | ||
334 | /** | 334 | /** |
335 | Creates a KAddressBookPrinter, which will display the print | 335 | Creates a KAddressBookPrinter, which will display the print |
336 | dialog and do the printing. | 336 | dialog and do the printing. |
337 | */ | 337 | */ |
338 | void print(); | 338 | void print(); |
339 | 339 | ||
340 | /** | 340 | /** |
341 | Registers a new GUI client, so plugins can register its actions. | 341 | Registers a new GUI client, so plugins can register its actions. |
342 | */ | 342 | */ |
343 | void addGUIClient( KXMLGUIClient *client ); | 343 | void addGUIClient( KXMLGUIClient *client ); |
344 | 344 | ||
345 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); | 345 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); |
346 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); | 346 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); |
347 | void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); | 347 | void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); |
348 | 348 | ||
349 | 349 | ||
350 | signals: | 350 | signals: |
351 | void contactSelected( const QString &name ); | 351 | void contactSelected( const QString &name ); |
352 | void contactSelected( const QPixmap &pixmap ); | 352 | void contactSelected( const QPixmap &pixmap ); |
353 | public slots: | 353 | public slots: |
354 | void recieve(QString cmsg ); | 354 | void recieve(QString cmsg ); |
355 | void getFile( bool success ); | 355 | void getFile( bool success ); |
356 | void syncFileRequest(); | 356 | void syncFileRequest(); |
357 | void setDetailsVisible( bool visible ); | 357 | void setDetailsVisible( bool visible ); |
358 | void setDetailsToState(); | 358 | void setDetailsToState(); |
359 | 359 | ||
360 | void saveSettings(); | 360 | void saveSettings(); |
361 | 361 | ||
362 | private slots: | 362 | private slots: |
363 | void updateToolBar(); | 363 | void updateToolBar(); |
364 | void updateMainWindow(); | 364 | void updateMainWindow(); |
365 | void receive( const QCString& cmsg, const QByteArray& data ); | 365 | void receive( const QCString& cmsg, const QByteArray& data ); |
366 | void toggleBeamReceive( ); | 366 | void toggleBeamReceive( ); |
367 | void disableBR(bool); | 367 | void disableBR(bool); |
368 | void setJumpButtonBarVisible( bool visible ); | 368 | void setJumpButtonBarVisible( bool visible ); |
369 | void setJumpButtonBar( bool visible ); | 369 | void setJumpButtonBar( bool visible ); |
370 | void setCaptionBack(); | 370 | void setCaptionBack(); |
371 | void resizeAndCallContactdialog(); | ||
372 | void callContactdialog(); | ||
373 | |||
371 | void importFromOL(); | 374 | void importFromOL(); |
372 | void extensionModified( const KABC::Addressee::List &list ); | 375 | void extensionModified( const KABC::Addressee::List &list ); |
373 | void extensionChanged( int id ); | 376 | void extensionChanged( int id ); |
374 | void clipboardDataChanged(); | 377 | void clipboardDataChanged(); |
375 | void updateActionMenu(); | 378 | void updateActionMenu(); |
376 | void configureKeyBindings(); | 379 | void configureKeyBindings(); |
377 | void removeVoice(); | 380 | void removeVoice(); |
378 | void setFormattedName(); | 381 | void setFormattedName(); |
379 | #ifdef KAB_EMBEDDED | 382 | #ifdef KAB_EMBEDDED |
380 | void configureResources(); | 383 | void configureResources(); |
381 | #endif //KAB_EMBEDDED | 384 | #endif //KAB_EMBEDDED |
382 | 385 | ||
383 | void slotEditorDestroyed( const QString &uid ); | 386 | void slotEditorDestroyed( const QString &uid ); |
384 | void configurationChanged(); | 387 | void configurationChanged(); |
385 | void addressBookChanged(); | 388 | void addressBookChanged(); |
386 | 389 | ||
387 | private: | 390 | private: |
391 | QString mEmailSourceChannel; | ||
388 | void resizeEvent(QResizeEvent* e ); | 392 | void resizeEvent(QResizeEvent* e ); |
389 | bool mBRdisabled; | 393 | bool mBRdisabled; |
390 | #ifndef DESKTOP_VERSION | 394 | #ifndef DESKTOP_VERSION |
391 | QCopChannel* infrared; | 395 | QCopChannel* infrared; |
392 | #endif | 396 | #endif |
393 | QTimer *mMessageTimer; | 397 | QTimer *mMessageTimer; |
394 | void initGUI(); | 398 | void initGUI(); |
395 | void initActions(); | 399 | void initActions(); |
396 | QString getPhoneFile(); | 400 | QString getPhoneFile(); |
397 | 401 | ||
398 | AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, | 402 | AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, |
399 | const char *name = 0 ); | 403 | const char *name = 0 ); |
400 | 404 | ||
401 | KXMLGUIClient *mGUIClient; | 405 | KXMLGUIClient *mGUIClient; |
402 | 406 | ||
403 | KABC::AddressBook *mAddressBook; | 407 | KABC::AddressBook *mAddressBook; |
404 | 408 | ||
405 | ViewManager *mViewManager; | 409 | ViewManager *mViewManager; |
406 | // QSplitter *mDetailsSplitter; | 410 | // QSplitter *mDetailsSplitter; |
407 | KDGanttMinimizeSplitter *mExtensionBarSplitter; | 411 | KDGanttMinimizeSplitter *mExtensionBarSplitter; |
408 | ViewContainer *mDetails; | 412 | ViewContainer *mDetails; |
409 | KDGanttMinimizeSplitter* mMiniSplitter; | 413 | KDGanttMinimizeSplitter* mMiniSplitter; |
410 | XXPortManager *mXXPortManager; | 414 | XXPortManager *mXXPortManager; |
411 | JumpButtonBar *mJumpButtonBar; | 415 | JumpButtonBar *mJumpButtonBar; |
412 | IncSearchWidget *mIncSearchWidget; | 416 | IncSearchWidget *mIncSearchWidget; |
413 | ExtensionManager *mExtensionManager; | 417 | ExtensionManager *mExtensionManager; |
414 | 418 | ||
415 | KCMultiDialog *mConfigureDialog; | 419 | KCMultiDialog *mConfigureDialog; |
416 | 420 | ||
417 | #ifndef KAB_EMBEDDED | 421 | #ifndef KAB_EMBEDDED |
418 | LDAPSearchDialog *mLdapSearchDialog; | 422 | LDAPSearchDialog *mLdapSearchDialog; |
419 | #endif //KAB_EMBEDDED | 423 | #endif //KAB_EMBEDDED |
420 | // QDict<AddresseeEditorDialog> mEditorDict; | 424 | // QDict<AddresseeEditorDialog> mEditorDict; |
421 | AddresseeEditorDialog *mEditorDialog; | 425 | AddresseeEditorDialog *mEditorDialog; |
422 | bool mReadWrite; | 426 | bool mReadWrite; |
423 | bool mModified; | 427 | bool mModified; |
424 | bool mIsPart; | 428 | bool mIsPart; |
425 | bool mMultipleViewsAtOnce; | 429 | bool mMultipleViewsAtOnce; |
426 | 430 | ||
427 | 431 | ||
428 | //US file menu | 432 | //US file menu |
429 | KAction *mActionMail; | 433 | KAction *mActionMail; |
430 | KAction *mActionBeam; | 434 | KAction *mActionBeam; |
431 | KToggleAction *mActionBR; | 435 | KToggleAction *mActionBR; |
432 | KAction *mActionExport2phone; | 436 | KAction *mActionExport2phone; |
433 | KAction* mActionPrint; | 437 | KAction* mActionPrint; |
434 | KAction* mActionPrintDetails; | 438 | KAction* mActionPrintDetails; |
435 | KAction* mActionNewContact; | 439 | KAction* mActionNewContact; |
436 | KAction *mActionSave; | 440 | KAction *mActionSave; |
437 | KAction *mActionEditAddressee; | 441 | KAction *mActionEditAddressee; |
438 | KAction *mActionMailVCard; | 442 | KAction *mActionMailVCard; |
439 | KAction *mActionBeamVCard; | 443 | KAction *mActionBeamVCard; |
440 | 444 | ||
441 | KAction *mActionQuit; | 445 | KAction *mActionQuit; |
442 | 446 | ||
443 | //US edit menu | 447 | //US edit menu |
444 | KAction *mActionCopy; | 448 | KAction *mActionCopy; |
445 | KAction *mActionCut; | 449 | KAction *mActionCut; |
446 | KAction *mActionPaste; | 450 | KAction *mActionPaste; |
447 | KAction *mActionSelectAll; | 451 | KAction *mActionSelectAll; |
448 | KAction *mActionUndo; | 452 | KAction *mActionUndo; |
449 | KAction *mActionRedo; | 453 | KAction *mActionRedo; |
450 | KAction *mActionDelete; | 454 | KAction *mActionDelete; |
451 | 455 | ||
452 | //US settings menu | 456 | //US settings menu |
453 | KAction *mActionConfigResources; | 457 | KAction *mActionConfigResources; |
454 | KAction *mActionConfigKAddressbook; | 458 | KAction *mActionConfigKAddressbook; |
455 | KAction *mActionConfigShortcuts; | 459 | KAction *mActionConfigShortcuts; |
456 | KAction *mActionConfigureToolbars; | 460 | KAction *mActionConfigureToolbars; |
457 | KAction *mActionKeyBindings; | 461 | KAction *mActionKeyBindings; |
458 | KToggleAction *mActionJumpBar; | 462 | KToggleAction *mActionJumpBar; |
459 | KToggleAction *mActionDetails; | 463 | KToggleAction *mActionDetails; |
460 | KAction *mActionWhoAmI; | 464 | KAction *mActionWhoAmI; |
461 | KAction *mActionCategories; | 465 | KAction *mActionCategories; |
462 | KAction *mActionEditCategories; | 466 | KAction *mActionEditCategories; |
463 | KAction *mActionManageCategories; | 467 | KAction *mActionManageCategories; |
464 | KAction *mActionAboutKAddressbook; | 468 | KAction *mActionAboutKAddressbook; |
465 | KAction *mActionLicence; | 469 | KAction *mActionLicence; |
466 | KAction *mActionFaq; | 470 | KAction *mActionFaq; |
467 | KAction *mActionWN; | 471 | KAction *mActionWN; |
468 | KAction *mActionSyncHowto; | 472 | KAction *mActionSyncHowto; |
469 | KAction *mActionKdeSyncHowto; | 473 | KAction *mActionKdeSyncHowto; |
470 | KAction *mActionMultiSyncHowto; | 474 | KAction *mActionMultiSyncHowto; |
471 | 475 | ||
472 | KAction *mActionDeleteView; | 476 | KAction *mActionDeleteView; |
473 | 477 | ||
474 | QPopupMenu *viewMenu; | 478 | QPopupMenu *viewMenu; |
475 | QPopupMenu *filterMenu; | 479 | QPopupMenu *filterMenu; |
476 | QPopupMenu *settingsMenu; | 480 | QPopupMenu *settingsMenu; |
477 | QPopupMenu *changeMenu; | 481 | QPopupMenu *changeMenu; |
478 | QPopupMenu *beamMenu; | 482 | QPopupMenu *beamMenu; |
479 | //US QAction *mActionSave; | 483 | //US QAction *mActionSave; |
480 | QPopupMenu *ImportMenu; | 484 | QPopupMenu *ImportMenu; |
481 | QPopupMenu *ExportMenu; | 485 | QPopupMenu *ExportMenu; |
482 | //LR additional methods | 486 | //LR additional methods |
483 | KAction *mActionRemoveVoice; | 487 | KAction *mActionRemoveVoice; |
484 | KAction *mActionSetFormattedName; | 488 | KAction *mActionSetFormattedName; |
485 | KAction * mActionImportOL; | 489 | KAction * mActionImportOL; |
486 | 490 | ||
487 | #ifndef KAB_EMBEDDED | 491 | #ifndef KAB_EMBEDDED |
488 | KAddressBookService *mAddressBookService; | 492 | KAddressBookService *mAddressBookService; |
489 | #endif //KAB_EMBEDDED | 493 | #endif //KAB_EMBEDDED |
490 | 494 | ||
491 | class KABCorePrivate; | 495 | class KABCorePrivate; |
492 | KABCorePrivate *d; | 496 | KABCorePrivate *d; |
493 | //US bool mBlockSaveFlag; | 497 | //US bool mBlockSaveFlag; |
494 | 498 | ||
495 | #ifdef KAB_EMBEDDED | 499 | #ifdef KAB_EMBEDDED |
496 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient | 500 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient |
497 | #endif //KAB_EMBEDDED | 501 | #endif //KAB_EMBEDDED |
498 | 502 | ||
499 | //this are the overwritten callbackmethods from the syncinterface | 503 | //this are the overwritten callbackmethods from the syncinterface |
500 | virtual bool sync(KSyncManager* manager, QString filename, int mode); | 504 | virtual bool sync(KSyncManager* manager, QString filename, int mode); |
501 | virtual bool syncExternal(KSyncManager* manager, QString resource); | 505 | virtual bool syncExternal(KSyncManager* manager, QString resource); |
502 | virtual void removeSyncInfo( QString syncProfile); | 506 | virtual void removeSyncInfo( QString syncProfile); |
503 | bool syncPhone(); | 507 | bool syncPhone(); |
504 | void message( QString m , bool startTimer = true); | 508 | void message( QString m , bool startTimer = true); |
505 | 509 | ||
506 | // LR ******************************* | 510 | // LR ******************************* |
507 | // sync stuff! | 511 | // sync stuff! |
508 | QString sentSyncFile(); | 512 | QString sentSyncFile(); |
509 | QPopupMenu *syncMenu; | 513 | QPopupMenu *syncMenu; |
510 | KSyncManager* syncManager; | 514 | KSyncManager* syncManager; |
511 | int mGlobalSyncMode; | 515 | int mGlobalSyncMode; |
512 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); | 516 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); |
513 | KABC::Addressee getLastSyncAddressee(); | 517 | KABC::Addressee getLastSyncAddressee(); |
514 | QDateTime mLastAddressbookSync; | 518 | QDateTime mLastAddressbookSync; |
515 | int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); | 519 | int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); |
516 | // ********************* | 520 | // ********************* |
517 | 521 | ||
518 | }; | 522 | }; |
519 | 523 | ||
520 | #endif | 524 | #endif |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 8a4c7eb..6ddced0 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1,2354 +1,2363 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | 2 | ||
3 | #include <qaction.h> | 3 | #include <qaction.h> |
4 | #include <qpopupmenu.h> | 4 | #include <qpopupmenu.h> |
5 | #include <qpainter.h> | 5 | #include <qpainter.h> |
6 | #include <qwhatsthis.h> | 6 | #include <qwhatsthis.h> |
7 | #include <qpushbutton.h> | 7 | #include <qpushbutton.h> |
8 | #include <qmessagebox.h> | 8 | #include <qmessagebox.h> |
9 | #include <qlineedit.h> | 9 | #include <qlineedit.h> |
10 | #include <qtextcodec.h> | 10 | #include <qtextcodec.h> |
11 | #include <qfile.h> | 11 | #include <qfile.h> |
12 | #include <qdir.h> | 12 | #include <qdir.h> |
13 | #include <qapp.h> | 13 | #include <qapp.h> |
14 | #include <qfileinfo.h> | 14 | #include <qfileinfo.h> |
15 | #include <qlabel.h> | 15 | #include <qlabel.h> |
16 | #include <qspinbox.h> | 16 | #include <qspinbox.h> |
17 | #include <qcheckbox.h> | 17 | #include <qcheckbox.h> |
18 | #include <qmap.h> | 18 | #include <qmap.h> |
19 | #include <qwmatrix.h> | 19 | #include <qwmatrix.h> |
20 | #include <qtextbrowser.h> | 20 | #include <qtextbrowser.h> |
21 | #include <qtextstream.h> | 21 | #include <qtextstream.h> |
22 | #ifndef DESKTOP_VERSION | 22 | #ifndef DESKTOP_VERSION |
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | #include <qpe/qpemenubar.h> | 24 | #include <qpe/qpemenubar.h> |
25 | #include <qpe/qpetoolbar.h> | 25 | #include <qpe/qpetoolbar.h> |
26 | #include <qpe/resource.h> | 26 | #include <qpe/resource.h> |
27 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
28 | #include <qtopia/alarmserver.h> | 28 | #include <qtopia/alarmserver.h> |
29 | #include <qtopia/qcopenvelope_qws.h> | 29 | #include <qtopia/qcopenvelope_qws.h> |
30 | #include <unistd.h> // for sleep | 30 | #include <unistd.h> // for sleep |
31 | #else | 31 | #else |
32 | #include <qmenubar.h> | 32 | #include <qmenubar.h> |
33 | #include <qtoolbar.h> | 33 | #include <qtoolbar.h> |
34 | #include <qapplication.h> | 34 | #include <qapplication.h> |
35 | //#include <resource.h> | 35 | //#include <resource.h> |
36 | 36 | ||
37 | #endif | 37 | #endif |
38 | #include <libkcal/calendarlocal.h> | 38 | #include <libkcal/calendarlocal.h> |
39 | #include <libkcal/todo.h> | 39 | #include <libkcal/todo.h> |
40 | #include <libkcal/phoneformat.h> | 40 | #include <libkcal/phoneformat.h> |
41 | #include <libkdepim/ksyncprofile.h> | 41 | #include <libkdepim/ksyncprofile.h> |
42 | #include <libkdepim/phoneaccess.h> | 42 | #include <libkdepim/phoneaccess.h> |
43 | #include <libkcal/kincidenceformatter.h> | 43 | #include <libkcal/kincidenceformatter.h> |
44 | #include <libkdepim/kpimglobalprefs.h> | 44 | #include <libkdepim/kpimglobalprefs.h> |
45 | 45 | ||
46 | #include "calendarview.h" | 46 | #include "calendarview.h" |
47 | #include "koviewmanager.h" | 47 | #include "koviewmanager.h" |
48 | #include "datenavigator.h" | 48 | #include "datenavigator.h" |
49 | #include "koagendaview.h" | 49 | #include "koagendaview.h" |
50 | #include "koagenda.h" | 50 | #include "koagenda.h" |
51 | #include "kodialogmanager.h" | 51 | #include "kodialogmanager.h" |
52 | #include "kdialogbase.h" | 52 | #include "kdialogbase.h" |
53 | #include "kapplication.h" | 53 | #include "kapplication.h" |
54 | #include "kofilterview.h" | 54 | #include "kofilterview.h" |
55 | #include "kstandarddirs.h" | 55 | #include "kstandarddirs.h" |
56 | #include "koprefs.h" | 56 | #include "koprefs.h" |
57 | #include "kfiledialog.h" | 57 | #include "kfiledialog.h" |
58 | #include "koglobals.h" | 58 | #include "koglobals.h" |
59 | #include "kglobal.h" | 59 | #include "kglobal.h" |
60 | #include "ktoolbar.h" | 60 | #include "ktoolbar.h" |
61 | #include "klocale.h" | 61 | #include "klocale.h" |
62 | #include "kconfig.h" | 62 | #include "kconfig.h" |
63 | #include "simplealarmclient.h" | 63 | #include "simplealarmclient.h" |
64 | #include "externalapphandler.h" | 64 | #include "externalapphandler.h" |
65 | 65 | ||
66 | using namespace KCal; | 66 | using namespace KCal; |
67 | #ifndef _WIN32_ | 67 | #ifndef _WIN32_ |
68 | #include <unistd.h> | 68 | #include <unistd.h> |
69 | #else | 69 | #else |
70 | #ifdef _OL_IMPORT_ | 70 | #ifdef _OL_IMPORT_ |
71 | #include "koimportoldialog.h" | 71 | #include "koimportoldialog.h" |
72 | #endif | 72 | #endif |
73 | #endif | 73 | #endif |
74 | #include "mainwindow.h" | 74 | #include "mainwindow.h" |
75 | 75 | ||
76 | 76 | ||
77 | class KOex2phonePrefs : public QDialog | 77 | class KOex2phonePrefs : public QDialog |
78 | { | 78 | { |
79 | public: | 79 | public: |
80 | KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : | 80 | KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : |
81 | QDialog( parent, name, true ) | 81 | QDialog( parent, name, true ) |
82 | { | 82 | { |
83 | setCaption( i18n("Export to phone options") ); | 83 | setCaption( i18n("Export to phone options") ); |
84 | QVBoxLayout* lay = new QVBoxLayout( this ); | 84 | QVBoxLayout* lay = new QVBoxLayout( this ); |
85 | lay->setSpacing( 3 ); | 85 | lay->setSpacing( 3 ); |
86 | lay->setMargin( 3 ); | 86 | lay->setMargin( 3 ); |
87 | QLabel *lab; | 87 | QLabel *lab; |
88 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); | 88 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); |
89 | lab->setAlignment (AlignHCenter ); | 89 | lab->setAlignment (AlignHCenter ); |
90 | QHBox* temphb; | 90 | QHBox* temphb; |
91 | temphb = new QHBox( this ); | 91 | temphb = new QHBox( this ); |
92 | new QLabel( i18n("I/O device: "), temphb ); | 92 | new QLabel( i18n("I/O device: "), temphb ); |
93 | mPhoneDevice = new QLineEdit( temphb); | 93 | mPhoneDevice = new QLineEdit( temphb); |
94 | lay->addWidget( temphb ); | 94 | lay->addWidget( temphb ); |
95 | temphb = new QHBox( this ); | 95 | temphb = new QHBox( this ); |
96 | new QLabel( i18n("Connection: "), temphb ); | 96 | new QLabel( i18n("Connection: "), temphb ); |
97 | mPhoneConnection = new QLineEdit( temphb); | 97 | mPhoneConnection = new QLineEdit( temphb); |
98 | lay->addWidget( temphb ); | 98 | lay->addWidget( temphb ); |
99 | temphb = new QHBox( this ); | 99 | temphb = new QHBox( this ); |
100 | new QLabel( i18n("Model(opt.): "), temphb ); | 100 | new QLabel( i18n("Model(opt.): "), temphb ); |
101 | mPhoneModel = new QLineEdit( temphb); | 101 | mPhoneModel = new QLineEdit( temphb); |
102 | lay->addWidget( temphb ); | 102 | lay->addWidget( temphb ); |
103 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); | 103 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); |
104 | mWriteBackFuture->setChecked( true ); | 104 | mWriteBackFuture->setChecked( true ); |
105 | lay->addWidget( mWriteBackFuture ); | 105 | lay->addWidget( mWriteBackFuture ); |
106 | temphb = new QHBox( this ); | 106 | temphb = new QHBox( this ); |
107 | new QLabel( i18n("Max. weeks in future: ") , temphb ); | 107 | new QLabel( i18n("Max. weeks in future: ") , temphb ); |
108 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); | 108 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); |
109 | mWriteBackFutureWeeks->setValue( 8 ); | 109 | mWriteBackFutureWeeks->setValue( 8 ); |
110 | lay->addWidget( temphb ); | 110 | lay->addWidget( temphb ); |
111 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); | 111 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); |
112 | lab->setAlignment (AlignHCenter ); | 112 | lab->setAlignment (AlignHCenter ); |
113 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); | 113 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); |
114 | lay->addWidget( ok ); | 114 | lay->addWidget( ok ); |
115 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 115 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
116 | lay->addWidget( cancel ); | 116 | lay->addWidget( cancel ); |
117 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 117 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
118 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 118 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
119 | resize( 220, 240 ); | 119 | resize( 220, 240 ); |
120 | qApp->processEvents(); | 120 | qApp->processEvents(); |
121 | int dw = QApplication::desktop()->width(); | 121 | int dw = QApplication::desktop()->width(); |
122 | int dh = QApplication::desktop()->height(); | 122 | int dh = QApplication::desktop()->height(); |
123 | move( (dw-width())/2, (dh - height() )/2 ); | 123 | move( (dw-width())/2, (dh - height() )/2 ); |
124 | } | 124 | } |
125 | 125 | ||
126 | public: | 126 | public: |
127 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; | 127 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; |
128 | QCheckBox* mWriteBackFuture; | 128 | QCheckBox* mWriteBackFuture; |
129 | QSpinBox* mWriteBackFutureWeeks; | 129 | QSpinBox* mWriteBackFutureWeeks; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | int globalFlagBlockStartup; | 132 | int globalFlagBlockStartup; |
133 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | 133 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : |
134 | QMainWindow( parent, name ) | 134 | QMainWindow( parent, name ) |
135 | { | 135 | { |
136 | 136 | ||
137 | mClosed = false; | 137 | mClosed = false; |
138 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; | 138 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; |
139 | QString confFile = locateLocal("config","korganizerrc"); | 139 | QString confFile = locateLocal("config","korganizerrc"); |
140 | QFileInfo finf ( confFile ); | 140 | QFileInfo finf ( confFile ); |
141 | bool showWarning = !finf.exists(); | 141 | bool showWarning = !finf.exists(); |
142 | setIcon(SmallIcon( "ko24" ) ); | 142 | setIcon(SmallIcon( "ko24" ) ); |
143 | mBlockAtStartup = true; | 143 | mBlockAtStartup = true; |
144 | mFlagKeyPressed = false; | 144 | mFlagKeyPressed = false; |
145 | setCaption("KO/Pi"); | 145 | setCaption("KO/Pi"); |
146 | KOPrefs *p = KOPrefs::instance(); | 146 | KOPrefs *p = KOPrefs::instance(); |
147 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 147 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
148 | if ( p->mHourSize > 22 ) | 148 | if ( p->mHourSize > 22 ) |
149 | p->mHourSize = 22; | 149 | p->mHourSize = 22; |
150 | QMainWindow::ToolBarDock tbd; | 150 | QMainWindow::ToolBarDock tbd; |
151 | if ( p->mToolBarHor ) { | 151 | if ( p->mToolBarHor ) { |
152 | if ( p->mToolBarUp ) | 152 | if ( p->mToolBarUp ) |
153 | tbd = Bottom; | 153 | tbd = Bottom; |
154 | else | 154 | else |
155 | tbd = Top; | 155 | tbd = Top; |
156 | } | 156 | } |
157 | else { | 157 | else { |
158 | if ( p->mToolBarUp ) | 158 | if ( p->mToolBarUp ) |
159 | tbd = Right; | 159 | tbd = Right; |
160 | else | 160 | else |
161 | tbd = Left; | 161 | tbd = Left; |
162 | } | 162 | } |
163 | if ( KOPrefs::instance()->mUseAppColors ) | 163 | if ( KOPrefs::instance()->mUseAppColors ) |
164 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 164 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
165 | globalFlagBlockStartup = 1; | 165 | globalFlagBlockStartup = 1; |
166 | iconToolBar = new QPEToolBar( this ); | 166 | iconToolBar = new QPEToolBar( this ); |
167 | addToolBar (iconToolBar , tbd ); | 167 | addToolBar (iconToolBar , tbd ); |
168 | 168 | ||
169 | if ( KOPrefs::instance()->mShowIconFilter ) { | 169 | if ( KOPrefs::instance()->mShowIconFilter ) { |
170 | if ( p->mToolBarHorF ) { | 170 | if ( p->mToolBarHorF ) { |
171 | if ( p->mToolBarUpF ) | 171 | if ( p->mToolBarUpF ) |
172 | tbd = Bottom; | 172 | tbd = Bottom; |
173 | else | 173 | else |
174 | tbd = Top; | 174 | tbd = Top; |
175 | } | 175 | } |
176 | else { | 176 | else { |
177 | if ( p->mToolBarUpF ) | 177 | if ( p->mToolBarUpF ) |
178 | tbd = Right; | 178 | tbd = Right; |
179 | else | 179 | else |
180 | tbd = Left; | 180 | tbd = Left; |
181 | } | 181 | } |
182 | filterToolBar = new QPEToolBar ( this ); | 182 | filterToolBar = new QPEToolBar ( this ); |
183 | filterMenubar = new QPEMenuBar( filterToolBar ); | 183 | filterMenubar = new QPEMenuBar( filterToolBar ); |
184 | QFontMetrics fm ( filterMenubar->font() ); | 184 | QFontMetrics fm ( filterMenubar->font() ); |
185 | 185 | ||
186 | filterPopupMenu = new QPopupMenu( this ); | 186 | filterPopupMenu = new QPopupMenu( this ); |
187 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); | 187 | filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); |
188 | QString addTest = "Ax"; | 188 | QString addTest = "Ax"; |
189 | #ifdef DESKTOP_VERSION | 189 | #ifdef DESKTOP_VERSION |
190 | addTest = "AAAx"; | 190 | addTest = "AAAx"; |
191 | #endif | 191 | #endif |
192 | filterMenubar->setFixedWidth( fm.width( i18n("No Filter")+addTest ) ); | 192 | filterMenubar->setFixedWidth( fm.width( i18n("No Filter")+addTest ) ); |
193 | addToolBar (filterToolBar , tbd ); | 193 | addToolBar (filterToolBar , tbd ); |
194 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); | 194 | connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); |
195 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); | 195 | connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); |
196 | } else { | 196 | } else { |
197 | filterToolBar = 0; | 197 | filterToolBar = 0; |
198 | filterMenubar = 0; | 198 | filterMenubar = 0; |
199 | filterPopupMenu = 0; | 199 | filterPopupMenu = 0; |
200 | } | 200 | } |
201 | if ( p->mShowIconOnetoolbar ) { | 201 | if ( p->mShowIconOnetoolbar ) { |
202 | viewToolBar = iconToolBar ; | 202 | viewToolBar = iconToolBar ; |
203 | navigatorToolBar = iconToolBar ; | 203 | navigatorToolBar = iconToolBar ; |
204 | } else { | 204 | } else { |
205 | if ( p->mToolBarHorV ) { | 205 | if ( p->mToolBarHorV ) { |
206 | if ( p->mToolBarUpV ) | 206 | if ( p->mToolBarUpV ) |
207 | tbd = Bottom; | 207 | tbd = Bottom; |
208 | else | 208 | else |
209 | tbd = Top; | 209 | tbd = Top; |
210 | } | 210 | } |
211 | else { | 211 | else { |
212 | if ( p->mToolBarUpV ) | 212 | if ( p->mToolBarUpV ) |
213 | tbd = Right; | 213 | tbd = Right; |
214 | else | 214 | else |
215 | tbd = Left; | 215 | tbd = Left; |
216 | } | 216 | } |
217 | viewToolBar = new QPEToolBar( this ); | 217 | viewToolBar = new QPEToolBar( this ); |
218 | addToolBar (viewToolBar , tbd ); | 218 | addToolBar (viewToolBar , tbd ); |
219 | if ( p->mToolBarHorN ) { | 219 | if ( p->mToolBarHorN ) { |
220 | if ( p->mToolBarUpN ) | 220 | if ( p->mToolBarUpN ) |
221 | tbd = Bottom; | 221 | tbd = Bottom; |
222 | else | 222 | else |
223 | tbd = Top; | 223 | tbd = Top; |
224 | } | 224 | } |
225 | else { | 225 | else { |
226 | if ( p->mToolBarUpN ) | 226 | if ( p->mToolBarUpN ) |
227 | tbd = Right; | 227 | tbd = Right; |
228 | else | 228 | else |
229 | tbd = Left; | 229 | tbd = Left; |
230 | } | 230 | } |
231 | navigatorToolBar = new QPEToolBar( this ); | 231 | navigatorToolBar = new QPEToolBar( this ); |
232 | addToolBar (navigatorToolBar , tbd ); | 232 | addToolBar (navigatorToolBar , tbd ); |
233 | } | 233 | } |
234 | 234 | ||
235 | 235 | ||
236 | 236 | ||
237 | mCalendarModifiedFlag = false; | 237 | mCalendarModifiedFlag = false; |
238 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); | 238 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); |
239 | splash->setAlignment ( AlignCenter ); | 239 | splash->setAlignment ( AlignCenter ); |
240 | setCentralWidget( splash ); | 240 | setCentralWidget( splash ); |
241 | #ifndef DESKTOP_VERSION | 241 | #ifndef DESKTOP_VERSION |
242 | showMaximized(); | 242 | showMaximized(); |
243 | #endif | 243 | #endif |
244 | 244 | ||
245 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); | 245 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); |
246 | setDefaultPreferences(); | 246 | setDefaultPreferences(); |
247 | mCalendar = new CalendarLocal(); | 247 | mCalendar = new CalendarLocal(); |
248 | mView = new CalendarView( mCalendar, this,"mCalendar " ); | 248 | mView = new CalendarView( mCalendar, this,"mCalendar " ); |
249 | mView->hide(); | 249 | mView->hide(); |
250 | //mView->resize(splash->size() ); | 250 | //mView->resize(splash->size() ); |
251 | initActions(); | 251 | initActions(); |
252 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); | 252 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); |
253 | mSyncManager->setBlockSave(false); | 253 | mSyncManager->setBlockSave(false); |
254 | mView->setSyncManager(mSyncManager); | 254 | mView->setSyncManager(mSyncManager); |
255 | #ifndef DESKTOP_VERSION | 255 | #ifndef DESKTOP_VERSION |
256 | iconToolBar->show(); | 256 | iconToolBar->show(); |
257 | qApp->processEvents(); | 257 | qApp->processEvents(); |
258 | #endif | 258 | #endif |
259 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); | 259 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); |
260 | int vh = height() ; | 260 | int vh = height() ; |
261 | int vw = width(); | 261 | int vw = width(); |
262 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); | 262 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); |
263 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 263 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
264 | vh -= iconToolBar->height(); | 264 | vh -= iconToolBar->height(); |
265 | } else { | 265 | } else { |
266 | vw -= iconToolBar->height(); | 266 | vw -= iconToolBar->height(); |
267 | } | 267 | } |
268 | //mView->setMaximumSize( splash->size() ); | 268 | //mView->setMaximumSize( splash->size() ); |
269 | //mView->resize( splash->size() ); | 269 | //mView->resize( splash->size() ); |
270 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 270 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
271 | mView->readSettings(); | 271 | mView->readSettings(); |
272 | bool newFile = false; | 272 | bool newFile = false; |
273 | if( !QFile::exists( defaultFileName() ) ) { | 273 | if( !QFile::exists( defaultFileName() ) ) { |
274 | QFileInfo finfo ( defaultFileName() ); | 274 | QFileInfo finfo ( defaultFileName() ); |
275 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); | 275 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); |
276 | qDebug("oldfile %s ", oldFile.latin1()); | 276 | qDebug("oldfile %s ", oldFile.latin1()); |
277 | 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"; | 277 | 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"; |
278 | finfo.setFile( oldFile ); | 278 | finfo.setFile( oldFile ); |
279 | if (finfo.exists() ) { | 279 | if (finfo.exists() ) { |
280 | KMessageBox::information( this, message); | 280 | KMessageBox::information( this, message); |
281 | mView->openCalendar( oldFile ); | 281 | mView->openCalendar( oldFile ); |
282 | qApp->processEvents(); | 282 | qApp->processEvents(); |
283 | } else { | 283 | } else { |
284 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); | 284 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); |
285 | finfo.setFile( oldFile ); | 285 | finfo.setFile( oldFile ); |
286 | if (finfo.exists() ) { | 286 | if (finfo.exists() ) { |
287 | KMessageBox::information( this, message); | 287 | KMessageBox::information( this, message); |
288 | mView->openCalendar( oldFile ); | 288 | mView->openCalendar( oldFile ); |
289 | qApp->processEvents(); | 289 | qApp->processEvents(); |
290 | } | 290 | } |
291 | } | 291 | } |
292 | mView->saveCalendar( defaultFileName() ); | 292 | mView->saveCalendar( defaultFileName() ); |
293 | newFile = true; | 293 | newFile = true; |
294 | } | 294 | } |
295 | 295 | ||
296 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 296 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
297 | mView->openCalendar( defaultFileName() ); | 297 | mView->openCalendar( defaultFileName() ); |
298 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 298 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
299 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); | 299 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); |
300 | 300 | ||
301 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { | 301 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { |
302 | KOPrefs::instance()->setAllDefaults(); | 302 | KOPrefs::instance()->setAllDefaults(); |
303 | int count = mView->addCategories(); | 303 | int count = mView->addCategories(); |
304 | } | 304 | } |
305 | processIncidenceSelection( 0 ); | 305 | processIncidenceSelection( 0 ); |
306 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), | 306 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), |
307 | SLOT( processIncidenceSelection( Incidence * ) ) ); | 307 | SLOT( processIncidenceSelection( Incidence * ) ) ); |
308 | connect( mView, SIGNAL( modifiedChanged( bool ) ), | 308 | connect( mView, SIGNAL( modifiedChanged( bool ) ), |
309 | SLOT( slotModifiedChanged( bool ) ) ); | 309 | SLOT( slotModifiedChanged( bool ) ) ); |
310 | 310 | ||
311 | 311 | ||
312 | connect( mView, SIGNAL( tempDisableBR(bool) ), | 312 | connect( mView, SIGNAL( tempDisableBR(bool) ), |
313 | SLOT( disableBR(bool) ) ); | 313 | SLOT( disableBR(bool) ) ); |
314 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); | 314 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); |
315 | mView->setModified( false ); | 315 | mView->setModified( false ); |
316 | mBlockAtStartup = false; | 316 | mBlockAtStartup = false; |
317 | mView->setModified( false ); | 317 | mView->setModified( false ); |
318 | setCentralWidget( mView ); | 318 | setCentralWidget( mView ); |
319 | globalFlagBlockStartup = 0; | 319 | globalFlagBlockStartup = 0; |
320 | mView->show(); | 320 | mView->show(); |
321 | delete splash; | 321 | delete splash; |
322 | if ( newFile ) | 322 | if ( newFile ) |
323 | mView->updateConfig(); | 323 | mView->updateConfig(); |
324 | // qApp->processEvents(); | 324 | // qApp->processEvents(); |
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 | //fillSyncMenu(); | 326 | //fillSyncMenu(); |
327 | 327 | ||
328 | 328 | ||
329 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); | 329 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); |
330 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); | 330 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); |
331 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); | 331 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); |
332 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 332 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
333 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 333 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
334 | mSyncManager->setDefaultFileName( sentSyncFile()); | 334 | mSyncManager->setDefaultFileName( sentSyncFile()); |
335 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); | 335 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); |
336 | mSyncManager->fillSyncMenu(); | 336 | mSyncManager->fillSyncMenu(); |
337 | 337 | ||
338 | 338 | ||
339 | 339 | ||
340 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 340 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
341 | if ( showWarning ) { | 341 | if ( showWarning ) { |
342 | KMessageBox::information( this, | 342 | KMessageBox::information( this, |
343 | "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"); | 343 | "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"); |
344 | qApp->processEvents(); | 344 | qApp->processEvents(); |
345 | mView->dialogManager()->showSyncOptions(); | 345 | mView->dialogManager()->showSyncOptions(); |
346 | } | 346 | } |
347 | 347 | ||
348 | //US listen for result adressed from Ka/Pi | 348 | //US listen for result adressed from Ka/Pi |
349 | #ifndef DESKTOP_VERSION | 349 | #ifndef DESKTOP_VERSION |
350 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 350 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
351 | #endif | 351 | #endif |
352 | #ifndef DESKTOP_VERSION | 352 | #ifndef DESKTOP_VERSION |
353 | infrared = 0; | 353 | infrared = 0; |
354 | #endif | 354 | #endif |
355 | updateFilterToolbar(); | 355 | updateFilterToolbar(); |
356 | updateWeek( mView->startDate() ); | 356 | updateWeek( mView->startDate() ); |
357 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), | 357 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), |
358 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); | 358 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); |
359 | mBRdisabled = false; | 359 | mBRdisabled = false; |
360 | //toggleBeamReceive(); | 360 | //toggleBeamReceive(); |
361 | } | 361 | } |
362 | MainWindow::~MainWindow() | 362 | MainWindow::~MainWindow() |
363 | { | 363 | { |
364 | //qDebug("MainWindow::~MainWindow() "); | 364 | //qDebug("MainWindow::~MainWindow() "); |
365 | //save toolbar location | 365 | //save toolbar location |
366 | delete mCalendar; | 366 | delete mCalendar; |
367 | delete mSyncManager; | 367 | delete mSyncManager; |
368 | #ifndef DESKTOP_VERSION | 368 | #ifndef DESKTOP_VERSION |
369 | if ( infrared ) | 369 | if ( infrared ) |
370 | delete infrared; | 370 | delete infrared; |
371 | #endif | 371 | #endif |
372 | 372 | ||
373 | 373 | ||
374 | } | 374 | } |
375 | 375 | ||
376 | void MainWindow::disableBR(bool b) | 376 | void MainWindow::disableBR(bool b) |
377 | { | 377 | { |
378 | #ifndef DESKTOP_VERSION | 378 | #ifndef DESKTOP_VERSION |
379 | if ( b ) { | 379 | if ( b ) { |
380 | if ( infrared ) { | 380 | if ( infrared ) { |
381 | toggleBeamReceive(); | 381 | toggleBeamReceive(); |
382 | mBRdisabled = true; | 382 | mBRdisabled = true; |
383 | } | 383 | } |
384 | mBRdisabled = true; | 384 | mBRdisabled = true; |
385 | } else { | 385 | } else { |
386 | if ( mBRdisabled ) { | 386 | if ( mBRdisabled ) { |
387 | mBRdisabled = false; | 387 | mBRdisabled = false; |
388 | //makes no sense,because other cal ap is probably running | 388 | //makes no sense,because other cal ap is probably running |
389 | // toggleBeamReceive(); | 389 | // toggleBeamReceive(); |
390 | } | 390 | } |
391 | } | 391 | } |
392 | #endif | 392 | #endif |
393 | 393 | ||
394 | } | 394 | } |
395 | bool MainWindow::beamReceiveEnabled() | 395 | bool MainWindow::beamReceiveEnabled() |
396 | { | 396 | { |
397 | #ifndef DESKTOP_VERSION | 397 | #ifndef DESKTOP_VERSION |
398 | return ( infrared != 0 ); | 398 | return ( infrared != 0 ); |
399 | #endif | 399 | #endif |
400 | return false; | 400 | return false; |
401 | } | 401 | } |
402 | 402 | ||
403 | void MainWindow::toggleBeamReceive() | 403 | void MainWindow::toggleBeamReceive() |
404 | { | 404 | { |
405 | if ( mBRdisabled ) | 405 | if ( mBRdisabled ) |
406 | return; | 406 | return; |
407 | #ifndef DESKTOP_VERSION | 407 | #ifndef DESKTOP_VERSION |
408 | if ( infrared ) { | 408 | if ( infrared ) { |
409 | qDebug("disable BeamReceive "); | 409 | qDebug("disable BeamReceive "); |
410 | delete infrared; | 410 | delete infrared; |
411 | infrared = 0; | 411 | infrared = 0; |
412 | brAction->setOn(false); | 412 | brAction->setOn(false); |
413 | return; | 413 | return; |
414 | } | 414 | } |
415 | qDebug("enable BeamReceive "); | 415 | qDebug("enable BeamReceive "); |
416 | brAction->setOn(true); | 416 | brAction->setOn(true); |
417 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; | 417 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; |
418 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); | 418 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); |
419 | #endif | 419 | #endif |
420 | } | 420 | } |
421 | void MainWindow::showMaximized () | 421 | void MainWindow::showMaximized () |
422 | { | 422 | { |
423 | #ifndef DESKTOP_VERSION | 423 | #ifndef DESKTOP_VERSION |
424 | if ( ! globalFlagBlockStartup ) | 424 | if ( ! globalFlagBlockStartup ) |
425 | if ( mClosed ) | 425 | if ( mClosed ) |
426 | mView->goToday(); | 426 | mView->goToday(); |
427 | #endif | 427 | #endif |
428 | QWidget::showMaximized () ; | 428 | QWidget::showMaximized () ; |
429 | mClosed = false; | 429 | mClosed = false; |
430 | } | 430 | } |
431 | void MainWindow::closeEvent( QCloseEvent* ce ) | 431 | void MainWindow::closeEvent( QCloseEvent* ce ) |
432 | { | 432 | { |
433 | 433 | ||
434 | 434 | ||
435 | 435 | ||
436 | if ( ! KOPrefs::instance()->mAskForQuit ) { | 436 | if ( ! KOPrefs::instance()->mAskForQuit ) { |
437 | saveOnClose(); | 437 | saveOnClose(); |
438 | mClosed = true; | 438 | mClosed = true; |
439 | ce->accept(); | 439 | ce->accept(); |
440 | return; | 440 | return; |
441 | 441 | ||
442 | } | 442 | } |
443 | 443 | ||
444 | switch( QMessageBox::information( this, "KO/Pi", | 444 | switch( QMessageBox::information( this, "KO/Pi", |
445 | i18n("Do you really want\nto close KO/Pi?"), | 445 | i18n("Do you really want\nto close KO/Pi?"), |
446 | i18n("Close"), i18n("No"), | 446 | i18n("Close"), i18n("No"), |
447 | 0, 0 ) ) { | 447 | 0, 0 ) ) { |
448 | case 0: | 448 | case 0: |
449 | saveOnClose(); | 449 | saveOnClose(); |
450 | mClosed = true; | 450 | mClosed = true; |
451 | ce->accept(); | 451 | ce->accept(); |
452 | break; | 452 | break; |
453 | case 1: | 453 | case 1: |
454 | ce->ignore(); | 454 | ce->ignore(); |
455 | break; | 455 | break; |
456 | case 2: | 456 | case 2: |
457 | 457 | ||
458 | default: | 458 | default: |
459 | break; | 459 | break; |
460 | } | 460 | } |
461 | 461 | ||
462 | 462 | ||
463 | } | 463 | } |
464 | 464 | ||
465 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | 465 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) |
466 | { | 466 | { |
467 | QDataStream stream( data, IO_ReadOnly ); | 467 | QDataStream stream( data, IO_ReadOnly ); |
468 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); | 468 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); |
469 | //QString datamess; | 469 | //QString datamess; |
470 | //qDebug("message "); | 470 | //qDebug("message "); |
471 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); | 471 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); |
472 | 472 | ||
473 | if ( cmsg == "setDocument(QString)" ) { | 473 | if ( cmsg == "setDocument(QString)" ) { |
474 | QDataStream stream( data, IO_ReadOnly ); | 474 | QDataStream stream( data, IO_ReadOnly ); |
475 | QString fileName; | 475 | QString fileName; |
476 | stream >> fileName; | 476 | stream >> fileName; |
477 | //qDebug("filename %s ", fileName.latin1()); | 477 | //qDebug("filename %s ", fileName.latin1()); |
478 | showMaximized(); | 478 | showMaximized(); |
479 | raise(); | 479 | raise(); |
480 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; | 480 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; |
481 | mSyncManager->slotSyncMenu( 1002 ); | 481 | mSyncManager->slotSyncMenu( 1002 ); |
482 | return; | 482 | return; |
483 | } | 483 | } |
484 | 484 | ||
485 | if ( cmsg == "-writeFile" ) { | 485 | if ( cmsg == "-writeFile" ) { |
486 | // I made from the "-writeFile" an "-writeAlarm" | 486 | // I made from the "-writeFile" an "-writeAlarm" |
487 | mView->viewManager()->showWhatsNextView(); | 487 | mView->viewManager()->showWhatsNextView(); |
488 | mCalendar->checkAlarmForIncidence( 0, true); | 488 | mCalendar->checkAlarmForIncidence( 0, true); |
489 | showMaximized(); | 489 | showMaximized(); |
490 | raise(); | 490 | raise(); |
491 | return; | 491 | return; |
492 | 492 | ||
493 | } | 493 | } |
494 | if ( cmsg == "-writeFileSilent" ) { | 494 | if ( cmsg == "-writeFileSilent" ) { |
495 | // I made from the "-writeFile" an "-writeAlarm" | 495 | // I made from the "-writeFile" an "-writeAlarm" |
496 | // mView->viewManager()->showWhatsNextView(); | 496 | // mView->viewManager()->showWhatsNextView(); |
497 | mCalendar->checkAlarmForIncidence( 0, true); | 497 | mCalendar->checkAlarmForIncidence( 0, true); |
498 | //showMaximized(); | 498 | //showMaximized(); |
499 | //raise(); | 499 | //raise(); |
500 | hide(); | 500 | hide(); |
501 | return; | 501 | return; |
502 | } | 502 | } |
503 | if ( cmsg == "-newCountdown" ) { | 503 | if ( cmsg == "-newCountdown" ) { |
504 | qDebug("newCountdown "); | 504 | qDebug("newCountdown "); |
505 | 505 | ||
506 | } | 506 | } |
507 | QString msg ; | 507 | QString msg ; |
508 | QString allmsg = cmsg; | 508 | QString allmsg = cmsg; |
509 | while ( allmsg.length() > 0 ) { | 509 | while ( allmsg.length() > 0 ) { |
510 | int nextC = allmsg.find( "-", 1 ); | 510 | int nextC = allmsg.find( "-", 1 ); |
511 | if ( nextC == -1 ) { | 511 | if ( nextC == -1 ) { |
512 | msg = allmsg; | 512 | msg = allmsg; |
513 | allmsg = ""; | 513 | allmsg = ""; |
514 | } else{ | 514 | } else{ |
515 | msg = allmsg.left( nextC ); | 515 | msg = allmsg.left( nextC ); |
516 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); | 516 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); |
517 | } | 517 | } |
518 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); | 518 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); |
519 | if ( msg == "-newEvent" ) { | 519 | if ( msg == "-newEvent" ) { |
520 | mView->newEvent(); | 520 | mView->newEvent(); |
521 | } | 521 | } |
522 | if ( msg == "-newTodo" ) { | 522 | if ( msg == "-newTodo" ) { |
523 | mView->newTodo(); | 523 | mView->newTodo(); |
524 | 524 | ||
525 | } | 525 | } |
526 | if ( msg == "-showWN" ) { | 526 | if ( msg == "-showWN" ) { |
527 | mView->viewManager()->showWhatsNextView(); | 527 | mView->viewManager()->showWhatsNextView(); |
528 | } | 528 | } |
529 | if ( msg == "-showTodo" ) { | 529 | if ( msg == "-showTodo" ) { |
530 | mView->viewManager()->showTodoView(); | 530 | mView->viewManager()->showTodoView(); |
531 | } | 531 | } |
532 | if ( msg == "-showList" ) { | 532 | if ( msg == "-showList" ) { |
533 | mView->viewManager()->showListView(); | 533 | mView->viewManager()->showListView(); |
534 | } | 534 | } |
535 | else if ( msg == "-showDay" ) { | 535 | else if ( msg == "-showDay" ) { |
536 | mView->viewManager()->showDayView(); | 536 | mView->viewManager()->showDayView(); |
537 | } | 537 | } |
538 | else if ( msg == "-showWWeek" ) { | 538 | else if ( msg == "-showWWeek" ) { |
539 | mView->viewManager()->showWorkWeekView(); | 539 | mView->viewManager()->showWorkWeekView(); |
540 | } | 540 | } |
541 | else if ( msg == "-ringSync" ) { | 541 | else if ( msg == "-ringSync" ) { |
542 | mSyncManager->multiSync( false ); | 542 | mSyncManager->multiSync( false ); |
543 | } | 543 | } |
544 | else if ( msg == "-showWeek" ) { | 544 | else if ( msg == "-showWeek" ) { |
545 | mView->viewManager()->showWeekView(); | 545 | mView->viewManager()->showWeekView(); |
546 | } | 546 | } |
547 | else if ( msg == "-showTodo" ) { | 547 | else if ( msg == "-showTodo" ) { |
548 | mView->viewManager()->showTodoView(); | 548 | mView->viewManager()->showTodoView(); |
549 | } | 549 | } |
550 | else if ( msg == "-showJournal" ) { | 550 | else if ( msg == "-showJournal" ) { |
551 | mView->dateNavigator()->selectDates( 1 ); | 551 | mView->dateNavigator()->selectDates( 1 ); |
552 | mView->dateNavigator()->selectToday(); | 552 | mView->dateNavigator()->selectToday(); |
553 | mView->viewManager()->showJournalView(); | 553 | mView->viewManager()->showJournalView(); |
554 | } | 554 | } |
555 | else if ( msg == "-showKO" ) { | 555 | else if ( msg == "-showKO" ) { |
556 | mView->viewManager()->showNextXView(); | 556 | mView->viewManager()->showNextXView(); |
557 | } | 557 | } |
558 | else if ( msg == "-showWNext" ) { | 558 | else if ( msg == "-showWNext" ) { |
559 | mView->viewManager()->showWhatsNextView(); | 559 | mView->viewManager()->showWhatsNextView(); |
560 | } | 560 | } |
561 | else if ( msg == "nextView()" ) { | 561 | else if ( msg == "nextView()" ) { |
562 | mView->viewManager()->showNextView(); | 562 | mView->viewManager()->showNextView(); |
563 | } | 563 | } |
564 | else if ( msg == "-showNextXView" ) { | 564 | else if ( msg == "-showNextXView" ) { |
565 | mView->viewManager()->showNextXView(); | 565 | mView->viewManager()->showNextXView(); |
566 | } | 566 | } |
567 | 567 | ||
568 | 568 | ||
569 | } | 569 | } |
570 | 570 | ||
571 | showMaximized(); | 571 | showMaximized(); |
572 | raise(); | 572 | raise(); |
573 | } | 573 | } |
574 | 574 | ||
575 | QPixmap MainWindow::loadPixmap( QString name ) | 575 | QPixmap MainWindow::loadPixmap( QString name ) |
576 | { | 576 | { |
577 | return SmallIcon( name ); | 577 | return SmallIcon( name ); |
578 | 578 | ||
579 | } | 579 | } |
580 | void MainWindow::initActions() | 580 | void MainWindow::initActions() |
581 | { | 581 | { |
582 | //KOPrefs::instance()->mShowFullMenu | 582 | //KOPrefs::instance()->mShowFullMenu |
583 | iconToolBar->clear(); | 583 | iconToolBar->clear(); |
584 | KOPrefs *p = KOPrefs::instance(); | 584 | KOPrefs *p = KOPrefs::instance(); |
585 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); | 585 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); |
586 | 586 | ||
587 | QPopupMenu *viewMenu = new QPopupMenu( this ); | 587 | QPopupMenu *viewMenu = new QPopupMenu( this ); |
588 | QPopupMenu *actionMenu = new QPopupMenu( this ); | 588 | QPopupMenu *actionMenu = new QPopupMenu( this ); |
589 | QPopupMenu *importMenu = new QPopupMenu( this ); | 589 | QPopupMenu *importMenu = new QPopupMenu( this ); |
590 | QPopupMenu *importMenu_X = new QPopupMenu( this ); | 590 | QPopupMenu *importMenu_X = new QPopupMenu( this ); |
591 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); | 591 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); |
592 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); | 592 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); |
593 | selectFilterMenu = new QPopupMenu( this ); | 593 | selectFilterMenu = new QPopupMenu( this ); |
594 | selectFilterMenu->setCheckable( true ); | 594 | selectFilterMenu->setCheckable( true ); |
595 | syncMenu = new QPopupMenu( this ); | 595 | syncMenu = new QPopupMenu( this ); |
596 | configureAgendaMenu = new QPopupMenu( this ); | 596 | configureAgendaMenu = new QPopupMenu( this ); |
597 | configureToolBarMenu = new QPopupMenu( this ); | 597 | configureToolBarMenu = new QPopupMenu( this ); |
598 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 598 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
599 | QIconSet icon; | 599 | QIconSet icon; |
600 | int pixWid = 22, pixHei = 22; | 600 | int pixWid = 22, pixHei = 22; |
601 | QString pathString = ""; | 601 | QString pathString = ""; |
602 | if ( !p->mToolBarMiniIcons ) { | 602 | if ( !p->mToolBarMiniIcons ) { |
603 | if ( QApplication::desktop()->width() < 480 ) { | 603 | if ( QApplication::desktop()->width() < 480 ) { |
604 | pathString += "icons16/"; | 604 | pathString += "icons16/"; |
605 | pixWid = 18; pixHei = 16; | 605 | pixWid = 18; pixHei = 16; |
606 | } | 606 | } |
607 | } else { | 607 | } else { |
608 | pathString += "iconsmini/"; | 608 | pathString += "iconsmini/"; |
609 | pixWid = 18; pixHei = 16; | 609 | pixWid = 18; pixHei = 16; |
610 | } | 610 | } |
611 | if ( KOPrefs::instance()->mShowFullMenu ) { | 611 | if ( KOPrefs::instance()->mShowFullMenu ) { |
612 | QMenuBar *menuBar1; | 612 | QMenuBar *menuBar1; |
613 | menuBar1 = menuBar(); | 613 | menuBar1 = menuBar(); |
614 | menuBar1->insertItem( i18n("File"), importMenu ); | 614 | menuBar1->insertItem( i18n("File"), importMenu ); |
615 | menuBar1->insertItem( i18n("View"), viewMenu ); | 615 | menuBar1->insertItem( i18n("View"), viewMenu ); |
616 | menuBar1->insertItem( i18n("Actions"), actionMenu ); | 616 | menuBar1->insertItem( i18n("Actions"), actionMenu ); |
617 | #ifdef DESKTOP_VERSION | 617 | #ifdef DESKTOP_VERSION |
618 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); | 618 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); |
619 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 619 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
620 | #else | 620 | #else |
621 | menuBar1->insertItem( i18n("Sync"), syncMenu ); | 621 | menuBar1->insertItem( i18n("Sync"), syncMenu ); |
622 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); | 622 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); |
623 | #endif | 623 | #endif |
624 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 624 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
625 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); | 625 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); |
626 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 626 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
627 | } else { | 627 | } else { |
628 | QPEMenuBar *menuBar1; | 628 | QPEMenuBar *menuBar1; |
629 | menuBar1 = new QPEMenuBar( iconToolBar ); | 629 | menuBar1 = new QPEMenuBar( iconToolBar ); |
630 | QPopupMenu *menuBar = new QPopupMenu( this ); | 630 | QPopupMenu *menuBar = new QPopupMenu( this ); |
631 | icon = loadPixmap( pathString + "z_menu" ); | 631 | icon = loadPixmap( pathString + "z_menu" ); |
632 | menuBar1->insertItem( icon.pixmap(), menuBar); | 632 | menuBar1->insertItem( icon.pixmap(), menuBar); |
633 | //menuBar1->insertItem( i18n("ME"), menuBar); | 633 | //menuBar1->insertItem( i18n("ME"), menuBar); |
634 | menuBar->insertItem( i18n("File"), importMenu ); | 634 | menuBar->insertItem( i18n("File"), importMenu ); |
635 | menuBar->insertItem( i18n("View"), viewMenu ); | 635 | menuBar->insertItem( i18n("View"), viewMenu ); |
636 | menuBar->insertItem( i18n("Actions"), actionMenu ); | 636 | menuBar->insertItem( i18n("Actions"), actionMenu ); |
637 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); | 637 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); |
638 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 638 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
639 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 639 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
640 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 640 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
641 | menuBar->insertItem( i18n("Help"), helpMenu ); | 641 | menuBar->insertItem( i18n("Help"), helpMenu ); |
642 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 642 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
643 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 643 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
644 | } | 644 | } |
645 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 645 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
646 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); | 646 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); |
647 | mWeekBgColor = iconToolBar->backgroundColor(); | 647 | mWeekBgColor = iconToolBar->backgroundColor(); |
648 | mWeekPixmap.resize( pixWid , pixHei ); | 648 | mWeekPixmap.resize( pixWid , pixHei ); |
649 | mWeekPixmap.fill( mWeekBgColor ); | 649 | mWeekPixmap.fill( mWeekBgColor ); |
650 | icon = mWeekPixmap; | 650 | icon = mWeekPixmap; |
651 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); | 651 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); |
652 | if ( p-> mShowIconWeekNum ) | 652 | if ( p-> mShowIconWeekNum ) |
653 | mWeekAction->addTo( iconToolBar ); | 653 | mWeekAction->addTo( iconToolBar ); |
654 | mWeekFont = font(); | 654 | mWeekFont = font(); |
655 | 655 | ||
656 | int fontPoint = mWeekFont.pointSize(); | 656 | int fontPoint = mWeekFont.pointSize(); |
657 | QFontMetrics f( mWeekFont ); | 657 | QFontMetrics f( mWeekFont ); |
658 | int fontWid = f.width( "30" ); | 658 | int fontWid = f.width( "30" ); |
659 | while ( fontWid > pixWid ) { | 659 | while ( fontWid > pixWid ) { |
660 | --fontPoint; | 660 | --fontPoint; |
661 | mWeekFont.setPointSize( fontPoint ); | 661 | mWeekFont.setPointSize( fontPoint ); |
662 | QFontMetrics f( mWeekFont ); | 662 | QFontMetrics f( mWeekFont ); |
663 | fontWid = f.width( "30" ); | 663 | fontWid = f.width( "30" ); |
664 | //qDebug("dec-- "); | 664 | //qDebug("dec-- "); |
665 | } | 665 | } |
666 | 666 | ||
667 | connect( mWeekAction, SIGNAL( activated() ), | 667 | connect( mWeekAction, SIGNAL( activated() ), |
668 | this, SLOT( weekAction() ) ); | 668 | this, SLOT( weekAction() ) ); |
669 | 669 | ||
670 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); | 670 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); |
671 | 671 | ||
672 | //#endif | 672 | //#endif |
673 | // ****************** | 673 | // ****************** |
674 | QAction *action; | 674 | QAction *action; |
675 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 675 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
676 | configureToolBarMenu->setCheckable( true ); | 676 | configureToolBarMenu->setCheckable( true ); |
677 | 677 | ||
678 | 678 | ||
679 | configureAgendaMenu->setCheckable( true ); | 679 | configureAgendaMenu->setCheckable( true ); |
680 | int iii ; | 680 | int iii ; |
681 | for ( iii = 1;iii<= 10 ;++iii ){ | 681 | for ( iii = 1;iii<= 10 ;++iii ){ |
682 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); | 682 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); |
683 | } | 683 | } |
684 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 684 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
685 | 685 | ||
686 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), | 686 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), |
687 | this, SLOT( showConfigureAgenda( ) ) ); | 687 | this, SLOT( showConfigureAgenda( ) ) ); |
688 | 688 | ||
689 | icon = loadPixmap( pathString + "configure" ); | 689 | icon = loadPixmap( pathString + "configure" ); |
690 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); | 690 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); |
691 | action->addTo( actionMenu ); | 691 | action->addTo( actionMenu ); |
692 | connect( action, SIGNAL( activated() ), | 692 | connect( action, SIGNAL( activated() ), |
693 | mView, SLOT( edit_options() ) ); | 693 | mView, SLOT( edit_options() ) ); |
694 | actionMenu->insertSeparator(); | 694 | actionMenu->insertSeparator(); |
695 | 695 | ||
696 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | 696 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
697 | action->addTo( actionMenu ); | 697 | action->addTo( actionMenu ); |
698 | connect( action, SIGNAL( activated() ), | 698 | connect( action, SIGNAL( activated() ), |
699 | mView, SLOT( undo_delete() ) ); | 699 | mView, SLOT( undo_delete() ) ); |
700 | actionMenu->insertSeparator(); | 700 | actionMenu->insertSeparator(); |
701 | 701 | ||
702 | icon = loadPixmap( pathString + "newevent" ); | 702 | icon = loadPixmap( pathString + "newevent" ); |
703 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 703 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
704 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); | 704 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); |
705 | configureToolBarMenu->insertSeparator(); | 705 | configureToolBarMenu->insertSeparator(); |
706 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); | 706 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); |
707 | configureToolBarMenu->insertSeparator(); | 707 | configureToolBarMenu->insertSeparator(); |
708 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); | 708 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); |
709 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 709 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
710 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 710 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
711 | ne_action->addTo( actionMenu ); | 711 | ne_action->addTo( actionMenu ); |
712 | connect( ne_action, SIGNAL( activated() ), | 712 | connect( ne_action, SIGNAL( activated() ), |
713 | mView, SLOT( newEvent() ) ); | 713 | mView, SLOT( newEvent() ) ); |
714 | icon = loadPixmap( pathString + "newtodo" ); | 714 | icon = loadPixmap( pathString + "newtodo" ); |
715 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 715 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
716 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 716 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
717 | nt_action->addTo( actionMenu ); | 717 | nt_action->addTo( actionMenu ); |
718 | connect( nt_action, SIGNAL( activated() ), | 718 | connect( nt_action, SIGNAL( activated() ), |
719 | mView, SLOT( newTodo() ) ); | 719 | mView, SLOT( newTodo() ) ); |
720 | 720 | ||
721 | icon = loadPixmap( pathString + "today" ); | 721 | icon = loadPixmap( pathString + "today" ); |
722 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 722 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
723 | today_action->addTo( viewMenu ); | 723 | today_action->addTo( viewMenu ); |
724 | connect( today_action, SIGNAL( activated() ), | 724 | connect( today_action, SIGNAL( activated() ), |
725 | mView, SLOT( goToday() ) ); | 725 | mView, SLOT( goToday() ) ); |
726 | viewMenu->insertSeparator(); | 726 | viewMenu->insertSeparator(); |
727 | 727 | ||
728 | // *********************** | 728 | // *********************** |
729 | if ( KOPrefs::instance()->mVerticalScreen ) { | 729 | if ( KOPrefs::instance()->mVerticalScreen ) { |
730 | icon = SmallIcon( "1updownarrow" ); | 730 | icon = SmallIcon( "1updownarrow" ); |
731 | } else { | 731 | } else { |
732 | icon = SmallIcon("1leftrightarrow" ); | 732 | icon = SmallIcon("1leftrightarrow" ); |
733 | } | 733 | } |
734 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); | 734 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); |
735 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); | 735 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); |
736 | FSaction->addTo( viewMenu ); | 736 | FSaction->addTo( viewMenu ); |
737 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); | 737 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); |
738 | 738 | ||
739 | icon = loadPixmap( pathString + "navi" ); | 739 | icon = loadPixmap( pathString + "navi" ); |
740 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); | 740 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); |
741 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 741 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
742 | action->addTo( viewMenu ); | 742 | action->addTo( viewMenu ); |
743 | connect( action, SIGNAL( activated() ), | 743 | connect( action, SIGNAL( activated() ), |
744 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 744 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
745 | mToggleNav = action ; | 745 | mToggleNav = action ; |
746 | icon = loadPixmap( pathString + "filter" ); | 746 | icon = loadPixmap( pathString + "filter" ); |
747 | configureToolBarMenu->insertItem(icon, i18n("Toggle FilterView"), 26 ); | 747 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); |
748 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); | 748 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); |
749 | action->addTo( viewMenu ); | 749 | action->addTo( viewMenu ); |
750 | connect( action, SIGNAL( activated() ), | 750 | connect( action, SIGNAL( activated() ), |
751 | mView, SLOT( toggleFilter() ) ); | 751 | mView, SLOT( toggleFilter() ) ); |
752 | mToggleFilter = action; | 752 | mToggleFilter = action; |
753 | icon = loadPixmap( pathString + "allday" ); | 753 | icon = loadPixmap( pathString + "allday" ); |
754 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); | 754 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); |
755 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); | 755 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); |
756 | action->addTo( viewMenu ); | 756 | action->addTo( viewMenu ); |
757 | connect( action, SIGNAL( activated() ), | 757 | connect( action, SIGNAL( activated() ), |
758 | mView, SLOT( toggleAllDaySize() ) ); | 758 | mView, SLOT( toggleAllDaySize() ) ); |
759 | mToggleAllday = action; | 759 | mToggleAllday = action; |
760 | 760 | ||
761 | 761 | ||
762 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 762 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
763 | mToggleNav, SLOT( setEnabled ( bool ) ) ); | 763 | mToggleNav, SLOT( setEnabled ( bool ) ) ); |
764 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 764 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
765 | mToggleFilter, SLOT( setEnabled ( bool ) ) ); | 765 | mToggleFilter, SLOT( setEnabled ( bool ) ) ); |
766 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 766 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
767 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); | 767 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); |
768 | 768 | ||
769 | viewMenu->insertSeparator(); | 769 | viewMenu->insertSeparator(); |
770 | icon = loadPixmap( pathString + "picker" ); | 770 | icon = loadPixmap( pathString + "picker" ); |
771 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); | 771 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); |
772 | action->addTo( viewMenu ); | 772 | action->addTo( viewMenu ); |
773 | connect( action, SIGNAL( activated() ), | 773 | connect( action, SIGNAL( activated() ), |
774 | mView, SLOT( showDatePicker() ) ); | 774 | mView, SLOT( showDatePicker() ) ); |
775 | action->addTo( iconToolBar ); | 775 | action->addTo( iconToolBar ); |
776 | viewMenu->insertSeparator(); | 776 | viewMenu->insertSeparator(); |
777 | 777 | ||
778 | if ( p-> mShowIconToggleFull ) | 778 | if ( p-> mShowIconToggleFull ) |
779 | FSaction->addTo( iconToolBar ); | 779 | FSaction->addTo( iconToolBar ); |
780 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); | 780 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); |
781 | if ( p->mShowIconFilterview ) mToggleFilter->addTo( iconToolBar ); | 781 | if ( p->mShowIconFilterview ) { |
782 | icon = loadPixmap( pathString + "filter" ); | ||
783 | QPEMenuBar *menuBar111 = new QPEMenuBar( iconToolBar ); | ||
784 | menuBar111->insertItem( icon.pixmap(), selectFilterMenu); | ||
785 | int isi = 24; | ||
786 | if ( QApplication::desktop()->width() < 480 ) | ||
787 | isi = 18; | ||
788 | menuBar111->setFixedSize( QSize( isi, isi )) ; | ||
789 | } | ||
790 | //******************** | ||
782 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); | 791 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); |
783 | 792 | ||
784 | 793 | ||
785 | icon = loadPixmap( pathString + "whatsnext" ); | 794 | icon = loadPixmap( pathString + "whatsnext" ); |
786 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); | 795 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); |
787 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 796 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
788 | whatsnext_action->addTo( viewMenu ); | 797 | whatsnext_action->addTo( viewMenu ); |
789 | connect( whatsnext_action, SIGNAL( activated() ), | 798 | connect( whatsnext_action, SIGNAL( activated() ), |
790 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 799 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
791 | 800 | ||
792 | icon = loadPixmap( pathString + "xdays" ); | 801 | icon = loadPixmap( pathString + "xdays" ); |
793 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); | 802 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); |
794 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 803 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
795 | xdays_action->addTo( viewMenu ); | 804 | xdays_action->addTo( viewMenu ); |
796 | connect( xdays_action, SIGNAL( activated() ), | 805 | connect( xdays_action, SIGNAL( activated() ), |
797 | mView->viewManager(), SLOT( showNextXView() ) ); | 806 | mView->viewManager(), SLOT( showNextXView() ) ); |
798 | 807 | ||
799 | 808 | ||
800 | icon = loadPixmap( pathString + "journal" ); | 809 | icon = loadPixmap( pathString + "journal" ); |
801 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 810 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
802 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 811 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
803 | viewjournal_action->addTo( viewMenu ); | 812 | viewjournal_action->addTo( viewMenu ); |
804 | connect( viewjournal_action, SIGNAL( activated() ), | 813 | connect( viewjournal_action, SIGNAL( activated() ), |
805 | mView->viewManager(), SLOT( showJournalView() ) ); | 814 | mView->viewManager(), SLOT( showJournalView() ) ); |
806 | 815 | ||
807 | 816 | ||
808 | icon = loadPixmap( pathString + "day" ); | 817 | icon = loadPixmap( pathString + "day" ); |
809 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 818 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
810 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 819 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
811 | day1_action->addTo( viewMenu ); | 820 | day1_action->addTo( viewMenu ); |
812 | // action->addTo( toolBar ); | 821 | // action->addTo( toolBar ); |
813 | connect( day1_action, SIGNAL( activated() ), | 822 | connect( day1_action, SIGNAL( activated() ), |
814 | mView->viewManager(), SLOT( showDayView() ) ); | 823 | mView->viewManager(), SLOT( showDayView() ) ); |
815 | 824 | ||
816 | icon = loadPixmap( pathString + "workweek" ); | 825 | icon = loadPixmap( pathString + "workweek" ); |
817 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 826 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
818 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 827 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
819 | day5_action->addTo( viewMenu ); | 828 | day5_action->addTo( viewMenu ); |
820 | connect( day5_action, SIGNAL( activated() ), | 829 | connect( day5_action, SIGNAL( activated() ), |
821 | mView->viewManager(), SLOT( showWorkWeekView() ) ); | 830 | mView->viewManager(), SLOT( showWorkWeekView() ) ); |
822 | 831 | ||
823 | icon = loadPixmap( pathString + "week" ); | 832 | icon = loadPixmap( pathString + "week" ); |
824 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 833 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
825 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 834 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
826 | day7_action->addTo( viewMenu ); | 835 | day7_action->addTo( viewMenu ); |
827 | connect( day7_action, SIGNAL( activated() ), | 836 | connect( day7_action, SIGNAL( activated() ), |
828 | mView->viewManager(), SLOT( showWeekView() ) ); | 837 | mView->viewManager(), SLOT( showWeekView() ) ); |
829 | 838 | ||
830 | icon = loadPixmap( pathString + "workweek2" ); | 839 | icon = loadPixmap( pathString + "workweek2" ); |
831 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); | 840 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); |
832 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); | 841 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); |
833 | day6_action->addTo( viewMenu ); | 842 | day6_action->addTo( viewMenu ); |
834 | connect( day6_action, SIGNAL( activated() ), | 843 | connect( day6_action, SIGNAL( activated() ), |
835 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); | 844 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); |
836 | 845 | ||
837 | icon = loadPixmap( pathString + "month" ); | 846 | icon = loadPixmap( pathString + "month" ); |
838 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 847 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
839 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 848 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
840 | month_action->addTo( viewMenu ); | 849 | month_action->addTo( viewMenu ); |
841 | connect( month_action, SIGNAL( activated() ), | 850 | connect( month_action, SIGNAL( activated() ), |
842 | mView->viewManager(), SLOT( showMonthView() ) ); | 851 | mView->viewManager(), SLOT( showMonthView() ) ); |
843 | 852 | ||
844 | icon = loadPixmap( pathString + "list" ); | 853 | icon = loadPixmap( pathString + "list" ); |
845 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | 854 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); |
846 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | 855 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); |
847 | showlist_action->addTo( viewMenu ); | 856 | showlist_action->addTo( viewMenu ); |
848 | connect( showlist_action, SIGNAL( activated() ), | 857 | connect( showlist_action, SIGNAL( activated() ), |
849 | mView->viewManager(), SLOT( showListView() ) ); | 858 | mView->viewManager(), SLOT( showListView() ) ); |
850 | 859 | ||
851 | icon = loadPixmap( pathString + "todo" ); | 860 | icon = loadPixmap( pathString + "todo" ); |
852 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 861 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
853 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 862 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
854 | todoview_action->addTo( viewMenu ); | 863 | todoview_action->addTo( viewMenu ); |
855 | connect( todoview_action, SIGNAL( activated() ), | 864 | connect( todoview_action, SIGNAL( activated() ), |
856 | mView->viewManager(), SLOT( showTodoView() ) ); | 865 | mView->viewManager(), SLOT( showTodoView() ) ); |
857 | 866 | ||
858 | 867 | ||
859 | 868 | ||
860 | #if 0 | 869 | #if 0 |
861 | action = new QAction( "view_timespan", "Time Span", 0, this ); | 870 | action = new QAction( "view_timespan", "Time Span", 0, this ); |
862 | action->addTo( viewMenu ); | 871 | action->addTo( viewMenu ); |
863 | connect( action, SIGNAL( activated() ), | 872 | connect( action, SIGNAL( activated() ), |
864 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 873 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
865 | #endif | 874 | #endif |
866 | 875 | ||
867 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 876 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, |
868 | this ); | 877 | this ); |
869 | mNewSubTodoAction->addTo( actionMenu ); | 878 | mNewSubTodoAction->addTo( actionMenu ); |
870 | connect( mNewSubTodoAction, SIGNAL( activated() ), | 879 | connect( mNewSubTodoAction, SIGNAL( activated() ), |
871 | mView, SLOT( newSubTodo() ) ); | 880 | mView, SLOT( newSubTodo() ) ); |
872 | 881 | ||
873 | actionMenu->insertSeparator(); | 882 | actionMenu->insertSeparator(); |
874 | 883 | ||
875 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); | 884 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); |
876 | mShowAction->addTo( actionMenu ); | 885 | mShowAction->addTo( actionMenu ); |
877 | connect( mShowAction, SIGNAL( activated() ), | 886 | connect( mShowAction, SIGNAL( activated() ), |
878 | mView, SLOT( showIncidence() ) ); | 887 | mView, SLOT( showIncidence() ) ); |
879 | 888 | ||
880 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); | 889 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); |
881 | mEditAction->addTo( actionMenu ); | 890 | mEditAction->addTo( actionMenu ); |
882 | connect( mEditAction, SIGNAL( activated() ), | 891 | connect( mEditAction, SIGNAL( activated() ), |
883 | mView, SLOT( editIncidence() ) ); | 892 | mView, SLOT( editIncidence() ) ); |
884 | 893 | ||
885 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); | 894 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); |
886 | mDeleteAction->addTo( actionMenu ); | 895 | mDeleteAction->addTo( actionMenu ); |
887 | connect( mDeleteAction, SIGNAL( activated() ), | 896 | connect( mDeleteAction, SIGNAL( activated() ), |
888 | mView, SLOT( deleteIncidence() ) ); | 897 | mView, SLOT( deleteIncidence() ) ); |
889 | 898 | ||
890 | 899 | ||
891 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); | 900 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); |
892 | mCloneAction->addTo( actionMenu ); | 901 | mCloneAction->addTo( actionMenu ); |
893 | connect( mCloneAction, SIGNAL( activated() ), | 902 | connect( mCloneAction, SIGNAL( activated() ), |
894 | mView, SLOT( cloneIncidence() ) ); | 903 | mView, SLOT( cloneIncidence() ) ); |
895 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); | 904 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); |
896 | mMoveAction->addTo( actionMenu ); | 905 | mMoveAction->addTo( actionMenu ); |
897 | connect( mMoveAction, SIGNAL( activated() ), | 906 | connect( mMoveAction, SIGNAL( activated() ), |
898 | mView, SLOT( moveIncidence() ) ); | 907 | mView, SLOT( moveIncidence() ) ); |
899 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); | 908 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); |
900 | mBeamAction->addTo( actionMenu ); | 909 | mBeamAction->addTo( actionMenu ); |
901 | connect( mBeamAction, SIGNAL( activated() ), | 910 | connect( mBeamAction, SIGNAL( activated() ), |
902 | mView, SLOT( beamIncidence() ) ); | 911 | mView, SLOT( beamIncidence() ) ); |
903 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); | 912 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); |
904 | mCancelAction->addTo( actionMenu ); | 913 | mCancelAction->addTo( actionMenu ); |
905 | connect( mCancelAction, SIGNAL( activated() ), | 914 | connect( mCancelAction, SIGNAL( activated() ), |
906 | mView, SLOT( toggleCancelIncidence() ) ); | 915 | mView, SLOT( toggleCancelIncidence() ) ); |
907 | 916 | ||
908 | actionMenu->insertSeparator(); | 917 | actionMenu->insertSeparator(); |
909 | 918 | ||
910 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, | 919 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, |
911 | this ); | 920 | this ); |
912 | action->addTo( actionMenu ); | 921 | action->addTo( actionMenu ); |
913 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); | 922 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); |
914 | 923 | ||
915 | icon = loadPixmap( pathString + "search" ); | 924 | icon = loadPixmap( pathString + "search" ); |
916 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 925 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); |
917 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); | 926 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); |
918 | search_action->addTo( actionMenu ); | 927 | search_action->addTo( actionMenu ); |
919 | connect( search_action, SIGNAL( activated() ), | 928 | connect( search_action, SIGNAL( activated() ), |
920 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 929 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
921 | 930 | ||
922 | 931 | ||
923 | 932 | ||
924 | if ( KOPrefs::instance()->mShowFullMenu ) { | 933 | if ( KOPrefs::instance()->mShowFullMenu ) { |
925 | actionMenu->insertSeparator(); | 934 | actionMenu->insertSeparator(); |
926 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); | 935 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); |
927 | 936 | ||
928 | } | 937 | } |
929 | // actionMenu->insertSeparator(); | 938 | // actionMenu->insertSeparator(); |
930 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, | 939 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, |
931 | this ); | 940 | this ); |
932 | action->addTo( importMenu_X ); | 941 | action->addTo( importMenu_X ); |
933 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); | 942 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); |
934 | action = new QAction( "import_quick", i18n("Import last file"), 0, | 943 | action = new QAction( "import_quick", i18n("Import last file"), 0, |
935 | this ); | 944 | this ); |
936 | action->addTo( importMenu_X ); | 945 | action->addTo( importMenu_X ); |
937 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); | 946 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); |
938 | importMenu_X->insertSeparator(); | 947 | importMenu_X->insertSeparator(); |
939 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, | 948 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, |
940 | this ); | 949 | this ); |
941 | action->addTo( importMenu_X ); | 950 | action->addTo( importMenu_X ); |
942 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); | 951 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); |
943 | //#ifndef DESKTOP_VERSION | 952 | //#ifndef DESKTOP_VERSION |
944 | importMenu_X->insertSeparator(); | 953 | importMenu_X->insertSeparator(); |
945 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, | 954 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, |
946 | this ); | 955 | this ); |
947 | action->addTo( importMenu_X ); | 956 | action->addTo( importMenu_X ); |
948 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); | 957 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); |
949 | //#else | 958 | //#else |
950 | #ifdef _OL_IMPORT_ | 959 | #ifdef _OL_IMPORT_ |
951 | importMenu_X->insertSeparator(); | 960 | importMenu_X->insertSeparator(); |
952 | action = new QAction( "import_ol", i18n("Import from OL"), 0, | 961 | action = new QAction( "import_ol", i18n("Import from OL"), 0, |
953 | this ); | 962 | this ); |
954 | action->addTo( importMenu_X ); | 963 | action->addTo( importMenu_X ); |
955 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); | 964 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); |
956 | #endif | 965 | #endif |
957 | //#endif | 966 | //#endif |
958 | 967 | ||
959 | //importMenu->insertSeparator(); | 968 | //importMenu->insertSeparator(); |
960 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, | 969 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, |
961 | this ); | 970 | this ); |
962 | action->addTo( importMenu ); | 971 | action->addTo( importMenu ); |
963 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); | 972 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); |
964 | 973 | ||
965 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, | 974 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, |
966 | this ); | 975 | this ); |
967 | action->addTo( importMenu ); | 976 | action->addTo( importMenu ); |
968 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 977 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
969 | importMenu->insertSeparator(); | 978 | importMenu->insertSeparator(); |
970 | importMenu->insertItem( i18n("Import"), importMenu_X ); | 979 | importMenu->insertItem( i18n("Import"), importMenu_X ); |
971 | //importMenu->insertSeparator(); | 980 | //importMenu->insertSeparator(); |
972 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 981 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, |
973 | this ); | 982 | this ); |
974 | action->addTo( exportMenu_X ); | 983 | action->addTo( exportMenu_X ); |
975 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 984 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
976 | 985 | ||
977 | 986 | ||
978 | //LR | 987 | //LR |
979 | QPopupMenu *ex2phone = new QPopupMenu( this ); | 988 | QPopupMenu *ex2phone = new QPopupMenu( this ); |
980 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 989 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
981 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 990 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
982 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); | 991 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); |
983 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); | 992 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); |
984 | 993 | ||
985 | importMenu->insertItem( i18n("Export"), exportMenu_X ); | 994 | importMenu->insertItem( i18n("Export"), exportMenu_X ); |
986 | #ifndef DESKTOP_VERSION | 995 | #ifndef DESKTOP_VERSION |
987 | //importMenu->insertSeparator(); | 996 | //importMenu->insertSeparator(); |
988 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, | 997 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, |
989 | this ); | 998 | this ); |
990 | brAction->addTo( beamMenu_X ); | 999 | brAction->addTo( beamMenu_X ); |
991 | brAction->setToggleAction (true ) ; | 1000 | brAction->setToggleAction (true ) ; |
992 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 1001 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
993 | 1002 | ||
994 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 1003 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
995 | this ); | 1004 | this ); |
996 | action->addTo( beamMenu_X ); | 1005 | action->addTo( beamMenu_X ); |
997 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 1006 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
998 | 1007 | ||
999 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 1008 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
1000 | this ); | 1009 | this ); |
1001 | action->addTo( beamMenu_X ); | 1010 | action->addTo( beamMenu_X ); |
1002 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 1011 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
1003 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); | 1012 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); |
1004 | #else | 1013 | #else |
1005 | //importMenu->insertSeparator(); | 1014 | //importMenu->insertSeparator(); |
1006 | icon = loadPixmap( pathString + "print" ); | 1015 | icon = loadPixmap( pathString + "print" ); |
1007 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 1016 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
1008 | action->addTo( beamMenu_X ); | 1017 | action->addTo( beamMenu_X ); |
1009 | connect( action, SIGNAL( activated() ), | 1018 | connect( action, SIGNAL( activated() ), |
1010 | this, SLOT( printCal() ) ); | 1019 | this, SLOT( printCal() ) ); |
1011 | 1020 | ||
1012 | icon = loadPixmap( pathString + "print" ); | 1021 | icon = loadPixmap( pathString + "print" ); |
1013 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 1022 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
1014 | action->addTo( beamMenu_X ); | 1023 | action->addTo( beamMenu_X ); |
1015 | connect( action, SIGNAL( activated() ), | 1024 | connect( action, SIGNAL( activated() ), |
1016 | this, SLOT( printSel() ) ); | 1025 | this, SLOT( printSel() ) ); |
1017 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); | 1026 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); |
1018 | action->addTo( beamMenu_X ); | 1027 | action->addTo( beamMenu_X ); |
1019 | connect( action, SIGNAL( activated() ), | 1028 | connect( action, SIGNAL( activated() ), |
1020 | mView->viewManager(), SLOT( slotprintWNV() ) ); | 1029 | mView->viewManager(), SLOT( slotprintWNV() ) ); |
1021 | 1030 | ||
1022 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); | 1031 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); |
1023 | action->addTo( beamMenu_X ); | 1032 | action->addTo( beamMenu_X ); |
1024 | connect( action, SIGNAL( activated() ), | 1033 | connect( action, SIGNAL( activated() ), |
1025 | mView, SLOT( slotprintSelInc() ) ); | 1034 | mView, SLOT( slotprintSelInc() ) ); |
1026 | 1035 | ||
1027 | 1036 | ||
1028 | importMenu->insertItem( i18n("Print"), beamMenu_X ); | 1037 | importMenu->insertItem( i18n("Print"), beamMenu_X ); |
1029 | #endif | 1038 | #endif |
1030 | importMenu->insertSeparator(); | 1039 | importMenu->insertSeparator(); |
1031 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 1040 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
1032 | this ); | 1041 | this ); |
1033 | action->addTo( importMenu ); | 1042 | action->addTo( importMenu ); |
1034 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 1043 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
1035 | importMenu->insertSeparator(); | 1044 | importMenu->insertSeparator(); |
1036 | action = new QAction( "beam all", i18n("Save"), 0, | 1045 | action = new QAction( "beam all", i18n("Save"), 0, |
1037 | this ); | 1046 | this ); |
1038 | action->addTo( importMenu ); | 1047 | action->addTo( importMenu ); |
1039 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 1048 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
1040 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 1049 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
1041 | this ); | 1050 | this ); |
1042 | action->addTo( importMenu ); | 1051 | action->addTo( importMenu ); |
1043 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 1052 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
1044 | 1053 | ||
1045 | //menuBar->insertItem( "Configure",configureMenu ); | 1054 | //menuBar->insertItem( "Configure",configureMenu ); |
1046 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 1055 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
1047 | icon = loadPixmap( "korganizer/korganizer" ); | 1056 | icon = loadPixmap( "korganizer/korganizer" ); |
1048 | 1057 | ||
1049 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 1058 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
1050 | action->addTo( helpMenu ); | 1059 | action->addTo( helpMenu ); |
1051 | connect( action, SIGNAL( activated() ), | 1060 | connect( action, SIGNAL( activated() ), |
1052 | SLOT( whatsNew() ) ); | 1061 | SLOT( whatsNew() ) ); |
1053 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 1062 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
1054 | action->addTo( helpMenu ); | 1063 | action->addTo( helpMenu ); |
1055 | connect( action, SIGNAL( activated() ), | 1064 | connect( action, SIGNAL( activated() ), |
1056 | SLOT( features() ) ); | 1065 | SLOT( features() ) ); |
1057 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 1066 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
1058 | action->addTo( helpMenu ); | 1067 | action->addTo( helpMenu ); |
1059 | connect( action, SIGNAL( activated() ), | 1068 | connect( action, SIGNAL( activated() ), |
1060 | SLOT( keyBindings() ) ); | 1069 | SLOT( keyBindings() ) ); |
1061 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 1070 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
1062 | action->addTo( helpMenu ); | 1071 | action->addTo( helpMenu ); |
1063 | connect( action, SIGNAL( activated() ), | 1072 | connect( action, SIGNAL( activated() ), |
1064 | SLOT( synchowto() ) ); | 1073 | SLOT( synchowto() ) ); |
1065 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); | 1074 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); |
1066 | action->addTo( helpMenu ); | 1075 | action->addTo( helpMenu ); |
1067 | connect( action, SIGNAL( activated() ), | 1076 | connect( action, SIGNAL( activated() ), |
1068 | SLOT( kdesynchowto() ) ); | 1077 | SLOT( kdesynchowto() ) ); |
1069 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); | 1078 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); |
1070 | action->addTo( helpMenu ); | 1079 | action->addTo( helpMenu ); |
1071 | connect( action, SIGNAL( activated() ), | 1080 | connect( action, SIGNAL( activated() ), |
1072 | SLOT( multisynchowto() ) ); | 1081 | SLOT( multisynchowto() ) ); |
1073 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 1082 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
1074 | action->addTo( helpMenu ); | 1083 | action->addTo( helpMenu ); |
1075 | connect( action, SIGNAL( activated() ), | 1084 | connect( action, SIGNAL( activated() ), |
1076 | SLOT( aboutAutoSaving() ) ); | 1085 | SLOT( aboutAutoSaving() ) ); |
1077 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 1086 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
1078 | action->addTo( helpMenu ); | 1087 | action->addTo( helpMenu ); |
1079 | connect( action, SIGNAL( activated() ), | 1088 | connect( action, SIGNAL( activated() ), |
1080 | SLOT( aboutKnownBugs() ) ); | 1089 | SLOT( aboutKnownBugs() ) ); |
1081 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 1090 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
1082 | action->addTo( helpMenu ); | 1091 | action->addTo( helpMenu ); |
1083 | connect( action, SIGNAL( activated() ), | 1092 | connect( action, SIGNAL( activated() ), |
1084 | SLOT( usertrans() ) ); | 1093 | SLOT( usertrans() ) ); |
1085 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 1094 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
1086 | action->addTo( helpMenu ); | 1095 | action->addTo( helpMenu ); |
1087 | connect( action, SIGNAL( activated() ), | 1096 | connect( action, SIGNAL( activated() ), |
1088 | SLOT( faq() ) ); | 1097 | SLOT( faq() ) ); |
1089 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | 1098 | action = new QAction( "licence", i18n("Licence..."), 0, this ); |
1090 | action->addTo( helpMenu ); | 1099 | action->addTo( helpMenu ); |
1091 | connect( action, SIGNAL( activated() ), | 1100 | connect( action, SIGNAL( activated() ), |
1092 | SLOT( licence() ) ); | 1101 | SLOT( licence() ) ); |
1093 | action = new QAction( "about", i18n("About..."), 0, this ); | 1102 | action = new QAction( "about", i18n("About..."), 0, this ); |
1094 | action->addTo( helpMenu ); | 1103 | action->addTo( helpMenu ); |
1095 | connect( action, SIGNAL( activated() ), | 1104 | connect( action, SIGNAL( activated() ), |
1096 | SLOT( about() ) ); | 1105 | SLOT( about() ) ); |
1097 | //menuBar->insertSeparator(); | 1106 | //menuBar->insertSeparator(); |
1098 | 1107 | ||
1099 | // ****************************************************** | 1108 | // ****************************************************** |
1100 | // menubar icons | 1109 | // menubar icons |
1101 | 1110 | ||
1102 | 1111 | ||
1103 | 1112 | ||
1104 | //menuBar->insertItem( iconToolBar ); | 1113 | //menuBar->insertItem( iconToolBar ); |
1105 | //xdays_action | 1114 | //xdays_action |
1106 | if (p-> mShowIconNewEvent) | 1115 | if (p-> mShowIconNewEvent) |
1107 | ne_action->addTo( iconToolBar ); | 1116 | ne_action->addTo( iconToolBar ); |
1108 | if (p->mShowIconNewTodo ) | 1117 | if (p->mShowIconNewTodo ) |
1109 | nt_action->addTo( iconToolBar ); | 1118 | nt_action->addTo( iconToolBar ); |
1110 | if (p-> mShowIconSearch) | 1119 | if (p-> mShowIconSearch) |
1111 | search_action->addTo( iconToolBar ); | 1120 | search_action->addTo( iconToolBar ); |
1112 | if (p-> mShowIconWhatsThis) | 1121 | if (p-> mShowIconWhatsThis) |
1113 | QWhatsThis::whatsThisButton ( iconToolBar ); | 1122 | QWhatsThis::whatsThisButton ( iconToolBar ); |
1114 | if (p-> mShowIconNext) | 1123 | if (p-> mShowIconNext) |
1115 | whatsnext_action->addTo( viewToolBar ); | 1124 | whatsnext_action->addTo( viewToolBar ); |
1116 | if (p-> mShowIconNextDays) | 1125 | if (p-> mShowIconNextDays) |
1117 | xdays_action->addTo( viewToolBar ); | 1126 | xdays_action->addTo( viewToolBar ); |
1118 | if (p-> mShowIconJournal) | 1127 | if (p-> mShowIconJournal) |
1119 | viewjournal_action->addTo( viewToolBar ); | 1128 | viewjournal_action->addTo( viewToolBar ); |
1120 | if (p-> mShowIconDay1) | 1129 | if (p-> mShowIconDay1) |
1121 | day1_action->addTo( viewToolBar ); | 1130 | day1_action->addTo( viewToolBar ); |
1122 | if (p-> mShowIconDay5) | 1131 | if (p-> mShowIconDay5) |
1123 | day5_action->addTo( viewToolBar ); | 1132 | day5_action->addTo( viewToolBar ); |
1124 | if (p-> mShowIconDay7) | 1133 | if (p-> mShowIconDay7) |
1125 | day7_action->addTo( viewToolBar ); | 1134 | day7_action->addTo( viewToolBar ); |
1126 | if (p-> mShowIconDay6) | 1135 | if (p-> mShowIconDay6) |
1127 | day6_action->addTo( viewToolBar ); | 1136 | day6_action->addTo( viewToolBar ); |
1128 | if (p-> mShowIconMonth) | 1137 | if (p-> mShowIconMonth) |
1129 | month_action->addTo( viewToolBar ); | 1138 | month_action->addTo( viewToolBar ); |
1130 | if (p-> mShowIconList) | 1139 | if (p-> mShowIconList) |
1131 | showlist_action->addTo( viewToolBar ); | 1140 | showlist_action->addTo( viewToolBar ); |
1132 | if (p-> mShowIconTodoview) | 1141 | if (p-> mShowIconTodoview) |
1133 | todoview_action->addTo( viewToolBar ); | 1142 | todoview_action->addTo( viewToolBar ); |
1134 | 1143 | ||
1135 | icon = loadPixmap( pathString + "2leftarrowB" ); | 1144 | icon = loadPixmap( pathString + "2leftarrowB" ); |
1136 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); | 1145 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); |
1137 | if (p-> mShowIconBackFast) { | 1146 | if (p-> mShowIconBackFast) { |
1138 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 1147 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
1139 | connect( action, SIGNAL( activated() ), | 1148 | connect( action, SIGNAL( activated() ), |
1140 | mView, SLOT( goPreviousMonth() ) ); | 1149 | mView, SLOT( goPreviousMonth() ) ); |
1141 | action->addTo( navigatorToolBar ); | 1150 | action->addTo( navigatorToolBar ); |
1142 | } | 1151 | } |
1143 | icon = loadPixmap( pathString + "1leftarrowB" ); | 1152 | icon = loadPixmap( pathString + "1leftarrowB" ); |
1144 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); | 1153 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); |
1145 | if (p-> mShowIconBack) { | 1154 | if (p-> mShowIconBack) { |
1146 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 1155 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
1147 | connect( action, SIGNAL( activated() ), | 1156 | connect( action, SIGNAL( activated() ), |
1148 | mView, SLOT( goPrevious() ) ); | 1157 | mView, SLOT( goPrevious() ) ); |
1149 | action->addTo( navigatorToolBar ); | 1158 | action->addTo( navigatorToolBar ); |
1150 | } | 1159 | } |
1151 | icon = loadPixmap( pathString + "today" ); | 1160 | icon = loadPixmap( pathString + "today" ); |
1152 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 1161 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
1153 | if (p-> mShowIconToday) | 1162 | if (p-> mShowIconToday) |
1154 | today_action->addTo( navigatorToolBar ); | 1163 | today_action->addTo( navigatorToolBar ); |
1155 | icon = loadPixmap( pathString + "1rightarrowB" ); | 1164 | icon = loadPixmap( pathString + "1rightarrowB" ); |
1156 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 1165 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
1157 | if (p-> mShowIconForward) { | 1166 | if (p-> mShowIconForward) { |
1158 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 1167 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
1159 | connect( action, SIGNAL( activated() ), | 1168 | connect( action, SIGNAL( activated() ), |
1160 | mView, SLOT( goNext() ) ); | 1169 | mView, SLOT( goNext() ) ); |
1161 | action->addTo( navigatorToolBar ); | 1170 | action->addTo( navigatorToolBar ); |
1162 | } | 1171 | } |
1163 | icon = loadPixmap( pathString + "2rightarrowB" ); | 1172 | icon = loadPixmap( pathString + "2rightarrowB" ); |
1164 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 1173 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
1165 | if (p-> mShowIconForwardFast) { | 1174 | if (p-> mShowIconForwardFast) { |
1166 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); | 1175 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); |
1167 | connect( action, SIGNAL( activated() ), | 1176 | connect( action, SIGNAL( activated() ), |
1168 | mView, SLOT( goNextMonth() ) ); | 1177 | mView, SLOT( goNextMonth() ) ); |
1169 | action->addTo( navigatorToolBar ); | 1178 | action->addTo( navigatorToolBar ); |
1170 | } | 1179 | } |
1171 | 1180 | ||
1172 | 1181 | ||
1173 | configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); | 1182 | configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); |
1174 | 1183 | ||
1175 | 1184 | ||
1176 | if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); | 1185 | if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); |
1177 | if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); | 1186 | if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); |
1178 | if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); | 1187 | if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); |
1179 | if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); | 1188 | if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); |
1180 | 1189 | ||
1181 | if (p-> mShowIconNewEvent) | 1190 | if (p-> mShowIconNewEvent) |
1182 | configureToolBarMenu->setItemChecked( 10, true ); | 1191 | configureToolBarMenu->setItemChecked( 10, true ); |
1183 | if (p->mShowIconNewTodo ) | 1192 | if (p->mShowIconNewTodo ) |
1184 | configureToolBarMenu->setItemChecked( 20, true ); | 1193 | configureToolBarMenu->setItemChecked( 20, true ); |
1185 | if (p-> mShowIconSearch) | 1194 | if (p-> mShowIconSearch) |
1186 | configureToolBarMenu->setItemChecked( 120, true ); | 1195 | configureToolBarMenu->setItemChecked( 120, true ); |
1187 | if (p-> mShowIconList) | 1196 | if (p-> mShowIconList) |
1188 | configureToolBarMenu->setItemChecked( 30, true ); | 1197 | configureToolBarMenu->setItemChecked( 30, true ); |
1189 | if (p-> mShowIconDay1) | 1198 | if (p-> mShowIconDay1) |
1190 | configureToolBarMenu->setItemChecked( 40, true ); | 1199 | configureToolBarMenu->setItemChecked( 40, true ); |
1191 | if (p-> mShowIconDay5) | 1200 | if (p-> mShowIconDay5) |
1192 | configureToolBarMenu->setItemChecked( 50, true ); | 1201 | configureToolBarMenu->setItemChecked( 50, true ); |
1193 | if (p-> mShowIconDay6) | 1202 | if (p-> mShowIconDay6) |
1194 | configureToolBarMenu->setItemChecked( 75, true ); | 1203 | configureToolBarMenu->setItemChecked( 75, true ); |
1195 | if (p-> mShowIconDay7) | 1204 | if (p-> mShowIconDay7) |
1196 | configureToolBarMenu->setItemChecked( 60, true ); | 1205 | configureToolBarMenu->setItemChecked( 60, true ); |
1197 | if (p-> mShowIconMonth) | 1206 | if (p-> mShowIconMonth) |
1198 | configureToolBarMenu->setItemChecked( 70, true ); | 1207 | configureToolBarMenu->setItemChecked( 70, true ); |
1199 | if (p-> mShowIconTodoview) | 1208 | if (p-> mShowIconTodoview) |
1200 | configureToolBarMenu->setItemChecked( 80, true ); | 1209 | configureToolBarMenu->setItemChecked( 80, true ); |
1201 | if (p-> mShowIconBackFast) | 1210 | if (p-> mShowIconBackFast) |
1202 | configureToolBarMenu->setItemChecked( 200, true ); | 1211 | configureToolBarMenu->setItemChecked( 200, true ); |
1203 | if (p-> mShowIconBack) | 1212 | if (p-> mShowIconBack) |
1204 | configureToolBarMenu->setItemChecked( 210, true ); | 1213 | configureToolBarMenu->setItemChecked( 210, true ); |
1205 | if (p-> mShowIconToday) | 1214 | if (p-> mShowIconToday) |
1206 | configureToolBarMenu->setItemChecked( 130, true ); | 1215 | configureToolBarMenu->setItemChecked( 130, true ); |
1207 | if (p-> mShowIconForward) | 1216 | if (p-> mShowIconForward) |
1208 | configureToolBarMenu->setItemChecked( 220, true ); | 1217 | configureToolBarMenu->setItemChecked( 220, true ); |
1209 | if (p-> mShowIconForwardFast) | 1218 | if (p-> mShowIconForwardFast) |
1210 | configureToolBarMenu->setItemChecked( 230, true ); | 1219 | configureToolBarMenu->setItemChecked( 230, true ); |
1211 | if (p-> mShowIconNextDays) | 1220 | if (p-> mShowIconNextDays) |
1212 | configureToolBarMenu->setItemChecked( 100, true ); | 1221 | configureToolBarMenu->setItemChecked( 100, true ); |
1213 | if (p-> mShowIconNext) | 1222 | if (p-> mShowIconNext) |
1214 | configureToolBarMenu->setItemChecked( 110, true ); | 1223 | configureToolBarMenu->setItemChecked( 110, true ); |
1215 | if (p-> mShowIconJournal) | 1224 | if (p-> mShowIconJournal) |
1216 | configureToolBarMenu->setItemChecked( 90, true ); | 1225 | configureToolBarMenu->setItemChecked( 90, true ); |
1217 | if (p-> mShowIconWhatsThis) | 1226 | if (p-> mShowIconWhatsThis) |
1218 | configureToolBarMenu->setItemChecked( 300, true ); | 1227 | configureToolBarMenu->setItemChecked( 300, true ); |
1219 | if (p-> mShowIconWeekNum) | 1228 | if (p-> mShowIconWeekNum) |
1220 | configureToolBarMenu->setItemChecked( 400, true ); | 1229 | configureToolBarMenu->setItemChecked( 400, true ); |
1221 | if (!p-> mShowIconStretch) { | 1230 | if (!p-> mShowIconStretch) { |
1222 | QLabel* dummy = new QLabel( iconToolBar ); | 1231 | QLabel* dummy = new QLabel( iconToolBar ); |
1223 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 1232 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
1224 | dummy->setMinimumWidth( 0 ); | 1233 | dummy->setMinimumWidth( 0 ); |
1225 | iconToolBar->setStretchableWidget ( dummy ) ; | 1234 | iconToolBar->setStretchableWidget ( dummy ) ; |
1226 | } | 1235 | } |
1227 | else { | 1236 | else { |
1228 | iconToolBar->setHorizontalStretchable (true ); | 1237 | iconToolBar->setHorizontalStretchable (true ); |
1229 | viewToolBar->setHorizontalStretchable (true ); | 1238 | viewToolBar->setHorizontalStretchable (true ); |
1230 | navigatorToolBar->setHorizontalStretchable (true ); | 1239 | navigatorToolBar->setHorizontalStretchable (true ); |
1231 | iconToolBar->setVerticalStretchable (true ); | 1240 | iconToolBar->setVerticalStretchable (true ); |
1232 | viewToolBar->setVerticalStretchable (true ); | 1241 | viewToolBar->setVerticalStretchable (true ); |
1233 | navigatorToolBar->setVerticalStretchable (true ); | 1242 | navigatorToolBar->setVerticalStretchable (true ); |
1234 | configureToolBarMenu->setItemChecked( 5, true ); | 1243 | configureToolBarMenu->setItemChecked( 5, true ); |
1235 | } | 1244 | } |
1236 | if (p-> mShowIconFilter) | 1245 | if (p-> mShowIconFilter) |
1237 | configureToolBarMenu->setItemChecked( 7, true ); | 1246 | configureToolBarMenu->setItemChecked( 7, true ); |
1238 | if (p-> mShowIconOnetoolbar) | 1247 | if (p-> mShowIconOnetoolbar) |
1239 | configureToolBarMenu->setItemChecked( 6, true ); | 1248 | configureToolBarMenu->setItemChecked( 6, true ); |
1240 | 1249 | ||
1241 | 1250 | ||
1242 | if ( filterMenubar ) | 1251 | if ( filterMenubar ) |
1243 | connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) ); | 1252 | connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) ); |
1244 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 1253 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
1245 | configureAgenda( p->mHourSize ); | 1254 | configureAgenda( p->mHourSize ); |
1246 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 1255 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
1247 | } | 1256 | } |
1248 | 1257 | ||
1249 | void MainWindow::exportToPhone( int mode ) | 1258 | void MainWindow::exportToPhone( int mode ) |
1250 | { | 1259 | { |
1251 | 1260 | ||
1252 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1261 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1253 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1262 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1254 | KOex2phonePrefs ex2phone; | 1263 | KOex2phonePrefs ex2phone; |
1255 | 1264 | ||
1256 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 1265 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |
1257 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); | 1266 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); |
1258 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1267 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1259 | if ( mode == 1 ) | 1268 | if ( mode == 1 ) |
1260 | ex2phone.setCaption(i18n("Export complete calendar")); | 1269 | ex2phone.setCaption(i18n("Export complete calendar")); |
1261 | if ( mode == 2 ) | 1270 | if ( mode == 2 ) |
1262 | ex2phone.setCaption(i18n("Export filtered calendar")); | 1271 | ex2phone.setCaption(i18n("Export filtered calendar")); |
1263 | 1272 | ||
1264 | if ( !ex2phone.exec() ) { | 1273 | if ( !ex2phone.exec() ) { |
1265 | return; | 1274 | return; |
1266 | } | 1275 | } |
1267 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); | 1276 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); |
1268 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); | 1277 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); |
1269 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); | 1278 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); |
1270 | 1279 | ||
1271 | int inFuture = 0; | 1280 | int inFuture = 0; |
1272 | if ( ex2phone.mWriteBackFuture->isChecked() ) | 1281 | if ( ex2phone.mWriteBackFuture->isChecked() ) |
1273 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); | 1282 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); |
1274 | QPtrList<Incidence> delSel; | 1283 | QPtrList<Incidence> delSel; |
1275 | if ( mode == 1 ) | 1284 | if ( mode == 1 ) |
1276 | delSel = mCalendar->rawIncidences(); | 1285 | delSel = mCalendar->rawIncidences(); |
1277 | if ( mode == 2 ) | 1286 | if ( mode == 2 ) |
1278 | delSel = mCalendar->incidences(); | 1287 | delSel = mCalendar->incidences(); |
1279 | CalendarLocal* cal = new CalendarLocal(); | 1288 | CalendarLocal* cal = new CalendarLocal(); |
1280 | cal->setLocalTime(); | 1289 | cal->setLocalTime(); |
1281 | Incidence *incidence = delSel.first(); | 1290 | Incidence *incidence = delSel.first(); |
1282 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); | 1291 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); |
1283 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); | 1292 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); |
1284 | while ( incidence ) { | 1293 | while ( incidence ) { |
1285 | if ( incidence->type() != "Journal" ) { | 1294 | if ( incidence->type() != "Journal" ) { |
1286 | bool add = true; | 1295 | bool add = true; |
1287 | if ( inFuture ) { | 1296 | if ( inFuture ) { |
1288 | QDateTime dt; | 1297 | QDateTime dt; |
1289 | if ( incidence->type() == "Todo" ) { | 1298 | if ( incidence->type() == "Todo" ) { |
1290 | Todo * t = (Todo*)incidence; | 1299 | Todo * t = (Todo*)incidence; |
1291 | if ( t->hasDueDate() ) | 1300 | if ( t->hasDueDate() ) |
1292 | dt = t->dtDue(); | 1301 | dt = t->dtDue(); |
1293 | else | 1302 | else |
1294 | dt = cur.addSecs( 62 ); | 1303 | dt = cur.addSecs( 62 ); |
1295 | } | 1304 | } |
1296 | else { | 1305 | else { |
1297 | bool ok; | 1306 | bool ok; |
1298 | dt = incidence->getNextOccurence( cur, &ok ); | 1307 | dt = incidence->getNextOccurence( cur, &ok ); |
1299 | if ( !ok ) | 1308 | if ( !ok ) |
1300 | dt = cur.addSecs( -62 ); | 1309 | dt = cur.addSecs( -62 ); |
1301 | } | 1310 | } |
1302 | if ( dt < cur || dt > end ) { | 1311 | if ( dt < cur || dt > end ) { |
1303 | add = false; | 1312 | add = false; |
1304 | } | 1313 | } |
1305 | } | 1314 | } |
1306 | if ( add ) { | 1315 | if ( add ) { |
1307 | Incidence *in = incidence->clone(); | 1316 | Incidence *in = incidence->clone(); |
1308 | cal->addIncidence( in ); | 1317 | cal->addIncidence( in ); |
1309 | } | 1318 | } |
1310 | } | 1319 | } |
1311 | incidence = delSel.next(); | 1320 | incidence = delSel.next(); |
1312 | } | 1321 | } |
1313 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 1322 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
1314 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 1323 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
1315 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1324 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1316 | 1325 | ||
1317 | setCaption( i18n("Writing to phone...")); | 1326 | setCaption( i18n("Writing to phone...")); |
1318 | if ( PhoneFormat::writeToPhone( cal ) ) | 1327 | if ( PhoneFormat::writeToPhone( cal ) ) |
1319 | setCaption( i18n("Export to phone successful!")); | 1328 | setCaption( i18n("Export to phone successful!")); |
1320 | else | 1329 | else |
1321 | setCaption( i18n("Error exporting to phone!")); | 1330 | setCaption( i18n("Error exporting to phone!")); |
1322 | delete cal; | 1331 | delete cal; |
1323 | } | 1332 | } |
1324 | 1333 | ||
1325 | 1334 | ||
1326 | void MainWindow::setDefaultPreferences() | 1335 | void MainWindow::setDefaultPreferences() |
1327 | { | 1336 | { |
1328 | KOPrefs *p = KOPrefs::instance(); | 1337 | KOPrefs *p = KOPrefs::instance(); |
1329 | 1338 | ||
1330 | p->mCompactDialogs = true; | 1339 | p->mCompactDialogs = true; |
1331 | p->mConfirm = true; | 1340 | p->mConfirm = true; |
1332 | // p->mEnableQuickTodo = false; | 1341 | // p->mEnableQuickTodo = false; |
1333 | 1342 | ||
1334 | } | 1343 | } |
1335 | 1344 | ||
1336 | QString MainWindow::resourcePath() | 1345 | QString MainWindow::resourcePath() |
1337 | { | 1346 | { |
1338 | return KGlobal::iconLoader()->iconPath(); | 1347 | return KGlobal::iconLoader()->iconPath(); |
1339 | } | 1348 | } |
1340 | 1349 | ||
1341 | void MainWindow::displayText( QString text ,QString cap ) | 1350 | void MainWindow::displayText( QString text ,QString cap ) |
1342 | { | 1351 | { |
1343 | QDialog dia( this, "name", true ); ; | 1352 | QDialog dia( this, "name", true ); ; |
1344 | dia.setCaption( cap ); | 1353 | dia.setCaption( cap ); |
1345 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 1354 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
1346 | lay->setSpacing( 3 ); | 1355 | lay->setSpacing( 3 ); |
1347 | lay->setMargin( 3 ); | 1356 | lay->setMargin( 3 ); |
1348 | QTextBrowser tb ( &dia ); | 1357 | QTextBrowser tb ( &dia ); |
1349 | lay->addWidget( &tb ); | 1358 | lay->addWidget( &tb ); |
1350 | tb.setText( text ); | 1359 | tb.setText( text ); |
1351 | #ifdef DESKTOP_VERSION | 1360 | #ifdef DESKTOP_VERSION |
1352 | dia.resize( 640, 480); | 1361 | dia.resize( 640, 480); |
1353 | #else | 1362 | #else |
1354 | dia.showMaximized(); | 1363 | dia.showMaximized(); |
1355 | #endif | 1364 | #endif |
1356 | dia.exec(); | 1365 | dia.exec(); |
1357 | } | 1366 | } |
1358 | 1367 | ||
1359 | void MainWindow::features() | 1368 | void MainWindow::features() |
1360 | { | 1369 | { |
1361 | 1370 | ||
1362 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); | 1371 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); |
1363 | } | 1372 | } |
1364 | 1373 | ||
1365 | void MainWindow::usertrans() | 1374 | void MainWindow::usertrans() |
1366 | { | 1375 | { |
1367 | 1376 | ||
1368 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); | 1377 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); |
1369 | } | 1378 | } |
1370 | 1379 | ||
1371 | void MainWindow::kdesynchowto() | 1380 | void MainWindow::kdesynchowto() |
1372 | { | 1381 | { |
1373 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 1382 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
1374 | } | 1383 | } |
1375 | void MainWindow::multisynchowto() | 1384 | void MainWindow::multisynchowto() |
1376 | { | 1385 | { |
1377 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 1386 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
1378 | } | 1387 | } |
1379 | void MainWindow::synchowto() | 1388 | void MainWindow::synchowto() |
1380 | { | 1389 | { |
1381 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 1390 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
1382 | } | 1391 | } |
1383 | void MainWindow::faq() | 1392 | void MainWindow::faq() |
1384 | { | 1393 | { |
1385 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); | 1394 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); |
1386 | 1395 | ||
1387 | } | 1396 | } |
1388 | void MainWindow::whatsNew() | 1397 | void MainWindow::whatsNew() |
1389 | { | 1398 | { |
1390 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 1399 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
1391 | 1400 | ||
1392 | } | 1401 | } |
1393 | void MainWindow::licence() | 1402 | void MainWindow::licence() |
1394 | { | 1403 | { |
1395 | KApplication::showLicence(); | 1404 | KApplication::showLicence(); |
1396 | 1405 | ||
1397 | } | 1406 | } |
1398 | void MainWindow::about() | 1407 | void MainWindow::about() |
1399 | { | 1408 | { |
1400 | QString version; | 1409 | QString version; |
1401 | #include <../version> | 1410 | #include <../version> |
1402 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), | 1411 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), |
1403 | i18n("KOrganizer/Platform-independent\n") + | 1412 | i18n("KOrganizer/Platform-independent\n") + |
1404 | "(KO/Pi) " + version + " - " + | 1413 | "(KO/Pi) " + version + " - " + |
1405 | 1414 | ||
1406 | #ifdef DESKTOP_VERSION | 1415 | #ifdef DESKTOP_VERSION |
1407 | i18n("Desktop Edition\n") + | 1416 | i18n("Desktop Edition\n") + |
1408 | #else | 1417 | #else |
1409 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + | 1418 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + |
1410 | #endif | 1419 | #endif |
1411 | 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!") ); | 1420 | 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!") ); |
1412 | } | 1421 | } |
1413 | void MainWindow::keyBindings() | 1422 | void MainWindow::keyBindings() |
1414 | { | 1423 | { |
1415 | QString cap = i18n("KO/Pi Keys + Colors"); | 1424 | QString cap = i18n("KO/Pi Keys + Colors"); |
1416 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1425 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1417 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1426 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1418 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1427 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1419 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1428 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1420 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1429 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ |
1421 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1430 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1422 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1431 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1423 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ | 1432 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ |
1424 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1433 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1425 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1434 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1426 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1435 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1427 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ | 1436 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ |
1428 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1437 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1429 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1438 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1430 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ | 1439 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ |
1431 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1440 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1432 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1441 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1433 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1442 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1434 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1443 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1435 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1444 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1436 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1445 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1437 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1446 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1438 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1447 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1439 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1448 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1440 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1449 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1441 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | 1450 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ |
1442 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | 1451 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ |
1443 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | 1452 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ |
1444 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1453 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1445 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1454 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1446 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1455 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1447 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1456 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1448 | i18n("<p><h3>In list view:</h3></p>\n") + | 1457 | i18n("<p><h3>In list view:</h3></p>\n") + |
1449 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1458 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1450 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1459 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1451 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1460 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1452 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1461 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1453 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1462 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1454 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1463 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1455 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1464 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1456 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1465 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1457 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1466 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1458 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1467 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1459 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1468 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
1460 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1469 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1461 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1470 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1462 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1471 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1463 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1472 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1464 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1473 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
1465 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ | 1474 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ |
1466 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + | 1475 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + |
1467 | i18n("<p><b>White</b>: Item readonly</p>\n"); | 1476 | i18n("<p><b>White</b>: Item readonly</p>\n"); |
1468 | displayText( text, cap); | 1477 | displayText( text, cap); |
1469 | } | 1478 | } |
1470 | void MainWindow::aboutAutoSaving() | 1479 | void MainWindow::aboutAutoSaving() |
1471 | { | 1480 | { |
1472 | 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"); | 1481 | 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"); |
1473 | 1482 | ||
1474 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); | 1483 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); |
1475 | 1484 | ||
1476 | } | 1485 | } |
1477 | void MainWindow::aboutKnownBugs() | 1486 | void MainWindow::aboutKnownBugs() |
1478 | { | 1487 | { |
1479 | QMessageBox* msg; | 1488 | QMessageBox* msg; |
1480 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), | 1489 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), |
1481 | 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")+ | 1490 | 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")+ |
1482 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1491 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1483 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + | 1492 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + |
1484 | i18n("\nor report them in the bugtracker on\n") + | 1493 | i18n("\nor report them in the bugtracker on\n") + |
1485 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), | 1494 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), |
1486 | QMessageBox::NoIcon, | 1495 | QMessageBox::NoIcon, |
1487 | QMessageBox::Ok, | 1496 | QMessageBox::Ok, |
1488 | QMessageBox::NoButton, | 1497 | QMessageBox::NoButton, |
1489 | QMessageBox::NoButton); | 1498 | QMessageBox::NoButton); |
1490 | msg->exec(); | 1499 | msg->exec(); |
1491 | delete msg; | 1500 | delete msg; |
1492 | 1501 | ||
1493 | } | 1502 | } |
1494 | 1503 | ||
1495 | QString MainWindow::defaultFileName() | 1504 | QString MainWindow::defaultFileName() |
1496 | { | 1505 | { |
1497 | return locateLocal( "data", "korganizer/mycalendar.ics" ); | 1506 | return locateLocal( "data", "korganizer/mycalendar.ics" ); |
1498 | } | 1507 | } |
1499 | QString MainWindow::syncFileName() | 1508 | QString MainWindow::syncFileName() |
1500 | { | 1509 | { |
1501 | #ifdef DESKTOP_VERSION | 1510 | #ifdef DESKTOP_VERSION |
1502 | return locateLocal( "tmp", "synccalendar.ics" ); | 1511 | return locateLocal( "tmp", "synccalendar.ics" ); |
1503 | #else | 1512 | #else |
1504 | return QString( "/tmp/synccalendar.ics" ); | 1513 | return QString( "/tmp/synccalendar.ics" ); |
1505 | #endif | 1514 | #endif |
1506 | } | 1515 | } |
1507 | #include "koglobals.h" | 1516 | #include "koglobals.h" |
1508 | #include <kcalendarsystem.h> | 1517 | #include <kcalendarsystem.h> |
1509 | void MainWindow::updateWeek(QDate seda) | 1518 | void MainWindow::updateWeek(QDate seda) |
1510 | { | 1519 | { |
1511 | int weekNum = KGlobal::locale()->weekNum ( seda ); | 1520 | int weekNum = KGlobal::locale()->weekNum ( seda ); |
1512 | mWeekPixmap.fill( mWeekBgColor ); | 1521 | mWeekPixmap.fill( mWeekBgColor ); |
1513 | QPainter p ( &mWeekPixmap ); | 1522 | QPainter p ( &mWeekPixmap ); |
1514 | p.setFont( mWeekFont ); | 1523 | p.setFont( mWeekFont ); |
1515 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); | 1524 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); |
1516 | p.end(); | 1525 | p.end(); |
1517 | QIconSet icon3 ( mWeekPixmap ); | 1526 | QIconSet icon3 ( mWeekPixmap ); |
1518 | mWeekAction->setIconSet ( icon3 ); | 1527 | mWeekAction->setIconSet ( icon3 ); |
1519 | 1528 | ||
1520 | } | 1529 | } |
1521 | void MainWindow::updateWeekNum(const DateList &selectedDates) | 1530 | void MainWindow::updateWeekNum(const DateList &selectedDates) |
1522 | { | 1531 | { |
1523 | updateWeek( selectedDates.first() ); | 1532 | updateWeek( selectedDates.first() ); |
1524 | } | 1533 | } |
1525 | void MainWindow::processIncidenceSelection( Incidence *incidence ) | 1534 | void MainWindow::processIncidenceSelection( Incidence *incidence ) |
1526 | { | 1535 | { |
1527 | 1536 | ||
1528 | if ( !incidence ) { | 1537 | if ( !incidence ) { |
1529 | enableIncidenceActions( false ); | 1538 | enableIncidenceActions( false ); |
1530 | 1539 | ||
1531 | mNewSubTodoAction->setEnabled( false ); | 1540 | mNewSubTodoAction->setEnabled( false ); |
1532 | setCaptionToDates(); | 1541 | setCaptionToDates(); |
1533 | return; | 1542 | return; |
1534 | 1543 | ||
1535 | } | 1544 | } |
1536 | 1545 | ||
1537 | //KGlobal::locale()->formatDateTime(nextA, true); | 1546 | //KGlobal::locale()->formatDateTime(nextA, true); |
1538 | QString startString = ""; | 1547 | QString startString = ""; |
1539 | if ( incidence->type() != "Todo" ) { | 1548 | if ( incidence->type() != "Todo" ) { |
1540 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { | 1549 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { |
1541 | if ( incidence->doesFloat() ) { | 1550 | if ( incidence->doesFloat() ) { |
1542 | startString += ": "+incidence->dtStartDateStr( true ); | 1551 | startString += ": "+incidence->dtStartDateStr( true ); |
1543 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); | 1552 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); |
1544 | 1553 | ||
1545 | } else { | 1554 | } else { |
1546 | startString = ": "+incidence->dtStartStr(true); | 1555 | startString = ": "+incidence->dtStartStr(true); |
1547 | startString += " --- "+((Event*)incidence)->dtEndStr(true); | 1556 | startString += " --- "+((Event*)incidence)->dtEndStr(true); |
1548 | 1557 | ||
1549 | } | 1558 | } |
1550 | 1559 | ||
1551 | } else { | 1560 | } else { |
1552 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) | 1561 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) |
1553 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ | 1562 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ |
1554 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); | 1563 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); |
1555 | if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) { | 1564 | if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) { |
1556 | bool ok; | 1565 | bool ok; |
1557 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); | 1566 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); |
1558 | if ( ok ) { | 1567 | if ( ok ) { |
1559 | int years = noc.date().year() - incidence->dtStart().date().year(); | 1568 | int years = noc.date().year() - incidence->dtStart().date().year(); |
1560 | startString += i18n(" (%1 y.)"). arg( years ); | 1569 | startString += i18n(" (%1 y.)"). arg( years ); |
1561 | } | 1570 | } |
1562 | } | 1571 | } |
1563 | else | 1572 | else |
1564 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); | 1573 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); |
1565 | } | 1574 | } |
1566 | 1575 | ||
1567 | } | 1576 | } |
1568 | else | 1577 | else |
1569 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); | 1578 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); |
1570 | if ( !incidence->location().isEmpty() ) | 1579 | if ( !incidence->location().isEmpty() ) |
1571 | startString += " (" +incidence->location()+")"; | 1580 | startString += " (" +incidence->location()+")"; |
1572 | setCaption( incidence->summary()+startString); | 1581 | setCaption( incidence->summary()+startString); |
1573 | 1582 | ||
1574 | enableIncidenceActions( true ); | 1583 | enableIncidenceActions( true ); |
1575 | 1584 | ||
1576 | if ( incidence->type() == "Event" ) { | 1585 | if ( incidence->type() == "Event" ) { |
1577 | mShowAction->setText( i18n("Show Event...") ); | 1586 | mShowAction->setText( i18n("Show Event...") ); |
1578 | mEditAction->setText( i18n("Edit Event...") ); | 1587 | mEditAction->setText( i18n("Edit Event...") ); |
1579 | mDeleteAction->setText( i18n("Delete Event...") ); | 1588 | mDeleteAction->setText( i18n("Delete Event...") ); |
1580 | 1589 | ||
1581 | mNewSubTodoAction->setEnabled( false ); | 1590 | mNewSubTodoAction->setEnabled( false ); |
1582 | } else if ( incidence->type() == "Todo" ) { | 1591 | } else if ( incidence->type() == "Todo" ) { |
1583 | mShowAction->setText( i18n("Show Todo...") ); | 1592 | mShowAction->setText( i18n("Show Todo...") ); |
1584 | mEditAction->setText( i18n("Edit Todo...") ); | 1593 | mEditAction->setText( i18n("Edit Todo...") ); |
1585 | mDeleteAction->setText( i18n("Delete Todo...") ); | 1594 | mDeleteAction->setText( i18n("Delete Todo...") ); |
1586 | 1595 | ||
1587 | mNewSubTodoAction->setEnabled( true ); | 1596 | mNewSubTodoAction->setEnabled( true ); |
1588 | } else { | 1597 | } else { |
1589 | mShowAction->setText( i18n("Show...") ); | 1598 | mShowAction->setText( i18n("Show...") ); |
1590 | mShowAction->setText( i18n("Edit...") ); | 1599 | mShowAction->setText( i18n("Edit...") ); |
1591 | mShowAction->setText( i18n("Delete...") ); | 1600 | mShowAction->setText( i18n("Delete...") ); |
1592 | 1601 | ||
1593 | mNewSubTodoAction->setEnabled( false ); | 1602 | mNewSubTodoAction->setEnabled( false ); |
1594 | } | 1603 | } |
1595 | } | 1604 | } |
1596 | 1605 | ||
1597 | void MainWindow::enableIncidenceActions( bool enabled ) | 1606 | void MainWindow::enableIncidenceActions( bool enabled ) |
1598 | { | 1607 | { |
1599 | mShowAction->setEnabled( enabled ); | 1608 | mShowAction->setEnabled( enabled ); |
1600 | mEditAction->setEnabled( enabled ); | 1609 | mEditAction->setEnabled( enabled ); |
1601 | mDeleteAction->setEnabled( enabled ); | 1610 | mDeleteAction->setEnabled( enabled ); |
1602 | 1611 | ||
1603 | mCloneAction->setEnabled( enabled ); | 1612 | mCloneAction->setEnabled( enabled ); |
1604 | mMoveAction->setEnabled( enabled ); | 1613 | mMoveAction->setEnabled( enabled ); |
1605 | mBeamAction->setEnabled( enabled ); | 1614 | mBeamAction->setEnabled( enabled ); |
1606 | mCancelAction->setEnabled( enabled ); | 1615 | mCancelAction->setEnabled( enabled ); |
1607 | } | 1616 | } |
1608 | 1617 | ||
1609 | void MainWindow::importOL() | 1618 | void MainWindow::importOL() |
1610 | { | 1619 | { |
1611 | #ifdef _OL_IMPORT_ | 1620 | #ifdef _OL_IMPORT_ |
1612 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); | 1621 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); |
1613 | id->exec(); | 1622 | id->exec(); |
1614 | delete id; | 1623 | delete id; |
1615 | mView->updateView(); | 1624 | mView->updateView(); |
1616 | #endif | 1625 | #endif |
1617 | } | 1626 | } |
1618 | void MainWindow::importBday() | 1627 | void MainWindow::importBday() |
1619 | { | 1628 | { |
1620 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1629 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1621 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), | 1630 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), |
1622 | i18n("Import!"), i18n("Cancel"), 0, | 1631 | i18n("Import!"), i18n("Cancel"), 0, |
1623 | 0, 1 ); | 1632 | 0, 1 ); |
1624 | if ( result == 0 ) { | 1633 | if ( result == 0 ) { |
1625 | mView->importBday(); | 1634 | mView->importBday(); |
1626 | 1635 | ||
1627 | } | 1636 | } |
1628 | 1637 | ||
1629 | 1638 | ||
1630 | } | 1639 | } |
1631 | void MainWindow::importQtopia() | 1640 | void MainWindow::importQtopia() |
1632 | { | 1641 | { |
1633 | //#ifndef DESKTOP_VERSION | 1642 | //#ifndef DESKTOP_VERSION |
1634 | 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"); | 1643 | 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"); |
1635 | #ifdef DESKTOP_VERSION | 1644 | #ifdef DESKTOP_VERSION |
1636 | 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"); | 1645 | 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"); |
1637 | #endif | 1646 | #endif |
1638 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, | 1647 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, |
1639 | i18n("Import!"), i18n("Cancel"), 0, | 1648 | i18n("Import!"), i18n("Cancel"), 0, |
1640 | 0, 1 ); | 1649 | 0, 1 ); |
1641 | if ( result == 0 ) { | 1650 | if ( result == 0 ) { |
1642 | #ifndef DESKTOP_VERSION | 1651 | #ifndef DESKTOP_VERSION |
1643 | QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); | 1652 | QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); |
1644 | QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); | 1653 | QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); |
1645 | QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; | 1654 | QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; |
1646 | #else | 1655 | #else |
1647 | QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; | 1656 | QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; |
1648 | QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; | 1657 | QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; |
1649 | QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; | 1658 | QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; |
1650 | #endif | 1659 | #endif |
1651 | mView->importQtopia( categories, datebook, todolist ); | 1660 | mView->importQtopia( categories, datebook, todolist ); |
1652 | } | 1661 | } |
1653 | #if 0 | 1662 | #if 0 |
1654 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1663 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1655 | i18n("Not supported \non desktop!\n"), | 1664 | i18n("Not supported \non desktop!\n"), |
1656 | i18n("Ok"), i18n("Cancel"), 0, | 1665 | i18n("Ok"), i18n("Cancel"), 0, |
1657 | 0, 1 ); | 1666 | 0, 1 ); |
1658 | 1667 | ||
1659 | #endif | 1668 | #endif |
1660 | } | 1669 | } |
1661 | 1670 | ||
1662 | void MainWindow::saveOnClose() | 1671 | void MainWindow::saveOnClose() |
1663 | { | 1672 | { |
1664 | KOPrefs *p = KOPrefs::instance(); | 1673 | KOPrefs *p = KOPrefs::instance(); |
1665 | p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); | 1674 | p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); |
1666 | p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); | 1675 | p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); |
1667 | p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); | 1676 | p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); |
1668 | if ( filterToolBar ) { | 1677 | if ( filterToolBar ) { |
1669 | p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); | 1678 | p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); |
1670 | } | 1679 | } |
1671 | #ifdef DESKTOP_VERSION | 1680 | #ifdef DESKTOP_VERSION |
1672 | 1681 | ||
1673 | QPoint myP; | 1682 | QPoint myP; |
1674 | myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1683 | myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1675 | if ( p->mToolBarHor ) | 1684 | if ( p->mToolBarHor ) |
1676 | p->mToolBarUp = myP.y() > height()/2; | 1685 | p->mToolBarUp = myP.y() > height()/2; |
1677 | else | 1686 | else |
1678 | p->mToolBarUp = myP.x() > width()/2; | 1687 | p->mToolBarUp = myP.x() > width()/2; |
1679 | myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1688 | myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1680 | if ( p->mToolBarHorV ) | 1689 | if ( p->mToolBarHorV ) |
1681 | p->mToolBarUpV = myP.y() > height()/2; | 1690 | p->mToolBarUpV = myP.y() > height()/2; |
1682 | else | 1691 | else |
1683 | p->mToolBarUpV = myP.x() > width()/2 ; | 1692 | p->mToolBarUpV = myP.x() > width()/2 ; |
1684 | myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1693 | myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1685 | if ( p->mToolBarHorN ) | 1694 | if ( p->mToolBarHorN ) |
1686 | p->mToolBarUpN = myP.y() > height()/2; | 1695 | p->mToolBarUpN = myP.y() > height()/2; |
1687 | else | 1696 | else |
1688 | p->mToolBarUpN = myP.x() > width()/2 ; | 1697 | p->mToolBarUpN = myP.x() > width()/2 ; |
1689 | if ( filterToolBar ) { | 1698 | if ( filterToolBar ) { |
1690 | myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); | 1699 | myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); |
1691 | if ( p->mToolBarHorF ) | 1700 | if ( p->mToolBarHorF ) |
1692 | p->mToolBarUpF = myP.y() > height()/2; | 1701 | p->mToolBarUpF = myP.y() > height()/2; |
1693 | else | 1702 | else |
1694 | p->mToolBarUpF = myP.x() > width()/2 ; | 1703 | p->mToolBarUpF = myP.x() > width()/2 ; |
1695 | } | 1704 | } |
1696 | #else | 1705 | #else |
1697 | if ( p->mToolBarHor ) | 1706 | if ( p->mToolBarHor ) |
1698 | p->mToolBarUp = iconToolBar->y() > height()/2; | 1707 | p->mToolBarUp = iconToolBar->y() > height()/2; |
1699 | else | 1708 | else |
1700 | p->mToolBarUp = iconToolBar->x() > width()/2; | 1709 | p->mToolBarUp = iconToolBar->x() > width()/2; |
1701 | if ( p->mToolBarHorV ) | 1710 | if ( p->mToolBarHorV ) |
1702 | p->mToolBarUpV = viewToolBar->y() > height()/2; | 1711 | p->mToolBarUpV = viewToolBar->y() > height()/2; |
1703 | else | 1712 | else |
1704 | p->mToolBarUpV = viewToolBar->x() > width()/2 ; | 1713 | p->mToolBarUpV = viewToolBar->x() > width()/2 ; |
1705 | 1714 | ||
1706 | if ( p->mToolBarHorN ) | 1715 | if ( p->mToolBarHorN ) |
1707 | p->mToolBarUpN = navigatorToolBar->y() > height()/2; | 1716 | p->mToolBarUpN = navigatorToolBar->y() > height()/2; |
1708 | else | 1717 | else |
1709 | p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; | 1718 | p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; |
1710 | if ( filterToolBar ) { | 1719 | if ( filterToolBar ) { |
1711 | if ( p->mToolBarHorF ) | 1720 | if ( p->mToolBarHorF ) |
1712 | p->mToolBarUpF = filterToolBar->y() > height()/2; | 1721 | p->mToolBarUpF = filterToolBar->y() > height()/2; |
1713 | else | 1722 | else |
1714 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; | 1723 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; |
1715 | } | 1724 | } |
1716 | #endif | 1725 | #endif |
1717 | 1726 | ||
1718 | 1727 | ||
1719 | mView->writeSettings(); | 1728 | mView->writeSettings(); |
1720 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) | 1729 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) |
1721 | save(); | 1730 | save(); |
1722 | } | 1731 | } |
1723 | void MainWindow::slotModifiedChanged( bool changed ) | 1732 | void MainWindow::slotModifiedChanged( bool changed ) |
1724 | { | 1733 | { |
1725 | if ( mBlockAtStartup ) | 1734 | if ( mBlockAtStartup ) |
1726 | return; | 1735 | return; |
1727 | 1736 | ||
1728 | int msec; | 1737 | int msec; |
1729 | // we store the changes after 1 minute, | 1738 | // we store the changes after 1 minute, |
1730 | // and for safety reasons after 10 minutes again | 1739 | // and for safety reasons after 10 minutes again |
1731 | if ( !mSyncManager->blockSave() ) | 1740 | if ( !mSyncManager->blockSave() ) |
1732 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; | 1741 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; |
1733 | else | 1742 | else |
1734 | msec = 1000 * 600; | 1743 | msec = 1000 * 600; |
1735 | mSaveTimer.start( msec, true ); // 1 minute | 1744 | mSaveTimer.start( msec, true ); // 1 minute |
1736 | qDebug("KO: Saving File in %d secs!", msec/1000); | 1745 | qDebug("KO: Saving File in %d secs!", msec/1000); |
1737 | mCalendarModifiedFlag = true; | 1746 | mCalendarModifiedFlag = true; |
1738 | } | 1747 | } |
1739 | void MainWindow::saveStopTimer() | 1748 | void MainWindow::saveStopTimer() |
1740 | { | 1749 | { |
1741 | mSaveTimer.stop(); | 1750 | mSaveTimer.stop(); |
1742 | if (mSaveTimer.isActive() ) | 1751 | if (mSaveTimer.isActive() ) |
1743 | qDebug("ti active "); | 1752 | qDebug("ti active "); |
1744 | else | 1753 | else |
1745 | qDebug("KO: Save timer stopped"); | 1754 | qDebug("KO: Save timer stopped"); |
1746 | } | 1755 | } |
1747 | void MainWindow::save() | 1756 | void MainWindow::save() |
1748 | { | 1757 | { |
1749 | if ( !mCalendarModifiedFlag ) { | 1758 | if ( !mCalendarModifiedFlag ) { |
1750 | qDebug("KO: Calendar not modified. Nothing saved."); | 1759 | qDebug("KO: Calendar not modified. Nothing saved."); |
1751 | return; | 1760 | return; |
1752 | } | 1761 | } |
1753 | if ( mSyncManager->blockSave() ) | 1762 | if ( mSyncManager->blockSave() ) |
1754 | return; | 1763 | return; |
1755 | mSyncManager->setBlockSave(true); | 1764 | mSyncManager->setBlockSave(true); |
1756 | if ( mView->checkFileVersion( defaultFileName()) ) { | 1765 | if ( mView->checkFileVersion( defaultFileName()) ) { |
1757 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 1766 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
1758 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); | 1767 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); |
1759 | qDebug("KO: Start saving data to file!"); | 1768 | qDebug("KO: Start saving data to file!"); |
1760 | mView->saveCalendar( defaultFileName() ); | 1769 | mView->saveCalendar( defaultFileName() ); |
1761 | mCalendarModifiedFlag = false; | 1770 | mCalendarModifiedFlag = false; |
1762 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 1771 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
1763 | qDebug("KO: Needed %d ms for saving.",msNeeded ); | 1772 | qDebug("KO: Needed %d ms for saving.",msNeeded ); |
1764 | QString savemes; | 1773 | QString savemes; |
1765 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); | 1774 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); |
1766 | setCaption(savemes); | 1775 | setCaption(savemes); |
1767 | } else | 1776 | } else |
1768 | setCaption(i18n("Saving cancelled!")); | 1777 | setCaption(i18n("Saving cancelled!")); |
1769 | mSyncManager->setBlockSave( false ); | 1778 | mSyncManager->setBlockSave( false ); |
1770 | } | 1779 | } |
1771 | 1780 | ||
1772 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) | 1781 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) |
1773 | { | 1782 | { |
1774 | if ( !e->isAutoRepeat() ) { | 1783 | if ( !e->isAutoRepeat() ) { |
1775 | mFlagKeyPressed = false; | 1784 | mFlagKeyPressed = false; |
1776 | } | 1785 | } |
1777 | } | 1786 | } |
1778 | void MainWindow::keyPressEvent ( QKeyEvent * e ) | 1787 | void MainWindow::keyPressEvent ( QKeyEvent * e ) |
1779 | { | 1788 | { |
1780 | qApp->processEvents(); | 1789 | qApp->processEvents(); |
1781 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { | 1790 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { |
1782 | e->ignore(); | 1791 | e->ignore(); |
1783 | // qDebug(" ignore %d",e->isAutoRepeat() ); | 1792 | // qDebug(" ignore %d",e->isAutoRepeat() ); |
1784 | return; | 1793 | return; |
1785 | } | 1794 | } |
1786 | if (! e->isAutoRepeat() ) | 1795 | if (! e->isAutoRepeat() ) |
1787 | mFlagKeyPressed = true; | 1796 | mFlagKeyPressed = true; |
1788 | KOPrefs *p = KOPrefs::instance(); | 1797 | KOPrefs *p = KOPrefs::instance(); |
1789 | bool showSelectedDates = false; | 1798 | bool showSelectedDates = false; |
1790 | int size; | 1799 | int size; |
1791 | int pro = 0; | 1800 | int pro = 0; |
1792 | //qDebug("MainWindow::keyPressEvent "); | 1801 | //qDebug("MainWindow::keyPressEvent "); |
1793 | switch ( e->key() ) { | 1802 | switch ( e->key() ) { |
1794 | case Qt::Key_Right: | 1803 | case Qt::Key_Right: |
1795 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 1804 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1796 | mView->goNextMonth(); | 1805 | mView->goNextMonth(); |
1797 | else | 1806 | else |
1798 | mView->goNext(); | 1807 | mView->goNext(); |
1799 | showSelectedDates = true; | 1808 | showSelectedDates = true; |
1800 | break; | 1809 | break; |
1801 | case Qt::Key_Left: | 1810 | case Qt::Key_Left: |
1802 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1811 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1803 | mView->goPreviousMonth(); | 1812 | mView->goPreviousMonth(); |
1804 | else | 1813 | else |
1805 | mView->goPrevious(); | 1814 | mView->goPrevious(); |
1806 | showSelectedDates = true; | 1815 | showSelectedDates = true; |
1807 | break; | 1816 | break; |
1808 | case Qt::Key_Down: | 1817 | case Qt::Key_Down: |
1809 | mView->viewManager()->agendaView()->scrollOneHourDown(); | 1818 | mView->viewManager()->agendaView()->scrollOneHourDown(); |
1810 | break; | 1819 | break; |
1811 | case Qt::Key_Up: | 1820 | case Qt::Key_Up: |
1812 | mView->viewManager()->agendaView()->scrollOneHourUp(); | 1821 | mView->viewManager()->agendaView()->scrollOneHourUp(); |
1813 | break; | 1822 | break; |
1814 | case Qt::Key_K: | 1823 | case Qt::Key_K: |
1815 | mView->viewManager()->showMonthViewWeek(); | 1824 | mView->viewManager()->showMonthViewWeek(); |
1816 | break; | 1825 | break; |
1817 | case Qt::Key_I: | 1826 | case Qt::Key_I: |
1818 | mView->showIncidence(); | 1827 | mView->showIncidence(); |
1819 | break; | 1828 | break; |
1820 | case Qt::Key_Delete: | 1829 | case Qt::Key_Delete: |
1821 | case Qt::Key_Backspace: | 1830 | case Qt::Key_Backspace: |
1822 | mView->deleteIncidence(); | 1831 | mView->deleteIncidence(); |
1823 | break; | 1832 | break; |
1824 | case Qt::Key_D: | 1833 | case Qt::Key_D: |
1825 | mView->viewManager()->showDayView(); | 1834 | mView->viewManager()->showDayView(); |
1826 | showSelectedDates = true; | 1835 | showSelectedDates = true; |
1827 | break; | 1836 | break; |
1828 | case Qt::Key_O: | 1837 | case Qt::Key_O: |
1829 | mView->toggleFilerEnabled( ); | 1838 | mView->toggleFilerEnabled( ); |
1830 | break; | 1839 | break; |
1831 | case Qt::Key_0: | 1840 | case Qt::Key_0: |
1832 | case Qt::Key_1: | 1841 | case Qt::Key_1: |
1833 | case Qt::Key_2: | 1842 | case Qt::Key_2: |
1834 | case Qt::Key_3: | 1843 | case Qt::Key_3: |
1835 | case Qt::Key_4: | 1844 | case Qt::Key_4: |
1836 | case Qt::Key_5: | 1845 | case Qt::Key_5: |
1837 | case Qt::Key_6: | 1846 | case Qt::Key_6: |
1838 | case Qt::Key_7: | 1847 | case Qt::Key_7: |
1839 | case Qt::Key_8: | 1848 | case Qt::Key_8: |
1840 | case Qt::Key_9: | 1849 | case Qt::Key_9: |
1841 | pro = e->key()-48; | 1850 | pro = e->key()-48; |
1842 | if ( pro == 0 ) | 1851 | if ( pro == 0 ) |
1843 | pro = 10; | 1852 | pro = 10; |
1844 | if ( e->state() == Qt::ControlButton) | 1853 | if ( e->state() == Qt::ControlButton) |
1845 | pro += 10; | 1854 | pro += 10; |
1846 | break; | 1855 | break; |
1847 | case Qt::Key_M: | 1856 | case Qt::Key_M: |
1848 | mView->viewManager()->showMonthView(); | 1857 | mView->viewManager()->showMonthView(); |
1849 | showSelectedDates = true; | 1858 | showSelectedDates = true; |
1850 | break; | 1859 | break; |
1851 | case Qt::Key_Insert: | 1860 | case Qt::Key_Insert: |
1852 | mView->newEvent(); | 1861 | mView->newEvent(); |
1853 | break; | 1862 | break; |
1854 | case Qt::Key_S : | 1863 | case Qt::Key_S : |
1855 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 1864 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1856 | mView->newSubTodo(); | 1865 | mView->newSubTodo(); |
1857 | else | 1866 | else |
1858 | mView->dialogManager()->showSearchDialog(); | 1867 | mView->dialogManager()->showSearchDialog(); |
1859 | break; | 1868 | break; |
1860 | case Qt::Key_Y : | 1869 | case Qt::Key_Y : |
1861 | case Qt::Key_Z : | 1870 | case Qt::Key_Z : |
1862 | mView->viewManager()->showWorkWeekView(); | 1871 | mView->viewManager()->showWorkWeekView(); |
1863 | showSelectedDates = true; | 1872 | showSelectedDates = true; |
1864 | break; | 1873 | break; |
1865 | case Qt::Key_U : | 1874 | case Qt::Key_U : |
1866 | mView->viewManager()->showWeekView(); | 1875 | mView->viewManager()->showWeekView(); |
1867 | showSelectedDates = true; | 1876 | showSelectedDates = true; |
1868 | break; | 1877 | break; |
1869 | case Qt::Key_H : | 1878 | case Qt::Key_H : |
1870 | keyBindings(); | 1879 | keyBindings(); |
1871 | break; | 1880 | break; |
1872 | case Qt::Key_W: | 1881 | case Qt::Key_W: |
1873 | mView->viewManager()->showWhatsNextView(); | 1882 | mView->viewManager()->showWhatsNextView(); |
1874 | break; | 1883 | break; |
1875 | case Qt::Key_L: | 1884 | case Qt::Key_L: |
1876 | mView->viewManager()->showListView(); | 1885 | mView->viewManager()->showListView(); |
1877 | break; | 1886 | break; |
1878 | case Qt::Key_N: | 1887 | case Qt::Key_N: |
1879 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 1888 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1880 | mView->viewManager()->showNextView(); | 1889 | mView->viewManager()->showNextView(); |
1881 | else { | 1890 | else { |
1882 | mView->viewManager()->showNextXView(); | 1891 | mView->viewManager()->showNextXView(); |
1883 | showSelectedDates = true; | 1892 | showSelectedDates = true; |
1884 | } | 1893 | } |
1885 | break; | 1894 | break; |
1886 | case Qt::Key_V: | 1895 | case Qt::Key_V: |
1887 | mView->viewManager()->showTodoView(); | 1896 | mView->viewManager()->showTodoView(); |
1888 | break; | 1897 | break; |
1889 | case Qt::Key_C: | 1898 | case Qt::Key_C: |
1890 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); | 1899 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); |
1891 | break; | 1900 | break; |
1892 | case Qt::Key_P: | 1901 | case Qt::Key_P: |
1893 | mView->showDatePicker( ); | 1902 | mView->showDatePicker( ); |
1894 | break; | 1903 | break; |
1895 | case Qt::Key_F: | 1904 | case Qt::Key_F: |
1896 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1905 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1897 | mView->editFilters(); | 1906 | mView->editFilters(); |
1898 | else | 1907 | else |
1899 | mView->toggleFilter(); | 1908 | mView->toggleFilter(); |
1900 | break; | 1909 | break; |
1901 | case Qt::Key_X: | 1910 | case Qt::Key_X: |
1902 | mView->toggleDateNavigatorWidget(); | 1911 | mView->toggleDateNavigatorWidget(); |
1903 | break; | 1912 | break; |
1904 | case Qt::Key_Space: | 1913 | case Qt::Key_Space: |
1905 | mView->toggleExpand(); | 1914 | mView->toggleExpand(); |
1906 | break; | 1915 | break; |
1907 | case Qt::Key_A: | 1916 | case Qt::Key_A: |
1908 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) | 1917 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) |
1909 | mView->showNextAlarms(); | 1918 | mView->showNextAlarms(); |
1910 | else | 1919 | else |
1911 | mView->toggleAllDaySize(); | 1920 | mView->toggleAllDaySize(); |
1912 | break; | 1921 | break; |
1913 | case Qt::Key_T: | 1922 | case Qt::Key_T: |
1914 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1923 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1915 | mView->newTodo(); | 1924 | mView->newTodo(); |
1916 | else { | 1925 | else { |
1917 | mView->goToday(); | 1926 | mView->goToday(); |
1918 | showSelectedDates = true; | 1927 | showSelectedDates = true; |
1919 | } | 1928 | } |
1920 | break; | 1929 | break; |
1921 | case Qt::Key_J: | 1930 | case Qt::Key_J: |
1922 | mView->viewManager()->showJournalView(); | 1931 | mView->viewManager()->showJournalView(); |
1923 | break; | 1932 | break; |
1924 | case Qt::Key_B: | 1933 | case Qt::Key_B: |
1925 | mView->editIncidenceDescription();; | 1934 | mView->editIncidenceDescription();; |
1926 | break; | 1935 | break; |
1927 | // case Qt::Key_Return: | 1936 | // case Qt::Key_Return: |
1928 | case Qt::Key_E: | 1937 | case Qt::Key_E: |
1929 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1938 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1930 | mView->newEvent(); | 1939 | mView->newEvent(); |
1931 | else | 1940 | else |
1932 | mView->editIncidence(); | 1941 | mView->editIncidence(); |
1933 | break; | 1942 | break; |
1934 | case Qt::Key_Plus: | 1943 | case Qt::Key_Plus: |
1935 | size = p->mHourSize +2; | 1944 | size = p->mHourSize +2; |
1936 | if ( size <= 22 ) | 1945 | if ( size <= 22 ) |
1937 | configureAgenda( size ); | 1946 | configureAgenda( size ); |
1938 | break; | 1947 | break; |
1939 | case Qt::Key_Minus: | 1948 | case Qt::Key_Minus: |
1940 | size = p->mHourSize - 2; | 1949 | size = p->mHourSize - 2; |
1941 | if ( size >= 4 ) | 1950 | if ( size >= 4 ) |
1942 | configureAgenda( size ); | 1951 | configureAgenda( size ); |
1943 | break; | 1952 | break; |
1944 | 1953 | ||
1945 | 1954 | ||
1946 | default: | 1955 | default: |
1947 | e->ignore(); | 1956 | e->ignore(); |
1948 | } | 1957 | } |
1949 | if ( pro > 0 ) { | 1958 | if ( pro > 0 ) { |
1950 | mView->selectFilter( pro-1 ); | 1959 | mView->selectFilter( pro-1 ); |
1951 | } | 1960 | } |
1952 | if ( showSelectedDates ) { | 1961 | if ( showSelectedDates ) { |
1953 | ;// setCaptionToDates(); | 1962 | ;// setCaptionToDates(); |
1954 | } | 1963 | } |
1955 | 1964 | ||
1956 | } | 1965 | } |
1957 | 1966 | ||
1958 | void MainWindow::fillFilterMenu() | 1967 | void MainWindow::fillFilterMenu() |
1959 | { | 1968 | { |
1960 | selectFilterMenu->clear(); | 1969 | selectFilterMenu->clear(); |
1961 | selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); | 1970 | selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); |
1962 | selectFilterMenu->insertSeparator(); | 1971 | selectFilterMenu->insertSeparator(); |
1963 | selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); | 1972 | selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); |
1964 | 1973 | ||
1965 | selectFilterMenu->insertSeparator(); | 1974 | selectFilterMenu->insertSeparator(); |
1966 | QPtrList<CalFilter> fili = mView->filters(); | 1975 | QPtrList<CalFilter> fili = mView->filters(); |
1967 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 1976 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
1968 | CalFilter *filter = fili.first(); | 1977 | CalFilter *filter = fili.first(); |
1969 | int iii = 2; | 1978 | int iii = 2; |
1970 | bool checkitem = mView->filterView()->filtersEnabled(); | 1979 | bool checkitem = mView->filterView()->filtersEnabled(); |
1971 | while(filter) { | 1980 | while(filter) { |
1972 | selectFilterMenu->insertItem( filter->name(), iii ); | 1981 | selectFilterMenu->insertItem( filter->name(), iii ); |
1973 | if ( filter == curfilter) | 1982 | if ( filter == curfilter) |
1974 | selectFilterMenu->setItemChecked( iii, checkitem ); | 1983 | selectFilterMenu->setItemChecked( iii, checkitem ); |
1975 | filter = fili.next(); | 1984 | filter = fili.next(); |
1976 | ++iii; | 1985 | ++iii; |
1977 | } | 1986 | } |
1978 | if ( !checkitem ) | 1987 | if ( !checkitem ) |
1979 | selectFilterMenu->setItemChecked( 1, true ); | 1988 | selectFilterMenu->setItemChecked( 1, true ); |
1980 | } | 1989 | } |
1981 | void MainWindow::fillFilterMenuPopup() | 1990 | void MainWindow::fillFilterMenuPopup() |
1982 | { | 1991 | { |
1983 | filterPopupMenu->clear(); | 1992 | filterPopupMenu->clear(); |
1984 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); | 1993 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); |
1985 | 1994 | ||
1986 | filterPopupMenu->insertSeparator(); | 1995 | filterPopupMenu->insertSeparator(); |
1987 | QPtrList<CalFilter> fili = mView->filters(); | 1996 | QPtrList<CalFilter> fili = mView->filters(); |
1988 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 1997 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
1989 | CalFilter *filter = fili.first(); | 1998 | CalFilter *filter = fili.first(); |
1990 | int iii = 1; | 1999 | int iii = 1; |
1991 | bool checkitem = mView->filterView()->filtersEnabled(); | 2000 | bool checkitem = mView->filterView()->filtersEnabled(); |
1992 | while(filter) { | 2001 | while(filter) { |
1993 | filterPopupMenu->insertItem( filter->name(), iii ); | 2002 | filterPopupMenu->insertItem( filter->name(), iii ); |
1994 | if ( filter == curfilter) | 2003 | if ( filter == curfilter) |
1995 | filterPopupMenu->setItemChecked( iii, checkitem ); | 2004 | filterPopupMenu->setItemChecked( iii, checkitem ); |
1996 | filter = fili.next(); | 2005 | filter = fili.next(); |
1997 | ++iii; | 2006 | ++iii; |
1998 | } | 2007 | } |
1999 | if ( !checkitem ) | 2008 | if ( !checkitem ) |
2000 | filterPopupMenu->setItemChecked( 0, true ); | 2009 | filterPopupMenu->setItemChecked( 0, true ); |
2001 | } | 2010 | } |
2002 | void MainWindow::selectFilter( int fil ) | 2011 | void MainWindow::selectFilter( int fil ) |
2003 | { | 2012 | { |
2004 | 2013 | ||
2005 | if ( fil == 0 ) { | 2014 | if ( fil == 0 ) { |
2006 | mView->editFilters( ); | 2015 | mView->editFilters( ); |
2007 | } else if ( fil == 1 ){ | 2016 | } else if ( fil == 1 ){ |
2008 | if ( mView->filterView()->filtersEnabled() ) | 2017 | if ( mView->filterView()->filtersEnabled() ) |
2009 | mView->toggleFilerEnabled( ); | 2018 | mView->toggleFilerEnabled( ); |
2010 | } else { | 2019 | } else { |
2011 | if ( !mView->filterView()->filtersEnabled() ) { | 2020 | if ( !mView->filterView()->filtersEnabled() ) { |
2012 | mView->filterView()->blockSignals( true ); | 2021 | mView->filterView()->blockSignals( true ); |
2013 | mView->toggleFilerEnabled( ); | 2022 | mView->toggleFilerEnabled( ); |
2014 | mView->filterView()->blockSignals( false ); | 2023 | mView->filterView()->blockSignals( false ); |
2015 | } | 2024 | } |
2016 | mView->selectFilter( fil-2 ); | 2025 | mView->selectFilter( fil-2 ); |
2017 | } | 2026 | } |
2018 | } | 2027 | } |
2019 | void MainWindow::updateFilterToolbar() | 2028 | void MainWindow::updateFilterToolbar() |
2020 | { | 2029 | { |
2021 | if ( filterMenubar ) { | 2030 | if ( filterMenubar ) { |
2022 | if ( !mView->filterView()->filtersEnabled() ) { | 2031 | if ( !mView->filterView()->filtersEnabled() ) { |
2023 | filterMenubar->changeItem( 0, i18n("No Filter") ); | 2032 | filterMenubar->changeItem( 0, i18n("No Filter") ); |
2024 | } else { | 2033 | } else { |
2025 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2034 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2026 | if ( curfilter ) { | 2035 | if ( curfilter ) { |
2027 | filterMenubar->changeItem( 0, curfilter->name() ); | 2036 | filterMenubar->changeItem( 0, curfilter->name() ); |
2028 | } | 2037 | } |
2029 | } | 2038 | } |
2030 | } | 2039 | } |
2031 | } | 2040 | } |
2032 | void MainWindow::selectFilterPopup( int fil ) | 2041 | void MainWindow::selectFilterPopup( int fil ) |
2033 | { | 2042 | { |
2034 | selectFilter( fil + 1 ); | 2043 | selectFilter( fil + 1 ); |
2035 | 2044 | ||
2036 | } | 2045 | } |
2037 | void MainWindow::configureToolBar( int item ) | 2046 | void MainWindow::configureToolBar( int item ) |
2038 | { | 2047 | { |
2039 | 2048 | ||
2040 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); | 2049 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); |
2041 | KOPrefs *p = KOPrefs::instance(); | 2050 | KOPrefs *p = KOPrefs::instance(); |
2042 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); | 2051 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); |
2043 | p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); | 2052 | p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); |
2044 | p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); | 2053 | p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); |
2045 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); | 2054 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); |
2046 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); | 2055 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); |
2047 | p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); | 2056 | p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); |
2048 | p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); | 2057 | p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); |
2049 | p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); | 2058 | p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); |
2050 | p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); | 2059 | p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); |
2051 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); | 2060 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); |
2052 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); | 2061 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); |
2053 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); | 2062 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); |
2054 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); | 2063 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); |
2055 | p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); | 2064 | p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); |
2056 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); | 2065 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); |
2057 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); | 2066 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); |
2058 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); | 2067 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); |
2059 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); | 2068 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); |
2060 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); | 2069 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); |
2061 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); | 2070 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); |
2062 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); | 2071 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); |
2063 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); | 2072 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); |
2064 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); | 2073 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); |
2065 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); | 2074 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); |
2066 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); | 2075 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); |
2067 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); | 2076 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); |
2068 | p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); | 2077 | p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); |
2069 | // initActions(); | 2078 | // initActions(); |
2070 | } | 2079 | } |
2071 | void MainWindow::setCaption ( const QString & c ) | 2080 | void MainWindow::setCaption ( const QString & c ) |
2072 | { | 2081 | { |
2073 | QString cap = c; | 2082 | QString cap = c; |
2074 | cap.replace( QRegExp("\n"), " " ); | 2083 | cap.replace( QRegExp("\n"), " " ); |
2075 | cap = cap.stripWhiteSpace(); | 2084 | cap = cap.stripWhiteSpace(); |
2076 | if ( cap.isEmpty() ) | 2085 | if ( cap.isEmpty() ) |
2077 | cap = "KO/Pi"; | 2086 | cap = "KO/Pi"; |
2078 | QWidget::setCaption( cap ); | 2087 | QWidget::setCaption( cap ); |
2079 | } | 2088 | } |
2080 | void MainWindow::setCaptionToDates() | 2089 | void MainWindow::setCaptionToDates() |
2081 | { | 2090 | { |
2082 | QString selDates; | 2091 | QString selDates; |
2083 | QDate date = mView->startDate(); | 2092 | QDate date = mView->startDate(); |
2084 | if ( ! date.isValid() ) { | 2093 | if ( ! date.isValid() ) { |
2085 | setCaption(""); | 2094 | setCaption(""); |
2086 | return; | 2095 | return; |
2087 | } | 2096 | } |
2088 | selDates = KGlobal::locale()->formatDate( date, true); | 2097 | selDates = KGlobal::locale()->formatDate( date, true); |
2089 | if (mView->startDate() < mView->endDate() ) | 2098 | if (mView->startDate() < mView->endDate() ) |
2090 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); | 2099 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); |
2091 | else { | 2100 | else { |
2092 | QString addString; | 2101 | QString addString; |
2093 | if ( date == QDateTime::currentDateTime().date() ) | 2102 | if ( date == QDateTime::currentDateTime().date() ) |
2094 | addString = i18n("Today"); | 2103 | addString = i18n("Today"); |
2095 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) | 2104 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) |
2096 | addString = i18n("Tomorrow"); | 2105 | addString = i18n("Tomorrow"); |
2097 | if ( !addString.isEmpty() ) | 2106 | if ( !addString.isEmpty() ) |
2098 | selDates = addString+", "+selDates ; | 2107 | selDates = addString+", "+selDates ; |
2099 | } | 2108 | } |
2100 | setCaption( i18n("Dates: ") + selDates ); | 2109 | setCaption( i18n("Dates: ") + selDates ); |
2101 | 2110 | ||
2102 | } | 2111 | } |
2103 | void MainWindow::showConfigureAgenda( ) | 2112 | void MainWindow::showConfigureAgenda( ) |
2104 | { | 2113 | { |
2105 | int iii; | 2114 | int iii; |
2106 | for ( iii = 1;iii<= 10 ;++iii ){ | 2115 | for ( iii = 1;iii<= 10 ;++iii ){ |
2107 | configureAgendaMenu->setItemChecked( (iii+1)*2, false ); | 2116 | configureAgendaMenu->setItemChecked( (iii+1)*2, false ); |
2108 | } | 2117 | } |
2109 | configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); | 2118 | configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); |
2110 | } | 2119 | } |
2111 | void MainWindow::configureAgenda( int item ) | 2120 | void MainWindow::configureAgenda( int item ) |
2112 | { | 2121 | { |
2113 | if ( KOPrefs::instance()->mHourSize == item ) | 2122 | if ( KOPrefs::instance()->mHourSize == item ) |
2114 | return; | 2123 | return; |
2115 | KOPrefs::instance()->mHourSize=item; | 2124 | KOPrefs::instance()->mHourSize=item; |
2116 | mView->viewManager()->agendaView()->updateConfig(); | 2125 | mView->viewManager()->agendaView()->updateConfig(); |
2117 | } | 2126 | } |
2118 | 2127 | ||
2119 | void MainWindow::saveCalendar() | 2128 | void MainWindow::saveCalendar() |
2120 | { | 2129 | { |
2121 | QString fn = KOPrefs::instance()->mLastSaveFile; | 2130 | QString fn = KOPrefs::instance()->mLastSaveFile; |
2122 | fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); | 2131 | fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); |
2123 | 2132 | ||
2124 | if ( fn == "" ) | 2133 | if ( fn == "" ) |
2125 | return; | 2134 | return; |
2126 | QFileInfo info; | 2135 | QFileInfo info; |
2127 | info.setFile( fn ); | 2136 | info.setFile( fn ); |
2128 | QString mes; | 2137 | QString mes; |
2129 | bool createbup = true; | 2138 | bool createbup = true; |
2130 | if ( info. exists() ) { | 2139 | if ( info. exists() ) { |
2131 | mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; | 2140 | mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; |
2132 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 2141 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
2133 | i18n("Overwrite!"), i18n("Cancel"), 0, | 2142 | i18n("Overwrite!"), i18n("Cancel"), 0, |
2134 | 0, 1 ); | 2143 | 0, 1 ); |
2135 | if ( result != 0 ) { | 2144 | if ( result != 0 ) { |
2136 | createbup = false; | 2145 | createbup = false; |
2137 | } | 2146 | } |
2138 | } | 2147 | } |
2139 | if ( createbup ) { | 2148 | if ( createbup ) { |
2140 | mView->saveCalendar( fn ); | 2149 | mView->saveCalendar( fn ); |
2141 | mes = i18n("KO/Pi:Saved %1").arg(fn); | 2150 | mes = i18n("KO/Pi:Saved %1").arg(fn); |
2142 | KOPrefs::instance()->mLastSaveFile = fn; | 2151 | KOPrefs::instance()->mLastSaveFile = fn; |
2143 | setCaption(mes); | 2152 | setCaption(mes); |
2144 | } | 2153 | } |
2145 | } | 2154 | } |
2146 | void MainWindow::loadCalendar() | 2155 | void MainWindow::loadCalendar() |
2147 | { | 2156 | { |
2148 | 2157 | ||
2149 | QString fn = KOPrefs::instance()->mLastLoadFile; | 2158 | QString fn = KOPrefs::instance()->mLastLoadFile; |
2150 | fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); | 2159 | fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); |
2151 | 2160 | ||
2152 | if ( fn == "" ) | 2161 | if ( fn == "" ) |
2153 | return; | 2162 | return; |
2154 | QFileInfo info; | 2163 | QFileInfo info; |
2155 | info.setFile( fn ); | 2164 | info.setFile( fn ); |
2156 | QString mess; | 2165 | QString mess; |
2157 | bool loadbup = true; | 2166 | bool loadbup = true; |
2158 | if ( info. exists() ) { | 2167 | if ( info. exists() ) { |
2159 | mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); | 2168 | mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); |
2160 | int result = QMessageBox::warning( this, "KO/Pi: Warning!", | 2169 | int result = QMessageBox::warning( this, "KO/Pi: Warning!", |
2161 | mess, | 2170 | mess, |
2162 | i18n("Load!"), i18n("Cancel"), 0, | 2171 | i18n("Load!"), i18n("Cancel"), 0, |
2163 | 0, 1 ); | 2172 | 0, 1 ); |
2164 | if ( result != 0 ) { | 2173 | if ( result != 0 ) { |
2165 | loadbup = false; | 2174 | loadbup = false; |
2166 | } | 2175 | } |
2167 | } else { | 2176 | } else { |
2168 | QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 2177 | QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
2169 | i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, | 2178 | i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, |
2170 | 0, 1 ); | 2179 | 0, 1 ); |
2171 | 2180 | ||
2172 | return; | 2181 | return; |
2173 | } | 2182 | } |
2174 | if ( loadbup ) { | 2183 | if ( loadbup ) { |
2175 | mView->openCalendar( fn ); | 2184 | mView->openCalendar( fn ); |
2176 | KOPrefs::instance()->mLastLoadFile = fn; | 2185 | KOPrefs::instance()->mLastLoadFile = fn; |
2177 | mess = i18n("KO/Pi:Loaded %1").arg(fn) ; | 2186 | mess = i18n("KO/Pi:Loaded %1").arg(fn) ; |
2178 | setCaption(mess); | 2187 | setCaption(mess); |
2179 | } | 2188 | } |
2180 | 2189 | ||
2181 | } | 2190 | } |
2182 | void MainWindow::quickImportIcal() | 2191 | void MainWindow::quickImportIcal() |
2183 | { | 2192 | { |
2184 | importFile( KOPrefs::instance()->mLastImportFile, false ); | 2193 | importFile( KOPrefs::instance()->mLastImportFile, false ); |
2185 | } | 2194 | } |
2186 | void MainWindow::importFile( QString fn, bool quick ) | 2195 | void MainWindow::importFile( QString fn, bool quick ) |
2187 | { | 2196 | { |
2188 | QFileInfo info; | 2197 | QFileInfo info; |
2189 | info.setFile( fn ); | 2198 | info.setFile( fn ); |
2190 | QString mess; | 2199 | QString mess; |
2191 | bool loadbup = true; | 2200 | bool loadbup = true; |
2192 | if ( !info. exists() ) { | 2201 | if ( !info. exists() ) { |
2193 | mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); | 2202 | mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); |
2194 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 2203 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
2195 | mess ); | 2204 | mess ); |
2196 | return; | 2205 | return; |
2197 | } | 2206 | } |
2198 | int result = 0; | 2207 | int result = 0; |
2199 | if ( !quick ) { | 2208 | if ( !quick ) { |
2200 | 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 )); | 2209 | 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 )); |
2201 | result = QMessageBox::warning( this, "KO/Pi: Warning!", | 2210 | result = QMessageBox::warning( this, "KO/Pi: Warning!", |
2202 | mess, | 2211 | mess, |
2203 | "Import", "Cancel", 0, | 2212 | "Import", "Cancel", 0, |
2204 | 0, 1 ); | 2213 | 0, 1 ); |
2205 | } | 2214 | } |
2206 | if ( result == 0 ) { | 2215 | if ( result == 0 ) { |
2207 | if ( mView->openCalendar( fn, true )) { | 2216 | if ( mView->openCalendar( fn, true )) { |
2208 | KOPrefs::instance()->mLastImportFile = fn; | 2217 | KOPrefs::instance()->mLastImportFile = fn; |
2209 | setCaption(i18n("Imported file successfully")); | 2218 | setCaption(i18n("Imported file successfully")); |
2210 | } else { | 2219 | } else { |
2211 | setCaption(i18n("Error importing file")); | 2220 | setCaption(i18n("Error importing file")); |
2212 | } | 2221 | } |
2213 | } | 2222 | } |
2214 | } | 2223 | } |
2215 | 2224 | ||
2216 | void MainWindow::importIcal() | 2225 | void MainWindow::importIcal() |
2217 | { | 2226 | { |
2218 | 2227 | ||
2219 | QString fn =KOPrefs::instance()->mLastImportFile; | 2228 | QString fn =KOPrefs::instance()->mLastImportFile; |
2220 | 2229 | ||
2221 | fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); | 2230 | fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); |
2222 | if ( fn == "" ) | 2231 | if ( fn == "" ) |
2223 | return; | 2232 | return; |
2224 | importFile( fn, true ); | 2233 | importFile( fn, true ); |
2225 | 2234 | ||
2226 | } | 2235 | } |
2227 | 2236 | ||
2228 | void MainWindow::exportVCalendar() | 2237 | void MainWindow::exportVCalendar() |
2229 | { | 2238 | { |
2230 | QString fn = KOPrefs::instance()->mLastVcalFile; | 2239 | QString fn = KOPrefs::instance()->mLastVcalFile; |
2231 | fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); | 2240 | fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); |
2232 | if ( fn == "" ) | 2241 | if ( fn == "" ) |
2233 | return; | 2242 | return; |
2234 | QFileInfo info; | 2243 | QFileInfo info; |
2235 | info.setFile( fn ); | 2244 | info.setFile( fn ); |
2236 | QString mes; | 2245 | QString mes; |
2237 | bool createbup = true; | 2246 | bool createbup = true; |
2238 | if ( info. exists() ) { | 2247 | if ( info. exists() ) { |
2239 | mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 2248 | mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
2240 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 2249 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
2241 | i18n("Overwrite!"), i18n("Cancel"), 0, | 2250 | i18n("Overwrite!"), i18n("Cancel"), 0, |
2242 | 0, 1 ); | 2251 | 0, 1 ); |
2243 | if ( result != 0 ) { | 2252 | if ( result != 0 ) { |
2244 | createbup = false; | 2253 | createbup = false; |
2245 | } | 2254 | } |
2246 | } | 2255 | } |
2247 | if ( createbup ) { | 2256 | if ( createbup ) { |
2248 | if ( mView->exportVCalendar( fn ) ) { | 2257 | if ( mView->exportVCalendar( fn ) ) { |
2249 | KOPrefs::instance()->mLastVcalFile = fn; | 2258 | KOPrefs::instance()->mLastVcalFile = fn; |
2250 | if ( fn.length() > 20 ) | 2259 | if ( fn.length() > 20 ) |
2251 | mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; | 2260 | mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; |
2252 | else | 2261 | else |
2253 | mes = i18n("KO/Pi:Exported to %1").arg(fn ); | 2262 | mes = i18n("KO/Pi:Exported to %1").arg(fn ); |
2254 | setCaption(mes); | 2263 | setCaption(mes); |
2255 | } | 2264 | } |
2256 | } | 2265 | } |
2257 | 2266 | ||
2258 | } | 2267 | } |
2259 | QString MainWindow::sentSyncFile() | 2268 | QString MainWindow::sentSyncFile() |
2260 | { | 2269 | { |
2261 | #ifdef DESKTOP_VERSION | 2270 | #ifdef DESKTOP_VERSION |
2262 | return locateLocal( "tmp", "copysynccal.ics" ); | 2271 | return locateLocal( "tmp", "copysynccal.ics" ); |
2263 | #else | 2272 | #else |
2264 | return QString( "/tmp/copysynccal.ics" ); | 2273 | return QString( "/tmp/copysynccal.ics" ); |
2265 | #endif | 2274 | #endif |
2266 | } | 2275 | } |
2267 | 2276 | ||
2268 | void MainWindow::syncFileRequest() | 2277 | void MainWindow::syncFileRequest() |
2269 | { | 2278 | { |
2270 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { | 2279 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { |
2271 | mSyncManager->slotSyncMenu( 999 ); | 2280 | mSyncManager->slotSyncMenu( 999 ); |
2272 | } | 2281 | } |
2273 | 2282 | ||
2274 | setCaption(i18n("Saving Data to temp file ..." )); | 2283 | setCaption(i18n("Saving Data to temp file ..." )); |
2275 | mView->saveCalendar( sentSyncFile() ); | 2284 | mView->saveCalendar( sentSyncFile() ); |
2276 | setCaption(i18n("Data saved to temp file!" )); | 2285 | setCaption(i18n("Data saved to temp file!" )); |
2277 | 2286 | ||
2278 | } | 2287 | } |
2279 | void MainWindow::getFile( bool success ) | 2288 | void MainWindow::getFile( bool success ) |
2280 | { | 2289 | { |
2281 | if ( ! success ) { | 2290 | if ( ! success ) { |
2282 | setCaption( i18n("Error receiving file. Nothing changed!") ); | 2291 | setCaption( i18n("Error receiving file. Nothing changed!") ); |
2283 | return; | 2292 | return; |
2284 | } | 2293 | } |
2285 | mView->openCalendar( sentSyncFile() ); | 2294 | mView->openCalendar( sentSyncFile() ); |
2286 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { | 2295 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { |
2287 | mSyncManager->slotSyncMenu( 999 ); | 2296 | mSyncManager->slotSyncMenu( 999 ); |
2288 | } | 2297 | } |
2289 | setCaption( i18n("Pi-Sync successful!") ); | 2298 | setCaption( i18n("Pi-Sync successful!") ); |
2290 | } | 2299 | } |
2291 | 2300 | ||
2292 | void MainWindow::printSel( ) | 2301 | void MainWindow::printSel( ) |
2293 | { | 2302 | { |
2294 | mView->viewManager()->agendaView()->agenda()->printSelection(); | 2303 | mView->viewManager()->agendaView()->agenda()->printSelection(); |
2295 | } | 2304 | } |
2296 | 2305 | ||
2297 | void MainWindow::printCal() | 2306 | void MainWindow::printCal() |
2298 | { | 2307 | { |
2299 | mView->print();//mCp->showDialog(); | 2308 | mView->print();//mCp->showDialog(); |
2300 | } | 2309 | } |
2301 | 2310 | ||
2302 | 2311 | ||
2303 | #include "libkdepim/kdatepicker.h" | 2312 | #include "libkdepim/kdatepicker.h" |
2304 | #include <kdatetbl.h> | 2313 | #include <kdatetbl.h> |
2305 | void MainWindow::weekAction() | 2314 | void MainWindow::weekAction() |
2306 | { | 2315 | { |
2307 | int month; | 2316 | int month; |
2308 | KPopupFrame* popup = new KPopupFrame(this); | 2317 | KPopupFrame* popup = new KPopupFrame(this); |
2309 | KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); | 2318 | KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); |
2310 | // ----- | 2319 | // ----- |
2311 | picker->resize(picker->sizeHint()); | 2320 | picker->resize(picker->sizeHint()); |
2312 | popup->setMainWidget(picker); | 2321 | popup->setMainWidget(picker); |
2313 | picker->setFocus(); | 2322 | picker->setFocus(); |
2314 | connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); | 2323 | connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); |
2315 | int x = 0; | 2324 | int x = 0; |
2316 | int y = iconToolBar->height(); | 2325 | int y = iconToolBar->height(); |
2317 | int dX = 0; | 2326 | int dX = 0; |
2318 | int dY = 0; | 2327 | int dY = 0; |
2319 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 2328 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
2320 | if ( iconToolBar->y() > height()/2 ) { | 2329 | if ( iconToolBar->y() > height()/2 ) { |
2321 | dY = picker->sizeHint().height()+8; | 2330 | dY = picker->sizeHint().height()+8; |
2322 | y = 0; | 2331 | y = 0; |
2323 | } | 2332 | } |
2324 | } else { | 2333 | } else { |
2325 | if ( iconToolBar->x() > width()/2 ) { // right side | 2334 | if ( iconToolBar->x() > width()/2 ) { // right side |
2326 | x=0; | 2335 | x=0; |
2327 | dX= picker->sizeHint().width()+8; | 2336 | dX= picker->sizeHint().width()+8; |
2328 | y = 0; | 2337 | y = 0; |
2329 | } else { | 2338 | } else { |
2330 | x= iconToolBar->width(); | 2339 | x= iconToolBar->width(); |
2331 | y = 0; | 2340 | y = 0; |
2332 | } | 2341 | } |
2333 | } | 2342 | } |
2334 | //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); | 2343 | //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); |
2335 | if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) | 2344 | if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) |
2336 | { | 2345 | { |
2337 | month = picker->getResult(); | 2346 | month = picker->getResult(); |
2338 | emit selectWeek ( month ); | 2347 | emit selectWeek ( month ); |
2339 | //qDebug("weekSelected %d ", month); | 2348 | //qDebug("weekSelected %d ", month); |
2340 | } | 2349 | } |
2341 | delete popup; | 2350 | delete popup; |
2342 | } | 2351 | } |
2343 | 2352 | ||
2344 | void MainWindow::hideEvent ( QHideEvent * ) | 2353 | void MainWindow::hideEvent ( QHideEvent * ) |
2345 | { | 2354 | { |
2346 | QString message; | 2355 | QString message; |
2347 | QDateTime nextA = mCalendar->nextAlarmEventDateTime(); | 2356 | QDateTime nextA = mCalendar->nextAlarmEventDateTime(); |
2348 | if ( nextA.isValid() ) { | 2357 | if ( nextA.isValid() ) { |
2349 | QString sum = mCalendar->nextSummary(); | 2358 | QString sum = mCalendar->nextSummary(); |
2350 | 2359 | ||
2351 | 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)); | 2360 | 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)); |
2352 | setCaption( message ); | 2361 | setCaption( message ); |
2353 | } | 2362 | } |
2354 | } | 2363 | } |
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index f8f4c8a..0d66a5a 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp | |||
@@ -1,1204 +1,1211 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkdepim. | 2 | This file is part of libkdepim. |
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 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | #include <stdlib.h> | 30 | #include <stdlib.h> |
31 | 31 | ||
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | #include <qmap.h> | 33 | #include <qmap.h> |
34 | #include <qregexp.h> | 34 | #include <qregexp.h> |
35 | 35 | ||
36 | #ifndef DESKTOP_VERSION | 36 | #ifndef DESKTOP_VERSION |
37 | #include <qpe/qpeapplication.h> | 37 | #include <qpe/qpeapplication.h> |
38 | #include <qtopia/qcopenvelope_qws.h> | 38 | #include <qtopia/qcopenvelope_qws.h> |
39 | #else | 39 | #else |
40 | #include <qapplication.h> | 40 | #include <qapplication.h> |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #include <kstaticdeleter.h> | 43 | #include <kstaticdeleter.h> |
44 | #include <kmessagebox.h> | 44 | #include <kmessagebox.h> |
45 | 45 | ||
46 | 46 | ||
47 | #include "externalapphandler.h" | 47 | #include "externalapphandler.h" |
48 | 48 | ||
49 | #include "kpimglobalprefs.h" | 49 | #include "kpimglobalprefs.h" |
50 | 50 | ||
51 | //uncomment line to get debug output | 51 | //uncomment line to get debug output |
52 | //#define DEBUG_EXT_APP_HANDLER | 52 | //#define DEBUG_EXT_APP_HANDLER |
53 | 53 | ||
54 | /********************************************************************************* | 54 | /********************************************************************************* |
55 | * | 55 | * |
56 | ********************************************************************************/ | 56 | ********************************************************************************/ |
57 | 57 | ||
58 | 58 | ||
59 | QCopTransferItem::QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) | 59 | QCopTransferItem::QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) |
60 | : _usedSourceParameters(usedSourceParameters), _sourceMessage(sourceMessage), _targetChannel(targetChannel), _targetMessage(targetMessage) | 60 | : _usedSourceParameters(usedSourceParameters), _sourceMessage(sourceMessage), _targetChannel(targetChannel), _targetMessage(targetMessage) |
61 | { | 61 | { |
62 | //sourceMessage passes later three parameters: sourceChannel, uid, param1 | 62 | //sourceMessage passes later three parameters: sourceChannel, uid, param1 |
63 | if (_usedSourceParameters == 0) | 63 | if (_usedSourceParameters == 0) |
64 | _sourceMessageParameters = "QString,QString)"; | 64 | _sourceMessageParameters = "QString,QString)"; |
65 | else if (_usedSourceParameters == 1) | 65 | else if (_usedSourceParameters == 1) |
66 | _sourceMessageParameters = "(QString,QString,QString)"; | 66 | _sourceMessageParameters = "(QString,QString,QString)"; |
67 | else if (_usedSourceParameters == 2) | 67 | else if (_usedSourceParameters == 2) |
68 | _sourceMessageParameters = "(QString,QString,QString,QString)"; | 68 | _sourceMessageParameters = "(QString,QString,QString,QString)"; |
69 | else if (_usedSourceParameters == 3) | 69 | else if (_usedSourceParameters == 3) |
70 | _sourceMessageParameters = "(QString,QString,QString,QString,QString)"; | 70 | _sourceMessageParameters = "(QString,QString,QString,QString,QString)"; |
71 | } | 71 | } |
72 | 72 | ||
73 | /*********************************************************************************/ | 73 | /*********************************************************************************/ |
74 | 74 | ||
75 | QCopTransferItem::QCopTransferItem() | 75 | QCopTransferItem::QCopTransferItem() |
76 | { | 76 | { |
77 | } | 77 | } |
78 | 78 | ||
79 | /*********************************************************************************/ | 79 | /*********************************************************************************/ |
80 | bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& param1, const QString& param2, const QString& param3) | 80 | bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& param1, const QString& param2, const QString& param3) |
81 | { | 81 | { |
82 | 82 | ||
83 | #ifndef DESKTOP_VERSION | 83 | #ifndef DESKTOP_VERSION |
84 | //sourceMessage passes two parameters: sourceChannel, uid | 84 | //sourceMessage passes two parameters: sourceChannel, uid |
85 | QString sourceMessage = _sourceMessage + _sourceMessageParameters; | 85 | QString sourceMessage = _sourceMessage + _sourceMessageParameters; |
86 | #ifdef DEBUG_EXT_APP_HANDLER | 86 | #ifdef DEBUG_EXT_APP_HANDLER |
87 | qDebug("1Using QCopEnvelope e(\"%s\",\"%s\")", _targetChannel.latin1(), sourceMessage.latin1()); | 87 | qDebug("1Using QCopEnvelope e(\"%s\",\"%s\")", _targetChannel.latin1(), sourceMessage.latin1()); |
88 | qDebug("passing sourcechannel(%s), uid(%s), param1(%s), param2(%s), param3(%s) as parameter to QCopEnvelope", _sourceChannel.latin1(), uid.latin1(), param1.latin1(), param2.latin1(), param3.latin1()); | 88 | qDebug("passing sourcechannel(%s), uid(%s), param1(%s), param2(%s), param3(%s) as parameter to QCopEnvelope", _sourceChannel.latin1(), uid.latin1(), param1.latin1(), param2.latin1(), param3.latin1()); |
89 | #endif | 89 | #endif |
90 | 90 | ||
91 | QCopEnvelope e(_targetChannel.latin1(), sourceMessage.latin1()); | 91 | QCopEnvelope e(_targetChannel.latin1(), sourceMessage.latin1()); |
92 | 92 | ||
93 | e << _sourceChannel << uid; | 93 | e << _sourceChannel << uid; |
94 | 94 | ||
95 | if (_usedSourceParameters == 1) | 95 | if (_usedSourceParameters == 1) |
96 | e << param1; | 96 | e << param1; |
97 | else if (_usedSourceParameters == 2) | 97 | else if (_usedSourceParameters == 2) |
98 | e << param1 << param2; | 98 | e << param1 << param2; |
99 | else if (_usedSourceParameters == 3) | 99 | else if (_usedSourceParameters == 3) |
100 | e << param1 << param2 << param3; | 100 | e << param1 << param2 << param3; |
101 | 101 | ||
102 | qApp->processEvents(); | 102 | qApp->processEvents(); |
103 | 103 | ||
104 | return true; | 104 | return true; |
105 | 105 | ||
106 | #else | 106 | #else |
107 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); | 107 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); |
108 | return false; | 108 | return false; |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | } | 111 | } |
112 | 112 | ||
113 | 113 | ||
114 | /*********************************************************************************/ | 114 | /*********************************************************************************/ |
115 | void QCopTransferItem::setSourceChannel(const QString& sourceChannel) | 115 | void QCopTransferItem::setSourceChannel(const QString& sourceChannel) |
116 | { | 116 | { |
117 | 117 | ||
118 | if ( !sourceChannel.isEmpty()) | 118 | if ( !sourceChannel.isEmpty()) |
119 | _sourceChannel = sourceChannel; | 119 | _sourceChannel = sourceChannel; |
120 | } | 120 | } |
121 | 121 | ||
122 | 122 | ||
123 | /*********************************************************************************/ | 123 | /*********************************************************************************/ |
124 | bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) | 124 | bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) |
125 | { | 125 | { |
126 | 126 | ||
127 | // copied from old mail2 | 127 | // copied from old mail2 |
128 | /* | 128 | /* |
129 | static int ii = 0; | 129 | static int ii = 0; |
130 | 130 | ||
131 | // block second call | 131 | // block second call |
132 | if ( ii < 2 ) { | 132 | if ( ii < 2 ) { |
133 | ++ii; | 133 | ++ii; |
134 | if ( ii > 1 ) { | 134 | if ( ii > 1 ) { |
135 | qDebug("qcop call blocked "); | 135 | qDebug("qcop call blocked "); |
136 | return true; | 136 | return true; |
137 | } | 137 | } |
138 | } | 138 | } |
139 | */ | 139 | */ |
140 | 140 | ||
141 | // qDebug("QCopTransferItem- QCOP message received: %s ", cmsg.data() ); | 141 | // qDebug("QCopTransferItem- QCOP message received: %s ", cmsg.data() ); |
142 | 142 | ||
143 | //we are in the target and get a request from the source | 143 | //we are in the target and get a request from the source |
144 | if ( (_sourceMessage + _sourceMessageParameters) == cmsg.data()) | 144 | if ( (_sourceMessage + _sourceMessageParameters) == cmsg.data()) |
145 | { | 145 | { |
146 | 146 | ||
147 | QDataStream stream( data, IO_ReadOnly ); | 147 | QDataStream stream( data, IO_ReadOnly ); |
148 | 148 | ||
149 | 149 | ||
150 | QString sourceChannel; | 150 | QString sourceChannel; |
151 | QString uid; | 151 | QString uid; |
152 | QString param1; | 152 | QString param1; |
153 | QString param2; | 153 | QString param2; |
154 | QString param3; | 154 | QString param3; |
155 | 155 | ||
156 | stream >> sourceChannel >> uid; | 156 | stream >> sourceChannel >> uid; |
157 | 157 | ||
158 | if (_usedSourceParameters == 0) | 158 | if (_usedSourceParameters == 0) |
159 | { | 159 | { |
160 | emit receivedMessageFromSource(sourceChannel, uid); | 160 | emit receivedMessageFromSource(sourceChannel, uid); |
161 | } | 161 | } |
162 | else if (_usedSourceParameters == 1) | 162 | else if (_usedSourceParameters == 1) |
163 | { | 163 | { |
164 | stream >> param1; | 164 | stream >> param1; |
165 | emit receivedMessageFromSource(sourceChannel, uid, param1); | 165 | emit receivedMessageFromSource(sourceChannel, uid, param1); |
166 | } | 166 | } |
167 | else if (_usedSourceParameters == 2) | 167 | else if (_usedSourceParameters == 2) |
168 | { | 168 | { |
169 | stream >> param1 >> param2; | 169 | stream >> param1 >> param2; |
170 | emit receivedMessageFromSource(sourceChannel, uid, param1, param2); | 170 | emit receivedMessageFromSource(sourceChannel, uid, param1, param2); |
171 | } | 171 | } |
172 | else if (_usedSourceParameters == 3) | 172 | else if (_usedSourceParameters == 3) |
173 | { | 173 | { |
174 | stream >> param1 >> param2 >> param3; | 174 | stream >> param1 >> param2 >> param3; |
175 | emit receivedMessageFromSource(sourceChannel, uid, param1, param2, param3); | 175 | emit receivedMessageFromSource(sourceChannel, uid, param1, param2, param3); |
176 | } | 176 | } |
177 | 177 | ||
178 | return true; | 178 | return true; |
179 | } | 179 | } |
180 | 180 | ||
181 | return false; | 181 | return false; |
182 | } | 182 | } |
183 | 183 | ||
184 | 184 | ||
185 | /********************************************************************************* | 185 | /********************************************************************************* |
186 | * | 186 | * |
187 | ********************************************************************************/ | 187 | ********************************************************************************/ |
188 | 188 | ||
189 | 189 | ||
190 | QCopMapTransferItem::QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) | 190 | QCopMapTransferItem::QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) |
191 | : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage) | 191 | : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage) |
192 | { | 192 | { |
193 | //targetMessage returns later two parameters: uid, and map<qstring,qstring> | 193 | //targetMessage returns later two parameters: uid, and map<qstring,qstring> |
194 | _targetMessageParameters = "(QString,QMAP<QString,QString>)"; | 194 | _targetMessageParameters = "(QString,QMAP<QString,QString>)"; |
195 | } | 195 | } |
196 | 196 | ||
197 | /*********************************************************************************/ | 197 | /*********************************************************************************/ |
198 | bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap) | 198 | bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap) |
199 | { | 199 | { |
200 | #ifndef DESKTOP_VERSION | 200 | #ifndef DESKTOP_VERSION |
201 | //targetMessage passes two parameters: uid, map | 201 | //targetMessage passes two parameters: uid, map |
202 | QString targetMessage = _targetMessage + _targetMessageParameters; | 202 | QString targetMessage = _targetMessage + _targetMessageParameters; |
203 | 203 | ||
204 | #ifdef DEBUG_EXT_APP_HANDLER | 204 | #ifdef DEBUG_EXT_APP_HANDLER |
205 | qDebug("2Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1()); | 205 | qDebug("2Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1()); |
206 | qDebug("passing uid(%s) and map as parameter to QCopEnvelope", uid.latin1()); | 206 | qDebug("passing uid(%s) and map as parameter to QCopEnvelope", uid.latin1()); |
207 | #endif | 207 | #endif |
208 | 208 | ||
209 | QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1()); | 209 | QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1()); |
210 | //US we need no names in the To field. The emailadresses are enough | 210 | //US we need no names in the To field. The emailadresses are enough |
211 | 211 | ||
212 | e << uid << nameEmailMap; | 212 | e << uid << nameEmailMap; |
213 | 213 | ||
214 | qApp->processEvents(); | 214 | qApp->processEvents(); |
215 | 215 | ||
216 | return true; | 216 | return true; |
217 | 217 | ||
218 | #else | 218 | #else |
219 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); | 219 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); |
220 | return false; | 220 | return false; |
221 | #endif | 221 | #endif |
222 | 222 | ||
223 | } | 223 | } |
224 | 224 | ||
225 | 225 | ||
226 | /*********************************************************************************/ | 226 | /*********************************************************************************/ |
227 | bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) | 227 | bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) |
228 | { | 228 | { |
229 | bool res = QCopTransferItem::appMessage( cmsg, data ); | 229 | bool res = QCopTransferItem::appMessage( cmsg, data ); |
230 | 230 | ||
231 | if (res == false) | 231 | if (res == false) |
232 | { | 232 | { |
233 | QDataStream stream( data, IO_ReadOnly ); | 233 | QDataStream stream( data, IO_ReadOnly ); |
234 | 234 | ||
235 | // qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() ); | 235 | // qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() ); |
236 | 236 | ||
237 | //we are in the source and get an answer from the target | 237 | //we are in the source and get an answer from the target |
238 | if ((_targetMessage + _targetMessageParameters) == cmsg.data()) | 238 | if ((_targetMessage + _targetMessageParameters) == cmsg.data()) |
239 | { | 239 | { |
240 | QMap<QString,QString> adrMap; | 240 | QMap<QString,QString> adrMap; |
241 | QString uid; | 241 | QString uid; |
242 | 242 | ||
243 | stream >> uid >> adrMap; | 243 | stream >> uid >> adrMap; |
244 | 244 | ||
245 | emit receivedMessageFromTarget(uid, adrMap); | 245 | emit receivedMessageFromTarget(uid, adrMap); |
246 | 246 | ||
247 | 247 | ||
248 | return true; | 248 | return true; |
249 | } | 249 | } |
250 | } | 250 | } |
251 | 251 | ||
252 | return false; | 252 | return false; |
253 | } | 253 | } |
254 | 254 | ||
255 | 255 | ||
256 | /********************************************************************************* | 256 | /********************************************************************************* |
257 | * | 257 | * |
258 | ********************************************************************************/ | 258 | ********************************************************************************/ |
259 | 259 | ||
260 | QCopListTransferItem::~QCopListTransferItem() | 260 | QCopListTransferItem::~QCopListTransferItem() |
261 | { | 261 | { |
262 | 262 | ||
263 | } | 263 | } |
264 | 264 | ||
265 | QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) | 265 | QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) |
266 | : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage) | 266 | : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage) |
267 | { | 267 | { |
268 | //targetMessage returns later two parameters: uid, and three lists | 268 | //targetMessage returns later two parameters: uid, and three lists |
269 | _targetMessageParameters = "(QString,QStringList,QStringList,QStringList,QStringList,QStringList,QStringList)"; | 269 | _targetMessageParameters = "(QString,QStringList,QStringList,QStringList,QStringList,QStringList,QStringList)"; |
270 | } | 270 | } |
271 | 271 | ||
272 | /*********************************************************************************/ | 272 | /*********************************************************************************/ |
273 | bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6) | 273 | bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6) |
274 | { | 274 | { |
275 | #ifndef DESKTOP_VERSION | 275 | #ifndef DESKTOP_VERSION |
276 | //targetMessage passes two parameters: uid, map | 276 | //targetMessage passes two parameters: uid, map |
277 | QString targetMessage = _targetMessage + _targetMessageParameters; | 277 | QString targetMessage = _targetMessage + _targetMessageParameters; |
278 | 278 | ||
279 | #ifdef DEBUG_EXT_APP_HANDLER | 279 | #ifdef DEBUG_EXT_APP_HANDLER |
280 | qDebug("3Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1()); | 280 | qDebug("3Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1()); |
281 | qDebug("passing uid(%s) and list1, list2, list3, list4, list5, list6 as parameter to QCopEnvelope", uid.latin1()); | 281 | qDebug("passing uid(%s) and list1, list2, list3, list4, list5, list6 as parameter to QCopEnvelope", uid.latin1()); |
282 | 282 | ||
283 | 283 | ||
284 | for ( int i = 0; i < list3.count(); i++) | 284 | for ( int i = 0; i < list3.count(); i++) |
285 | qDebug("listentry list3: %s",list3[i].latin1()); | 285 | qDebug("listentry list3: %s",list3[i].latin1()); |
286 | #endif | 286 | #endif |
287 | 287 | ||
288 | QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1()); | 288 | QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1()); |
289 | //US we need no names in the To field. The emailadresses are enough | 289 | //US we need no names in the To field. The emailadresses are enough |
290 | 290 | ||
291 | e << uid << list1 << list2 << list3 << list4 << list5 << list6; | 291 | e << uid << list1 << list2 << list3 << list4 << list5 << list6; |
292 | 292 | ||
293 | qApp->processEvents(); | 293 | qApp->processEvents(); |
294 | 294 | ||
295 | return true; | 295 | return true; |
296 | 296 | ||
297 | #else | 297 | #else |
298 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); | 298 | KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); |
299 | return false; | 299 | return false; |
300 | #endif | 300 | #endif |
301 | 301 | ||
302 | } | 302 | } |
303 | 303 | ||
304 | 304 | ||
305 | /*********************************************************************************/ | 305 | /*********************************************************************************/ |
306 | bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) | 306 | bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) |
307 | { | 307 | { |
308 | bool res = QCopTransferItem::appMessage( cmsg, data ); | 308 | bool res = QCopTransferItem::appMessage( cmsg, data ); |
309 | #ifdef DEBUG_EXT_APP_HANDLER | 309 | #ifdef DEBUG_EXT_APP_HANDLER |
310 | qDebug("1QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); | 310 | qDebug("1QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); |
311 | #endif | 311 | #endif |
312 | 312 | ||
313 | if (res == false) | 313 | if (res == false) |
314 | { | 314 | { |
315 | QDataStream stream( data, IO_ReadOnly ); | 315 | QDataStream stream( data, IO_ReadOnly ); |
316 | 316 | ||
317 | #ifdef DEBUG_EXT_APP_HANDLER | 317 | #ifdef DEBUG_EXT_APP_HANDLER |
318 | qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); | 318 | qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); |
319 | #endif | 319 | #endif |
320 | 320 | ||
321 | //we are in the source and get an answer from the target | 321 | //we are in the source and get an answer from the target |
322 | if ((_targetMessage + _targetMessageParameters) == cmsg.data()) | 322 | if ((_targetMessage + _targetMessageParameters) == cmsg.data()) |
323 | { | 323 | { |
324 | QStringList list1; | 324 | QStringList list1; |
325 | QStringList list2; | 325 | QStringList list2; |
326 | QStringList list3; | 326 | QStringList list3; |
327 | QStringList list4; | 327 | QStringList list4; |
328 | QStringList list5; | 328 | QStringList list5; |
329 | QStringList list6; | 329 | QStringList list6; |
330 | QString uid; | 330 | QString uid; |
331 | 331 | ||
332 | #ifdef DEBUG_EXT_APP_HANDLER | 332 | #ifdef DEBUG_EXT_APP_HANDLER |
333 | qDebug("3QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); | 333 | qDebug("3QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); |
334 | #endif | 334 | #endif |
335 | 335 | ||
336 | stream >> uid >> list1 >> list2 >> list3 >> list4 >> list5 >> list6; | 336 | stream >> uid >> list1 >> list2 >> list3 >> list4 >> list5 >> list6; |
337 | emit receivedMessageFromTarget(uid, list1, list2, list3, list4, list5, list6); | 337 | emit receivedMessageFromTarget(uid, list1, list2, list3, list4, list5, list6); |
338 | 338 | ||
339 | 339 | ||
340 | return true; | 340 | return true; |
341 | } | 341 | } |
342 | } | 342 | } |
343 | 343 | ||
344 | return false; | 344 | return false; |
345 | } | 345 | } |
346 | 346 | ||
347 | 347 | ||
348 | 348 | ||
349 | /********************************************************************************* | 349 | /********************************************************************************* |
350 | * | 350 | * |
351 | ********************************************************************************/ | 351 | ********************************************************************************/ |
352 | 352 | ||
353 | 353 | ||
354 | ExternalAppHandler *ExternalAppHandler::sInstance = 0; | 354 | ExternalAppHandler *ExternalAppHandler::sInstance = 0; |
355 | static KStaticDeleter<ExternalAppHandler> staticDeleter; | 355 | static KStaticDeleter<ExternalAppHandler> staticDeleter; |
356 | 356 | ||
357 | ExternalAppHandler::ExternalAppHandler() | 357 | ExternalAppHandler::ExternalAppHandler() |
358 | { | 358 | { |
359 | mDefaultItems.setAutoDelete(true); | 359 | mDefaultItems.setAutoDelete(true); |
360 | 360 | ||
361 | mNameEmailUidListFromKAPITransfer = new QCopListTransferItem(0, "requestNameEmailUIDListFromKAPI", "QPE/Application/kapi", "receiveNameEmailUIDList"); | 361 | mNameEmailUidListFromKAPITransfer = new QCopListTransferItem(0, "requestNameEmailUIDListFromKAPI", "QPE/Application/kapi", "receiveNameEmailUIDList"); |
362 | connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForNameEmailUidList(const QString&, const QString&))); | 362 | connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForNameEmailUidList(const QString&, const QString&))); |
363 | connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SLOT (receivedNameEmailUidList_Slot(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); | 363 | connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SLOT (receivedNameEmailUidList_Slot(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); |
364 | 364 | ||
365 | //US mFindByEmailFromKAPITransfer = new QCopListTransferItem(1, "requestFindByEmailFromKAPI", "QPE/Application/kapi", "receiveFindByEmailNameEmailUIDList"); | 365 | //US mFindByEmailFromKAPITransfer = new QCopListTransferItem(1, "requestFindByEmailFromKAPI", "QPE/Application/kapi", "receiveFindByEmailNameEmailUIDList"); |
366 | //US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&)), this, SIGNAL (requestForFindByEmail(const QString&, const QString&, const QString&))); | 366 | //US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&)), this, SIGNAL (requestForFindByEmail(const QString&, const QString&, const QString&))); |
367 | //US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedFindByEmailEvent(const QString&, const QStringList&, const QStringList&, const QStringList&))); | 367 | //US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedFindByEmailEvent(const QString&, const QStringList&, const QStringList&, const QStringList&))); |
368 | 368 | ||
369 | mDisplayDetails = new QCopListTransferItem(3, "requestDisplayDetailsFromKAPI", "QPE/Application/kapi", ""); | 369 | mDisplayDetails = new QCopListTransferItem(3, "requestDisplayDetailsFromKAPI", "QPE/Application/kapi", ""); |
370 | connect(mDisplayDetails, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&, const QString&, const QString&)), this, SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); | 370 | connect(mDisplayDetails, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&, const QString&, const QString&)), this, SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); |
371 | 371 | ||
372 | 372 | ||
373 | 373 | ||
374 | mBirthdayListFromKAPITransfer = new QCopListTransferItem(0, "requestBirthdayListFromKAPI", "QPE/Application/kapi", "receiveBirthdayList"); | 374 | mBirthdayListFromKAPITransfer = new QCopListTransferItem(0, "requestBirthdayListFromKAPI", "QPE/Application/kapi", "receiveBirthdayList"); |
375 | connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForBirthdayList(const QString&, const QString&))); | 375 | connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForBirthdayList(const QString&, const QString&))); |
376 | connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); | 376 | connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); |
377 | 377 | ||
378 | 378 | ||
379 | } | 379 | } |
380 | 380 | ||
381 | ExternalAppHandler::~ExternalAppHandler() | 381 | ExternalAppHandler::~ExternalAppHandler() |
382 | { | 382 | { |
383 | delete mNameEmailUidListFromKAPITransfer; | 383 | delete mNameEmailUidListFromKAPITransfer; |
384 | //delete mFindByEmailFromKAPITransfer; | 384 | //delete mFindByEmailFromKAPITransfer; |
385 | delete mDisplayDetails; | 385 | delete mDisplayDetails; |
386 | delete mBirthdayListFromKAPITransfer; | 386 | delete mBirthdayListFromKAPITransfer; |
387 | } | 387 | } |
388 | 388 | ||
389 | void ExternalAppHandler::receivedNameEmailUidList_Slot(const QString& uid, | 389 | void ExternalAppHandler::receivedNameEmailUidList_Slot(const QString& uid, |
390 | const QStringList& nameList, | 390 | const QStringList& nameList, |
391 | const QStringList& emailList, | 391 | const QStringList& emailList, |
392 | const QStringList& uidList, | 392 | const QStringList& uidList, |
393 | const QStringList&, | 393 | const QStringList&, |
394 | const QStringList&, | 394 | const QStringList&, |
395 | const QStringList& ) | 395 | const QStringList& ) |
396 | { | 396 | { |
397 | // this method is a conevnient way to reduce the number of parameters I have to pass | 397 | // this method is a conevnient way to reduce the number of parameters I have to pass |
398 | emit receivedNameEmailUidListEvent(uid, nameList, emailList, uidList); | 398 | emit receivedNameEmailUidListEvent(uid, nameList, emailList, uidList); |
399 | } | 399 | } |
400 | 400 | ||
401 | 401 | ||
402 | void ExternalAppHandler::loadConfig() | 402 | void ExternalAppHandler::loadConfig() |
403 | { | 403 | { |
404 | 404 | ||
405 | mDefaultItems.clear(); | 405 | mDefaultItems.clear(); |
406 | mEmailAppAvailable = UNDEFINED; | 406 | mEmailAppAvailable = UNDEFINED; |
407 | mPhoneAppAvailable = UNDEFINED; | 407 | mPhoneAppAvailable = UNDEFINED; |
408 | mFaxAppAvailable = UNDEFINED; | 408 | mFaxAppAvailable = UNDEFINED; |
409 | mSMSAppAvailable = UNDEFINED; | 409 | mSMSAppAvailable = UNDEFINED; |
410 | mPagerAppAvailable = UNDEFINED; | 410 | mPagerAppAvailable = UNDEFINED; |
411 | mSIPAppAvailable = UNDEFINED; | 411 | mSIPAppAvailable = UNDEFINED; |
412 | 412 | ||
413 | QString opiepath = QString::fromLatin1( getenv("OPIEDIR") ); | 413 | QString opiepath = QString::fromLatin1( getenv("OPIEDIR") ); |
414 | QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") ); | 414 | QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") ); |
415 | QString qtpath = QString::fromLatin1( getenv("QTDIR") ); | 415 | QString qtpath = QString::fromLatin1( getenv("QTDIR") ); |
416 | 416 | ||
417 | //if qtopiapath is not set, fallback to qt | 417 | //if qtopiapath is not set, fallback to qt |
418 | if (qtopiapath.isEmpty()) | 418 | if (qtopiapath.isEmpty()) |
419 | qtopiapath = qtpath; | 419 | qtopiapath = qtpath; |
420 | 420 | ||
421 | //if opiepath is not set, fallback to qtopia | 421 | //if opiepath is not set, fallback to qtopia |
422 | if (opiepath.isEmpty()) | 422 | if (opiepath.isEmpty()) |
423 | opiepath = qtopiapath; | 423 | opiepath = qtopiapath; |
424 | 424 | ||
425 | 425 | ||
426 | 426 | ||
427 | //mailclients | 427 | //mailclients |
428 | QString mailmsg1 = "writeMail(QString,QString)"; | 428 | QString mailmsg1 = "writeMail(QString,QString)"; |
429 | QString mailmsg2 = "writeMail(QMap(QString,QString))"; | 429 | QString mailmsg2 = "writeMail(QMap(QString,QString))"; |
430 | 430 | ||
431 | QString undefined = ""; | 431 | QString undefined = ""; |
432 | 432 | ||
433 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::NONE_EMC, "No email client installed", undefined, undefined, undefined, undefined, undefined); | 433 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::NONE_EMC, "No email client installed", undefined, undefined, undefined, undefined, undefined); |
434 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OTHER_EMC, "Userdefined email client", undefined, undefined, undefined, undefined, undefined); | 434 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OTHER_EMC, "Userdefined email client", undefined, undefined, undefined, undefined, undefined); |
435 | 435 | ||
436 | if (( QFile::exists( qtopiapath + "/bin/ompi" )) || | 436 | if (( QFile::exists( qtopiapath + "/bin/ompi" )) || |
437 | ( QFile::exists( opiepath + "/bin/ompi" )) || | 437 | ( QFile::exists( opiepath + "/bin/ompi" )) || |
438 | ( QFile::exists( qtpath + "/bin/ompi" ))) | 438 | ( QFile::exists( qtpath + "/bin/ompi" ))) |
439 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OMPI_EMC, "OM/Pi email client", "QPE/Application/ompi", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); | 439 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OMPI_EMC, "OM/Pi email client", "QPE/Application/ompi", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); |
440 | 440 | ||
441 | if (( QFile::exists( qtopiapath + "/bin/qtmail" )) || | 441 | if (( QFile::exists( qtopiapath + "/bin/qtmail" )) || |
442 | ( QFile::exists( qtpath + "/bin/qtmail" ))) | 442 | ( QFile::exists( qtpath + "/bin/qtmail" ))) |
443 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::QTOPIA_EMC, "Qtopia email client", "QPE/Application/qtmail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); | 443 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::QTOPIA_EMC, "Qtopia email client", "QPE/Application/qtmail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); |
444 | 444 | ||
445 | if ( QFile::exists( opiepath + "/bin/opiemail" )) | 445 | if ( QFile::exists( opiepath + "/bin/opiemail" )) |
446 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_EMC, "Opie email client", "QPE/Application/opiemail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); | 446 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_EMC, "Opie email client", "QPE/Application/opiemail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); |
447 | 447 | ||
448 | if ( QFile::exists( opiepath + "/bin/mailit" )) | 448 | if ( QFile::exists( opiepath + "/bin/mailit" )) |
449 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_MAILIT_EMC, "Opie mailit email client", "QPE/Application/mailit", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); | 449 | addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_MAILIT_EMC, "Opie mailit email client", "QPE/Application/mailit", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); |
450 | 450 | ||
451 | 451 | ||
452 | 452 | ||
453 | //phoneclients | 453 | //phoneclients |
454 | 454 | ||
455 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::NONE_PHC, "No phone client installed", undefined, undefined, undefined, undefined, undefined); | 455 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::NONE_PHC, "No phone client installed", undefined, undefined, undefined, undefined, undefined); |
456 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::OTHER_PHC, "Other phone client", undefined, undefined, undefined, undefined, undefined); | 456 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::OTHER_PHC, "Other phone client", undefined, undefined, undefined, undefined, undefined); |
457 | if (( QFile::exists( qtopiapath + "/bin/kppi" )) || | 457 | if (( QFile::exists( qtopiapath + "/bin/kppi" )) || |
458 | ( QFile::exists( opiepath + "/bin/kppi" ))) | 458 | ( QFile::exists( opiepath + "/bin/kppi" ))) |
459 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::KPPI_PHC, "KP/Pi phone client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined); | 459 | addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::KPPI_PHC, "KP/Pi phone client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined); |
460 | 460 | ||
461 | //faxclients | 461 | //faxclients |
462 | addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::NONE_FAC, "No fax client installed", undefined, undefined, undefined, undefined, undefined); | 462 | addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::NONE_FAC, "No fax client installed", undefined, undefined, undefined, undefined, undefined); |
463 | addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::OTHER_FAC, "Other fax client", undefined, undefined, undefined, undefined, undefined); | 463 | addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::OTHER_FAC, "Other fax client", undefined, undefined, undefined, undefined, undefined); |
464 | 464 | ||
465 | //smsclients | 465 | //smsclients |
466 | addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::NONE_SMC, "No sms client installed", undefined, undefined, undefined, undefined, undefined); | 466 | addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::NONE_SMC, "No sms client installed", undefined, undefined, undefined, undefined, undefined); |
467 | addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::OTHER_SMC, "Other sms client", undefined, undefined, undefined, undefined, undefined); | 467 | addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::OTHER_SMC, "Other sms client", undefined, undefined, undefined, undefined, undefined); |
468 | 468 | ||
469 | //pagerclients | 469 | //pagerclients |
470 | addDefaultAppItem(ExternalAppHandler::PAGER, KPimGlobalPrefs::NONE_PAC, "No pager client installed", undefined, undefined, undefined, undefined, undefined); | 470 | addDefaultAppItem(ExternalAppHandler::PAGER, KPimGlobalPrefs::NONE_PAC, "No pager client installed", undefined, undefined, undefined, undefined, undefined); |
471 | addDefaultAppItem(ExternalAppHandler::PAGER, KPimGlobalPrefs::OTHER_PAC, "Other pager client", undefined, undefined, undefined, undefined, undefined); | 471 | addDefaultAppItem(ExternalAppHandler::PAGER, KPimGlobalPrefs::OTHER_PAC, "Other pager client", undefined, undefined, undefined, undefined, undefined); |
472 | 472 | ||
473 | //sipclients | 473 | //sipclients |
474 | addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::NONE_SIC, "No SIP client installed", undefined, undefined, undefined, undefined, undefined); | 474 | addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::NONE_SIC, "No SIP client installed", undefined, undefined, undefined, undefined, undefined); |
475 | addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::OTHER_SIC, "Other SIP client", undefined, undefined, undefined, undefined, undefined); | 475 | addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::OTHER_SIC, "Other SIP client", undefined, undefined, undefined, undefined, undefined); |
476 | if (( QFile::exists( qtopiapath + "/bin/kppi" )) || | 476 | if (( QFile::exists( qtopiapath + "/bin/kppi" )) || |
477 | ( QFile::exists( opiepath + "/bin/kppi" ))) | 477 | ( QFile::exists( opiepath + "/bin/kppi" ))) |
478 | addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::KPPI_SIC, "KP/Pi SIP client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined); | 478 | addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::KPPI_SIC, "KP/Pi SIP client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined); |
479 | 479 | ||
480 | } | 480 | } |
481 | 481 | ||
482 | ExternalAppHandler *ExternalAppHandler::instance() | 482 | ExternalAppHandler *ExternalAppHandler::instance() |
483 | { | 483 | { |
484 | if ( !sInstance ) { | 484 | if ( !sInstance ) { |
485 | sInstance = staticDeleter.setObject( new ExternalAppHandler() ); | 485 | sInstance = staticDeleter.setObject( new ExternalAppHandler() ); |
486 | sInstance->loadConfig(); | 486 | sInstance->loadConfig(); |
487 | } | 487 | } |
488 | 488 | ||
489 | return sInstance; | 489 | return sInstance; |
490 | } | 490 | } |
491 | 491 | ||
492 | void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameter, const QString& message2, const QString& parameter2) | 492 | void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameter, const QString& message2, const QString& parameter2) |
493 | { | 493 | { |
494 | DefaultAppItem* dai = new DefaultAppItem(type, id, label, channel, message, parameter, message2, parameter2); | 494 | DefaultAppItem* dai = new DefaultAppItem(type, id, label, channel, message, parameter, message2, parameter2); |
495 | // qDebug("%d %d %s %s ", type, id, label.latin1(), channel.latin1() ); | 495 | // qDebug("%d %d %s %s ", type, id, label.latin1(), channel.latin1() ); |
496 | mDefaultItems.append(dai); | 496 | mDefaultItems.append(dai); |
497 | } | 497 | } |
498 | 498 | ||
499 | 499 | ||
500 | QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type) | 500 | QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type) |
501 | { | 501 | { |
502 | QList<DefaultAppItem> list; | 502 | QList<DefaultAppItem> list; |
503 | 503 | ||
504 | DefaultAppItem* dai; | 504 | DefaultAppItem* dai; |
505 | 505 | ||
506 | for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() ) | 506 | for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() ) |
507 | { | 507 | { |
508 | if (dai->_type == type) | 508 | if (dai->_type == type) |
509 | list.append(dai); | 509 | list.append(dai); |
510 | } | 510 | } |
511 | 511 | ||
512 | return list; | 512 | return list; |
513 | } | 513 | } |
514 | 514 | ||
515 | DefaultAppItem* ExternalAppHandler::getDefaultItem(Types type, int clientid) | 515 | DefaultAppItem* ExternalAppHandler::getDefaultItem(Types type, int clientid) |
516 | { | 516 | { |
517 | DefaultAppItem* dai; | 517 | DefaultAppItem* dai; |
518 | 518 | ||
519 | for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() ) | 519 | for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() ) |
520 | { | 520 | { |
521 | if (dai->_type == type && dai->_id == clientid) | 521 | if (dai->_type == type && dai->_id == clientid) |
522 | return dai; | 522 | return dai; |
523 | } | 523 | } |
524 | 524 | ||
525 | return 0; | 525 | return 0; |
526 | } | 526 | } |
527 | 527 | ||
528 | bool ExternalAppHandler::isEmailAppAvailable() | 528 | bool ExternalAppHandler::isEmailAppAvailable() |
529 | { | 529 | { |
530 | #ifndef DESKTOP_VERSION | 530 | #ifndef DESKTOP_VERSION |
531 | if (mEmailAppAvailable == UNDEFINED) | 531 | if (mEmailAppAvailable == UNDEFINED) |
532 | { | 532 | { |
533 | int client = KPimGlobalPrefs::instance()->mEmailClient; | 533 | int client = KPimGlobalPrefs::instance()->mEmailClient; |
534 | if (client == KPimGlobalPrefs::NONE_EMC) | 534 | if (client == KPimGlobalPrefs::NONE_EMC) |
535 | mEmailAppAvailable = UNAVAILABLE; | 535 | mEmailAppAvailable = UNAVAILABLE; |
536 | else | 536 | else |
537 | mEmailAppAvailable = AVAILABLE; | 537 | mEmailAppAvailable = AVAILABLE; |
538 | } | 538 | } |
539 | return (mEmailAppAvailable == AVAILABLE); | 539 | return (mEmailAppAvailable == AVAILABLE); |
540 | 540 | ||
541 | #else //DESKTOP_VERSION | 541 | #else //DESKTOP_VERSION |
542 | return false; | 542 | return false; |
543 | #endif //DESKTOP_VERSION | 543 | #endif //DESKTOP_VERSION |
544 | } | 544 | } |
545 | 545 | ||
546 | bool ExternalAppHandler::isSMSAppAvailable() | 546 | bool ExternalAppHandler::isSMSAppAvailable() |
547 | { | 547 | { |
548 | #ifndef DESKTOP_VERSION | 548 | #ifndef DESKTOP_VERSION |
549 | if (mSMSAppAvailable == UNDEFINED) | 549 | if (mSMSAppAvailable == UNDEFINED) |
550 | { | 550 | { |
551 | int client = KPimGlobalPrefs::instance()->mSMSClient; | 551 | int client = KPimGlobalPrefs::instance()->mSMSClient; |
552 | if (client == KPimGlobalPrefs::NONE_SMC) | 552 | if (client == KPimGlobalPrefs::NONE_SMC) |
553 | mSMSAppAvailable = UNAVAILABLE; | 553 | mSMSAppAvailable = UNAVAILABLE; |
554 | else | 554 | else |
555 | mSMSAppAvailable = AVAILABLE; | 555 | mSMSAppAvailable = AVAILABLE; |
556 | } | 556 | } |
557 | 557 | ||
558 | return (mSMSAppAvailable == AVAILABLE); | 558 | return (mSMSAppAvailable == AVAILABLE); |
559 | #else //DESKTOP_VERSION | 559 | #else //DESKTOP_VERSION |
560 | return false; | 560 | return false; |
561 | #endif //DESKTOP_VERSION | 561 | #endif //DESKTOP_VERSION |
562 | } | 562 | } |
563 | 563 | ||
564 | bool ExternalAppHandler::isPhoneAppAvailable() | 564 | bool ExternalAppHandler::isPhoneAppAvailable() |
565 | { | 565 | { |
566 | #ifndef DESKTOP_VERSION | 566 | #ifndef DESKTOP_VERSION |
567 | if (mPhoneAppAvailable == UNDEFINED) | 567 | if (mPhoneAppAvailable == UNDEFINED) |
568 | { | 568 | { |
569 | int client = KPimGlobalPrefs::instance()->mPhoneClient; | 569 | int client = KPimGlobalPrefs::instance()->mPhoneClient; |
570 | if (client == KPimGlobalPrefs::NONE_PHC) | 570 | if (client == KPimGlobalPrefs::NONE_PHC) |
571 | mPhoneAppAvailable = UNAVAILABLE; | 571 | mPhoneAppAvailable = UNAVAILABLE; |
572 | else | 572 | else |
573 | mPhoneAppAvailable = AVAILABLE; | 573 | mPhoneAppAvailable = AVAILABLE; |
574 | } | 574 | } |
575 | 575 | ||
576 | return (mPhoneAppAvailable == AVAILABLE); | 576 | return (mPhoneAppAvailable == AVAILABLE); |
577 | #else //DESKTOP_VERSION | 577 | #else //DESKTOP_VERSION |
578 | return false; | 578 | return false; |
579 | #endif //DESKTOP_VERSION | 579 | #endif //DESKTOP_VERSION |
580 | } | 580 | } |
581 | 581 | ||
582 | bool ExternalAppHandler::isFaxAppAvailable() | 582 | bool ExternalAppHandler::isFaxAppAvailable() |
583 | { | 583 | { |
584 | #ifndef DESKTOP_VERSION | 584 | #ifndef DESKTOP_VERSION |
585 | if (mFaxAppAvailable == UNDEFINED) | 585 | if (mFaxAppAvailable == UNDEFINED) |
586 | { | 586 | { |
587 | int client = KPimGlobalPrefs::instance()->mFaxClient; | 587 | int client = KPimGlobalPrefs::instance()->mFaxClient; |
588 | if (client == KPimGlobalPrefs::NONE_FAC) | 588 | if (client == KPimGlobalPrefs::NONE_FAC) |
589 | mFaxAppAvailable = UNAVAILABLE; | 589 | mFaxAppAvailable = UNAVAILABLE; |
590 | else | 590 | else |
591 | mFaxAppAvailable = AVAILABLE; | 591 | mFaxAppAvailable = AVAILABLE; |
592 | } | 592 | } |
593 | 593 | ||
594 | return (mFaxAppAvailable == AVAILABLE); | 594 | return (mFaxAppAvailable == AVAILABLE); |
595 | #else //DESKTOP_VERSION | 595 | #else //DESKTOP_VERSION |
596 | return false; | 596 | return false; |
597 | #endif //DESKTOP_VERSION | 597 | #endif //DESKTOP_VERSION |
598 | } | 598 | } |
599 | 599 | ||
600 | bool ExternalAppHandler::isPagerAppAvailable() | 600 | bool ExternalAppHandler::isPagerAppAvailable() |
601 | { | 601 | { |
602 | #ifndef DESKTOP_VERSION | 602 | #ifndef DESKTOP_VERSION |
603 | if (mPagerAppAvailable == UNDEFINED) | 603 | if (mPagerAppAvailable == UNDEFINED) |
604 | { | 604 | { |
605 | int client = KPimGlobalPrefs::instance()->mPagerClient; | 605 | int client = KPimGlobalPrefs::instance()->mPagerClient; |
606 | if (client == KPimGlobalPrefs::NONE_PAC) | 606 | if (client == KPimGlobalPrefs::NONE_PAC) |
607 | mPagerAppAvailable = UNAVAILABLE; | 607 | mPagerAppAvailable = UNAVAILABLE; |
608 | else | 608 | else |
609 | mPagerAppAvailable = AVAILABLE; | 609 | mPagerAppAvailable = AVAILABLE; |
610 | } | 610 | } |
611 | 611 | ||
612 | return (mPagerAppAvailable == AVAILABLE); | 612 | return (mPagerAppAvailable == AVAILABLE); |
613 | #else //DESKTOP_VERSION | 613 | #else //DESKTOP_VERSION |
614 | return false; | 614 | return false; |
615 | #endif //DESKTOP_VERSION | 615 | #endif //DESKTOP_VERSION |
616 | } | 616 | } |
617 | 617 | ||
618 | 618 | ||
619 | bool ExternalAppHandler::isSIPAppAvailable() | 619 | bool ExternalAppHandler::isSIPAppAvailable() |
620 | { | 620 | { |
621 | #ifndef DESKTOP_VERSION | 621 | #ifndef DESKTOP_VERSION |
622 | if (mSIPAppAvailable == UNDEFINED) | 622 | if (mSIPAppAvailable == UNDEFINED) |
623 | { | 623 | { |
624 | int client = KPimGlobalPrefs::instance()->mSipClient; | 624 | int client = KPimGlobalPrefs::instance()->mSipClient; |
625 | if (client == KPimGlobalPrefs::NONE_SIC) | 625 | if (client == KPimGlobalPrefs::NONE_SIC) |
626 | mSIPAppAvailable = UNAVAILABLE; | 626 | mSIPAppAvailable = UNAVAILABLE; |
627 | else | 627 | else |
628 | mSIPAppAvailable = AVAILABLE; | 628 | mSIPAppAvailable = AVAILABLE; |
629 | } | 629 | } |
630 | 630 | ||
631 | return (mSIPAppAvailable == AVAILABLE); | 631 | return (mSIPAppAvailable == AVAILABLE); |
632 | #else //DESKTOP_VERSION | 632 | #else //DESKTOP_VERSION |
633 | return false; | 633 | return false; |
634 | #endif //DESKTOP_VERSION | 634 | #endif //DESKTOP_VERSION |
635 | } | 635 | } |
636 | 636 | ||
637 | /************************************************************************** | 637 | /************************************************************************** |
638 | * | 638 | * |
639 | **************************************************************************/ | 639 | **************************************************************************/ |
640 | 640 | ||
641 | 641 | ||
642 | //calls the emailapplication with a number of attachments that need to be send (Seperated by Comma) | 642 | //calls the emailapplication with a number of attachments that need to be send (Seperated by Comma) |
643 | bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QString& urls ) | 643 | bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QString& urls ) |
644 | { | 644 | { |
645 | 645 | ||
646 | #ifndef DESKTOP_VERSION | 646 | #ifndef DESKTOP_VERSION |
647 | QString channel; | 647 | QString channel; |
648 | QString message2; | 648 | QString message2; |
649 | QString parameters2; | 649 | QString parameters2; |
650 | 650 | ||
651 | 651 | ||
652 | int client = KPimGlobalPrefs::instance()->mEmailClient; | 652 | int client = KPimGlobalPrefs::instance()->mEmailClient; |
653 | if (client == KPimGlobalPrefs::OTHER_EMC) | 653 | if (client == KPimGlobalPrefs::OTHER_EMC) |
654 | { | 654 | { |
655 | channel = KPimGlobalPrefs::instance()->mEmailOtherChannel; | 655 | channel = KPimGlobalPrefs::instance()->mEmailOtherChannel; |
656 | message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage; | 656 | message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage; |
657 | parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; | 657 | parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; |
658 | } | 658 | } |
659 | else | 659 | else |
660 | { | 660 | { |
661 | DefaultAppItem* dai = getDefaultItem(EMAIL, client); | 661 | DefaultAppItem* dai = getDefaultItem(EMAIL, client); |
662 | if (!dai) | 662 | if (!dai) |
663 | { | 663 | { |
664 | qDebug("could not find configured email application."); | 664 | qDebug("could not find configured email application."); |
665 | return false; | 665 | return false; |
666 | } | 666 | } |
667 | channel = dai->_channel; | 667 | channel = dai->_channel; |
668 | message2 = dai->_message2; | 668 | message2 = dai->_message2; |
669 | parameters2 = dai->_parameters2; | 669 | parameters2 = dai->_parameters2; |
670 | } | 670 | } |
671 | 671 | ||
672 | //first check if one of the mailers need the emails right in the message. | 672 | //first check if one of the mailers need the emails right in the message. |
673 | message2 = translateMessage(message2, emails, urls); | 673 | message2 = translateMessage(message2, emails, urls); |
674 | 674 | ||
675 | 675 | ||
676 | #ifdef DEBUG_EXT_APP_HANDLER | 676 | #ifdef DEBUG_EXT_APP_HANDLER |
677 | qDebug("4Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1()); | 677 | qDebug("4Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1()); |
678 | qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1()); | 678 | qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1()); |
679 | #endif | 679 | #endif |
680 | 680 | ||
681 | 681 | ||
682 | QCopEnvelope e(channel.latin1(), message2.latin1()); | 682 | QCopEnvelope e(channel.latin1(), message2.latin1()); |
683 | //US we need no names in the To field. The emailadresses are enough | 683 | //US we need no names in the To field. The emailadresses are enough |
684 | 684 | ||
685 | passParameters(&e, parameters2, emails, urls); | 685 | passParameters(&e, parameters2, emails, urls); |
686 | 686 | ||
687 | 687 | ||
688 | 688 | ||
689 | #else | 689 | #else |
690 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); | 690 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); |
691 | #endif | 691 | #endif |
692 | 692 | ||
693 | return true; | 693 | return true; |
694 | } | 694 | } |
695 | 695 | ||
696 | /************************************************************************** | 696 | /************************************************************************** |
697 | * | 697 | * |
698 | **************************************************************************/ | 698 | **************************************************************************/ |
699 | 699 | ||
700 | 700 | ||
701 | //calls the emailapplication and creates a mail with parameter emails as recipients | 701 | //calls the emailapplication and creates a mail with parameter emails as recipients |
702 | bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& emailadress ) | 702 | bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& emailadress ) |
703 | { | 703 | { |
704 | #ifndef DESKTOP_VERSION | 704 | #ifndef DESKTOP_VERSION |
705 | QString channel; | 705 | QString channel; |
706 | QString message; | 706 | QString message; |
707 | QString parameters; | 707 | QString parameters; |
708 | 708 | ||
709 | 709 | ||
710 | int client = KPimGlobalPrefs::instance()->mEmailClient; | 710 | int client = KPimGlobalPrefs::instance()->mEmailClient; |
711 | if (client == KPimGlobalPrefs::OTHER_EMC) | 711 | if (client == KPimGlobalPrefs::OTHER_EMC) |
712 | { | 712 | { |
713 | channel = KPimGlobalPrefs::instance()->mEmailOtherChannel; | 713 | channel = KPimGlobalPrefs::instance()->mEmailOtherChannel; |
714 | message = KPimGlobalPrefs::instance()->mEmailOtherMessage; | 714 | message = KPimGlobalPrefs::instance()->mEmailOtherMessage; |
715 | parameters = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; | 715 | parameters = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; |
716 | } | 716 | } |
717 | else | 717 | else |
718 | { | 718 | { |
719 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(EMAIL, client); | 719 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(EMAIL, client); |
720 | if (!dai) | 720 | if (!dai) |
721 | { | 721 | { |
722 | qDebug("could not find configured email application."); | 722 | qDebug("could not find configured email application."); |
723 | return false; | 723 | return false; |
724 | } | 724 | } |
725 | channel = dai->_channel; | 725 | channel = dai->_channel; |
726 | message = dai->_message; | 726 | message = dai->_message; |
727 | parameters = dai->_parameters; | 727 | parameters = dai->_parameters; |
728 | } | 728 | } |
729 | 729 | ||
730 | 730 | ||
731 | //first check if one of the mailers need the emails right in the message. | 731 | //first check if one of the mailers need the emails right in the message. |
732 | message = translateMessage(message, name, emailadress); | 732 | message = translateMessage(message, name, emailadress); |
733 | 733 | ||
734 | 734 | ||
735 | #ifdef DEBUG_EXT_APP_HANDLER | 735 | #ifdef DEBUG_EXT_APP_HANDLER |
736 | qDebug("5Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 736 | qDebug("5Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
737 | qDebug("passing name(%s), emailadresses(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1()); | 737 | qDebug("passing name(%s), emailadresses(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1()); |
738 | #endif | 738 | #endif |
739 | 739 | ||
740 | QCopEnvelope e(channel.latin1(), message.latin1()); | 740 | QCopEnvelope e(channel.latin1(), message.latin1()); |
741 | //US we need no names in the To field. The emailadresses are enough | 741 | //US we need no names in the To field. The emailadresses are enough |
742 | 742 | ||
743 | passParameters(&e, parameters, name, emailadress); | 743 | passParameters(&e, parameters, name, emailadress); |
744 | 744 | ||
745 | 745 | ||
746 | #else | 746 | #else |
747 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); | 747 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); |
748 | #endif | 748 | #endif |
749 | 749 | ||
750 | 750 | ||
751 | return true; | 751 | return true; |
752 | } | 752 | } |
753 | 753 | ||
754 | /************************************************************************** | 754 | /************************************************************************** |
755 | * | 755 | * |
756 | **************************************************************************/ | 756 | **************************************************************************/ |
757 | 757 | ||
758 | //calls the emailapplication and creates a mail with parameter as recipients | 758 | //calls the emailapplication and creates a mail with parameter as recipients |
759 | // parameters format is | 759 | // parameters format is |
760 | // NAME <EMAIL>:SUBJECT | 760 | // NAME <EMAIL>:SUBJECT |
761 | bool ExternalAppHandler::mailToOneContact( const QString& adressline ) | 761 | bool ExternalAppHandler::mailToOneContact( const QString& adressline ) |
762 | { | 762 | { |
763 | QString line = adressline; | 763 | QString line = adressline; |
764 | 764 | ||
765 | int first = line.find( "<"); | 765 | int first = line.find( "<"); |
766 | int last = line.find( ">"); | 766 | int last = line.find( ">"); |
767 | QString name = line.left(first); | 767 | QString name = line.left(first); |
768 | QString emailadress = line.mid(first+1, last-first-1); | 768 | QString emailadress = line.mid(first+1, last-first-1); |
769 | 769 | ||
770 | //Subject can not be handled right now. | 770 | //Subject can not be handled right now. |
771 | return mailToOneContact( name, emailadress ); | 771 | return mailToOneContact( name, emailadress ); |
772 | 772 | ||
773 | } | 773 | } |
774 | 774 | ||
775 | 775 | ||
776 | /************************************************************************** | 776 | /************************************************************************** |
777 | * | 777 | * |
778 | **************************************************************************/ | 778 | **************************************************************************/ |
779 | 779 | ||
780 | //calls the phoneapplication with the number | 780 | //calls the phoneapplication with the number |
781 | bool ExternalAppHandler::callByPhone( const QString& phonenumber ) | 781 | bool ExternalAppHandler::callByPhone( const QString& phonenumber ) |
782 | { | 782 | { |
783 | #ifndef DESKTOP_VERSION | 783 | #ifndef DESKTOP_VERSION |
784 | QString channel; | 784 | QString channel; |
785 | QString message; | 785 | QString message; |
786 | QString parameters; | 786 | QString parameters; |
787 | 787 | ||
788 | 788 | ||
789 | int client = KPimGlobalPrefs::instance()->mPhoneClient; | 789 | int client = KPimGlobalPrefs::instance()->mPhoneClient; |
790 | if (client == KPimGlobalPrefs::OTHER_PHC) | 790 | if (client == KPimGlobalPrefs::OTHER_PHC) |
791 | { | 791 | { |
792 | channel = KPimGlobalPrefs::instance()->mPhoneOtherChannel; | 792 | channel = KPimGlobalPrefs::instance()->mPhoneOtherChannel; |
793 | message = KPimGlobalPrefs::instance()->mPhoneOtherMessage; | 793 | message = KPimGlobalPrefs::instance()->mPhoneOtherMessage; |
794 | parameters = KPimGlobalPrefs::instance()->mPhoneOtherMessageParameters; | 794 | parameters = KPimGlobalPrefs::instance()->mPhoneOtherMessageParameters; |
795 | } | 795 | } |
796 | else | 796 | else |
797 | { | 797 | { |
798 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PHONE, client); | 798 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PHONE, client); |
799 | if (!dai) | 799 | if (!dai) |
800 | { | 800 | { |
801 | qDebug("could not find configured phone application."); | 801 | qDebug("could not find configured phone application."); |
802 | return false; | 802 | return false; |
803 | } | 803 | } |
804 | channel = dai->_channel; | 804 | channel = dai->_channel; |
805 | message = dai->_message; | 805 | message = dai->_message; |
806 | parameters = dai->_parameters; | 806 | parameters = dai->_parameters; |
807 | } | 807 | } |
808 | 808 | ||
809 | 809 | ||
810 | //first check if one of the mailers need the emails right in the message. | 810 | //first check if one of the mailers need the emails right in the message. |
811 | message = translateMessage(message, phonenumber, ""); | 811 | message = translateMessage(message, phonenumber, ""); |
812 | 812 | ||
813 | 813 | ||
814 | #ifdef DEBUG_EXT_APP_HANDLER | 814 | #ifdef DEBUG_EXT_APP_HANDLER |
815 | qDebug("6Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 815 | qDebug("6Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
816 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); | 816 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); |
817 | #endif | 817 | #endif |
818 | 818 | ||
819 | QCopEnvelope e(channel.latin1(), message.latin1()); | 819 | QCopEnvelope e(channel.latin1(), message.latin1()); |
820 | //US we need no names in the To field. The emailadresses are enough | 820 | //US we need no names in the To field. The emailadresses are enough |
821 | 821 | ||
822 | passParameters(&e, parameters, phonenumber, ""); | 822 | passParameters(&e, parameters, phonenumber, ""); |
823 | 823 | ||
824 | 824 | ||
825 | #else | 825 | #else |
826 | KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) ); | 826 | KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) ); |
827 | #endif | 827 | #endif |
828 | 828 | ||
829 | 829 | ||
830 | return true; | 830 | return true; |
831 | } | 831 | } |
832 | 832 | ||
833 | /************************************************************************** | 833 | /************************************************************************** |
834 | * | 834 | * |
835 | **************************************************************************/ | 835 | **************************************************************************/ |
836 | 836 | ||
837 | //calls the smsapplication with the number | 837 | //calls the smsapplication with the number |
838 | bool ExternalAppHandler::callBySMS( const QString& phonenumber ) | 838 | bool ExternalAppHandler::callBySMS( const QString& phonenumber ) |
839 | { | 839 | { |
840 | #ifndef DESKTOP_VERSION | 840 | #ifndef DESKTOP_VERSION |
841 | QString channel; | 841 | QString channel; |
842 | QString message; | 842 | QString message; |
843 | QString parameters; | 843 | QString parameters; |
844 | 844 | ||
845 | 845 | ||
846 | int client = KPimGlobalPrefs::instance()->mSMSClient; | 846 | int client = KPimGlobalPrefs::instance()->mSMSClient; |
847 | if (client == KPimGlobalPrefs::OTHER_SMC) | 847 | if (client == KPimGlobalPrefs::OTHER_SMC) |
848 | { | 848 | { |
849 | channel = KPimGlobalPrefs::instance()->mSMSOtherChannel; | 849 | channel = KPimGlobalPrefs::instance()->mSMSOtherChannel; |
850 | message = KPimGlobalPrefs::instance()->mSMSOtherMessage; | 850 | message = KPimGlobalPrefs::instance()->mSMSOtherMessage; |
851 | parameters = KPimGlobalPrefs::instance()->mSMSOtherMessageParameters; | 851 | parameters = KPimGlobalPrefs::instance()->mSMSOtherMessageParameters; |
852 | } | 852 | } |
853 | else | 853 | else |
854 | { | 854 | { |
855 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SMS, client); | 855 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SMS, client); |
856 | if (!dai) | 856 | if (!dai) |
857 | { | 857 | { |
858 | qDebug("could not find configured sms application."); | 858 | qDebug("could not find configured sms application."); |
859 | return false; | 859 | return false; |
860 | } | 860 | } |
861 | channel = dai->_channel; | 861 | channel = dai->_channel; |
862 | message = dai->_message; | 862 | message = dai->_message; |
863 | parameters = dai->_parameters; | 863 | parameters = dai->_parameters; |
864 | } | 864 | } |
865 | 865 | ||
866 | 866 | ||
867 | //first check if one of the mailers need the emails right in the message. | 867 | //first check if one of the mailers need the emails right in the message. |
868 | message = translateMessage(message, phonenumber, ""); | 868 | message = translateMessage(message, phonenumber, ""); |
869 | 869 | ||
870 | 870 | ||
871 | #ifdef DEBUG_EXT_APP_HANDLER | 871 | #ifdef DEBUG_EXT_APP_HANDLER |
872 | qDebug("7Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 872 | qDebug("7Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
873 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); | 873 | qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); |
874 | #endif | 874 | #endif |
875 | 875 | ||
876 | QCopEnvelope e(channel.latin1(), message.latin1()); | 876 | QCopEnvelope e(channel.latin1(), message.latin1()); |
877 | //US we need no names in the To field. The emailadresses are enough | 877 | //US we need no names in the To field. The emailadresses are enough |
878 | 878 | ||
879 | passParameters(&e, parameters, phonenumber, ""); | 879 | passParameters(&e, parameters, phonenumber, ""); |
880 | 880 | ||
881 | 881 | ||
882 | #else | 882 | #else |
883 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) ); | 883 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) ); |
884 | #endif | 884 | #endif |
885 | 885 | ||
886 | 886 | ||
887 | return true; | 887 | return true; |
888 | } | 888 | } |
889 | 889 | ||
890 | /************************************************************************** | 890 | /************************************************************************** |
891 | * | 891 | * |
892 | **************************************************************************/ | 892 | **************************************************************************/ |
893 | 893 | ||
894 | //calls the pagerapplication with the number | 894 | //calls the pagerapplication with the number |
895 | bool ExternalAppHandler::callByPager( const QString& pagernumber ) | 895 | bool ExternalAppHandler::callByPager( const QString& pagernumber ) |
896 | { | 896 | { |
897 | #ifndef DESKTOP_VERSION | 897 | #ifndef DESKTOP_VERSION |
898 | QString channel; | 898 | QString channel; |
899 | QString message; | 899 | QString message; |
900 | QString parameters; | 900 | QString parameters; |
901 | 901 | ||
902 | 902 | ||
903 | int client = KPimGlobalPrefs::instance()->mPagerClient; | 903 | int client = KPimGlobalPrefs::instance()->mPagerClient; |
904 | if (client == KPimGlobalPrefs::OTHER_PAC) | 904 | if (client == KPimGlobalPrefs::OTHER_PAC) |
905 | { | 905 | { |
906 | channel = KPimGlobalPrefs::instance()->mPagerOtherChannel; | 906 | channel = KPimGlobalPrefs::instance()->mPagerOtherChannel; |
907 | message = KPimGlobalPrefs::instance()->mPagerOtherMessage; | 907 | message = KPimGlobalPrefs::instance()->mPagerOtherMessage; |
908 | parameters = KPimGlobalPrefs::instance()->mPagerOtherMessageParameters; | 908 | parameters = KPimGlobalPrefs::instance()->mPagerOtherMessageParameters; |
909 | } | 909 | } |
910 | else | 910 | else |
911 | { | 911 | { |
912 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PAGER, client); | 912 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PAGER, client); |
913 | if (!dai) | 913 | if (!dai) |
914 | { | 914 | { |
915 | qDebug("could not find configured pager application."); | 915 | qDebug("could not find configured pager application."); |
916 | return false; | 916 | return false; |
917 | } | 917 | } |
918 | channel = dai->_channel; | 918 | channel = dai->_channel; |
919 | message = dai->_message; | 919 | message = dai->_message; |
920 | parameters = dai->_parameters; | 920 | parameters = dai->_parameters; |
921 | } | 921 | } |
922 | 922 | ||
923 | 923 | ||
924 | //first check if one of the mailers need the emails right in the message. | 924 | //first check if one of the mailers need the emails right in the message. |
925 | message = translateMessage(message, pagernumber, ""); | 925 | message = translateMessage(message, pagernumber, ""); |
926 | 926 | ||
927 | 927 | ||
928 | #ifdef DEBUG_EXT_APP_HANDLER | 928 | #ifdef DEBUG_EXT_APP_HANDLER |
929 | qDebug("8Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 929 | qDebug("8Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
930 | qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1()); | 930 | qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1()); |
931 | #endif | 931 | #endif |
932 | 932 | ||
933 | QCopEnvelope e(channel.latin1(), message.latin1()); | 933 | QCopEnvelope e(channel.latin1(), message.latin1()); |
934 | //US we need no names in the To field. The emailadresses are enough | 934 | //US we need no names in the To field. The emailadresses are enough |
935 | 935 | ||
936 | passParameters(&e, parameters, pagernumber, ""); | 936 | passParameters(&e, parameters, pagernumber, ""); |
937 | 937 | ||
938 | 938 | ||
939 | #else | 939 | #else |
940 | KMessageBox::sorry( 0, i18n( "This version does not support paging." ) ); | 940 | KMessageBox::sorry( 0, i18n( "This version does not support paging." ) ); |
941 | #endif | 941 | #endif |
942 | 942 | ||
943 | 943 | ||
944 | return true; | 944 | return true; |
945 | } | 945 | } |
946 | 946 | ||
947 | /************************************************************************** | 947 | /************************************************************************** |
948 | * | 948 | * |
949 | **************************************************************************/ | 949 | **************************************************************************/ |
950 | 950 | ||
951 | //calls the faxapplication with the number | 951 | //calls the faxapplication with the number |
952 | bool ExternalAppHandler::callByFax( const QString& faxnumber ) | 952 | bool ExternalAppHandler::callByFax( const QString& faxnumber ) |
953 | { | 953 | { |
954 | #ifndef DESKTOP_VERSION | 954 | #ifndef DESKTOP_VERSION |
955 | QString channel; | 955 | QString channel; |
956 | QString message; | 956 | QString message; |
957 | QString parameters; | 957 | QString parameters; |
958 | 958 | ||
959 | 959 | ||
960 | int client = KPimGlobalPrefs::instance()->mFaxClient; | 960 | int client = KPimGlobalPrefs::instance()->mFaxClient; |
961 | if (client == KPimGlobalPrefs::OTHER_FAC) | 961 | if (client == KPimGlobalPrefs::OTHER_FAC) |
962 | { | 962 | { |
963 | channel = KPimGlobalPrefs::instance()->mFaxOtherChannel; | 963 | channel = KPimGlobalPrefs::instance()->mFaxOtherChannel; |
964 | message = KPimGlobalPrefs::instance()->mFaxOtherMessage; | 964 | message = KPimGlobalPrefs::instance()->mFaxOtherMessage; |
965 | parameters = KPimGlobalPrefs::instance()->mFaxOtherMessageParameters; | 965 | parameters = KPimGlobalPrefs::instance()->mFaxOtherMessageParameters; |
966 | } | 966 | } |
967 | else | 967 | else |
968 | { | 968 | { |
969 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(FAX, client); | 969 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(FAX, client); |
970 | if (!dai) | 970 | if (!dai) |
971 | { | 971 | { |
972 | qDebug("could not find configured fax application."); | 972 | qDebug("could not find configured fax application."); |
973 | return false; | 973 | return false; |
974 | } | 974 | } |
975 | channel = dai->_channel; | 975 | channel = dai->_channel; |
976 | message = dai->_message; | 976 | message = dai->_message; |
977 | parameters = dai->_parameters; | 977 | parameters = dai->_parameters; |
978 | } | 978 | } |
979 | 979 | ||
980 | 980 | ||
981 | //first check if one of the mailers need the emails right in the message. | 981 | //first check if one of the mailers need the emails right in the message. |
982 | message = translateMessage(message, faxnumber, ""); | 982 | message = translateMessage(message, faxnumber, ""); |
983 | 983 | ||
984 | 984 | ||
985 | #ifdef DEBUG_EXT_APP_HANDLER | 985 | #ifdef DEBUG_EXT_APP_HANDLER |
986 | qDebug("9Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 986 | qDebug("9Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
987 | qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1()); | 987 | qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1()); |
988 | #endif | 988 | #endif |
989 | 989 | ||
990 | QCopEnvelope e(channel.latin1(), message.latin1()); | 990 | QCopEnvelope e(channel.latin1(), message.latin1()); |
991 | //US we need no names in the To field. The emailadresses are enough | 991 | //US we need no names in the To field. The emailadresses are enough |
992 | 992 | ||
993 | passParameters(&e, parameters, faxnumber, ""); | 993 | passParameters(&e, parameters, faxnumber, ""); |
994 | 994 | ||
995 | 995 | ||
996 | #else | 996 | #else |
997 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) ); | 997 | KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) ); |
998 | #endif | 998 | #endif |
999 | 999 | ||
1000 | 1000 | ||
1001 | return true; | 1001 | return true; |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | /************************************************************************** | 1004 | /************************************************************************** |
1005 | * | 1005 | * |
1006 | **************************************************************************/ | 1006 | **************************************************************************/ |
1007 | 1007 | ||
1008 | //calls the sipapplication with the number | 1008 | //calls the sipapplication with the number |
1009 | bool ExternalAppHandler::callBySIP( const QString& sipnumber ) | 1009 | bool ExternalAppHandler::callBySIP( const QString& sipnumber ) |
1010 | { | 1010 | { |
1011 | #ifndef DESKTOP_VERSION | 1011 | #ifndef DESKTOP_VERSION |
1012 | QString channel; | 1012 | QString channel; |
1013 | QString message; | 1013 | QString message; |
1014 | QString parameters; | 1014 | QString parameters; |
1015 | 1015 | ||
1016 | 1016 | ||
1017 | int client = KPimGlobalPrefs::instance()->mSipClient; | 1017 | int client = KPimGlobalPrefs::instance()->mSipClient; |
1018 | if (client == KPimGlobalPrefs::OTHER_SIC) | 1018 | if (client == KPimGlobalPrefs::OTHER_SIC) |
1019 | { | 1019 | { |
1020 | channel = KPimGlobalPrefs::instance()->mSipOtherChannel; | 1020 | channel = KPimGlobalPrefs::instance()->mSipOtherChannel; |
1021 | message = KPimGlobalPrefs::instance()->mSipOtherMessage; | 1021 | message = KPimGlobalPrefs::instance()->mSipOtherMessage; |
1022 | parameters = KPimGlobalPrefs::instance()->mSipOtherMessageParameters; | 1022 | parameters = KPimGlobalPrefs::instance()->mSipOtherMessageParameters; |
1023 | } | 1023 | } |
1024 | else | 1024 | else |
1025 | { | 1025 | { |
1026 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SIP, client); | 1026 | DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SIP, client); |
1027 | if (!dai) | 1027 | if (!dai) |
1028 | { | 1028 | { |
1029 | qDebug("could not find configured sip application."); | 1029 | qDebug("could not find configured sip application."); |
1030 | return false; | 1030 | return false; |
1031 | } | 1031 | } |
1032 | channel = dai->_channel; | 1032 | channel = dai->_channel; |
1033 | message = dai->_message; | 1033 | message = dai->_message; |
1034 | parameters = dai->_parameters; | 1034 | parameters = dai->_parameters; |
1035 | } | 1035 | } |
1036 | 1036 | ||
1037 | 1037 | ||
1038 | //first check if one of the sip apps need the emails right in the message. | 1038 | //first check if one of the sip apps need the emails right in the message. |
1039 | message = translateMessage(message, sipnumber, ""); | 1039 | message = translateMessage(message, sipnumber, ""); |
1040 | 1040 | ||
1041 | 1041 | ||
1042 | #ifdef DEBUG_EXT_APP_HANDLER | 1042 | #ifdef DEBUG_EXT_APP_HANDLER |
1043 | qDebug("10Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); | 1043 | qDebug("10Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); |
1044 | qDebug("passing sipnumber(%s) as parameter in the form %s to QCopEnvelope", sipnumber.latin1(), parameters.latin1()); | 1044 | qDebug("passing sipnumber(%s) as parameter in the form %s to QCopEnvelope", sipnumber.latin1(), parameters.latin1()); |
1045 | #endif | 1045 | #endif |
1046 | 1046 | ||
1047 | QCopEnvelope e(channel.latin1(), message.latin1()); | 1047 | QCopEnvelope e(channel.latin1(), message.latin1()); |
1048 | //US we need no names in the To field. The emailadresses are enough | 1048 | //US we need no names in the To field. The emailadresses are enough |
1049 | 1049 | ||
1050 | passParameters(&e, parameters, sipnumber, ""); | 1050 | passParameters(&e, parameters, sipnumber, ""); |
1051 | 1051 | ||
1052 | 1052 | ||
1053 | #else | 1053 | #else |
1054 | KMessageBox::sorry( 0, i18n( "This version does not support sip." ) ); | 1054 | KMessageBox::sorry( 0, i18n( "This version does not support sip." ) ); |
1055 | #endif | 1055 | #endif |
1056 | 1056 | ||
1057 | 1057 | ||
1058 | return true; | 1058 | return true; |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | 1061 | ||
1062 | /************************************************************************** | 1062 | /************************************************************************** |
1063 | * | 1063 | * |
1064 | **************************************************************************/ | 1064 | **************************************************************************/ |
1065 | 1065 | ||
1066 | 1066 | ||
1067 | QString& ExternalAppHandler::translateMessage(QString& message, const QString& param1, const QString& param2 ) const | 1067 | QString& ExternalAppHandler::translateMessage(QString& message, const QString& param1, const QString& param2 ) const |
1068 | { | 1068 | { |
1069 | message = message.replace( QRegExp("%1"), param1 ); | 1069 | message = message.replace( QRegExp("%1"), param1 ); |
1070 | return message.replace( QRegExp("%2"), param2 ); | 1070 | return message.replace( QRegExp("%2"), param2 ); |
1071 | } | 1071 | } |
1072 | 1072 | ||
1073 | /************************************************************************** | 1073 | /************************************************************************** |
1074 | * | 1074 | * |
1075 | **************************************************************************/ | 1075 | **************************************************************************/ |
1076 | 1076 | ||
1077 | void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1 , const QString& param2) const | 1077 | void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1 , const QString& param2) const |
1078 | { | 1078 | { |
1079 | #ifndef DESKTOP_VERSION | 1079 | #ifndef DESKTOP_VERSION |
1080 | QMap<QString, QString> valmap; | 1080 | QMap<QString, QString> valmap; |
1081 | bool useValMap = false; | 1081 | bool useValMap = false; |
1082 | 1082 | ||
1083 | // first extract all parts of the parameters. | 1083 | // first extract all parts of the parameters. |
1084 | QStringList paramlist = QStringList::split(";", parameters); | 1084 | QStringList paramlist = QStringList::split(";", parameters); |
1085 | 1085 | ||
1086 | //Now check how many parts we have. | 1086 | //Now check how many parts we have. |
1087 | //=0 :no params to pass | 1087 | //=0 :no params to pass |
1088 | //>0 :parameters to pass | 1088 | //>0 :parameters to pass |
1089 | for ( QStringList::Iterator it = paramlist.begin(); it != paramlist.end(); ++it ) | 1089 | for ( QStringList::Iterator it = paramlist.begin(); it != paramlist.end(); ++it ) |
1090 | { | 1090 | { |
1091 | QString param = (*it); | 1091 | QString param = (*it); |
1092 | QStringList keyvallist = QStringList::split("=", param); | 1092 | QStringList keyvallist = QStringList::split("=", param); |
1093 | 1093 | ||
1094 | //if we have keyvalue pairs, we assume that we pass a map to the envelope | 1094 | //if we have keyvalue pairs, we assume that we pass a map to the envelope |
1095 | QStringList::Iterator it2 = keyvallist.begin(); | 1095 | QStringList::Iterator it2 = keyvallist.begin(); |
1096 | QString key = (*it2); | 1096 | QString key = (*it2); |
1097 | key = key.replace( QRegExp("%1"), param1 ); | 1097 | key = key.replace( QRegExp("%1"), param1 ); |
1098 | key = key.replace( QRegExp("%2"), param2 ); | 1098 | key = key.replace( QRegExp("%2"), param2 ); |
1099 | ++it2; | 1099 | ++it2; |
1100 | 1100 | ||
1101 | if(it2 != keyvallist.end()) | 1101 | if(it2 != keyvallist.end()) |
1102 | { | 1102 | { |
1103 | QString value = (*it2); | 1103 | QString value = (*it2); |
1104 | value = value.replace( QRegExp("%1"), param1 ); | 1104 | value = value.replace( QRegExp("%1"), param1 ); |
1105 | value = value.replace( QRegExp("%2"), param2 ); | 1105 | value = value.replace( QRegExp("%2"), param2 ); |
1106 | 1106 | ||
1107 | valmap.insert(key, value); | 1107 | valmap.insert(key, value); |
1108 | useValMap = true; | 1108 | useValMap = true; |
1109 | } | 1109 | } |
1110 | else | 1110 | else |
1111 | { | 1111 | { |
1112 | // qDebug("pass parameter << %s", key.latin1()); | 1112 | // qDebug("pass parameter << %s", key.latin1()); |
1113 | (*e) << key; | 1113 | (*e) << key; |
1114 | } | 1114 | } |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | if (useValMap == true) | 1117 | if (useValMap == true) |
1118 | (*e) << valmap; | 1118 | (*e) << valmap; |
1119 | 1119 | ||
1120 | #endif | 1120 | #endif |
1121 | 1121 | ||
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | 1124 | ||
1125 | 1125 | ||
1126 | /************************************************************************** | 1126 | /************************************************************************** |
1127 | * | 1127 | * |
1128 | **************************************************************************/ | 1128 | **************************************************************************/ |
1129 | 1129 | ||
1130 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) | 1130 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) |
1131 | { | 1131 | { |
1132 | 1132 | ||
1133 | if ( cmsg == "nextView()" ) { | 1133 | if ( cmsg == "nextView()" ) { |
1134 | qDebug("nextView()"); | 1134 | qDebug("nextView()"); |
1135 | emit nextView(); | 1135 | emit nextView(); |
1136 | return; | 1136 | return; |
1137 | } | 1137 | } |
1138 | 1138 | if ( cmsg == "callContactdialog()" ) { | |
1139 | qDebug("callContactdialog()"); | ||
1140 | emit callContactdialog(); | ||
1141 | return; | ||
1142 | } | ||
1143 | |||
1139 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); | 1144 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); |
1140 | if (!res) | 1145 | if (!res) |
1141 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); | 1146 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); |
1142 | 1147 | ||
1143 | if (!res) | 1148 | if (!res) |
1144 | res = mDisplayDetails->appMessage( cmsg, data ); | 1149 | res = mDisplayDetails->appMessage( cmsg, data ); |
1145 | 1150 | ||
1146 | // if (!res) | 1151 | // if (!res) |
1147 | // res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); | 1152 | // res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); |
1148 | } | 1153 | } |
1149 | 1154 | ||
1150 | 1155 | ||
1151 | 1156 | ||
1152 | bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) | 1157 | bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) |
1153 | { | 1158 | { |
1154 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); | 1159 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); |
1155 | // maybe we are sending to KA/Pi fom a different worldd... | 1160 | // maybe we are sending to KA/Pi fom a different worldd... |
1156 | // it may be that the QAplication::desktop()->width() values in KA/Pi are not the same as in our application | 1161 | // it may be that the QAplication::desktop()->width() values in KA/Pi are not the same as in our application |
1157 | // for that reason we send the current QApplication::desktop()->width() to KA/Pi | 1162 | // for that reason we send the current QApplication::desktop()->width() to KA/Pi |
1163 | //qDebug("UID %s ", sessionuid.latin1()); | ||
1158 | return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(QString::number ( QApplication::desktop()->width() )); | 1164 | return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(QString::number ( QApplication::desktop()->width() )); |
1165 | //return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid); | ||
1159 | } | 1166 | } |
1160 | 1167 | ||
1161 | bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) | 1168 | bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) |
1162 | { | 1169 | { |
1163 | QStringList list4, list5, list6; | 1170 | QStringList list4, list5, list6; |
1164 | 1171 | ||
1165 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); | 1172 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); |
1166 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); | 1173 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); |
1167 | } | 1174 | } |
1168 | 1175 | ||
1169 | bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) | 1176 | bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) |
1170 | { | 1177 | { |
1171 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); | 1178 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); |
1172 | return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); | 1179 | return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); |
1173 | } | 1180 | } |
1174 | 1181 | ||
1175 | bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) | 1182 | bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) |
1176 | { | 1183 | { |
1177 | QStringList list4, list5, list6; | 1184 | QStringList list4, list5, list6; |
1178 | 1185 | ||
1179 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); | 1186 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); |
1180 | return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); | 1187 | return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); |
1181 | } | 1188 | } |
1182 | 1189 | ||
1183 | bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid) | 1190 | bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid) |
1184 | { | 1191 | { |
1185 | mDisplayDetails->setSourceChannel(""); | 1192 | mDisplayDetails->setSourceChannel(""); |
1186 | return mDisplayDetails->sendMessageToTarget("", name, email, uid); | 1193 | return mDisplayDetails->sendMessageToTarget("", name, email, uid); |
1187 | } | 1194 | } |
1188 | 1195 | ||
1189 | bool ExternalAppHandler::requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid) | 1196 | bool ExternalAppHandler::requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid) |
1190 | { | 1197 | { |
1191 | mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); | 1198 | mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); |
1192 | return mBirthdayListFromKAPITransfer->sendMessageToTarget(sessionuid); | 1199 | return mBirthdayListFromKAPITransfer->sendMessageToTarget(sessionuid); |
1193 | } | 1200 | } |
1194 | 1201 | ||
1195 | bool ExternalAppHandler::returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6) | 1202 | bool ExternalAppHandler::returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6) |
1196 | { | 1203 | { |
1197 | mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); | 1204 | mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); |
1198 | return mBirthdayListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); | 1205 | return mBirthdayListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); |
1199 | } | 1206 | } |
1200 | 1207 | ||
1201 | 1208 | ||
1202 | 1209 | ||
1203 | 1210 | ||
1204 | 1211 | ||
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h index 52a64e1..097f306 100644 --- a/libkdepim/externalapphandler.h +++ b/libkdepim/externalapphandler.h | |||
@@ -1,292 +1,293 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkdepim. | 2 | This file is part of libkdepim. |
3 | Copyright (c) 2004 Ulf Schenk | 3 | Copyright (c) 2004 Ulf Schenk |
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 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef EXTERNALAPPHANDLER_H | 31 | #ifndef EXTERNALAPPHANDLER_H |
32 | #define EXTERNALAPPHANDLER_H | 32 | #define EXTERNALAPPHANDLER_H |
33 | 33 | ||
34 | #include <qobject.h> | 34 | #include <qobject.h> |
35 | #include <qlist.h> | 35 | #include <qlist.h> |
36 | #include <qmap.h> | 36 | #include <qmap.h> |
37 | 37 | ||
38 | class QCopEnvelope; | 38 | class QCopEnvelope; |
39 | 39 | ||
40 | 40 | ||
41 | class ExternalAppHandler; | 41 | class ExternalAppHandler; |
42 | class QCopTransferItem : public QObject | 42 | class QCopTransferItem : public QObject |
43 | { | 43 | { |
44 | Q_OBJECT | 44 | Q_OBJECT |
45 | public: | 45 | public: |
46 | QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); | 46 | QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); |
47 | QCopTransferItem(); | 47 | QCopTransferItem(); |
48 | 48 | ||
49 | bool sendMessageToTarget(const QString& uid, const QString& param1 = QString::null, const QString& param2 = QString::null, const QString& param3 = QString::null); | 49 | bool sendMessageToTarget(const QString& uid, const QString& param1 = QString::null, const QString& param2 = QString::null, const QString& param3 = QString::null); |
50 | 50 | ||
51 | void setSourceChannel(const QString& sourceChannel); | 51 | void setSourceChannel(const QString& sourceChannel); |
52 | 52 | ||
53 | virtual bool appMessage( const QCString& msg, const QByteArray& data ); | 53 | virtual bool appMessage( const QCString& msg, const QByteArray& data ); |
54 | 54 | ||
55 | 55 | ||
56 | signals: | 56 | signals: |
57 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid); | 57 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid); |
58 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1); | 58 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1); |
59 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2); | 59 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2); |
60 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2, const QString& param3); | 60 | void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2, const QString& param3); |
61 | 61 | ||
62 | public: | 62 | public: |
63 | int _usedSourceParameters; | 63 | int _usedSourceParameters; |
64 | QString _sourceChannel; | 64 | QString _sourceChannel; |
65 | QString _sourceMessage; | 65 | QString _sourceMessage; |
66 | QString _sourceMessageParameters; | 66 | QString _sourceMessageParameters; |
67 | QString _targetChannel; | 67 | QString _targetChannel; |
68 | QString _targetMessage; | 68 | QString _targetMessage; |
69 | QString _targetMessageParameters; | 69 | QString _targetMessageParameters; |
70 | 70 | ||
71 | }; | 71 | }; |
72 | 72 | ||
73 | /********************************************************************************* | 73 | /********************************************************************************* |
74 | * | 74 | * |
75 | ********************************************************************************/ | 75 | ********************************************************************************/ |
76 | 76 | ||
77 | class QCopMapTransferItem : public QCopTransferItem | 77 | class QCopMapTransferItem : public QCopTransferItem |
78 | { | 78 | { |
79 | Q_OBJECT | 79 | Q_OBJECT |
80 | public: | 80 | public: |
81 | QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); | 81 | QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); |
82 | 82 | ||
83 | bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap); | 83 | bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap); |
84 | 84 | ||
85 | 85 | ||
86 | virtual bool appMessage( const QCString& msg, const QByteArray& data ); | 86 | virtual bool appMessage( const QCString& msg, const QByteArray& data ); |
87 | 87 | ||
88 | 88 | ||
89 | signals: | 89 | signals: |
90 | void receivedMessageFromTarget(const QString& uid, const QMap<QString,QString>& nameEmailMap); | 90 | void receivedMessageFromTarget(const QString& uid, const QMap<QString,QString>& nameEmailMap); |
91 | 91 | ||
92 | }; | 92 | }; |
93 | 93 | ||
94 | /********************************************************************************* | 94 | /********************************************************************************* |
95 | * | 95 | * |
96 | ********************************************************************************/ | 96 | ********************************************************************************/ |
97 | 97 | ||
98 | class QCopListTransferItem : public QCopTransferItem | 98 | class QCopListTransferItem : public QCopTransferItem |
99 | { | 99 | { |
100 | Q_OBJECT | 100 | Q_OBJECT |
101 | public: | 101 | public: |
102 | QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); | 102 | QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); |
103 | ~QCopListTransferItem(); | 103 | ~QCopListTransferItem(); |
104 | bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6); | 104 | bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6); |
105 | 105 | ||
106 | 106 | ||
107 | virtual bool appMessage( const QCString& msg, const QByteArray& data ); | 107 | virtual bool appMessage( const QCString& msg, const QByteArray& data ); |
108 | 108 | ||
109 | 109 | ||
110 | signals: | 110 | signals: |
111 | void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4 , const QStringList& list5, const QStringList& list6); | 111 | void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4 , const QStringList& list5, const QStringList& list6); |
112 | 112 | ||
113 | }; | 113 | }; |
114 | 114 | ||
115 | /********************************************************************************* | 115 | /********************************************************************************* |
116 | * | 116 | * |
117 | ********************************************************************************/ | 117 | ********************************************************************************/ |
118 | 118 | ||
119 | 119 | ||
120 | class DefaultAppItem | 120 | class DefaultAppItem |
121 | { | 121 | { |
122 | public: | 122 | public: |
123 | DefaultAppItem(int type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2) | 123 | DefaultAppItem(int type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2) |
124 | : _type(type), _id(id), _label(label), _channel(channel), _message(message), _parameters(parameters), _message2(message2), _parameters2(parameters2) | 124 | : _type(type), _id(id), _label(label), _channel(channel), _message(message), _parameters(parameters), _message2(message2), _parameters2(parameters2) |
125 | {} | 125 | {} |
126 | 126 | ||
127 | DefaultAppItem() | 127 | DefaultAppItem() |
128 | { } | 128 | { } |
129 | 129 | ||
130 | public: | 130 | public: |
131 | int _type; | 131 | int _type; |
132 | int _id; | 132 | int _id; |
133 | QString _label; | 133 | QString _label; |
134 | QString _channel; | 134 | QString _channel; |
135 | QString _message; | 135 | QString _message; |
136 | QString _parameters;// a list of parameters in stringrepresentation. Delimiter is ; | 136 | QString _parameters;// a list of parameters in stringrepresentation. Delimiter is ; |
137 | QString _message2; | 137 | QString _message2; |
138 | QString _parameters2; // a list of parameters in stringrepresentation. Delimiter is ; | 138 | QString _parameters2; // a list of parameters in stringrepresentation. Delimiter is ; |
139 | 139 | ||
140 | }; | 140 | }; |
141 | 141 | ||
142 | /********************************************************************************* | 142 | /********************************************************************************* |
143 | * | 143 | * |
144 | ********************************************************************************/ | 144 | ********************************************************************************/ |
145 | 145 | ||
146 | class ExternalAppHandler : public QObject | 146 | class ExternalAppHandler : public QObject |
147 | { | 147 | { |
148 | Q_OBJECT | 148 | Q_OBJECT |
149 | public: | 149 | public: |
150 | virtual ~ExternalAppHandler(); | 150 | virtual ~ExternalAppHandler(); |
151 | 151 | ||
152 | static ExternalAppHandler *instance(); | 152 | static ExternalAppHandler *instance(); |
153 | 153 | ||
154 | enum Types { | 154 | enum Types { |
155 | EMAIL = 0, | 155 | EMAIL = 0, |
156 | PHONE = 1, | 156 | PHONE = 1, |
157 | SMS = 2, | 157 | SMS = 2, |
158 | FAX = 3, | 158 | FAX = 3, |
159 | PAGER = 4, | 159 | PAGER = 4, |
160 | SIP = 5 | 160 | SIP = 5 |
161 | }; | 161 | }; |
162 | 162 | ||
163 | enum Availability { | 163 | enum Availability { |
164 | UNDEFINED = -1, | 164 | UNDEFINED = -1, |
165 | UNAVAILABLE = 0, | 165 | UNAVAILABLE = 0, |
166 | AVAILABLE = 1 | 166 | AVAILABLE = 1 |
167 | }; | 167 | }; |
168 | 168 | ||
169 | //calls the emailapplication with a number of attachments that need to be send. | 169 | //calls the emailapplication with a number of attachments that need to be send. |
170 | //either parameter can be left empty. | 170 | //either parameter can be left empty. |
171 | bool mailToMultipleContacts( const QString& recipients, const QString& attachmenturls ); | 171 | bool mailToMultipleContacts( const QString& recipients, const QString& attachmenturls ); |
172 | 172 | ||
173 | //calls the emailapplication and creates a mail with parameter emailadress as recipients | 173 | //calls the emailapplication and creates a mail with parameter emailadress as recipients |
174 | bool mailToOneContact( const QString& name, const QString& emailadress ); | 174 | bool mailToOneContact( const QString& name, const QString& emailadress ); |
175 | 175 | ||
176 | //calls the emailapplication and creates a mail with parameter as recipients | 176 | //calls the emailapplication and creates a mail with parameter as recipients |
177 | // parameters format is | 177 | // parameters format is |
178 | // NAME <EMAIL>:SUBJECT | 178 | // NAME <EMAIL>:SUBJECT |
179 | bool mailToOneContact( const QString& adressline ); | 179 | bool mailToOneContact( const QString& adressline ); |
180 | 180 | ||
181 | //calls the phoneapplication with the number | 181 | //calls the phoneapplication with the number |
182 | bool callByPhone( const QString& phonenumber ); | 182 | bool callByPhone( const QString& phonenumber ); |
183 | 183 | ||
184 | //calls the smsapplication with the number | 184 | //calls the smsapplication with the number |
185 | bool callBySMS( const QString& phonenumber ); | 185 | bool callBySMS( const QString& phonenumber ); |
186 | 186 | ||
187 | //calls the pagerapplication with the number | 187 | //calls the pagerapplication with the number |
188 | bool callByPager( const QString& pagernumber ); | 188 | bool callByPager( const QString& pagernumber ); |
189 | 189 | ||
190 | //calls the faxapplication with the number | 190 | //calls the faxapplication with the number |
191 | bool callByFax( const QString& faxnumber ); | 191 | bool callByFax( const QString& faxnumber ); |
192 | 192 | ||
193 | //calls the sipapplication with the number | 193 | //calls the sipapplication with the number |
194 | bool callBySIP( const QString& sipnumber ); | 194 | bool callBySIP( const QString& sipnumber ); |
195 | 195 | ||
196 | bool isEmailAppAvailable(); | 196 | bool isEmailAppAvailable(); |
197 | bool isSMSAppAvailable(); | 197 | bool isSMSAppAvailable(); |
198 | bool isPhoneAppAvailable(); | 198 | bool isPhoneAppAvailable(); |
199 | bool isFaxAppAvailable(); | 199 | bool isFaxAppAvailable(); |
200 | bool isPagerAppAvailable(); | 200 | bool isPagerAppAvailable(); |
201 | bool isSIPAppAvailable(); | 201 | bool isSIPAppAvailable(); |
202 | 202 | ||
203 | 203 | ||
204 | //Call this method on the source when you want to select names from the addressbook by using QCop | 204 | //Call this method on the source when you want to select names from the addressbook by using QCop |
205 | bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid); | 205 | bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid); |
206 | //Call this method on the target when you want to return the name/email map to the source (client). | 206 | //Call this method on the target when you want to return the name/email map to the source (client). |
207 | bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); | 207 | bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); |
208 | 208 | ||
209 | 209 | ||
210 | 210 | ||
211 | bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email); | 211 | bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email); |
212 | bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); | 212 | bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); |
213 | 213 | ||
214 | bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid); | 214 | bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid); |
215 | 215 | ||
216 | 216 | ||
217 | 217 | ||
218 | bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid); | 218 | bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid); |
219 | bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, | 219 | bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, |
220 | const QStringList& birthdayList, const QStringList& anniversaryList, | 220 | const QStringList& birthdayList, const QStringList& anniversaryList, |
221 | const QStringList& realNameList, const QStringList& emailList, | 221 | const QStringList& realNameList, const QStringList& emailList, |
222 | const QStringList& assembledNameList, const QStringList& uidList); | 222 | const QStringList& assembledNameList, const QStringList& uidList); |
223 | 223 | ||
224 | 224 | ||
225 | //loadConfig clears the cache and checks again if the applications are available or not | 225 | //loadConfig clears the cache and checks again if the applications are available or not |
226 | void loadConfig(); | 226 | void loadConfig(); |
227 | 227 | ||
228 | QList<DefaultAppItem> getAvailableDefaultItems(Types); | 228 | QList<DefaultAppItem> getAvailableDefaultItems(Types); |
229 | DefaultAppItem* getDefaultItem(Types, int); | 229 | DefaultAppItem* getDefaultItem(Types, int); |
230 | 230 | ||
231 | public slots: | 231 | public slots: |
232 | void appMessage( const QCString& msg, const QByteArray& data ); | 232 | void appMessage( const QCString& msg, const QByteArray& data ); |
233 | 233 | ||
234 | 234 | ||
235 | signals: | 235 | signals: |
236 | void callContactdialog(); | ||
236 | void nextView(); | 237 | void nextView(); |
237 | // Emmitted when the target app receives a request from the source app | 238 | // Emmitted when the target app receives a request from the source app |
238 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); | 239 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); |
239 | 240 | ||
240 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi | 241 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi |
241 | // The first parameter is a uniqueid. It can be used to identify the event | 242 | // The first parameter is a uniqueid. It can be used to identify the event |
242 | void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); | 243 | void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); |
243 | 244 | ||
244 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); | 245 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); |
245 | void receivedFindByEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); | 246 | void receivedFindByEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); |
246 | 247 | ||
247 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); | 248 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); |
248 | 249 | ||
249 | 250 | ||
250 | // Emmitted when the target app receives a request from the source app | 251 | // Emmitted when the target app receives a request from the source app |
251 | void requestForBirthdayList(const QString& sourceChannel, const QString& uid); | 252 | void requestForBirthdayList(const QString& sourceChannel, const QString& uid); |
252 | 253 | ||
253 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi | 254 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi |
254 | // The first parameter is a uniqueid. It can be used to identify the event | 255 | // The first parameter is a uniqueid. It can be used to identify the event |
255 | void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList, | 256 | void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList, |
256 | const QStringList& anniversaryList, const QStringList& realNameList, | 257 | const QStringList& anniversaryList, const QStringList& realNameList, |
257 | const QStringList& emailList, const QStringList& assembledNameList, | 258 | const QStringList& emailList, const QStringList& assembledNameList, |
258 | const QStringList& uidList); | 259 | const QStringList& uidList); |
259 | 260 | ||
260 | 261 | ||
261 | private: | 262 | private: |
262 | ExternalAppHandler(); | 263 | ExternalAppHandler(); |
263 | QList<DefaultAppItem> mDefaultItems; | 264 | QList<DefaultAppItem> mDefaultItems; |
264 | 265 | ||
265 | Availability mEmailAppAvailable; | 266 | Availability mEmailAppAvailable; |
266 | Availability mPhoneAppAvailable; | 267 | Availability mPhoneAppAvailable; |
267 | Availability mFaxAppAvailable; | 268 | Availability mFaxAppAvailable; |
268 | Availability mSMSAppAvailable; | 269 | Availability mSMSAppAvailable; |
269 | Availability mPagerAppAvailable; | 270 | Availability mPagerAppAvailable; |
270 | Availability mSIPAppAvailable; | 271 | Availability mSIPAppAvailable; |
271 | 272 | ||
272 | QCopListTransferItem* mNameEmailUidListFromKAPITransfer; | 273 | QCopListTransferItem* mNameEmailUidListFromKAPITransfer; |
273 | QCopListTransferItem* mFindByEmailFromKAPITransfer; | 274 | QCopListTransferItem* mFindByEmailFromKAPITransfer; |
274 | QCopTransferItem* mDisplayDetails; | 275 | QCopTransferItem* mDisplayDetails; |
275 | QCopListTransferItem* mBirthdayListFromKAPITransfer; | 276 | QCopListTransferItem* mBirthdayListFromKAPITransfer; |
276 | 277 | ||
277 | 278 | ||
278 | void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2); | 279 | void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2); |
279 | 280 | ||
280 | QString& translateMessage(QString& message, const QString& param1, const QString& param2) const; | 281 | QString& translateMessage(QString& message, const QString& param1, const QString& param2) const; |
281 | void passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1, const QString& param2) const; | 282 | void passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1, const QString& param2) const; |
282 | 283 | ||
283 | 284 | ||
284 | static ExternalAppHandler *sInstance; | 285 | static ExternalAppHandler *sInstance; |
285 | 286 | ||
286 | private slots: | 287 | private slots: |
287 | void receivedNameEmailUidList_Slot(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList, const QStringList&, const QStringList&, const QStringList& ); | 288 | void receivedNameEmailUidList_Slot(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList, const QStringList&, const QStringList&, const QStringList& ); |
288 | 289 | ||
289 | }; | 290 | }; |
290 | 291 | ||
291 | 292 | ||
292 | #endif | 293 | #endif |