summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt2
-rw-r--r--kabc/stdaddressbook.cpp5
-rw-r--r--kabc/stdaddressbook.h2
-rw-r--r--kaddressbook/kabcore.cpp28
-rw-r--r--kaddressbook/kabcore.h4
-rw-r--r--kaddressbook/kaddressbookmain.cpp4
-rw-r--r--kaddressbook/mainembedded.cpp5
7 files changed, 38 insertions, 12 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index 293aaea..ece26d2 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -47,774 +47,774 @@
47{ "Private","Privat" }, 47{ "Private","Privat" },
48{ "Confidential","Vertraulich" }, 48{ "Confidential","Vertraulich" },
49{ "&General","Allgemein" }, 49{ "&General","Allgemein" },
50{ "&Edit Addresses...","B&earbeite Adressen..." }, 50{ "&Edit Addresses...","B&earbeite Adressen..." },
51{ "Edit Email Addresses...","Bearbeite E-Mail Adressen..." }, 51{ "Edit Email Addresses...","Bearbeite E-Mail Adressen..." },
52{ "Email:","Email:" }, 52{ "Email:","Email:" },
53{ "URL:","URL:" }, 53{ "URL:","URL:" },
54{ "&IM address:","&IM address:" }, 54{ "&IM address:","&IM address:" },
55{ "&Address","&Adresse" }, 55{ "&Address","&Adresse" },
56{ "Department:","Abteilung:" }, 56{ "Department:","Abteilung:" },
57{ "Office:","Büro:" }, 57{ "Office:","Büro:" },
58{ "Profession:","Beruf:" }, 58{ "Profession:","Beruf:" },
59{ "Manager's name:","N.d.Manager's:" }, 59{ "Manager's name:","N.d.Manager's:" },
60{ "Assistant's name:","N.d.Assistenten:" }, 60{ "Assistant's name:","N.d.Assistenten:" },
61{ "Nick name:","Spitzname:" }, 61{ "Nick name:","Spitzname:" },
62{ "Spouse's name:","N.d.Ehegatten:" }, 62{ "Spouse's name:","N.d.Ehegatten:" },
63{ "Children's names:","N.d.Kinder:" }, 63{ "Children's names:","N.d.Kinder:" },
64{ "Birthday:","Geburtstag:" }, 64{ "Birthday:","Geburtstag:" },
65{ " Local Time","Ortszeit" }, 65{ " Local Time","Ortszeit" },
66{ "Mon","Mo" }, 66{ "Mon","Mo" },
67{ "Tue","Di" }, 67{ "Tue","Di" },
68{ "Wed","Mi" }, 68{ "Wed","Mi" },
69{ "Thu","Do" }, 69{ "Thu","Do" },
70{ "Fri","Fr" }, 70{ "Fri","Fr" },
71{ "Sat","Sa" }, 71{ "Sat","Sa" },
72{ "Sun","So" }, 72{ "Sun","So" },
73{ "January","Januar" }, 73{ "January","Januar" },
74{ "February","Februar" }, 74{ "February","Februar" },
75{ "March","März" }, 75{ "March","März" },
76{ "April","April" }, 76{ "April","April" },
77{ "May","Mai" }, 77{ "May","Mai" },
78{ "June","Juni" }, 78{ "June","Juni" },
79{ "July","July" }, 79{ "July","July" },
80{ "August","August" }, 80{ "August","August" },
81{ "September","September" }, 81{ "September","September" },
82{ "October","October" }, 82{ "October","October" },
83{ "November","November" }, 83{ "November","November" },
84{ "December","Dezember" }, 84{ "December","Dezember" },
85{ "tomorrow","Morgen" }, 85{ "tomorrow","Morgen" },
86{ "today","Heute" }, 86{ "today","Heute" },
87{ "yesterday","Gestern" }, 87{ "yesterday","Gestern" },
88{ "Monday","Montag" }, 88{ "Monday","Montag" },
89{ "Tuesday","Dienstag" }, 89{ "Tuesday","Dienstag" },
90{ "Wednesday","Mittwoch" }, 90{ "Wednesday","Mittwoch" },
91{ "Thursday","Donnerstag" }, 91{ "Thursday","Donnerstag" },
92{ "Friday","Freitag" }, 92{ "Friday","Freitag" },
93{ "Saturday","Samstag" }, 93{ "Saturday","Samstag" },
94{ "Sunday","Sonntag" }, 94{ "Sunday","Sonntag" },
95{ "Anniversary:","Jahrestag:" }, 95{ "Anniversary:","Jahrestag:" },
96{ "Gender:","Geschlecht:" }, 96{ "Gender:","Geschlecht:" },
97{ "ALIEN (undefined)","ALIEN (undefiniert)" }, 97{ "ALIEN (undefined)","ALIEN (undefiniert)" },
98{ "female","weiblich" }, 98{ "female","weiblich" },
99{ "male","männlich" }, 99{ "male","männlich" },
100{ "&Details","&Details" }, 100{ "&Details","&Details" },
101{ "Note:","Notiz:" }, 101{ "Note:","Notiz:" },
102{ "&Notes","&Notizen" }, 102{ "&Notes","&Notizen" },
103{ "Use geo data","Benutze geo Daten" }, 103{ "Use geo data","Benutze geo Daten" },
104{ "Latitude:","Breitengrad:" }, 104{ "Latitude:","Breitengrad:" },
105{ "Longitude:","Längengrad:" }, 105{ "Longitude:","Längengrad:" },
106{ "Edit Geo Data...","Edit geo Daten..." }, 106{ "Edit Geo Data...","Edit geo Daten..." },
107{ "Keys:","Schlüssel:" }, 107{ "Keys:","Schlüssel:" },
108{ "Add","Hinzu" }, 108{ "Add","Hinzu" },
109{ "Remove","Entf." }, 109{ "Remove","Entf." },
110{ "Export","Exportiere" }, 110{ "Export","Exportiere" },
111{ "&Misc","Verschiedenes" }, 111{ "&Misc","Verschiedenes" },
112{ "Photo","Foto" }, 112{ "Photo","Foto" },
113{ "Store as URL","Speichere als URL" }, 113{ "Store as URL","Speichere als URL" },
114{ "Logo","Logo" }, 114{ "Logo","Logo" },
115{ "&Images","B&ilder" }, 115{ "&Images","B&ilder" },
116{ "Home","Privat" }, 116{ "Home","Privat" },
117{ "Work","Geschäft" }, 117{ "Work","Geschäft" },
118{ "Mobile","Handy" }, 118{ "Mobile","Handy" },
119{ "Fax","Fax" }, 119{ "Fax","Fax" },
120{ "Contact Editor","Bearbeite Kontakt" }, 120{ "Contact Editor","Bearbeite Kontakt" },
121{ "&Mail...","&Mail..." }, 121{ "&Mail...","&Mail..." },
122{ "&Print...","Drucken..." }, 122{ "&Print...","Drucken..." },
123{ "&Save","&Speichern" }, 123{ "&Save","&Speichern" },
124{ "&New Contact...","&Neuer Kontakt..." }, 124{ "&New Contact...","&Neuer Kontakt..." },
125{ "Mail &vCard...","Mail &vCard..." }, 125{ "Mail &vCard...","Mail &vCard..." },
126{ "Selected to phone","Auswahl zum Telefon" }, 126{ "Selected to phone","Auswahl zum Telefon" },
127{ "Beam selected v&Card(s)","Beame ausgewählte v&Card(s)" }, 127{ "Beam selected v&Card(s)","Beame ausgewählte v&Card(s)" },
128{ "&Beam personal vCard","Beame persönliche vCard" }, 128{ "&Beam personal vCard","Beame persönliche vCard" },
129{ "&Edit Contact...","Bearbeite Kontakt..." }, 129{ "&Edit Contact...","Bearbeite Kontakt..." },
130{ "&Exit","B&eenden" }, 130{ "&Exit","B&eenden" },
131{ "&Copy","Kopieren" }, 131{ "&Copy","Kopieren" },
132{ "Cu&t","Ausschneiden" }, 132{ "Cu&t","Ausschneiden" },
133{ "&Paste","Einfügen" }, 133{ "&Paste","Einfügen" },
134{ "Select &All","Alles auswählen" }, 134{ "Select &All","Alles auswählen" },
135{ "&Undo","Rückgängig machen" }, 135{ "&Undo","Rückgängig machen" },
136{ "Re&do","Wiederherstellen" }, 136{ "Re&do","Wiederherstellen" },
137{ "&Delete Contact","Lösche Kontakt" }, 137{ "&Delete Contact","Lösche Kontakt" },
138{ "Configure &Resources...","Konfiguriere &Resourcen..." }, 138{ "Configure &Resources...","Konfiguriere &Resourcen..." },
139{ "&Configure %1...","Konfiguriere %1..." }, 139{ "&Configure %1...","Konfiguriere %1..." },
140{ "Configure S&hortcuts...","Konfiguriere S&hortcuts..." }, 140{ "Configure S&hortcuts...","Konfiguriere S&hortcuts..." },
141{ "Show Jump Bar","Zeige Jump Bar" }, 141{ "Show Jump Bar","Zeige Jump Bar" },
142{ "Show Details","Zeige Details" }, 142{ "Show Details","Zeige Details" },
143{ "Beam receive enabled","Beam (IR) Empfang AN" }, 143{ "Beam receive enabled","Beam (IR) Empfang AN" },
144{ "Set Who Am I","Setze "wer bin ich"" }, 144{ "Set Who Am I","Setze "wer bin ich"" },
145{ "Set Categories for Contacts...","Setze Kategorien für Kontakte..." }, 145{ "Set Categories for Contacts...","Setze Kategorien für Kontakte..." },
146{ "Edit Category List...","Editiere Kategorieliste..." }, 146{ "Edit Category List...","Editiere Kategorieliste..." },
147{ "Remove "voice"...","Entferne "voice"..." }, 147{ "Remove "voice"...","Entferne "voice"..." },
148{ "Import from Outlook...","Importiere aus Outlook..." }, 148{ "Import from Outlook...","Importiere aus Outlook..." },
149{ "Licence","Lizenz" }, 149{ "Licence","Lizenz" },
150{ "Faq","Fragen + Antworten" }, 150{ "Faq","Fragen + Antworten" },
151{ "What's New?","Was ist neu?" }, 151{ "What's New?","Was ist neu?" },
152{ "Sync HowTo","Sync Anleitung" }, 152{ "Sync HowTo","Sync Anleitung" },
153{ "&About KAddressBook","Über KAdressBuch" }, 153{ "&About KAddressBook","Über KAdressBuch" },
154{ "Select Incremental Search Field","Selektiere Such Feld" }, 154{ "Select Incremental Search Field","Selektiere Such Feld" },
155{ "Synchronize","Synchronisieren" }, 155{ "Synchronize","Synchronisieren" },
156{ "Configure...","Konfigurieren..." }, 156{ "Configure...","Konfigurieren..." },
157{ "Enable Pi-Sync","Aktiviere Pi-Sync" }, 157{ "Enable Pi-Sync","Aktiviere Pi-Sync" },
158{ "Multiple sync","Multi Sync" }, 158{ "Multiple sync","Multi Sync" },
159{ "Import CSV List...","Importiere CSV-Datei..." }, 159{ "Import CSV List...","Importiere CSV-Datei..." },
160{ "Export CSV List...","Exportiere CSV-Datei..." }, 160{ "Export CSV List...","Exportiere CSV-Datei..." },
161{ "Import KDE 2 Addressbook...","Importiere KDE 2 Adressbuch..." }, 161{ "Import KDE 2 Addressbook...","Importiere KDE 2 Adressbuch..." },
162{ "Import vCard...","Importiere vCard..." }, 162{ "Import vCard...","Importiere vCard..." },
163{ "Export vCard 3.0...","Exportiere vCard 3.0..." }, 163{ "Export vCard 3.0...","Exportiere vCard 3.0..." },
164{ "Import Qtopia...","Importiere Qtopia..." }, 164{ "Import Qtopia...","Importiere Qtopia..." },
165{ "Export Qtopia...","Exportiere Qtopia..." }, 165{ "Export Qtopia...","Exportiere Qtopia..." },
166{ "Edit Contact","Bearbeite Kontakt" }, 166{ "Edit Contact","Bearbeite Kontakt" },
167{ "Ok","Ok" }, 167{ "Ok","Ok" },
168{ "Apply","Anwenden" }, 168{ "Apply","Anwenden" },
169{ "Cancel","Abbrechen" }, 169{ "Cancel","Abbrechen" },
170{ "KAddressbook/Pi","KAdressbuch/Pi" }, 170{ "KAddressbook/Pi","KAdressbuch/Pi" },
171{ "No Filter","Kein Filter" }, 171{ "No Filter","Kein Filter" },
172{ "Given Name","Vorname" }, 172{ "Given Name","Vorname" },
173{ "Family Name","Nachname" }, 173{ "Family Name","Nachname" },
174{ "Email Address","E-Mail Adresse" }, 174{ "Email Address","E-Mail Adresse" },
175{ "All Fields","Alle Felder" }, 175{ "All Fields","Alle Felder" },
176{ "Question","Frage" }, 176{ "Question","Frage" },
177{ "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?","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?" }, 177{ "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?","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?" },
178{ "No","Nein" }, 178{ "No","Nein" },
179{ "Yes","Ja" }, 179{ "Yes","Ja" },
180{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile" }, 180{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile" },
181{ "Local device name:","Name dieses Gerätes:" }, 181{ "Local device name:","Name dieses Gerätes:" },
182{ "New profile","Neues Profil" }, 182{ "New profile","Neues Profil" },
183{ "Clone profile","Klone Profil" }, 183{ "Clone profile","Klone Profil" },
184{ "Delete profile","Lösche Profil" }, 184{ "Delete profile","Lösche Profil" },
185{ "Profile:","Profil:" }, 185{ "Profile:","Profil:" },
186{ "Ask for every entry on conflict","Frage bei Konflikten nach"}, 186{ "Ask for every entry on conflict","Frage bei Konflikten nach"},
187{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, 187{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
188{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, 188{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
189{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" } 189{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }
190{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, 190{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
191{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, 191{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
192{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, 192{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
193{ "Write back file","Schreibe Datei zurück" }, 193{ "Write back file","Schreibe Datei zurück" },
194{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, 194{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
195{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 195{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
196{ "Local device name:","Name dieses Gerätes:" }, 196{ "Local device name:","Name dieses Gerätes:" },
197{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, 197{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
198{ "Sync preferences","Synchronisations Einstellungen" }, 198{ "Sync preferences","Synchronisations Einstellungen" },
199{ "Profile kind","Profil Art" }, 199{ "Profile kind","Profil Art" },
200{ "Local file","Lokale Datei" }, 200{ "Local file","Lokale Datei" },
201{ "Local file:","Lokale Datei:" }, 201{ "Local file:","Lokale Datei:" },
202{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 202{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
203{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 203{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
204{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 204{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
205{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, 205{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"},
206{ "Device","Gerät:" }, 206{ "Device","Gerät:" },
207{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, 207{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" },
208{ "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" }, 208{ "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" },
209{ "Synchronization successful","Synchronisation erfolgreich" }, 209{ "Synchronization successful","Synchronisation erfolgreich" },
210{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, 210{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." },
211{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, 211{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" },
212{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, 212{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" },
213{ "Enter password","Passwort eingeben" }, 213{ "Enter password","Passwort eingeben" },
214{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, 214{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" },
215{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, 215{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." },
216{ "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" }, 216{ "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" },
217{ "Writing back file result: ","Resultat des Dateizurückschreibens: " }, 217{ "Writing back file result: ","Resultat des Dateizurückschreibens: " },
218{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, 218{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" },
219{ "Used %1 Client","Benutzter %1 Client" }, 219{ "Used %1 Client","Benutzter %1 Client" },
220{ "No email client installed","Kein Email Klient installiert" }, 220{ "No email client installed","Kein Email Klient installiert" },
221{ "Userdefined email client","Benutzerdef. Email Klient" }, 221{ "Userdefined email client","Benutzerdef. Email Klient" },
222{ "OM/Pi email client","OM/Pi Email Klient" }, 222{ "OM/Pi email client","OM/Pi Email Klient" },
223{ "Include in multiple ","Beziehe in mehrfach " }, 223{ "Include in multiple ","Beziehe in mehrfach " },
224{ "calendar ","Kalender " }, 224{ "calendar ","Kalender " },
225{ "addressbook ","Adressbuch " }, 225{ "addressbook ","Adressbuch " },
226{ "pwmanager","PWmanager" }, 226{ "pwmanager","PWmanager" },
227{ " sync"," Sync ein" }, 227{ " sync"," Sync ein" },
228{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 228{ "Write back synced data","Schreibe gesyncte Daten zurück" },
229{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, 229{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
230{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, 230{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
231{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, 231{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
232{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 232{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
233{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 233{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
234{ "Help...","Hilfe..." }, 234{ "Help...","Hilfe..." },
235{ "Local file Cal:","Lokale Datei Kal:" }, 235{ "Local file Cal:","Lokale Datei Kal:" },
236{ "Local file ABook:","Lokale Datei ABuch:" }, 236{ "Local file ABook:","Lokale Datei ABuch:" },
237{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 237{ "Local file PWMgr:","Lokale Datei PWMgr:" },
238{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 238{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
239{ "Calendar:","Kalender:" }, 239{ "Calendar:","Kalender:" },
240{ "AddressBook:","AdressBuch:" }, 240{ "AddressBook:","AdressBuch:" },
241{ "PWManager:","PWManager:" }, 241{ "PWManager:","PWManager:" },
242{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 242{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
243{ "ssh/scp","ssh/scp" }, 243{ "ssh/scp","ssh/scp" },
244{ "ftp","ftp" }, 244{ "ftp","ftp" },
245{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 245{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
246{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 246{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
247{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 247{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
248{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 248{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
249{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 249{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
250{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 250{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
251{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 251{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
252{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 252{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
253{ "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" }, 253{ "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" },
254{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 254{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
255{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 255{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
256{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 256{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
257{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 257{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
258{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 258{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
259{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 259{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
260{ "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!" }, 260{ "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!" },
261{ "KDE-Pim Sync","KDE-Pim Sync" }, 261{ "KDE-Pim Sync","KDE-Pim Sync" },
262{ "Multiple profiles","Multi-Sync Profile" }, 262{ "Multiple profiles","Multi-Sync Profile" },
263{ "Device: ","Gerät: " }, 263{ "Device: ","Gerät: " },
264{ "Multiple sync started.","Multi-Sync gestartet." }, 264{ "Multiple sync started.","Multi-Sync gestartet." },
265{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile selektiert für Multi-Sync" }, 265{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile selektiert für Multi-Sync" },
266{ "KDE-Pim sync config","KDE-Pim Sync Konfig" }, 266{ "KDE-Pim sync config","KDE-Pim Sync Konfig" },
267{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein, z.B.:\n" }, 267{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein, z.B.:\n" },
268{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Modell\nautomatisch\erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, 268{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Modell\nautomatisch\erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
269{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 269{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
270{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 270{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
271{ "Edit Address Book Filters","Editiere Addressbuch Filter" }, 271{ "Edit Address Book Filters","Editiere Addressbuch Filter" },
272{ "&Add...","Hinzufügen..." }, 272{ "&Add...","Hinzufügen..." },
273{ "&Edit...","B&earbeiten..." }, 273{ "&Edit...","B&earbeiten..." },
274{ "&Remove","Entfe&rne" }, 274{ "&Remove","Entfe&rne" },
275{ "Modify View: ","Ansicht ändern: " }, 275{ "Modify View: ","Ansicht ändern: " },
276{ "Fields","Felder" }, 276{ "Fields","Felder" },
277{ "Select Fields to Display","Wähle anzuzeigende Felder" }, 277{ "Select Fields to Display","Wähle anzuzeigende Felder" },
278{ "All","Alles" }, 278{ "All","Alles" },
279{ "Frequent","Frequent" }, 279{ "Frequent","Frequent" },
280{ "Address","Adresse" }, 280{ "Address","Adresse" },
281{ "Email","E-Mail" }, 281{ "Email","E-Mail" },
282{ "Personal","Persönl." }, 282{ "Personal","Persönl." },
283{ "Organization","Organisation" }, 283{ "Organization","Organisation" },
284{ "Custom","Benutzerdefiniert" }, 284{ "Custom","Benutzerdefiniert" },
285{ "&Selected\nfields:","&Selektierte\nFelder:" }, 285{ "&Selected\nfields:","&Selektierte\nFelder:" },
286{ "Formatted Name","Format. Name" }, 286{ "Formatted Name","Format. Name" },
287{ "Additional Names","Mittelname" }, 287{ "Additional Names","Mittelname" },
288{ "Honorific Prefixes","Namensprefix" }, 288{ "Honorific Prefixes","Namensprefix" },
289{ "Honorific Suffixes","Namenssuffix" }, 289{ "Honorific Suffixes","Namenssuffix" },
290{ "Nick Name","Spitzname" }, 290{ "Nick Name","Spitzname" },
291{ "Birthday","Geburtstag" }, 291{ "Birthday","Geburtstag" },
292{ "Home Address Street","Privat Adresse Strasse" }, 292{ "Home Address Street","Privat Adresse Strasse" },
293{ "Home Address Locality","Privat Adresse Stadt" }, 293{ "Home Address Locality","Privat Adresse Stadt" },
294{ "Home Address Region","Privat Adresse Bundesland" }, 294{ "Home Address Region","Privat Adresse Bundesland" },
295{ "Home Address Postal Code","Privat Adresse PLZ" }, 295{ "Home Address Postal Code","Privat Adresse PLZ" },
296{ "Home Address Country","Privat Adresse Land" }, 296{ "Home Address Country","Privat Adresse Land" },
297{ "Home Address Label","Privat Adresse Label" }, 297{ "Home Address Label","Privat Adresse Label" },
298{ "Business Address Street","Büro Adresse Strasse" }, 298{ "Business Address Street","Büro Adresse Strasse" },
299{ "Business Address Locality","Büro Adresse Stadt" }, 299{ "Business Address Locality","Büro Adresse Stadt" },
300{ "Business Address Region","Büro Adresse Bundesland" }, 300{ "Business Address Region","Büro Adresse Bundesland" },
301{ "Business Address Postal Code","Büro Adresse PLZ" }, 301{ "Business Address Postal Code","Büro Adresse PLZ" },
302{ "Business Address Country","Büro Adresse Land" }, 302{ "Business Address Country","Büro Adresse Land" },
303{ "Business Address Label","Büro Adresse Label" }, 303{ "Business Address Label","Büro Adresse Label" },
304{ "Home Phone","Privat Telefon" }, 304{ "Home Phone","Privat Telefon" },
305{ "Business Phone","Büro Telefon" }, 305{ "Business Phone","Büro Telefon" },
306{ "Mobile Phone","Handy" }, 306{ "Mobile Phone","Handy" },
307{ "Home Fax","Privat Fax" }, 307{ "Home Fax","Privat Fax" },
308{ "Business Fax","Büro Fax" }, 308{ "Business Fax","Büro Fax" },
309{ "Car Phone","Autotelefon" }, 309{ "Car Phone","Autotelefon" },
310{ "ISDN","ISDN" }, 310{ "ISDN","ISDN" },
311{ "Pager","Pager" }, 311{ "Pager","Pager" },
312{ "Mail Client","Mail Klient" }, 312{ "Mail Client","Mail Klient" },
313{ "Title","Titel" }, 313{ "Title","Titel" },
314{ "Role","Rolle" }, 314{ "Role","Rolle" },
315{ "Note","Notiz" }, 315{ "Note","Notiz" },
316{ "URL","URL" }, 316{ "URL","URL" },
317{ "Resource","Resource" }, 317{ "Resource","Resource" },
318{ "SIP","SIP" }, 318{ "SIP","SIP" },
319{ "Default Filter","Default Filter" }, 319{ "Default Filter","Default Filter" },
320{ "The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime.","#The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime." }, 320{ "The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime.","#The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime." },
321{ "No default filter","Kein default Filter" }, 321{ "No default filter","Kein default Filter" },
322{ "Use last active filter","Nutze letzen aktiven Filter" }, 322{ "Use last active filter","Nutze letzen aktiven Filter" },
323{ "Use filter:","Nutze Filter:" }, 323{ "Use filter:","Nutze Filter:" },
324{ "Look & Feel","Look & Feel" }, 324{ "Look & Feel","Look & Feel" },
325{ "Row Separator","Reihen Separator" }, 325{ "Row Separator","Reihen Separator" },
326{ "Alternating backgrounds","Abwechselnder Hintergrund" }, 326{ "Alternating backgrounds","Abwechselnder Hintergrund" },
327{ "Single line","Einzelne Zeile" }, 327{ "Single line","Einzelne Zeile" },
328{ "Enable background image:","Hintergrundbild:" }, 328{ "Enable background image:","Hintergrundbild:" },
329{ "Enable contact tooltips","Contact Tooltips" }, 329{ "Enable contact tooltips","Contact Tooltips" },
330{ "&Enable custom Colors","Benutzerdef. Farben" }, 330{ "&Enable custom Colors","Benutzerdef. Farben" },
331{ "&Colors","Farben" }, 331{ "&Colors","Farben" },
332{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." }, 332{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." },
333{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." }, 333{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." },
334{ "&Enable custom fonts","B&enutzerdefinierte Schriften" }, 334{ "&Enable custom fonts","B&enutzerdefinierte Schriften" },
335{ "&Text font:","Textschriftart:" }, 335{ "&Text font:","Textschriftart:" },
336{ "&Header font:","Titelschriftart:" }, 336{ "&Header font:","Titelschriftart:" },
337{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." }, 337{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." },
338{ "&Fonts","Schri&ften" }, 338{ "&Fonts","Schri&ften" },
339{ "Background Color","Hintergrundfarbe" }, 339{ "Background Color","Hintergrundfarbe" },
340{ "Text Color","Textfarbe" }, 340{ "Text Color","Textfarbe" },
341{ "Header Background Color","Titel Hintergrundfarbe" }, 341{ "Header Background Color","Titel Hintergrundfarbe" },
342{ "Header Text Color","Titel Farbe" }, 342{ "Header Text Color","Titel Farbe" },
343{ "Highlight Color","Auswahlfarbe" }, 343{ "Highlight Color","Auswahlfarbe" },
344{ "Highlighted Text Color","Auswahltextfarbe" }, 344{ "Highlighted Text Color","Auswahltextfarbe" },
345{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" }, 345{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" },
346{ "Postal","Post" }, 346{ "Postal","Post" },
347{ "Dr.","Dr." }, 347{ "Dr.","Dr." },
348{ "Miss","Frl." }, 348{ "Miss","Frl." },
349{ "Mr.","Herr" }, 349{ "Mr.","Herr" },
350{ "Mrs.","Frau" }, 350{ "Mrs.","Frau" },
351{ "Ms.","Fr." }, 351{ "Ms.","Fr." },
352{ "Prof.","Prof." }, 352{ "Prof.","Prof." },
353{ "I","I" }, 353{ "I","I" },
354{ "II","II" }, 354{ "II","II" },
355{ "III","III" }, 355{ "III","III" },
356{ "Jr.","Jr." }, 356{ "Jr.","Jr." },
357{ "Sr.","Sr." }, 357{ "Sr.","Sr." },
358{ "Name:","Name:" }, 358{ "Name:","Name:" },
359{ "Documents","Dokumente" }, 359{ "Documents","Dokumente" },
360{ "Files","Dateien" }, 360{ "Files","Dateien" },
361{ "All Files","Alle Dateien" }, 361{ "All Files","Alle Dateien" },
362{ "Name","Name" }, 362{ "Name","Name" },
363{ "Size","Größe" }, 363{ "Size","Größe" },
364{ "Date","Datum" }, 364{ "Date","Datum" },
365{ "Mime Type","Mime Typ" }, 365{ "Mime Type","Mime Typ" },
366{ "Geo Data Input","Geo Dateneingabe" }, 366{ "Geo Data Input","Geo Dateneingabe" },
367{ "Sexagesimal","Sexagesimal" }, 367{ "Sexagesimal","Sexagesimal" },
368{ "North","Nord" }, 368{ "North","Nord" },
369{ "South","Süd" }, 369{ "South","Süd" },
370{ "East","Ost" }, 370{ "East","Ost" },
371{ "West","West" }, 371{ "West","West" },
372{ "Undefined","Unbestimmt" }, 372{ "Undefined","Unbestimmt" },
373{ "Edit Address","Bearbeite Adresse" }, 373{ "Edit Address","Bearbeite Adresse" },
374{ "Street:","Strasse:" }, 374{ "Street:","Strasse:" },
375{ "Post office box:","Postfach:" }, 375{ "Post office box:","Postfach:" },
376{ "Locality:","Stadt:" }, 376{ "Locality:","Stadt:" },
377{ "Region:","Region:" }, 377{ "Region:","Region:" },
378{ "Postal code:","PLZ:" }, 378{ "Postal code:","PLZ:" },
379{ "Country:","Staat:" }, 379{ "Country:","Staat:" },
380{ "This is the preferred address","Dies ist die bevorzugte Adresse" }, 380{ "This is the preferred address","Dies ist die bevorzugte Adresse" },
381{ "New...","Neu..." }, 381{ "New...","Neu..." },
382{ "Change Type","Ändere Art" }, 382{ "Change Type","Ändere Art" },
383{ "Edit Address Type","Ändere Address Art" }, 383{ "Edit Address Type","Ändere Address Art" },
384{ "Address Types","Address Art" }, 384{ "Address Types","Address Art" },
385{ "Domestic","Inland" }, 385{ "Domestic","Inland" },
386{ "International","International" }, 386{ "International","International" },
387{ "Parcel","Paket" }, 387{ "Parcel","Paket" },
388{ "Edit Contact Name","Ändere Kontakt Name" }, 388{ "Edit Contact Name","Ändere Kontakt Name" },
389{ "Honorific prefixes:","Namensprefixes:" }, 389{ "Honorific prefixes:","Namensprefixes:" },
390{ "Given name:","Vorname:" }, 390{ "Given name:","Vorname:" },
391{ "Additional names:","Mittelnamen:" }, 391{ "Additional names:","Mittelnamen:" },
392{ "Family names:","Nachname:" }, 392{ "Family names:","Nachname:" },
393{ "Honorific suffixes:","Namenssuffixe:" }, 393{ "Honorific suffixes:","Namenssuffixe:" },
394{ "Parse name automatically","Setze Namen automatisch" }, 394{ "Parse name automatically","Setze Namen automatisch" },
395{ "Edit Phone Numbers","Bearbeite Telefonnummern" }, 395{ "Edit Phone Numbers","Bearbeite Telefonnummern" },
396{ "Number","Nummer" }, 396{ "Number","Nummer" },
397{ "Type","Typ" }, 397{ "Type","Typ" },
398{ "Edit Phone Number","Bearbeite Telefonnummer" }, 398{ "Edit Phone Number","Bearbeite Telefonnummer" },
399{ "Number:","Nummer:" }, 399{ "Number:","Nummer:" },
400{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" }, 400{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" },
401{ "Types","Typen" }, 401{ "Types","Typen" },
402{ "Messenger","Messenger" }, 402{ "Messenger","Messenger" },
403{ "Other","Anderes" }, 403{ "Other","Anderes" },
404{ "Video","Video" }, 404{ "Video","Video" },
405{ "Mailbox","Mailbox" }, 405{ "Mailbox","Mailbox" },
406{ "Modem","Modem" }, 406{ "Modem","Modem" },
407{ "Car","Auto" }, 407{ "Car","Auto" },
408{ "PCS","PCS" }, 408{ "PCS","PCS" },
409{ "Category","Kategorie" }, 409{ "Category","Kategorie" },
410{ "Select Categories","Wähle Kategorien" }, 410{ "Select Categories","Wähle Kategorien" },
411{ " &Deselect All "," &Deselektiere alle " }, 411{ " &Deselect All "," &Deselektiere alle " },
412{ " &Edit Categories "," B&earbeite Kategorien " }, 412{ " &Edit Categories "," B&earbeite Kategorien " },
413{ "&OK","&OK" }, 413{ "&OK","&OK" },
414{ "&Cancel","Abbre&chen" }, 414{ "&Cancel","Abbre&chen" },
415{ "Configure","Konfiguriere" }, 415{ "Configure","Konfiguriere" },
416{ "Default","Voreinstellungen" }, 416{ "Default","Voreinstellungen" },
417{ "Addressbook","Adressbuch" }, 417{ "Addressbook","Adressbuch" },
418{ "Details view font","Schriftart Detailansicht" }, 418{ "Details view font","Schriftart Detailansicht" },
419{ "phone:123","phone:123" }, 419{ "phone:123","phone:123" },
420{ "Search only after <return> key pressed","Suche nur nach <return> Taste" }, 420{ "Search only after <return> key pressed","Suche nur nach <return> Taste" },
421{ "Show edit dialog on single click","Zeige Edit Dialog bei Einzelklick" }, 421{ "Show edit dialog on single click","Zeige Edit Dialog bei Einzelklick" },
422{ "Automatic name parsing for new contacts","Automa. Name Parsen für neue Kontakte" }, 422{ "Automatic name parsing for new contacts","Automa. Name Parsen für neue Kontakte" },
423{ "Display List and Details at once (restart)","Zeige Liste und Details zusammen(neustart)" }, 423{ "Display List and Details at once (restart)","Zeige Liste und Details zusammen(neustart)" },
424{ "Show exit confirmation","Vor dem Beenden nachfragen" }, 424{ "Show exit confirmation","Vor dem Beenden nachfragen" },
425{ "General","Allgemein" }, 425{ "General","Allgemein" },
426{ "Extensions (restart)","Extensions (restart)" }, 426{ "Extensions (restart)","Extensions (restart)" },
427{ "Description","Beschreibungen" }, 427{ "Description","Beschreibungen" },
428{ "Extensions","Extensions" }, 428{ "Extensions","Extensions" },
429{ "Prefixes","Prefixe" }, 429{ "Prefixes","Prefixe" },
430{ "Inclusions","Inclusions" }, 430{ "Inclusions","Inclusions" },
431{ "Suffixes","Suffixe" }, 431{ "Suffixes","Suffixe" },
432{ "Default formatted name:","Default format. Name:" }, 432{ "Default formatted name:","Default format. Name:" },
433{ "Empty","Leer" }, 433{ "Empty","Leer" },
434{ "Simple Name","Einfacher Name" }, 434{ "Simple Name","Einfacher Name" },
435{ "Full Name","Voller Name" }, 435{ "Full Name","Voller Name" },
436{ "Reverse Name","Namen umdrehen" }, 436{ "Reverse Name","Namen umdrehen" },
437{ "Contact","Kontakt" }, 437{ "Contact","Kontakt" },
438{ "Global","Allgemein" }, 438{ "Global","Allgemein" },
439{ "Phone","Telefon" }, 439{ "Phone","Telefon" },
440{ "SMS","SMS" }, 440{ "SMS","SMS" },
441{ "Language:(needs restart)","Sprache:(Neustart)" }, 441{ "Language:(needs restart)","Sprache:(Neustart)" },
442{ "English","English" }, 442{ "English","English" },
443{ "German","Deutsch" }, 443{ "German","Deutsch" },
444{ "French","Französisch" }, 444{ "French","Französisch" },
445{ "Italian","Italienisch" }, 445{ "Italian","Italienisch" },
446{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" }, 446{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" },
447{ "Time Format(nr):","Zeit Format(nr):" }, 447{ "Time Format(nr):","Zeit Format(nr):" },
448{ "24:00","24:00" }, 448{ "24:00","24:00" },
449{ "12:00am","12:00am" }, 449{ "12:00am","12:00am" },
450{ "Week starts on Sunday","Woche beginnt Sonntags" }, 450{ "Week starts on Sunday","Woche beginnt Sonntags" },
451{ "Locale","Locale" }, 451{ "Locale","Locale" },
452{ "Date Format:","Datums Format:" }, 452{ "Date Format:","Datums Format:" },
453{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 453{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
454{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 454{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
455{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 455{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
456{ "User defined","Benutzerdefiniert" }, 456{ "User defined","Benutzerdefiniert" },
457{ "User long date:","Format langes Datum:" }, 457{ "User long date:","Format langes Datum:" },
458{ "User short date:","Format kurzes Datum:" }, 458{ "User short date:","Format kurzes Datum:" },
459{ "Daylight start:","Sommerzeit Start:" }, 459{ "Daylight start:","Sommerzeit Start:" },
460{ "Daylight end:","Sommerzeit Ende:" }, 460{ "Daylight end:","Sommerzeit Ende:" },
461{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 461{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
462{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" }, 462{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" },
463{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 463{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
464{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 464{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
465{ "Date Format","Datums Format" }, 465{ "Date Format","Datums Format" },
466{ "Timezone:","Zeitzone:" }, 466{ "Timezone:","Zeitzone:" },
467{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 467{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
468{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 468{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
469{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 469{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
470{ "Used Mail Client","Benutzter Mail Client" }, 470{ "Used Mail Client","Benutzter Mail Client" },
471{ "Channel:","Channel:" }, 471{ "Channel:","Channel:" },
472{ "Message:","Message:" }, 472{ "Message:","Message:" },
473{ "Parameters:","Parameter:" }, 473{ "Parameters:","Parameter:" },
474{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 474{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
475{ "extra Message:","extra Message:" }, 475{ "extra Message:","extra Message:" },
476{ "extra Parameters:","extra Parameter:" }, 476{ "extra Parameters:","extra Parameter:" },
477{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 477{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
478{ "External Apps.","Externe Appl." }, 478{ "External Apps.","Externe Appl." },
479{ "Used %1 Client","Benutzer %1 Client" }, 479{ "Used %1 Client","Benutzer %1 Client" },
480{ "No email client installed","Keine Email Client installiert" }, 480{ "No email client installed","Keine Email Client installiert" },
481{ "Userdefined email client","Benutzerdef. Email Client" }, 481{ "Userdefined email client","Benutzerdef. Email Client" },
482{ "OM/Pi email client","OM/Pi Email Client" }, 482{ "OM/Pi email client","OM/Pi Email Client" },
483{ "Close KA/Pi?","Schließe KA/Pi?" }, 483{ "Close KA/Pi?","Schließe KA/Pi?" },
484{ "\nChanges will be saved!","\nÄnderungen werden gespeichert!" }, 484{ "\nChanges will be saved!","\nÄnderungen werden gespeichert!" },
485{ "Yes!","Ja!" }, 485{ "Yes!","Ja!" },
486{ "There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. ","#There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. " }, 486{ "There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. ","#There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. " },
487{ "Saving addressbook ... ","Speichere Adressbuch ... " }, 487{ "Saving addressbook ... ","Speichere Adressbuch ... " },
488{ "Addressbook saved!","Adressbuch gespeichert!" }, 488{ "Addressbook saved!","Adressbuch gespeichert!" },
489{ "Default Table View","Default Tabellenansicht" }, 489{ "Default Table View","Default Tabellenansicht" },
490{ "Merge and Remove","Zusammenfügen/entfernen" }, 490{ "Merge and Remove","Zusammenfügen/entfernen" },
491{ "Merge","Zusammenfügen" }, 491{ "Merge","Zusammenfügen" },
492{ "Merge Contacts Editor","Contact-Zusammenfüge-Editor" }, 492{ "Merge Contacts Editor","Contact-Zusammenfüge-Editor" },
493{ "New List...","Neue Liste..." }, 493{ "New List...","Neue Liste..." },
494{ "Rename List...","Ändere Namen..." }, 494{ "Rename List...","Ändere Namen..." },
495{ "Remove List","Lösche Liste" }, 495{ "Remove List","Lösche Liste" },
496{ "Add Contact","Kontakt hinzu" }, 496{ "Add Contact","Kontakt hinzu" },
497{ "Change Email...","Ändere Email..." }, 497{ "Change Email...","Ändere Email..." },
498{ "Remove Contact","Entferne Kontakt" }, 498{ "Remove Contact","Entferne Kontakt" },
499{ "Use Preferred","Nutze Preferred" }, 499{ "Use Preferred","Nutze Preferred" },
500{ "Distribution List Editor","Distribution List Editor" }, 500{ "Distribution List Editor","Distribution List Editor" },
501{ "Choose which contacts to export","Wähle Kontakte zum Exportieren" }, 501{ "Choose which contacts to export","Wähle Kontakte zum Exportieren" },
502{ "Which contacts do you want to export?","Welche Kontakte sollen exportiert werden?" }, 502{ "Which contacts do you want to export?","Welche Kontakte sollen exportiert werden?" },
503{ "Contact Selection","Kontaktauswahl" }, 503{ "Contact Selection","Kontaktauswahl" },
504{ "&All","&Alle" }, 504{ "&All","&Alle" },
505{ "Export the entire address book","Exportiere das komplette Addressbuch" }, 505{ "Export the entire address book","Exportiere das komplette Addressbuch" },
506{ "&Selected","Au&sgewählte" }, 506{ "&Selected","Au&sgewählte" },
507{ "Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","###Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected." }, 507{ "Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","###Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected." },
508{ "By matching &filter","Zutreffender &Filter" }, 508{ "By matching &filter","Zutreffender &Filter" },
509{ "Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","###Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters" }, 509{ "Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","###Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters" },
510{ "By Cate&gories","Kategorien" }, 510{ "By Cate&gories","Kategorien" },
511{ "Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","###Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories." }, 511{ "Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","###Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories." },
512{ "Select a filter to decide which contacts to export.","Wähle Filter zum Export aus." }, 512{ "Select a filter to decide which contacts to export.","Wähle Filter zum Export aus." },
513{ "Check the categories whose members you want to export.","Wähle die Kategorien zum Export aus." }, 513{ "Check the categories whose members you want to export.","Wähle die Kategorien zum Export aus." },
514{ "Sorting","Sortieren" }, 514{ "Sorting","Sortieren" },
515{ "Criterion:","Merkmal:" }, 515{ "Criterion:","Merkmal:" },
516{ "Order:","Reihenfolge:" }, 516{ "Order:","Reihenfolge:" },
517{ "Ascending","Aufsteigend" }, 517{ "Ascending","Aufsteigend" },
518{ "Descending","Absteigend" }, 518{ "Descending","Absteigend" },
519{ "Save file","Datei speichern" }, 519{ "Save file","Datei speichern" },
520{ "Error","Fehler" }, 520{ "Error","Fehler" },
521{ "Unable to export contacts.","Exportieren der Kontakte geht nicht." }, 521{ "Unable to export contacts.","Exportieren der Kontakte geht nicht." },
522{ "\nNo unsaved changes detected!\nNothing will be saved!","\nKeine ungespeicherten\nÄnderungen erkannt!\nNichts wird gespeichert!" }, 522{ "\nNo unsaved changes detected!\nNothing will be saved!","\nKeine ungespeicherten\nÄnderungen erkannt!\nNichts wird gespeichert!" },
523{ "Manage new categories...","Verwalte neue Kategorien..." }, 523{ "Manage new categories...","Verwalte neue Kategorien..." },
524{ "&File","Datei" }, 524{ "&File","Datei" },
525{ "&Edit","Bearbeite" }, 525{ "&Edit","Bearbeite" },
526{ "&View","Ansichten" }, 526{ "&View","Ansichten" },
527{ "&Settings","Konfiguration" }, 527{ "&Settings","Konfiguration" },
528{ "&Change selected","Ändere Selekt." }, 528{ "&Change selected","Ändere Selekt." },
529{ "&Help","Hilfe" }, 529{ "&Help","Hilfe" },
530{ "Remove sync info","Entferne Sync Info" }, 530{ "Remove sync info","Entferne Sync Info" },
531{ "For all profiles","Für alle Profile" }, 531{ "For all profiles","Für alle Profile" },
532{ "&Change","Ändere" }, 532{ "&Change","Ändere" },
533{ "Import xml (Qtopia)...","Importiere xml (Qtopia)..." }, 533{ "Import xml (Qtopia)...","Importiere xml (Qtopia)..." },
534{ "Export xml (Qtopia)...","Exportiere xml (Qtopia)..." }, 534{ "Export xml (Qtopia)...","Exportiere xml (Qtopia)..." },
535{ "Export to phone","Exportiere aufs Handy..." }, 535{ "Export to phone","Exportiere aufs Handy..." },
536{ "Which contacts do you want to select?","Welche Kontakte möchten Sie wählen?" }, 536{ "Which contacts do you want to select?","Welche Kontakte möchten Sie wählen?" },
537{ "&Modify","Ändere" }, 537{ "&Modify","Ändere" },
538{ "Choose which contacts to select","Bitte Kontakte auswählen!" }, 538{ "Choose which contacts to select","Bitte Kontakte auswählen!" },
539{ "After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nKontakten geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, 539{ "After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nKontakten geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " },
540{ "Manage new Categories","Verwalte neue Kategorien" }, 540{ "Manage new Categories","Verwalte neue Kategorien" },
541{ "Add to category list","Füge zur Kategorieliste hinzu" }, 541{ "Add to category list","Füge zur Kategorieliste hinzu" },
542{ "Remove from addressees","Entferne von den Kontakten" }, 542{ "Remove from addressees","Entferne von den Kontakten" },
543{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, 543{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" },
544{ "A&dd","Hinzufügen" }, 544{ "A&dd","Hinzufügen" },
545{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 545{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
546{ "NOTE: This will remove all old\ncontact data on phone!","ACHTUNG: Das löscht alle alten\nKontakt Daten auf dem Handy!" }, 546{ "NOTE: This will remove all old\ncontact data on phone!","ACHTUNG: Das löscht alle alten\nKontakt Daten auf dem Handy!" },
547{ "Export to mobile phone!","Exportiere auf das Handy!" }, 547{ "Export to mobile phone!","Exportiere auf das Handy!" },
548{ "Export to phone options","Export ans Handy Optionen" }, 548{ "Export to phone options","Export ans Handy Optionen" },
549{ "Writing to phone...","Sende Daten ans Handy..." }, 549{ "Writing to phone...","Sende Daten ans Handy..." },
550{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 550{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
551{ "Retry","Nochmal versuchen" }, 551{ "Retry","Nochmal versuchen" },
552{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 552{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
553{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 553{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
554{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 554{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
555{ "&Print View","Drucke Ansicht" }, 555{ "&Print View","Drucke Ansicht" },
556{ "&Print Details","Drucke Details" }, 556{ "&Print Details","Drucke Details" },
557{ "Beam v&Card(s)...","Beame v&Card(s)..." }, 557{ "Beam v&Card(s)...","Beame v&Card(s)..." },
558{ "Set formatted name...","Setze formatierten Namen..." }, 558{ "Set formatted name...","Setze formatierten Namen..." },
559{ "Kde Sync HowTo","Kde Sync HowTo" }, 559{ "Kde Sync HowTo","Kde Sync HowTo" },
560{ "Multi Sync HowTo","Multi Sync HowTo" }, 560{ "Multi Sync HowTo","Multi Sync HowTo" },
561{ "&Beam","&Beame" }, 561{ "&Beam","&Beame" },
562{ "Edit Email Addresses","Editiere Email Adressen" }, 562{ "Edit Email Addresses","Editiere Email Adressen" },
563{ "Email address:","Email Adresse:" }, 563{ "Email address:","Email Adresse:" },
564{ "Change","Ändere" }, 564{ "Change","Ändere" },
565{ "Set Standard","Setze Standard" }, 565{ "Set Standard","Setze Standard" },
566{ "New Contact","Neuer Contact" }, 566{ "New Contact","Neuer Contact" },
567{ "Undo %1","Rückgängig %1" }, 567{ "Undo %1","Rückgängig %1" },
568{ "Redo","Wiederholen" }, 568{ "Redo","Wiederholen" },
569{ "Saving ... please wait! ","Am Speichern ... bitte warten! " }, 569{ "Saving ... please wait! ","Am Speichern ... bitte warten! " },
570{ "CSV Import Dialog","CSV Import Dialog" }, 570{ "CSV Import Dialog","CSV Import Dialog" },
571{ "File to import:","Datei zum Import:" }, 571{ "File to import:","Datei zum Import:" },
572{ "Delimiter","Trennzeichen" }, 572{ "Delimiter","Trennzeichen" },
573{ "Comma","Komma" }, 573{ "Comma","Komma" },
574{ "Semicolon","Semikolon" }, 574{ "Semicolon","Semikolon" },
575{ "Tabulator","Tabulator" }, 575{ "Tabulator","Tabulator" },
576{ "Space","Leerzeichen" }, 576{ "Space","Leerzeichen" },
577{ "1","1" }, 577{ "1","1" },
578{ """,""" }, 578{ """,""" },
579{ "'","'" }, 579{ "'","'" },
580{ "Start at line:","Beginne mit Zeile:" }, 580{ "Start at line:","Beginne mit Zeile:" },
581{ "Textquote:","Textquote:" }, 581{ "Textquote:","Textquote:" },
582{ "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" }, 582{ "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" },
583{ "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" }, 583{ "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" },
584{ "Override previously imported entries?","Überschreibe bereits importierte Einträge?" }, 584{ "Override previously imported entries?","Überschreibe bereits importierte Einträge?" },
585{ "Select vCard to Import","Selektiere zu importierende vCard" }, 585{ "Select vCard to Import","Selektiere zu importierende vCard" },
586{ "Information","Information" }, 586{ "Information","Information" },
587{ "Import xml file","Importiere xml Datei" }, 587{ "Import xml file","Importiere xml Datei" },
588{ "Choose contact selection","Wähle Kontakt Auswahl" }, 588{ "Choose contact selection","Wähle Kontakt Auswahl" },
589{ "Select the entire address book","Wähle das ganze Adressbuch" }, 589{ "Select the entire address book","Wähle das ganze Adressbuch" },
590{ "Only contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","Nur in KA/Pi selektierte Kontate.\nDiese Option ist nicht verfügbar\nwhen keine Kontakte selektiert sind." }, 590{ "Only contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","Nur in KA/Pi selektierte Kontate.\nDiese Option ist nicht verfügbar\nwhen keine Kontakte selektiert sind." },
591{ "Only contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","Nur Kontakte die auf den Filter zutreffen.\nDiese Option ist nicht verfügbar, wenn keine Filter definiert sind." }, 591{ "Only contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","Nur Kontakte die auf den Filter zutreffen.\nDiese Option ist nicht verfügbar, wenn keine Filter definiert sind." },
592{ "Only contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","Nur Kontakte die Mitglieder der Kategirien sind,\die links selektiert sind.\nDiese Option ist nicht verfügbar, wenn es keine Kategirien gibt." }, 592{ "Only contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","Nur Kontakte die Mitglieder der Kategirien sind,\die links selektiert sind.\nDiese Option ist nicht verfügbar, wenn es keine Kategirien gibt." },
593{ "Select a filter to decide which contacts to select.","Selektiere einen Filter um festzulegen welche Kontakte ausgewählt werden sollen." }, 593{ "Select a filter to decide which contacts to select.","Selektiere einen Filter um festzulegen welche Kontakte ausgewählt werden sollen." },
594{ "Check the categories whose members you want to select.","Setzte die Kategorien, dessen Mitglieder Sie auswählen möchten." }, 594{ "Check the categories whose members you want to select.","Setzte die Kategorien, dessen Mitglieder Sie auswählen möchten." },
595{ "I/O device: ","I/O device: " }, 595{ "I/O device: ","I/O device: " },
596{ "Connection: ","Connection: " }, 596{ "Connection: ","Connection: " },
597{ "Model(opt.): ","Model(opt.): " }, 597{ "Model(opt.): ","Model(opt.): " },
598{ "Exporting to phone...","Exportiere aufs Handy..." }, 598{ "Exporting to phone...","Exportiere aufs Handy..." },
599{ "Error exporting to phone","Fehler beim Export aufs Handy" }, 599{ "Error exporting to phone","Fehler beim Export aufs Handy" },
600{ "contacts successfully exported.","Kontakte erfolgreich exportiert." }, 600{ "contacts successfully exported.","Kontakte erfolgreich exportiert." },
601{ "Do you want to remove<br>all existing entries from<br>%1<br>before exporting.?","Wollen Sie<br>alle existieren Einträge von<br>%1<br>vor dem Export entfernen?" }, 601{ "Do you want to remove<br>all existing entries from<br>%1<br>before exporting.?","Wollen Sie<br>alle existieren Einträge von<br>%1<br>vor dem Export entfernen?" },
602{ "Set formatted name","Setze formatierten Namen" }, 602{ "Set formatted name","Setze formatierten Namen" },
603{ "You can set the formatted name\nfor a list of contacts in one go.","Sie können den formatierten Namen für\nein Liste von Kontakten auf einmal setzen." }, 603{ "You can set the formatted name\nfor a list of contacts in one go.","Sie können den formatierten Namen für\nein Liste von Kontakten auf einmal setzen." },
604{ "Set formatted name to:","Setze formatierten Name auf:" }, 604{ "Set formatted name to:","Setze formatierten Name auf:" },
605{ "Simple: James Bond","Einfach: James Bond" }, 605{ "Simple: James Bond","Einfach: James Bond" },
606{ "Full: Mr. James 007 Bond I","Voll: Mr. James 007 Bond I" }, 606{ "Full: Mr. James 007 Bond I","Voll: Mr. James 007 Bond I" },
607{ "Reverse: Bond, James","Umgekehrt: Bond, James" }, 607{ "Reverse: Bond, James","Umgekehrt: Bond, James" },
608{ "Organization: MI6","Organisation: MI6" }, 608{ "Organization: MI6","Organisation: MI6" },
609{ "Set formatted name to\norganization, if name empty","Setze formatierten Namen auf\nOrganisation, wenn Name leer ist." }, 609{ "Set formatted name to\norganization, if name empty","Setze formatierten Namen auf\nOrganisation, wenn Name leer ist." },
610{ "Select contact list","Selektiere Kontakt Liste" }, 610{ "Select contact list","Selektiere Kontakt Liste" },
611{ "Changing contact #%1","Ändere Kontakt #%1" }, 611{ "Changing contact #%1","Ändere Kontakt #%1" },
612{ "Refreshing view...","Lade Ansicht neu..." }, 612{ "Refreshing view...","Lade Ansicht neu..." },
613{ "Setting formatted name completed!","Setzen vom formatierten Namen beendet!" }, 613{ "Setting formatted name completed!","Setzen vom formatierten Namen beendet!" },
614{ "Removing voice...","Entferne voice..." }, 614{ "Removing voice...","Entferne voice..." },
615{ "Remove voice completed!","Entferne voice beendet!" }, 615{ "Remove voice completed!","Entferne voice beendet!" },
616{ "Merge with existing categories?","Zu bestehenden\nKategorien hinzufügen?" }, 616{ "Merge with existing categories?","Zu bestehenden\nKategorien hinzufügen?" },
617{ "Setting categories ... please wait!","Setze Kategorien ... bitte warten!" }, 617{ "Setting categories ... please wait!","Setze Kategorien ... bitte warten!" },
618{ "Setting categories completed!","Setzen der Kategorien beendet!" }, 618{ "Setting categories completed!","Setzen der Kategorien beendet!" },
619{ "OK","OK" }, 619{ "OK","OK" },
620{ "Please wait, processing categories...","Bitte warten, bearbeite Kategorien..." }, 620{ "Please wait, processing categories...","Bitte warten, bearbeite Kategorien..." },
621{ "Processing contact #%1","Bearbeite Kontakt #%1" }, 621{ "Processing contact #%1","Bearbeite Kontakt #%1" },
622{ " categories added to list! "," Kategorien zur Liste hinzugefügt! " }, 622{ " categories added to list! "," Kategorien zur Liste hinzugefügt! " },
623{ "%1: %2","%1: %2" }, 623{ "%1: %2","%1: %2" },
624{ "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n","Ihr persönlicher Kontakt ist\nnicht gesetzt! Bitte selektieren Sie\nihn und setzen ihn mit Menu:\nKonfiguration - Setze wer bin ich\n" }, 624{ "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n","Ihr persönlicher Kontakt ist\nnicht gesetzt! Bitte selektieren Sie\nihn und setzen ihn mit Menu:\nKonfiguration - Setze wer bin ich\n" },
625{ "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>","<qt>Wollen Sie wirklich<br><b>%1</b><br>als persönlichen Kontakt setzent?</qt>" }, 625{ "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>","<qt>Wollen Sie wirklich<br><b>%1</b><br>als persönlichen Kontakt setzent?</qt>" },
626{ "Cut","Ausschneiden" }, 626{ "Cut","Ausschneiden" },
627{ "Paste","Einfügen" }, 627{ "Paste","Einfügen" },
628{ "Delete","Löschen" }, 628{ "Delete","Löschen" },
629{ "Choose...","Wähle..." }, 629{ "Choose...","Wähle..." },
630{ "Add View","Ansicht hinzufügen" }, 630{ "Add View","Ansicht hinzufügen" },
631{ "View name:","Ansicht Name:" }, 631{ "View name:","Ansicht Name:" },
632{ "View Type","Typ der Ansicht" }, 632{ "View Type","Typ der Ansicht" },
633{ "Icons represent contacts. Very simple view.","Icons repräsentieren Kontakte. Sehr einfache Ansicht." }, 633{ "Icons represent contacts. Very simple view.","Icons repräsentieren Kontakte. Sehr einfache Ansicht." },
634{ "A listing of contacts in a table. Each cell of the table holds a field of the contact.","Eine Kontaktliste in einer Tabelle." }, 634{ "A listing of contacts in a table. Each cell of the table holds a field of the contact.","Eine Kontaktliste in einer Tabelle." },
635{ "Rolodex style cards represent contacts.","Rolodex Stil Karten repräsentieren Kontakte." }, 635{ "Rolodex style cards represent contacts.","Rolodex Stil Karten repräsentieren Kontakte." },
636{ "Draw &separators","Zeichne &Trennlinie" }, 636{ "Draw &separators","Zeichne &Trennlinie" },
637{ "Separator &width:","Trennlinien &Breite:" }, 637{ "Separator &width:","Trennlinien &Breite:" },
638{ "&Padding:","Füllung:" }, 638{ "&Padding:","Füllung:" },
639{ "Cards","Karten" }, 639{ "Cards","Karten" },
640{ "&Margin:","&Rand:" }, 640{ "&Margin:","&Rand:" },
641{ "Draw &borders","Zeichne Ränder" }, 641{ "Draw &borders","Zeichne Ränder" },
642{ "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data.","The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data." }, 642{ "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data.","The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, incrementing the item margin will add space between the focus rectangle and the item data." },
643{ "The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators.","The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators." }, 643{ "The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators.","The Item Spacing decides the distance (in pixels) between the items and anything else: the view borders, other items or column separators." },
644{ "Sets the width of column separators","Sets the width of column separators" }, 644{ "Sets the width of column separators","Sets the width of column separators" },
645{ "&Layout","&Layout" }, 645{ "&Layout","&Layout" },
646{ "Show &empty fields","Zeige leere Felder" }, 646{ "Show &empty fields","Zeige leere Felder" },
647{ "Show field &labels","Zeige Feld Label" }, 647{ "Show field &labels","Zeige Feld Label" },
648{ "Be&havior","Ver&halten" }, 648{ "Be&havior","Ver&halten" },
649{ "Header, Border and Separator Color","Kopf, Rand und Trennlinien Farbe" }, 649{ "Header, Border and Separator Color","Kopf, Rand und Trennlinien Farbe" },
650{ "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>","<qt>Sind Sie sicher, dass Sie die Ansicht <b>%1</b> löschen möchten?</qt>" }, 650{ "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>","<qt>Sind Sie sicher, dass Sie die Ansicht <b>%1</b> löschen möchten?</qt>" },
651{ "Confirm Delete","Bestätige Löschen" }, 651{ "Confirm Delete","Bestätige Löschen" },
652{ "Edit Address Book Filter","Editiere Adressbuch Filter" }, 652{ "Edit Address Book Filter","Editiere Adressbuch Filter" },
653{ "Category rule","Kategorie Regel" }, 653{ "Category rule","Kategorie Regel" },
654{ "Include categories","Inklusive" }, 654{ "Include categories","Inklusive" },
655{ "Exclude categories","Exclusive" }, 655{ "Exclude categories","Exclusive" },
656{ "Include contacts, that are:","Schließe folgende Kontakte ein:" }, 656{ "Include contacts, that are:","Schließe folgende Kontakte ein:" },
657{ "public","Öffentlich" }, 657{ "public","Öffentlich" },
658{ "private","Privat" }, 658{ "private","Privat" },
659{ "confidential","Vertraulich" }, 659{ "confidential","Vertraulich" },
660{ "Configure Resources","Konfiguriere Resourcen" }, 660{ "Configure Resources","Konfiguriere Resourcen" },
661{ "Resource Configuration","Resource Konfiguration" }, 661{ "Resource Configuration","Resource Konfiguration" },
662{ "Resources","Resourcen" }, 662{ "Resources","Resourcen" },
663{ "Standard","Standard" }, 663{ "Standard","Standard" },
664{ "&Use as Standard","Setze als Standard" }, 664{ "&Use as Standard","Setze als Standard" },
665{ "Select type of the new resource:","Selektiere Typ der neuen Resource:" }, 665{ "Select type of the new resource:","Selektiere Typ der neuen Resource:" },
666{ "General Settings","Allgemeine Einstellungen" }, 666{ "General Settings","Allgemeine Einstellungen" },
667{ "Read-only","Nur-Lesen" }, 667{ "Read-only","Nur-Lesen" },
668{ "Include in sync","Schließe in Sync mit ein" }, 668{ "Include in sync","Schließe in Sync mit ein" },
669{ "%1 Resource Settings","%1 Resource Einstellungen" }, 669{ "%1 Resource Settings","%1 Resource Einstellungen" },
670{ "Format:","Format:" }, 670{ "Format:","Format:" },
671{ "Location:","Ort:" }, 671{ "Location:","Ort:" },
672{ "Full Menu bar (restart)","Volle Menu Leiste (Neustart!)" }, 672{ "Full Menu bar (restart)","Volle Menu Leiste (Neustart!)" },
673{ "Language","Sprache" }, 673{ "Language","Sprache" },
674{ "Time Format","Zeit Format" }, 674{ "Time Format","Zeit Format" },
675{ "Time Zone","Zeit Zone" }, 675{ "Time Zone","Zeit Zone" },
676{ "Data storage path","Daten Speicherpfad" }, 676{ "Data storage path","Daten Speicherpfad" },
677{ "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" }, 677{ "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" },
678{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 678{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
679{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 679{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
680{ "Save settings","Speichere Einstellungen" }, 680{ "Save settings","Speichere Einstellungen" },
681{ "Save standard","Speichere Standard" }, 681{ "Save standard","Speichere Standard" },
682{ "Save","Speichern" }, 682{ "Save","Speichern" },
683{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 683{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
684{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 684{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
685{ "Multiple Sync options","Multi Sync Optionen" }, 685{ "Multiple Sync options","Multi Sync Optionen" },
686{ "Sync algo options","Sync Ablauf Optionen" }, 686{ "Sync algo options","Sync Ablauf Optionen" },
687{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 687{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
688{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 688{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
689{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 689{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
690{ "Write back options","Optionen zum Zurückschreiben" }, 690{ "Write back options","Optionen zum Zurückschreiben" },
691{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 691{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
692{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 692{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
693{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 693{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
694{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 694{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
695{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 695{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
696{ "Time period","Zeitspanne" }, 696{ "Time period","Zeitspanne" },
697{ "From ","Von " }, 697{ "From ","Von " },
698{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 698{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
699{ " weeks in the future "," Wochen in der Zukunft " }, 699{ " weeks in the future "," Wochen in der Zukunft " },
700{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 700{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
701{ "Local temp file:","Lokale temp Datei:" }, 701{ "Local temp file:","Lokale temp Datei:" },
702{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 702{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
703{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 703{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
704{ "You cannot remove your standard resource!\n Please select a new standard resource first.","Standard Resource kann\nnicht entfernt werden!\nBitte eine andere Resource\nals Standard setzen." }, 704{ "You cannot remove your standard resource!\n Please select a new standard resource first.","Standard Resource kann\nnicht entfernt werden!\nBitte eine andere Resource\nals Standard setzen." },
705{ "Sorry","Tut mir leid" }, 705{ "Sorry","Tut mir leid" },
706{ "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" }, 706{ "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" },
707{ "Please restart to get the \nchanged resources (re)loaded!\n","Bitte starten Sie jetzt\ndas Programm neu, um die geänderten\nResourcen neu zu laden!\n" }, 707{ "Please restart to get the \nchanged resources (re)loaded!\n","Bitte starten Sie jetzt\ndas Programm neu, um die geänderten\nResourcen neu zu laden!\n" },
708{ "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n","Die gewählte Datei enthält\nkeine gültige vCard.\nBitte prüfen Sie die Datei\nund versuchen es erneut.\n" }, 708{ "The selected file does not\ninclude a valid vCard.\nPlease check the file and try again.\n","Die gewählte Datei enthält\nkeine gültige vCard.\nBitte prüfen Sie die Datei\nund versuchen es erneut.\n" },
709{ "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" }, 709{ "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" },
710{ "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" }, 710{ "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" },
711{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 711{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
712{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 712{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
713{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 713{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
714{ "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?" }, 714{ "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?" },
715{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 715{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
716{ "Error","Fehler" }, 716{ "Error","Fehler" },
717{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 717{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
718{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 718{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
719{ "Warning","Warnung" }, 719{ "Warning","Warnung" },
720{ "Select week number","Wähle Wochen Nummer" }, 720{ "Select week number","Wähle Wochen Nummer" },
721{ "Februar","Februar" }, 721{ "Februar","Februar" },
722{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 722{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
723{ "Password for remote access:","Passwort für fernen Zugriff:" }, 723{ "Password for remote access:","Passwort für fernen Zugriff:" },
724{ "Remote IP address:","Ferne IP Adresse:" }, 724{ "Remote IP address:","Ferne IP Adresse:" },
725{ "Remote port number:","Ferne Port Nummer:" }, 725{ "Remote port number:","Ferne Port Nummer:" },
726{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 726{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
727{ "Remote from: ","Fern von: " }, 727{ "Remote from: ","Fern von: " },
728{ "Local from: ","Lokal von: " }, 728{ "Local from: ","Lokal von: " },
729{ "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" }, 729{ "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" },
730{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 730{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
731{ "Write back","Schreibe zurück" }, 731{ "Write back","Schreibe zurück" },
732{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 732{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
733{ "Received sync request","Sync Anfrage erhalten" }, 733{ "Received sync request","Sync Anfrage erhalten" },
734{ "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." }, 734{ "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." },
735{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 735{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
736{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 736{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
737{ "Sending file...","Sende Datei..." }, 737{ "Sending file...","Sende Datei..." },
738{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 738{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
739{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 739{ "Receiving synced file...","Gesyncte Daten erhalten..." },
740{ "Received %1 bytes","%1 Bytes erhalten" }, 740{ "Received %1 bytes","%1 Bytes erhalten" },
741{ "Writing file to disk...","Speichere Datei..." }, 741{ "Writing file to disk...","Speichere Datei..." },
742{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 742{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
743{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 743{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
744{ "Synchronize!","Synchronisiere!" }, 744{ "Synchronize!","Synchronisiere!" },
745{ "High clock skew!","Großer Uhrzeitunterschied!" }, 745{ "High clock skew!","Großer Uhrzeitunterschied!" },
746{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 746{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
747{ "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!" }, 747{ "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!" },
748{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" }, 748{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" },
749{ "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" }, 749{ "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" },
750{ "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" }, 750{ "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" },
751{ "Edit new contact","Bearbeite neuen Kontakt" }, 751{ "Edit new contact","Bearbeite neuen Kontakt" },
752{ "Edit ","Bearbeite " }, 752{ "Edit ","Bearbeite " },
753{ "No contact changed!","Kein Kontakt verändert" }, 753{ "No contact changed!","Kein Kontakt verändert" },
754{ "%1 contacts changed!","%1 Kontakte geändert!" }, 754{ "%1 contacts changed!","%1 Kontakte geändert!" },
755{ "Mobile (home)","Handy (Arbeit)" }, 755{ "Mobile (home)","Handy (Arbeit)" },
756{ "Mobile (work)","Handy (Privat)" }, 756{ "Mobile (work)","Handy (Privat)" },
757{ "Def.Formatted Name","Def. Format. Name" }, 757{ "Def.Formatted Name","Def. Format. Name" },
758{ "Colors","Farben" }, 758{ "Colors","Farben" },
759{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 759{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
760{ "Backup enabled","Backup angeschaltet" }, 760{ "Backup enabled","Backup angeschaltet" },
761{ "Use standard backup dir","Standard Backupverzeichnis" }, 761{ "Use standard backup dir","Standard Backupverzeichnis" },
762{ "Number of Backups:","Anzahl der Backups" }, 762{ "Number of Backups:","Anzahl der Backups" },
763{ "Make backup every ","Mache ein Backup alle " }, 763{ "Make backup every ","Mache ein Backup alle " },
764{ " days"," Tage" }, 764{ " days"," Tage" },
765{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, 765{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
766{ "Backup Failed!","Backup Problem!" }, 766{ "Backup Failed!","Backup Problem!" },
767{ "Try again now","Versuche jetzt nochmal" }, 767{ "Try again now","Versuche jetzt nochmal" },
768{ "Try again later","Versuche später nochmal" }, 768{ "Try again later","Versuche später nochmal" },
769{ "Try again tomorrow","Versuche morgen nochmal" }, 769{ "Try again tomorrow","Versuche morgen nochmal" },
770{ "Disable backup","Schalte Backup ab" }, 770{ "Disable backup","Schalte Backup ab" },
771{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 771{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
772{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 772{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
773{ "Choose action","Wähle Aktion" }, 773{ "Choose action","Wähle Aktion" },
774{ "&Configure KA/Pi...","Konfiguriere KA/Pi..." }, 774{ "&Configure KA/Pi...","Konfiguriere KA/Pi..." },
775{ "Global Settings...","Globale Einstellungen..." }, 775{ "Global Settings...","Globale Einstellungen..." },
776{ "Spouse","Ehegatte" }, 776{ "Spouse","Ehegatte" },
777{ "Notes","Notizen" }, 777{ "Notes","Notizen" },
778{ "Messanger","Messanger" }, 778{ "Messanger","Messanger" },
779{ "Assistant","Assistent" }, 779{ "Assistant","Assistent" },
780{ "Manager","Manager" }, 780{ "Manager","Manager" },
781{ "Secrecy","Sichtbar" }, 781{ "Secrecy","Sichtbar" },
782{ "male","männlich" }, 782{ "male","männlich" },
783{ "female","weiblich" }, 783{ "female","weiblich" },
784{ "Hide!","Verbergen!" }, 784{ "Hide!","Verbergen!" },
785{ "Show!","Anzeigen!" }, 785{ "Show!","Anzeigen!" },
786{ "Details","Details" }, 786{ "Details","Details" },
787{ "Search:","Suche:" }, 787{ "Search:","Suche:" },
788{ "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, 788{ "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" },
789{ "Pi-Sync Port Error","Pi-Sync Port Fehler" }, 789{ "Pi-Sync Port Error","Pi-Sync Port Fehler" },
790{ "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, 790{ "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" },
791{ "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, 791{ "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" },
792{ "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, 792{ "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" },
793{ "Pi-Sync Error","Pi-Sync Fehler" }, 793{ "Pi-Sync Error","Pi-Sync Fehler" },
794{ "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, 794{ "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" },
795{ "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, 795{ "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" },
796{ "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, 796{ "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." },
797{ "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, 797{ "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" },
798{ "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, 798{ "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" },
799{ "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, 799{ "Pi-Sync: Connected!","Pi-Sync: Verbunden!" },
800{ "Receiving file from remote...","Empfange entfernte Datei..." }, 800{ "Receiving file from remote...","Empfange entfernte Datei..." },
801{ "Sending back synced file...","Sende synchronisierte Datei zurück..." }, 801{ "Sending back synced file...","Sende synchronisierte Datei zurück..." },
802{ "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, 802{ "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" },
803{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" }, 803{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" },
804{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, 804{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." },
805{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, 805{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" },
806{ "Writing back file ...","Schreibe Datei zurück..." }, 806{ "Writing back file ...","Schreibe Datei zurück..." },
807{ "Sending back file ...","Sende Datei zurück..." }, 807{ "Sending back file ...","Sende Datei zurück..." },
808{ "Eeek, there I am ticklish!","Huch, da bin ich kitzlig!" }, 808{ "Eeek, there I am ticklish!","Huch, da bin ich kitzlig!" },
809{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, 809{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" },
810{ "...and %1 more\ncontact(s) selected","...und noch %1 Kontakte\n mehr ausgewählt" }, 810{ "...and %1 more\ncontact(s) selected","...und noch %1 Kontakte\n mehr ausgewählt" },
811{ "Do you really\nwant to delete the\nsetected contact(s)?\n\n","Möchten Sie wirklich\ndie ausgewählten\nKontakte löschen?\n\n" }, 811{ "Do you really\nwant to delete the\nsetected contact(s)?\n\n","Möchten Sie wirklich\ndie ausgewählten\nKontakte löschen?\n\n" },
812{ "%1 contacts\nsuccessfully\nimported.","%1 Kontakte\nerfolgreich\nimportiert." }, 812{ "%1 contacts\nsuccessfully\nimported.","%1 Kontakte\nerfolgreich\nimportiert." },
813{ "Import this contact?","Importiere diesen Kontakt?" }, 813{ "Import this contact?","Importiere diesen Kontakt?" },
814{ "Import all!","Importiere alle!" }, 814{ "Import all!","Importiere alle!" },
815{ "","" }, 815{ "Loading addressbook data ... please wait","Lade Adressbuchdaten ... bitte warten" },
816{ "","" }, 816{ "","" },
817{ "","" }, 817{ "","" },
818{ "","" }, 818{ "","" },
819{ "","" }, 819{ "","" },
820{ "","" }, \ No newline at end of file 820{ "","" }, \ No newline at end of file
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp
index f17f366..a14ae20 100644
--- a/kabc/stdaddressbook.cpp
+++ b/kabc/stdaddressbook.cpp
@@ -1,229 +1,230 @@
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/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#include <qdir.h> 28#include <qdir.h>
29#include "resource.h" 29#include "resource.h"
30#include <kresources/manager.h> 30#include <kresources/manager.h>
31#include <kdebug.h> 31#include <kdebug.h>
32#include <klocale.h> 32#include <klocale.h>
33#include <kstaticdeleter.h> 33#include <kstaticdeleter.h>
34#include <kstandarddirs.h> 34#include <kstandarddirs.h>
35 35
36#include "stdaddressbook.h" 36#include "stdaddressbook.h"
37 37
38using namespace KABC; 38using namespace KABC;
39 39
40StdAddressBook *StdAddressBook::mSelf = 0; 40StdAddressBook *StdAddressBook::mSelf = 0;
41bool StdAddressBook::mAutomaticSave = false; 41bool StdAddressBook::mAutomaticSave = false;
42 42
43static KStaticDeleter<StdAddressBook> addressBookDeleter; 43static KStaticDeleter<StdAddressBook> addressBookDeleter;
44 44
45QString StdAddressBook::fileName() 45QString StdAddressBook::fileName()
46{ 46{
47 return locateLocal( "data", "kabc/std.vcf" ); 47 return locateLocal( "data", "kabc/std.vcf" );
48} 48}
49 49
50QString StdAddressBook::directoryName() 50QString StdAddressBook::directoryName()
51{ 51{
52 return locateLocal( "data", "kabc/stdvcf" ); 52 return locateLocal( "data", "kabc/stdvcf" );
53} 53}
54 54
55void StdAddressBook::handleCrash() 55void StdAddressBook::handleCrash()
56{ 56{
57 StdAddressBook::self()->cleanUp(); 57 StdAddressBook::self()->cleanUp();
58} 58}
59 59
60StdAddressBook *StdAddressBook::self() 60StdAddressBook *StdAddressBook::self()
61{ 61{
62 62
63 if ( !mSelf ) 63 if ( !mSelf )
64 { 64 {
65 QString appdir = StdAddressBook::setTempAppDir(); 65 QString appdir = StdAddressBook::setTempAppDir();
66// US im am not sure why I have to use the other format here?? 66// US im am not sure why I have to use the other format here??
67#ifdef KAB_EMBEDDED 67#ifdef KAB_EMBEDDED
68 mSelf = addressBookDeleter.setObject( new StdAddressBook ); 68 mSelf = addressBookDeleter.setObject( new StdAddressBook );
69#else //KAB_EMBEDDED 69#else //KAB_EMBEDDED
70 addressBookDeleter.setObject( mSelf, new StdAddressBook ); 70 addressBookDeleter.setObject( mSelf, new StdAddressBook );
71#endif //KAB_EMBEDDED 71#endif //KAB_EMBEDDED
72 KStandardDirs::setAppDir( appdir ); 72 KStandardDirs::setAppDir( appdir );
73 } 73 }
74 74
75 return mSelf; 75 return mSelf;
76} 76}
77 77
78QString StdAddressBook::setTempAppDir() 78QString StdAddressBook::setTempAppDir()
79{ 79{
80 QString appDIR = KStandardDirs::appDir(); 80 QString appDIR = KStandardDirs::appDir();
81#ifdef DESKTOP_VERSION 81#ifdef DESKTOP_VERSION
82 QString appdir = QDir::homeDirPath(); 82 QString appdir = QDir::homeDirPath();
83 if ( appdir.right(1) == "\\" || appdir.right(1) == "/" ) 83 if ( appdir.right(1) == "\\" || appdir.right(1) == "/" )
84 appdir += "kaddressbook/"; 84 appdir += "kaddressbook/";
85 else 85 else
86 appdir += "/kaddressbook/"; 86 appdir += "/kaddressbook/";
87 KStandardDirs::setAppDir( QDir::convertSeparators( appdir )); 87 KStandardDirs::setAppDir( QDir::convertSeparators( appdir ));
88#else 88#else
89 QString appdir = QDir::homeDirPath() + "/kdepim/apps/kaddressbook"; 89 QString appdir = QDir::homeDirPath() + "/kdepim/apps/kaddressbook";
90 90
91 KStandardDirs::setAppDir( appdir ); 91 KStandardDirs::setAppDir( appdir );
92#endif 92#endif
93 93
94 return appDIR; 94 return appDIR;
95} 95}
96StdAddressBook *StdAddressBook::self( bool onlyFastResources ) 96StdAddressBook *StdAddressBook::self( bool onlyFastResources )
97{ 97{
98 98
99 if ( !mSelf ) 99 if ( !mSelf )
100 { 100 {
101 QString appdir =StdAddressBook::setTempAppDir(); 101 QString appdir =StdAddressBook::setTempAppDir();
102#ifdef KAB_EMBEDDED 102#ifdef KAB_EMBEDDED
103 mSelf = addressBookDeleter.setObject( new StdAddressBook( onlyFastResources ) ); 103 mSelf = addressBookDeleter.setObject( new StdAddressBook( onlyFastResources ) );
104#else //KAB_EMBEDDED 104#else //KAB_EMBEDDED
105 addressBookDeleter.setObject( mSelf, new StdAddressBook( onlyFastResources ) ); 105 addressBookDeleter.setObject( mSelf, new StdAddressBook( onlyFastResources ) );
106#endif //KAB_EMBEDDED 106#endif //KAB_EMBEDDED
107 KStandardDirs::setAppDir( appdir ); 107 KStandardDirs::setAppDir( appdir );
108 } 108 }
109 return mSelf; 109 return mSelf;
110} 110}
111 111
112StdAddressBook::StdAddressBook() 112StdAddressBook::StdAddressBook()
113 : AddressBook( "kabcrc" ) 113 : AddressBook( "kabcrc" )
114{ 114{
115 115
116 init( false ); 116 //init( false );
117} 117}
118 118
119StdAddressBook::StdAddressBook( bool onlyFastResources ) 119StdAddressBook::StdAddressBook( bool onlyFastResources )
120 : AddressBook( "kabcrc" ) 120 : AddressBook( "kabcrc" )
121{ 121{
122 122
123 init( onlyFastResources ); 123 if ( onlyFastResources )
124 init( onlyFastResources );
124} 125}
125 126
126StdAddressBook::~StdAddressBook() 127StdAddressBook::~StdAddressBook()
127{ 128{
128 if ( mAutomaticSave ) 129 if ( mAutomaticSave )
129 save(); 130 save();
130} 131}
131 132
132void StdAddressBook::init( bool ) 133void StdAddressBook::init( bool )
133{ 134{
134 KRES::Manager<Resource> *manager = resourceManager(); 135 KRES::Manager<Resource> *manager = resourceManager();
135 KRES::Manager<Resource>::ActiveIterator it; 136 KRES::Manager<Resource>::ActiveIterator it;
136 137
137 for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { 138 for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) {
138 (*it)->setAddressBook( this ); 139 (*it)->setAddressBook( this );
139 if ( !(*it)->open() ) 140 if ( !(*it)->open() )
140 error( QString( "Unable to open resource '%1'!" ).arg( (*it)->resourceName() ) ); 141 error( QString( "Unable to open resource '%1'!" ).arg( (*it)->resourceName() ) );
141 } 142 }
142 143
143 Resource *res = standardResource(); 144 Resource *res = standardResource();
144 if ( !res ) { 145 if ( !res ) {
145 res = manager->createResource( "file" ); 146 res = manager->createResource( "file" );
146 if ( res ) 147 if ( res )
147 { 148 {
148 addResource( res ); 149 addResource( res );
149 } 150 }
150 else 151 else
151 qDebug(" No resource available!!!"); 152 qDebug(" No resource available!!!");
152 } 153 }
153 154
154 setStandardResource( res ); 155 setStandardResource( res );
155 manager->writeConfig(); 156 manager->writeConfig();
156 157
157 load(); 158 load();
158} 159}
159 160
160bool StdAddressBook::save() 161bool StdAddressBook::save()
161{ 162{
162 kdDebug(5700) << "StdAddressBook::save()" << endl; 163 kdDebug(5700) << "StdAddressBook::save()" << endl;
163 164
164 bool ok = true; 165 bool ok = true;
165 AddressBook *ab = self(); 166 AddressBook *ab = self();
166 167
167 ab->deleteRemovedAddressees(); 168 ab->deleteRemovedAddressees();
168 Iterator ait; 169 Iterator ait;
169 for ( ait = ab->begin(); ait != ab->end(); ++ait ) { 170 for ( ait = ab->begin(); ait != ab->end(); ++ait ) {
170 if ( !(*ait).IDStr().isEmpty() ) { 171 if ( !(*ait).IDStr().isEmpty() ) {
171 (*ait).insertCustom( "KADDRESSBOOK", "X-ExternalID", (*ait).IDStr() ); 172 (*ait).insertCustom( "KADDRESSBOOK", "X-ExternalID", (*ait).IDStr() );
172 } 173 }
173 } 174 }
174 KRES::Manager<Resource>::ActiveIterator it; 175 KRES::Manager<Resource>::ActiveIterator it;
175 KRES::Manager<Resource> *manager = ab->resourceManager(); 176 KRES::Manager<Resource> *manager = ab->resourceManager();
176 for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) { 177 for ( it = manager->activeBegin(); it != manager->activeEnd(); ++it ) {
177 if ( !(*it)->readOnly() && (*it)->isOpen() ) { 178 if ( !(*it)->readOnly() && (*it)->isOpen() ) {
178 Ticket *ticket = ab->requestSaveTicket( *it ); 179 Ticket *ticket = ab->requestSaveTicket( *it );
179// qDebug("StdAddressBook::save '%s'", (*it)->resourceName().latin1() ); 180// qDebug("StdAddressBook::save '%s'", (*it)->resourceName().latin1() );
180 if ( !ticket ) { 181 if ( !ticket ) {
181 ab->error( i18n( "Unable to save to resource '%1'. It is locked." ) 182 ab->error( i18n( "Unable to save to resource '%1'. It is locked." )
182 .arg( (*it)->resourceName() ) ); 183 .arg( (*it)->resourceName() ) );
183 return false; 184 return false;
184 } 185 }
185 186
186 if ( !ab->save( ticket ) ) 187 if ( !ab->save( ticket ) )
187 ok = false; 188 ok = false;
188 } 189 }
189 } 190 }
190 191
191 return ok; 192 return ok;
192} 193}
193 194
194void StdAddressBook::close() 195void StdAddressBook::close()
195{ 196{
196//US destructObject is not defined on my system???. Is setObject(0) the same ??? 197//US destructObject is not defined on my system???. Is setObject(0) the same ???
197//US addressBookDeleter.destructObject(); 198//US addressBookDeleter.destructObject();
198 addressBookDeleter.setObject(0); 199 addressBookDeleter.setObject(0);
199 200
200} 201}
201 202
202void StdAddressBook::setAutomaticSave( bool enable ) 203void StdAddressBook::setAutomaticSave( bool enable )
203{ 204{
204 mAutomaticSave = enable; 205 mAutomaticSave = enable;
205} 206}
206 207
207bool StdAddressBook::automaticSave() 208bool StdAddressBook::automaticSave()
208{ 209{
209 return mAutomaticSave; 210 return mAutomaticSave;
210} 211}
211 212
212// should get const for 4.X 213// should get const for 4.X
213Addressee StdAddressBook::whoAmI() 214Addressee StdAddressBook::whoAmI()
214{ 215{
215//US KConfig config( "kabcrc" ); 216//US KConfig config( "kabcrc" );
216 KConfig config( locateLocal("config", "kabcrc") ); 217 KConfig config( locateLocal("config", "kabcrc") );
217 config.setGroup( "General" ); 218 config.setGroup( "General" );
218 219
219 return findByUid( config.readEntry( "WhoAmI" ) ); 220 return findByUid( config.readEntry( "WhoAmI" ) );
220} 221}
221 222
222void StdAddressBook::setWhoAmI( const Addressee &addr ) 223void StdAddressBook::setWhoAmI( const Addressee &addr )
223{ 224{
224//US KConfig config( "kabcrc" ); 225//US KConfig config( "kabcrc" );
225 KConfig config( locateLocal("config", "kabcrc") ); 226 KConfig config( locateLocal("config", "kabcrc") );
226 config.setGroup( "General" ); 227 config.setGroup( "General" );
227 228
228 config.writeEntry( "WhoAmI", addr.uid() ); 229 config.writeEntry( "WhoAmI", addr.uid() );
229} 230}
diff --git a/kabc/stdaddressbook.h b/kabc/stdaddressbook.h
index 9ec53b0..cf130b3 100644
--- a/kabc/stdaddressbook.h
+++ b/kabc/stdaddressbook.h
@@ -1,151 +1,151 @@
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/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#ifndef KABC_STDADDRESSBOOK_H 28#ifndef KABC_STDADDRESSBOOK_H
29#define KABC_STDADDRESSBOOK_H 29#define KABC_STDADDRESSBOOK_H
30 30
31#include "addressbook.h" 31#include "addressbook.h"
32 32
33namespace KABC { 33namespace KABC {
34 34
35/** 35/**
36 Standard KDE address book 36 Standard KDE address book
37 37
38 This class provides access to the standard KDE address book shared by all 38 This class provides access to the standard KDE address book shared by all
39 applications. 39 applications.
40 40
41 It's implemented as a singleton. Use @ref self() to get the address book 41 It's implemented as a singleton. Use @ref self() to get the address book
42 object. On the first self() call the address book also gets loaded. 42 object. On the first self() call the address book also gets loaded.
43 43
44 Example: 44 Example:
45 45
46 <pre> 46 <pre>
47 KABC::AddressBook *ab = KABC::StdAddressBook::self(); 47 KABC::AddressBook *ab = KABC::StdAddressBook::self();
48 48
49 KABC::AddressBook::Iterator it; 49 KABC::AddressBook::Iterator it;
50 for ( it = ab->begin(); it != ab->end(); ++it ) { 50 for ( it = ab->begin(); it != ab->end(); ++it ) {
51 kdDebug() << "UID=" << (*it).uid() << endl; 51 kdDebug() << "UID=" << (*it).uid() << endl;
52 52
53 // do some other stuff 53 // do some other stuff
54 } 54 }
55 55
56 KABC::StdAddressBook::save(); 56 KABC::StdAddressBook::save();
57 </pre> 57 </pre>
58*/ 58*/
59class StdAddressBook : public AddressBook 59class StdAddressBook : public AddressBook
60{ 60{
61 public: 61 public:
62 62
63 /** 63 /**
64 Destructor. 64 Destructor.
65 */ 65 */
66 ~StdAddressBook(); 66 ~StdAddressBook();
67 67
68 /** 68 /**
69 Return the standard addressbook object. It also loads slow resources. 69 Return the standard addressbook object. It also loads slow resources.
70 It is the same as self(false); . 70 It is the same as self(false); .
71 */ 71 */
72 static StdAddressBook *self(); 72 static StdAddressBook *self();
73 73
74 /** 74 /**
75 This is the same as above, but with specified 75 This is the same as above, but with specified
76 behaviour of resource loading. 76 behaviour of resource loading.
77 77
78 @param onlyFastResource Only resources marked as 'fast' should be loaded 78 @param onlyFastResource Only resources marked as 'fast' should be loaded
79 */ 79 */
80 // FIXME for KDE4 return StdAddressBook and merge with the metod above -zecke 80 // FIXME for KDE4 return StdAddressBook and merge with the metod above -zecke
81 static StdAddressBook *self( bool onlyFastResources ); 81 static StdAddressBook *self( bool onlyFastResources );
82 82
83 /** 83 /**
84 Save the standard address book to disk. 84 Save the standard address book to disk.
85 */ 85 */
86 static bool save(); 86 static bool save();
87 87
88 /** 88 /**
89 Call this method in your crash handler to allow the library clean up 89 Call this method in your crash handler to allow the library clean up
90 possible locks. 90 possible locks.
91 */ 91 */
92 static void handleCrash(); 92 static void handleCrash();
93 93
94 /** 94 /**
95 Returns the default file name for vcard-based addressbook 95 Returns the default file name for vcard-based addressbook
96 */ 96 */
97 static QString fileName(); 97 static QString fileName();
98 98
99 /** 99 /**
100 Returns the default directory name for vcard-based addressbook 100 Returns the default directory name for vcard-based addressbook
101 */ 101 */
102 static QString directoryName(); 102 static QString directoryName();
103 103
104 /** 104 /**
105 Set the automatic save property of the address book. 105 Set the automatic save property of the address book.
106 If @p enable is TRUE (default) the address book is saved at 106 If @p enable is TRUE (default) the address book is saved at
107 destruction time otherwise you have to call @ref save() to 107 destruction time otherwise you have to call @ref save() to
108 explicitely save it. 108 explicitely save it.
109 */ 109 */
110 static void setAutomaticSave( bool enable ); 110 static void setAutomaticSave( bool enable );
111 111
112 /** 112 /**
113 Closes the address book. Depending on @ref automaticSave() it will 113 Closes the address book. Depending on @ref automaticSave() it will
114 save the address book first. 114 save the address book first.
115 */ 115 */
116 static void close(); 116 static void close();
117 117
118 /** 118 /**
119 Returns whether the address book is saved at destruction time. 119 Returns whether the address book is saved at destruction time.
120 See also @ref setAutomaticSave(). 120 See also @ref setAutomaticSave().
121 */ 121 */
122 static bool automaticSave(); 122 static bool automaticSave();
123 123
124 /** 124 /**
125 Returns the contact, that is associated with the owner of the 125 Returns the contact, that is associated with the owner of the
126 address book. This contact should be used by other programs 126 address book. This contact should be used by other programs
127 to access user specific data. 127 to access user specific data.
128 */ 128 */
129 Addressee whoAmI(); 129 Addressee whoAmI();
130 130
131 /** 131 /**
132 Sets the users contact. See @ref whoAmI() for more information. 132 Sets the users contact. See @ref whoAmI() for more information.
133 133
134 @param uid The uid of the users contact. 134 @param uid The uid of the users contact.
135 */ 135 */
136 void setWhoAmI( const Addressee &addr ); 136 void setWhoAmI( const Addressee &addr );
137 void init( bool onlyFastResources );
137 138
138 protected: 139 protected:
139 StdAddressBook(); 140 StdAddressBook();
140 StdAddressBook( bool onlyFastResources ); 141 StdAddressBook( bool onlyFastResources );
141 142
142 void init( bool onlyFastResources );
143 143
144 private: 144 private:
145 static QString setTempAppDir(); 145 static QString setTempAppDir();
146 static StdAddressBook *mSelf; 146 static StdAddressBook *mSelf;
147 static bool mAutomaticSave; 147 static bool mAutomaticSave;
148}; 148};
149 149
150} 150}
151#endif 151#endif
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index b9830b1..c670b1f 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1,1176 +1,1199 @@
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
25Enhanced Version of the file for platform independent KDE tools. 25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk 26Copyright (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#include <kprefsdialog.h> 99#include <kprefsdialog.h>
100 100
101 101
102//#include <qlabel.h> 102//#include <qlabel.h>
103 103
104 104
105#ifndef DESKTOP_VERSION 105#ifndef DESKTOP_VERSION
106#include <qpe/ir.h> 106#include <qpe/ir.h>
107#include <qpe/qpemenubar.h> 107#include <qpe/qpemenubar.h>
108#include <qtopia/qcopenvelope_qws.h> 108#include <qtopia/qcopenvelope_qws.h>
109#else 109#else
110 110
111#include <qmenubar.h> 111#include <qmenubar.h>
112#endif 112#endif
113 113
114#endif // KAB_EMBEDDED 114#endif // KAB_EMBEDDED
115#include "kcmconfigs/kcmkabconfig.h" 115#include "kcmconfigs/kcmkabconfig.h"
116#include "kcmconfigs/kcmkdepimconfig.h" 116#include "kcmconfigs/kcmkdepimconfig.h"
117#include "kpimglobalprefs.h" 117#include "kpimglobalprefs.h"
118#include "externalapphandler.h" 118#include "externalapphandler.h"
119#include "xxportselectdialog.h" 119#include "xxportselectdialog.h"
120 120
121 121
122#include <kresources/selectdialog.h> 122#include <kresources/selectdialog.h>
123#include <kmessagebox.h> 123#include <kmessagebox.h>
124 124
125#include <picture.h> 125#include <picture.h>
126#include <resource.h> 126#include <resource.h>
127 127
128//US#include <qsplitter.h> 128//US#include <qsplitter.h>
129#include <qmap.h> 129#include <qmap.h>
130#include <qdir.h> 130#include <qdir.h>
131#include <qfile.h> 131#include <qfile.h>
132#include <qvbox.h> 132#include <qvbox.h>
133#include <qlayout.h> 133#include <qlayout.h>
134#include <qclipboard.h> 134#include <qclipboard.h>
135#include <qtextstream.h> 135#include <qtextstream.h>
136#include <qradiobutton.h> 136#include <qradiobutton.h>
137#include <qbuttongroup.h> 137#include <qbuttongroup.h>
138 138
139#include <libkdepim/categoryselectdialog.h> 139#include <libkdepim/categoryselectdialog.h>
140#include <libkdepim/categoryeditdialog.h> 140#include <libkdepim/categoryeditdialog.h>
141#include <kabc/vcardconverter.h> 141#include <kabc/vcardconverter.h>
142 142
143 143
144#include "addresseeutil.h" 144#include "addresseeutil.h"
145#include "undocmds.h" 145#include "undocmds.h"
146#include "addresseeeditordialog.h" 146#include "addresseeeditordialog.h"
147#include "viewmanager.h" 147#include "viewmanager.h"
148#include "details/detailsviewcontainer.h" 148#include "details/detailsviewcontainer.h"
149#include "kabprefs.h" 149#include "kabprefs.h"
150#include "xxportmanager.h" 150#include "xxportmanager.h"
151#include "incsearchwidget.h" 151#include "incsearchwidget.h"
152#include "jumpbuttonbar.h" 152#include "jumpbuttonbar.h"
153#include "extensionmanager.h" 153#include "extensionmanager.h"
154#include "addresseeconfig.h" 154#include "addresseeconfig.h"
155#include "nameeditdialog.h" 155#include "nameeditdialog.h"
156#include <kcmultidialog.h> 156#include <kcmultidialog.h>
157 157
158#ifdef _WIN32_ 158#ifdef _WIN32_
159#ifdef _OL_IMPORT_ 159#ifdef _OL_IMPORT_
160#include "kaimportoldialog.h" 160#include "kaimportoldialog.h"
161#endif 161#endif
162#else 162#else
163#include <unistd.h> 163#include <unistd.h>
164#endif 164#endif
165// sync includes 165// sync includes
166#include <libkdepim/ksyncprofile.h> 166#include <libkdepim/ksyncprofile.h>
167#include <libkdepim/ksyncprefsdialog.h> 167#include <libkdepim/ksyncprefsdialog.h>
168 168
169 169
170class KABCatPrefs : public QDialog 170class KABCatPrefs : public QDialog
171{ 171{
172 public: 172 public:
173 KABCatPrefs( QWidget *parent=0, const char *name=0 ) : 173 KABCatPrefs( QWidget *parent=0, const char *name=0 ) :
174 QDialog( parent, name, true ) 174 QDialog( parent, name, true )
175 { 175 {
176 setCaption( i18n("Manage new Categories") ); 176 setCaption( i18n("Manage new Categories") );
177 QVBoxLayout* lay = new QVBoxLayout( this ); 177 QVBoxLayout* lay = new QVBoxLayout( this );
178 lay->setSpacing( 3 ); 178 lay->setSpacing( 3 );
179 lay->setMargin( 3 ); 179 lay->setMargin( 3 );
180 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 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 );
181 lay->addWidget( lab ); 181 lay->addWidget( lab );
182 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 182 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
183 lay->addWidget( format ); 183 lay->addWidget( format );
184 format->setExclusive ( true ) ; 184 format->setExclusive ( true ) ;
185 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 185 addCatBut = new QRadioButton(i18n("Add to category list"), format );
186 new QRadioButton(i18n("Remove from addressees"), format ); 186 new QRadioButton(i18n("Remove from addressees"), format );
187 addCatBut->setChecked( true ); 187 addCatBut->setChecked( true );
188 QPushButton * ok = new QPushButton( i18n("OK"), this ); 188 QPushButton * ok = new QPushButton( i18n("OK"), this );
189 lay->addWidget( ok ); 189 lay->addWidget( ok );
190 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 190 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
191 lay->addWidget( cancel ); 191 lay->addWidget( cancel );
192 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 192 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
193 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 193 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
194 resize( 200, 200 ); 194 resize( 200, 200 );
195 } 195 }
196 196
197 bool addCat() { return addCatBut->isChecked(); } 197 bool addCat() { return addCatBut->isChecked(); }
198private: 198private:
199 QRadioButton* addCatBut; 199 QRadioButton* addCatBut;
200}; 200};
201 201
202class KABFormatPrefs : public QDialog 202class KABFormatPrefs : public QDialog
203{ 203{
204 public: 204 public:
205 KABFormatPrefs( QWidget *parent=0, const char *name=0 ) : 205 KABFormatPrefs( QWidget *parent=0, const char *name=0 ) :
206 QDialog( parent, name, true ) 206 QDialog( parent, name, true )
207 { 207 {
208 setCaption( i18n("Set formatted name") ); 208 setCaption( i18n("Set formatted name") );
209 QVBoxLayout* lay = new QVBoxLayout( this ); 209 QVBoxLayout* lay = new QVBoxLayout( this );
210 lay->setSpacing( 3 ); 210 lay->setSpacing( 3 );
211 lay->setMargin( 3 ); 211 lay->setMargin( 3 );
212 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this ); 212 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this );
213 lay->addWidget( lab ); 213 lay->addWidget( lab );
214 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this ); 214 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this );
215 lay->addWidget( format ); 215 lay->addWidget( format );
216 format->setExclusive ( true ) ; 216 format->setExclusive ( true ) ;
217 simple = new QRadioButton(i18n("Simple: James Bond"), format ); 217 simple = new QRadioButton(i18n("Simple: James Bond"), format );
218 full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format ); 218 full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format );
219 reverse = new QRadioButton(i18n("Reverse: Bond, James"), format ); 219 reverse = new QRadioButton(i18n("Reverse: Bond, James"), format );
220 company = new QRadioButton(i18n("Organization: MI6"), format ); 220 company = new QRadioButton(i18n("Organization: MI6"), format );
221 simple->setChecked( true ); 221 simple->setChecked( true );
222 setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this); 222 setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this);
223 lay->addWidget( setCompany ); 223 lay->addWidget( setCompany );
224 QPushButton * ok = new QPushButton( i18n("Select contact list"), this ); 224 QPushButton * ok = new QPushButton( i18n("Select contact list"), this );
225 lay->addWidget( ok ); 225 lay->addWidget( ok );
226 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 226 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
227 lay->addWidget( cancel ); 227 lay->addWidget( cancel );
228 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 228 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
229 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 229 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
230 //resize( 200, 200 ); 230 //resize( 200, 200 );
231 231
232 } 232 }
233public: 233public:
234 QRadioButton* simple, *full, *reverse, *company; 234 QRadioButton* simple, *full, *reverse, *company;
235 QCheckBox* setCompany; 235 QCheckBox* setCompany;
236}; 236};
237 237
238 238
239 239
240class KAex2phonePrefs : public QDialog 240class KAex2phonePrefs : public QDialog
241{ 241{
242 public: 242 public:
243 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) : 243 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
244 QDialog( parent, name, true ) 244 QDialog( parent, name, true )
245 { 245 {
246 setCaption( i18n("Export to phone options") ); 246 setCaption( i18n("Export to phone options") );
247 QVBoxLayout* lay = new QVBoxLayout( this ); 247 QVBoxLayout* lay = new QVBoxLayout( this );
248 lay->setSpacing( 3 ); 248 lay->setSpacing( 3 );
249 lay->setMargin( 3 ); 249 lay->setMargin( 3 );
250 QLabel *lab; 250 QLabel *lab;
251 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 251 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
252 lab->setAlignment (AlignHCenter ); 252 lab->setAlignment (AlignHCenter );
253 QHBox* temphb; 253 QHBox* temphb;
254 temphb = new QHBox( this ); 254 temphb = new QHBox( this );
255 new QLabel( i18n("I/O device: "), temphb ); 255 new QLabel( i18n("I/O device: "), temphb );
256 mPhoneDevice = new QLineEdit( temphb); 256 mPhoneDevice = new QLineEdit( temphb);
257 lay->addWidget( temphb ); 257 lay->addWidget( temphb );
258 temphb = new QHBox( this ); 258 temphb = new QHBox( this );
259 new QLabel( i18n("Connection: "), temphb ); 259 new QLabel( i18n("Connection: "), temphb );
260 mPhoneConnection = new QLineEdit( temphb); 260 mPhoneConnection = new QLineEdit( temphb);
261 lay->addWidget( temphb ); 261 lay->addWidget( temphb );
262 temphb = new QHBox( this ); 262 temphb = new QHBox( this );
263 new QLabel( i18n("Model(opt.): "), temphb ); 263 new QLabel( i18n("Model(opt.): "), temphb );
264 mPhoneModel = new QLineEdit( temphb); 264 mPhoneModel = new QLineEdit( temphb);
265 lay->addWidget( temphb ); 265 lay->addWidget( temphb );
266 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); 266 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this );
267 // lay->addWidget( mWriteToSim ); 267 // lay->addWidget( mWriteToSim );
268 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); 268 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) );
269 lab->setAlignment (AlignHCenter); 269 lab->setAlignment (AlignHCenter);
270 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 270 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
271 lay->addWidget( ok ); 271 lay->addWidget( ok );
272 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 272 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
273 lay->addWidget( cancel ); 273 lay->addWidget( cancel );
274 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 274 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
275 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 275 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
276 resize( 220, 240 ); 276 resize( 220, 240 );
277 277
278 } 278 }
279 279
280public: 280public:
281 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 281 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
282 QCheckBox* mWriteToSim; 282 QCheckBox* mWriteToSim;
283}; 283};
284 284
285 285
286bool pasteWithNewUid = true; 286bool pasteWithNewUid = true;
287 287
288#ifdef KAB_EMBEDDED 288#ifdef KAB_EMBEDDED
289KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) 289KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name )
290 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 290 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
291 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ 291 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/
292 mReadWrite( readWrite ), mModified( false ), mMainWindow(client) 292 mReadWrite( readWrite ), mModified( false ), mMainWindow(client)
293#else //KAB_EMBEDDED 293#else //KAB_EMBEDDED
294KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) 294KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name )
295 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 295 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
296 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), 296 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ),
297 mReadWrite( readWrite ), mModified( false ) 297 mReadWrite( readWrite ), mModified( false )
298#endif //KAB_EMBEDDED 298#endif //KAB_EMBEDDED
299{ 299{
300 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 300 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
301 // syncManager->setBlockSave(false); 301 // syncManager->setBlockSave(false);
302 mIncSearchWidget = 0; 302 mIncSearchWidget = 0;
303 mMiniSplitter = 0; 303 mMiniSplitter = 0;
304 mExtensionBarSplitter = 0; 304 mExtensionBarSplitter = 0;
305 mIsPart = !parent->inherits( "KAddressBookMain" ); 305 mIsPart = !parent->inherits( "KAddressBookMain" );
306 mAddressBook = KABC::StdAddressBook::self(); 306 mAddressBook = KABC::StdAddressBook::self();
307 KABC::StdAddressBook::setAutomaticSave( false ); 307 KABC::StdAddressBook::setAutomaticSave( false );
308 308
309#ifndef KAB_EMBEDDED 309#ifndef KAB_EMBEDDED
310 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); 310 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler );
311#endif //KAB_EMBEDDED 311#endif //KAB_EMBEDDED
312 312
313 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), 313 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ),
314 SLOT( addressBookChanged() ) ); 314 SLOT( addressBookChanged() ) );
315 315
316#if 0 316#if 0
317 // LR moved to addressbook init method 317 // LR moved to addressbook init method
318 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, 318 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization,
319 "X-Department", "KADDRESSBOOK" ); 319 "X-Department", "KADDRESSBOOK" );
320 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, 320 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization,
321 "X-Profession", "KADDRESSBOOK" ); 321 "X-Profession", "KADDRESSBOOK" );
322 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, 322 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization,
323 "X-AssistantsName", "KADDRESSBOOK" ); 323 "X-AssistantsName", "KADDRESSBOOK" );
324 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, 324 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization,
325 "X-ManagersName", "KADDRESSBOOK" ); 325 "X-ManagersName", "KADDRESSBOOK" );
326 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, 326 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal,
327 "X-SpousesName", "KADDRESSBOOK" ); 327 "X-SpousesName", "KADDRESSBOOK" );
328 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, 328 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal,
329 "X-Office", "KADDRESSBOOK" ); 329 "X-Office", "KADDRESSBOOK" );
330 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, 330 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal,
331 "X-IMAddress", "KADDRESSBOOK" ); 331 "X-IMAddress", "KADDRESSBOOK" );
332 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, 332 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal,
333 "X-Anniversary", "KADDRESSBOOK" ); 333 "X-Anniversary", "KADDRESSBOOK" );
334 334
335 //US added this field to become compatible with Opie/qtopia addressbook 335 //US added this field to become compatible with Opie/qtopia addressbook
336 // values can be "female" or "male" or "". An empty field represents undefined. 336 // values can be "female" or "male" or "". An empty field represents undefined.
337 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, 337 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal,
338 "X-Gender", "KADDRESSBOOK" ); 338 "X-Gender", "KADDRESSBOOK" );
339 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, 339 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal,
340 "X-Children", "KADDRESSBOOK" ); 340 "X-Children", "KADDRESSBOOK" );
341 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, 341 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal,
342 "X-FreeBusyUrl", "KADDRESSBOOK" ); 342 "X-FreeBusyUrl", "KADDRESSBOOK" );
343#endif 343#endif
344 initGUI(); 344 initGUI();
345 345
346 mIncSearchWidget->setFocus(); 346 mIncSearchWidget->setFocus();
347 347
348 348
349 connect( mViewManager, SIGNAL( selected( const QString& ) ), 349 connect( mViewManager, SIGNAL( selected( const QString& ) ),
350 SLOT( setContactSelected( const QString& ) ) ); 350 SLOT( setContactSelected( const QString& ) ) );
351 connect( mViewManager, SIGNAL( executed( const QString& ) ), 351 connect( mViewManager, SIGNAL( executed( const QString& ) ),
352 SLOT( executeContact( const QString& ) ) ); 352 SLOT( executeContact( const QString& ) ) );
353 353
354 connect( mViewManager, SIGNAL( deleteRequest( ) ), 354 connect( mViewManager, SIGNAL( deleteRequest( ) ),
355 SLOT( deleteContacts( ) ) ); 355 SLOT( deleteContacts( ) ) );
356 connect( mViewManager, SIGNAL( modified() ), 356 connect( mViewManager, SIGNAL( modified() ),
357 SLOT( setModified() ) ); 357 SLOT( setModified() ) );
358 358
359 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); 359 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) );
360 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); 360 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) );
361 361
362 connect( mXXPortManager, SIGNAL( modified() ), 362 connect( mXXPortManager, SIGNAL( modified() ),
363 SLOT( setModified() ) ); 363 SLOT( setModified() ) );
364 364
365 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), 365 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
366 SLOT( incrementalSearchJump( const QString& ) ) ); 366 SLOT( incrementalSearchJump( const QString& ) ) );
367 connect( mIncSearchWidget, SIGNAL( fieldChanged() ), 367 connect( mIncSearchWidget, SIGNAL( fieldChanged() ),
368 mJumpButtonBar, SLOT( recreateButtons() ) ); 368 mJumpButtonBar, SLOT( recreateButtons() ) );
369 369
370 connect( mDetails, SIGNAL( sendEmail( const QString& ) ), 370 connect( mDetails, SIGNAL( sendEmail( const QString& ) ),
371 SLOT( sendMail( const QString& ) ) ); 371 SLOT( sendMail( const QString& ) ) );
372 372
373 373
374 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); 374 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&)));
375 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 (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)));
376 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); 376 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&)));
377 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); 377 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
378 connect( ExternalAppHandler::instance(), SIGNAL (doRingSync()),this, SLOT( doRingSync())); 378 connect( ExternalAppHandler::instance(), SIGNAL (doRingSync()),this, SLOT( doRingSync()));
379 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); 379 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog()));
380 380
381 381
382#ifndef KAB_EMBEDDED 382#ifndef KAB_EMBEDDED
383 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), 383 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
384 mXXPortManager, SLOT( importVCard( const KURL& ) ) ); 384 mXXPortManager, SLOT( importVCard( const KURL& ) ) );
385 385
386 connect( mDetails, SIGNAL( browse( const QString& ) ), 386 connect( mDetails, SIGNAL( browse( const QString& ) ),
387 SLOT( browse( const QString& ) ) ); 387 SLOT( browse( const QString& ) ) );
388 388
389 389
390 mAddressBookService = new KAddressBookService( this ); 390 mAddressBookService = new KAddressBookService( this );
391 391
392#endif //KAB_EMBEDDED 392#endif //KAB_EMBEDDED
393 393
394 mMessageTimer = new QTimer( this ); 394 mMessageTimer = new QTimer( this );
395 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); 395 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
396 mEditorDialog = 0; 396 mEditorDialog = 0;
397 createAddresseeEditorDialog( this ); 397 createAddresseeEditorDialog( this );
398 setModified( false ); 398 setModified( false );
399 mBRdisabled = false; 399 mBRdisabled = false;
400#ifndef DESKTOP_VERSION 400#ifndef DESKTOP_VERSION
401 infrared = 0; 401 infrared = 0;
402#endif 402#endif
403 //toggleBeamReceive( ); 403 //toggleBeamReceive( );
404 mMainWindow->toolBar()->show(); 404 mMainWindow->toolBar()->show();
405 // we have a toolbar repainting error on the Zaurus when starting KA/Pi 405 // we have a toolbar repainting error on the Zaurus when starting KA/Pi
406 QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 406 //QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
407 QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() ));
408}
409void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data )
410{
411 qDebug("KO: QCOP start message received: %s ", cmsg.data() );
412 mCStringMess = cmsg;
413 mByteData = data;
407} 414}
408 415
416void KABCore::loadDataAfterStart()
417{
418 qDebug("KABCore::loadDataAfterStart() ");
419 ((StdAddressBook*)mAddressBook)->init( true );
420 mViewManager->refreshView();
421
422#ifndef DESKTOP_VERSION
423 disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & )));
424
425 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
426 if ( !mCStringMess.isEmpty() )
427 ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData );
428#endif
429 QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
430 setCaptionBack();
431}
409void KABCore::updateToolBar() 432void KABCore::updateToolBar()
410{ 433{
411 static int iii = 0; 434 static int iii = 0;
412 ++iii; 435 ++iii;
413 mMainWindow->toolBar()->repaintMe(); 436 mMainWindow->toolBar()->repaintMe();
414 if ( iii < 4 ) 437 if ( iii < 4 )
415 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); 438 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar()));
416} 439}
417KABCore::~KABCore() 440KABCore::~KABCore()
418{ 441{
419 // save(); 442 // save();
420 //saveSettings(); 443 //saveSettings();
421 //KABPrefs::instance()->writeConfig(); 444 //KABPrefs::instance()->writeConfig();
422 delete AddresseeConfig::instance(); 445 delete AddresseeConfig::instance();
423 mAddressBook = 0; 446 mAddressBook = 0;
424 KABC::StdAddressBook::close(); 447 KABC::StdAddressBook::close();
425 448
426 delete syncManager; 449 delete syncManager;
427#ifndef DESKTOP_VERSION 450#ifndef DESKTOP_VERSION
428 if ( infrared ) 451 if ( infrared )
429 delete infrared; 452 delete infrared;
430#endif 453#endif
431} 454}
432void KABCore::receive( const QCString& cmsg, const QByteArray& data ) 455void KABCore::receive( const QCString& cmsg, const QByteArray& data )
433{ 456{
434 //qDebug("KA: QCOP message received: %s ", cmsg.data() ); 457 //qDebug("KA: QCOP message received: %s ", cmsg.data() );
435 if ( cmsg == "setDocument(QString)" ) { 458 if ( cmsg == "setDocument(QString)" ) {
436 QDataStream stream( data, IO_ReadOnly ); 459 QDataStream stream( data, IO_ReadOnly );
437 QString fileName; 460 QString fileName;
438 stream >> fileName; 461 stream >> fileName;
439 recieve( fileName ); 462 recieve( fileName );
440 return; 463 return;
441 } 464 }
442} 465}
443void KABCore::toggleBeamReceive( ) 466void KABCore::toggleBeamReceive( )
444{ 467{
445 if ( mBRdisabled ) 468 if ( mBRdisabled )
446 return; 469 return;
447#ifndef DESKTOP_VERSION 470#ifndef DESKTOP_VERSION
448 if ( infrared ) { 471 if ( infrared ) {
449 qDebug("KA: AB disable BeamReceive "); 472 qDebug("KA: AB disable BeamReceive ");
450 delete infrared; 473 delete infrared;
451 infrared = 0; 474 infrared = 0;
452 mActionBR->setChecked(false); 475 mActionBR->setChecked(false);
453 return; 476 return;
454 } 477 }
455 qDebug("KA: AB enable BeamReceive "); 478 qDebug("KA: AB enable BeamReceive ");
456 mActionBR->setChecked(true); 479 mActionBR->setChecked(true);
457 480
458 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; 481 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ;
459 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); 482 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& )));
460#endif 483#endif
461} 484}
462 485
463 486
464void KABCore::disableBR(bool b) 487void KABCore::disableBR(bool b)
465{ 488{
466#ifndef DESKTOP_VERSION 489#ifndef DESKTOP_VERSION
467 if ( b ) { 490 if ( b ) {
468 if ( infrared ) { 491 if ( infrared ) {
469 toggleBeamReceive( ); 492 toggleBeamReceive( );
470 } 493 }
471 mBRdisabled = true; 494 mBRdisabled = true;
472 } else { 495 } else {
473 if ( mBRdisabled ) { 496 if ( mBRdisabled ) {
474 mBRdisabled = false; 497 mBRdisabled = false;
475 //toggleBeamReceive( ); 498 //toggleBeamReceive( );
476 } 499 }
477 } 500 }
478#endif 501#endif
479 502
480} 503}
481void KABCore::recieve( QString fn ) 504void KABCore::recieve( QString fn )
482{ 505{
483 //qDebug("KABCore::recieve "); 506 //qDebug("KABCore::recieve ");
484 int count = mAddressBook->importFromFile( fn, true ); 507 int count = mAddressBook->importFromFile( fn, true );
485 if ( count ) 508 if ( count )
486 setModified( true ); 509 setModified( true );
487 mViewManager->refreshView(); 510 mViewManager->refreshView();
488 message(i18n("%1 contact(s) received!").arg( count )); 511 message(i18n("%1 contact(s) received!").arg( count ));
489 topLevelWidget()->showMaximized(); 512 topLevelWidget()->showMaximized();
490 topLevelWidget()->raise(); 513 topLevelWidget()->raise();
491} 514}
492void KABCore::restoreSettings() 515void KABCore::restoreSettings()
493{ 516{
494 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; 517 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce;
495 518
496 bool state; 519 bool state;
497 520
498 if (mMultipleViewsAtOnce) 521 if (mMultipleViewsAtOnce)
499 state = KABPrefs::instance()->mDetailsPageVisible; 522 state = KABPrefs::instance()->mDetailsPageVisible;
500 else 523 else
501 state = false; 524 state = false;
502 525
503 mActionDetails->setChecked( state ); 526 mActionDetails->setChecked( state );
504 setDetailsVisible( state ); 527 setDetailsVisible( state );
505 528
506 state = KABPrefs::instance()->mJumpButtonBarVisible; 529 state = KABPrefs::instance()->mJumpButtonBarVisible;
507 530
508 mActionJumpBar->setChecked( state ); 531 mActionJumpBar->setChecked( state );
509 setJumpButtonBarVisible( state ); 532 setJumpButtonBarVisible( state );
510/*US 533/*US
511 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; 534 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter;
512 if ( splitterSize.count() == 0 ) { 535 if ( splitterSize.count() == 0 ) {
513 splitterSize.append( width() / 2 ); 536 splitterSize.append( width() / 2 );
514 splitterSize.append( width() / 2 ); 537 splitterSize.append( width() / 2 );
515 } 538 }
516 mMiniSplitter->setSizes( splitterSize ); 539 mMiniSplitter->setSizes( splitterSize );
517 if ( mExtensionBarSplitter ) { 540 if ( mExtensionBarSplitter ) {
518 splitterSize = KABPrefs::instance()->mExtensionsSplitter; 541 splitterSize = KABPrefs::instance()->mExtensionsSplitter;
519 if ( splitterSize.count() == 0 ) { 542 if ( splitterSize.count() == 0 ) {
520 splitterSize.append( width() / 2 ); 543 splitterSize.append( width() / 2 );
521 splitterSize.append( width() / 2 ); 544 splitterSize.append( width() / 2 );
522 } 545 }
523 mExtensionBarSplitter->setSizes( splitterSize ); 546 mExtensionBarSplitter->setSizes( splitterSize );
524 547
525 } 548 }
526*/ 549*/
527 mViewManager->restoreSettings(); 550 mViewManager->restoreSettings();
528 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField ); 551 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField );
529 mExtensionManager->restoreSettings(); 552 mExtensionManager->restoreSettings();
530#ifdef DESKTOP_VERSION 553#ifdef DESKTOP_VERSION
531 int wid = width(); 554 int wid = width();
532 if ( wid < 10 ) 555 if ( wid < 10 )
533 wid = 400; 556 wid = 400;
534#else 557#else
535 int wid = QApplication::desktop()->width(); 558 int wid = QApplication::desktop()->width();
536 if ( wid < 640 ) 559 if ( wid < 640 )
537 wid = QApplication::desktop()->height(); 560 wid = QApplication::desktop()->height();
538#endif 561#endif
539 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; 562 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
540 if ( true /*splitterSize.count() == 0*/ ) { 563 if ( true /*splitterSize.count() == 0*/ ) {
541 splitterSize.append( wid / 2 ); 564 splitterSize.append( wid / 2 );
542 splitterSize.append( wid / 2 ); 565 splitterSize.append( wid / 2 );
543 } 566 }
544 mMiniSplitter->setSizes( splitterSize ); 567 mMiniSplitter->setSizes( splitterSize );
545 if ( mExtensionBarSplitter ) { 568 if ( mExtensionBarSplitter ) {
546 //splitterSize = KABPrefs::instance()->mExtensionsSplitter; 569 //splitterSize = KABPrefs::instance()->mExtensionsSplitter;
547 if ( true /*splitterSize.count() == 0*/ ) { 570 if ( true /*splitterSize.count() == 0*/ ) {
548 splitterSize.append( wid / 2 ); 571 splitterSize.append( wid / 2 );
549 splitterSize.append( wid / 2 ); 572 splitterSize.append( wid / 2 );
550 } 573 }
551 mExtensionBarSplitter->setSizes( splitterSize ); 574 mExtensionBarSplitter->setSizes( splitterSize );
552 575
553 } 576 }
554#ifdef DESKTOP_VERSION 577#ifdef DESKTOP_VERSION
555 KConfig *config = KABPrefs::instance()->getConfig(); 578 KConfig *config = KABPrefs::instance()->getConfig();
556 config->setGroup("WidgetLayout"); 579 config->setGroup("WidgetLayout");
557 QStringList list; 580 QStringList list;
558 list = config->readListEntry("MainLayout"); 581 list = config->readListEntry("MainLayout");
559 int x,y,w,h; 582 int x,y,w,h;
560 if ( ! list.isEmpty() ) { 583 if ( ! list.isEmpty() ) {
561 x = list[0].toInt(); 584 x = list[0].toInt();
562 y = list[1].toInt(); 585 y = list[1].toInt();
563 w = list[2].toInt(); 586 w = list[2].toInt();
564 h = list[3].toInt(); 587 h = list[3].toInt();
565 KApplication::testCoords( &x,&y,&w,&h ); 588 KApplication::testCoords( &x,&y,&w,&h );
566 topLevelWidget()->setGeometry(x,y,w,h); 589 topLevelWidget()->setGeometry(x,y,w,h);
567 590
568 } else { 591 } else {
569 topLevelWidget()->setGeometry( 40 ,40 , 640, 440); 592 topLevelWidget()->setGeometry( 40 ,40 , 640, 440);
570 } 593 }
571#endif 594#endif
572} 595}
573 596
574void KABCore::saveSettings() 597void KABCore::saveSettings()
575{ 598{
576 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); 599 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked();
577 if ( mExtensionBarSplitter ) 600 if ( mExtensionBarSplitter )
578 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 601 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
579 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); 602 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked();
580 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); 603 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes();
581#ifndef KAB_EMBEDDED 604#ifndef KAB_EMBEDDED
582 605
583 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 606 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
584 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); 607 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes();
585#endif //KAB_EMBEDDED 608#endif //KAB_EMBEDDED
586 mExtensionManager->saveSettings(); 609 mExtensionManager->saveSettings();
587 mViewManager->saveSettings(); 610 mViewManager->saveSettings();
588 611
589 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); 612 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem();
590 613
591 KABPrefs::instance()->writeConfig(); 614 KABPrefs::instance()->writeConfig();
592 qDebug("KA: KABCore::saveSettings() "); 615 qDebug("KA: KABCore::saveSettings() ");
593} 616}
594 617
595KABC::AddressBook *KABCore::addressBook() const 618KABC::AddressBook *KABCore::addressBook() const
596{ 619{
597 return mAddressBook; 620 return mAddressBook;
598} 621}
599 622
600KConfig *KABCore::config() 623KConfig *KABCore::config()
601{ 624{
602#ifndef KAB_EMBEDDED 625#ifndef KAB_EMBEDDED
603 return KABPrefs::instance()->config(); 626 return KABPrefs::instance()->config();
604#else //KAB_EMBEDDED 627#else //KAB_EMBEDDED
605 return KABPrefs::instance()->getConfig(); 628 return KABPrefs::instance()->getConfig();
606#endif //KAB_EMBEDDED 629#endif //KAB_EMBEDDED
607} 630}
608 631
609KActionCollection *KABCore::actionCollection() const 632KActionCollection *KABCore::actionCollection() const
610{ 633{
611 return mGUIClient->actionCollection(); 634 return mGUIClient->actionCollection();
612} 635}
613 636
614KABC::Field *KABCore::currentSearchField() const 637KABC::Field *KABCore::currentSearchField() const
615{ 638{
616 if (mIncSearchWidget) 639 if (mIncSearchWidget)
617 return mIncSearchWidget->currentField(); 640 return mIncSearchWidget->currentField();
618 else 641 else
619 return 0; 642 return 0;
620} 643}
621 644
622QStringList KABCore::selectedUIDs() const 645QStringList KABCore::selectedUIDs() const
623{ 646{
624 return mViewManager->selectedUids(); 647 return mViewManager->selectedUids();
625} 648}
626 649
627KABC::Resource *KABCore::requestResource( QWidget *parent ) 650KABC::Resource *KABCore::requestResource( QWidget *parent )
628{ 651{
629 QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); 652 QPtrList<KABC::Resource> kabcResources = addressBook()->resources();
630 653
631 QPtrList<KRES::Resource> kresResources; 654 QPtrList<KRES::Resource> kresResources;
632 QPtrListIterator<KABC::Resource> resIt( kabcResources ); 655 QPtrListIterator<KABC::Resource> resIt( kabcResources );
633 KABC::Resource *resource; 656 KABC::Resource *resource;
634 while ( ( resource = resIt.current() ) != 0 ) { 657 while ( ( resource = resIt.current() ) != 0 ) {
635 ++resIt; 658 ++resIt;
636 if ( !resource->readOnly() ) { 659 if ( !resource->readOnly() ) {
637 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 660 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
638 if ( res ) 661 if ( res )
639 kresResources.append( res ); 662 kresResources.append( res );
640 } 663 }
641 } 664 }
642 665
643 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent ); 666 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent );
644 return static_cast<KABC::Resource*>( res ); 667 return static_cast<KABC::Resource*>( res );
645} 668}
646 669
647#ifndef KAB_EMBEDDED 670#ifndef KAB_EMBEDDED
648KAboutData *KABCore::createAboutData() 671KAboutData *KABCore::createAboutData()
649#else //KAB_EMBEDDED 672#else //KAB_EMBEDDED
650void KABCore::createAboutData() 673void KABCore::createAboutData()
651#endif //KAB_EMBEDDED 674#endif //KAB_EMBEDDED
652{ 675{
653 676
654 677
655 QString version; 678 QString version;
656#include <../version> 679#include <../version>
657 QMessageBox::about( this, "About KAddressbook/Pi", 680 QMessageBox::about( this, "About KAddressbook/Pi",
658 "KAddressbook/Platform-independent\n" 681 "KAddressbook/Platform-independent\n"
659 "(KA/Pi) " +version + " - " + 682 "(KA/Pi) " +version + " - " +
660#ifdef DESKTOP_VERSION 683#ifdef DESKTOP_VERSION
661 "Desktop Edition\n" 684 "Desktop Edition\n"
662#else 685#else
663 "PDA-Edition\n" 686 "PDA-Edition\n"
664 "for: Zaurus 5500 / 7x0 / 8x0\n" 687 "for: Zaurus 5500 / 7x0 / 8x0\n"
665#endif 688#endif
666 689
667 "(c) 2004 Ulf Schenk\n" 690 "(c) 2004 Ulf Schenk\n"
668 "(c) 2004-2005 Lutz Rogowski\nrogowski@kde.org\n" 691 "(c) 2004-2005 Lutz Rogowski\nrogowski@kde.org\n"
669 "(c) 1997-2003, The KDE PIM Team\n" 692 "(c) 1997-2003, The KDE PIM Team\n"
670 "Tobias Koenig Maintainer\n" 693 "Tobias Koenig Maintainer\n"
671 "Don Sanders Original author\n" 694 "Don Sanders Original author\n"
672 "Cornelius Schumacher Co-maintainer\n" 695 "Cornelius Schumacher Co-maintainer\n"
673 "Mike Pilone GUI and framework redesign\n" 696 "Mike Pilone GUI and framework redesign\n"
674 "Greg Stern DCOP interface\n" 697 "Greg Stern DCOP interface\n"
675 "Mark Westcot Contact pinning\n" 698 "Mark Westcot Contact pinning\n"
676 "Michel Boyer de la Giroday LDAP Lookup\n" 699 "Michel Boyer de la Giroday LDAP Lookup\n"
677 "Steffen Hansen LDAP Lookup" 700 "Steffen Hansen LDAP Lookup"
678#ifdef _WIN32_ 701#ifdef _WIN32_
679 "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n" 702 "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n"
680#endif 703#endif
681 ); 704 );
682} 705}
683 706
684void KABCore::setContactSelected( const QString &uid ) 707void KABCore::setContactSelected( const QString &uid )
685{ 708{
686 KABC::Addressee addr = mAddressBook->findByUid( uid ); 709 KABC::Addressee addr = mAddressBook->findByUid( uid );
687 if ( !mDetails->isHidden() ) 710 if ( !mDetails->isHidden() )
688 mDetails->setAddressee( addr ); 711 mDetails->setAddressee( addr );
689 712
690 if ( !addr.isEmpty() ) { 713 if ( !addr.isEmpty() ) {
691 emit contactSelected( addr.formattedName() ); 714 emit contactSelected( addr.formattedName() );
692 KABC::Picture pic = addr.photo(); 715 KABC::Picture pic = addr.photo();
693 if ( pic.isIntern() ) { 716 if ( pic.isIntern() ) {
694//US emit contactSelected( pic.data() ); 717//US emit contactSelected( pic.data() );
695//US instead use: 718//US instead use:
696 QPixmap px; 719 QPixmap px;
697 if (pic.data().isNull() != true) 720 if (pic.data().isNull() != true)
698 { 721 {
699 px.convertFromImage(pic.data()); 722 px.convertFromImage(pic.data());
700 } 723 }
701 724
702 emit contactSelected( px ); 725 emit contactSelected( px );
703 } 726 }
704 } 727 }
705 728
706 729
707 mExtensionManager->setSelectionChanged(); 730 mExtensionManager->setSelectionChanged();
708 731
709 // update the actions 732 // update the actions
710 bool selected = !uid.isEmpty(); 733 bool selected = !uid.isEmpty();
711 734
712 if ( mReadWrite ) { 735 if ( mReadWrite ) {
713 mActionCut->setEnabled( selected ); 736 mActionCut->setEnabled( selected );
714 mActionPaste->setEnabled( selected ); 737 mActionPaste->setEnabled( selected );
715 } 738 }
716 739
717 mActionCopy->setEnabled( selected ); 740 mActionCopy->setEnabled( selected );
718 mActionDelete->setEnabled( selected ); 741 mActionDelete->setEnabled( selected );
719 mActionEditAddressee->setEnabled( selected ); 742 mActionEditAddressee->setEnabled( selected );
720 mActionMail->setEnabled( selected ); 743 mActionMail->setEnabled( selected );
721 mActionMailVCard->setEnabled( selected ); 744 mActionMailVCard->setEnabled( selected );
722 //if (mActionBeam) 745 //if (mActionBeam)
723 //mActionBeam->setEnabled( selected ); 746 //mActionBeam->setEnabled( selected );
724 mActionWhoAmI->setEnabled( selected ); 747 mActionWhoAmI->setEnabled( selected );
725} 748}
726 749
727void KABCore::sendMail() 750void KABCore::sendMail()
728{ 751{
729 sendMail( mViewManager->selectedEmails().join( ", " ) ); 752 sendMail( mViewManager->selectedEmails().join( ", " ) );
730} 753}
731 754
732void KABCore::sendMail( const QString& emaillist ) 755void KABCore::sendMail( const QString& emaillist )
733{ 756{
734 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " 757 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... "
735 if (emaillist.contains(",") > 0) 758 if (emaillist.contains(",") > 0)
736 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); 759 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null );
737 else 760 else
738 ExternalAppHandler::instance()->mailToOneContact( emaillist ); 761 ExternalAppHandler::instance()->mailToOneContact( emaillist );
739} 762}
740 763
741 764
742 765
743void KABCore::mailVCard() 766void KABCore::mailVCard()
744{ 767{
745 QStringList uids = mViewManager->selectedUids(); 768 QStringList uids = mViewManager->selectedUids();
746 if ( !uids.isEmpty() ) 769 if ( !uids.isEmpty() )
747 mailVCard( uids ); 770 mailVCard( uids );
748} 771}
749 772
750void KABCore::mailVCard( const QStringList& uids ) 773void KABCore::mailVCard( const QStringList& uids )
751{ 774{
752 QStringList urls; 775 QStringList urls;
753 776
754// QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); 777// QString tmpdir = locateLocal("tmp", KGlobal::getAppName());
755 778
756 QString dirName = "/tmp/" + KApplication::randomString( 8 ); 779 QString dirName = "/tmp/" + KApplication::randomString( 8 );
757 780
758 781
759 782
760 QDir().mkdir( dirName, true ); 783 QDir().mkdir( dirName, true );
761 784
762 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 785 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
763 KABC::Addressee a = mAddressBook->findByUid( *it ); 786 KABC::Addressee a = mAddressBook->findByUid( *it );
764 787
765 if ( a.isEmpty() ) 788 if ( a.isEmpty() )
766 continue; 789 continue;
767 790
768 QString name = a.givenName() + "_" + a.familyName() + ".vcf"; 791 QString name = a.givenName() + "_" + a.familyName() + ".vcf";
769 792
770 QString fileName = dirName + "/" + name; 793 QString fileName = dirName + "/" + name;
771 794
772 QFile outFile(fileName); 795 QFile outFile(fileName);
773 796
774 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully 797 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully
775 KABC::VCardConverter converter; 798 KABC::VCardConverter converter;
776 QString vcard; 799 QString vcard;
777 800
778 converter.addresseeToVCard( a, vcard ); 801 converter.addresseeToVCard( a, vcard );
779 802
780 QTextStream t( &outFile ); // use a text stream 803 QTextStream t( &outFile ); // use a text stream
781 t.setEncoding( QTextStream::UnicodeUTF8 ); 804 t.setEncoding( QTextStream::UnicodeUTF8 );
782 t << vcard; 805 t << vcard;
783 806
784 outFile.close(); 807 outFile.close();
785 808
786 urls.append( fileName ); 809 urls.append( fileName );
787 } 810 }
788 } 811 }
789 812
790 bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") ); 813 bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") );
791 814
792 815
793/*US 816/*US
794 kapp->invokeMailer( QString::null, QString::null, QString::null, 817 kapp->invokeMailer( QString::null, QString::null, QString::null,
795 QString::null, // subject 818 QString::null, // subject
796 QString::null, // body 819 QString::null, // body
797 QString::null, 820 QString::null,
798 urls ); // attachments 821 urls ); // attachments
799*/ 822*/
800 823
801} 824}
802 825
803/** 826/**
804 Beams the "WhoAmI contact. 827 Beams the "WhoAmI contact.
805*/ 828*/
806void KABCore::beamMySelf() 829void KABCore::beamMySelf()
807{ 830{
808 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); 831 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI();
809 if (!a.isEmpty()) 832 if (!a.isEmpty())
810 { 833 {
811 QStringList uids; 834 QStringList uids;
812 uids << a.uid(); 835 uids << a.uid();
813 836
814 beamVCard(uids); 837 beamVCard(uids);
815 } else { 838 } 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" ) ); 839 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 840
818 841
819 } 842 }
820} 843}
821void KABCore::updateMainWindow() 844void KABCore::updateMainWindow()
822{ 845{
823 mMainWindow->showMaximized(); 846 mMainWindow->showMaximized();
824 mMainWindow->update(); 847 mMainWindow->update();
825} 848}
826void KABCore::resizeEvent(QResizeEvent* e ) 849void KABCore::resizeEvent(QResizeEvent* e )
827{ 850{
828 if ( !mMiniSplitter ) 851 if ( !mMiniSplitter )
829 return; 852 return;
830 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); 853 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) ");
831 if ( e->oldSize().width() != e->size().width() ) 854 if ( e->oldSize().width() != e->size().width() )
832 if ( QApplication::desktop()->width() >= 480 ) { 855 if ( QApplication::desktop()->width() >= 480 ) {
833 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 856 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480
834 if ( mMiniSplitter->orientation() == Qt::Vertical ) { 857 if ( mMiniSplitter->orientation() == Qt::Vertical ) {
835 mMiniSplitter->setOrientation( Qt::Horizontal); 858 mMiniSplitter->setOrientation( Qt::Horizontal);
836 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 859 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
837 } 860 }
838 if ( QApplication::desktop()->width() <= 640 ) { 861 if ( QApplication::desktop()->width() <= 640 ) {
839 mMainWindow->showMinimized(); 862 mMainWindow->showMinimized();
840 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 863 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
841 mViewManager->getFilterAction()->setComboWidth( 150 ); 864 mViewManager->getFilterAction()->setComboWidth( 150 );
842 if ( mIncSearchWidget ) 865 if ( mIncSearchWidget )
843 mIncSearchWidget->setSize(); 866 mIncSearchWidget->setSize();
844 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 867 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
845 } 868 }
846 869
847 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 870 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640
848 if ( mMiniSplitter->orientation() == Qt::Horizontal ) { 871 if ( mMiniSplitter->orientation() == Qt::Horizontal ) {
849 mMiniSplitter->setOrientation( Qt::Vertical ); 872 mMiniSplitter->setOrientation( Qt::Vertical );
850 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 873 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
851 } 874 }
852 if ( QApplication::desktop()->width() <= 640 ) { 875 if ( QApplication::desktop()->width() <= 640 ) {
853 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 876 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
854 mMainWindow->showMinimized(); 877 mMainWindow->showMinimized();
855 if ( KABPrefs::instance()->mHideSearchOnSwitch ) { 878 if ( KABPrefs::instance()->mHideSearchOnSwitch ) {
856 if ( mIncSearchWidget ) { 879 if ( mIncSearchWidget ) {
857 mIncSearchWidget->setSize(); 880 mIncSearchWidget->setSize();
858 } 881 }
859 } else { 882 } else {
860 mViewManager->getFilterAction()->setComboWidth( 0 ); 883 mViewManager->getFilterAction()->setComboWidth( 0 );
861 } 884 }
862 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 885 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
863 } 886 }
864 } 887 }
865 } 888 }
866 QWidget::resizeEvent( e ); 889 QWidget::resizeEvent( e );
867 890
868} 891}
869void KABCore::export2phone() 892void KABCore::export2phone()
870{ 893{
871 894
872 QStringList uids; 895 QStringList uids;
873 XXPortSelectDialog dlg( this, false, this ); 896 XXPortSelectDialog dlg( this, false, this );
874 if ( dlg.exec() ) 897 if ( dlg.exec() )
875 uids = dlg.uids(); 898 uids = dlg.uids();
876 else 899 else
877 return; 900 return;
878 if ( uids.isEmpty() ) 901 if ( uids.isEmpty() )
879 return; 902 return;
880 // qDebug("count %d ", uids.count()); 903 // qDebug("count %d ", uids.count());
881 904
882 KAex2phonePrefs ex2phone; 905 KAex2phonePrefs ex2phone;
883 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 906 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
884 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 907 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
885 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 908 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
886 909
887 if ( !ex2phone.exec() ) { 910 if ( !ex2phone.exec() ) {
888 return; 911 return;
889 } 912 }
890 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 913 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
891 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 914 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
892 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 915 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
893 916
894 917
895 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 918 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
896 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 919 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
897 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 920 KPimGlobalPrefs::instance()->mEx2PhoneModel );
898 921
899 QString fileName = getPhoneFile(); 922 QString fileName = getPhoneFile();
900 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) 923 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) )
901 return; 924 return;
902 925
903 message(i18n("Exporting to phone...")); 926 message(i18n("Exporting to phone..."));
904 QTimer::singleShot( 1, this , SLOT ( writeToPhone())); 927 QTimer::singleShot( 1, this , SLOT ( writeToPhone()));
905 928
906} 929}
907QString KABCore::getPhoneFile() 930QString KABCore::getPhoneFile()
908{ 931{
909#ifdef DESKTOP_VERSION 932#ifdef DESKTOP_VERSION
910 return locateLocal("tmp", "phonefile.vcf"); 933 return locateLocal("tmp", "phonefile.vcf");
911#else 934#else
912 return "/tmp/phonefile.vcf"; 935 return "/tmp/phonefile.vcf";
913#endif 936#endif
914 937
915} 938}
916void KABCore::writeToPhone( ) 939void KABCore::writeToPhone( )
917{ 940{
918 if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) 941 if ( PhoneAccess::writeToPhone( getPhoneFile() ) )
919 message(i18n("Export to phone finished!")); 942 message(i18n("Export to phone finished!"));
920 else 943 else
921 qDebug(i18n("KA: Error exporting to phone")); 944 qDebug(i18n("KA: Error exporting to phone"));
922} 945}
923void KABCore::beamVCard() 946void KABCore::beamVCard()
924{ 947{
925 QStringList uids; 948 QStringList uids;
926 XXPortSelectDialog dlg( this, false, this ); 949 XXPortSelectDialog dlg( this, false, this );
927 if ( dlg.exec() ) 950 if ( dlg.exec() )
928 uids = dlg.uids(); 951 uids = dlg.uids();
929 else 952 else
930 return; 953 return;
931 if ( uids.isEmpty() ) 954 if ( uids.isEmpty() )
932 return; 955 return;
933 beamVCard( uids ); 956 beamVCard( uids );
934} 957}
935 958
936 959
937void KABCore::beamVCard(const QStringList& uids) 960void KABCore::beamVCard(const QStringList& uids)
938{ 961{
939 962
940 // LR: we should use the /tmp dir on the Zaurus, 963 // LR: we should use the /tmp dir on the Zaurus,
941 // because: /tmp = RAM, (HOME)/kdepim = flash memory 964 // because: /tmp = RAM, (HOME)/kdepim = flash memory
942 965
943#ifdef DESKTOP_VERSION 966#ifdef DESKTOP_VERSION
944 QString fileName = locateLocal("tmp", "kapibeamfile.vcf"); 967 QString fileName = locateLocal("tmp", "kapibeamfile.vcf");
945#else 968#else
946 QString fileName = "/tmp/kapibeamfile.vcf"; 969 QString fileName = "/tmp/kapibeamfile.vcf";
947#endif 970#endif
948 971
949 KABC::VCardConverter converter; 972 KABC::VCardConverter converter;
950 QString description; 973 QString description;
951 QString datastream; 974 QString datastream;
952 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 975 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
953 KABC::Addressee a = mAddressBook->findByUid( *it ); 976 KABC::Addressee a = mAddressBook->findByUid( *it );
954 977
955 if ( a.isEmpty() ) 978 if ( a.isEmpty() )
956 continue; 979 continue;
957 980
958 if (description.isEmpty()) 981 if (description.isEmpty())
959 description = a.formattedName(); 982 description = a.formattedName();
960 983
961 QString vcard; 984 QString vcard;
962 converter.addresseeToVCard( a, vcard ); 985 converter.addresseeToVCard( a, vcard );
963 int start = 0; 986 int start = 0;
964 int next; 987 int next;
965 while ( (next = vcard.find("TYPE=", start) )>= 0 ) { 988 while ( (next = vcard.find("TYPE=", start) )>= 0 ) {
966 int semi = vcard.find(";", next); 989 int semi = vcard.find(";", next);
967 int dopp = vcard.find(":", next); 990 int dopp = vcard.find(":", next);
968 int sep; 991 int sep;
969 if ( semi < dopp && semi >= 0 ) 992 if ( semi < dopp && semi >= 0 )
970 sep = semi ; 993 sep = semi ;
971 else 994 else
972 sep = dopp; 995 sep = dopp;
973 datastream +=vcard.mid( start, next - start); 996 datastream +=vcard.mid( start, next - start);
974 datastream +=vcard.mid( next+5,sep -next -5 ).upper(); 997 datastream +=vcard.mid( next+5,sep -next -5 ).upper();
975 start = sep; 998 start = sep;
976 } 999 }
977 datastream += vcard.mid( start,vcard.length() ); 1000 datastream += vcard.mid( start,vcard.length() );
978 } 1001 }
979#ifndef DESKTOP_VERSION 1002#ifndef DESKTOP_VERSION
980 QFile outFile(fileName); 1003 QFile outFile(fileName);
981 if ( outFile.open(IO_WriteOnly) ) { 1004 if ( outFile.open(IO_WriteOnly) ) {
982 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 1005 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
983 QTextStream t( &outFile ); // use a text stream 1006 QTextStream t( &outFile ); // use a text stream
984 //t.setEncoding( QTextStream::UnicodeUTF8 ); 1007 //t.setEncoding( QTextStream::UnicodeUTF8 );
985 t.setEncoding( QTextStream::Latin1 ); 1008 t.setEncoding( QTextStream::Latin1 );
986 t <<datastream.latin1(); 1009 t <<datastream.latin1();
987 outFile.close(); 1010 outFile.close();
988 Ir *ir = new Ir( this ); 1011 Ir *ir = new Ir( this );
989 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 1012 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
990 ir->send( fileName, description, "text/x-vCard" ); 1013 ir->send( fileName, description, "text/x-vCard" );
991 } else { 1014 } else {
992 qDebug("KA: Error open temp beam file "); 1015 qDebug("KA: Error open temp beam file ");
993 return; 1016 return;
994 } 1017 }
995#endif 1018#endif
996 1019
997} 1020}
998 1021
999void KABCore::beamDone( Ir *ir ) 1022void KABCore::beamDone( Ir *ir )
1000{ 1023{
1001#ifndef DESKTOP_VERSION 1024#ifndef DESKTOP_VERSION
1002 delete ir; 1025 delete ir;
1003#endif 1026#endif
1004 topLevelWidget()->raise(); 1027 topLevelWidget()->raise();
1005 message( i18n("Beaming finished!") ); 1028 message( i18n("Beaming finished!") );
1006} 1029}
1007 1030
1008 1031
1009void KABCore::browse( const QString& url ) 1032void KABCore::browse( const QString& url )
1010{ 1033{
1011#ifndef KAB_EMBEDDED 1034#ifndef KAB_EMBEDDED
1012 kapp->invokeBrowser( url ); 1035 kapp->invokeBrowser( url );
1013#else //KAB_EMBEDDED 1036#else //KAB_EMBEDDED
1014 qDebug("KABCore::browse must be fixed"); 1037 qDebug("KABCore::browse must be fixed");
1015#endif //KAB_EMBEDDED 1038#endif //KAB_EMBEDDED
1016} 1039}
1017 1040
1018void KABCore::selectAllContacts() 1041void KABCore::selectAllContacts()
1019{ 1042{
1020 mViewManager->setSelected( QString::null, true ); 1043 mViewManager->setSelected( QString::null, true );
1021} 1044}
1022 1045
1023void KABCore::deleteContacts() 1046void KABCore::deleteContacts()
1024{ 1047{
1025 QStringList uidList = mViewManager->selectedUids(); 1048 QStringList uidList = mViewManager->selectedUids();
1026 deleteContacts( uidList ); 1049 deleteContacts( uidList );
1027} 1050}
1028 1051
1029void KABCore::deleteContacts( const QStringList &uids ) 1052void KABCore::deleteContacts( const QStringList &uids )
1030{ 1053{
1031 1054
1032 if ( uids.count() > 0 ) { 1055 if ( uids.count() > 0 ) {
1033 1056
1034 if ( KABPrefs::instance()->mAskForDelete ) { 1057 if ( KABPrefs::instance()->mAskForDelete ) {
1035 int count = uids.count(); 1058 int count = uids.count();
1036 if ( count > 5 ) count = 5; 1059 if ( count > 5 ) count = 5;
1037 QString cNames; 1060 QString cNames;
1038 int i; 1061 int i;
1039 for ( i = 0; i < count ; ++i ) { 1062 for ( i = 0; i < count ; ++i ) {
1040 cNames += KGlobal::formatMessage( mAddressBook->findByUid( uids[i] ).realName() ,0) + "\n"; 1063 cNames += KGlobal::formatMessage( mAddressBook->findByUid( uids[i] ).realName() ,0) + "\n";
1041 } 1064 }
1042 if ( uids.count() > 5 ) 1065 if ( uids.count() > 5 )
1043 cNames += i18n("...and %1 more\ncontact(s) selected").arg( uids.count() - 5 ); 1066 cNames += i18n("...and %1 more\ncontact(s) selected").arg( uids.count() - 5 );
1044 QString text = i18n( "Do you really\nwant to delete the\nsetected contact(s)?\n\n" ) + cNames ; 1067 QString text = i18n( "Do you really\nwant to delete the\nsetected contact(s)?\n\n" ) + cNames ;
1045 if ( KMessageBox::questionYesNo( this, text ) != KMessageBox::Yes ) 1068 if ( KMessageBox::questionYesNo( this, text ) != KMessageBox::Yes )
1046 return; 1069 return;
1047 } 1070 }
1048 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); 1071 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids );
1049 UndoStack::instance()->push( command ); 1072 UndoStack::instance()->push( command );
1050 RedoStack::instance()->clear(); 1073 RedoStack::instance()->clear();
1051 1074
1052 // now if we deleted anything, refresh 1075 // now if we deleted anything, refresh
1053 setContactSelected( QString::null ); 1076 setContactSelected( QString::null );
1054 setModified( true ); 1077 setModified( true );
1055 } 1078 }
1056} 1079}
1057 1080
1058void KABCore::copyContacts() 1081void KABCore::copyContacts()
1059{ 1082{
1060 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1083 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1061 1084
1062 QString clipText = AddresseeUtil::addresseesToClipboard( addrList ); 1085 QString clipText = AddresseeUtil::addresseesToClipboard( addrList );
1063 1086
1064 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl; 1087 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl;
1065 1088
1066 QClipboard *cb = QApplication::clipboard(); 1089 QClipboard *cb = QApplication::clipboard();
1067 cb->setText( clipText ); 1090 cb->setText( clipText );
1068} 1091}
1069 1092
1070void KABCore::cutContacts() 1093void KABCore::cutContacts()
1071{ 1094{
1072 QStringList uidList = mViewManager->selectedUids(); 1095 QStringList uidList = mViewManager->selectedUids();
1073 1096
1074//US if ( uidList.size() > 0 ) { 1097//US if ( uidList.size() > 0 ) {
1075 if ( uidList.count() > 0 ) { 1098 if ( uidList.count() > 0 ) {
1076 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList ); 1099 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList );
1077 UndoStack::instance()->push( command ); 1100 UndoStack::instance()->push( command );
1078 RedoStack::instance()->clear(); 1101 RedoStack::instance()->clear();
1079 1102
1080 setModified( true ); 1103 setModified( true );
1081 } 1104 }
1082} 1105}
1083 1106
1084void KABCore::pasteContacts() 1107void KABCore::pasteContacts()
1085{ 1108{
1086 QClipboard *cb = QApplication::clipboard(); 1109 QClipboard *cb = QApplication::clipboard();
1087 1110
1088 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); 1111 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() );
1089 1112
1090 pasteContacts( list ); 1113 pasteContacts( list );
1091} 1114}
1092 1115
1093void KABCore::pasteContacts( KABC::Addressee::List &list ) 1116void KABCore::pasteContacts( KABC::Addressee::List &list )
1094{ 1117{
1095 KABC::Resource *resource = requestResource( this ); 1118 KABC::Resource *resource = requestResource( this );
1096 KABC::Addressee::List::Iterator it; 1119 KABC::Addressee::List::Iterator it;
1097 for ( it = list.begin(); it != list.end(); ++it ) 1120 for ( it = list.begin(); it != list.end(); ++it )
1098 (*it).setResource( resource ); 1121 (*it).setResource( resource );
1099 1122
1100 PwPasteCommand *command = new PwPasteCommand( this, list ); 1123 PwPasteCommand *command = new PwPasteCommand( this, list );
1101 UndoStack::instance()->push( command ); 1124 UndoStack::instance()->push( command );
1102 RedoStack::instance()->clear(); 1125 RedoStack::instance()->clear();
1103 1126
1104 setModified( true ); 1127 setModified( true );
1105} 1128}
1106 1129
1107void KABCore::setWhoAmI() 1130void KABCore::setWhoAmI()
1108{ 1131{
1109 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1132 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1110 1133
1111 if ( addrList.count() > 1 ) { 1134 if ( addrList.count() > 1 ) {
1112 KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); 1135 KMessageBox::sorry( this, i18n( "Please select only one contact." ) );
1113 return; 1136 return;
1114 } 1137 }
1115 1138
1116 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); 1139 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) );
1117 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].realName() ) ) == KMessageBox::Yes ) 1140 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].realName() ) ) == KMessageBox::Yes )
1118 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); 1141 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] );
1119} 1142}
1120void KABCore::editCategories() 1143void KABCore::editCategories()
1121{ 1144{
1122 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true ); 1145 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true );
1123 dlg.exec(); 1146 dlg.exec();
1124} 1147}
1125void KABCore::setCategories() 1148void KABCore::setCategories()
1126{ 1149{
1127 1150
1128 QStringList uids; 1151 QStringList uids;
1129 XXPortSelectDialog dlgx( this, false, this ); 1152 XXPortSelectDialog dlgx( this, false, this );
1130 if ( dlgx.exec() ) 1153 if ( dlgx.exec() )
1131 uids = dlgx.uids(); 1154 uids = dlgx.uids();
1132 else 1155 else
1133 return; 1156 return;
1134 if ( uids.isEmpty() ) 1157 if ( uids.isEmpty() )
1135 return; 1158 return;
1136 // qDebug("count %d ", uids.count()); 1159 // qDebug("count %d ", uids.count());
1137 1160
1138 1161
1139 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); 1162 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true );
1140 if ( !dlg.exec() ) { 1163 if ( !dlg.exec() ) {
1141 message( i18n("Setting categories cancelled") ); 1164 message( i18n("Setting categories cancelled") );
1142 return; 1165 return;
1143 } 1166 }
1144 bool merge = false; 1167 bool merge = false;
1145 QString msg = i18n( "Merge with existing categories?" ); 1168 QString msg = i18n( "Merge with existing categories?" );
1146 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) 1169 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes )
1147 merge = true; 1170 merge = true;
1148 1171
1149 message( i18n("Setting categories ... please wait!") ); 1172 message( i18n("Setting categories ... please wait!") );
1150 QStringList categories = dlg.selectedCategories(); 1173 QStringList categories = dlg.selectedCategories();
1151 1174
1152 //QStringList uids = mViewManager->selectedUids(); 1175 //QStringList uids = mViewManager->selectedUids();
1153 QStringList::Iterator it; 1176 QStringList::Iterator it;
1154 for ( it = uids.begin(); it != uids.end(); ++it ) { 1177 for ( it = uids.begin(); it != uids.end(); ++it ) {
1155 KABC::Addressee addr = mAddressBook->findByUid( *it ); 1178 KABC::Addressee addr = mAddressBook->findByUid( *it );
1156 if ( !addr.isEmpty() ) { 1179 if ( !addr.isEmpty() ) {
1157 if ( !merge ) 1180 if ( !merge )
1158 addr.setCategories( categories ); 1181 addr.setCategories( categories );
1159 else { 1182 else {
1160 QStringList addrCategories = addr.categories(); 1183 QStringList addrCategories = addr.categories();
1161 QStringList::Iterator catIt; 1184 QStringList::Iterator catIt;
1162 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { 1185 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
1163 if ( !addrCategories.contains( *catIt ) ) 1186 if ( !addrCategories.contains( *catIt ) )
1164 addrCategories.append( *catIt ); 1187 addrCategories.append( *catIt );
1165 } 1188 }
1166 addr.setCategories( addrCategories ); 1189 addr.setCategories( addrCategories );
1167 } 1190 }
1168 mAddressBook->insertAddressee( addr ); 1191 mAddressBook->insertAddressee( addr );
1169 } 1192 }
1170 } 1193 }
1171 1194
1172 if ( uids.count() > 0 ) 1195 if ( uids.count() > 0 )
1173 setModified( true ); 1196 setModified( true );
1174 message( i18n("Setting categories completed!") ); 1197 message( i18n("Setting categories completed!") );
1175} 1198}
1176 1199
@@ -1680,1589 +1703,1586 @@ void KABCore::openLDAPDialog()
1680#else //KAB_EMBEDDED 1703#else //KAB_EMBEDDED
1681 qDebug("KABCore::openLDAPDialog() finsih method"); 1704 qDebug("KABCore::openLDAPDialog() finsih method");
1682#endif //KAB_EMBEDDED 1705#endif //KAB_EMBEDDED
1683} 1706}
1684 1707
1685void KABCore::print() 1708void KABCore::print()
1686{ 1709{
1687#ifndef KAB_EMBEDDED 1710#ifndef KAB_EMBEDDED
1688 KPrinter printer; 1711 KPrinter printer;
1689 if ( !printer.setup( this ) ) 1712 if ( !printer.setup( this ) )
1690 return; 1713 return;
1691 1714
1692 KABPrinting::PrintingWizard wizard( &printer, mAddressBook, 1715 KABPrinting::PrintingWizard wizard( &printer, mAddressBook,
1693 mViewManager->selectedUids(), this ); 1716 mViewManager->selectedUids(), this );
1694 1717
1695 wizard.exec(); 1718 wizard.exec();
1696#else //KAB_EMBEDDED 1719#else //KAB_EMBEDDED
1697 qDebug("KABCore::print() finsih method"); 1720 qDebug("KABCore::print() finsih method");
1698#endif //KAB_EMBEDDED 1721#endif //KAB_EMBEDDED
1699 1722
1700} 1723}
1701 1724
1702 1725
1703void KABCore::addGUIClient( KXMLGUIClient *client ) 1726void KABCore::addGUIClient( KXMLGUIClient *client )
1704{ 1727{
1705 if ( mGUIClient ) 1728 if ( mGUIClient )
1706 mGUIClient->insertChildClient( client ); 1729 mGUIClient->insertChildClient( client );
1707 else 1730 else
1708 KMessageBox::error( this, "no KXMLGUICLient"); 1731 KMessageBox::error( this, "no KXMLGUICLient");
1709} 1732}
1710 1733
1711 1734
1712void KABCore::configurationChanged() 1735void KABCore::configurationChanged()
1713{ 1736{
1714 mExtensionManager->reconfigure(); 1737 mExtensionManager->reconfigure();
1715} 1738}
1716 1739
1717void KABCore::addressBookChanged() 1740void KABCore::addressBookChanged()
1718{ 1741{
1719/*US 1742/*US
1720 QDictIterator<AddresseeEditorDialog> it( mEditorDict ); 1743 QDictIterator<AddresseeEditorDialog> it( mEditorDict );
1721 while ( it.current() ) { 1744 while ( it.current() ) {
1722 if ( it.current()->dirty() ) { 1745 if ( it.current()->dirty() ) {
1723 QString text = i18n( "Data has been changed externally. Unsaved " 1746 QString text = i18n( "Data has been changed externally. Unsaved "
1724 "changes will be lost." ); 1747 "changes will be lost." );
1725 KMessageBox::information( this, text ); 1748 KMessageBox::information( this, text );
1726 } 1749 }
1727 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); 1750 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) );
1728 ++it; 1751 ++it;
1729 } 1752 }
1730*/ 1753*/
1731 if (mEditorDialog) 1754 if (mEditorDialog)
1732 { 1755 {
1733 if (mEditorDialog->dirty()) 1756 if (mEditorDialog->dirty())
1734 { 1757 {
1735 QString text = i18n( "Data has been changed externally. Unsaved " 1758 QString text = i18n( "Data has been changed externally. Unsaved "
1736 "changes will be lost." ); 1759 "changes will be lost." );
1737 KMessageBox::information( this, text ); 1760 KMessageBox::information( this, text );
1738 } 1761 }
1739 QString currentuid = mEditorDialog->addressee().uid(); 1762 QString currentuid = mEditorDialog->addressee().uid();
1740 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); 1763 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) );
1741 } 1764 }
1742 mViewManager->refreshView(); 1765 mViewManager->refreshView();
1743 1766
1744 1767
1745} 1768}
1746 1769
1747AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, 1770AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
1748 const char *name ) 1771 const char *name )
1749{ 1772{
1750 1773
1751 if ( mEditorDialog == 0 ) { 1774 if ( mEditorDialog == 0 ) {
1752 mEditorDialog = new AddresseeEditorDialog( this, parent, 1775 mEditorDialog = new AddresseeEditorDialog( this, parent,
1753 name ? name : "editorDialog" ); 1776 name ? name : "editorDialog" );
1754 1777
1755 1778
1756 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ), 1779 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ),
1757 SLOT( contactModified( const KABC::Addressee& ) ) ); 1780 SLOT( contactModified( const KABC::Addressee& ) ) );
1758 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ), 1781 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ),
1759 // SLOT( slotEditorDestroyed( const QString& ) ) ; 1782 // SLOT( slotEditorDestroyed( const QString& ) ) ;
1760 } 1783 }
1761 1784
1762 return mEditorDialog; 1785 return mEditorDialog;
1763} 1786}
1764 1787
1765void KABCore::slotEditorDestroyed( const QString &uid ) 1788void KABCore::slotEditorDestroyed( const QString &uid )
1766{ 1789{
1767 //mEditorDict.remove( uid ); 1790 //mEditorDict.remove( uid );
1768} 1791}
1769 1792
1770void KABCore::initGUI() 1793void KABCore::initGUI()
1771{ 1794{
1772#ifndef KAB_EMBEDDED 1795#ifndef KAB_EMBEDDED
1773 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1796 QHBoxLayout *topLayout = new QHBoxLayout( this );
1774 topLayout->setSpacing( KDialogBase::spacingHint() ); 1797 topLayout->setSpacing( KDialogBase::spacingHint() );
1775 1798
1776 mExtensionBarSplitter = new QSplitter( this ); 1799 mExtensionBarSplitter = new QSplitter( this );
1777 mExtensionBarSplitter->setOrientation( Qt::Vertical ); 1800 mExtensionBarSplitter->setOrientation( Qt::Vertical );
1778 1801
1779 mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); 1802 mDetailsSplitter = new QSplitter( mExtensionBarSplitter );
1780 1803
1781 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1804 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1782 mIncSearchWidget = new IncSearchWidget( viewSpace ); 1805 mIncSearchWidget = new IncSearchWidget( viewSpace );
1783 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1806 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1784 SLOT( incrementalSearch( const QString& ) ) ); 1807 SLOT( incrementalSearch( const QString& ) ) );
1785 1808
1786 mViewManager = new ViewManager( this, viewSpace ); 1809 mViewManager = new ViewManager( this, viewSpace );
1787 viewSpace->setStretchFactor( mViewManager, 1 ); 1810 viewSpace->setStretchFactor( mViewManager, 1 );
1788 1811
1789 mDetails = new ViewContainer( mDetailsSplitter ); 1812 mDetails = new ViewContainer( mDetailsSplitter );
1790 1813
1791 mJumpButtonBar = new JumpButtonBar( this, this ); 1814 mJumpButtonBar = new JumpButtonBar( this, this );
1792 1815
1793 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1816 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1794 1817
1795 topLayout->addWidget( mExtensionBarSplitter ); 1818 topLayout->addWidget( mExtensionBarSplitter );
1796 topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); 1819 topLayout->setStretchFactor( mExtensionBarSplitter, 100 );
1797 topLayout->addWidget( mJumpButtonBar ); 1820 topLayout->addWidget( mJumpButtonBar );
1798 //topLayout->setStretchFactor( mJumpButtonBar, 1 ); 1821 //topLayout->setStretchFactor( mJumpButtonBar, 1 );
1799 1822
1800 mXXPortManager = new XXPortManager( this, this ); 1823 mXXPortManager = new XXPortManager( this, this );
1801 1824
1802#else //KAB_EMBEDDED 1825#else //KAB_EMBEDDED
1803 //US initialize viewMenu before settingup viewmanager. 1826 //US initialize viewMenu before settingup viewmanager.
1804 // Viewmanager needs this menu to plugin submenues. 1827 // Viewmanager needs this menu to plugin submenues.
1805 viewMenu = new QPopupMenu( this ); 1828 viewMenu = new QPopupMenu( this );
1806 settingsMenu = new QPopupMenu( this ); 1829 settingsMenu = new QPopupMenu( this );
1807 //filterMenu = new QPopupMenu( this ); 1830 //filterMenu = new QPopupMenu( this );
1808 ImportMenu = new QPopupMenu( this ); 1831 ImportMenu = new QPopupMenu( this );
1809 ExportMenu = new QPopupMenu( this ); 1832 ExportMenu = new QPopupMenu( this );
1810 syncMenu = new QPopupMenu( this ); 1833 syncMenu = new QPopupMenu( this );
1811 changeMenu= new QPopupMenu( this ); 1834 changeMenu= new QPopupMenu( this );
1812 beamMenu= new QPopupMenu( this ); 1835 beamMenu= new QPopupMenu( this );
1813 1836
1814//US since we have no splitter for the embedded system, setup 1837//US since we have no splitter for the embedded system, setup
1815// a layout with two frames. One left and one right. 1838// a layout with two frames. One left and one right.
1816 1839
1817 QBoxLayout *topLayout; 1840 QBoxLayout *topLayout;
1818 1841
1819 // = new QHBoxLayout( this ); 1842 // = new QHBoxLayout( this );
1820// QBoxLayout *topLayout = (QBoxLayout*)layout(); 1843// QBoxLayout *topLayout = (QBoxLayout*)layout();
1821 1844
1822// QWidget *mainBox = new QWidget( this ); 1845// QWidget *mainBox = new QWidget( this );
1823// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); 1846// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox);
1824 1847
1825#ifdef DESKTOP_VERSION 1848#ifdef DESKTOP_VERSION
1826 topLayout = new QHBoxLayout( this ); 1849 topLayout = new QHBoxLayout( this );
1827 1850
1828 1851
1829 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1852 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1830 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1853 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1831 1854
1832 topLayout->addWidget(mMiniSplitter ); 1855 topLayout->addWidget(mMiniSplitter );
1833 1856
1834 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); 1857 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter );
1835 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1858 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1836 mViewManager = new ViewManager( this, mExtensionBarSplitter ); 1859 mViewManager = new ViewManager( this, mExtensionBarSplitter );
1837 mDetails = new ViewContainer( mMiniSplitter ); 1860 mDetails = new ViewContainer( mMiniSplitter );
1838 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1861 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1839#else 1862#else
1840 if ( QApplication::desktop()->width() > 480 ) { 1863 if ( QApplication::desktop()->width() > 480 ) {
1841 topLayout = new QHBoxLayout( this ); 1864 topLayout = new QHBoxLayout( this );
1842 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1865 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1843 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1866 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1844 } else { 1867 } else {
1845 1868
1846 topLayout = new QHBoxLayout( this ); 1869 topLayout = new QHBoxLayout( this );
1847 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); 1870 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
1848 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1871 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1849 } 1872 }
1850 1873
1851 topLayout->addWidget(mMiniSplitter ); 1874 topLayout->addWidget(mMiniSplitter );
1852 mViewManager = new ViewManager( this, mMiniSplitter ); 1875 mViewManager = new ViewManager( this, mMiniSplitter );
1853 mDetails = new ViewContainer( mMiniSplitter ); 1876 mDetails = new ViewContainer( mMiniSplitter );
1854 1877
1855 1878
1856 mExtensionManager = new ExtensionManager( this, mMiniSplitter ); 1879 mExtensionManager = new ExtensionManager( this, mMiniSplitter );
1857#endif 1880#endif
1858 //eh->hide(); 1881 //eh->hide();
1859 // topLayout->addWidget(mExtensionManager ); 1882 // topLayout->addWidget(mExtensionManager );
1860 1883
1861 1884
1862/*US 1885/*US
1863#ifndef KAB_NOSPLITTER 1886#ifndef KAB_NOSPLITTER
1864 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1887 QHBoxLayout *topLayout = new QHBoxLayout( this );
1865//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1888//US topLayout->setSpacing( KDialogBase::spacingHint() );
1866 topLayout->setSpacing( 10 ); 1889 topLayout->setSpacing( 10 );
1867 1890
1868 mDetailsSplitter = new QSplitter( this ); 1891 mDetailsSplitter = new QSplitter( this );
1869 1892
1870 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1893 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1871 1894
1872 mViewManager = new ViewManager( this, viewSpace ); 1895 mViewManager = new ViewManager( this, viewSpace );
1873 viewSpace->setStretchFactor( mViewManager, 1 ); 1896 viewSpace->setStretchFactor( mViewManager, 1 );
1874 1897
1875 mDetails = new ViewContainer( mDetailsSplitter ); 1898 mDetails = new ViewContainer( mDetailsSplitter );
1876 1899
1877 topLayout->addWidget( mDetailsSplitter ); 1900 topLayout->addWidget( mDetailsSplitter );
1878 topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1901 topLayout->setStretchFactor( mDetailsSplitter, 100 );
1879#else //KAB_NOSPLITTER 1902#else //KAB_NOSPLITTER
1880 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1903 QHBoxLayout *topLayout = new QHBoxLayout( this );
1881//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1904//US topLayout->setSpacing( KDialogBase::spacingHint() );
1882 topLayout->setSpacing( 10 ); 1905 topLayout->setSpacing( 10 );
1883 1906
1884// mDetailsSplitter = new QSplitter( this ); 1907// mDetailsSplitter = new QSplitter( this );
1885 1908
1886 QVBox *viewSpace = new QVBox( this ); 1909 QVBox *viewSpace = new QVBox( this );
1887 1910
1888 mViewManager = new ViewManager( this, viewSpace ); 1911 mViewManager = new ViewManager( this, viewSpace );
1889 viewSpace->setStretchFactor( mViewManager, 1 ); 1912 viewSpace->setStretchFactor( mViewManager, 1 );
1890 1913
1891 mDetails = new ViewContainer( this ); 1914 mDetails = new ViewContainer( this );
1892 1915
1893 topLayout->addWidget( viewSpace ); 1916 topLayout->addWidget( viewSpace );
1894// topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1917// topLayout->setStretchFactor( mDetailsSplitter, 100 );
1895 topLayout->addWidget( mDetails ); 1918 topLayout->addWidget( mDetails );
1896#endif //KAB_NOSPLITTER 1919#endif //KAB_NOSPLITTER
1897*/ 1920*/
1898 1921
1899 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 1922 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
1900 syncManager->setBlockSave(false); 1923 syncManager->setBlockSave(false);
1901 1924
1902 connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 1925 connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
1903 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 1926 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
1904 QString sync_file = sentSyncFile(); 1927 QString sync_file = sentSyncFile();
1905 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1()); 1928 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1());
1906 syncManager->setDefaultFileName( sync_file ); 1929 syncManager->setDefaultFileName( sync_file );
1907 //connect(syncManager , SIGNAL( ), this, SLOT( ) ); 1930 //connect(syncManager , SIGNAL( ), this, SLOT( ) );
1908 1931
1909#endif //KAB_EMBEDDED 1932#endif //KAB_EMBEDDED
1910 initActions(); 1933 initActions();
1911 1934
1912#ifdef KAB_EMBEDDED 1935#ifdef KAB_EMBEDDED
1913 addActionsManually(); 1936 addActionsManually();
1914 //US make sure the export and import menues are initialized before creating the xxPortManager. 1937 //US make sure the export and import menues are initialized before creating the xxPortManager.
1915 mXXPortManager = new XXPortManager( this, this ); 1938 mXXPortManager = new XXPortManager( this, this );
1916 1939
1917 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); 1940 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() );
1918 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); 1941 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget);
1919 // mActionQuit->plug ( mMainWindow->toolBar()); 1942 // mActionQuit->plug ( mMainWindow->toolBar());
1920 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); 1943 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() );
1921 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); 1944 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget);
1922 // mIncSearchWidget->hide(); 1945 // mIncSearchWidget->hide();
1923 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1946 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1924 SLOT( incrementalSearch( const QString& ) ) ); 1947 SLOT( incrementalSearch( const QString& ) ) );
1925 connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) ); 1948 connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) );
1926 connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) ); 1949 connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) );
1927 1950
1928 mJumpButtonBar = new JumpButtonBar( this, this ); 1951 mJumpButtonBar = new JumpButtonBar( this, this );
1929 1952
1930 topLayout->addWidget( mJumpButtonBar ); 1953 topLayout->addWidget( mJumpButtonBar );
1931//US topLayout->setStretchFactor( mJumpButtonBar, 10 ); 1954//US topLayout->setStretchFactor( mJumpButtonBar, 10 );
1932 1955
1933// mMainWindow->getIconToolBar()->raise(); 1956// mMainWindow->getIconToolBar()->raise();
1934 1957
1935#endif //KAB_EMBEDDED 1958#endif //KAB_EMBEDDED
1936 1959
1937} 1960}
1938void KABCore::initActions() 1961void KABCore::initActions()
1939{ 1962{
1940//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 1963//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
1941 1964
1942#ifndef KAB_EMBEDDED 1965#ifndef KAB_EMBEDDED
1943 connect( QApplication::clipboard(), SIGNAL( dataChanged() ), 1966 connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
1944 SLOT( clipboardDataChanged() ) ); 1967 SLOT( clipboardDataChanged() ) );
1945#endif //KAB_EMBEDDED 1968#endif //KAB_EMBEDDED
1946 1969
1947 // file menu 1970 // file menu
1948 1971
1949 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); 1972 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() );
1950 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); 1973 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() );
1951 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager, 1974 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager,
1952 SLOT( printView() ), actionCollection(), "kaddressbook_print" ); 1975 SLOT( printView() ), actionCollection(), "kaddressbook_print" );
1953 1976
1954 1977
1955 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails, 1978 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails,
1956 SLOT( printView() ), actionCollection(), "kaddressbook_print2" ); 1979 SLOT( printView() ), actionCollection(), "kaddressbook_print2" );
1957 1980
1958 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, 1981 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this,
1959 SLOT( save() ), actionCollection(), "file_sync" ); 1982 SLOT( save() ), actionCollection(), "file_sync" );
1960 1983
1961 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, 1984 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this,
1962 SLOT( newContact() ), actionCollection(), "file_new_contact" ); 1985 SLOT( newContact() ), actionCollection(), "file_new_contact" );
1963 1986
1964 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, 1987 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0,
1965 this, SLOT( mailVCard() ), 1988 this, SLOT( mailVCard() ),
1966 actionCollection(), "file_mail_vcard"); 1989 actionCollection(), "file_mail_vcard");
1967 1990
1968 mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this, 1991 mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this,
1969 SLOT( export2phone() ), actionCollection(), 1992 SLOT( export2phone() ), actionCollection(),
1970 "kaddressbook_ex2phone" ); 1993 "kaddressbook_ex2phone" );
1971 1994
1972 mActionBeamVCard = 0; 1995 mActionBeamVCard = 0;
1973 mActionBeam = 0; 1996 mActionBeam = 0;
1974 1997
1975#ifndef DESKTOP_VERSION 1998#ifndef DESKTOP_VERSION
1976 if ( Ir::supported() ) { 1999 if ( Ir::supported() ) {
1977 mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this, 2000 mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this,
1978 SLOT( beamVCard() ), actionCollection(), 2001 SLOT( beamVCard() ), actionCollection(),
1979 "kaddressbook_beam_vcard" ); 2002 "kaddressbook_beam_vcard" );
1980 2003
1981 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, 2004 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this,
1982 SLOT( beamMySelf() ), actionCollection(), 2005 SLOT( beamMySelf() ), actionCollection(),
1983 "kaddressbook_beam_myself" ); 2006 "kaddressbook_beam_myself" );
1984 } 2007 }
1985#endif 2008#endif
1986 2009
1987 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, 2010 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0,
1988 this, SLOT( editContact2() ), 2011 this, SLOT( editContact2() ),
1989 actionCollection(), "file_properties" ); 2012 actionCollection(), "file_properties" );
1990 2013
1991#ifdef KAB_EMBEDDED 2014#ifdef KAB_EMBEDDED
1992 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); 2015 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() );
1993 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, 2016 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0,
1994 mMainWindow, SLOT( exit() ), 2017 mMainWindow, SLOT( exit() ),
1995 actionCollection(), "quit" ); 2018 actionCollection(), "quit" );
1996#endif //KAB_EMBEDDED 2019#endif //KAB_EMBEDDED
1997 2020
1998 // edit menu 2021 // edit menu
1999 if ( mIsPart ) { 2022 if ( mIsPart ) {
2000 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, 2023 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this,
2001 SLOT( copyContacts() ), actionCollection(), 2024 SLOT( copyContacts() ), actionCollection(),
2002 "kaddressbook_copy" ); 2025 "kaddressbook_copy" );
2003 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, 2026 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this,
2004 SLOT( cutContacts() ), actionCollection(), 2027 SLOT( cutContacts() ), actionCollection(),
2005 "kaddressbook_cut" ); 2028 "kaddressbook_cut" );
2006 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, 2029 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this,
2007 SLOT( pasteContacts() ), actionCollection(), 2030 SLOT( pasteContacts() ), actionCollection(),
2008 "kaddressbook_paste" ); 2031 "kaddressbook_paste" );
2009 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, 2032 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this,
2010 SLOT( selectAllContacts() ), actionCollection(), 2033 SLOT( selectAllContacts() ), actionCollection(),
2011 "kaddressbook_select_all" ); 2034 "kaddressbook_select_all" );
2012 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, 2035 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this,
2013 SLOT( undo() ), actionCollection(), 2036 SLOT( undo() ), actionCollection(),
2014 "kaddressbook_undo" ); 2037 "kaddressbook_undo" );
2015 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, 2038 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z,
2016 this, SLOT( redo() ), actionCollection(), 2039 this, SLOT( redo() ), actionCollection(),
2017 "kaddressbook_redo" ); 2040 "kaddressbook_redo" );
2018 } else { 2041 } else {
2019 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); 2042 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() );
2020 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); 2043 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() );
2021 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); 2044 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() );
2022 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); 2045 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() );
2023 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); 2046 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() );
2024 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); 2047 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() );
2025 } 2048 }
2026 2049
2027 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", 2050 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
2028 Key_Delete, this, SLOT( deleteContacts() ), 2051 Key_Delete, this, SLOT( deleteContacts() ),
2029 actionCollection(), "edit_delete" ); 2052 actionCollection(), "edit_delete" );
2030 2053
2031 mActionUndo->setEnabled( false ); 2054 mActionUndo->setEnabled( false );
2032 mActionRedo->setEnabled( false ); 2055 mActionRedo->setEnabled( false );
2033 2056
2034 // settings menu 2057 // settings menu
2035#ifdef KAB_EMBEDDED 2058#ifdef KAB_EMBEDDED
2036//US special menuentry to configure the addressbook resources. On KDE 2059//US special menuentry to configure the addressbook resources. On KDE
2037// you do that through the control center !!! 2060// you do that through the control center !!!
2038 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, 2061 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this,
2039 SLOT( configureResources() ), actionCollection(), 2062 SLOT( configureResources() ), actionCollection(),
2040 "kaddressbook_configure_resources" ); 2063 "kaddressbook_configure_resources" );
2041#endif //KAB_EMBEDDED 2064#endif //KAB_EMBEDDED
2042 2065
2043 if ( mIsPart ) { 2066 if ( mIsPart ) {
2044 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, 2067 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this,
2045 SLOT( openConfigDialog() ), actionCollection(), 2068 SLOT( openConfigDialog() ), actionCollection(),
2046 "kaddressbook_configure" ); 2069 "kaddressbook_configure" );
2047 2070
2048 //US not implemented yet 2071 //US not implemented yet
2049 //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, 2072 //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0,
2050 // this, SLOT( configureKeyBindings() ), actionCollection(), 2073 // this, SLOT( configureKeyBindings() ), actionCollection(),
2051 // "kaddressbook_configure_shortcuts" ); 2074 // "kaddressbook_configure_shortcuts" );
2052#ifdef KAB_EMBEDDED 2075#ifdef KAB_EMBEDDED
2053 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); 2076 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() );
2054 mActionConfigureToolbars->setEnabled( false ); 2077 mActionConfigureToolbars->setEnabled( false );
2055#endif //KAB_EMBEDDED 2078#endif //KAB_EMBEDDED
2056 2079
2057 } else { 2080 } else {
2058 mActionConfigKAddressbook = new KAction( i18n( "&Configure KA/Pi..." ), "configure", 0, this, 2081 mActionConfigKAddressbook = new KAction( i18n( "&Configure KA/Pi..." ), "configure", 0, this,
2059 SLOT( openConfigDialog() ), actionCollection(), 2082 SLOT( openConfigDialog() ), actionCollection(),
2060 "kaddressbook_configure" ); 2083 "kaddressbook_configure" );
2061 mActionConfigGlobal = new KAction( i18n( "Global Settings..." ), "configure", 0, this, 2084 mActionConfigGlobal = new KAction( i18n( "Global Settings..." ), "configure", 0, this,
2062 SLOT( openConfigGlobalDialog() ), actionCollection(), 2085 SLOT( openConfigGlobalDialog() ), actionCollection(),
2063 "kaddressbook_configure" ); 2086 "kaddressbook_configure" );
2064 } 2087 }
2065 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, 2088 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0,
2066 actionCollection(), "options_show_jump_bar" ); 2089 actionCollection(), "options_show_jump_bar" );
2067 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) ); 2090 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) );
2068 2091
2069 mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0, 2092 mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0,
2070 actionCollection(), "options_show_details" ); 2093 actionCollection(), "options_show_details" );
2071 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); 2094 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) );
2072 2095
2073 2096
2074 mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this, 2097 mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this,
2075 SLOT( toggleBeamReceive() ), actionCollection(), 2098 SLOT( toggleBeamReceive() ), actionCollection(),
2076 "kaddressbook_beam_rec" ); 2099 "kaddressbook_beam_rec" );
2077 2100
2078 2101
2079 // misc 2102 // misc
2080 // only enable LDAP lookup if we can handle the protocol 2103 // only enable LDAP lookup if we can handle the protocol
2081#ifndef KAB_EMBEDDED 2104#ifndef KAB_EMBEDDED
2082 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { 2105 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) {
2083 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, 2106 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0,
2084 this, SLOT( openLDAPDialog() ), actionCollection(), 2107 this, SLOT( openLDAPDialog() ), actionCollection(),
2085 "ldap_lookup" ); 2108 "ldap_lookup" );
2086 } 2109 }
2087#else //KAB_EMBEDDED 2110#else //KAB_EMBEDDED
2088 //qDebug("KABCore::initActions() LDAP has to be implemented"); 2111 //qDebug("KABCore::initActions() LDAP has to be implemented");
2089#endif //KAB_EMBEDDED 2112#endif //KAB_EMBEDDED
2090 2113
2091 2114
2092 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, 2115 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this,
2093 SLOT( setWhoAmI() ), actionCollection(), 2116 SLOT( setWhoAmI() ), actionCollection(),
2094 "set_personal" ); 2117 "set_personal" );
2095 2118
2096 2119
2097 mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this, 2120 mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this,
2098 SLOT( setCategories() ), actionCollection(), 2121 SLOT( setCategories() ), actionCollection(),
2099 "edit_set_categories" ); 2122 "edit_set_categories" );
2100 mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this, 2123 mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this,
2101 SLOT( editCategories() ), actionCollection(), 2124 SLOT( editCategories() ), actionCollection(),
2102 "edit__categories" ); 2125 "edit__categories" );
2103 2126
2104 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, 2127 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this,
2105 SLOT( removeVoice() ), actionCollection(), 2128 SLOT( removeVoice() ), actionCollection(),
2106 "remove_voice" ); 2129 "remove_voice" );
2107 mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this, 2130 mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this,
2108 SLOT( setFormattedName() ), actionCollection(), 2131 SLOT( setFormattedName() ), actionCollection(),
2109 "set_formatted" ); 2132 "set_formatted" );
2110 2133
2111 mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, 2134 mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this,
2112 SLOT( manageCategories() ), actionCollection(), 2135 SLOT( manageCategories() ), actionCollection(),
2113 "remove_voice" ); 2136 "remove_voice" );
2114 2137
2115 2138
2116 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, 2139 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this,
2117 SLOT( importFromOL() ), actionCollection(), 2140 SLOT( importFromOL() ), actionCollection(),
2118 "import_OL" ); 2141 "import_OL" );
2119#ifdef KAB_EMBEDDED 2142#ifdef KAB_EMBEDDED
2120 mActionLicence = new KAction( i18n( "Licence" ), 0, 2143 mActionLicence = new KAction( i18n( "Licence" ), 0,
2121 this, SLOT( showLicence() ), actionCollection(), 2144 this, SLOT( showLicence() ), actionCollection(),
2122 "licence_about_data" ); 2145 "licence_about_data" );
2123 mActionFaq = new KAction( i18n( "Faq" ), 0, 2146 mActionFaq = new KAction( i18n( "Faq" ), 0,
2124 this, SLOT( faq() ), actionCollection(), 2147 this, SLOT( faq() ), actionCollection(),
2125 "faq_about_data" ); 2148 "faq_about_data" );
2126 mActionWN = new KAction( i18n( "What's New?" ), 0, 2149 mActionWN = new KAction( i18n( "What's New?" ), 0,
2127 this, SLOT( whatsnew() ), actionCollection(), 2150 this, SLOT( whatsnew() ), actionCollection(),
2128 "wn" ); 2151 "wn" );
2129 2152
2130 2153
2131 2154
2132 mActionStorageHowto = new KAction( i18n( "Storage HowTo" ), 0, 2155 mActionStorageHowto = new KAction( i18n( "Storage HowTo" ), 0,
2133 this, SLOT( storagehowto() ), actionCollection(), 2156 this, SLOT( storagehowto() ), actionCollection(),
2134 "storage" ); 2157 "storage" );
2135 2158
2136 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, 2159 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0,
2137 this, SLOT( synchowto() ), actionCollection(), 2160 this, SLOT( synchowto() ), actionCollection(),
2138 "sync" ); 2161 "sync" );
2139 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, 2162 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0,
2140 this, SLOT( kdesynchowto() ), actionCollection(), 2163 this, SLOT( kdesynchowto() ), actionCollection(),
2141 "kdesync" ); 2164 "kdesync" );
2142 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, 2165 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0,
2143 this, SLOT( multisynchowto() ), actionCollection(), 2166 this, SLOT( multisynchowto() ), actionCollection(),
2144 "multisync" ); 2167 "multisync" );
2145 2168
2146 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, 2169 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
2147 this, SLOT( createAboutData() ), actionCollection(), 2170 this, SLOT( createAboutData() ), actionCollection(),
2148 "kaddressbook_about_data" ); 2171 "kaddressbook_about_data" );
2149#endif //KAB_EMBEDDED 2172#endif //KAB_EMBEDDED
2150 2173
2151 clipboardDataChanged(); 2174 clipboardDataChanged();
2152 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2175 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2153 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2176 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2154} 2177}
2155 2178
2156//US we need this function, to plug all actions into the correct menues. 2179//US we need this function, to plug all actions into the correct menues.
2157// KDE uses a XML format to plug the actions, but we work her without this overhead. 2180// KDE uses a XML format to plug the actions, but we work her without this overhead.
2158void KABCore::addActionsManually() 2181void KABCore::addActionsManually()
2159{ 2182{
2160//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 2183//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
2161 2184
2162#ifdef KAB_EMBEDDED 2185#ifdef KAB_EMBEDDED
2163 QPopupMenu *fileMenu = new QPopupMenu( this ); 2186 QPopupMenu *fileMenu = new QPopupMenu( this );
2164 QPopupMenu *editMenu = new QPopupMenu( this ); 2187 QPopupMenu *editMenu = new QPopupMenu( this );
2165 QPopupMenu *helpMenu = new QPopupMenu( this ); 2188 QPopupMenu *helpMenu = new QPopupMenu( this );
2166 2189
2167 KToolBar* tb = mMainWindow->toolBar(); 2190 KToolBar* tb = mMainWindow->toolBar();
2168 mMainWindow->setToolBarsMovable (false ); 2191 mMainWindow->setToolBarsMovable (false );
2169#ifndef DESKTOP_VERSION 2192#ifndef DESKTOP_VERSION
2170 if ( KABPrefs::instance()->mFullMenuBarVisible ) { 2193 if ( KABPrefs::instance()->mFullMenuBarVisible ) {
2171#endif 2194#endif
2172 QMenuBar* mb = mMainWindow->menuBar(); 2195 QMenuBar* mb = mMainWindow->menuBar();
2173 2196
2174 //US setup menubar. 2197 //US setup menubar.
2175 //Disable the following block if you do not want to have a menubar. 2198 //Disable the following block if you do not want to have a menubar.
2176 mb->insertItem( i18n("&File"), fileMenu ); 2199 mb->insertItem( i18n("&File"), fileMenu );
2177 mb->insertItem( i18n("&Edit"), editMenu ); 2200 mb->insertItem( i18n("&Edit"), editMenu );
2178 mb->insertItem( i18n("&View"), viewMenu ); 2201 mb->insertItem( i18n("&View"), viewMenu );
2179 mb->insertItem( i18n("&Settings"), settingsMenu ); 2202 mb->insertItem( i18n("&Settings"), settingsMenu );
2180#ifdef DESKTOP_VERSION 2203#ifdef DESKTOP_VERSION
2181 mb->insertItem( i18n("Synchronize"), syncMenu ); 2204 mb->insertItem( i18n("Synchronize"), syncMenu );
2182#else 2205#else
2183 mb->insertItem( i18n("Sync"), syncMenu ); 2206 mb->insertItem( i18n("Sync"), syncMenu );
2184#endif 2207#endif
2185 //mb->insertItem( i18n("&Change"), changeMenu ); 2208 //mb->insertItem( i18n("&Change"), changeMenu );
2186 mb->insertItem( i18n("&Help"), helpMenu ); 2209 mb->insertItem( i18n("&Help"), helpMenu );
2187 mIncSearchWidget = new IncSearchWidget( tb ); 2210 mIncSearchWidget = new IncSearchWidget( tb );
2188 // tb->insertWidget(-1, 0, mIncSearchWidget); 2211 // tb->insertWidget(-1, 0, mIncSearchWidget);
2189#ifndef DESKTOP_VERSION 2212#ifndef DESKTOP_VERSION
2190 } else { 2213 } else {
2191 //US setup toolbar 2214 //US setup toolbar
2192 QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); 2215 QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
2193 QPopupMenu *popupBarTB = new QPopupMenu( this ); 2216 QPopupMenu *popupBarTB = new QPopupMenu( this );
2194 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); 2217 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB);
2195 tb->insertWidget(-1, 0, menuBarTB); 2218 tb->insertWidget(-1, 0, menuBarTB);
2196 mIncSearchWidget = new IncSearchWidget( tb ); 2219 mIncSearchWidget = new IncSearchWidget( tb );
2197 tb->enableMoving(false); 2220 tb->enableMoving(false);
2198 popupBarTB->insertItem( i18n("&File"), fileMenu ); 2221 popupBarTB->insertItem( i18n("&File"), fileMenu );
2199 popupBarTB->insertItem( i18n("&Edit"), editMenu ); 2222 popupBarTB->insertItem( i18n("&Edit"), editMenu );
2200 popupBarTB->insertItem( i18n("&View"), viewMenu ); 2223 popupBarTB->insertItem( i18n("&View"), viewMenu );
2201 popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); 2224 popupBarTB->insertItem( i18n("&Settings"), settingsMenu );
2202 popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); 2225 popupBarTB->insertItem( i18n("Synchronize"), syncMenu );
2203 mViewManager->getFilterAction()->plug ( popupBarTB); 2226 mViewManager->getFilterAction()->plug ( popupBarTB);
2204 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); 2227 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu );
2205 popupBarTB->insertItem( i18n("&Help"), helpMenu ); 2228 popupBarTB->insertItem( i18n("&Help"), helpMenu );
2206 if (QApplication::desktop()->width() > 320 ) { 2229 if (QApplication::desktop()->width() > 320 ) {
2207 // mViewManager->getFilterAction()->plug ( tb); 2230 // mViewManager->getFilterAction()->plug ( tb);
2208 } 2231 }
2209 } 2232 }
2210#endif 2233#endif
2211 mIncSearchWidget->setSize(); 2234 mIncSearchWidget->setSize();
2212 // mActionQuit->plug ( mMainWindow->toolBar()); 2235 // mActionQuit->plug ( mMainWindow->toolBar());
2213 2236
2214 2237
2215 2238
2216 //US Now connect the actions with the menue entries. 2239 //US Now connect the actions with the menue entries.
2217#ifdef DESKTOP_VERSION 2240#ifdef DESKTOP_VERSION
2218 mActionPrint->plug( fileMenu ); 2241 mActionPrint->plug( fileMenu );
2219 mActionPrintDetails->plug( fileMenu ); 2242 mActionPrintDetails->plug( fileMenu );
2220 fileMenu->insertSeparator(); 2243 fileMenu->insertSeparator();
2221#endif 2244#endif
2222 mActionMail->plug( fileMenu ); 2245 mActionMail->plug( fileMenu );
2223 fileMenu->insertSeparator(); 2246 fileMenu->insertSeparator();
2224 2247
2225 mActionNewContact->plug( editMenu ); 2248 mActionNewContact->plug( editMenu );
2226 mActionNewContact->plug( tb ); 2249 mActionNewContact->plug( tb );
2227 2250
2228 mActionEditAddressee->plug( editMenu ); 2251 mActionEditAddressee->plug( editMenu );
2229 editMenu->insertSeparator(); 2252 editMenu->insertSeparator();
2230 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || 2253 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) ||
2231 // (!KABPrefs::instance()->mMultipleViewsAtOnce )) 2254 // (!KABPrefs::instance()->mMultipleViewsAtOnce ))
2232 mActionEditAddressee->plug( tb ); 2255 mActionEditAddressee->plug( tb );
2233 2256
2234 // fileMenu->insertSeparator(); 2257 // fileMenu->insertSeparator();
2235 mActionSave->plug( fileMenu ); 2258 mActionSave->plug( fileMenu );
2236 fileMenu->insertItem( "&Import", ImportMenu ); 2259 fileMenu->insertItem( "&Import", ImportMenu );
2237 fileMenu->insertItem( "&Export", ExportMenu ); 2260 fileMenu->insertItem( "&Export", ExportMenu );
2238 editMenu->insertItem( i18n("&Change"), changeMenu ); 2261 editMenu->insertItem( i18n("&Change"), changeMenu );
2239 editMenu->insertSeparator(); 2262 editMenu->insertSeparator();
2240#ifndef DESKTOP_VERSION 2263#ifndef DESKTOP_VERSION
2241 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); 2264 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu );
2242#endif 2265#endif
2243#if 0 2266#if 0
2244 // PENDING fix MailVCard 2267 // PENDING fix MailVCard
2245 fileMenu->insertSeparator(); 2268 fileMenu->insertSeparator();
2246 mActionMailVCard->plug( fileMenu ); 2269 mActionMailVCard->plug( fileMenu );
2247#endif 2270#endif
2248#ifndef DESKTOP_VERSION 2271#ifndef DESKTOP_VERSION
2249 if ( Ir::supported() ) mActionBR->plug( beamMenu ); 2272 if ( Ir::supported() ) mActionBR->plug( beamMenu );
2250 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); 2273 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu );
2251 if ( Ir::supported() ) mActionBeam->plug( beamMenu ); 2274 if ( Ir::supported() ) mActionBeam->plug( beamMenu );
2252#endif 2275#endif
2253 fileMenu->insertSeparator(); 2276 fileMenu->insertSeparator();
2254 mActionQuit->plug( fileMenu ); 2277 mActionQuit->plug( fileMenu );
2255#ifdef _OL_IMPORT_ 2278#ifdef _OL_IMPORT_
2256 mActionImportOL->plug( ImportMenu ); 2279 mActionImportOL->plug( ImportMenu );
2257#endif 2280#endif
2258 // edit menu 2281 // edit menu
2259 mActionUndo->plug( editMenu ); 2282 mActionUndo->plug( editMenu );
2260 mActionRedo->plug( editMenu ); 2283 mActionRedo->plug( editMenu );
2261 editMenu->insertSeparator(); 2284 editMenu->insertSeparator();
2262 mActionCut->plug( editMenu ); 2285 mActionCut->plug( editMenu );
2263 mActionCopy->plug( editMenu ); 2286 mActionCopy->plug( editMenu );
2264 mActionPaste->plug( editMenu ); 2287 mActionPaste->plug( editMenu );
2265 mActionDelete->plug( editMenu ); 2288 mActionDelete->plug( editMenu );
2266 editMenu->insertSeparator(); 2289 editMenu->insertSeparator();
2267 mActionSelectAll->plug( editMenu ); 2290 mActionSelectAll->plug( editMenu );
2268 2291
2269 mActionSetFormattedName->plug( changeMenu ); 2292 mActionSetFormattedName->plug( changeMenu );
2270 mActionRemoveVoice->plug( changeMenu ); 2293 mActionRemoveVoice->plug( changeMenu );
2271 // settingsmings menu 2294 // settingsmings menu
2272//US special menuentry to configure the addressbook resources. On KDE 2295//US special menuentry to configure the addressbook resources. On KDE
2273// you do that through the control center !!! 2296// you do that through the control center !!!
2274 // settingsMenu->insertSeparator(); 2297 // settingsMenu->insertSeparator();
2275 2298
2276 mActionConfigKAddressbook->plug( settingsMenu, 0 ); 2299 mActionConfigKAddressbook->plug( settingsMenu, 0 );
2277 mActionConfigGlobal->plug( settingsMenu, 1 ); 2300 mActionConfigGlobal->plug( settingsMenu, 1 );
2278 mActionConfigResources->plug( settingsMenu,2 ); 2301 mActionConfigResources->plug( settingsMenu,2 );
2279 settingsMenu->insertSeparator(3); 2302 settingsMenu->insertSeparator(3);
2280 2303
2281 if ( mIsPart ) { 2304 if ( mIsPart ) {
2282 //US not implemented yet 2305 //US not implemented yet
2283 //mActionConfigShortcuts->plug( settingsMenu ); 2306 //mActionConfigShortcuts->plug( settingsMenu );
2284 //mActionConfigureToolbars->plug( settingsMenu ); 2307 //mActionConfigureToolbars->plug( settingsMenu );
2285 2308
2286 } else { 2309 } else {
2287 //US not implemented yet 2310 //US not implemented yet
2288 //mActionKeyBindings->plug( settingsMenu ); 2311 //mActionKeyBindings->plug( settingsMenu );
2289 } 2312 }
2290 2313
2291 mActionEditCategories->plug( settingsMenu ); 2314 mActionEditCategories->plug( settingsMenu );
2292 mActionManageCategories->plug( settingsMenu ); 2315 mActionManageCategories->plug( settingsMenu );
2293 mActionJumpBar->plug( viewMenu,0 ); 2316 mActionJumpBar->plug( viewMenu,0 );
2294 mActionDetails->plug( viewMenu,0 ); 2317 mActionDetails->plug( viewMenu,0 );
2295 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) 2318 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
2296 mActionDetails->plug( tb ); 2319 mActionDetails->plug( tb );
2297 settingsMenu->insertSeparator(); 2320 settingsMenu->insertSeparator();
2298#ifndef DESKTOP_VERSION 2321#ifndef DESKTOP_VERSION
2299 if ( Ir::supported() ) mActionBR->plug(settingsMenu ); 2322 if ( Ir::supported() ) mActionBR->plug(settingsMenu );
2300 settingsMenu->insertSeparator(); 2323 settingsMenu->insertSeparator();
2301#endif 2324#endif
2302 2325
2303 mActionWhoAmI->plug( settingsMenu ); 2326 mActionWhoAmI->plug( settingsMenu );
2304 //mActionEditCategories->plug( changeMenu ); 2327 //mActionEditCategories->plug( changeMenu );
2305 mActionCategories->plug( changeMenu ); 2328 mActionCategories->plug( changeMenu );
2306 //mActionManageCategories->plug( changeMenu ); 2329 //mActionManageCategories->plug( changeMenu );
2307 2330
2308 //mActionCategories->plug( settingsMenu ); 2331 //mActionCategories->plug( settingsMenu );
2309 2332
2310 2333
2311 mActionWN->plug( helpMenu ); 2334 mActionWN->plug( helpMenu );
2312 mActionStorageHowto->plug( helpMenu ); 2335 mActionStorageHowto->plug( helpMenu );
2313 mActionSyncHowto->plug( helpMenu ); 2336 mActionSyncHowto->plug( helpMenu );
2314 mActionKdeSyncHowto->plug( helpMenu ); 2337 mActionKdeSyncHowto->plug( helpMenu );
2315 mActionMultiSyncHowto->plug( helpMenu ); 2338 mActionMultiSyncHowto->plug( helpMenu );
2316 mActionFaq->plug( helpMenu ); 2339 mActionFaq->plug( helpMenu );
2317 mActionLicence->plug( helpMenu ); 2340 mActionLicence->plug( helpMenu );
2318 mActionAboutKAddressbook->plug( helpMenu ); 2341 mActionAboutKAddressbook->plug( helpMenu );
2319 2342
2320 if (KGlobal::getDesktopSize() > KGlobal::Small ) { 2343 if (KGlobal::getDesktopSize() > KGlobal::Small ) {
2321 2344
2322 mActionSave->plug( tb ); 2345 mActionSave->plug( tb );
2323 mViewManager->getFilterAction()->plug ( tb); 2346 mViewManager->getFilterAction()->plug ( tb);
2324 //LR hide filteraction on started in 480x640 2347 //LR hide filteraction on started in 480x640
2325 if (QApplication::desktop()->width() == 480 ) { 2348 if (QApplication::desktop()->width() == 480 ) {
2326 mViewManager->getFilterAction()->setComboWidth( 0 ); 2349 mViewManager->getFilterAction()->setComboWidth( 0 );
2327 } 2350 }
2328 mActionUndo->plug( tb ); 2351 mActionUndo->plug( tb );
2329 mActionDelete->plug( tb ); 2352 mActionDelete->plug( tb );
2330 mActionRedo->plug( tb ); 2353 mActionRedo->plug( tb );
2331 } else { 2354 } else {
2332 mActionSave->plug( tb ); 2355 mActionSave->plug( tb );
2333 tb->enableMoving(false); 2356 tb->enableMoving(false);
2334 } 2357 }
2335 //mActionQuit->plug ( tb ); 2358 //mActionQuit->plug ( tb );
2336 //tb->insertWidget(-1, 0, mIncSearchWidget, 6); 2359 //tb->insertWidget(-1, 0, mIncSearchWidget, 6);
2337 2360
2338 //US link the searchwidget first to this. 2361 //US link the searchwidget first to this.
2339 // The real linkage to the toolbar happens later. 2362 // The real linkage to the toolbar happens later.
2340//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); 2363//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
2341//US tb->insertItem( mIncSearchWidget ); 2364//US tb->insertItem( mIncSearchWidget );
2342/*US 2365/*US
2343 mIncSearchWidget = new IncSearchWidget( tb ); 2366 mIncSearchWidget = new IncSearchWidget( tb );
2344 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 2367 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
2345 SLOT( incrementalSearch( const QString& ) ) ); 2368 SLOT( incrementalSearch( const QString& ) ) );
2346 2369
2347 mJumpButtonBar = new JumpButtonBar( this, this ); 2370 mJumpButtonBar = new JumpButtonBar( this, this );
2348 2371
2349//US topLayout->addWidget( mJumpButtonBar ); 2372//US topLayout->addWidget( mJumpButtonBar );
2350 this->layout()->add( mJumpButtonBar ); 2373 this->layout()->add( mJumpButtonBar );
2351*/ 2374*/
2352 2375
2353#endif //KAB_EMBEDDED 2376#endif //KAB_EMBEDDED
2354 2377
2355 mActionExport2phone->plug( ExportMenu ); 2378 mActionExport2phone->plug( ExportMenu );
2356 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); 2379 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) );
2357 syncManager->fillSyncMenu(); 2380 syncManager->fillSyncMenu();
2358 2381
2359} 2382}
2360void KABCore::showLicence() 2383void KABCore::showLicence()
2361{ 2384{
2362 KApplication::showLicence(); 2385 KApplication::showLicence();
2363} 2386}
2364 2387
2365void KABCore::manageCategories( ) 2388void KABCore::manageCategories( )
2366{ 2389{
2367 KABCatPrefs* cp = new KABCatPrefs(); 2390 KABCatPrefs* cp = new KABCatPrefs();
2368 cp->show(); 2391 cp->show();
2369 int w =cp->sizeHint().width() ; 2392 int w =cp->sizeHint().width() ;
2370 int h = cp->sizeHint().height() ; 2393 int h = cp->sizeHint().height() ;
2371 int dw = QApplication::desktop()->width(); 2394 int dw = QApplication::desktop()->width();
2372 int dh = QApplication::desktop()->height(); 2395 int dh = QApplication::desktop()->height();
2373 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2396 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2374 if ( !cp->exec() ) { 2397 if ( !cp->exec() ) {
2375 delete cp; 2398 delete cp;
2376 return; 2399 return;
2377 } 2400 }
2378 int count = 0; 2401 int count = 0;
2379 int cc = 0; 2402 int cc = 0;
2380 message( i18n("Please wait, processing categories...")); 2403 message( i18n("Please wait, processing categories..."));
2381 if ( cp->addCat() ) { 2404 if ( cp->addCat() ) {
2382 KABC::AddressBook::Iterator it; 2405 KABC::AddressBook::Iterator it;
2383 QStringList catList = KABPrefs::instance()->mCustomCategories; 2406 QStringList catList = KABPrefs::instance()->mCustomCategories;
2384 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2407 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2385 ++cc; 2408 ++cc;
2386 if ( cc %10 == 0) 2409 if ( cc %10 == 0)
2387 message(i18n("Processing contact #%1").arg(cc)); 2410 message(i18n("Processing contact #%1").arg(cc));
2388 QStringList catIncList = (*it).categories(); 2411 QStringList catIncList = (*it).categories();
2389 int i; 2412 int i;
2390 for( i = 0; i< catIncList.count(); ++i ) { 2413 for( i = 0; i< catIncList.count(); ++i ) {
2391 if ( !catList.contains (catIncList[i])) { 2414 if ( !catList.contains (catIncList[i])) {
2392 catList.append( catIncList[i] ); 2415 catList.append( catIncList[i] );
2393 //qDebug("add cat %s ", catIncList[i].latin1()); 2416 //qDebug("add cat %s ", catIncList[i].latin1());
2394 ++count; 2417 ++count;
2395 } 2418 }
2396 } 2419 }
2397 } 2420 }
2398 catList.sort(); 2421 catList.sort();
2399 KABPrefs::instance()->mCustomCategories = catList; 2422 KABPrefs::instance()->mCustomCategories = catList;
2400 KABPrefs::instance()->writeConfig(); 2423 KABPrefs::instance()->writeConfig();
2401 message(QString::number( count )+ i18n(" categories added to list! ")); 2424 message(QString::number( count )+ i18n(" categories added to list! "));
2402 } else { 2425 } else {
2403 QStringList catList = KABPrefs::instance()->mCustomCategories; 2426 QStringList catList = KABPrefs::instance()->mCustomCategories;
2404 QStringList catIncList; 2427 QStringList catIncList;
2405 QStringList newCatList; 2428 QStringList newCatList;
2406 KABC::AddressBook::Iterator it; 2429 KABC::AddressBook::Iterator it;
2407 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2430 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2408 ++cc; 2431 ++cc;
2409 if ( cc %10 == 0) 2432 if ( cc %10 == 0)
2410 message(i18n("Processing contact #%1").arg(cc)); 2433 message(i18n("Processing contact #%1").arg(cc));
2411 QStringList catIncList = (*it).categories(); 2434 QStringList catIncList = (*it).categories();
2412 int i; 2435 int i;
2413 if ( catIncList.count() ) { 2436 if ( catIncList.count() ) {
2414 newCatList.clear(); 2437 newCatList.clear();
2415 for( i = 0; i< catIncList.count(); ++i ) { 2438 for( i = 0; i< catIncList.count(); ++i ) {
2416 if ( catList.contains (catIncList[i])) { 2439 if ( catList.contains (catIncList[i])) {
2417 newCatList.append( catIncList[i] ); 2440 newCatList.append( catIncList[i] );
2418 } 2441 }
2419 } 2442 }
2420 newCatList.sort(); 2443 newCatList.sort();
2421 (*it).setCategories( newCatList ); 2444 (*it).setCategories( newCatList );
2422 mAddressBook->insertAddressee( (*it) ); 2445 mAddressBook->insertAddressee( (*it) );
2423 } 2446 }
2424 } 2447 }
2425 setModified( true ); 2448 setModified( true );
2426 mViewManager->refreshView(); 2449 mViewManager->refreshView();
2427 message( i18n("Removing categories done!")); 2450 message( i18n("Removing categories done!"));
2428 } 2451 }
2429 delete cp; 2452 delete cp;
2430} 2453}
2431void KABCore::removeVoice() 2454void KABCore::removeVoice()
2432{ 2455{
2433 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 ) 2456 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 )
2434 return; 2457 return;
2435 XXPortSelectDialog dlg( this, false, this ); 2458 XXPortSelectDialog dlg( this, false, this );
2436 if ( !dlg.exec() ) 2459 if ( !dlg.exec() )
2437 return; 2460 return;
2438 mAddressBook->setUntagged(); 2461 mAddressBook->setUntagged();
2439 dlg.tagSelected(); 2462 dlg.tagSelected();
2440 message(i18n("Removing voice..."), false ); 2463 message(i18n("Removing voice..."), false );
2441 KABC::AddressBook::Iterator it; 2464 KABC::AddressBook::Iterator it;
2442 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2465 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2443 if ( (*it).tagged() ) { 2466 if ( (*it).tagged() ) {
2444 (*it).removeVoice(); 2467 (*it).removeVoice();
2445 } 2468 }
2446 } 2469 }
2447 message(i18n("Refreshing view...") ); 2470 message(i18n("Refreshing view...") );
2448 qApp->processEvents();
2449 mViewManager->refreshView( "" ); 2471 mViewManager->refreshView( "" );
2450 Addressee add; 2472 Addressee add;
2451 mDetails->setAddressee( add ); 2473 mDetails->setAddressee( add );
2452 message(i18n("Remove voice completed!") ); 2474 message(i18n("Remove voice completed!") );
2453 2475
2454 2476
2455 2477
2456} 2478}
2457 2479
2458void KABCore::setFormattedName() 2480void KABCore::setFormattedName()
2459{ 2481{
2460 KABFormatPrefs setpref; 2482 KABFormatPrefs setpref;
2461 if ( !setpref.exec() ) { 2483 if ( !setpref.exec() ) {
2462 return; 2484 return;
2463 } 2485 }
2464 XXPortSelectDialog dlg( this, false, this ); 2486 XXPortSelectDialog dlg( this, false, this );
2465 if ( !dlg.exec() ) 2487 if ( !dlg.exec() )
2466 return; 2488 return;
2467 mAddressBook->setUntagged(); 2489 mAddressBook->setUntagged();
2468 dlg.tagSelected(); 2490 dlg.tagSelected();
2469 int count = 0; 2491 int count = 0;
2470 KABC::AddressBook::Iterator it; 2492 KABC::AddressBook::Iterator it;
2471 bool modified = false; 2493 bool modified = false;
2472 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2494 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2473 if ( (*it).tagged() ) { 2495 if ( (*it).tagged() ) {
2474 if ( (*it).uid().left( 2 ) == "la" ) 2496 if ( (*it).uid().left( 2 ) == "la" )
2475 if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) 2497 if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") )
2476 continue; 2498 continue;
2477 ++count; 2499 ++count;
2478 if ( count %10 == 0 ) 2500 if ( count %10 == 0 )
2479 message(i18n("Changing contact #%1").arg( count ) ); 2501 message(i18n("Changing contact #%1").arg( count ) );
2480 qApp->processEvents();
2481 QString fName; 2502 QString fName;
2482 if ( setpref.simple->isChecked() ) 2503 if ( setpref.simple->isChecked() )
2483 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); 2504 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName );
2484 else if ( setpref.full->isChecked() ) 2505 else if ( setpref.full->isChecked() )
2485 fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); 2506 fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName );
2486 else if ( setpref.reverse->isChecked() ) 2507 else if ( setpref.reverse->isChecked() )
2487 fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); 2508 fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName );
2488 else 2509 else
2489 fName = (*it).organization(); 2510 fName = (*it).organization();
2490 if ( setpref.setCompany->isChecked() ) 2511 if ( setpref.setCompany->isChecked() )
2491 if ( fName.isEmpty() || fName =="," ) 2512 if ( fName.isEmpty() || fName =="," )
2492 fName = (*it).organization(); 2513 fName = (*it).organization();
2493 (*it).setFormattedName( fName ); 2514 (*it).setFormattedName( fName );
2494 (*it).setChanged( true ); 2515 (*it).setChanged( true );
2495 modified = true; 2516 modified = true;
2496 (*it).setRevision( QDateTime::currentDateTime() ); 2517 (*it).setRevision( QDateTime::currentDateTime() );
2497 } 2518 }
2498 } 2519 }
2499 message(i18n("Refreshing view...") ); 2520 message(i18n("Refreshing view...") );
2500 qApp->processEvents();
2501 if ( modified ) 2521 if ( modified )
2502 setModified( true ); 2522 setModified( true );
2503 Addressee add; 2523 Addressee add;
2504 mDetails->setAddressee( add ); 2524 mDetails->setAddressee( add );
2505 if ( count == 0 ) 2525 if ( count == 0 )
2506 message(i18n("No contact changed!") ); 2526 message(i18n("No contact changed!") );
2507 else 2527 else
2508 message(i18n("%1 contacts changed!").arg( count ) ); 2528 message(i18n("%1 contacts changed!").arg( count ) );
2509} 2529}
2510 2530
2511void KABCore::clipboardDataChanged() 2531void KABCore::clipboardDataChanged()
2512{ 2532{
2513 2533
2514 if ( mReadWrite ) 2534 if ( mReadWrite )
2515 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); 2535 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() );
2516 2536
2517} 2537}
2518 2538
2519void KABCore::updateActionMenu() 2539void KABCore::updateActionMenu()
2520{ 2540{
2521 UndoStack *undo = UndoStack::instance(); 2541 UndoStack *undo = UndoStack::instance();
2522 RedoStack *redo = RedoStack::instance(); 2542 RedoStack *redo = RedoStack::instance();
2523 2543
2524 if ( undo->isEmpty() ) 2544 if ( undo->isEmpty() )
2525 mActionUndo->setText( i18n( "Undo" ) ); 2545 mActionUndo->setText( i18n( "Undo" ) );
2526 else 2546 else
2527 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); 2547 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) );
2528 2548
2529 mActionUndo->setEnabled( !undo->isEmpty() ); 2549 mActionUndo->setEnabled( !undo->isEmpty() );
2530 2550
2531 if ( !redo->top() ) 2551 if ( !redo->top() )
2532 mActionRedo->setText( i18n( "Redo" ) ); 2552 mActionRedo->setText( i18n( "Redo" ) );
2533 else 2553 else
2534 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); 2554 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) );
2535 2555
2536 mActionRedo->setEnabled( !redo->isEmpty() ); 2556 mActionRedo->setEnabled( !redo->isEmpty() );
2537} 2557}
2538 2558
2539void KABCore::configureKeyBindings() 2559void KABCore::configureKeyBindings()
2540{ 2560{
2541#ifndef KAB_EMBEDDED 2561#ifndef KAB_EMBEDDED
2542 KKeyDialog::configure( actionCollection(), true ); 2562 KKeyDialog::configure( actionCollection(), true );
2543#else //KAB_EMBEDDED 2563#else //KAB_EMBEDDED
2544 qDebug("KABCore::configureKeyBindings() not implemented"); 2564 qDebug("KABCore::configureKeyBindings() not implemented");
2545#endif //KAB_EMBEDDED 2565#endif //KAB_EMBEDDED
2546} 2566}
2547 2567
2548#ifdef KAB_EMBEDDED 2568#ifdef KAB_EMBEDDED
2549void KABCore::configureResources() 2569void KABCore::configureResources()
2550{ 2570{
2551 KRES::KCMKResources dlg( this, "" , 0 ); 2571 KRES::KCMKResources dlg( this, "" , 0 );
2552 2572
2553 if ( !dlg.exec() ) 2573 if ( !dlg.exec() )
2554 return; 2574 return;
2555 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); 2575 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") );
2556} 2576}
2557#endif //KAB_EMBEDDED 2577#endif //KAB_EMBEDDED
2558 2578
2559 2579
2560/* this method will be called through the QCop interface from Ko/Pi to select addresses 2580/* this method will be called through the QCop interface from Ko/Pi to select addresses
2561 * for the attendees list of an event. 2581 * for the attendees list of an event.
2562 */ 2582 */
2563void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) 2583void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
2564{ 2584{
2565 qDebug("KABCore::requestForNameEmailUidList "); 2585 qDebug("KABCore::requestForNameEmailUidList ");
2566 bool ok = false; 2586 bool ok = false;
2567 mEmailSourceChannel = sourceChannel; 2587 mEmailSourceChannel = sourceChannel;
2568 mEmailSourceUID = uid; 2588 mEmailSourceUID = uid;
2569 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) ); 2589 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) );
2570 //callContactdialog(); 2590 //callContactdialog();
2571#if 0 2591#if 0
2572 int wid = uid.toInt( &ok ); 2592 int wid = uid.toInt( &ok );
2573 qDebug("UID %s ", uid.latin1()); 2593 qDebug("UID %s ", uid.latin1());
2574 if ( ok ) { 2594 if ( ok ) {
2575 if ( wid != QApplication::desktop()->width() ) { 2595 if ( wid != QApplication::desktop()->width() ) {
2576 qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); 2596 qDebug("KA/Pi: Request from different desktop geometry. Resizing ...");
2577 message( i18n("Resizing, please wait...") ); 2597 message( i18n("Resizing, please wait...") );
2578 mMainWindow->showMinimized(); 2598 mMainWindow->showMinimized();
2579 /* 2599 /*
2580 { 2600 {
2581 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); 2601 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2582 } 2602 }
2583 */ 2603 */
2584 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) ); 2604 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) );
2585 return; 2605 return;
2586 } 2606 }
2587 2607
2588 } else { 2608 } else {
2589 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); 2609 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid ");
2590 } 2610 }
2591 callContactdialog(); 2611 callContactdialog();
2592 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); 2612 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2593#endif 2613#endif
2594} 2614}
2595void KABCore::resizeAndCallContactdialog() 2615void KABCore::resizeAndCallContactdialog()
2596{ 2616{
2597 updateMainWindow(); 2617 updateMainWindow();
2598 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) ); 2618 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) );
2599} 2619}
2600 2620
2601void KABCore::doRingSync() 2621void KABCore::doRingSync()
2602{ 2622{
2603 topLevelWidget()->raise(); 2623 topLevelWidget()->raise();
2604 syncManager->multiSync( false ); 2624 syncManager->multiSync( false );
2605} 2625}
2606void KABCore::callContactdialog() 2626void KABCore::callContactdialog()
2607{ 2627{
2608 static bool running = false; 2628 static bool running = false;
2609 if (running) return; 2629 if (running) return;
2610 running = true; 2630 running = true;
2611 QStringList nameList; 2631 QStringList nameList;
2612 QStringList emailList; 2632 QStringList emailList;
2613 QStringList uidList; 2633 QStringList uidList;
2614 qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() ); 2634 qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() );
2615 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 2635 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
2616 uint i=0; 2636 uint i=0;
2617 for (i=0; i < list.count(); i++) 2637 for (i=0; i < list.count(); i++)
2618 { 2638 {
2619 nameList.append(list[i].realName()); 2639 nameList.append(list[i].realName());
2620 emailList.append(list[i].preferredEmail()); 2640 emailList.append(list[i].preferredEmail());
2621 uidList.append(list[i].uid()); 2641 uidList.append(list[i].uid());
2622 } 2642 }
2623 QString uid = mEmailSourceUID; 2643 QString uid = mEmailSourceUID;
2624 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); 2644 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
2625 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList); 2645 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList);
2626 running = false; 2646 running = false;
2627} 2647}
2628/* this method will be called through the QCop interface from Ko/Pi to select birthdays 2648/* this method will be called through the QCop interface from Ko/Pi to select birthdays
2629 * to put them into the calendar. 2649 * to put them into the calendar.
2630 */ 2650 */
2631void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) 2651void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid)
2632{ 2652{
2633 // qDebug("KABCore::requestForBirthdayList"); 2653 // qDebug("KABCore::requestForBirthdayList");
2634 QStringList birthdayList; 2654 QStringList birthdayList;
2635 QStringList anniversaryList; 2655 QStringList anniversaryList;
2636 QStringList realNameList; 2656 QStringList realNameList;
2637 QStringList preferredEmailList; 2657 QStringList preferredEmailList;
2638 QStringList assembledNameList; 2658 QStringList assembledNameList;
2639 QStringList uidList; 2659 QStringList uidList;
2640 2660
2641 KABC::AddressBook::Iterator it; 2661 KABC::AddressBook::Iterator it;
2642 2662
2643 int count = 0; 2663 int count = 0;
2644 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2664 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2645 ++count; 2665 ++count;
2646 } 2666 }
2647 QProgressBar bar(count,0 ); 2667 QProgressBar bar(count,0 );
2648 int w = 300; 2668 int w = 300;
2649 if ( QApplication::desktop()->width() < 320 ) 2669 if ( QApplication::desktop()->width() < 320 )
2650 w = 220; 2670 w = 220;
2651 int h = bar.sizeHint().height() ; 2671 int h = bar.sizeHint().height() ;
2652 int dw = QApplication::desktop()->width(); 2672 int dw = QApplication::desktop()->width();
2653 int dh = QApplication::desktop()->height(); 2673 int dh = QApplication::desktop()->height();
2654 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2674 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2655 bar.show(); 2675 bar.show();
2656 bar.setCaption (i18n("Collecting birthdays - close to abort!") ); 2676 bar.setCaption (i18n("Collecting birthdays - close to abort!") );
2657 qApp->processEvents(); 2677 qApp->processEvents();
2658 2678
2659 QDate bday; 2679 QDate bday;
2660 QString anni; 2680 QString anni;
2661 QString formattedbday; 2681 QString formattedbday;
2662 2682
2663 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) 2683 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it )
2664 { 2684 {
2665 if ( ! bar.isVisible() ) 2685 if ( ! bar.isVisible() )
2666 return; 2686 return;
2667 bar.setProgress( count++ ); 2687 bar.setProgress( count++ );
2668 qApp->processEvents(); 2688 qApp->processEvents();
2669 bday = (*it).birthday().date(); 2689 bday = (*it).birthday().date();
2670 anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); 2690 anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" );
2671 2691
2672 if ( bday.isValid() || !anni.isEmpty()) 2692 if ( bday.isValid() || !anni.isEmpty())
2673 { 2693 {
2674 if (bday.isValid()) 2694 if (bday.isValid())
2675 formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); 2695 formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate);
2676 else 2696 else
2677 formattedbday = "NOTVALID"; 2697 formattedbday = "NOTVALID";
2678 if (anni.isEmpty()) 2698 if (anni.isEmpty())
2679 anni = "INVALID"; 2699 anni = "INVALID";
2680 2700
2681 birthdayList.append(formattedbday); 2701 birthdayList.append(formattedbday);
2682 anniversaryList.append(anni); //should be ISODate 2702 anniversaryList.append(anni); //should be ISODate
2683 realNameList.append((*it).realName()); 2703 realNameList.append((*it).realName());
2684 preferredEmailList.append((*it).preferredEmail()); 2704 preferredEmailList.append((*it).preferredEmail());
2685 assembledNameList.append((*it).realName()); 2705 assembledNameList.append((*it).realName());
2686 uidList.append((*it).uid()); 2706 uidList.append((*it).uid());
2687 2707
2688 //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() ); 2708 //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() );
2689 } 2709 }
2690 } 2710 }
2691 2711
2692 bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); 2712 bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList);
2693 2713
2694} 2714}
2695 2715
2696/* this method will be called through the QCop interface from other apps to show details of a contact. 2716/* this method will be called through the QCop interface from other apps to show details of a contact.
2697 */ 2717 */
2698void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) 2718void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid)
2699{ 2719{
2700 //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); 2720 //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1());
2701 2721
2702 QString foundUid = QString::null; 2722 QString foundUid = QString::null;
2703 if ( ! uid.isEmpty() ) { 2723 if ( ! uid.isEmpty() ) {
2704 Addressee adrr = mAddressBook->findByUid( uid ); 2724 Addressee adrr = mAddressBook->findByUid( uid );
2705 if ( !adrr.isEmpty() ) { 2725 if ( !adrr.isEmpty() ) {
2706 foundUid = uid; 2726 foundUid = uid;
2707 } 2727 }
2708 if ( email == "sendbacklist" ) { 2728 if ( email == "sendbacklist" ) {
2709 //qDebug("ssssssssssssssssssssssend "); 2729 //qDebug("ssssssssssssssssssssssend ");
2710 QStringList nameList; 2730 QStringList nameList;
2711 QStringList emailList; 2731 QStringList emailList;
2712 QStringList uidList; 2732 QStringList uidList;
2713 nameList.append(adrr.realName()); 2733 nameList.append(adrr.realName());
2714 emailList = adrr.emails(); 2734 emailList = adrr.emails();
2715 uidList.append( adrr.preferredEmail()); 2735 uidList.append( adrr.preferredEmail());
2716 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); 2736 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList);
2717 return; 2737 return;
2718 } 2738 }
2719 2739
2720 } 2740 }
2721 2741
2722 if ( email == "sendbacklist" ) 2742 if ( email == "sendbacklist" )
2723 return; 2743 return;
2724 if (foundUid.isEmpty()) 2744 if (foundUid.isEmpty())
2725 { 2745 {
2726 //find the uid of the person first 2746 //find the uid of the person first
2727 Addressee::List namelist; 2747 Addressee::List namelist;
2728 Addressee::List emaillist; 2748 Addressee::List emaillist;
2729 2749
2730 if (!name.isEmpty()) 2750 if (!name.isEmpty())
2731 namelist = mAddressBook->findByName( name ); 2751 namelist = mAddressBook->findByName( name );
2732 2752
2733 if (!email.isEmpty()) 2753 if (!email.isEmpty())
2734 emaillist = mAddressBook->findByEmail( email ); 2754 emaillist = mAddressBook->findByEmail( email );
2735 //qDebug("count %d %d ", namelist.count(),emaillist.count() ); 2755 //qDebug("count %d %d ", namelist.count(),emaillist.count() );
2736 //check if we have a match in Namelist and Emaillist 2756 //check if we have a match in Namelist and Emaillist
2737 if ((namelist.count() == 0) && (emaillist.count() > 0)) { 2757 if ((namelist.count() == 0) && (emaillist.count() > 0)) {
2738 foundUid = emaillist[0].uid(); 2758 foundUid = emaillist[0].uid();
2739 } 2759 }
2740 else if ((namelist.count() > 0) && (emaillist.count() == 0)) 2760 else if ((namelist.count() > 0) && (emaillist.count() == 0))
2741 foundUid = namelist[0].uid(); 2761 foundUid = namelist[0].uid();
2742 else 2762 else
2743 { 2763 {
2744 for (int i = 0; i < namelist.count(); i++) 2764 for (int i = 0; i < namelist.count(); i++)
2745 { 2765 {
2746 for (int j = 0; j < emaillist.count(); j++) 2766 for (int j = 0; j < emaillist.count(); j++)
2747 { 2767 {
2748 if (namelist[i] == emaillist[j]) 2768 if (namelist[i] == emaillist[j])
2749 { 2769 {
2750 foundUid = namelist[i].uid(); 2770 foundUid = namelist[i].uid();
2751 } 2771 }
2752 } 2772 }
2753 } 2773 }
2754 } 2774 }
2755 } 2775 }
2756 else 2776 else
2757 { 2777 {
2758 foundUid = uid; 2778 foundUid = uid;
2759 } 2779 }
2760 2780
2761 if (!foundUid.isEmpty()) 2781 if (!foundUid.isEmpty())
2762 { 2782 {
2763 2783
2764 // raise Ka/Pi if it is in the background 2784 // raise Ka/Pi if it is in the background
2765#ifndef DESKTOP_VERSION 2785#ifndef DESKTOP_VERSION
2766#ifndef KORG_NODCOP 2786#ifndef KORG_NODCOP
2767 //QCopEnvelope e("QPE/Application/kapi", "raise()"); 2787 //QCopEnvelope e("QPE/Application/kapi", "raise()");
2768#endif 2788#endif
2769#endif 2789#endif
2770 2790
2771 mMainWindow->showMaximized(); 2791 mMainWindow->showMaximized();
2772 mMainWindow-> raise(); 2792 mMainWindow-> raise();
2773 2793
2774 mViewManager->setSelected( "", false); 2794 mViewManager->setSelected( "", false);
2775 mViewManager->refreshView( "" ); 2795 mViewManager->refreshView( "" );
2776 mViewManager->setSelected( foundUid, true ); 2796 mViewManager->setSelected( foundUid, true );
2777 mViewManager->refreshView( foundUid ); 2797 mViewManager->refreshView( foundUid );
2778 2798
2779 if ( !mMultipleViewsAtOnce ) 2799 if ( !mMultipleViewsAtOnce )
2780 { 2800 {
2781 setDetailsVisible( true ); 2801 setDetailsVisible( true );
2782 mActionDetails->setChecked(true); 2802 mActionDetails->setChecked(true);
2783 } 2803 }
2784 } 2804 }
2785} 2805}
2786void KABCore::storagehowto() 2806void KABCore::storagehowto()
2787{ 2807{
2788 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); 2808 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" );
2789} 2809}
2790void KABCore::whatsnew() 2810void KABCore::whatsnew()
2791{ 2811{
2792 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 2812 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
2793} 2813}
2794void KABCore::synchowto() 2814void KABCore::synchowto()
2795{ 2815{
2796 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 2816 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
2797} 2817}
2798void KABCore::kdesynchowto() 2818void KABCore::kdesynchowto()
2799{ 2819{
2800 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 2820 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
2801} 2821}
2802void KABCore::multisynchowto() 2822void KABCore::multisynchowto()
2803{ 2823{
2804 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 2824 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
2805} 2825}
2806void KABCore::faq() 2826void KABCore::faq()
2807{ 2827{
2808 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); 2828 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" );
2809} 2829}
2810 2830
2811#include <libkcal/syncdefines.h> 2831#include <libkcal/syncdefines.h>
2812 2832
2813KABC::Addressee KABCore::getLastSyncAddressee() 2833KABC::Addressee KABCore::getLastSyncAddressee()
2814{ 2834{
2815 Addressee lse; 2835 Addressee lse;
2816 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2836 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2817 2837
2818 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); 2838 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() );
2819 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2839 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice );
2820 if (lse.isEmpty()) { 2840 if (lse.isEmpty()) {
2821 qDebug("KA: Creating new last-syncAddressee "); 2841 qDebug("KA: Creating new last-syncAddressee ");
2822 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2842 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice );
2823 QString sum = ""; 2843 QString sum = "";
2824 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) 2844 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
2825 sum = "E: "; 2845 sum = "E: ";
2826 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); 2846 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event"));
2827 lse.setRevision( mLastAddressbookSync ); 2847 lse.setRevision( mLastAddressbookSync );
2828 lse.setCategories( i18n("SyncEvent") ); 2848 lse.setCategories( i18n("SyncEvent") );
2829 mAddressBook->insertAddressee( lse ); 2849 mAddressBook->insertAddressee( lse );
2830 } 2850 }
2831 return lse; 2851 return lse;
2832} 2852}
2833int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) 2853int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full )
2834{ 2854{
2835 2855
2836 //void setZaurusId(int id); 2856 //void setZaurusId(int id);
2837 // int zaurusId() const; 2857 // int zaurusId() const;
2838 // void setZaurusUid(int id); 2858 // void setZaurusUid(int id);
2839 // int zaurusUid() const; 2859 // int zaurusUid() const;
2840 // void setZaurusStat(int id); 2860 // void setZaurusStat(int id);
2841 // int zaurusStat() const; 2861 // int zaurusStat() const;
2842 // 0 equal 2862 // 0 equal
2843 // 1 take local 2863 // 1 take local
2844 // 2 take remote 2864 // 2 take remote
2845 // 3 cancel 2865 // 3 cancel
2846 QDateTime lastSync = mLastAddressbookSync; 2866 QDateTime lastSync = mLastAddressbookSync;
2847 QDateTime localMod = local->revision(); 2867 QDateTime localMod = local->revision();
2848 QDateTime remoteMod = remote->revision(); 2868 QDateTime remoteMod = remote->revision();
2849 2869
2850 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2870 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2851 2871
2852 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2872 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2853 bool remCh, locCh; 2873 bool remCh, locCh;
2854 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); 2874 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
2855 //if ( remCh ) 2875 //if ( remCh )
2856 // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); 2876 // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
2857 locCh = ( localMod > mLastAddressbookSync ); 2877 locCh = ( localMod > mLastAddressbookSync );
2858 //qDebug("cahnged rem %d loc %d",remCh, locCh ); 2878 //qDebug("cahnged rem %d loc %d",remCh, locCh );
2859 if ( !remCh && ! locCh ) { 2879 if ( !remCh && ! locCh ) {
2860 //qDebug("both not changed "); 2880 //qDebug("both not changed ");
2861 lastSync = localMod.addDays(1); 2881 lastSync = localMod.addDays(1);
2862 if ( mode <= SYNC_PREF_ASK ) 2882 if ( mode <= SYNC_PREF_ASK )
2863 return 0; 2883 return 0;
2864 } else { 2884 } else {
2865 if ( locCh ) { 2885 if ( locCh ) {
2866 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); 2886 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1());
2867 lastSync = localMod.addDays( -1 ); 2887 lastSync = localMod.addDays( -1 );
2868 if ( !remCh ) 2888 if ( !remCh )
2869 remoteMod =( lastSync.addDays( -1 ) ); 2889 remoteMod =( lastSync.addDays( -1 ) );
2870 } else { 2890 } else {
2871 //qDebug(" not loc changed "); 2891 //qDebug(" not loc changed ");
2872 lastSync = localMod.addDays( 1 ); 2892 lastSync = localMod.addDays( 1 );
2873 if ( remCh ) { 2893 if ( remCh ) {
2874 //qDebug("rem changed "); 2894 //qDebug("rem changed ");
2875 remoteMod =( lastSync.addDays( 1 ) ); 2895 remoteMod =( lastSync.addDays( 1 ) );
2876 } 2896 }
2877 2897
2878 } 2898 }
2879 } 2899 }
2880 full = true; 2900 full = true;
2881 if ( mode < SYNC_PREF_ASK ) 2901 if ( mode < SYNC_PREF_ASK )
2882 mode = SYNC_PREF_ASK; 2902 mode = SYNC_PREF_ASK;
2883 } else { 2903 } else {
2884 if ( localMod == remoteMod ) 2904 if ( localMod == remoteMod )
2885 return 0; 2905 return 0;
2886 2906
2887 } 2907 }
2888 //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec()); 2908 //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec());
2889 //qDebug("lastsync %s ", lastSync.toString().latin1() ); 2909 //qDebug("lastsync %s ", lastSync.toString().latin1() );
2890 //full = true; //debug only 2910 //full = true; //debug only
2891 if ( full ) { 2911 if ( full ) {
2892 bool equ = ( (*local) == (*remote) ); 2912 bool equ = ( (*local) == (*remote) );
2893 if ( equ ) { 2913 if ( equ ) {
2894 //qDebug("equal "); 2914 //qDebug("equal ");
2895 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2915 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2896 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); 2916 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) );
2897 } 2917 }
2898 if ( mode < SYNC_PREF_FORCE_LOCAL ) 2918 if ( mode < SYNC_PREF_FORCE_LOCAL )
2899 return 0; 2919 return 0;
2900 2920
2901 }//else //debug only 2921 }//else //debug only
2902 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); 2922 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1());
2903 } 2923 }
2904 int result; 2924 int result;
2905 bool localIsNew; 2925 bool localIsNew;
2906 //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() ); 2926 //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() );
2907 2927
2908 if ( full && mode < SYNC_PREF_NEWEST ) 2928 if ( full && mode < SYNC_PREF_NEWEST )
2909 mode = SYNC_PREF_ASK; 2929 mode = SYNC_PREF_ASK;
2910 2930
2911 switch( mode ) { 2931 switch( mode ) {
2912 case SYNC_PREF_LOCAL: 2932 case SYNC_PREF_LOCAL:
2913 if ( lastSync > remoteMod ) 2933 if ( lastSync > remoteMod )
2914 return 1; 2934 return 1;
2915 if ( lastSync > localMod ) 2935 if ( lastSync > localMod )
2916 return 2; 2936 return 2;
2917 return 1; 2937 return 1;
2918 break; 2938 break;
2919 case SYNC_PREF_REMOTE: 2939 case SYNC_PREF_REMOTE:
2920 if ( lastSync > localMod ) 2940 if ( lastSync > localMod )
2921 return 2; 2941 return 2;
2922 if ( lastSync > remoteMod ) 2942 if ( lastSync > remoteMod )
2923 return 1; 2943 return 1;
2924 return 2; 2944 return 2;
2925 break; 2945 break;
2926 case SYNC_PREF_NEWEST: 2946 case SYNC_PREF_NEWEST:
2927 if ( localMod > remoteMod ) 2947 if ( localMod > remoteMod )
2928 return 1; 2948 return 1;
2929 else 2949 else
2930 return 2; 2950 return 2;
2931 break; 2951 break;
2932 case SYNC_PREF_ASK: 2952 case SYNC_PREF_ASK:
2933 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); 2953 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
2934 if ( lastSync > remoteMod && lastSync > localMod) 2954 if ( lastSync > remoteMod && lastSync > localMod)
2935 return 0; 2955 return 0;
2936 if ( lastSync > remoteMod ) 2956 if ( lastSync > remoteMod )
2937 return 1; 2957 return 1;
2938 if ( lastSync > localMod ) { 2958 if ( lastSync > localMod ) {
2939 return 2; 2959 return 2;
2940 } 2960 }
2941 localIsNew = localMod >= remoteMod; 2961 localIsNew = localMod >= remoteMod;
2942 //qDebug("conflict! ************************************** "); 2962 //qDebug("conflict! ************************************** ");
2943 { 2963 {
2944 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this ); 2964 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this );
2945 result = acd.executeD(localIsNew); 2965 result = acd.executeD(localIsNew);
2946 return result; 2966 return result;
2947 } 2967 }
2948 break; 2968 break;
2949 case SYNC_PREF_FORCE_LOCAL: 2969 case SYNC_PREF_FORCE_LOCAL:
2950 return 1; 2970 return 1;
2951 break; 2971 break;
2952 case SYNC_PREF_FORCE_REMOTE: 2972 case SYNC_PREF_FORCE_REMOTE:
2953 return 2; 2973 return 2;
2954 break; 2974 break;
2955 2975
2956 default: 2976 default:
2957 // SYNC_PREF_TAKE_BOTH not implemented 2977 // SYNC_PREF_TAKE_BOTH not implemented
2958 break; 2978 break;
2959 } 2979 }
2960 return 0; 2980 return 0;
2961} 2981}
2962 2982
2963 2983
2964bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode) 2984bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode)
2965{ 2985{
2966 bool syncOK = true; 2986 bool syncOK = true;
2967 int addedAddressee = 0; 2987 int addedAddressee = 0;
2968 int addedAddresseeR = 0; 2988 int addedAddresseeR = 0;
2969 int deletedAddresseeR = 0; 2989 int deletedAddresseeR = 0;
2970 int deletedAddresseeL = 0; 2990 int deletedAddresseeL = 0;
2971 int changedLocal = 0; 2991 int changedLocal = 0;
2972 int changedRemote = 0; 2992 int changedRemote = 0;
2973 int filteredIN = 0; 2993 int filteredIN = 0;
2974 int filteredOUT = 0; 2994 int filteredOUT = 0;
2975 2995
2976 QString mCurrentSyncName = syncManager->getCurrentSyncName(); 2996 QString mCurrentSyncName = syncManager->getCurrentSyncName();
2977 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2997 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2978 2998
2979 //QPtrList<Addressee> el = local->rawAddressees(); 2999 //QPtrList<Addressee> el = local->rawAddressees();
2980 Addressee addresseeR; 3000 Addressee addresseeR;
2981 QString uid; 3001 QString uid;
2982 int take; 3002 int take;
2983 Addressee addresseeL; 3003 Addressee addresseeL;
2984 Addressee addresseeRSync; 3004 Addressee addresseeRSync;
2985 Addressee addresseeLSync; 3005 Addressee addresseeLSync;
2986 // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees(); 3006 // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees();
2987 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); 3007 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees();
2988 bool fullDateRange = false; 3008 bool fullDateRange = false;
2989 local->resetTempSyncStat(); 3009 local->resetTempSyncStat();
2990 mLastAddressbookSync = QDateTime::currentDateTime(); 3010 mLastAddressbookSync = QDateTime::currentDateTime();
2991 if ( syncManager->syncWithDesktop() ) { 3011 if ( syncManager->syncWithDesktop() ) {
2992 // remote->removeSyncInfo( QString());//remove all info 3012 // remote->removeSyncInfo( QString());//remove all info
2993 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 3013 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
2994 mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; 3014 mLastAddressbookSync = KSyncManager::mRequestedSyncEvent;
2995 qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); 3015 qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() );
2996 } else { 3016 } else {
2997 qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime "); 3017 qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime ");
2998 } 3018 }
2999 } 3019 }
3000 QDateTime modifiedCalendar = mLastAddressbookSync; 3020 QDateTime modifiedCalendar = mLastAddressbookSync;
3001 addresseeLSync = getLastSyncAddressee(); 3021 addresseeLSync = getLastSyncAddressee();
3002 qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1()); 3022 qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1());
3003 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); 3023 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName );
3004 if ( !addresseeR.isEmpty() ) { 3024 if ( !addresseeR.isEmpty() ) {
3005 addresseeRSync = addresseeR; 3025 addresseeRSync = addresseeR;
3006 remote->removeAddressee(addresseeR ); 3026 remote->removeAddressee(addresseeR );
3007 3027
3008 } else { 3028 } else {
3009 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3029 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3010 addresseeRSync = addresseeLSync ; 3030 addresseeRSync = addresseeLSync ;
3011 } else { 3031 } else {
3012 //qDebug("FULLDATE 1"); 3032 //qDebug("FULLDATE 1");
3013 fullDateRange = true; 3033 fullDateRange = true;
3014 Addressee newAdd; 3034 Addressee newAdd;
3015 addresseeRSync = newAdd; 3035 addresseeRSync = newAdd;
3016 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); 3036 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee"));
3017 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); 3037 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName );
3018 addresseeRSync.setRevision( mLastAddressbookSync ); 3038 addresseeRSync.setRevision( mLastAddressbookSync );
3019 addresseeRSync.setCategories( i18n("SyncAddressee") ); 3039 addresseeRSync.setCategories( i18n("SyncAddressee") );
3020 } 3040 }
3021 } 3041 }
3022 if ( addresseeLSync.revision() == mLastAddressbookSync ) { 3042 if ( addresseeLSync.revision() == mLastAddressbookSync ) {
3023 // qDebug("FULLDATE 2"); 3043 // qDebug("FULLDATE 2");
3024 fullDateRange = true; 3044 fullDateRange = true;
3025 } 3045 }
3026 if ( ! fullDateRange ) { 3046 if ( ! fullDateRange ) {
3027 if ( addresseeLSync.revision() != addresseeRSync.revision() ) { 3047 if ( addresseeLSync.revision() != addresseeRSync.revision() ) {
3028 3048
3029 // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() ); 3049 // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() );
3030 //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec()); 3050 //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec());
3031 fullDateRange = true; 3051 fullDateRange = true;
3032 //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() ); 3052 //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() );
3033 } 3053 }
3034 } 3054 }
3035 // fullDateRange = true; // debug only! 3055 // fullDateRange = true; // debug only!
3036 if ( fullDateRange ) 3056 if ( fullDateRange )
3037 mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365); 3057 mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365);
3038 else 3058 else
3039 mLastAddressbookSync = addresseeLSync.revision(); 3059 mLastAddressbookSync = addresseeLSync.revision();
3040 // for resyncing if own file has changed 3060 // for resyncing if own file has changed
3041 // PENDING fixme later when implemented 3061 // PENDING fixme later when implemented
3042#if 0 3062#if 0
3043 if ( mCurrentSyncDevice == "deleteaftersync" ) { 3063 if ( mCurrentSyncDevice == "deleteaftersync" ) {
3044 mLastAddressbookSync = loadedFileVersion; 3064 mLastAddressbookSync = loadedFileVersion;
3045 qDebug("setting mLastAddressbookSync "); 3065 qDebug("setting mLastAddressbookSync ");
3046 } 3066 }
3047#endif 3067#endif
3048 3068
3049 3069
3050 // ********** setting filters **************** 3070 // ********** setting filters ****************
3051 Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB ); 3071 Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB );
3052 Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB ); 3072 Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB );
3053 3073
3054 //qDebug("*************************** "); 3074 //qDebug("*************************** ");
3055 // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() ); 3075 // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() );
3056 QStringList er = remote->uidList(); 3076 QStringList er = remote->uidList();
3057 Addressee inR ;//= er.first(); 3077 Addressee inR ;//= er.first();
3058 Addressee inL; 3078 Addressee inL;
3059 3079
3060 syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count()); 3080 syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count());
3061 3081
3062 int modulo = (er.count()/10)+1; 3082 int modulo = (er.count()/10)+1;
3063 int incCounter = 0; 3083 int incCounter = 0;
3064 while ( incCounter < er.count()) { 3084 while ( incCounter < er.count()) {
3065 if (syncManager->isProgressBarCanceled()) 3085 if (syncManager->isProgressBarCanceled())
3066 return false; 3086 return false;
3067 if ( incCounter % modulo == 0 ) 3087 if ( incCounter % modulo == 0 )
3068 syncManager->showProgressBar(incCounter); 3088 syncManager->showProgressBar(incCounter);
3069 3089
3070 uid = er[ incCounter ]; 3090 uid = er[ incCounter ];
3071 bool skipIncidence = false; 3091 bool skipIncidence = false;
3072 if ( uid.left(19) == QString("last-syncAddressee-") ) 3092 if ( uid.left(19) == QString("last-syncAddressee-") )
3073 skipIncidence = true; 3093 skipIncidence = true;
3074 QString idS,OidS; 3094 QString idS,OidS;
3075 qApp->processEvents(); 3095 qApp->processEvents();
3076 if ( !skipIncidence ) { 3096 if ( !skipIncidence ) {
3077 inL = local->findByUid( uid ); 3097 inL = local->findByUid( uid );
3078 inR = remote->findByUid( uid ); 3098 inR = remote->findByUid( uid );
3079 //inL.setResource( 0 ); 3099 //inL.setResource( 0 );
3080 //inR.setResource( 0 ); 3100 //inR.setResource( 0 );
3081 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars 3101 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars
3082 if ( !inL.resource() || inL.resource()->includeInSync() ) { 3102 if ( !inL.resource() || inL.resource()->includeInSync() ) {
3083 if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) { 3103 if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) {
3084 //qDebug("take %d %s ", take, inL.summary().latin1()); 3104 //qDebug("take %d %s ", take, inL.summary().latin1());
3085 if ( take == 3 ) 3105 if ( take == 3 )
3086 return false; 3106 return false;
3087 if ( take == 1 ) {// take local ********************** 3107 if ( take == 1 ) {// take local **********************
3088 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3108 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3089 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3109 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
3090 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3110 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
3091 local->insertAddressee( inL, false ); 3111 local->insertAddressee( inL, false );
3092 idS = inR.externalUID(); 3112 idS = inR.externalUID();
3093 OidS = inR.originalExternalUID(); 3113 OidS = inR.originalExternalUID();
3094 } 3114 }
3095 else 3115 else
3096 idS = inR.IDStr(); 3116 idS = inR.IDStr();
3097 remote->removeAddressee( inR ); 3117 remote->removeAddressee( inR );
3098 inR = inL; 3118 inR = inL;
3099 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 3119 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
3100 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3120 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3101 inR.setOriginalExternalUID( OidS ); 3121 inR.setOriginalExternalUID( OidS );
3102 inR.setExternalUID( idS ); 3122 inR.setExternalUID( idS );
3103 if ( syncManager->syncWithDesktop() ) { 3123 if ( syncManager->syncWithDesktop() ) {
3104 inR.setIDStr("changed" ); 3124 inR.setIDStr("changed" );
3105 } 3125 }
3106 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); 3126 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" );
3107 } else { 3127 } else {
3108 inR.setIDStr( idS ); 3128 inR.setIDStr( idS );
3109 } 3129 }
3110 inR.setResource( 0 ); 3130 inR.setResource( 0 );
3111 remote->insertAddressee( inR , false); 3131 remote->insertAddressee( inR , false);
3112 ++changedRemote; 3132 ++changedRemote;
3113 } else { // take == 2 take remote ********************** 3133 } else { // take == 2 take remote **********************
3114 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3134 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3115 if ( inR.revision().date().year() < 2004 ) 3135 if ( inR.revision().date().year() < 2004 )
3116 inR.setRevision( modifiedCalendar ); 3136 inR.setRevision( modifiedCalendar );
3117 } 3137 }
3118 idS = inL.IDStr(); 3138 idS = inL.IDStr();
3119 local->removeAddressee( inL ); 3139 local->removeAddressee( inL );
3120 inL = inR; 3140 inL = inR;
3121 inL.setIDStr( idS ); 3141 inL.setIDStr( idS );
3122 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3142 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3123 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3143 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
3124 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3144 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
3125 } 3145 }
3126 inL.setResource( 0 ); 3146 inL.setResource( 0 );
3127 local->insertAddressee( inL , false ); 3147 local->insertAddressee( inL , false );
3128 ++changedLocal; 3148 ++changedLocal;
3129 } 3149 }
3130 } 3150 }
3131 } 3151 }
3132 } else { // no conflict ********** add or delete remote 3152 } else { // no conflict ********** add or delete remote
3133 if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) { 3153 if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) {
3134 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3154 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3135 QString des = addresseeLSync.note(); 3155 QString des = addresseeLSync.note();
3136 if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it 3156 if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
3137 inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); 3157 inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE );
3138 remote->insertAddressee( inR, false ); 3158 remote->insertAddressee( inR, false );
3139 ++deletedAddresseeR; 3159 ++deletedAddresseeR;
3140 } else { 3160 } else {
3141 inR.setRevision( modifiedCalendar ); 3161 inR.setRevision( modifiedCalendar );
3142 remote->insertAddressee( inR, false ); 3162 remote->insertAddressee( inR, false );
3143 inL = inR; 3163 inL = inR;
3144 inL.setIDStr( ":" ); 3164 inL.setIDStr( ":" );
3145 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3165 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
3146 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3166 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
3147 inL.setResource( 0 ); 3167 inL.setResource( 0 );
3148 local->insertAddressee( inL , false); 3168 local->insertAddressee( inL , false);
3149 ++addedAddressee; 3169 ++addedAddressee;
3150 } 3170 }
3151 } else { 3171 } else {
3152 if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { 3172 if ( inR.revision() > mLastAddressbookSync || mode == 5 ) {
3153 inR.setRevision( modifiedCalendar ); 3173 inR.setRevision( modifiedCalendar );
3154 remote->insertAddressee( inR, false ); 3174 remote->insertAddressee( inR, false );
3155 inR.setResource( 0 ); 3175 inR.setResource( 0 );
3156 local->insertAddressee( inR, false ); 3176 local->insertAddressee( inR, false );
3157 ++addedAddressee; 3177 ++addedAddressee;
3158 } else { 3178 } else {
3159 // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); 3179 // pending checkExternSyncAddressee(addresseeRSyncSharp, inR);
3160 remote->removeAddressee( inR ); 3180 remote->removeAddressee( inR );
3161 ++deletedAddresseeR; 3181 ++deletedAddresseeR;
3162 } 3182 }
3163 } 3183 }
3164 } else { 3184 } else {
3165 ++filteredIN; 3185 ++filteredIN;
3166 } 3186 }
3167 } 3187 }
3168 } 3188 }
3169 ++incCounter; 3189 ++incCounter;
3170 } 3190 }
3171 er.clear(); 3191 er.clear();
3172 QStringList el = local->uidList(); 3192 QStringList el = local->uidList();
3173 modulo = (el.count()/10)+1; 3193 modulo = (el.count()/10)+1;
3174 3194
3175 syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); 3195 syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count());
3176 incCounter = 0; 3196 incCounter = 0;
3177 while ( incCounter < el.count()) { 3197 while ( incCounter < el.count()) {
3178 qApp->processEvents(); 3198 qApp->processEvents();
3179 if (syncManager->isProgressBarCanceled()) 3199 if (syncManager->isProgressBarCanceled())
3180 return false; 3200 return false;
3181 if ( incCounter % modulo == 0 ) 3201 if ( incCounter % modulo == 0 )
3182 syncManager->showProgressBar(incCounter); 3202 syncManager->showProgressBar(incCounter);
3183 uid = el[ incCounter ]; 3203 uid = el[ incCounter ];
3184 bool skipIncidence = false; 3204 bool skipIncidence = false;
3185 if ( uid.left(19) == QString("last-syncAddressee-") ) 3205 if ( uid.left(19) == QString("last-syncAddressee-") )
3186 skipIncidence = true; 3206 skipIncidence = true;
3187 if ( !skipIncidence ) { 3207 if ( !skipIncidence ) {
3188 inL = local->findByUid( uid ); 3208 inL = local->findByUid( uid );
3189 if ( !inL.resource() || inL.resource()->includeInSync() ) { 3209 if ( !inL.resource() || inL.resource()->includeInSync() ) {
3190 inR = remote->findByUid( uid ); 3210 inR = remote->findByUid( uid );
3191 if ( inR.isEmpty() ){ 3211 if ( inR.isEmpty() ){
3192 if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) { 3212 if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) {
3193 // no conflict ********** add or delete local 3213 // no conflict ********** add or delete local
3194 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3214 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3195 if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { 3215 if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) {
3196 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); 3216 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
3197 local->removeAddressee( inL ); 3217 local->removeAddressee( inL );
3198 ++deletedAddresseeL; 3218 ++deletedAddresseeL;
3199 } else { 3219 } else {
3200 if ( ! syncManager->mWriteBackExistingOnly ) { 3220 if ( ! syncManager->mWriteBackExistingOnly ) {
3201 inL.removeID(mCurrentSyncDevice ); 3221 inL.removeID(mCurrentSyncDevice );
3202 ++addedAddresseeR; 3222 ++addedAddresseeR;
3203 inL.setRevision( modifiedCalendar ); 3223 inL.setRevision( modifiedCalendar );
3204 local->insertAddressee( inL, false ); 3224 local->insertAddressee( inL, false );
3205 inR = inL; 3225 inR = inL;
3206 inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); 3226 inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL );
3207 inR.setResource( 0 ); 3227 inR.setResource( 0 );
3208 remote->insertAddressee( inR, false ); 3228 remote->insertAddressee( inR, false );
3209 } 3229 }
3210 } 3230 }
3211 } else { 3231 } else {
3212 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { 3232 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) {
3213 //qDebug("data %s ", inL.revision().toString().latin1()); 3233 //qDebug("data %s ", inL.revision().toString().latin1());
3214 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); 3234 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
3215 local->removeAddressee( inL ); 3235 local->removeAddressee( inL );
3216 ++deletedAddresseeL; 3236 ++deletedAddresseeL;
3217 } else { 3237 } else {
3218 if ( ! syncManager->mWriteBackExistingOnly ) { 3238 if ( ! syncManager->mWriteBackExistingOnly ) {
3219 ++addedAddresseeR; 3239 ++addedAddresseeR;
3220 inL.setRevision( modifiedCalendar ); 3240 inL.setRevision( modifiedCalendar );
3221 local->insertAddressee( inL, false ); 3241 local->insertAddressee( inL, false );
3222 inR = inL; 3242 inR = inL;
3223 inR.setIDStr( ":" ); 3243 inR.setIDStr( ":" );
3224 inR.setResource( 0 ); 3244 inR.setResource( 0 );
3225 remote->insertAddressee( inR, false ); 3245 remote->insertAddressee( inR, false );
3226 } 3246 }
3227 } 3247 }
3228 } 3248 }
3229 } else { 3249 } else {
3230 ++filteredOUT; 3250 ++filteredOUT;
3231 } 3251 }
3232 } 3252 }
3233 } 3253 }
3234 } 3254 }
3235 ++incCounter; 3255 ++incCounter;
3236 } 3256 }
3237 el.clear(); 3257 el.clear();
3238 syncManager->hideProgressBar(); 3258 syncManager->hideProgressBar();
3239 mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); 3259 mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 );
3240 // get rid of micro seconds 3260 // get rid of micro seconds
3241 QTime t = mLastAddressbookSync.time(); 3261 QTime t = mLastAddressbookSync.time();
3242 mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); 3262 mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) );
3243 addresseeLSync.setRevision( mLastAddressbookSync ); 3263 addresseeLSync.setRevision( mLastAddressbookSync );
3244 addresseeRSync.setRevision( mLastAddressbookSync ); 3264 addresseeRSync.setRevision( mLastAddressbookSync );
3245 addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; 3265 addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ;
3246 addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); 3266 addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName );
3247 addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; 3267 addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ;
3248 addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); 3268 addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") );
3249 addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; 3269 addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ;
3250 addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); 3270 addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() );
3251 addresseeRSync.setNote( "" ) ; 3271 addresseeRSync.setNote( "" ) ;
3252 addresseeLSync.setNote( "" ); 3272 addresseeLSync.setNote( "" );
3253 3273
3254 if ( mGlobalSyncMode == SYNC_MODE_NORMAL) 3274 if ( mGlobalSyncMode == SYNC_MODE_NORMAL)
3255 remote->insertAddressee( addresseeRSync, false ); 3275 remote->insertAddressee( addresseeRSync, false );
3256 local->insertAddressee( addresseeLSync, false ); 3276 local->insertAddressee( addresseeLSync, false );
3257 QString mes; 3277 QString mes;
3258 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 ); 3278 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 );
3259 qDebug( mes ); 3279 qDebug( mes );
3260 mes = i18n("Local addressbook changed!\n") +mes; 3280 mes = i18n("Local addressbook changed!\n") +mes;
3261 if ( syncManager->mShowSyncSummary ) { 3281 if ( syncManager->mShowSyncSummary ) {
3262 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, 3282 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
3263 i18n("KA/Pi Synchronization"),i18n("Write back"))) { 3283 i18n("KA/Pi Synchronization"),i18n("Write back"))) {
3264 qDebug("KA: WB cancelled "); 3284 qDebug("KA: WB cancelled ");
3265 syncManager->mWriteBackFile = false; 3285 syncManager->mWriteBackFile = false;
3266 return syncOK; 3286 return syncOK;
3267 } 3287 }
3268 } 3288 }
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index ceeeda7..42b7709 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -1,531 +1,535 @@
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
41namespace KABC { 41namespace KABC {
42class AddressBook; 42class AddressBook;
43} 43}
44 44
45#ifndef KAB_EMBEDDED 45#ifndef KAB_EMBEDDED
46class KAboutData; 46class KAboutData;
47class KConfig; 47class KConfig;
48 48
49class KAddressBookService; 49class KAddressBookService;
50class LDAPSearchDialog; 50class LDAPSearchDialog;
51#else //KAB_EMBEDDED 51#else //KAB_EMBEDDED
52class KAddressBookMain; 52class KAddressBookMain;
53//US class QAction; 53//US class QAction;
54#endif //KAB_EMBEDDED 54#endif //KAB_EMBEDDED
55class KCMultiDialog; 55class KCMultiDialog;
56class KXMLGUIClient; 56class KXMLGUIClient;
57class ExtensionManager; 57class ExtensionManager;
58class XXPortManager; 58class XXPortManager;
59class JumpButtonBar; 59class JumpButtonBar;
60class IncSearchWidget; 60class IncSearchWidget;
61class KDGanttMinimizeSplitter; 61class KDGanttMinimizeSplitter;
62class KAction; 62class KAction;
63class KActionCollection; 63class KActionCollection;
64class KToggleAction; 64class KToggleAction;
65class KSyncProfile; 65class KSyncProfile;
66 66
67class QAction; 67class QAction;
68class QMenuBar; 68class QMenuBar;
69class QSplitter; 69class QSplitter;
70class ViewContainer; 70class ViewContainer;
71class ViewManager; 71class ViewManager;
72class AddresseeEditorDialog; 72class AddresseeEditorDialog;
73class Ir; 73class Ir;
74 74
75class KABCore : public QWidget, public KSyncInterface 75class 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 storagehowto() ; 152 void storagehowto() ;
153 void multisynchowto() ; 153 void multisynchowto() ;
154 void kdesynchowto() ; 154 void kdesynchowto() ;
155 void writeToPhone(); 155 void writeToPhone();
156 156
157 /** 157 /**
158 Is called whenever a contact is selected in the view. 158 Is called whenever a contact is selected in the view.
159 */ 159 */
160 void setContactSelected( const QString &uid ); 160 void setContactSelected( const QString &uid );
161 161
162 /** 162 /**
163 Opens the preferred mail composer with all selected contacts as 163 Opens the preferred mail composer with all selected contacts as
164 arguments. 164 arguments.
165 */ 165 */
166 void sendMail(); 166 void sendMail();
167 167
168 /** 168 /**
169 Opens the preferred mail composer with the given contacts as 169 Opens the preferred mail composer with the given contacts as
170 arguments. 170 arguments.
171 */ 171 */
172 void sendMail( const QString& email ); 172 void sendMail( const QString& email );
173 173
174 174
175 void mailVCard(); 175 void mailVCard();
176 void mailVCard(const QStringList& uids); 176 void mailVCard(const QStringList& uids);
177 177
178 /** 178 /**
179 Beams the "WhoAmI contact. 179 Beams the "WhoAmI contact.
180 */ 180 */
181 void beamMySelf(); 181 void beamMySelf();
182 182
183 void beamVCard(); 183 void beamVCard();
184 void export2phone(); 184 void export2phone();
185 void beamVCard(const QStringList& uids); 185 void beamVCard(const QStringList& uids);
186 void beamDone( Ir *ir ); 186 void beamDone( Ir *ir );
187 187
188 188
189 /** 189 /**
190 Starts the preferred web browser with the given URL as argument. 190 Starts the preferred web browser with the given URL as argument.
191 */ 191 */
192 void browse( const QString& url ); 192 void browse( const QString& url );
193 193
194 /** 194 /**
195 Select all contacts in the view. 195 Select all contacts in the view.
196 */ 196 */
197 void selectAllContacts(); 197 void selectAllContacts();
198 198
199 /** 199 /**
200 Deletes all selected contacts from the address book. 200 Deletes all selected contacts from the address book.
201 */ 201 */
202 void deleteContacts(); 202 void deleteContacts();
203 203
204 /** 204 /**
205 Deletes given contacts from the address book. 205 Deletes given contacts from the address book.
206 206
207 @param uids The uids of the contacts, which shall be deleted. 207 @param uids The uids of the contacts, which shall be deleted.
208 */ 208 */
209 void deleteContacts( const QStringList &uids ); 209 void deleteContacts( const QStringList &uids );
210 210
211 /** 211 /**
212 Copys the selected contacts into clipboard for later pasting. 212 Copys the selected contacts into clipboard for later pasting.
213 */ 213 */
214 void copyContacts(); 214 void copyContacts();
215 215
216 /** 216 /**
217 Cuts the selected contacts and stores them for later pasting. 217 Cuts the selected contacts and stores them for later pasting.
218 */ 218 */
219 void cutContacts(); 219 void cutContacts();
220 220
221 /** 221 /**
222 Paste contacts from clipboard into the address book. 222 Paste contacts from clipboard into the address book.
223 */ 223 */
224 void pasteContacts(); 224 void pasteContacts();
225 225
226 /** 226 /**
227 Paste given contacts into the address book. 227 Paste given contacts into the address book.
228 228
229 @param list The list of addressee, which shall be pasted. 229 @param list The list of addressee, which shall be pasted.
230 */ 230 */
231 void pasteContacts( KABC::Addressee::List &list ); 231 void pasteContacts( KABC::Addressee::List &list );
232 232
233 /** 233 /**
234 Sets the whoAmI contact, that is used by many other programs to 234 Sets the whoAmI contact, that is used by many other programs to
235 get personal information about the current user. 235 get personal information about the current user.
236 */ 236 */
237 void setWhoAmI(); 237 void setWhoAmI();
238 238
239 /** 239 /**
240 Displays the category dialog and applies the result to all 240 Displays the category dialog and applies the result to all
241 selected contacts. 241 selected contacts.
242 */ 242 */
243 void setCategories(); 243 void setCategories();
244 void manageCategories(); 244 void manageCategories();
245 void editCategories(); 245 void editCategories();
246 246
247 /** 247 /**
248 Sets the field list of the Incremental Search Widget. 248 Sets the field list of the Incremental Search Widget.
249 */ 249 */
250 void setSearchFields( const KABC::Field::List &fields ); 250 void setSearchFields( const KABC::Field::List &fields );
251 251
252 /** 252 /**
253 Search with the current search field for a contact, that matches 253 Search with the current search field for a contact, that matches
254 the given text, and selects it in the view. 254 the given text, and selects it in the view.
255 */ 255 */
256 void incrementalSearch( const QString& text ); 256 void incrementalSearch( const QString& text );
257 void incrementalSearchJump( const QString& text ); 257 void incrementalSearchJump( const QString& text );
258 258
259 /** 259 /**
260 Marks the address book as modified. 260 Marks the address book as modified.
261 */ 261 */
262 void setModified(); 262 void setModified();
263 /** 263 /**
264 Marks the address book as modified without refreshing the view. 264 Marks the address book as modified without refreshing the view.
265 */ 265 */
266 void setModifiedWOrefresh(); 266 void setModifiedWOrefresh();
267 267
268 /** 268 /**
269 Marks the address book as modified concerning the argument. 269 Marks the address book as modified concerning the argument.
270 */ 270 */
271 void setModified( bool modified ); 271 void setModified( bool modified );
272 272
273 /** 273 /**
274 Returns whether the address book is modified. 274 Returns whether the address book is modified.
275 */ 275 */
276 bool modified() const; 276 bool modified() const;
277 277
278 /** 278 /**
279 Called whenever an contact is modified in the contact editor 279 Called whenever an contact is modified in the contact editor
280 dialog or the quick edit. 280 dialog or the quick edit.
281 */ 281 */
282 void contactModified( const KABC::Addressee &addr ); 282 void contactModified( const KABC::Addressee &addr );
283 void addrModified( const KABC::Addressee &addr, bool updateDetails = true ); 283 void addrModified( const KABC::Addressee &addr, bool updateDetails = true );
284 284
285 /** 285 /**
286 DCOP METHODS. 286 DCOP METHODS.
287 */ 287 */
288 void addEmail( QString addr ); 288 void addEmail( QString addr );
289 void importVCard( const KURL& url, bool showPreview ); 289 void importVCard( const KURL& url, bool showPreview );
290 void importVCard( const QString& vCard, bool showPreview ); 290 void importVCard( const QString& vCard, bool showPreview );
291 void newContact(); 291 void newContact();
292 QString getNameByPhone( const QString& phone ); 292 QString getNameByPhone( const QString& phone );
293 /** 293 /**
294 END DCOP METHODS 294 END DCOP METHODS
295 */ 295 */
296 296
297 /** 297 /**
298 Saves the contents of the AddressBook back to disk. 298 Saves the contents of the AddressBook back to disk.
299 */ 299 */
300 void save(); 300 void save();
301 301
302 /** 302 /**
303 Undos the last command using the undo stack. 303 Undos the last command using the undo stack.
304 */ 304 */
305 void undo(); 305 void undo();
306 306
307 /** 307 /**
308 Redos the last command that was undone, using the redo stack. 308 Redos the last command that was undone, using the redo stack.
309 */ 309 */
310 void redo(); 310 void redo();
311 311
312 /** 312 /**
313 Shows the edit dialog for the given uid. If the uid is QString::null, 313 Shows the edit dialog for the given uid. If the uid is QString::null,
314 the method will try to find a selected addressee in the view. 314 the method will try to find a selected addressee in the view.
315 */ 315 */
316 void editContact( const QString &uid /*US = QString::null*/ ); 316 void editContact( const QString &uid /*US = QString::null*/ );
317//US added a second method without defaultparameter 317//US added a second method without defaultparameter
318 void editContact2(); 318 void editContact2();
319 319
320 /** 320 /**
321 Shows or edits the detail view for the given uid. If the uid is QString::null, 321 Shows or edits the detail view for the given uid. If the uid is QString::null,
322 the method will try to find a selected addressee in the view. 322 the method will try to find a selected addressee in the view.
323 */ 323 */
324 void executeContact( const QString &uid /*US = QString::null*/ ); 324 void executeContact( const QString &uid /*US = QString::null*/ );
325 325
326 /** 326 /**
327 Launches the configuration dialog. 327 Launches the configuration dialog.
328 */ 328 */
329 void openConfigDialog(); 329 void openConfigDialog();
330 void openConfigGlobalDialog(); 330 void openConfigGlobalDialog();
331 331
332 /** 332 /**
333 Launches the ldap search dialog. 333 Launches the ldap search dialog.
334 */ 334 */
335 void openLDAPDialog(); 335 void openLDAPDialog();
336 336
337 /** 337 /**
338 Creates a KAddressBookPrinter, which will display the print 338 Creates a KAddressBookPrinter, which will display the print
339 dialog and do the printing. 339 dialog and do the printing.
340 */ 340 */
341 void print(); 341 void print();
342 342
343 /** 343 /**
344 Registers a new GUI client, so plugins can register its actions. 344 Registers a new GUI client, so plugins can register its actions.
345 */ 345 */
346 void addGUIClient( KXMLGUIClient *client ); 346 void addGUIClient( KXMLGUIClient *client );
347 347
348 void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); 348 void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid);
349 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); 349 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid);
350 void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); 350 void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid);
351 351
352 352
353 signals: 353 signals:
354 void contactSelected( const QString &name ); 354 void contactSelected( const QString &name );
355 void contactSelected( const QPixmap &pixmap ); 355 void contactSelected( const QPixmap &pixmap );
356 public slots: 356 public slots:
357 void loadDataAfterStart();
357 void recieve(QString cmsg ); 358 void recieve(QString cmsg );
358 void getFile( bool success ); 359 void getFile( bool success );
359 void syncFileRequest(); 360 void syncFileRequest();
360 void setDetailsVisible( bool visible ); 361 void setDetailsVisible( bool visible );
361 void setDetailsToState(); 362 void setDetailsToState();
362 363
363 void saveSettings(); 364 void saveSettings();
364 365
365 private slots: 366 private slots:
366 void updateToolBar(); 367 void updateToolBar();
367 void updateMainWindow(); 368 void updateMainWindow();
368 void receive( const QCString& cmsg, const QByteArray& data ); 369 void receive( const QCString& cmsg, const QByteArray& data );
370 void receiveStart( const QCString& cmsg, const QByteArray& data );
369 void toggleBeamReceive( ); 371 void toggleBeamReceive( );
370 void disableBR(bool); 372 void disableBR(bool);
371 void setJumpButtonBarVisible( bool visible ); 373 void setJumpButtonBarVisible( bool visible );
372 void setJumpButtonBar( bool visible ); 374 void setJumpButtonBar( bool visible );
373 void setCaptionBack(); 375 void setCaptionBack();
374 void resizeAndCallContactdialog(); 376 void resizeAndCallContactdialog();
375 void callContactdialog(); 377 void callContactdialog();
376 void doRingSync(); 378 void doRingSync();
377 379
378 void importFromOL(); 380 void importFromOL();
379 void extensionModified( const KABC::Addressee::List &list ); 381 void extensionModified( const KABC::Addressee::List &list );
380 void extensionChanged( int id ); 382 void extensionChanged( int id );
381 void clipboardDataChanged(); 383 void clipboardDataChanged();
382 void updateActionMenu(); 384 void updateActionMenu();
383 void configureKeyBindings(); 385 void configureKeyBindings();
384 void removeVoice(); 386 void removeVoice();
385 void setFormattedName(); 387 void setFormattedName();
386#ifdef KAB_EMBEDDED 388#ifdef KAB_EMBEDDED
387 void configureResources(); 389 void configureResources();
388#endif //KAB_EMBEDDED 390#endif //KAB_EMBEDDED
389 391
390 void slotEditorDestroyed( const QString &uid ); 392 void slotEditorDestroyed( const QString &uid );
391 void configurationChanged(); 393 void configurationChanged();
392 void addressBookChanged(); 394 void addressBookChanged();
393 395
394 private: 396 private:
397 QCString mCStringMess;
398 QByteArray mByteData;
395 QString mEmailSourceChannel; 399 QString mEmailSourceChannel;
396 QString mEmailSourceUID; 400 QString mEmailSourceUID;
397 void resizeEvent(QResizeEvent* e ); 401 void resizeEvent(QResizeEvent* e );
398 bool mBRdisabled; 402 bool mBRdisabled;
399#ifndef DESKTOP_VERSION 403#ifndef DESKTOP_VERSION
400 QCopChannel* infrared; 404 QCopChannel* infrared;
401#endif 405#endif
402 QTimer *mMessageTimer; 406 QTimer *mMessageTimer;
403 void initGUI(); 407 void initGUI();
404 void initActions(); 408 void initActions();
405 QString getPhoneFile(); 409 QString getPhoneFile();
406 410
407 AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, 411 AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent,
408 const char *name = 0 ); 412 const char *name = 0 );
409 413
410 KXMLGUIClient *mGUIClient; 414 KXMLGUIClient *mGUIClient;
411 415
412 KABC::AddressBook *mAddressBook; 416 KABC::AddressBook *mAddressBook;
413 417
414 ViewManager *mViewManager; 418 ViewManager *mViewManager;
415 // QSplitter *mDetailsSplitter; 419 // QSplitter *mDetailsSplitter;
416 KDGanttMinimizeSplitter *mExtensionBarSplitter; 420 KDGanttMinimizeSplitter *mExtensionBarSplitter;
417 ViewContainer *mDetails; 421 ViewContainer *mDetails;
418 KDGanttMinimizeSplitter* mMiniSplitter; 422 KDGanttMinimizeSplitter* mMiniSplitter;
419 XXPortManager *mXXPortManager; 423 XXPortManager *mXXPortManager;
420 JumpButtonBar *mJumpButtonBar; 424 JumpButtonBar *mJumpButtonBar;
421 IncSearchWidget *mIncSearchWidget; 425 IncSearchWidget *mIncSearchWidget;
422 ExtensionManager *mExtensionManager; 426 ExtensionManager *mExtensionManager;
423 427
424 KCMultiDialog *mConfigureDialog; 428 KCMultiDialog *mConfigureDialog;
425 429
426#ifndef KAB_EMBEDDED 430#ifndef KAB_EMBEDDED
427 LDAPSearchDialog *mLdapSearchDialog; 431 LDAPSearchDialog *mLdapSearchDialog;
428#endif //KAB_EMBEDDED 432#endif //KAB_EMBEDDED
429 // QDict<AddresseeEditorDialog> mEditorDict; 433 // QDict<AddresseeEditorDialog> mEditorDict;
430 AddresseeEditorDialog *mEditorDialog; 434 AddresseeEditorDialog *mEditorDialog;
431 bool mReadWrite; 435 bool mReadWrite;
432 bool mModified; 436 bool mModified;
433 bool mIsPart; 437 bool mIsPart;
434 bool mMultipleViewsAtOnce; 438 bool mMultipleViewsAtOnce;
435 439
436 440
437 //US file menu 441 //US file menu
438 KAction *mActionMail; 442 KAction *mActionMail;
439 KAction *mActionBeam; 443 KAction *mActionBeam;
440 KToggleAction *mActionBR; 444 KToggleAction *mActionBR;
441 KAction *mActionExport2phone; 445 KAction *mActionExport2phone;
442 KAction* mActionPrint; 446 KAction* mActionPrint;
443 KAction* mActionPrintDetails; 447 KAction* mActionPrintDetails;
444 KAction* mActionNewContact; 448 KAction* mActionNewContact;
445 KAction *mActionSave; 449 KAction *mActionSave;
446 KAction *mActionEditAddressee; 450 KAction *mActionEditAddressee;
447 KAction *mActionMailVCard; 451 KAction *mActionMailVCard;
448 KAction *mActionBeamVCard; 452 KAction *mActionBeamVCard;
449 453
450 KAction *mActionQuit; 454 KAction *mActionQuit;
451 455
452 //US edit menu 456 //US edit menu
453 KAction *mActionCopy; 457 KAction *mActionCopy;
454 KAction *mActionCut; 458 KAction *mActionCut;
455 KAction *mActionPaste; 459 KAction *mActionPaste;
456 KAction *mActionSelectAll; 460 KAction *mActionSelectAll;
457 KAction *mActionUndo; 461 KAction *mActionUndo;
458 KAction *mActionRedo; 462 KAction *mActionRedo;
459 KAction *mActionDelete; 463 KAction *mActionDelete;
460 464
461 //US settings menu 465 //US settings menu
462 KAction *mActionConfigResources; 466 KAction *mActionConfigResources;
463 KAction *mActionConfigGlobal; 467 KAction *mActionConfigGlobal;
464 KAction *mActionConfigKAddressbook; 468 KAction *mActionConfigKAddressbook;
465 KAction *mActionConfigShortcuts; 469 KAction *mActionConfigShortcuts;
466 KAction *mActionConfigureToolbars; 470 KAction *mActionConfigureToolbars;
467 KAction *mActionKeyBindings; 471 KAction *mActionKeyBindings;
468 KToggleAction *mActionJumpBar; 472 KToggleAction *mActionJumpBar;
469 KToggleAction *mActionDetails; 473 KToggleAction *mActionDetails;
470 KAction *mActionWhoAmI; 474 KAction *mActionWhoAmI;
471 KAction *mActionCategories; 475 KAction *mActionCategories;
472 KAction *mActionEditCategories; 476 KAction *mActionEditCategories;
473 KAction *mActionManageCategories; 477 KAction *mActionManageCategories;
474 KAction *mActionAboutKAddressbook; 478 KAction *mActionAboutKAddressbook;
475 KAction *mActionLicence; 479 KAction *mActionLicence;
476 KAction *mActionFaq; 480 KAction *mActionFaq;
477 KAction *mActionWN; 481 KAction *mActionWN;
478 KAction *mActionSyncHowto; 482 KAction *mActionSyncHowto;
479 KAction *mActionStorageHowto; 483 KAction *mActionStorageHowto;
480 KAction *mActionKdeSyncHowto; 484 KAction *mActionKdeSyncHowto;
481 KAction *mActionMultiSyncHowto; 485 KAction *mActionMultiSyncHowto;
482 486
483 KAction *mActionDeleteView; 487 KAction *mActionDeleteView;
484 488
485 QPopupMenu *viewMenu; 489 QPopupMenu *viewMenu;
486 QPopupMenu *filterMenu; 490 QPopupMenu *filterMenu;
487 QPopupMenu *settingsMenu; 491 QPopupMenu *settingsMenu;
488 QPopupMenu *changeMenu; 492 QPopupMenu *changeMenu;
489 QPopupMenu *beamMenu; 493 QPopupMenu *beamMenu;
490//US QAction *mActionSave; 494//US QAction *mActionSave;
491 QPopupMenu *ImportMenu; 495 QPopupMenu *ImportMenu;
492 QPopupMenu *ExportMenu; 496 QPopupMenu *ExportMenu;
493 //LR additional methods 497 //LR additional methods
494 KAction *mActionRemoveVoice; 498 KAction *mActionRemoveVoice;
495 KAction *mActionSetFormattedName; 499 KAction *mActionSetFormattedName;
496 KAction * mActionImportOL; 500 KAction * mActionImportOL;
497 501
498#ifndef KAB_EMBEDDED 502#ifndef KAB_EMBEDDED
499 KAddressBookService *mAddressBookService; 503 KAddressBookService *mAddressBookService;
500#endif //KAB_EMBEDDED 504#endif //KAB_EMBEDDED
501 505
502 class KABCorePrivate; 506 class KABCorePrivate;
503 KABCorePrivate *d; 507 KABCorePrivate *d;
504 //US bool mBlockSaveFlag; 508 //US bool mBlockSaveFlag;
505 509
506#ifdef KAB_EMBEDDED 510#ifdef KAB_EMBEDDED
507 KAddressBookMain *mMainWindow; // should be the same like mGUIClient 511 KAddressBookMain *mMainWindow; // should be the same like mGUIClient
508#endif //KAB_EMBEDDED 512#endif //KAB_EMBEDDED
509 513
510 //this are the overwritten callbackmethods from the syncinterface 514 //this are the overwritten callbackmethods from the syncinterface
511 virtual bool sync(KSyncManager* manager, QString filename, int mode); 515 virtual bool sync(KSyncManager* manager, QString filename, int mode);
512 virtual bool syncExternal(KSyncManager* manager, QString resource); 516 virtual bool syncExternal(KSyncManager* manager, QString resource);
513 virtual void removeSyncInfo( QString syncProfile); 517 virtual void removeSyncInfo( QString syncProfile);
514 bool syncPhone(); 518 bool syncPhone();
515 void message( QString m , bool startTimer = true); 519 void message( QString m , bool startTimer = true);
516 520
517 // LR ******************************* 521 // LR *******************************
518 // sync stuff! 522 // sync stuff!
519 QString sentSyncFile(); 523 QString sentSyncFile();
520 QPopupMenu *syncMenu; 524 QPopupMenu *syncMenu;
521 KSyncManager* syncManager; 525 KSyncManager* syncManager;
522 int mGlobalSyncMode; 526 int mGlobalSyncMode;
523 bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); 527 bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode);
524 KABC::Addressee getLastSyncAddressee(); 528 KABC::Addressee getLastSyncAddressee();
525 QDateTime mLastAddressbookSync; 529 QDateTime mLastAddressbookSync;
526 int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); 530 int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full );
527 // ********************* 531 // *********************
528 532
529}; 533};
530 534
531#endif 535#endif
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index 519dc92..8fe3ee0 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -1,239 +1,241 @@
1/* 1/*
2 This file is part of KAddressbook. 2 This file is part of KAddressbook.
3 Copyright (c) 1999 Don Sanders <dsanders@kde.org> 3 Copyright (c) 1999 Don Sanders <dsanders@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#ifdef KAB_EMBEDDED 24#ifdef KAB_EMBEDDED
25#include "kabprefs.h" 25#include "kabprefs.h"
26#include <kglobal.h> 26#include <kglobal.h>
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qtoolbar.h> 28#include <qtoolbar.h>
29#include <qapplication.h> 29#include <qapplication.h>
30#else //KAB_EMBEDDED 30#else //KAB_EMBEDDED
31#include <kedittoolbar.h> 31#include <kedittoolbar.h>
32#include <kkeydialog.h> 32#include <kkeydialog.h>
33#include <kmessagebox.h> 33#include <kmessagebox.h>
34#include <kstatusbar.h> 34#include <kstatusbar.h>
35#endif //KAB_EMBEDDED 35#endif //KAB_EMBEDDED
36#include <klocale.h> 36#include <klocale.h>
37 37
38#include "kabcore.h" 38#include "kabcore.h"
39#include "kaddressbookmain.h" 39#include "kaddressbookmain.h"
40#include "kactioncollection.h" 40#include "kactioncollection.h"
41 41
42#ifdef KAB_EMBEDDED 42#ifdef KAB_EMBEDDED
43KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "adrressbook" ) 43KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "adrressbook" )
44#else //KAB_EMBEDDED 44#else //KAB_EMBEDDED
45//MOC_SKIP_BEGIN 45//MOC_SKIP_BEGIN
46KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 ) 46KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 )
47//MOC_SKIP_END 47//MOC_SKIP_END
48#endif //KAB_EMBEDDED 48#endif //KAB_EMBEDDED
49{ 49{
50 setIcon(SmallIcon( "ka24" ) ); 50 setIcon(SmallIcon( "ka24" ) );
51#if 0 51#if 0
52 //US for embedded systems, create the toolbar before we initiate KABCore. 52 //US for embedded systems, create the toolbar before we initiate KABCore.
53 // KABCore will fill the toolbar with menues and icons 53 // KABCore will fill the toolbar with menues and icons
54 QMainWindow::ToolBarDock tbd; 54 QMainWindow::ToolBarDock tbd;
55 tbd = Top; 55 tbd = Top;
56 iconToolBar = new QToolBar( this ); 56 iconToolBar = new QToolBar( this );
57 addToolBar (iconToolBar , tbd ); 57 addToolBar (iconToolBar , tbd );
58 iconToolBar->setHorizontalStretchable(true); 58 iconToolBar->setHorizontalStretchable(true);
59//US iconToolBar->setWidth(300); 59//US iconToolBar->setWidth(300);
60#endif // 0 60#endif // 0
61 61
62 mCore = new KABCore( this, true, this ); 62 mCore = new KABCore( this, true, this );
63 63
64#ifdef KAB_EMBEDDED 64#ifdef KAB_EMBEDDED
65 setCaption( i18n( "KAddressbook/Pi" ) ); 65 setCaption( i18n( "KAddressbook/Pi" ) );
66#else //KAB_EMBEDDED 66#else //KAB_EMBEDDED
67 setCaption( i18n( "Address Book Browser" ) ); 67 setCaption( i18n( "Address Book Browser" ) );
68#endif //KAB_EMBEDDED 68#endif //KAB_EMBEDDED
69 69
70 //mCore->restoreSettings(); 70 //mCore->restoreSettings();
71 71
72 initActions(); 72 initActions();
73 73
74 setCentralWidget( mCore ); 74 setCentralWidget( mCore );
75 75
76//US statusBar()->show(); 76//US statusBar()->show();
77 77
78#ifndef KAB_EMBEDDED 78#ifndef KAB_EMBEDDED
79 setStandardToolBarMenuEnabled(true); 79 setStandardToolBarMenuEnabled(true);
80 80
81 createGUI( "kaddressbookui.rc", false ); 81 createGUI( "kaddressbookui.rc", false );
82 82
83 83
84#endif //KAB_EMBEDDED 84#endif //KAB_EMBEDDED
85 setAutoSaveSettings(); 85 setAutoSaveSettings();
86 qApp->processEvents();
87 mCore->restoreSettings(); 86 mCore->restoreSettings();
87#ifndef DESKTOP_VERSION
88 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), mCore, SLOT (receiveStart ( const QCString &, const QByteArray & )));
89#endif
88} 90}
89 91
90KAddressBookMain::~KAddressBookMain() 92KAddressBookMain::~KAddressBookMain()
91{ 93{
92 // mCore->saveSettings(); 94 // mCore->saveSettings();
93} 95}
94 96
95void KAddressBookMain::showMinimized () 97void KAddressBookMain::showMinimized ()
96{ 98{
97 QWidget::showMinimized () ; 99 QWidget::showMinimized () ;
98} 100}
99void KAddressBookMain::addEmail( QString addr ) 101void KAddressBookMain::addEmail( QString addr )
100{ 102{
101 mCore->addEmail( addr ); 103 mCore->addEmail( addr );
102} 104}
103 105
104#ifndef KAB_EMBEDDED 106#ifndef KAB_EMBEDDED
105ASYNC KAddressBookMain::showContactEditor( QString uid ) 107ASYNC KAddressBookMain::showContactEditor( QString uid )
106{ 108{
107 mCore->editContact( uid ); 109 mCore->editContact( uid );
108} 110}
109#endif //KAB_EMBEDDED 111#endif //KAB_EMBEDDED
110void KAddressBookMain::newContact() 112void KAddressBookMain::newContact()
111{ 113{
112 mCore->newContact(); 114 mCore->newContact();
113} 115}
114 116
115QString KAddressBookMain::getNameByPhone( QString phone ) 117QString KAddressBookMain::getNameByPhone( QString phone )
116{ 118{
117 return mCore->getNameByPhone( phone ); 119 return mCore->getNameByPhone( phone );
118} 120}
119 121
120void KAddressBookMain::save() 122void KAddressBookMain::save()
121{ 123{
122 mCore->save(); 124 mCore->save();
123} 125}
124 126
125void KAddressBookMain::exit() 127void KAddressBookMain::exit()
126{ 128{
127 close( ); 129 close( );
128} 130}
129 131
130void KAddressBookMain::saveProperties( KConfig* ) 132void KAddressBookMain::saveProperties( KConfig* )
131{ 133{
132} 134}
133 135
134void KAddressBookMain::readProperties( KConfig* ) 136void KAddressBookMain::readProperties( KConfig* )
135{ 137{
136} 138}
137 139
138void KAddressBookMain::initActions() 140void KAddressBookMain::initActions()
139{ 141{
140#ifndef KAB_EMBEDDED 142#ifndef KAB_EMBEDDED
141 KStdAction::quit( this, SLOT( close() ), actionCollection() ); 143 KStdAction::quit( this, SLOT( close() ), actionCollection() );
142 KStdAction::configureToolbars( this, SLOT( configureToolbars() ), actionCollection() ); 144 KStdAction::configureToolbars( this, SLOT( configureToolbars() ), actionCollection() );
143#else //KAB_EMBEDDED 145#else //KAB_EMBEDDED
144 //US: transfered the setup of the actions into KABCore 146 //US: transfered the setup of the actions into KABCore
145#endif //KAB_EMBEDDED 147#endif //KAB_EMBEDDED
146 148
147 149
148} 150}
149 151
150//US new method to setup menues and toolbars on embedded systems 152//US new method to setup menues and toolbars on embedded systems
151#ifdef KAB_EMBEDDED 153#ifdef KAB_EMBEDDED
152/* 154/*
153QToolBar * KAddressBookMain::getIconToolBar() 155QToolBar * KAddressBookMain::getIconToolBar()
154{ 156{
155 return iconToolBar; 157 return iconToolBar;
156} 158}
157*/ 159*/
158 160
159void KAddressBookMain::createGUI() 161void KAddressBookMain::createGUI()
160{ 162{
161 163
162 164
163 165
164} 166}
165#endif //KAB_EMBEDDED 167#endif //KAB_EMBEDDED
166 168
167void KAddressBookMain::configureToolbars() 169void KAddressBookMain::configureToolbars()
168{ 170{
169#ifndef KAB_EMBEDDED 171#ifndef KAB_EMBEDDED
170 saveMainWindowSettings( KGlobal::config(), "MainWindow" ); 172 saveMainWindowSettings( KGlobal::config(), "MainWindow" );
171 173
172 KEditToolbar dlg( factory() ); 174 KEditToolbar dlg( factory() );
173 connect( &dlg, SIGNAL( newToolbarConfig() ), SLOT( slotNewToolbarConfig() ) ); 175 connect( &dlg, SIGNAL( newToolbarConfig() ), SLOT( slotNewToolbarConfig() ) );
174 176
175 dlg.exec(); 177 dlg.exec();
176#else //KAB_EMBEDDED 178#else //KAB_EMBEDDED
177 qDebug("KAddressBookMain::configureToolbars() not implemented by ulf" ); 179 qDebug("KAddressBookMain::configureToolbars() not implemented by ulf" );
178#endif //KAB_EMBEDDED 180#endif //KAB_EMBEDDED
179} 181}
180 182
181void KAddressBookMain::slotNewToolbarConfig() 183void KAddressBookMain::slotNewToolbarConfig()
182{ 184{
183#ifndef KAB_EMBEDDED 185#ifndef KAB_EMBEDDED
184 applyMainWindowSettings( KGlobal::config(), "MainWindow" ); 186 applyMainWindowSettings( KGlobal::config(), "MainWindow" );
185#else //KAB_EMBEDDED 187#else //KAB_EMBEDDED
186 qDebug("KAddressBookMain::slotNewToolbarConfig() not implemented by ulf" ); 188 qDebug("KAddressBookMain::slotNewToolbarConfig() not implemented by ulf" );
187#endif //KAB_EMBEDDED 189#endif //KAB_EMBEDDED
188} 190}
189 191
190void KAddressBookMain::configureKeys() 192void KAddressBookMain::configureKeys()
191{ 193{
192#ifndef KAB_EMBEDDED 194#ifndef KAB_EMBEDDED
193 KKeyDialog::configureKeys( actionCollection(), xmlFile(), true, this ); 195 KKeyDialog::configureKeys( actionCollection(), xmlFile(), true, this );
194#else //KAB_EMBEDDED 196#else //KAB_EMBEDDED
195 qDebug("KAddressBookMain::configureKeys() not implemented by ulf" ); 197 qDebug("KAddressBookMain::configureKeys() not implemented by ulf" );
196#endif //KAB_EMBEDDED 198#endif //KAB_EMBEDDED
197} 199}
198 200
199void KAddressBookMain::closeEvent( QCloseEvent* ce ) 201void KAddressBookMain::closeEvent( QCloseEvent* ce )
200{ 202{
201 bool mModified = mCore->modified(); 203 bool mModified = mCore->modified();
202 bool mAskForQuit = KABPrefs::instance()->mAskForQuit; 204 bool mAskForQuit = KABPrefs::instance()->mAskForQuit;
203 205
204 QString mess = i18n( "Close KA/Pi?"); 206 QString mess = i18n( "Close KA/Pi?");
205 if ( mModified == true ) 207 if ( mModified == true )
206 mess += i18n( "\nChanges will be saved!"); 208 mess += i18n( "\nChanges will be saved!");
207 else 209 else
208 mess += i18n( "\nNo unsaved changes detected!\nNothing will be saved!"); 210 mess += i18n( "\nNo unsaved changes detected!\nNothing will be saved!");
209 211
210 bool mQuit = true; 212 bool mQuit = true;
211 213
212 214
213 if (mAskForQuit) 215 if (mAskForQuit)
214 { 216 {
215 217
216 int res = QMessageBox::information( this, "KA/Pi", mess , i18n("Yes!"), i18n("No"), 0, 0 ); 218 int res = QMessageBox::information( this, "KA/Pi", mess , i18n("Yes!"), i18n("No"), 0, 0 );
217 if (res == 0) 219 if (res == 0)
218 mQuit = true; 220 mQuit = true;
219 else 221 else
220 mQuit = false; 222 mQuit = false;
221 } 223 }
222 224
223 if (mQuit == false) 225 if (mQuit == false)
224 return; 226 return;
225 227
226 if (mModified == true) 228 if (mModified == true)
227 { 229 {
228 save(); 230 save();
229 mCore->saveSettings(); 231 mCore->saveSettings();
230 //KABPrefs::instance()->writeConfig(); 232 //KABPrefs::instance()->writeConfig();
231 } 233 }
232 234
233 ce->accept(); 235 ce->accept();
234} 236}
235 237
236#ifndef KAB_EMBEDDED 238#ifndef KAB_EMBEDDED
237#include "kaddressbookmain.moc" 239#include "kaddressbookmain.moc"
238#endif //KAB_EMBEDDED 240#endif //KAB_EMBEDDED
239 241
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 93ba53c..2f3531d 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -1,120 +1,119 @@
1#ifndef DESKTOP_VERSION 1#ifndef DESKTOP_VERSION
2#include <qpe/qpeapplication.h> 2#include <qpe/qpeapplication.h>
3#include <qcopchannel_qws.h> 3#include <qcopchannel_qws.h>
4#include <stdlib.h> 4#include <stdlib.h>
5#else 5#else
6#include <qapplication.h> 6#include <qapplication.h>
7#include <qwindowsstyle.h> 7#include <qwindowsstyle.h>
8#include <qplatinumstyle.h> 8#include <qplatinumstyle.h>
9#include <qmainwindow.h> 9#include <qmainwindow.h>
10#include <qmessagebox.h> 10#include <qmessagebox.h>
11#include <stdlib.h> 11#include <stdlib.h>
12#endif 12#endif
13 13
14#include <qtextcodec.h> 14#include <qtextcodec.h>
15#include <kstandarddirs.h> 15#include <kstandarddirs.h>
16#include <qregexp.h> 16#include <qregexp.h>
17#include <kglobal.h> 17#include <kglobal.h>
18#include <stdio.h> 18#include <stdio.h>
19#include <qdir.h> 19#include <qdir.h>
20#include "kabprefs.h" 20#include "kabprefs.h"
21#include "kaddressbookmain.h" 21#include "kaddressbookmain.h"
22#include "externalapphandler.h" 22#include "externalapphandler.h"
23#include <libkdepim/kpimglobalprefs.h> 23#include <libkdepim/kpimglobalprefs.h>
24void dumpMissing(); 24void dumpMissing();
25int main( int argc, char **argv ) 25int main( int argc, char **argv )
26{ 26{
27#ifndef DESKTOP_VERSION 27#ifndef DESKTOP_VERSION
28 QPEApplication a( argc, argv ); 28 QPEApplication a( argc, argv );
29 a.setKeepRunning (); 29 a.setKeepRunning ();
30#else 30#else
31 QApplication a( argc, argv ); 31 QApplication a( argc, argv );
32 QApplication::setStyle( new QPlatinumStyle ()); 32 QApplication::setStyle( new QPlatinumStyle ());
33#ifdef _WIN32_ 33#ifdef _WIN32_
34 QString hdir ( getenv( "HOME") ); 34 QString hdir ( getenv( "HOME") );
35 if ( hdir.isEmpty() ) { 35 if ( hdir.isEmpty() ) {
36 QString hd ("C:/" ); 36 QString hd ("C:/" );
37 //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd ); 37 //QMessageBox::information(0,"hh",QDir::homeDirPath()+" xx" +hd );
38 if ( QDir::homeDirPath().lower() == hd.lower() ) { 38 if ( QDir::homeDirPath().lower() == hd.lower() ) {
39 _putenv( "HOME=C:"); 39 _putenv( "HOME=C:");
40 //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) ); 40 //QMessageBox::information(0,"hh",QString ( getenv( "HOME") ) );
41 } 41 }
42 } else { 42 } else {
43 QDir app_dir; 43 QDir app_dir;
44 if ( !app_dir.exists(hdir) ) 44 if ( !app_dir.exists(hdir) )
45 app_dir.mkdir (hdir); 45 app_dir.mkdir (hdir);
46 } 46 }
47#endif 47#endif
48#endif 48#endif
49 49
50 bool exitHelp = false; 50 bool exitHelp = false;
51 if ( argc > 1 ) { 51 if ( argc > 1 ) {
52 QString command = argv[1]; 52 QString command = argv[1];
53 if ( command == "-help" ){ 53 if ( command == "-help" ){
54 printf("KA/E command line commands:\n"); 54 printf("KA/E command line commands:\n");
55 printf(" no command: Start KA/E in usual way\n"); 55 printf(" no command: Start KA/E in usual way\n");
56 printf(" -help: This output\n"); 56 printf(" -help: This output\n");
57 printf(" KA/E is exiting now. Bye!\n"); 57 printf(" KA/E is exiting now. Bye!\n");
58 exitHelp = true; 58 exitHelp = true;
59 } 59 }
60 } 60 }
61 if ( ! exitHelp ) { 61 if ( ! exitHelp ) {
62 62
63 KGlobal::setAppName( "kaddressbook" ); 63 KGlobal::setAppName( "kaddressbook" );
64#ifndef DESKTOP_VERSION 64#ifndef DESKTOP_VERSION
65 if ( QApplication::desktop()->width() > 320 ) 65 if ( QApplication::desktop()->width() > 320 )
66 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/"); 66 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons22/");
67 else 67 else
68 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/"); 68 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/kaddressbook/icons16/");
69#else 69#else
70 QString fileName ; 70 QString fileName ;
71 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/"; 71 fileName = qApp->applicationDirPath () + "/kdepim/kaddressbook/icons22/";
72 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 72 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
73 QApplication::addLibraryPath ( qApp->applicationDirPath () ); 73 QApplication::addLibraryPath ( qApp->applicationDirPath () );
74 74
75#endif 75#endif
76 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); 76 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook")));
77 // init language 77 // init language
78 KPimGlobalPrefs::instance()->setGlobalConfig(); 78 KPimGlobalPrefs::instance()->setGlobalConfig();
79 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont ); 79 QApplication::setFont( KPimGlobalPrefs::instance()->mApplicationFont );
80 KAddressBookMain m ; 80 KAddressBookMain m ;
81//US MainWindow m; 81//US MainWindow m;
82#ifndef DESKTOP_VERSION 82
83 QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
84#endif
85 83
86 84
87#ifndef DESKTOP_VERSION 85#ifndef DESKTOP_VERSION
88 a.showMainWidget( &m ); 86 a.showMainWidget( &m );
89 87
90#else 88#else
91 a.setMainWidget( &m ); 89 a.setMainWidget( &m );
92 m.show(); 90 m.show();
93#endif 91#endif
92 m.setCaption(i18n("Loading addressbook data ... please wait" ));
94 a.exec(); 93 a.exec();
95#ifdef DESKTOP_VERSION 94#ifdef DESKTOP_VERSION
96 KConfig *config = KABPrefs::instance()->getConfig(); 95 KConfig *config = KABPrefs::instance()->getConfig();
97 config->setGroup("WidgetLayout"); 96 config->setGroup("WidgetLayout");
98 QStringList list ;//= config->readListEntry("MainLayout"); 97 QStringList list ;//= config->readListEntry("MainLayout");
99 int x,y,w,h; 98 int x,y,w,h;
100 QWidget* wid; 99 QWidget* wid;
101 wid = &m; 100 wid = &m;
102 x = wid->geometry().x(); 101 x = wid->geometry().x();
103 y = wid->geometry().y(); 102 y = wid->geometry().y();
104 w = wid->width(); 103 w = wid->width();
105 h = wid->height(); 104 h = wid->height();
106 list.clear(); 105 list.clear();
107 list << QString::number( x ); 106 list << QString::number( x );
108 list << QString::number( y ); 107 list << QString::number( y );
109 list << QString::number( w ); 108 list << QString::number( w );
110 list << QString::number( h ); 109 list << QString::number( h );
111 config->writeEntry("MainLayout",list ); 110 config->writeEntry("MainLayout",list );
112 config->sync(); 111 config->sync();
113#endif 112#endif
114 dumpMissing(); 113 dumpMissing();
115 114
116 KPimGlobalPrefs::instance()->writeConfig(); 115 KPimGlobalPrefs::instance()->writeConfig();
117 } 116 }
118 qDebug("KA: Bye! "); 117 qDebug("KA: Bye! ");
119} 118}
120 119