summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-17 10:00:03 (UTC)
committer zautrix <zautrix>2005-03-17 10:00:03 (UTC)
commita1ae8a0c130aef01923b9a00c95919e0a9fea9d7 (patch) (unidiff)
tree09988c640bb71db2677dff6155cae0a6f027d194
parente0a510893ffcddb8d58f785832622d030900b2f9 (diff)
downloadkdepimpi-a1ae8a0c130aef01923b9a00c95919e0a9fea9d7.zip
kdepimpi-a1ae8a0c130aef01923b9a00c95919e0a9fea9d7.tar.gz
kdepimpi-a1ae8a0c130aef01923b9a00c95919e0a9fea9d7.tar.bz2
small kapi fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt2
-rw-r--r--kaddressbook/kabcore.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index 5335f47..a3d465f 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -1,757 +1,757 @@
1{ "file","Datei" }, 1{ "file","Datei" },
2{ "Choose one file","Wähle eine Datei" }, 2{ "Choose one file","Wähle eine Datei" },
3{ "dir","Verzeichnis" }, 3{ "dir","Verzeichnis" },
4{ "Choose a directory with may files","Wähle Verzeichnis" }, 4{ "Choose a directory with may files","Wähle Verzeichnis" },
5{ "ldap","ldap" }, 5{ "ldap","ldap" },
6{ "No description available","Keine Beschreibung verfügbar" }, 6{ "No description available","Keine Beschreibung verfügbar" },
7{ "Library files for "%1" not found in paths","Bibliothek für "%1" nicht gefunden" }, 7{ "Library files for "%1" not found in paths","Bibliothek für "%1" nicht gefunden" },
8{ "qtopia","qtopia" }, 8{ "qtopia","qtopia" },
9{ "Qtopia PIM Addressbook.","Qtopia PIM Adressbuch." }, 9{ "Qtopia PIM Addressbook.","Qtopia PIM Adressbuch." },
10{ "vCard","vCard" }, 10{ "vCard","vCard" },
11{ "vCard Format","vCard Format" }, 11{ "vCard Format","vCard Format" },
12{ "microkabcformat_binary","microkabcformat_binary" }, 12{ "microkabcformat_binary","microkabcformat_binary" },
13{ "Binary","Binary" }, 13{ "Binary","Binary" },
14{ "No description available.","Keine Beschreibung verfügbar." }, 14{ "No description available.","Keine Beschreibung verfügbar." },
15{ "Department","Abteilung" }, 15{ "Department","Abteilung" },
16{ "Profession","Beruf" }, 16{ "Profession","Beruf" },
17{ "Assistant's Name","Name d.Assistenten" }, 17{ "Assistant's Name","Name d.Assistenten" },
18{ "Manager's Name","Name d.Manager's" }, 18{ "Manager's Name","Name d.Manager's" },
19{ "Spouse's Name","Name d.Ehegatten" }, 19{ "Spouse's Name","Name d.Ehegatten" },
20{ "Office","Büro" }, 20{ "Office","Büro" },
21{ "IM Address","IM Adresse" }, 21{ "IM Address","IM Adresse" },
22{ "Anniversary","Jahrestag" }, 22{ "Anniversary","Jahrestag" },
23{ "Gender","Geschlecht" }, 23{ "Gender","Geschlecht" },
24{ "Children","Kinder" }, 24{ "Children","Kinder" },
25{ "FreeBusyUrl","FreeBusyUrl" }, 25{ "FreeBusyUrl","FreeBusyUrl" },
26{ "ExternalID","ExternalID" }, 26{ "ExternalID","ExternalID" },
27{ "Resource loaded: '%1'","Resource geladen: '%1'" }, 27{ "Resource loaded: '%1'","Resource geladen: '%1'" },
28{ "Select View","Ansicht wählen" }, 28{ "Select View","Ansicht wählen" },
29{ "Modify View...","Ansicht ändern..." }, 29{ "Modify View...","Ansicht ändern..." },
30{ "Add View...","Ansicht hinzufügen..." }, 30{ "Add View...","Ansicht hinzufügen..." },
31{ "Delete View","Ansicht löschen" }, 31{ "Delete View","Ansicht löschen" },
32{ "Refresh View","Ansicht aktualisieren" }, 32{ "Refresh View","Ansicht aktualisieren" },
33{ "Edit &Filters...","Bearbeite &Filter..." }, 33{ "Edit &Filters...","Bearbeite &Filter..." },
34{ "Select Filter","Filter wählen" }, 34{ "Select Filter","Filter wählen" },
35{ "Style:","Stil:" }, 35{ "Style:","Stil:" },
36{ "HTML table style.","HTML tabellen stil." }, 36{ "HTML table style.","HTML tabellen stil." },
37{ "Default Table View","Standard Tabellen Ansicht" }, 37{ "Default Table View","Standard Tabellen Ansicht" },
38{ "Show Extension Bar","Zeige Extension Bar" }, 38{ "Show Extension Bar","Zeige Extension Bar" },
39{ "None","Kein" }, 39{ "None","Kein" },
40{ "Name...","Name..." }, 40{ "Name...","Name..." },
41{ "Role:","Funktion:" }, 41{ "Role:","Funktion:" },
42{ "Organization:","Firma:" }, 42{ "Organization:","Firma:" },
43{ "Formatted name:","Formatt. Name:" }, 43{ "Formatted name:","Formatt. Name:" },
44{ "Edit Phone Numbers...","Bearbeite Telefonnummern..." }, 44{ "Edit Phone Numbers...","Bearbeite Telefonnummern..." },
45{ "Categories","Kategorien" }, 45{ "Categories","Kategorien" },
46{ "Public","Öffentlich" }, 46{ "Public","Öffentlich" },
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 (gender undefined)","ALIEN (Geschlecht unbekannt)" }, 97{ "ALIEN (gender undefined)","ALIEN (Geschlecht unbekannt)" },
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","Hinzufügen" }, 108{ "Add","Hinzufügen" },
109{ "Remove","Entfernen" }, 109{ "Remove","Entfernen" },
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\nselektiert für Multi-Sync" }, 265{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert 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","Namen Prefix" }, 288{ "Honorific Prefixes","Namen Prefix" },
289{ "Honorific Suffixes","Namen Suffix" }, 289{ "Honorific Suffixes","Namen Suffix" },
290{ "Nick Name","Sptitzname" }, 290{ "Nick Name","Sptitzname" },
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 Client" }, 312{ "Mail Client","Mail Client" },
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{ "Honor KDE single click","Benutze KDE Einzelklick" }, 421{ "Honor KDE single click","Benutze KDE Einzelklick" },
422{ "Automatic name parsing for new addressees","Automa. Name Parsen für neue Einträge" }, 422{ "Automatic name parsing for new addressees","Automa. Name Parsen für neue Einträge" },
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{ "Ask for quit when closing Ka/Pi","Vor Beenden von Ka/Pi nachfragen" }, 424{ "Ask for quit when closing Ka/Pi","Vor Beenden von Ka/Pi nachfragen" },
425{ "General","Algemein" }, 425{ "General","Algemein" },
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 Beginn:" }, 459{ "Daylight start:","Sommerzeit Beginn:" },
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{ "contacts successfully imported.","Kontakte erfolgreich importiert." }, 587{ "contacts successfully imported.","Kontakte erfolgreich importiert." },
588{ "Import xml file","Importiere xml Datei" }, 588{ "Import xml file","Importiere xml Datei" },
589{ "Choose contact selection","Wähle Kontakt Auswahl" }, 589{ "Choose contact selection","Wähle Kontakt Auswahl" },
590{ "Select the entire address book","Wähle das ganze Adressbuch" }, 590{ "Select the entire address book","Wähle das ganze Adressbuch" },
591{ "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 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." },
592{ "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 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." },
593{ "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{ "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." },
594{ "Select a filter to decide which contacts to select.","Selektiere einen Filter um festzulegen welche Kontakte ausgewählt werden sollen." }, 594{ "Select a filter to decide which contacts to select.","Selektiere einen Filter um festzulegen welche Kontakte ausgewählt werden sollen." },
595{ "Check the categories whose members you want to select.","Setzte die Kategorien, dessen Mitglieder Sie auswählen möchten." }, 595{ "Check the categories whose members you want to select.","Setzte die Kategorien, dessen Mitglieder Sie auswählen möchten." },
596{ "I/O device: ","I/O device: " }, 596{ "I/O device: ","I/O device: " },
597{ "Connection: ","Connection: " }, 597{ "Connection: ","Connection: " },
598{ "Model(opt.): ","Model(opt.): " }, 598{ "Model(opt.): ","Model(opt.): " },
599{ "Exporting to phone...","Exportiere aufs Handy..." }, 599{ "Exporting to phone...","Exportiere aufs Handy..." },
600{ "Error exporting to phone","Fehler beim Export aufs Handy" }, 600{ "Error exporting to phone","Fehler beim Export aufs Handy" },
601{ "contacts successfully exported.","Kontakte erfolgreich exportiert." }, 601{ "contacts successfully exported.","Kontakte erfolgreich exportiert." },
602{ "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{ "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?" },
603{ "Set formatted name","Setze formatierten Namen" }, 603{ "Set formatted name","Setze formatierten Namen" },
604{ "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{ "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." },
605{ "Set formatted name to:","Setze formatierten Name auf:" }, 605{ "Set formatted name to:","Setze formatierten Name auf:" },
606{ "Simple: James Bond","Einfach: James Bond" }, 606{ "Simple: James Bond","Einfach: James Bond" },
607{ "Full: Mr. James 007 Bond I","Voll: Mr. James 007 Bond I" }, 607{ "Full: Mr. James 007 Bond I","Voll: Mr. James 007 Bond I" },
608{ "Reverse: Bond, James","Umgekehrt: Bond, James" }, 608{ "Reverse: Bond, James","Umgekehrt: Bond, James" },
609{ "Organization: MI6","Organisation: MI6" }, 609{ "Organization: MI6","Organisation: MI6" },
610{ "Set formatted name to\norganization, if name empty","Setze formatierten Namen auf\nOrganisation, wenn Name leer ist." }, 610{ "Set formatted name to\norganization, if name empty","Setze formatierten Namen auf\nOrganisation, wenn Name leer ist." },
611{ "Select contact list","Selektiere Kontakt Liste" }, 611{ "Select contact list","Selektiere Kontakt Liste" },
612{ "Changing contact #%1","Ändere Kontakt #%1" }, 612{ "Changing contact #%1","Ändere Kontakt #%1" },
613{ "Refreshing view...","Lade Ansicht neu..." }, 613{ "Refreshing view...","Lade Ansicht neu..." },
614{ "Setting formatted name completed!","Setzen vom formatierten Namen beendet!" }, 614{ "Setting formatted name completed!","Setzen vom formatierten Namen beendet!" },
615{ "Removing voice...","Entferne voice..." }, 615{ "Removing voice...","Entferne voice..." },
616{ "Remove voice completed!","Entferne voice beendet!" }, 616{ "Remove voice completed!","Entferne voice beendet!" },
617{ "Merge with existing categories?","Zu bestehenden\nKategorien hinzufügen?" }, 617{ "Merge with existing categories?","Zu bestehenden\nKategorien hinzufügen?" },
618{ "Setting categories ... please wait!","Setze Kategorien ... bitte warten!" }, 618{ "Setting categories ... please wait!","Setze Kategorien ... bitte warten!" },
619{ "Setting categories completed!","Setzen der Kategorien beendet!" }, 619{ "Setting categories completed!","Setzen der Kategorien beendet!" },
620{ "OK","OK" }, 620{ "OK","OK" },
621{ "Please wait, processing categories...","Bitte warten, bearbeite Kategorien..." }, 621{ "Please wait, processing categories...","Bitte warten, bearbeite Kategorien..." },
622{ "Processing contact #%1","Bearbeite Kontakt #%1" }, 622{ "Processing contact #%1","Bearbeite Kontakt #%1" },
623{ " categories added to list! "," Kategorien zur Liste hinzugefügt! " }, 623{ " categories added to list! "," Kategorien zur Liste hinzugefügt! " },
624{ "%1: %2","%1: %2" }, 624{ "%1: %2","%1: %2" },
625{ "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{ "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" },
626{ "<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{ "<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>" },
627{ "Cut","Ausschneiden" }, 627{ "Cut","Ausschneiden" },
628{ "Paste","Einfügen" }, 628{ "Paste","Einfügen" },
629{ "Delete","Löschen" }, 629{ "Delete","Löschen" },
630{ "Choose...","Wähle..." }, 630{ "Choose...","Wähle..." },
631{ "Add View","Ansicht hinzufügen" }, 631{ "Add View","Ansicht hinzufügen" },
632{ "View name:","Ansicht Name:" }, 632{ "View name:","Ansicht Name:" },
633{ "View Type","Ainsicht Typ" }, 633{ "View Type","Ainsicht Typ" },
634{ "Icons represent contacts. Very simple view.","Icons repräsentieren Kontakte. Sehr einfache Ansicht." }, 634{ "Icons represent contacts. Very simple view.","Icons repräsentieren Kontakte. Sehr einfache Ansicht." },
635{ "A listing of contacts in a table. Each cell of the table holds a field of the contact.","Eine Kontaktliste in einer Tabelle." }, 635{ "A listing of contacts in a table. Each cell of the table holds a field of the contact.","Eine Kontaktliste in einer Tabelle." },
636{ "Rolodex style cards represent contacts.","Rolodex Stil Karten repräsentieren Kontakte." }, 636{ "Rolodex style cards represent contacts.","Rolodex Stil Karten repräsentieren Kontakte." },
637{ "Draw &separators","Zeichne &Trennlinie" }, 637{ "Draw &separators","Zeichne &Trennlinie" },
638{ "Separator &width:","Trennlinien &Breite:" }, 638{ "Separator &width:","Trennlinien &Breite:" },
639{ "&Padding:","Füllung:" }, 639{ "&Padding:","Füllung:" },
640{ "Cards","Karten" }, 640{ "Cards","Karten" },
641{ "&Margin:","&Rand:" }, 641{ "&Margin:","&Rand:" },
642{ "Draw &borders","Zeichne Ränder" }, 642{ "Draw &borders","Zeichne Ränder" },
643{ "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 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." },
644{ "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{ "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." },
645{ "Sets the width of column separators","Sets the width of column separators" }, 645{ "Sets the width of column separators","Sets the width of column separators" },
646{ "&Layout","&Layout" }, 646{ "&Layout","&Layout" },
647{ "Show &empty fields","Zeige leere Felder" }, 647{ "Show &empty fields","Zeige leere Felder" },
648{ "Show field &labels","Zeige Feld Label" }, 648{ "Show field &labels","Zeige Feld Label" },
649{ "Be&havior","Ver&halten" }, 649{ "Be&havior","Ver&halten" },
650{ "Header, Border and Separator Color","Kopf, Rand und Trennlinien Farbe" }, 650{ "Header, Border and Separator Color","Kopf, Rand und Trennlinien Farbe" },
651{ "<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{ "<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>" },
652{ "Confirm Delete","Bestätige Löschen" }, 652{ "Confirm Delete","Bestätige Löschen" },
653{ "Edit Address Book Filter","Editiere Adressbuch Filter" }, 653{ "Edit Address Book Filter","Editiere Adressbuch Filter" },
654{ "Category rule","Kategorie Regel" }, 654{ "Category rule","Kategorie Regel" },
655{ "Include categories","Inklusive" }, 655{ "Include categories","Inklusive" },
656{ "Exclude categories","Exclusive" }, 656{ "Exclude categories","Exclusive" },
657{ "Include contacts, that are:","Schließe folgende Kontakte ein:" }, 657{ "Include contacts, that are:","Schließe folgende Kontakte ein:" },
658{ "public","Öffentlich" }, 658{ "public","Öffentlich" },
659{ "private","Privat" }, 659{ "private","Privat" },
660{ "confidential","Vertraulich" }, 660{ "confidential","Vertraulich" },
661{ "Configure Resources","Konfiguriere Resourcen" }, 661{ "Configure Resources","Konfiguriere Resourcen" },
662{ "Resource Configuration","Resource Konfiguration" }, 662{ "Resource Configuration","Resource Konfiguration" },
663{ "Resources","Resourcen" }, 663{ "Resources","Resourcen" },
664{ "Standard","Standard" }, 664{ "Standard","Standard" },
665{ "&Use as Standard","Setze als Standard" }, 665{ "&Use as Standard","Setze als Standard" },
666{ "Select type of the new resource:","Selektiere Typ der neuen Resource:" }, 666{ "Select type of the new resource:","Selektiere Typ der neuen Resource:" },
667{ "General Settings","Allgemeine Einstellungen" }, 667{ "General Settings","Allgemeine Einstellungen" },
668{ "Read-only","Nur-Lesen" }, 668{ "Read-only","Nur-Lesen" },
669{ "Include in sync","Schließe in Sync mit ein" }, 669{ "Include in sync","Schließe in Sync mit ein" },
670{ "%1 Resource Settings","%1 Resource Einstellungen" }, 670{ "%1 Resource Settings","%1 Resource Einstellungen" },
671{ "Format:","Format:" }, 671{ "Format:","Format:" },
672{ "Location:","Ort:" }, 672{ "Location:","Ort:" },
673{ "Full Menu bar (restart)","Volle Menu Leiste (Neustart!)" }, 673{ "Full Menu bar (restart)","Volle Menu Leiste (Neustart!)" },
674{ "Language","Sprache" }, 674{ "Language","Sprache" },
675{ "Time Format","Zeit Format" }, 675{ "Time Format","Zeit Format" },
676{ "Time Zone","Zeit Zone" }, 676{ "Time Zone","Zeit Zone" },
677{ "Data storage path","Daten Speicherpfad" }, 677{ "Data storage path","Daten Speicherpfad" },
678{ "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{ "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" },
679{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 679{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
680{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 680{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
681{ "Save settings","Speichere Einstellungen" }, 681{ "Save settings","Speichere Einstellungen" },
682{ "Save standard","Speichere Standard" }, 682{ "Save standard","Speichere Standard" },
683{ "Save","Speichern" }, 683{ "Save","Speichern" },
684{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 684{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
685{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 685{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
686{ "Multiple Sync options","Multi Sync Optionen" }, 686{ "Multiple Sync options","Multi Sync Optionen" },
687{ "Sync algo options","Sync Ablauf Optionen" }, 687{ "Sync algo options","Sync Ablauf Optionen" },
688{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 688{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
689{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 689{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
690{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 690{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
691{ "Write back options","Optionen zum Zurückschreiben" }, 691{ "Write back options","Optionen zum Zurückschreiben" },
692{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 692{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
693{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 693{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
694{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 694{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
695{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 695{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
696{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 696{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
697{ "Time period","Zeitspanne" }, 697{ "Time period","Zeitspanne" },
698{ "From ","Von " }, 698{ "From ","Von " },
699{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 699{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
700{ " weeks in the future "," Wochen in der Zukunft " }, 700{ " weeks in the future "," Wochen in der Zukunft " },
701{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 701{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
702{ "Local temp file:","Lokale temp Datei:" }, 702{ "Local temp file:","Lokale temp Datei:" },
703{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 703{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
704{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 704{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
705{ "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{ "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." },
706{ "Sorry","Tut mir leid" }, 706{ "Sorry","Tut mir leid" },
707{ "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" }, 707{ "You cannot use a read-only<br> resource as standard!","Man kann nicht eine read-only<br> Resource als Standard setzen!" },
708{ "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{ "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" },
709{ "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{ "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" },
710{ "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" }, 710{ "Unable to load resource '%1'","Resource kann nicht geladen werden: '%1'" },
711{ "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" }, 711{ "Some changes are only\neffective after a restart!\n","Einige Änderungen werden erst\nnach einem Neustart übernommen!\n" },
712{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 712{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
713{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 713{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
714{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 714{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
715{ "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{ "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?" },
716{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 716{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
717{ "Error","Fehler" }, 717{ "Error","Fehler" },
718{ ""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 Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
719{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 719{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
720{ "Warning","Warnung" }, 720{ "Warning","Warnung" },
721{ "Select week number","Wähle Wochen Nummer" }, 721{ "Select week number","Wähle Wochen Nummer" },
722{ "Februar","Februar" }, 722{ "Februar","Februar" },
723{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 723{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
724{ "Password for remote access:","Passwort für fernen Zugriff:" }, 724{ "Password for remote access:","Passwort für fernen Zugriff:" },
725{ "Remote IP address:","Ferne IP Adresse:" }, 725{ "Remote IP address:","Ferne IP Adresse:" },
726{ "Remote port number:","Ferne Port Nummer:" }, 726{ "Remote port number:","Ferne Port Nummer:" },
727{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 727{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
728{ "Remote from: ","Fern von: " }, 728{ "Remote from: ","Fern von: " },
729{ "Local from: ","Lokal von: " }, 729{ "Local from: ","Lokal von: " },
730{ "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{ "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" },
731{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 731{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
732{ "Write back","Schreibe zurück" }, 732{ "Write back","Schreibe zurück" },
733{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 733{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
734{ "Received sync request","Sync Anfrage erhalten" }, 734{ "Received sync request","Sync Anfrage erhalten" },
735{ "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{ "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." },
736{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 736{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
737{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 737{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
738{ "Sending file...","Sende Datei..." }, 738{ "Sending file...","Sende Datei..." },
739{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 739{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
740{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 740{ "Receiving synced file...","Gesyncte Daten erhalten..." },
741{ "Received %1 bytes","%1 Bytes erhalten" }, 741{ "Received %1 bytes","%1 Bytes erhalten" },
742{ "Writing file to disk...","Speichere Datei..." }, 742{ "Writing file to disk...","Speichere Datei..." },
743{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 743{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
744{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 744{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
745{ "Synchronize!","Synchronisiere!" }, 745{ "Synchronize!","Synchronisiere!" },
746{ "High clock skew!","Großer Uhrzeitunterschied!" }, 746{ "High clock skew!","Großer Uhrzeitunterschied!" },
747{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 747{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
748{ "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{ "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!" },
749{ "","" }, 749{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" },
750{ "","" }, 750{ "","" },
751{ "","" }, 751{ "","" },
752{ "","" }, 752{ "","" },
753{ "","" }, 753{ "","" },
754{ "","" }, 754{ "","" },
755{ "","" }, 755{ "","" },
756{ "","" }, 756{ "","" },
757{ "","" }, \ No newline at end of file 757{ "","" }, \ No newline at end of file
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 3f7a7da..e8f6132 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1,3330 +1,3335 @@
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 99
100 100
101//#include <qlabel.h> 101//#include <qlabel.h>
102 102
103 103
104#ifndef DESKTOP_VERSION 104#ifndef DESKTOP_VERSION
105#include <qpe/ir.h> 105#include <qpe/ir.h>
106#include <qpe/qpemenubar.h> 106#include <qpe/qpemenubar.h>
107#include <qtopia/qcopenvelope_qws.h> 107#include <qtopia/qcopenvelope_qws.h>
108#else 108#else
109 109
110#include <qmenubar.h> 110#include <qmenubar.h>
111#endif 111#endif
112 112
113#endif // KAB_EMBEDDED 113#endif // KAB_EMBEDDED
114#include "kcmconfigs/kcmkabconfig.h" 114#include "kcmconfigs/kcmkabconfig.h"
115#include "kcmconfigs/kcmkdepimconfig.h" 115#include "kcmconfigs/kcmkdepimconfig.h"
116#include "kpimglobalprefs.h" 116#include "kpimglobalprefs.h"
117#include "externalapphandler.h" 117#include "externalapphandler.h"
118#include "xxportselectdialog.h" 118#include "xxportselectdialog.h"
119 119
120 120
121#include <kresources/selectdialog.h> 121#include <kresources/selectdialog.h>
122#include <kmessagebox.h> 122#include <kmessagebox.h>
123 123
124#include <picture.h> 124#include <picture.h>
125#include <resource.h> 125#include <resource.h>
126 126
127//US#include <qsplitter.h> 127//US#include <qsplitter.h>
128#include <qmap.h> 128#include <qmap.h>
129#include <qdir.h> 129#include <qdir.h>
130#include <qfile.h> 130#include <qfile.h>
131#include <qvbox.h> 131#include <qvbox.h>
132#include <qlayout.h> 132#include <qlayout.h>
133#include <qclipboard.h> 133#include <qclipboard.h>
134#include <qtextstream.h> 134#include <qtextstream.h>
135#include <qradiobutton.h> 135#include <qradiobutton.h>
136#include <qbuttongroup.h> 136#include <qbuttongroup.h>
137 137
138#include <libkdepim/categoryselectdialog.h> 138#include <libkdepim/categoryselectdialog.h>
139#include <libkdepim/categoryeditdialog.h> 139#include <libkdepim/categoryeditdialog.h>
140#include <kabc/vcardconverter.h> 140#include <kabc/vcardconverter.h>
141 141
142 142
143#include "addresseeutil.h" 143#include "addresseeutil.h"
144#include "undocmds.h" 144#include "undocmds.h"
145#include "addresseeeditordialog.h" 145#include "addresseeeditordialog.h"
146#include "viewmanager.h" 146#include "viewmanager.h"
147#include "details/detailsviewcontainer.h" 147#include "details/detailsviewcontainer.h"
148#include "kabprefs.h" 148#include "kabprefs.h"
149#include "xxportmanager.h" 149#include "xxportmanager.h"
150#include "incsearchwidget.h" 150#include "incsearchwidget.h"
151#include "jumpbuttonbar.h" 151#include "jumpbuttonbar.h"
152#include "extensionmanager.h" 152#include "extensionmanager.h"
153#include "addresseeconfig.h" 153#include "addresseeconfig.h"
154#include "nameeditdialog.h" 154#include "nameeditdialog.h"
155#include <kcmultidialog.h> 155#include <kcmultidialog.h>
156 156
157#ifdef _WIN32_ 157#ifdef _WIN32_
158#ifdef _OL_IMPORT_ 158#ifdef _OL_IMPORT_
159#include "kaimportoldialog.h" 159#include "kaimportoldialog.h"
160#endif 160#endif
161#else 161#else
162#include <unistd.h> 162#include <unistd.h>
163#endif 163#endif
164// sync includes 164// sync includes
165#include <libkdepim/ksyncprofile.h> 165#include <libkdepim/ksyncprofile.h>
166#include <libkdepim/ksyncprefsdialog.h> 166#include <libkdepim/ksyncprefsdialog.h>
167 167
168 168
169class KABCatPrefs : public QDialog 169class KABCatPrefs : public QDialog
170{ 170{
171 public: 171 public:
172 KABCatPrefs( QWidget *parent=0, const char *name=0 ) : 172 KABCatPrefs( QWidget *parent=0, const char *name=0 ) :
173 QDialog( parent, name, true ) 173 QDialog( parent, name, true )
174 { 174 {
175 setCaption( i18n("Manage new Categories") ); 175 setCaption( i18n("Manage new Categories") );
176 QVBoxLayout* lay = new QVBoxLayout( this ); 176 QVBoxLayout* lay = new QVBoxLayout( this );
177 lay->setSpacing( 3 ); 177 lay->setSpacing( 3 );
178 lay->setMargin( 3 ); 178 lay->setMargin( 3 );
179 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); 179 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
180 lay->addWidget( lab ); 180 lay->addWidget( lab );
181 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 181 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
182 lay->addWidget( format ); 182 lay->addWidget( format );
183 format->setExclusive ( true ) ; 183 format->setExclusive ( true ) ;
184 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 184 addCatBut = new QRadioButton(i18n("Add to category list"), format );
185 new QRadioButton(i18n("Remove from addressees"), format ); 185 new QRadioButton(i18n("Remove from addressees"), format );
186 addCatBut->setChecked( true ); 186 addCatBut->setChecked( true );
187 QPushButton * ok = new QPushButton( i18n("OK"), this ); 187 QPushButton * ok = new QPushButton( i18n("OK"), this );
188 lay->addWidget( ok ); 188 lay->addWidget( ok );
189 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 189 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
190 lay->addWidget( cancel ); 190 lay->addWidget( cancel );
191 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 191 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
192 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 192 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
193 resize( 200, 200 ); 193 resize( 200, 200 );
194 } 194 }
195 195
196 bool addCat() { return addCatBut->isChecked(); } 196 bool addCat() { return addCatBut->isChecked(); }
197private: 197private:
198 QRadioButton* addCatBut; 198 QRadioButton* addCatBut;
199}; 199};
200 200
201class KABFormatPrefs : public QDialog 201class KABFormatPrefs : public QDialog
202{ 202{
203 public: 203 public:
204 KABFormatPrefs( QWidget *parent=0, const char *name=0 ) : 204 KABFormatPrefs( QWidget *parent=0, const char *name=0 ) :
205 QDialog( parent, name, true ) 205 QDialog( parent, name, true )
206 { 206 {
207 setCaption( i18n("Set formatted name") ); 207 setCaption( i18n("Set formatted name") );
208 QVBoxLayout* lay = new QVBoxLayout( this ); 208 QVBoxLayout* lay = new QVBoxLayout( this );
209 lay->setSpacing( 3 ); 209 lay->setSpacing( 3 );
210 lay->setMargin( 3 ); 210 lay->setMargin( 3 );
211 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this ); 211 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this );
212 lay->addWidget( lab ); 212 lay->addWidget( lab );
213 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this ); 213 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this );
214 lay->addWidget( format ); 214 lay->addWidget( format );
215 format->setExclusive ( true ) ; 215 format->setExclusive ( true ) ;
216 simple = new QRadioButton(i18n("Simple: James Bond"), format ); 216 simple = new QRadioButton(i18n("Simple: James Bond"), format );
217 full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format ); 217 full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format );
218 reverse = new QRadioButton(i18n("Reverse: Bond, James"), format ); 218 reverse = new QRadioButton(i18n("Reverse: Bond, James"), format );
219 company = new QRadioButton(i18n("Organization: MI6"), format ); 219 company = new QRadioButton(i18n("Organization: MI6"), format );
220 simple->setChecked( true ); 220 simple->setChecked( true );
221 setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this); 221 setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this);
222 lay->addWidget( setCompany ); 222 lay->addWidget( setCompany );
223 QPushButton * ok = new QPushButton( i18n("Select contact list"), this ); 223 QPushButton * ok = new QPushButton( i18n("Select contact list"), this );
224 lay->addWidget( ok ); 224 lay->addWidget( ok );
225 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 225 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
226 lay->addWidget( cancel ); 226 lay->addWidget( cancel );
227 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 227 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
228 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 228 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
229 //resize( 200, 200 ); 229 //resize( 200, 200 );
230 230
231 } 231 }
232public: 232public:
233 QRadioButton* simple, *full, *reverse, *company; 233 QRadioButton* simple, *full, *reverse, *company;
234 QCheckBox* setCompany; 234 QCheckBox* setCompany;
235}; 235};
236 236
237 237
238 238
239class KAex2phonePrefs : public QDialog 239class KAex2phonePrefs : public QDialog
240{ 240{
241 public: 241 public:
242 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) : 242 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
243 QDialog( parent, name, true ) 243 QDialog( parent, name, true )
244 { 244 {
245 setCaption( i18n("Export to phone options") ); 245 setCaption( i18n("Export to phone options") );
246 QVBoxLayout* lay = new QVBoxLayout( this ); 246 QVBoxLayout* lay = new QVBoxLayout( this );
247 lay->setSpacing( 3 ); 247 lay->setSpacing( 3 );
248 lay->setMargin( 3 ); 248 lay->setMargin( 3 );
249 QLabel *lab; 249 QLabel *lab;
250 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 250 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
251 lab->setAlignment (AlignHCenter ); 251 lab->setAlignment (AlignHCenter );
252 QHBox* temphb; 252 QHBox* temphb;
253 temphb = new QHBox( this ); 253 temphb = new QHBox( this );
254 new QLabel( i18n("I/O device: "), temphb ); 254 new QLabel( i18n("I/O device: "), temphb );
255 mPhoneDevice = new QLineEdit( temphb); 255 mPhoneDevice = new QLineEdit( temphb);
256 lay->addWidget( temphb ); 256 lay->addWidget( temphb );
257 temphb = new QHBox( this ); 257 temphb = new QHBox( this );
258 new QLabel( i18n("Connection: "), temphb ); 258 new QLabel( i18n("Connection: "), temphb );
259 mPhoneConnection = new QLineEdit( temphb); 259 mPhoneConnection = new QLineEdit( temphb);
260 lay->addWidget( temphb ); 260 lay->addWidget( temphb );
261 temphb = new QHBox( this ); 261 temphb = new QHBox( this );
262 new QLabel( i18n("Model(opt.): "), temphb ); 262 new QLabel( i18n("Model(opt.): "), temphb );
263 mPhoneModel = new QLineEdit( temphb); 263 mPhoneModel = new QLineEdit( temphb);
264 lay->addWidget( temphb ); 264 lay->addWidget( temphb );
265 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); 265 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this );
266 // lay->addWidget( mWriteToSim ); 266 // lay->addWidget( mWriteToSim );
267 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); 267 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) );
268 lab->setAlignment (AlignHCenter); 268 lab->setAlignment (AlignHCenter);
269 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 269 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
270 lay->addWidget( ok ); 270 lay->addWidget( ok );
271 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 271 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
272 lay->addWidget( cancel ); 272 lay->addWidget( cancel );
273 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 273 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
274 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 274 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
275 resize( 220, 240 ); 275 resize( 220, 240 );
276 276
277 } 277 }
278 278
279public: 279public:
280 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 280 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
281 QCheckBox* mWriteToSim; 281 QCheckBox* mWriteToSim;
282}; 282};
283 283
284 284
285bool pasteWithNewUid = true; 285bool pasteWithNewUid = true;
286 286
287#ifdef KAB_EMBEDDED 287#ifdef KAB_EMBEDDED
288KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) 288KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name )
289 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 289 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
290 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ 290 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/
291 mReadWrite( readWrite ), mModified( false ), mMainWindow(client) 291 mReadWrite( readWrite ), mModified( false ), mMainWindow(client)
292#else //KAB_EMBEDDED 292#else //KAB_EMBEDDED
293KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) 293KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name )
294 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 294 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
295 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), 295 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ),
296 mReadWrite( readWrite ), mModified( false ) 296 mReadWrite( readWrite ), mModified( false )
297#endif //KAB_EMBEDDED 297#endif //KAB_EMBEDDED
298{ 298{
299 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 299 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
300 // syncManager->setBlockSave(false); 300 // syncManager->setBlockSave(false);
301 mMiniSplitter = 0; 301 mMiniSplitter = 0;
302 mExtensionBarSplitter = 0; 302 mExtensionBarSplitter = 0;
303 mIsPart = !parent->inherits( "KAddressBookMain" ); 303 mIsPart = !parent->inherits( "KAddressBookMain" );
304 mAddressBook = KABC::StdAddressBook::self(); 304 mAddressBook = KABC::StdAddressBook::self();
305 KABC::StdAddressBook::setAutomaticSave( false ); 305 KABC::StdAddressBook::setAutomaticSave( false );
306 306
307#ifndef KAB_EMBEDDED 307#ifndef KAB_EMBEDDED
308 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); 308 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler );
309#endif //KAB_EMBEDDED 309#endif //KAB_EMBEDDED
310 310
311 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), 311 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ),
312 SLOT( addressBookChanged() ) ); 312 SLOT( addressBookChanged() ) );
313 313
314#if 0 314#if 0
315 // LP moved to addressbook init method 315 // LP moved to addressbook init method
316 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, 316 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization,
317 "X-Department", "KADDRESSBOOK" ); 317 "X-Department", "KADDRESSBOOK" );
318 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, 318 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization,
319 "X-Profession", "KADDRESSBOOK" ); 319 "X-Profession", "KADDRESSBOOK" );
320 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, 320 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization,
321 "X-AssistantsName", "KADDRESSBOOK" ); 321 "X-AssistantsName", "KADDRESSBOOK" );
322 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, 322 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization,
323 "X-ManagersName", "KADDRESSBOOK" ); 323 "X-ManagersName", "KADDRESSBOOK" );
324 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, 324 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal,
325 "X-SpousesName", "KADDRESSBOOK" ); 325 "X-SpousesName", "KADDRESSBOOK" );
326 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, 326 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal,
327 "X-Office", "KADDRESSBOOK" ); 327 "X-Office", "KADDRESSBOOK" );
328 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, 328 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal,
329 "X-IMAddress", "KADDRESSBOOK" ); 329 "X-IMAddress", "KADDRESSBOOK" );
330 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, 330 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal,
331 "X-Anniversary", "KADDRESSBOOK" ); 331 "X-Anniversary", "KADDRESSBOOK" );
332 332
333 //US added this field to become compatible with Opie/qtopia addressbook 333 //US added this field to become compatible with Opie/qtopia addressbook
334 // values can be "female" or "male" or "". An empty field represents undefined. 334 // values can be "female" or "male" or "". An empty field represents undefined.
335 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, 335 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal,
336 "X-Gender", "KADDRESSBOOK" ); 336 "X-Gender", "KADDRESSBOOK" );
337 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, 337 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal,
338 "X-Children", "KADDRESSBOOK" ); 338 "X-Children", "KADDRESSBOOK" );
339 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, 339 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal,
340 "X-FreeBusyUrl", "KADDRESSBOOK" ); 340 "X-FreeBusyUrl", "KADDRESSBOOK" );
341#endif 341#endif
342 initGUI(); 342 initGUI();
343 343
344 mIncSearchWidget->setFocus(); 344 mIncSearchWidget->setFocus();
345 345
346 346
347 connect( mViewManager, SIGNAL( selected( const QString& ) ), 347 connect( mViewManager, SIGNAL( selected( const QString& ) ),
348 SLOT( setContactSelected( const QString& ) ) ); 348 SLOT( setContactSelected( const QString& ) ) );
349 connect( mViewManager, SIGNAL( executed( const QString& ) ), 349 connect( mViewManager, SIGNAL( executed( const QString& ) ),
350 SLOT( executeContact( const QString& ) ) ); 350 SLOT( executeContact( const QString& ) ) );
351 351
352 connect( mViewManager, SIGNAL( deleteRequest( ) ), 352 connect( mViewManager, SIGNAL( deleteRequest( ) ),
353 SLOT( deleteContacts( ) ) ); 353 SLOT( deleteContacts( ) ) );
354 connect( mViewManager, SIGNAL( modified() ), 354 connect( mViewManager, SIGNAL( modified() ),
355 SLOT( setModified() ) ); 355 SLOT( setModified() ) );
356 356
357 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); 357 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) );
358 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); 358 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) );
359 359
360 connect( mXXPortManager, SIGNAL( modified() ), 360 connect( mXXPortManager, SIGNAL( modified() ),
361 SLOT( setModified() ) ); 361 SLOT( setModified() ) );
362 362
363 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), 363 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
364 SLOT( incrementalSearch( const QString& ) ) ); 364 SLOT( incrementalSearch( const QString& ) ) );
365 connect( mIncSearchWidget, SIGNAL( fieldChanged() ), 365 connect( mIncSearchWidget, SIGNAL( fieldChanged() ),
366 mJumpButtonBar, SLOT( recreateButtons() ) ); 366 mJumpButtonBar, SLOT( recreateButtons() ) );
367 367
368 connect( mDetails, SIGNAL( sendEmail( const QString& ) ), 368 connect( mDetails, SIGNAL( sendEmail( const QString& ) ),
369 SLOT( sendMail( const QString& ) ) ); 369 SLOT( sendMail( const QString& ) ) );
370 370
371 371
372 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); 372 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&)));
373 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&))); 373 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)));
374 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); 374 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&)));
375 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); 375 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
376 376
377 377
378#ifndef KAB_EMBEDDED 378#ifndef KAB_EMBEDDED
379 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), 379 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
380 mXXPortManager, SLOT( importVCard( const KURL& ) ) ); 380 mXXPortManager, SLOT( importVCard( const KURL& ) ) );
381 381
382 connect( mDetails, SIGNAL( browse( const QString& ) ), 382 connect( mDetails, SIGNAL( browse( const QString& ) ),
383 SLOT( browse( const QString& ) ) ); 383 SLOT( browse( const QString& ) ) );
384 384
385 385
386 mAddressBookService = new KAddressBookService( this ); 386 mAddressBookService = new KAddressBookService( this );
387 387
388#endif //KAB_EMBEDDED 388#endif //KAB_EMBEDDED
389 389
390 mMessageTimer = new QTimer( this ); 390 mMessageTimer = new QTimer( this );
391 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); 391 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
392 mEditorDialog = 0; 392 mEditorDialog = 0;
393 createAddresseeEditorDialog( this ); 393 createAddresseeEditorDialog( this );
394 setModified( false ); 394 setModified( false );
395 mBRdisabled = false; 395 mBRdisabled = false;
396#ifndef DESKTOP_VERSION 396#ifndef DESKTOP_VERSION
397 infrared = 0; 397 infrared = 0;
398#endif 398#endif
399 //toggleBeamReceive( ); 399 //toggleBeamReceive( );
400 //mMainWindow->toolBar()->show(); 400 //mMainWindow->toolBar()->show();
401 // we have a toolbar repainting error on the Zaurus when starting KA/Pi 401 // we have a toolbar repainting error on the Zaurus when starting KA/Pi
402 QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 402 QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
403} 403}
404 404
405void KABCore::updateToolBar() 405void KABCore::updateToolBar()
406{ 406{
407 static int iii = 0; 407 static int iii = 0;
408 ++iii; 408 ++iii;
409 mMainWindow->toolBar()->repaintMe(); 409 mMainWindow->toolBar()->repaintMe();
410 if ( iii < 4 ) 410 if ( iii < 4 )
411 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); 411 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar()));
412} 412}
413KABCore::~KABCore() 413KABCore::~KABCore()
414{ 414{
415 // save(); 415 // save();
416 //saveSettings(); 416 //saveSettings();
417 //KABPrefs::instance()->writeConfig(); 417 //KABPrefs::instance()->writeConfig();
418 delete AddresseeConfig::instance(); 418 delete AddresseeConfig::instance();
419 mAddressBook = 0; 419 mAddressBook = 0;
420 KABC::StdAddressBook::close(); 420 KABC::StdAddressBook::close();
421 421
422 delete syncManager; 422 delete syncManager;
423#ifndef DESKTOP_VERSION 423#ifndef DESKTOP_VERSION
424 if ( infrared ) 424 if ( infrared )
425 delete infrared; 425 delete infrared;
426#endif 426#endif
427} 427}
428void KABCore::receive( const QCString& cmsg, const QByteArray& data ) 428void KABCore::receive( const QCString& cmsg, const QByteArray& data )
429{ 429{
430 //qDebug("KA: QCOP message received: %s ", cmsg.data() ); 430 //qDebug("KA: QCOP message received: %s ", cmsg.data() );
431 if ( cmsg == "setDocument(QString)" ) { 431 if ( cmsg == "setDocument(QString)" ) {
432 QDataStream stream( data, IO_ReadOnly ); 432 QDataStream stream( data, IO_ReadOnly );
433 QString fileName; 433 QString fileName;
434 stream >> fileName; 434 stream >> fileName;
435 recieve( fileName ); 435 recieve( fileName );
436 return; 436 return;
437 } 437 }
438} 438}
439void KABCore::toggleBeamReceive( ) 439void KABCore::toggleBeamReceive( )
440{ 440{
441 if ( mBRdisabled ) 441 if ( mBRdisabled )
442 return; 442 return;
443#ifndef DESKTOP_VERSION 443#ifndef DESKTOP_VERSION
444 if ( infrared ) { 444 if ( infrared ) {
445 qDebug("KA: AB disable BeamReceive "); 445 qDebug("KA: AB disable BeamReceive ");
446 delete infrared; 446 delete infrared;
447 infrared = 0; 447 infrared = 0;
448 mActionBR->setChecked(false); 448 mActionBR->setChecked(false);
449 return; 449 return;
450 } 450 }
451 qDebug("KA: AB enable BeamReceive "); 451 qDebug("KA: AB enable BeamReceive ");
452 mActionBR->setChecked(true); 452 mActionBR->setChecked(true);
453 453
454 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; 454 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ;
455 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); 455 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& )));
456#endif 456#endif
457} 457}
458 458
459 459
460void KABCore::disableBR(bool b) 460void KABCore::disableBR(bool b)
461{ 461{
462#ifndef DESKTOP_VERSION 462#ifndef DESKTOP_VERSION
463 if ( b ) { 463 if ( b ) {
464 if ( infrared ) { 464 if ( infrared ) {
465 toggleBeamReceive( ); 465 toggleBeamReceive( );
466 } 466 }
467 mBRdisabled = true; 467 mBRdisabled = true;
468 } else { 468 } else {
469 if ( mBRdisabled ) { 469 if ( mBRdisabled ) {
470 mBRdisabled = false; 470 mBRdisabled = false;
471 //toggleBeamReceive( ); 471 //toggleBeamReceive( );
472 } 472 }
473 } 473 }
474#endif 474#endif
475 475
476} 476}
477void KABCore::recieve( QString fn ) 477void KABCore::recieve( QString fn )
478{ 478{
479 //qDebug("KABCore::recieve "); 479 //qDebug("KABCore::recieve ");
480 int count = mAddressBook->importFromFile( fn, true ); 480 int count = mAddressBook->importFromFile( fn, true );
481 if ( count ) 481 if ( count )
482 setModified( true ); 482 setModified( true );
483 mViewManager->refreshView(); 483 mViewManager->refreshView();
484 message(i18n("%1 contact(s) received!").arg( count )); 484 message(i18n("%1 contact(s) received!").arg( count ));
485 topLevelWidget()->showMaximized(); 485 topLevelWidget()->showMaximized();
486 topLevelWidget()->raise(); 486 topLevelWidget()->raise();
487} 487}
488void KABCore::restoreSettings() 488void KABCore::restoreSettings()
489{ 489{
490 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; 490 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce;
491 491
492 bool state; 492 bool state;
493 493
494 if (mMultipleViewsAtOnce) 494 if (mMultipleViewsAtOnce)
495 state = KABPrefs::instance()->mDetailsPageVisible; 495 state = KABPrefs::instance()->mDetailsPageVisible;
496 else 496 else
497 state = false; 497 state = false;
498 498
499 mActionDetails->setChecked( state ); 499 mActionDetails->setChecked( state );
500 setDetailsVisible( state ); 500 setDetailsVisible( state );
501 501
502 state = KABPrefs::instance()->mJumpButtonBarVisible; 502 state = KABPrefs::instance()->mJumpButtonBarVisible;
503 503
504 mActionJumpBar->setChecked( state ); 504 mActionJumpBar->setChecked( state );
505 setJumpButtonBarVisible( state ); 505 setJumpButtonBarVisible( state );
506/*US 506/*US
507 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; 507 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter;
508 if ( splitterSize.count() == 0 ) { 508 if ( splitterSize.count() == 0 ) {
509 splitterSize.append( width() / 2 ); 509 splitterSize.append( width() / 2 );
510 splitterSize.append( width() / 2 ); 510 splitterSize.append( width() / 2 );
511 } 511 }
512 mMiniSplitter->setSizes( splitterSize ); 512 mMiniSplitter->setSizes( splitterSize );
513 if ( mExtensionBarSplitter ) { 513 if ( mExtensionBarSplitter ) {
514 splitterSize = KABPrefs::instance()->mExtensionsSplitter; 514 splitterSize = KABPrefs::instance()->mExtensionsSplitter;
515 if ( splitterSize.count() == 0 ) { 515 if ( splitterSize.count() == 0 ) {
516 splitterSize.append( width() / 2 ); 516 splitterSize.append( width() / 2 );
517 splitterSize.append( width() / 2 ); 517 splitterSize.append( width() / 2 );
518 } 518 }
519 mExtensionBarSplitter->setSizes( splitterSize ); 519 mExtensionBarSplitter->setSizes( splitterSize );
520 520
521 } 521 }
522*/ 522*/
523 mViewManager->restoreSettings(); 523 mViewManager->restoreSettings();
524 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField ); 524 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField );
525 mExtensionManager->restoreSettings(); 525 mExtensionManager->restoreSettings();
526#ifdef DESKTOP_VERSION 526#ifdef DESKTOP_VERSION
527 int wid = width(); 527 int wid = width();
528 if ( wid < 10 ) 528 if ( wid < 10 )
529 wid = 400; 529 wid = 400;
530#else 530#else
531 int wid = QApplication::desktop()->width(); 531 int wid = QApplication::desktop()->width();
532 if ( wid < 640 ) 532 if ( wid < 640 )
533 wid = QApplication::desktop()->height(); 533 wid = QApplication::desktop()->height();
534#endif 534#endif
535 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; 535 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
536 if ( true /*splitterSize.count() == 0*/ ) { 536 if ( true /*splitterSize.count() == 0*/ ) {
537 splitterSize.append( wid / 2 ); 537 splitterSize.append( wid / 2 );
538 splitterSize.append( wid / 2 ); 538 splitterSize.append( wid / 2 );
539 } 539 }
540 mMiniSplitter->setSizes( splitterSize ); 540 mMiniSplitter->setSizes( splitterSize );
541 if ( mExtensionBarSplitter ) { 541 if ( mExtensionBarSplitter ) {
542 //splitterSize = KABPrefs::instance()->mExtensionsSplitter; 542 //splitterSize = KABPrefs::instance()->mExtensionsSplitter;
543 if ( true /*splitterSize.count() == 0*/ ) { 543 if ( true /*splitterSize.count() == 0*/ ) {
544 splitterSize.append( wid / 2 ); 544 splitterSize.append( wid / 2 );
545 splitterSize.append( wid / 2 ); 545 splitterSize.append( wid / 2 );
546 } 546 }
547 mExtensionBarSplitter->setSizes( splitterSize ); 547 mExtensionBarSplitter->setSizes( splitterSize );
548 548
549 } 549 }
550 550
551 551
552} 552}
553 553
554void KABCore::saveSettings() 554void KABCore::saveSettings()
555{ 555{
556 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); 556 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked();
557 if ( mExtensionBarSplitter ) 557 if ( mExtensionBarSplitter )
558 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 558 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
559 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); 559 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked();
560 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); 560 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes();
561#ifndef KAB_EMBEDDED 561#ifndef KAB_EMBEDDED
562 562
563 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 563 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
564 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); 564 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes();
565#endif //KAB_EMBEDDED 565#endif //KAB_EMBEDDED
566 mExtensionManager->saveSettings(); 566 mExtensionManager->saveSettings();
567 mViewManager->saveSettings(); 567 mViewManager->saveSettings();
568 568
569 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); 569 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem();
570 KABPrefs::instance()->writeConfig(); 570 KABPrefs::instance()->writeConfig();
571 qDebug("KA: KABCore::saveSettings() "); 571 qDebug("KA: KABCore::saveSettings() ");
572} 572}
573 573
574KABC::AddressBook *KABCore::addressBook() const 574KABC::AddressBook *KABCore::addressBook() const
575{ 575{
576 return mAddressBook; 576 return mAddressBook;
577} 577}
578 578
579KConfig *KABCore::config() 579KConfig *KABCore::config()
580{ 580{
581#ifndef KAB_EMBEDDED 581#ifndef KAB_EMBEDDED
582 return KABPrefs::instance()->config(); 582 return KABPrefs::instance()->config();
583#else //KAB_EMBEDDED 583#else //KAB_EMBEDDED
584 return KABPrefs::instance()->getConfig(); 584 return KABPrefs::instance()->getConfig();
585#endif //KAB_EMBEDDED 585#endif //KAB_EMBEDDED
586} 586}
587 587
588KActionCollection *KABCore::actionCollection() const 588KActionCollection *KABCore::actionCollection() const
589{ 589{
590 return mGUIClient->actionCollection(); 590 return mGUIClient->actionCollection();
591} 591}
592 592
593KABC::Field *KABCore::currentSearchField() const 593KABC::Field *KABCore::currentSearchField() const
594{ 594{
595 if (mIncSearchWidget) 595 if (mIncSearchWidget)
596 return mIncSearchWidget->currentField(); 596 return mIncSearchWidget->currentField();
597 else 597 else
598 return 0; 598 return 0;
599} 599}
600 600
601QStringList KABCore::selectedUIDs() const 601QStringList KABCore::selectedUIDs() const
602{ 602{
603 return mViewManager->selectedUids(); 603 return mViewManager->selectedUids();
604} 604}
605 605
606KABC::Resource *KABCore::requestResource( QWidget *parent ) 606KABC::Resource *KABCore::requestResource( QWidget *parent )
607{ 607{
608 QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); 608 QPtrList<KABC::Resource> kabcResources = addressBook()->resources();
609 609
610 QPtrList<KRES::Resource> kresResources; 610 QPtrList<KRES::Resource> kresResources;
611 QPtrListIterator<KABC::Resource> resIt( kabcResources ); 611 QPtrListIterator<KABC::Resource> resIt( kabcResources );
612 KABC::Resource *resource; 612 KABC::Resource *resource;
613 while ( ( resource = resIt.current() ) != 0 ) { 613 while ( ( resource = resIt.current() ) != 0 ) {
614 ++resIt; 614 ++resIt;
615 if ( !resource->readOnly() ) { 615 if ( !resource->readOnly() ) {
616 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 616 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
617 if ( res ) 617 if ( res )
618 kresResources.append( res ); 618 kresResources.append( res );
619 } 619 }
620 } 620 }
621 621
622 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent ); 622 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent );
623 return static_cast<KABC::Resource*>( res ); 623 return static_cast<KABC::Resource*>( res );
624} 624}
625 625
626#ifndef KAB_EMBEDDED 626#ifndef KAB_EMBEDDED
627KAboutData *KABCore::createAboutData() 627KAboutData *KABCore::createAboutData()
628#else //KAB_EMBEDDED 628#else //KAB_EMBEDDED
629void KABCore::createAboutData() 629void KABCore::createAboutData()
630#endif //KAB_EMBEDDED 630#endif //KAB_EMBEDDED
631{ 631{
632#ifndef KAB_EMBEDDED 632#ifndef KAB_EMBEDDED
633 KAboutData *about = new KAboutData( "kaddressbook", I18N_NOOP( "KAddressBook" ), 633 KAboutData *about = new KAboutData( "kaddressbook", I18N_NOOP( "KAddressBook" ),
634 "3.1", I18N_NOOP( "The KDE Address Book" ), 634 "3.1", I18N_NOOP( "The KDE Address Book" ),
635 KAboutData::License_GPL_V2, 635 KAboutData::License_GPL_V2,
636 I18N_NOOP( "(c) 1997-2003, The KDE PIM Team" ) ); 636 I18N_NOOP( "(c) 1997-2003, The KDE PIM Team" ) );
637 about->addAuthor( "Tobias Koenig", I18N_NOOP( "Current maintainer " ), "tokoe@kde.org" ); 637 about->addAuthor( "Tobias Koenig", I18N_NOOP( "Current maintainer " ), "tokoe@kde.org" );
638 about->addAuthor( "Don Sanders", I18N_NOOP( "Original author " ) ); 638 about->addAuthor( "Don Sanders", I18N_NOOP( "Original author " ) );
639 about->addAuthor( "Cornelius Schumacher", 639 about->addAuthor( "Cornelius Schumacher",
640 I18N_NOOP( "Co-maintainer, libkabc port, CSV import/export " ), 640 I18N_NOOP( "Co-maintainer, libkabc port, CSV import/export " ),
641 "schumacher@kde.org" ); 641 "schumacher@kde.org" );
642 about->addAuthor( "Mike Pilone", I18N_NOOP( "GUI and framework redesign " ), 642 about->addAuthor( "Mike Pilone", I18N_NOOP( "GUI and framework redesign " ),
643 "mpilone@slac.com" ); 643 "mpilone@slac.com" );
644 about->addAuthor( "Greg Stern", I18N_NOOP( "DCOP interface" ) ); 644 about->addAuthor( "Greg Stern", I18N_NOOP( "DCOP interface" ) );
645 about->addAuthor( "Mark Westcott", I18N_NOOP( "Contact pinning" ) ); 645 about->addAuthor( "Mark Westcott", I18N_NOOP( "Contact pinning" ) );
646 about->addAuthor( "Michel Boyer de la Giroday", I18N_NOOP( "LDAP Lookup\n" ), 646 about->addAuthor( "Michel Boyer de la Giroday", I18N_NOOP( "LDAP Lookup\n" ),
647 "michel@klaralvdalens-datakonsult.se" ); 647 "michel@klaralvdalens-datakonsult.se" );
648 about->addAuthor( "Steffen Hansen", I18N_NOOP( "LDAP Lookup " ), 648 about->addAuthor( "Steffen Hansen", I18N_NOOP( "LDAP Lookup " ),
649 "hansen@kde.org" ); 649 "hansen@kde.org" );
650 650
651 return about; 651 return about;
652#endif //KAB_EMBEDDED 652#endif //KAB_EMBEDDED
653 653
654 QString version; 654 QString version;
655#include <../version> 655#include <../version>
656 QMessageBox::about( this, "About KAddressbook/Pi", 656 QMessageBox::about( this, "About KAddressbook/Pi",
657 "KAddressbook/Platform-independent\n" 657 "KAddressbook/Platform-independent\n"
658 "(KA/Pi) " +version + " - " + 658 "(KA/Pi) " +version + " - " +
659#ifdef DESKTOP_VERSION 659#ifdef DESKTOP_VERSION
660 "Desktop Edition\n" 660 "Desktop Edition\n"
661#else 661#else
662 "PDA-Edition\n" 662 "PDA-Edition\n"
663 "for: Zaurus 5500 / 7x0 / 8x0\n" 663 "for: Zaurus 5500 / 7x0 / 8x0\n"
664#endif 664#endif
665 665
666 "(c) 2004 Ulf Schenk\n" 666 "(c) 2004 Ulf Schenk\n"
667 "(c) 2004 Lutz Rogowski\n" 667 "(c) 2004 Lutz Rogowski\n"
668 "(c) 1997-2003, The KDE PIM Team\n" 668 "(c) 1997-2003, The KDE PIM Team\n"
669 "Tobias Koenig Current maintainer\ntokoe@kde.org\n" 669 "Tobias Koenig Current maintainer\ntokoe@kde.org\n"
670 "Don Sanders Original author\n" 670 "Don Sanders Original author\n"
671 "Cornelius Schumacher Co-maintainer\nschumacher@kde.org\n" 671 "Cornelius Schumacher Co-maintainer\nschumacher@kde.org\n"
672 "Mike Pilone GUI and framework redesign\nmpilone@slac.com\n" 672 "Mike Pilone GUI and framework redesign\nmpilone@slac.com\n"
673 "Greg Stern DCOP interface\n" 673 "Greg Stern DCOP interface\n"
674 "Mark Westcot Contact pinning\n" 674 "Mark Westcot Contact pinning\n"
675 "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n" 675 "Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n"
676 "Steffen Hansen LDAP Lookup\nhansen@kde.org\n" 676 "Steffen Hansen LDAP Lookup\nhansen@kde.org\n"
677#ifdef _WIN32_ 677#ifdef _WIN32_
678 "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n" 678 "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n"
679#endif 679#endif
680 ); 680 );
681} 681}
682 682
683void KABCore::setContactSelected( const QString &uid ) 683void KABCore::setContactSelected( const QString &uid )
684{ 684{
685 KABC::Addressee addr = mAddressBook->findByUid( uid ); 685 KABC::Addressee addr = mAddressBook->findByUid( uid );
686 if ( !mDetails->isHidden() ) 686 if ( !mDetails->isHidden() )
687 mDetails->setAddressee( addr ); 687 mDetails->setAddressee( addr );
688 688
689 if ( !addr.isEmpty() ) { 689 if ( !addr.isEmpty() ) {
690 emit contactSelected( addr.formattedName() ); 690 emit contactSelected( addr.formattedName() );
691 KABC::Picture pic = addr.photo(); 691 KABC::Picture pic = addr.photo();
692 if ( pic.isIntern() ) { 692 if ( pic.isIntern() ) {
693//US emit contactSelected( pic.data() ); 693//US emit contactSelected( pic.data() );
694//US instead use: 694//US instead use:
695 QPixmap px; 695 QPixmap px;
696 if (pic.data().isNull() != true) 696 if (pic.data().isNull() != true)
697 { 697 {
698 px.convertFromImage(pic.data()); 698 px.convertFromImage(pic.data());
699 } 699 }
700 700
701 emit contactSelected( px ); 701 emit contactSelected( px );
702 } 702 }
703 } 703 }
704 704
705 705
706 mExtensionManager->setSelectionChanged(); 706 mExtensionManager->setSelectionChanged();
707 707
708 // update the actions 708 // update the actions
709 bool selected = !uid.isEmpty(); 709 bool selected = !uid.isEmpty();
710 710
711 if ( mReadWrite ) { 711 if ( mReadWrite ) {
712 mActionCut->setEnabled( selected ); 712 mActionCut->setEnabled( selected );
713 mActionPaste->setEnabled( selected ); 713 mActionPaste->setEnabled( selected );
714 } 714 }
715 715
716 mActionCopy->setEnabled( selected ); 716 mActionCopy->setEnabled( selected );
717 mActionDelete->setEnabled( selected ); 717 mActionDelete->setEnabled( selected );
718 mActionEditAddressee->setEnabled( selected ); 718 mActionEditAddressee->setEnabled( selected );
719 mActionMail->setEnabled( selected ); 719 mActionMail->setEnabled( selected );
720 mActionMailVCard->setEnabled( selected ); 720 mActionMailVCard->setEnabled( selected );
721 //if (mActionBeam) 721 //if (mActionBeam)
722 //mActionBeam->setEnabled( selected ); 722 //mActionBeam->setEnabled( selected );
723 mActionWhoAmI->setEnabled( selected ); 723 mActionWhoAmI->setEnabled( selected );
724} 724}
725 725
726void KABCore::sendMail() 726void KABCore::sendMail()
727{ 727{
728 sendMail( mViewManager->selectedEmails().join( ", " ) ); 728 sendMail( mViewManager->selectedEmails().join( ", " ) );
729} 729}
730 730
731void KABCore::sendMail( const QString& emaillist ) 731void KABCore::sendMail( const QString& emaillist )
732{ 732{
733 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " 733 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... "
734 if (emaillist.contains(",") > 0) 734 if (emaillist.contains(",") > 0)
735 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); 735 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null );
736 else 736 else
737 ExternalAppHandler::instance()->mailToOneContact( emaillist ); 737 ExternalAppHandler::instance()->mailToOneContact( emaillist );
738} 738}
739 739
740 740
741 741
742void KABCore::mailVCard() 742void KABCore::mailVCard()
743{ 743{
744 QStringList uids = mViewManager->selectedUids(); 744 QStringList uids = mViewManager->selectedUids();
745 if ( !uids.isEmpty() ) 745 if ( !uids.isEmpty() )
746 mailVCard( uids ); 746 mailVCard( uids );
747} 747}
748 748
749void KABCore::mailVCard( const QStringList& uids ) 749void KABCore::mailVCard( const QStringList& uids )
750{ 750{
751 QStringList urls; 751 QStringList urls;
752 752
753// QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); 753// QString tmpdir = locateLocal("tmp", KGlobal::getAppName());
754 754
755 QString dirName = "/tmp/" + KApplication::randomString( 8 ); 755 QString dirName = "/tmp/" + KApplication::randomString( 8 );
756 756
757 757
758 758
759 QDir().mkdir( dirName, true ); 759 QDir().mkdir( dirName, true );
760 760
761 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 761 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
762 KABC::Addressee a = mAddressBook->findByUid( *it ); 762 KABC::Addressee a = mAddressBook->findByUid( *it );
763 763
764 if ( a.isEmpty() ) 764 if ( a.isEmpty() )
765 continue; 765 continue;
766 766
767 QString name = a.givenName() + "_" + a.familyName() + ".vcf"; 767 QString name = a.givenName() + "_" + a.familyName() + ".vcf";
768 768
769 QString fileName = dirName + "/" + name; 769 QString fileName = dirName + "/" + name;
770 770
771 QFile outFile(fileName); 771 QFile outFile(fileName);
772 772
773 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully 773 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully
774 KABC::VCardConverter converter; 774 KABC::VCardConverter converter;
775 QString vcard; 775 QString vcard;
776 776
777 converter.addresseeToVCard( a, vcard ); 777 converter.addresseeToVCard( a, vcard );
778 778
779 QTextStream t( &outFile ); // use a text stream 779 QTextStream t( &outFile ); // use a text stream
780 t.setEncoding( QTextStream::UnicodeUTF8 ); 780 t.setEncoding( QTextStream::UnicodeUTF8 );
781 t << vcard; 781 t << vcard;
782 782
783 outFile.close(); 783 outFile.close();
784 784
785 urls.append( fileName ); 785 urls.append( fileName );
786 } 786 }
787 } 787 }
788 788
789 bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") ); 789 bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") );
790 790
791 791
792/*US 792/*US
793 kapp->invokeMailer( QString::null, QString::null, QString::null, 793 kapp->invokeMailer( QString::null, QString::null, QString::null,
794 QString::null, // subject 794 QString::null, // subject
795 QString::null, // body 795 QString::null, // body
796 QString::null, 796 QString::null,
797 urls ); // attachments 797 urls ); // attachments
798*/ 798*/
799 799
800} 800}
801 801
802/** 802/**
803 Beams the "WhoAmI contact. 803 Beams the "WhoAmI contact.
804*/ 804*/
805void KABCore::beamMySelf() 805void KABCore::beamMySelf()
806{ 806{
807 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); 807 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI();
808 if (!a.isEmpty()) 808 if (!a.isEmpty())
809 { 809 {
810 QStringList uids; 810 QStringList uids;
811 uids << a.uid(); 811 uids << a.uid();
812 812
813 beamVCard(uids); 813 beamVCard(uids);
814 } else { 814 } else {
815 KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) ); 815 KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) );
816 816
817 817
818 } 818 }
819} 819}
820void KABCore::updateMainWindow() 820void KABCore::updateMainWindow()
821{ 821{
822 822
823 mMainWindow->showMaximized(); 823 mMainWindow->showMaximized();
824 mMainWindow->update(); 824 mMainWindow->update();
825} 825}
826void KABCore::resizeEvent(QResizeEvent* e ) 826void KABCore::resizeEvent(QResizeEvent* e )
827{ 827{
828 if ( !mMiniSplitter ) 828 if ( !mMiniSplitter )
829 return; 829 return;
830 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); 830 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) ");
831 if ( QApplication::desktop()->width() >= 480 ) { 831 if ( QApplication::desktop()->width() >= 480 ) {
832 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 832 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480
833 if ( mMiniSplitter->orientation() == Qt::Vertical ) { 833 if ( mMiniSplitter->orientation() == Qt::Vertical ) {
834 mMiniSplitter->setOrientation( Qt::Horizontal); 834 mMiniSplitter->setOrientation( Qt::Horizontal);
835 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 835 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
836 if ( QApplication::desktop()->width() <= 640 ) { 836 if ( QApplication::desktop()->width() <= 640 ) {
837 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 837 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
838 mViewManager->getFilterAction()->setComboWidth( 150 ); 838 mViewManager->getFilterAction()->setComboWidth( 150 );
839 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 839 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
840 } 840 }
841 } 841 }
842 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 842 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640
843 if ( mMiniSplitter->orientation() == Qt::Horizontal ) { 843 if ( mMiniSplitter->orientation() == Qt::Horizontal ) {
844 mMiniSplitter->setOrientation( Qt::Vertical ); 844 mMiniSplitter->setOrientation( Qt::Vertical );
845 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 845 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
846 if ( QApplication::desktop()->width() <= 640 ) { 846 if ( QApplication::desktop()->width() <= 640 ) {
847 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 847 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
848 mMainWindow->showMinimized(); 848 mMainWindow->showMinimized();
849 mViewManager->getFilterAction()->setComboWidth( 0 ); 849 mViewManager->getFilterAction()->setComboWidth( 0 );
850 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 850 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
851 } 851 }
852 } 852 }
853 } 853 }
854 } 854 }
855 855
856} 856}
857void KABCore::export2phone() 857void KABCore::export2phone()
858{ 858{
859 859
860 QStringList uids; 860 QStringList uids;
861 XXPortSelectDialog dlg( this, false, this ); 861 XXPortSelectDialog dlg( this, false, this );
862 if ( dlg.exec() ) 862 if ( dlg.exec() )
863 uids = dlg.uids(); 863 uids = dlg.uids();
864 else 864 else
865 return; 865 return;
866 if ( uids.isEmpty() ) 866 if ( uids.isEmpty() )
867 return; 867 return;
868 // qDebug("count %d ", uids.count()); 868 // qDebug("count %d ", uids.count());
869 869
870 KAex2phonePrefs ex2phone; 870 KAex2phonePrefs ex2phone;
871 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 871 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
872 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 872 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
873 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 873 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
874 874
875 if ( !ex2phone.exec() ) { 875 if ( !ex2phone.exec() ) {
876 return; 876 return;
877 } 877 }
878 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 878 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
879 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 879 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
880 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 880 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
881 881
882 882
883 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 883 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
884 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 884 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
885 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 885 KPimGlobalPrefs::instance()->mEx2PhoneModel );
886 886
887 QString fileName = getPhoneFile(); 887 QString fileName = getPhoneFile();
888 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) 888 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) )
889 return; 889 return;
890 890
891 message(i18n("Exporting to phone...")); 891 message(i18n("Exporting to phone..."));
892 QTimer::singleShot( 1, this , SLOT ( writeToPhone())); 892 QTimer::singleShot( 1, this , SLOT ( writeToPhone()));
893 893
894} 894}
895QString KABCore::getPhoneFile() 895QString KABCore::getPhoneFile()
896{ 896{
897#ifdef DESKTOP_VERSION 897#ifdef DESKTOP_VERSION
898 return locateLocal("tmp", "phonefile.vcf"); 898 return locateLocal("tmp", "phonefile.vcf");
899#else 899#else
900 return "/tmp/phonefile.vcf"; 900 return "/tmp/phonefile.vcf";
901#endif 901#endif
902 902
903} 903}
904void KABCore::writeToPhone( ) 904void KABCore::writeToPhone( )
905{ 905{
906 if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) 906 if ( PhoneAccess::writeToPhone( getPhoneFile() ) )
907 message(i18n("Export to phone finished!")); 907 message(i18n("Export to phone finished!"));
908 else 908 else
909 qDebug(i18n("KA: Error exporting to phone")); 909 qDebug(i18n("KA: Error exporting to phone"));
910} 910}
911void KABCore::beamVCard() 911void KABCore::beamVCard()
912{ 912{
913 QStringList uids; 913 QStringList uids;
914 XXPortSelectDialog dlg( this, false, this ); 914 XXPortSelectDialog dlg( this, false, this );
915 if ( dlg.exec() ) 915 if ( dlg.exec() )
916 uids = dlg.uids(); 916 uids = dlg.uids();
917 else 917 else
918 return; 918 return;
919 if ( uids.isEmpty() ) 919 if ( uids.isEmpty() )
920 return; 920 return;
921 beamVCard( uids ); 921 beamVCard( uids );
922} 922}
923 923
924 924
925void KABCore::beamVCard(const QStringList& uids) 925void KABCore::beamVCard(const QStringList& uids)
926{ 926{
927 927
928 // LR: we should use the /tmp dir on the Zaurus, 928 // LR: we should use the /tmp dir on the Zaurus,
929 // because: /tmp = RAM, (HOME)/kdepim = flash memory 929 // because: /tmp = RAM, (HOME)/kdepim = flash memory
930 930
931#ifdef DESKTOP_VERSION 931#ifdef DESKTOP_VERSION
932 QString fileName = locateLocal("tmp", "kapibeamfile.vcf"); 932 QString fileName = locateLocal("tmp", "kapibeamfile.vcf");
933#else 933#else
934 QString fileName = "/tmp/kapibeamfile.vcf"; 934 QString fileName = "/tmp/kapibeamfile.vcf";
935#endif 935#endif
936 936
937 KABC::VCardConverter converter; 937 KABC::VCardConverter converter;
938 QString description; 938 QString description;
939 QString datastream; 939 QString datastream;
940 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 940 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
941 KABC::Addressee a = mAddressBook->findByUid( *it ); 941 KABC::Addressee a = mAddressBook->findByUid( *it );
942 942
943 if ( a.isEmpty() ) 943 if ( a.isEmpty() )
944 continue; 944 continue;
945 945
946 if (description.isEmpty()) 946 if (description.isEmpty())
947 description = a.formattedName(); 947 description = a.formattedName();
948 948
949 QString vcard; 949 QString vcard;
950 converter.addresseeToVCard( a, vcard ); 950 converter.addresseeToVCard( a, vcard );
951 int start = 0; 951 int start = 0;
952 int next; 952 int next;
953 while ( (next = vcard.find("TYPE=", start) )>= 0 ) { 953 while ( (next = vcard.find("TYPE=", start) )>= 0 ) {
954 int semi = vcard.find(";", next); 954 int semi = vcard.find(";", next);
955 int dopp = vcard.find(":", next); 955 int dopp = vcard.find(":", next);
956 int sep; 956 int sep;
957 if ( semi < dopp && semi >= 0 ) 957 if ( semi < dopp && semi >= 0 )
958 sep = semi ; 958 sep = semi ;
959 else 959 else
960 sep = dopp; 960 sep = dopp;
961 datastream +=vcard.mid( start, next - start); 961 datastream +=vcard.mid( start, next - start);
962 datastream +=vcard.mid( next+5,sep -next -5 ).upper(); 962 datastream +=vcard.mid( next+5,sep -next -5 ).upper();
963 start = sep; 963 start = sep;
964 } 964 }
965 datastream += vcard.mid( start,vcard.length() ); 965 datastream += vcard.mid( start,vcard.length() );
966 } 966 }
967#ifndef DESKTOP_VERSION 967#ifndef DESKTOP_VERSION
968 QFile outFile(fileName); 968 QFile outFile(fileName);
969 if ( outFile.open(IO_WriteOnly) ) { 969 if ( outFile.open(IO_WriteOnly) ) {
970 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 970 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
971 QTextStream t( &outFile ); // use a text stream 971 QTextStream t( &outFile ); // use a text stream
972 //t.setEncoding( QTextStream::UnicodeUTF8 ); 972 //t.setEncoding( QTextStream::UnicodeUTF8 );
973 t.setEncoding( QTextStream::Latin1 ); 973 t.setEncoding( QTextStream::Latin1 );
974 t <<datastream.latin1(); 974 t <<datastream.latin1();
975 outFile.close(); 975 outFile.close();
976 Ir *ir = new Ir( this ); 976 Ir *ir = new Ir( this );
977 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 977 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
978 ir->send( fileName, description, "text/x-vCard" ); 978 ir->send( fileName, description, "text/x-vCard" );
979 } else { 979 } else {
980 qDebug("KA: Error open temp beam file "); 980 qDebug("KA: Error open temp beam file ");
981 return; 981 return;
982 } 982 }
983#endif 983#endif
984 984
985} 985}
986 986
987void KABCore::beamDone( Ir *ir ) 987void KABCore::beamDone( Ir *ir )
988{ 988{
989#ifndef DESKTOP_VERSION 989#ifndef DESKTOP_VERSION
990 delete ir; 990 delete ir;
991#endif 991#endif
992 topLevelWidget()->raise(); 992 topLevelWidget()->raise();
993 message( i18n("Beaming finished!") ); 993 message( i18n("Beaming finished!") );
994} 994}
995 995
996 996
997void KABCore::browse( const QString& url ) 997void KABCore::browse( const QString& url )
998{ 998{
999#ifndef KAB_EMBEDDED 999#ifndef KAB_EMBEDDED
1000 kapp->invokeBrowser( url ); 1000 kapp->invokeBrowser( url );
1001#else //KAB_EMBEDDED 1001#else //KAB_EMBEDDED
1002 qDebug("KABCore::browse must be fixed"); 1002 qDebug("KABCore::browse must be fixed");
1003#endif //KAB_EMBEDDED 1003#endif //KAB_EMBEDDED
1004} 1004}
1005 1005
1006void KABCore::selectAllContacts() 1006void KABCore::selectAllContacts()
1007{ 1007{
1008 mViewManager->setSelected( QString::null, true ); 1008 mViewManager->setSelected( QString::null, true );
1009} 1009}
1010 1010
1011void KABCore::deleteContacts() 1011void KABCore::deleteContacts()
1012{ 1012{
1013 QStringList uidList = mViewManager->selectedUids(); 1013 QStringList uidList = mViewManager->selectedUids();
1014 deleteContacts( uidList ); 1014 deleteContacts( uidList );
1015} 1015}
1016 1016
1017void KABCore::deleteContacts( const QStringList &uids ) 1017void KABCore::deleteContacts( const QStringList &uids )
1018{ 1018{
1019 if ( uids.count() > 0 ) { 1019 if ( uids.count() > 0 ) {
1020 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); 1020 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids );
1021 UndoStack::instance()->push( command ); 1021 UndoStack::instance()->push( command );
1022 RedoStack::instance()->clear(); 1022 RedoStack::instance()->clear();
1023 1023
1024 // now if we deleted anything, refresh 1024 // now if we deleted anything, refresh
1025 setContactSelected( QString::null ); 1025 setContactSelected( QString::null );
1026 setModified( true ); 1026 setModified( true );
1027 } 1027 }
1028} 1028}
1029 1029
1030void KABCore::copyContacts() 1030void KABCore::copyContacts()
1031{ 1031{
1032 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1032 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1033 1033
1034 QString clipText = AddresseeUtil::addresseesToClipboard( addrList ); 1034 QString clipText = AddresseeUtil::addresseesToClipboard( addrList );
1035 1035
1036 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl; 1036 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl;
1037 1037
1038 QClipboard *cb = QApplication::clipboard(); 1038 QClipboard *cb = QApplication::clipboard();
1039 cb->setText( clipText ); 1039 cb->setText( clipText );
1040} 1040}
1041 1041
1042void KABCore::cutContacts() 1042void KABCore::cutContacts()
1043{ 1043{
1044 QStringList uidList = mViewManager->selectedUids(); 1044 QStringList uidList = mViewManager->selectedUids();
1045 1045
1046//US if ( uidList.size() > 0 ) { 1046//US if ( uidList.size() > 0 ) {
1047 if ( uidList.count() > 0 ) { 1047 if ( uidList.count() > 0 ) {
1048 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList ); 1048 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList );
1049 UndoStack::instance()->push( command ); 1049 UndoStack::instance()->push( command );
1050 RedoStack::instance()->clear(); 1050 RedoStack::instance()->clear();
1051 1051
1052 setModified( true ); 1052 setModified( true );
1053 } 1053 }
1054} 1054}
1055 1055
1056void KABCore::pasteContacts() 1056void KABCore::pasteContacts()
1057{ 1057{
1058 QClipboard *cb = QApplication::clipboard(); 1058 QClipboard *cb = QApplication::clipboard();
1059 1059
1060 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); 1060 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() );
1061 1061
1062 pasteContacts( list ); 1062 pasteContacts( list );
1063} 1063}
1064 1064
1065void KABCore::pasteContacts( KABC::Addressee::List &list ) 1065void KABCore::pasteContacts( KABC::Addressee::List &list )
1066{ 1066{
1067 KABC::Resource *resource = requestResource( this ); 1067 KABC::Resource *resource = requestResource( this );
1068 KABC::Addressee::List::Iterator it; 1068 KABC::Addressee::List::Iterator it;
1069 for ( it = list.begin(); it != list.end(); ++it ) 1069 for ( it = list.begin(); it != list.end(); ++it )
1070 (*it).setResource( resource ); 1070 (*it).setResource( resource );
1071 1071
1072 PwPasteCommand *command = new PwPasteCommand( this, list ); 1072 PwPasteCommand *command = new PwPasteCommand( this, list );
1073 UndoStack::instance()->push( command ); 1073 UndoStack::instance()->push( command );
1074 RedoStack::instance()->clear(); 1074 RedoStack::instance()->clear();
1075 1075
1076 setModified( true ); 1076 setModified( true );
1077} 1077}
1078 1078
1079void KABCore::setWhoAmI() 1079void KABCore::setWhoAmI()
1080{ 1080{
1081 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1081 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1082 1082
1083 if ( addrList.count() > 1 ) { 1083 if ( addrList.count() > 1 ) {
1084 KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); 1084 KMessageBox::sorry( this, i18n( "Please select only one contact." ) );
1085 return; 1085 return;
1086 } 1086 }
1087 1087
1088 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); 1088 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) );
1089 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) 1089 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes )
1090 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); 1090 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] );
1091} 1091}
1092void KABCore::editCategories() 1092void KABCore::editCategories()
1093{ 1093{
1094 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true ); 1094 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true );
1095 dlg.exec(); 1095 dlg.exec();
1096} 1096}
1097void KABCore::setCategories() 1097void KABCore::setCategories()
1098{ 1098{
1099 1099
1100 QStringList uids; 1100 QStringList uids;
1101 XXPortSelectDialog dlgx( this, false, this ); 1101 XXPortSelectDialog dlgx( this, false, this );
1102 if ( dlgx.exec() ) 1102 if ( dlgx.exec() )
1103 uids = dlgx.uids(); 1103 uids = dlgx.uids();
1104 else 1104 else
1105 return; 1105 return;
1106 if ( uids.isEmpty() ) 1106 if ( uids.isEmpty() )
1107 return; 1107 return;
1108 // qDebug("count %d ", uids.count()); 1108 // qDebug("count %d ", uids.count());
1109 1109
1110 1110
1111 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); 1111 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true );
1112 if ( !dlg.exec() ) { 1112 if ( !dlg.exec() ) {
1113 message( i18n("Setting categories cancelled") ); 1113 message( i18n("Setting categories cancelled") );
1114 return; 1114 return;
1115 } 1115 }
1116 bool merge = false; 1116 bool merge = false;
1117 QString msg = i18n( "Merge with existing categories?" ); 1117 QString msg = i18n( "Merge with existing categories?" );
1118 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) 1118 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes )
1119 merge = true; 1119 merge = true;
1120 1120
1121 message( i18n("Setting categories ... please wait!") ); 1121 message( i18n("Setting categories ... please wait!") );
1122 QStringList categories = dlg.selectedCategories(); 1122 QStringList categories = dlg.selectedCategories();
1123 1123
1124 //QStringList uids = mViewManager->selectedUids(); 1124 //QStringList uids = mViewManager->selectedUids();
1125 QStringList::Iterator it; 1125 QStringList::Iterator it;
1126 for ( it = uids.begin(); it != uids.end(); ++it ) { 1126 for ( it = uids.begin(); it != uids.end(); ++it ) {
1127 KABC::Addressee addr = mAddressBook->findByUid( *it ); 1127 KABC::Addressee addr = mAddressBook->findByUid( *it );
1128 if ( !addr.isEmpty() ) { 1128 if ( !addr.isEmpty() ) {
1129 if ( !merge ) 1129 if ( !merge )
1130 addr.setCategories( categories ); 1130 addr.setCategories( categories );
1131 else { 1131 else {
1132 QStringList addrCategories = addr.categories(); 1132 QStringList addrCategories = addr.categories();
1133 QStringList::Iterator catIt; 1133 QStringList::Iterator catIt;
1134 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { 1134 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
1135 if ( !addrCategories.contains( *catIt ) ) 1135 if ( !addrCategories.contains( *catIt ) )
1136 addrCategories.append( *catIt ); 1136 addrCategories.append( *catIt );
1137 } 1137 }
1138 addr.setCategories( addrCategories ); 1138 addr.setCategories( addrCategories );
1139 } 1139 }
1140 mAddressBook->insertAddressee( addr ); 1140 mAddressBook->insertAddressee( addr );
1141 } 1141 }
1142 } 1142 }
1143 1143
1144 if ( uids.count() > 0 ) 1144 if ( uids.count() > 0 )
1145 setModified( true ); 1145 setModified( true );
1146 message( i18n("Setting categories completed!") ); 1146 message( i18n("Setting categories completed!") );
1147} 1147}
1148 1148
1149void KABCore::setSearchFields( const KABC::Field::List &fields ) 1149void KABCore::setSearchFields( const KABC::Field::List &fields )
1150{ 1150{
1151 mIncSearchWidget->setFields( fields ); 1151 mIncSearchWidget->setFields( fields );
1152} 1152}
1153 1153
1154void KABCore::incrementalSearch( const QString& text ) 1154void KABCore::incrementalSearch( const QString& text )
1155{ 1155{
1156 mViewManager->doSearch( text, mIncSearchWidget->currentField() ); 1156 mViewManager->doSearch( text, mIncSearchWidget->currentField() );
1157} 1157}
1158 1158
1159void KABCore::setModified() 1159void KABCore::setModified()
1160{ 1160{
1161 setModified( true ); 1161 setModified( true );
1162} 1162}
1163 1163
1164void KABCore::setModifiedWOrefresh() 1164void KABCore::setModifiedWOrefresh()
1165{ 1165{
1166 // qDebug("KABCore::setModifiedWOrefresh() "); 1166 // qDebug("KABCore::setModifiedWOrefresh() ");
1167 mModified = true; 1167 mModified = true;
1168 mActionSave->setEnabled( mModified ); 1168 mActionSave->setEnabled( mModified );
1169 1169
1170 1170
1171} 1171}
1172void KABCore::setModified( bool modified ) 1172void KABCore::setModified( bool modified )
1173{ 1173{
1174 mModified = modified; 1174 mModified = modified;
1175 mActionSave->setEnabled( mModified ); 1175 mActionSave->setEnabled( mModified );
1176 1176
1177 if ( modified ) 1177 if ( modified )
1178 mJumpButtonBar->recreateButtons(); 1178 mJumpButtonBar->recreateButtons();
1179 1179
1180 mViewManager->refreshView(); 1180 mViewManager->refreshView();
1181 1181
1182} 1182}
1183 1183
1184bool KABCore::modified() const 1184bool KABCore::modified() const
1185{ 1185{
1186 return mModified; 1186 return mModified;
1187} 1187}
1188 1188
1189void KABCore::contactModified( const KABC::Addressee &addr ) 1189void KABCore::contactModified( const KABC::Addressee &addr )
1190{ 1190{
1191 addrModified( addr ); 1191 addrModified( addr );
1192#if 0 // debug only 1192#if 0 // debug only
1193 KABC::Addressee ad = addr; 1193 KABC::Addressee ad = addr;
1194 ad.computeCsum( "123"); 1194 ad.computeCsum( "123");
1195#endif 1195#endif
1196} 1196}
1197 1197
1198void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails ) 1198void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails )
1199{ 1199{
1200 1200
1201 Command *command = 0; 1201 Command *command = 0;
1202 QString uid; 1202 QString uid;
1203 1203
1204 // check if it exists already 1204 // check if it exists already
1205 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() ); 1205 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() );
1206 if ( origAddr.isEmpty() ) 1206 if ( origAddr.isEmpty() )
1207 command = new PwNewCommand( mAddressBook, addr ); 1207 command = new PwNewCommand( mAddressBook, addr );
1208 else { 1208 else {
1209 command = new PwEditCommand( mAddressBook, origAddr, addr ); 1209 command = new PwEditCommand( mAddressBook, origAddr, addr );
1210 uid = addr.uid(); 1210 uid = addr.uid();
1211 } 1211 }
1212 1212
1213 UndoStack::instance()->push( command ); 1213 UndoStack::instance()->push( command );
1214 RedoStack::instance()->clear(); 1214 RedoStack::instance()->clear();
1215 if ( updateDetails ) 1215 if ( updateDetails )
1216 mDetails->setAddressee( addr ); 1216 mDetails->setAddressee( addr );
1217 setModified( true ); 1217 setModified( true );
1218} 1218}
1219 1219
1220void KABCore::newContact() 1220void KABCore::newContact()
1221{ 1221{
1222 1222
1223 1223
1224 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); 1224 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources();
1225 1225
1226 QPtrList<KRES::Resource> kresResources; 1226 QPtrList<KRES::Resource> kresResources;
1227 QPtrListIterator<KABC::Resource> it( kabcResources ); 1227 QPtrListIterator<KABC::Resource> it( kabcResources );
1228 KABC::Resource *resource; 1228 KABC::Resource *resource;
1229 while ( ( resource = it.current() ) != 0 ) { 1229 while ( ( resource = it.current() ) != 0 ) {
1230 ++it; 1230 ++it;
1231 if ( !resource->readOnly() ) { 1231 if ( !resource->readOnly() ) {
1232 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 1232 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
1233 if ( res ) 1233 if ( res )
1234 kresResources.append( res ); 1234 kresResources.append( res );
1235 } 1235 }
1236 } 1236 }
1237 1237
1238 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this ); 1238 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this );
1239 resource = static_cast<KABC::Resource*>( res ); 1239 resource = static_cast<KABC::Resource*>( res );
1240 1240
1241 if ( resource ) { 1241 if ( resource ) {
1242 KABC::Addressee addr; 1242 KABC::Addressee addr;
1243 addr.setResource( resource ); 1243 addr.setResource( resource );
1244 mEditorDialog->setAddressee( addr ); 1244 mEditorDialog->setAddressee( addr );
1245 KApplication::execDialog ( mEditorDialog ); 1245 KApplication::execDialog ( mEditorDialog );
1246 1246
1247 } else 1247 } else
1248 return; 1248 return;
1249 1249
1250 // mEditorDict.insert( dialog->addressee().uid(), dialog ); 1250 // mEditorDict.insert( dialog->addressee().uid(), dialog );
1251 1251
1252 1252
1253} 1253}
1254 1254
1255void KABCore::addEmail( QString aStr ) 1255void KABCore::addEmail( QString aStr )
1256{ 1256{
1257#ifndef KAB_EMBEDDED 1257#ifndef KAB_EMBEDDED
1258 QString fullName, email; 1258 QString fullName, email;
1259 1259
1260 KABC::Addressee::parseEmailAddress( aStr, fullName, email ); 1260 KABC::Addressee::parseEmailAddress( aStr, fullName, email );
1261 1261
1262 // Try to lookup the addressee matching the email address 1262 // Try to lookup the addressee matching the email address
1263 bool found = false; 1263 bool found = false;
1264 QStringList emailList; 1264 QStringList emailList;
1265 KABC::AddressBook::Iterator it; 1265 KABC::AddressBook::Iterator it;
1266 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) { 1266 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) {
1267 emailList = (*it).emails(); 1267 emailList = (*it).emails();
1268 if ( emailList.contains( email ) > 0 ) { 1268 if ( emailList.contains( email ) > 0 ) {
1269 found = true; 1269 found = true;
1270 (*it).setNameFromString( fullName ); 1270 (*it).setNameFromString( fullName );
1271 editContact( (*it).uid() ); 1271 editContact( (*it).uid() );
1272 } 1272 }
1273 } 1273 }
1274 1274
1275 if ( !found ) { 1275 if ( !found ) {
1276 KABC::Addressee addr; 1276 KABC::Addressee addr;
1277 addr.setNameFromString( fullName ); 1277 addr.setNameFromString( fullName );
1278 addr.insertEmail( email, true ); 1278 addr.insertEmail( email, true );
1279 1279
1280 mAddressBook->insertAddressee( addr ); 1280 mAddressBook->insertAddressee( addr );
1281 mViewManager->refreshView( addr.uid() ); 1281 mViewManager->refreshView( addr.uid() );
1282 editContact( addr.uid() ); 1282 editContact( addr.uid() );
1283 } 1283 }
1284#else //KAB_EMBEDDED 1284#else //KAB_EMBEDDED
1285 qDebug("KABCore::addEmail finsih method"); 1285 qDebug("KABCore::addEmail finsih method");
1286#endif //KAB_EMBEDDED 1286#endif //KAB_EMBEDDED
1287} 1287}
1288 1288
1289void KABCore::importVCard( const KURL &url, bool showPreview ) 1289void KABCore::importVCard( const KURL &url, bool showPreview )
1290{ 1290{
1291 mXXPortManager->importVCard( url, showPreview ); 1291 mXXPortManager->importVCard( url, showPreview );
1292} 1292}
1293void KABCore::importFromOL() 1293void KABCore::importFromOL()
1294{ 1294{
1295#ifdef _OL_IMPORT_ 1295#ifdef _OL_IMPORT_
1296 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); 1296 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this );
1297 idgl->exec(); 1297 idgl->exec();
1298 KABC::Addressee::List list = idgl->getAddressList(); 1298 KABC::Addressee::List list = idgl->getAddressList();
1299 if ( list.count() > 0 ) { 1299 if ( list.count() > 0 ) {
1300 KABC::Addressee::List listNew; 1300 KABC::Addressee::List listNew;
1301 KABC::Addressee::List listExisting; 1301 KABC::Addressee::List listExisting;
1302 KABC::Addressee::List::Iterator it; 1302 KABC::Addressee::List::Iterator it;
1303 KABC::AddressBook::Iterator iter; 1303 KABC::AddressBook::Iterator iter;
1304 for ( it = list.begin(); it != list.end(); ++it ) { 1304 for ( it = list.begin(); it != list.end(); ++it ) {
1305 if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) 1305 if ( mAddressBook->findByUid((*it).uid() ).isEmpty())
1306 listNew.append( (*it) ); 1306 listNew.append( (*it) );
1307 else 1307 else
1308 listExisting.append( (*it) ); 1308 listExisting.append( (*it) );
1309 } 1309 }
1310 if ( listExisting.count() > 0 ) 1310 if ( listExisting.count() > 0 )
1311 KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() )); 1311 KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() ));
1312 if ( listNew.count() > 0 ) { 1312 if ( listNew.count() > 0 ) {
1313 pasteWithNewUid = false; 1313 pasteWithNewUid = false;
1314 pasteContacts( listNew ); 1314 pasteContacts( listNew );
1315 pasteWithNewUid = true; 1315 pasteWithNewUid = true;
1316 } 1316 }
1317 } 1317 }
1318 delete idgl; 1318 delete idgl;
1319#endif 1319#endif
1320} 1320}
1321 1321
1322void KABCore::importVCard( const QString &vCard, bool showPreview ) 1322void KABCore::importVCard( const QString &vCard, bool showPreview )
1323{ 1323{
1324 mXXPortManager->importVCard( vCard, showPreview ); 1324 mXXPortManager->importVCard( vCard, showPreview );
1325} 1325}
1326 1326
1327//US added a second method without defaultparameter 1327//US added a second method without defaultparameter
1328void KABCore::editContact2() { 1328void KABCore::editContact2() {
1329 editContact( QString::null ); 1329 editContact( QString::null );
1330} 1330}
1331 1331
1332void KABCore::editContact( const QString &uid ) 1332void KABCore::editContact( const QString &uid )
1333{ 1333{
1334 1334
1335 if ( mExtensionManager->isQuickEditVisible() ) 1335 if ( mExtensionManager->isQuickEditVisible() )
1336 return; 1336 return;
1337 1337
1338 // First, locate the contact entry 1338 // First, locate the contact entry
1339 QString localUID = uid; 1339 QString localUID = uid;
1340 if ( localUID.isNull() ) { 1340 if ( localUID.isNull() ) {
1341 QStringList uidList = mViewManager->selectedUids(); 1341 QStringList uidList = mViewManager->selectedUids();
1342 if ( uidList.count() > 0 ) 1342 if ( uidList.count() > 0 )
1343 localUID = *( uidList.at( 0 ) ); 1343 localUID = *( uidList.at( 0 ) );
1344 } 1344 }
1345 1345
1346 KABC::Addressee addr = mAddressBook->findByUid( localUID ); 1346 KABC::Addressee addr = mAddressBook->findByUid( localUID );
1347 if ( !addr.isEmpty() ) { 1347 if ( !addr.isEmpty() ) {
1348 mEditorDialog->setAddressee( addr ); 1348 mEditorDialog->setAddressee( addr );
1349 KApplication::execDialog ( mEditorDialog ); 1349 KApplication::execDialog ( mEditorDialog );
1350 } 1350 }
1351} 1351}
1352 1352
1353/** 1353/**
1354 Shows or edits the detail view for the given uid. If the uid is QString::null, 1354 Shows or edits the detail view for the given uid. If the uid is QString::null,
1355 the method will try to find a selected addressee in the view. 1355 the method will try to find a selected addressee in the view.
1356 */ 1356 */
1357void KABCore::executeContact( const QString &uid /*US = QString::null*/ ) 1357void KABCore::executeContact( const QString &uid /*US = QString::null*/ )
1358{ 1358{
1359 if ( mMultipleViewsAtOnce ) 1359 if ( mMultipleViewsAtOnce )
1360 { 1360 {
1361 editContact( uid ); 1361 editContact( uid );
1362 } 1362 }
1363 else 1363 else
1364 { 1364 {
1365 setDetailsVisible( true ); 1365 setDetailsVisible( true );
1366 mActionDetails->setChecked(true); 1366 mActionDetails->setChecked(true);
1367 } 1367 }
1368 1368
1369} 1369}
1370 1370
1371void KABCore::save() 1371void KABCore::save()
1372{ 1372{
1373 if (syncManager->blockSave()) 1373 if (syncManager->blockSave())
1374 return; 1374 return;
1375 if ( !mModified ) 1375 if ( !mModified )
1376 return; 1376 return;
1377 1377
1378 syncManager->setBlockSave(true); 1378 syncManager->setBlockSave(true);
1379 QString text = i18n( "There was an error while attempting to save\n the " 1379 QString text = i18n( "There was an error while attempting to save\n the "
1380 "address book. Please check that some \nother application is " 1380 "address book. Please check that some \nother application is "
1381 "not using it. " ); 1381 "not using it. " );
1382 message(i18n("Saving ... please wait! "), false); 1382 message(i18n("Saving ... please wait! "), false);
1383 //qApp->processEvents(); 1383 //qApp->processEvents();
1384#ifndef KAB_EMBEDDED 1384#ifndef KAB_EMBEDDED
1385 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); 1385 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook );
1386 if ( !b || !b->save() ) { 1386 if ( !b || !b->save() ) {
1387 KMessageBox::error( this, text, i18n( "Unable to Save" ) ); 1387 KMessageBox::error( this, text, i18n( "Unable to Save" ) );
1388 } 1388 }
1389#else //KAB_EMBEDDED 1389#else //KAB_EMBEDDED
1390 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); 1390 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook );
1391 if ( !b || !b->save() ) { 1391 if ( !b || !b->save() ) {
1392 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); 1392 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok"));
1393 } 1393 }
1394#endif //KAB_EMBEDDED 1394#endif //KAB_EMBEDDED
1395 1395
1396 message(i18n("Addressbook saved!")); 1396 message(i18n("Addressbook saved!"));
1397 setModified( false ); 1397 setModified( false );
1398 syncManager->setBlockSave(false); 1398 syncManager->setBlockSave(false);
1399} 1399}
1400 1400
1401 1401
1402void KABCore::undo() 1402void KABCore::undo()
1403{ 1403{
1404 UndoStack::instance()->undo(); 1404 UndoStack::instance()->undo();
1405 1405
1406 // Refresh the view 1406 // Refresh the view
1407 mViewManager->refreshView(); 1407 mViewManager->refreshView();
1408} 1408}
1409 1409
1410void KABCore::redo() 1410void KABCore::redo()
1411{ 1411{
1412 RedoStack::instance()->redo(); 1412 RedoStack::instance()->redo();
1413 1413
1414 // Refresh the view 1414 // Refresh the view
1415 mViewManager->refreshView(); 1415 mViewManager->refreshView();
1416} 1416}
1417void KABCore::setJumpButtonBar( bool visible ) 1417void KABCore::setJumpButtonBar( bool visible )
1418{ 1418{
1419 setJumpButtonBarVisible(visible ); 1419 setJumpButtonBarVisible(visible );
1420 saveSettings(); 1420 saveSettings();
1421} 1421}
1422void KABCore::setJumpButtonBarVisible( bool visible ) 1422void KABCore::setJumpButtonBarVisible( bool visible )
1423{ 1423{
1424 if (mMultipleViewsAtOnce) 1424 if (mMultipleViewsAtOnce)
1425 { 1425 {
1426 if ( visible ) 1426 if ( visible )
1427 mJumpButtonBar->show(); 1427 mJumpButtonBar->show();
1428 else 1428 else
1429 mJumpButtonBar->hide(); 1429 mJumpButtonBar->hide();
1430 } 1430 }
1431 else 1431 else
1432 { 1432 {
1433 // show the jumpbar only if "the details are hidden" == "viewmanager are shown" 1433 // show the jumpbar only if "the details are hidden" == "viewmanager are shown"
1434 if (mViewManager->isVisible()) 1434 if (mViewManager->isVisible())
1435 { 1435 {
1436 if ( visible ) 1436 if ( visible )
1437 mJumpButtonBar->show(); 1437 mJumpButtonBar->show();
1438 else 1438 else
1439 mJumpButtonBar->hide(); 1439 mJumpButtonBar->hide();
1440 } 1440 }
1441 else 1441 else
1442 { 1442 {
1443 mJumpButtonBar->hide(); 1443 mJumpButtonBar->hide();
1444 } 1444 }
1445 } 1445 }
1446 if ( visible ) {
1447 if ( mIncSearchWidget->currentItem() == 0 ) {
1448 message( i18n("Change search field enable jump bar") );
1449 }
1450 }
1446} 1451}
1447 1452
1448 1453
1449void KABCore::setDetailsToState() 1454void KABCore::setDetailsToState()
1450{ 1455{
1451 setDetailsVisible( mActionDetails->isChecked() ); 1456 setDetailsVisible( mActionDetails->isChecked() );
1452} 1457}
1453void KABCore::setDetailsToggle() 1458void KABCore::setDetailsToggle()
1454{ 1459{
1455 mActionDetails->setChecked( !mActionDetails->isChecked() ); 1460 mActionDetails->setChecked( !mActionDetails->isChecked() );
1456 setDetailsToState(); 1461 setDetailsToState();
1457} 1462}
1458 1463
1459 1464
1460 1465
1461void KABCore::setDetailsVisible( bool visible ) 1466void KABCore::setDetailsVisible( bool visible )
1462{ 1467{
1463 if (visible && mDetails->isHidden()) 1468 if (visible && mDetails->isHidden())
1464 { 1469 {
1465 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1470 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1466 if ( addrList.count() > 0 ) 1471 if ( addrList.count() > 0 )
1467 mDetails->setAddressee( addrList[ 0 ] ); 1472 mDetails->setAddressee( addrList[ 0 ] );
1468 } 1473 }
1469 1474
1470 // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between 1475 // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between
1471 // the listview and the detailview. We do that by changing the splitbar size. 1476 // the listview and the detailview. We do that by changing the splitbar size.
1472 if (mMultipleViewsAtOnce) 1477 if (mMultipleViewsAtOnce)
1473 { 1478 {
1474 if ( visible ) 1479 if ( visible )
1475 mDetails->show(); 1480 mDetails->show();
1476 else 1481 else
1477 mDetails->hide(); 1482 mDetails->hide();
1478 } 1483 }
1479 else 1484 else
1480 { 1485 {
1481 if ( visible ) { 1486 if ( visible ) {
1482 mViewManager->hide(); 1487 mViewManager->hide();
1483 mDetails->show(); 1488 mDetails->show();
1484 mIncSearchWidget->setFocus(); 1489 mIncSearchWidget->setFocus();
1485 } 1490 }
1486 else { 1491 else {
1487 mViewManager->show(); 1492 mViewManager->show();
1488 mDetails->hide(); 1493 mDetails->hide();
1489 mViewManager->setFocusAV(); 1494 mViewManager->setFocusAV();
1490 } 1495 }
1491 setJumpButtonBarVisible( !visible ); 1496 setJumpButtonBarVisible( !visible );
1492 } 1497 }
1493 1498
1494} 1499}
1495 1500
1496void KABCore::extensionChanged( int id ) 1501void KABCore::extensionChanged( int id )
1497{ 1502{
1498 //change the details view only for non desktop systems 1503 //change the details view only for non desktop systems
1499#ifndef DESKTOP_VERSION 1504#ifndef DESKTOP_VERSION
1500 1505
1501 if (id == 0) 1506 if (id == 0)
1502 { 1507 {
1503 //the user disabled the extension. 1508 //the user disabled the extension.
1504 1509
1505 if (mMultipleViewsAtOnce) 1510 if (mMultipleViewsAtOnce)
1506 { // enable detailsview again 1511 { // enable detailsview again
1507 setDetailsVisible( true ); 1512 setDetailsVisible( true );
1508 mActionDetails->setChecked( true ); 1513 mActionDetails->setChecked( true );
1509 } 1514 }
1510 else 1515 else
1511 { //go back to the listview 1516 { //go back to the listview
1512 setDetailsVisible( false ); 1517 setDetailsVisible( false );
1513 mActionDetails->setChecked( false ); 1518 mActionDetails->setChecked( false );
1514 mActionDetails->setEnabled(true); 1519 mActionDetails->setEnabled(true);
1515 } 1520 }
1516 1521
1517 } 1522 }
1518 else 1523 else
1519 { 1524 {
1520 //the user enabled the extension. 1525 //the user enabled the extension.
1521 setDetailsVisible( false ); 1526 setDetailsVisible( false );
1522 mActionDetails->setChecked( false ); 1527 mActionDetails->setChecked( false );
1523 1528
1524 if (!mMultipleViewsAtOnce) 1529 if (!mMultipleViewsAtOnce)
1525 { 1530 {
1526 mActionDetails->setEnabled(false); 1531 mActionDetails->setEnabled(false);
1527 } 1532 }
1528 1533
1529 mExtensionManager->setSelectionChanged(); 1534 mExtensionManager->setSelectionChanged();
1530 1535
1531 } 1536 }
1532 1537
1533#endif// DESKTOP_VERSION 1538#endif// DESKTOP_VERSION
1534 1539
1535} 1540}
1536 1541
1537 1542
1538void KABCore::extensionModified( const KABC::Addressee::List &list ) 1543void KABCore::extensionModified( const KABC::Addressee::List &list )
1539{ 1544{
1540 1545
1541 if ( list.count() != 0 ) { 1546 if ( list.count() != 0 ) {
1542 KABC::Addressee::List::ConstIterator it; 1547 KABC::Addressee::List::ConstIterator it;
1543 for ( it = list.begin(); it != list.end(); ++it ) 1548 for ( it = list.begin(); it != list.end(); ++it )
1544 mAddressBook->insertAddressee( *it ); 1549 mAddressBook->insertAddressee( *it );
1545 if ( list.count() > 1 ) 1550 if ( list.count() > 1 )
1546 setModified(); 1551 setModified();
1547 else 1552 else
1548 setModifiedWOrefresh(); 1553 setModifiedWOrefresh();
1549 } 1554 }
1550 if ( list.count() == 0 ) 1555 if ( list.count() == 0 )
1551 mViewManager->refreshView(); 1556 mViewManager->refreshView();
1552 else 1557 else
1553 mViewManager->refreshView( list[ 0 ].uid() ); 1558 mViewManager->refreshView( list[ 0 ].uid() );
1554 1559
1555 1560
1556 1561
1557} 1562}
1558 1563
1559QString KABCore::getNameByPhone( const QString &phone ) 1564QString KABCore::getNameByPhone( const QString &phone )
1560{ 1565{
1561#ifndef KAB_EMBEDDED 1566#ifndef KAB_EMBEDDED
1562 QRegExp r( "[/*/-/ ]" ); 1567 QRegExp r( "[/*/-/ ]" );
1563 QString localPhone( phone ); 1568 QString localPhone( phone );
1564 1569
1565 bool found = false; 1570 bool found = false;
1566 QString ownerName = ""; 1571 QString ownerName = "";
1567 KABC::AddressBook::Iterator iter; 1572 KABC::AddressBook::Iterator iter;
1568 KABC::PhoneNumber::List::Iterator phoneIter; 1573 KABC::PhoneNumber::List::Iterator phoneIter;
1569 KABC::PhoneNumber::List phoneList; 1574 KABC::PhoneNumber::List phoneList;
1570 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) { 1575 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) {
1571 phoneList = (*iter).phoneNumbers(); 1576 phoneList = (*iter).phoneNumbers();
1572 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() ); 1577 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() );
1573 ++phoneIter) { 1578 ++phoneIter) {
1574 // Get rid of separator chars so just the numbers are compared. 1579 // Get rid of separator chars so just the numbers are compared.
1575 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { 1580 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) {
1576 ownerName = (*iter).formattedName(); 1581 ownerName = (*iter).formattedName();
1577 found = true; 1582 found = true;
1578 } 1583 }
1579 } 1584 }
1580 } 1585 }
1581 1586
1582 return ownerName; 1587 return ownerName;
1583#else //KAB_EMBEDDED 1588#else //KAB_EMBEDDED
1584 qDebug("KABCore::getNameByPhone finsih method"); 1589 qDebug("KABCore::getNameByPhone finsih method");
1585 return ""; 1590 return "";
1586#endif //KAB_EMBEDDED 1591#endif //KAB_EMBEDDED
1587 1592
1588} 1593}
1589 1594
1590void KABCore::openConfigDialog() 1595void KABCore::openConfigDialog()
1591{ 1596{
1592 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true ); 1597 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true );
1593 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" ); 1598 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" );
1594 ConfigureDialog->addModule(kabcfg ); 1599 ConfigureDialog->addModule(kabcfg );
1595 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); 1600 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" );
1596 ConfigureDialog->addModule(kdelibcfg ); 1601 ConfigureDialog->addModule(kdelibcfg );
1597 1602
1598 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1603 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1599 this, SLOT( configurationChanged() ) ); 1604 this, SLOT( configurationChanged() ) );
1600 connect( ConfigureDialog, SIGNAL( okClicked() ), 1605 connect( ConfigureDialog, SIGNAL( okClicked() ),
1601 this, SLOT( configurationChanged() ) ); 1606 this, SLOT( configurationChanged() ) );
1602 saveSettings(); 1607 saveSettings();
1603#ifndef DESKTOP_VERSION 1608#ifndef DESKTOP_VERSION
1604 ConfigureDialog->showMaximized(); 1609 ConfigureDialog->showMaximized();
1605#endif 1610#endif
1606 if ( ConfigureDialog->exec() ) 1611 if ( ConfigureDialog->exec() )
1607 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); 1612 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") );
1608 delete ConfigureDialog; 1613 delete ConfigureDialog;
1609} 1614}
1610 1615
1611void KABCore::openLDAPDialog() 1616void KABCore::openLDAPDialog()
1612{ 1617{
1613#ifndef KAB_EMBEDDED 1618#ifndef KAB_EMBEDDED
1614 if ( !mLdapSearchDialog ) { 1619 if ( !mLdapSearchDialog ) {
1615 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); 1620 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this );
1616 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, 1621 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager,
1617 SLOT( refreshView() ) ); 1622 SLOT( refreshView() ) );
1618 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, 1623 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this,
1619 SLOT( setModified() ) ); 1624 SLOT( setModified() ) );
1620 } else 1625 } else
1621 mLdapSearchDialog->restoreSettings(); 1626 mLdapSearchDialog->restoreSettings();
1622 1627
1623 if ( mLdapSearchDialog->isOK() ) 1628 if ( mLdapSearchDialog->isOK() )
1624 mLdapSearchDialog->exec(); 1629 mLdapSearchDialog->exec();
1625#else //KAB_EMBEDDED 1630#else //KAB_EMBEDDED
1626 qDebug("KABCore::openLDAPDialog() finsih method"); 1631 qDebug("KABCore::openLDAPDialog() finsih method");
1627#endif //KAB_EMBEDDED 1632#endif //KAB_EMBEDDED
1628} 1633}
1629 1634
1630void KABCore::print() 1635void KABCore::print()
1631{ 1636{
1632#ifndef KAB_EMBEDDED 1637#ifndef KAB_EMBEDDED
1633 KPrinter printer; 1638 KPrinter printer;
1634 if ( !printer.setup( this ) ) 1639 if ( !printer.setup( this ) )
1635 return; 1640 return;
1636 1641
1637 KABPrinting::PrintingWizard wizard( &printer, mAddressBook, 1642 KABPrinting::PrintingWizard wizard( &printer, mAddressBook,
1638 mViewManager->selectedUids(), this ); 1643 mViewManager->selectedUids(), this );
1639 1644
1640 wizard.exec(); 1645 wizard.exec();
1641#else //KAB_EMBEDDED 1646#else //KAB_EMBEDDED
1642 qDebug("KABCore::print() finsih method"); 1647 qDebug("KABCore::print() finsih method");
1643#endif //KAB_EMBEDDED 1648#endif //KAB_EMBEDDED
1644 1649
1645} 1650}
1646 1651
1647 1652
1648void KABCore::addGUIClient( KXMLGUIClient *client ) 1653void KABCore::addGUIClient( KXMLGUIClient *client )
1649{ 1654{
1650 if ( mGUIClient ) 1655 if ( mGUIClient )
1651 mGUIClient->insertChildClient( client ); 1656 mGUIClient->insertChildClient( client );
1652 else 1657 else
1653 KMessageBox::error( this, "no KXMLGUICLient"); 1658 KMessageBox::error( this, "no KXMLGUICLient");
1654} 1659}
1655 1660
1656 1661
1657void KABCore::configurationChanged() 1662void KABCore::configurationChanged()
1658{ 1663{
1659 mExtensionManager->reconfigure(); 1664 mExtensionManager->reconfigure();
1660} 1665}
1661 1666
1662void KABCore::addressBookChanged() 1667void KABCore::addressBookChanged()
1663{ 1668{
1664/*US 1669/*US
1665 QDictIterator<AddresseeEditorDialog> it( mEditorDict ); 1670 QDictIterator<AddresseeEditorDialog> it( mEditorDict );
1666 while ( it.current() ) { 1671 while ( it.current() ) {
1667 if ( it.current()->dirty() ) { 1672 if ( it.current()->dirty() ) {
1668 QString text = i18n( "Data has been changed externally. Unsaved " 1673 QString text = i18n( "Data has been changed externally. Unsaved "
1669 "changes will be lost." ); 1674 "changes will be lost." );
1670 KMessageBox::information( this, text ); 1675 KMessageBox::information( this, text );
1671 } 1676 }
1672 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); 1677 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) );
1673 ++it; 1678 ++it;
1674 } 1679 }
1675*/ 1680*/
1676 if (mEditorDialog) 1681 if (mEditorDialog)
1677 { 1682 {
1678 if (mEditorDialog->dirty()) 1683 if (mEditorDialog->dirty())
1679 { 1684 {
1680 QString text = i18n( "Data has been changed externally. Unsaved " 1685 QString text = i18n( "Data has been changed externally. Unsaved "
1681 "changes will be lost." ); 1686 "changes will be lost." );
1682 KMessageBox::information( this, text ); 1687 KMessageBox::information( this, text );
1683 } 1688 }
1684 QString currentuid = mEditorDialog->addressee().uid(); 1689 QString currentuid = mEditorDialog->addressee().uid();
1685 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); 1690 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) );
1686 } 1691 }
1687 mViewManager->refreshView(); 1692 mViewManager->refreshView();
1688 1693
1689 1694
1690} 1695}
1691 1696
1692AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, 1697AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
1693 const char *name ) 1698 const char *name )
1694{ 1699{
1695 1700
1696 if ( mEditorDialog == 0 ) { 1701 if ( mEditorDialog == 0 ) {
1697 mEditorDialog = new AddresseeEditorDialog( this, parent, 1702 mEditorDialog = new AddresseeEditorDialog( this, parent,
1698 name ? name : "editorDialog" ); 1703 name ? name : "editorDialog" );
1699 1704
1700 1705
1701 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ), 1706 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ),
1702 SLOT( contactModified( const KABC::Addressee& ) ) ); 1707 SLOT( contactModified( const KABC::Addressee& ) ) );
1703 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ), 1708 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ),
1704 // SLOT( slotEditorDestroyed( const QString& ) ) ; 1709 // SLOT( slotEditorDestroyed( const QString& ) ) ;
1705 } 1710 }
1706 1711
1707 return mEditorDialog; 1712 return mEditorDialog;
1708} 1713}
1709 1714
1710void KABCore::slotEditorDestroyed( const QString &uid ) 1715void KABCore::slotEditorDestroyed( const QString &uid )
1711{ 1716{
1712 //mEditorDict.remove( uid ); 1717 //mEditorDict.remove( uid );
1713} 1718}
1714 1719
1715void KABCore::initGUI() 1720void KABCore::initGUI()
1716{ 1721{
1717#ifndef KAB_EMBEDDED 1722#ifndef KAB_EMBEDDED
1718 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1723 QHBoxLayout *topLayout = new QHBoxLayout( this );
1719 topLayout->setSpacing( KDialogBase::spacingHint() ); 1724 topLayout->setSpacing( KDialogBase::spacingHint() );
1720 1725
1721 mExtensionBarSplitter = new QSplitter( this ); 1726 mExtensionBarSplitter = new QSplitter( this );
1722 mExtensionBarSplitter->setOrientation( Qt::Vertical ); 1727 mExtensionBarSplitter->setOrientation( Qt::Vertical );
1723 1728
1724 mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); 1729 mDetailsSplitter = new QSplitter( mExtensionBarSplitter );
1725 1730
1726 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1731 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1727 mIncSearchWidget = new IncSearchWidget( viewSpace ); 1732 mIncSearchWidget = new IncSearchWidget( viewSpace );
1728 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1733 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1729 SLOT( incrementalSearch( const QString& ) ) ); 1734 SLOT( incrementalSearch( const QString& ) ) );
1730 1735
1731 mViewManager = new ViewManager( this, viewSpace ); 1736 mViewManager = new ViewManager( this, viewSpace );
1732 viewSpace->setStretchFactor( mViewManager, 1 ); 1737 viewSpace->setStretchFactor( mViewManager, 1 );
1733 1738
1734 mDetails = new ViewContainer( mDetailsSplitter ); 1739 mDetails = new ViewContainer( mDetailsSplitter );
1735 1740
1736 mJumpButtonBar = new JumpButtonBar( this, this ); 1741 mJumpButtonBar = new JumpButtonBar( this, this );
1737 1742
1738 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1743 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1739 1744
1740 topLayout->addWidget( mExtensionBarSplitter ); 1745 topLayout->addWidget( mExtensionBarSplitter );
1741 topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); 1746 topLayout->setStretchFactor( mExtensionBarSplitter, 100 );
1742 topLayout->addWidget( mJumpButtonBar ); 1747 topLayout->addWidget( mJumpButtonBar );
1743 //topLayout->setStretchFactor( mJumpButtonBar, 1 ); 1748 //topLayout->setStretchFactor( mJumpButtonBar, 1 );
1744 1749
1745 mXXPortManager = new XXPortManager( this, this ); 1750 mXXPortManager = new XXPortManager( this, this );
1746 1751
1747#else //KAB_EMBEDDED 1752#else //KAB_EMBEDDED
1748 //US initialize viewMenu before settingup viewmanager. 1753 //US initialize viewMenu before settingup viewmanager.
1749 // Viewmanager needs this menu to plugin submenues. 1754 // Viewmanager needs this menu to plugin submenues.
1750 viewMenu = new QPopupMenu( this ); 1755 viewMenu = new QPopupMenu( this );
1751 settingsMenu = new QPopupMenu( this ); 1756 settingsMenu = new QPopupMenu( this );
1752 //filterMenu = new QPopupMenu( this ); 1757 //filterMenu = new QPopupMenu( this );
1753 ImportMenu = new QPopupMenu( this ); 1758 ImportMenu = new QPopupMenu( this );
1754 ExportMenu = new QPopupMenu( this ); 1759 ExportMenu = new QPopupMenu( this );
1755 syncMenu = new QPopupMenu( this ); 1760 syncMenu = new QPopupMenu( this );
1756 changeMenu= new QPopupMenu( this ); 1761 changeMenu= new QPopupMenu( this );
1757 beamMenu= new QPopupMenu( this ); 1762 beamMenu= new QPopupMenu( this );
1758 1763
1759//US since we have no splitter for the embedded system, setup 1764//US since we have no splitter for the embedded system, setup
1760// a layout with two frames. One left and one right. 1765// a layout with two frames. One left and one right.
1761 1766
1762 QBoxLayout *topLayout; 1767 QBoxLayout *topLayout;
1763 1768
1764 // = new QHBoxLayout( this ); 1769 // = new QHBoxLayout( this );
1765// QBoxLayout *topLayout = (QBoxLayout*)layout(); 1770// QBoxLayout *topLayout = (QBoxLayout*)layout();
1766 1771
1767// QWidget *mainBox = new QWidget( this ); 1772// QWidget *mainBox = new QWidget( this );
1768// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); 1773// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox);
1769 1774
1770#ifdef DESKTOP_VERSION 1775#ifdef DESKTOP_VERSION
1771 topLayout = new QHBoxLayout( this ); 1776 topLayout = new QHBoxLayout( this );
1772 1777
1773 1778
1774 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1779 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1775 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1780 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1776 1781
1777 topLayout->addWidget(mMiniSplitter ); 1782 topLayout->addWidget(mMiniSplitter );
1778 1783
1779 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); 1784 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter );
1780 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1785 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1781 mViewManager = new ViewManager( this, mExtensionBarSplitter ); 1786 mViewManager = new ViewManager( this, mExtensionBarSplitter );
1782 mDetails = new ViewContainer( mMiniSplitter ); 1787 mDetails = new ViewContainer( mMiniSplitter );
1783 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1788 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1784#else 1789#else
1785 if ( QApplication::desktop()->width() > 480 ) { 1790 if ( QApplication::desktop()->width() > 480 ) {
1786 topLayout = new QHBoxLayout( this ); 1791 topLayout = new QHBoxLayout( this );
1787 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1792 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1788 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1793 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1789 } else { 1794 } else {
1790 1795
1791 topLayout = new QHBoxLayout( this ); 1796 topLayout = new QHBoxLayout( this );
1792 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); 1797 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
1793 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1798 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1794 } 1799 }
1795 1800
1796 topLayout->addWidget(mMiniSplitter ); 1801 topLayout->addWidget(mMiniSplitter );
1797 mViewManager = new ViewManager( this, mMiniSplitter ); 1802 mViewManager = new ViewManager( this, mMiniSplitter );
1798 mDetails = new ViewContainer( mMiniSplitter ); 1803 mDetails = new ViewContainer( mMiniSplitter );
1799 1804
1800 1805
1801 mExtensionManager = new ExtensionManager( this, mMiniSplitter ); 1806 mExtensionManager = new ExtensionManager( this, mMiniSplitter );
1802#endif 1807#endif
1803 //eh->hide(); 1808 //eh->hide();
1804 // topLayout->addWidget(mExtensionManager ); 1809 // topLayout->addWidget(mExtensionManager );
1805 1810
1806 1811
1807/*US 1812/*US
1808#ifndef KAB_NOSPLITTER 1813#ifndef KAB_NOSPLITTER
1809 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1814 QHBoxLayout *topLayout = new QHBoxLayout( this );
1810//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1815//US topLayout->setSpacing( KDialogBase::spacingHint() );
1811 topLayout->setSpacing( 10 ); 1816 topLayout->setSpacing( 10 );
1812 1817
1813 mDetailsSplitter = new QSplitter( this ); 1818 mDetailsSplitter = new QSplitter( this );
1814 1819
1815 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1820 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1816 1821
1817 mViewManager = new ViewManager( this, viewSpace ); 1822 mViewManager = new ViewManager( this, viewSpace );
1818 viewSpace->setStretchFactor( mViewManager, 1 ); 1823 viewSpace->setStretchFactor( mViewManager, 1 );
1819 1824
1820 mDetails = new ViewContainer( mDetailsSplitter ); 1825 mDetails = new ViewContainer( mDetailsSplitter );
1821 1826
1822 topLayout->addWidget( mDetailsSplitter ); 1827 topLayout->addWidget( mDetailsSplitter );
1823 topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1828 topLayout->setStretchFactor( mDetailsSplitter, 100 );
1824#else //KAB_NOSPLITTER 1829#else //KAB_NOSPLITTER
1825 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1830 QHBoxLayout *topLayout = new QHBoxLayout( this );
1826//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1831//US topLayout->setSpacing( KDialogBase::spacingHint() );
1827 topLayout->setSpacing( 10 ); 1832 topLayout->setSpacing( 10 );
1828 1833
1829// mDetailsSplitter = new QSplitter( this ); 1834// mDetailsSplitter = new QSplitter( this );
1830 1835
1831 QVBox *viewSpace = new QVBox( this ); 1836 QVBox *viewSpace = new QVBox( this );
1832 1837
1833 mViewManager = new ViewManager( this, viewSpace ); 1838 mViewManager = new ViewManager( this, viewSpace );
1834 viewSpace->setStretchFactor( mViewManager, 1 ); 1839 viewSpace->setStretchFactor( mViewManager, 1 );
1835 1840
1836 mDetails = new ViewContainer( this ); 1841 mDetails = new ViewContainer( this );
1837 1842
1838 topLayout->addWidget( viewSpace ); 1843 topLayout->addWidget( viewSpace );
1839// topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1844// topLayout->setStretchFactor( mDetailsSplitter, 100 );
1840 topLayout->addWidget( mDetails ); 1845 topLayout->addWidget( mDetails );
1841#endif //KAB_NOSPLITTER 1846#endif //KAB_NOSPLITTER
1842*/ 1847*/
1843 1848
1844 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 1849 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
1845 syncManager->setBlockSave(false); 1850 syncManager->setBlockSave(false);
1846 1851
1847 connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 1852 connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
1848 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 1853 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
1849 QString sync_file = sentSyncFile(); 1854 QString sync_file = sentSyncFile();
1850 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1()); 1855 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1());
1851 syncManager->setDefaultFileName( sync_file ); 1856 syncManager->setDefaultFileName( sync_file );
1852 //connect(syncManager , SIGNAL( ), this, SLOT( ) ); 1857 //connect(syncManager , SIGNAL( ), this, SLOT( ) );
1853 1858
1854#endif //KAB_EMBEDDED 1859#endif //KAB_EMBEDDED
1855 initActions(); 1860 initActions();
1856 1861
1857#ifdef KAB_EMBEDDED 1862#ifdef KAB_EMBEDDED
1858 addActionsManually(); 1863 addActionsManually();
1859 //US make sure the export and import menues are initialized before creating the xxPortManager. 1864 //US make sure the export and import menues are initialized before creating the xxPortManager.
1860 mXXPortManager = new XXPortManager( this, this ); 1865 mXXPortManager = new XXPortManager( this, this );
1861 1866
1862 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); 1867 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() );
1863 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); 1868 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget);
1864 // mActionQuit->plug ( mMainWindow->toolBar()); 1869 // mActionQuit->plug ( mMainWindow->toolBar());
1865 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); 1870 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() );
1866 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); 1871 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget);
1867 // mIncSearchWidget->hide(); 1872 // mIncSearchWidget->hide();
1868 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1873 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1869 SLOT( incrementalSearch( const QString& ) ) ); 1874 SLOT( incrementalSearch( const QString& ) ) );
1870 connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) ); 1875 connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) );
1871 connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) ); 1876 connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) );
1872 1877
1873 mJumpButtonBar = new JumpButtonBar( this, this ); 1878 mJumpButtonBar = new JumpButtonBar( this, this );
1874 1879
1875 topLayout->addWidget( mJumpButtonBar ); 1880 topLayout->addWidget( mJumpButtonBar );
1876//US topLayout->setStretchFactor( mJumpButtonBar, 10 ); 1881//US topLayout->setStretchFactor( mJumpButtonBar, 10 );
1877 1882
1878// mMainWindow->getIconToolBar()->raise(); 1883// mMainWindow->getIconToolBar()->raise();
1879 1884
1880#endif //KAB_EMBEDDED 1885#endif //KAB_EMBEDDED
1881 1886
1882} 1887}
1883void KABCore::initActions() 1888void KABCore::initActions()
1884{ 1889{
1885//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 1890//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
1886 1891
1887#ifndef KAB_EMBEDDED 1892#ifndef KAB_EMBEDDED
1888 connect( QApplication::clipboard(), SIGNAL( dataChanged() ), 1893 connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
1889 SLOT( clipboardDataChanged() ) ); 1894 SLOT( clipboardDataChanged() ) );
1890#endif //KAB_EMBEDDED 1895#endif //KAB_EMBEDDED
1891 1896
1892 // file menu 1897 // file menu
1893 1898
1894 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); 1899 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() );
1895 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); 1900 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() );
1896 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager, 1901 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager,
1897 SLOT( printView() ), actionCollection(), "kaddressbook_print" ); 1902 SLOT( printView() ), actionCollection(), "kaddressbook_print" );
1898 1903
1899 1904
1900 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails, 1905 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails,
1901 SLOT( printView() ), actionCollection(), "kaddressbook_print2" ); 1906 SLOT( printView() ), actionCollection(), "kaddressbook_print2" );
1902 1907
1903 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, 1908 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this,
1904 SLOT( save() ), actionCollection(), "file_sync" ); 1909 SLOT( save() ), actionCollection(), "file_sync" );
1905 1910
1906 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, 1911 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this,
1907 SLOT( newContact() ), actionCollection(), "file_new_contact" ); 1912 SLOT( newContact() ), actionCollection(), "file_new_contact" );
1908 1913
1909 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, 1914 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0,
1910 this, SLOT( mailVCard() ), 1915 this, SLOT( mailVCard() ),
1911 actionCollection(), "file_mail_vcard"); 1916 actionCollection(), "file_mail_vcard");
1912 1917
1913 mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this, 1918 mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this,
1914 SLOT( export2phone() ), actionCollection(), 1919 SLOT( export2phone() ), actionCollection(),
1915 "kaddressbook_ex2phone" ); 1920 "kaddressbook_ex2phone" );
1916 1921
1917 mActionBeamVCard = 0; 1922 mActionBeamVCard = 0;
1918 mActionBeam = 0; 1923 mActionBeam = 0;
1919 1924
1920#ifndef DESKTOP_VERSION 1925#ifndef DESKTOP_VERSION
1921 if ( Ir::supported() ) { 1926 if ( Ir::supported() ) {
1922 mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this, 1927 mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this,
1923 SLOT( beamVCard() ), actionCollection(), 1928 SLOT( beamVCard() ), actionCollection(),
1924 "kaddressbook_beam_vcard" ); 1929 "kaddressbook_beam_vcard" );
1925 1930
1926 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, 1931 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this,
1927 SLOT( beamMySelf() ), actionCollection(), 1932 SLOT( beamMySelf() ), actionCollection(),
1928 "kaddressbook_beam_myself" ); 1933 "kaddressbook_beam_myself" );
1929 } 1934 }
1930#endif 1935#endif
1931 1936
1932 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, 1937 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0,
1933 this, SLOT( editContact2() ), 1938 this, SLOT( editContact2() ),
1934 actionCollection(), "file_properties" ); 1939 actionCollection(), "file_properties" );
1935 1940
1936#ifdef KAB_EMBEDDED 1941#ifdef KAB_EMBEDDED
1937 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); 1942 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() );
1938 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, 1943 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0,
1939 mMainWindow, SLOT( exit() ), 1944 mMainWindow, SLOT( exit() ),
1940 actionCollection(), "quit" ); 1945 actionCollection(), "quit" );
1941#endif //KAB_EMBEDDED 1946#endif //KAB_EMBEDDED
1942 1947
1943 // edit menu 1948 // edit menu
1944 if ( mIsPart ) { 1949 if ( mIsPart ) {
1945 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, 1950 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this,
1946 SLOT( copyContacts() ), actionCollection(), 1951 SLOT( copyContacts() ), actionCollection(),
1947 "kaddressbook_copy" ); 1952 "kaddressbook_copy" );
1948 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, 1953 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this,
1949 SLOT( cutContacts() ), actionCollection(), 1954 SLOT( cutContacts() ), actionCollection(),
1950 "kaddressbook_cut" ); 1955 "kaddressbook_cut" );
1951 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, 1956 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this,
1952 SLOT( pasteContacts() ), actionCollection(), 1957 SLOT( pasteContacts() ), actionCollection(),
1953 "kaddressbook_paste" ); 1958 "kaddressbook_paste" );
1954 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, 1959 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this,
1955 SLOT( selectAllContacts() ), actionCollection(), 1960 SLOT( selectAllContacts() ), actionCollection(),
1956 "kaddressbook_select_all" ); 1961 "kaddressbook_select_all" );
1957 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, 1962 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this,
1958 SLOT( undo() ), actionCollection(), 1963 SLOT( undo() ), actionCollection(),
1959 "kaddressbook_undo" ); 1964 "kaddressbook_undo" );
1960 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, 1965 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z,
1961 this, SLOT( redo() ), actionCollection(), 1966 this, SLOT( redo() ), actionCollection(),
1962 "kaddressbook_redo" ); 1967 "kaddressbook_redo" );
1963 } else { 1968 } else {
1964 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); 1969 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() );
1965 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); 1970 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() );
1966 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); 1971 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() );
1967 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); 1972 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() );
1968 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); 1973 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() );
1969 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); 1974 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() );
1970 } 1975 }
1971 1976
1972 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", 1977 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
1973 Key_Delete, this, SLOT( deleteContacts() ), 1978 Key_Delete, this, SLOT( deleteContacts() ),
1974 actionCollection(), "edit_delete" ); 1979 actionCollection(), "edit_delete" );
1975 1980
1976 mActionUndo->setEnabled( false ); 1981 mActionUndo->setEnabled( false );
1977 mActionRedo->setEnabled( false ); 1982 mActionRedo->setEnabled( false );
1978 1983
1979 // settings menu 1984 // settings menu
1980#ifdef KAB_EMBEDDED 1985#ifdef KAB_EMBEDDED
1981//US special menuentry to configure the addressbook resources. On KDE 1986//US special menuentry to configure the addressbook resources. On KDE
1982// you do that through the control center !!! 1987// you do that through the control center !!!
1983 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, 1988 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this,
1984 SLOT( configureResources() ), actionCollection(), 1989 SLOT( configureResources() ), actionCollection(),
1985 "kaddressbook_configure_resources" ); 1990 "kaddressbook_configure_resources" );
1986#endif //KAB_EMBEDDED 1991#endif //KAB_EMBEDDED
1987 1992
1988 if ( mIsPart ) { 1993 if ( mIsPart ) {
1989 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, 1994 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this,
1990 SLOT( openConfigDialog() ), actionCollection(), 1995 SLOT( openConfigDialog() ), actionCollection(),
1991 "kaddressbook_configure" ); 1996 "kaddressbook_configure" );
1992 1997
1993 //US not implemented yet 1998 //US not implemented yet
1994 //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, 1999 //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0,
1995 // this, SLOT( configureKeyBindings() ), actionCollection(), 2000 // this, SLOT( configureKeyBindings() ), actionCollection(),
1996 // "kaddressbook_configure_shortcuts" ); 2001 // "kaddressbook_configure_shortcuts" );
1997#ifdef KAB_EMBEDDED 2002#ifdef KAB_EMBEDDED
1998 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); 2003 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() );
1999 mActionConfigureToolbars->setEnabled( false ); 2004 mActionConfigureToolbars->setEnabled( false );
2000#endif //KAB_EMBEDDED 2005#endif //KAB_EMBEDDED
2001 2006
2002 } else { 2007 } else {
2003 mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); 2008 mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() );
2004 2009
2005 //US not implemented yet 2010 //US not implemented yet
2006 //mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); 2011 //mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() );
2007 } 2012 }
2008 2013
2009 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, 2014 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0,
2010 actionCollection(), "options_show_jump_bar" ); 2015 actionCollection(), "options_show_jump_bar" );
2011 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) ); 2016 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) );
2012 2017
2013 mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0, 2018 mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0,
2014 actionCollection(), "options_show_details" ); 2019 actionCollection(), "options_show_details" );
2015 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); 2020 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) );
2016 2021
2017 2022
2018 mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this, 2023 mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this,
2019 SLOT( toggleBeamReceive() ), actionCollection(), 2024 SLOT( toggleBeamReceive() ), actionCollection(),
2020 "kaddressbook_beam_rec" ); 2025 "kaddressbook_beam_rec" );
2021 2026
2022 2027
2023 // misc 2028 // misc
2024 // only enable LDAP lookup if we can handle the protocol 2029 // only enable LDAP lookup if we can handle the protocol
2025#ifndef KAB_EMBEDDED 2030#ifndef KAB_EMBEDDED
2026 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { 2031 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) {
2027 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, 2032 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0,
2028 this, SLOT( openLDAPDialog() ), actionCollection(), 2033 this, SLOT( openLDAPDialog() ), actionCollection(),
2029 "ldap_lookup" ); 2034 "ldap_lookup" );
2030 } 2035 }
2031#else //KAB_EMBEDDED 2036#else //KAB_EMBEDDED
2032 //qDebug("KABCore::initActions() LDAP has to be implemented"); 2037 //qDebug("KABCore::initActions() LDAP has to be implemented");
2033#endif //KAB_EMBEDDED 2038#endif //KAB_EMBEDDED
2034 2039
2035 2040
2036 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, 2041 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this,
2037 SLOT( setWhoAmI() ), actionCollection(), 2042 SLOT( setWhoAmI() ), actionCollection(),
2038 "set_personal" ); 2043 "set_personal" );
2039 2044
2040 2045
2041 mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this, 2046 mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this,
2042 SLOT( setCategories() ), actionCollection(), 2047 SLOT( setCategories() ), actionCollection(),
2043 "edit_set_categories" ); 2048 "edit_set_categories" );
2044 mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this, 2049 mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this,
2045 SLOT( editCategories() ), actionCollection(), 2050 SLOT( editCategories() ), actionCollection(),
2046 "edit__categories" ); 2051 "edit__categories" );
2047 2052
2048 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, 2053 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this,
2049 SLOT( removeVoice() ), actionCollection(), 2054 SLOT( removeVoice() ), actionCollection(),
2050 "remove_voice" ); 2055 "remove_voice" );
2051 mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this, 2056 mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this,
2052 SLOT( setFormattedName() ), actionCollection(), 2057 SLOT( setFormattedName() ), actionCollection(),
2053 "set_formatted" ); 2058 "set_formatted" );
2054 2059
2055 mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, 2060 mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this,
2056 SLOT( manageCategories() ), actionCollection(), 2061 SLOT( manageCategories() ), actionCollection(),
2057 "remove_voice" ); 2062 "remove_voice" );
2058 2063
2059 2064
2060 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, 2065 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this,
2061 SLOT( importFromOL() ), actionCollection(), 2066 SLOT( importFromOL() ), actionCollection(),
2062 "import_OL" ); 2067 "import_OL" );
2063#ifdef KAB_EMBEDDED 2068#ifdef KAB_EMBEDDED
2064 mActionLicence = new KAction( i18n( "Licence" ), 0, 2069 mActionLicence = new KAction( i18n( "Licence" ), 0,
2065 this, SLOT( showLicence() ), actionCollection(), 2070 this, SLOT( showLicence() ), actionCollection(),
2066 "licence_about_data" ); 2071 "licence_about_data" );
2067 mActionFaq = new KAction( i18n( "Faq" ), 0, 2072 mActionFaq = new KAction( i18n( "Faq" ), 0,
2068 this, SLOT( faq() ), actionCollection(), 2073 this, SLOT( faq() ), actionCollection(),
2069 "faq_about_data" ); 2074 "faq_about_data" );
2070 mActionWN = new KAction( i18n( "What's New?" ), 0, 2075 mActionWN = new KAction( i18n( "What's New?" ), 0,
2071 this, SLOT( whatsnew() ), actionCollection(), 2076 this, SLOT( whatsnew() ), actionCollection(),
2072 "wn" ); 2077 "wn" );
2073 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, 2078 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0,
2074 this, SLOT( synchowto() ), actionCollection(), 2079 this, SLOT( synchowto() ), actionCollection(),
2075 "sync" ); 2080 "sync" );
2076 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, 2081 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0,
2077 this, SLOT( kdesynchowto() ), actionCollection(), 2082 this, SLOT( kdesynchowto() ), actionCollection(),
2078 "kdesync" ); 2083 "kdesync" );
2079 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, 2084 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0,
2080 this, SLOT( multisynchowto() ), actionCollection(), 2085 this, SLOT( multisynchowto() ), actionCollection(),
2081 "multisync" ); 2086 "multisync" );
2082 2087
2083 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, 2088 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
2084 this, SLOT( createAboutData() ), actionCollection(), 2089 this, SLOT( createAboutData() ), actionCollection(),
2085 "kaddressbook_about_data" ); 2090 "kaddressbook_about_data" );
2086#endif //KAB_EMBEDDED 2091#endif //KAB_EMBEDDED
2087 2092
2088 clipboardDataChanged(); 2093 clipboardDataChanged();
2089 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2094 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2090 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2095 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2091} 2096}
2092 2097
2093//US we need this function, to plug all actions into the correct menues. 2098//US we need this function, to plug all actions into the correct menues.
2094// KDE uses a XML format to plug the actions, but we work her without this overhead. 2099// KDE uses a XML format to plug the actions, but we work her without this overhead.
2095void KABCore::addActionsManually() 2100void KABCore::addActionsManually()
2096{ 2101{
2097//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 2102//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
2098 2103
2099#ifdef KAB_EMBEDDED 2104#ifdef KAB_EMBEDDED
2100 QPopupMenu *fileMenu = new QPopupMenu( this ); 2105 QPopupMenu *fileMenu = new QPopupMenu( this );
2101 QPopupMenu *editMenu = new QPopupMenu( this ); 2106 QPopupMenu *editMenu = new QPopupMenu( this );
2102 QPopupMenu *helpMenu = new QPopupMenu( this ); 2107 QPopupMenu *helpMenu = new QPopupMenu( this );
2103 2108
2104 KToolBar* tb = mMainWindow->toolBar(); 2109 KToolBar* tb = mMainWindow->toolBar();
2105 2110
2106#ifndef DESKTOP_VERSION 2111#ifndef DESKTOP_VERSION
2107 if ( KABPrefs::instance()->mFullMenuBarVisible ) { 2112 if ( KABPrefs::instance()->mFullMenuBarVisible ) {
2108#endif 2113#endif
2109 QMenuBar* mb = mMainWindow->menuBar(); 2114 QMenuBar* mb = mMainWindow->menuBar();
2110 2115
2111 //US setup menubar. 2116 //US setup menubar.
2112 //Disable the following block if you do not want to have a menubar. 2117 //Disable the following block if you do not want to have a menubar.
2113 mb->insertItem( i18n("&File"), fileMenu ); 2118 mb->insertItem( i18n("&File"), fileMenu );
2114 mb->insertItem( i18n("&Edit"), editMenu ); 2119 mb->insertItem( i18n("&Edit"), editMenu );
2115 mb->insertItem( i18n("&View"), viewMenu ); 2120 mb->insertItem( i18n("&View"), viewMenu );
2116 mb->insertItem( i18n("&Settings"), settingsMenu ); 2121 mb->insertItem( i18n("&Settings"), settingsMenu );
2117#ifdef DESKTOP_VERSION 2122#ifdef DESKTOP_VERSION
2118 mb->insertItem( i18n("Synchronize"), syncMenu ); 2123 mb->insertItem( i18n("Synchronize"), syncMenu );
2119#else 2124#else
2120 mb->insertItem( i18n("Sync"), syncMenu ); 2125 mb->insertItem( i18n("Sync"), syncMenu );
2121#endif 2126#endif
2122 //mb->insertItem( i18n("&Change"), changeMenu ); 2127 //mb->insertItem( i18n("&Change"), changeMenu );
2123 mb->insertItem( i18n("&Help"), helpMenu ); 2128 mb->insertItem( i18n("&Help"), helpMenu );
2124 mIncSearchWidget = new IncSearchWidget( tb ); 2129 mIncSearchWidget = new IncSearchWidget( tb );
2125 // tb->insertWidget(-1, 0, mIncSearchWidget); 2130 // tb->insertWidget(-1, 0, mIncSearchWidget);
2126#ifndef DESKTOP_VERSION 2131#ifndef DESKTOP_VERSION
2127 } else { 2132 } else {
2128 //US setup toolbar 2133 //US setup toolbar
2129 QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); 2134 QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
2130 QPopupMenu *popupBarTB = new QPopupMenu( this ); 2135 QPopupMenu *popupBarTB = new QPopupMenu( this );
2131 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); 2136 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB);
2132 tb->insertWidget(-1, 0, menuBarTB); 2137 tb->insertWidget(-1, 0, menuBarTB);
2133 mIncSearchWidget = new IncSearchWidget( tb ); 2138 mIncSearchWidget = new IncSearchWidget( tb );
2134 tb->enableMoving(false); 2139 tb->enableMoving(false);
2135 popupBarTB->insertItem( i18n("&File"), fileMenu ); 2140 popupBarTB->insertItem( i18n("&File"), fileMenu );
2136 popupBarTB->insertItem( i18n("&Edit"), editMenu ); 2141 popupBarTB->insertItem( i18n("&Edit"), editMenu );
2137 popupBarTB->insertItem( i18n("&View"), viewMenu ); 2142 popupBarTB->insertItem( i18n("&View"), viewMenu );
2138 popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); 2143 popupBarTB->insertItem( i18n("&Settings"), settingsMenu );
2139 popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); 2144 popupBarTB->insertItem( i18n("Synchronize"), syncMenu );
2140 mViewManager->getFilterAction()->plug ( popupBarTB); 2145 mViewManager->getFilterAction()->plug ( popupBarTB);
2141 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); 2146 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu );
2142 popupBarTB->insertItem( i18n("&Help"), helpMenu ); 2147 popupBarTB->insertItem( i18n("&Help"), helpMenu );
2143 if (QApplication::desktop()->width() > 320 ) { 2148 if (QApplication::desktop()->width() > 320 ) {
2144 // mViewManager->getFilterAction()->plug ( tb); 2149 // mViewManager->getFilterAction()->plug ( tb);
2145 } 2150 }
2146 } 2151 }
2147#endif 2152#endif
2148 // mActionQuit->plug ( mMainWindow->toolBar()); 2153 // mActionQuit->plug ( mMainWindow->toolBar());
2149 2154
2150 2155
2151 2156
2152 //US Now connect the actions with the menue entries. 2157 //US Now connect the actions with the menue entries.
2153#ifdef DESKTOP_VERSION 2158#ifdef DESKTOP_VERSION
2154 mActionPrint->plug( fileMenu ); 2159 mActionPrint->plug( fileMenu );
2155 mActionPrintDetails->plug( fileMenu ); 2160 mActionPrintDetails->plug( fileMenu );
2156 fileMenu->insertSeparator(); 2161 fileMenu->insertSeparator();
2157#endif 2162#endif
2158 mActionMail->plug( fileMenu ); 2163 mActionMail->plug( fileMenu );
2159 fileMenu->insertSeparator(); 2164 fileMenu->insertSeparator();
2160 2165
2161 mActionNewContact->plug( fileMenu ); 2166 mActionNewContact->plug( fileMenu );
2162 mActionNewContact->plug( tb ); 2167 mActionNewContact->plug( tb );
2163 2168
2164 mActionEditAddressee->plug( fileMenu ); 2169 mActionEditAddressee->plug( fileMenu );
2165 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || 2170 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) ||
2166 // (!KABPrefs::instance()->mMultipleViewsAtOnce )) 2171 // (!KABPrefs::instance()->mMultipleViewsAtOnce ))
2167 mActionEditAddressee->plug( tb ); 2172 mActionEditAddressee->plug( tb );
2168 2173
2169 fileMenu->insertSeparator(); 2174 fileMenu->insertSeparator();
2170 mActionSave->plug( fileMenu ); 2175 mActionSave->plug( fileMenu );
2171 fileMenu->insertItem( "&Import", ImportMenu ); 2176 fileMenu->insertItem( "&Import", ImportMenu );
2172 fileMenu->insertItem( "&Export", ExportMenu ); 2177 fileMenu->insertItem( "&Export", ExportMenu );
2173 fileMenu->insertItem( i18n("&Change"), changeMenu ); 2178 fileMenu->insertItem( i18n("&Change"), changeMenu );
2174#ifndef DESKTOP_VERSION 2179#ifndef DESKTOP_VERSION
2175 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); 2180 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu );
2176#endif 2181#endif
2177#if 0 2182#if 0
2178 // PENDING fix MailVCard 2183 // PENDING fix MailVCard
2179 fileMenu->insertSeparator(); 2184 fileMenu->insertSeparator();
2180 mActionMailVCard->plug( fileMenu ); 2185 mActionMailVCard->plug( fileMenu );
2181#endif 2186#endif
2182#ifndef DESKTOP_VERSION 2187#ifndef DESKTOP_VERSION
2183 if ( Ir::supported() ) mActionBR->plug( beamMenu ); 2188 if ( Ir::supported() ) mActionBR->plug( beamMenu );
2184 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); 2189 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu );
2185 if ( Ir::supported() ) mActionBeam->plug( beamMenu ); 2190 if ( Ir::supported() ) mActionBeam->plug( beamMenu );
2186#endif 2191#endif
2187 fileMenu->insertSeparator(); 2192 fileMenu->insertSeparator();
2188 mActionQuit->plug( fileMenu ); 2193 mActionQuit->plug( fileMenu );
2189#ifdef _OL_IMPORT_ 2194#ifdef _OL_IMPORT_
2190 mActionImportOL->plug( ImportMenu ); 2195 mActionImportOL->plug( ImportMenu );
2191#endif 2196#endif
2192 // edit menu 2197 // edit menu
2193 mActionUndo->plug( editMenu ); 2198 mActionUndo->plug( editMenu );
2194 mActionRedo->plug( editMenu ); 2199 mActionRedo->plug( editMenu );
2195 editMenu->insertSeparator(); 2200 editMenu->insertSeparator();
2196 mActionCut->plug( editMenu ); 2201 mActionCut->plug( editMenu );
2197 mActionCopy->plug( editMenu ); 2202 mActionCopy->plug( editMenu );
2198 mActionPaste->plug( editMenu ); 2203 mActionPaste->plug( editMenu );
2199 mActionDelete->plug( editMenu ); 2204 mActionDelete->plug( editMenu );
2200 editMenu->insertSeparator(); 2205 editMenu->insertSeparator();
2201 mActionSelectAll->plug( editMenu ); 2206 mActionSelectAll->plug( editMenu );
2202 2207
2203 mActionSetFormattedName->plug( changeMenu ); 2208 mActionSetFormattedName->plug( changeMenu );
2204 mActionRemoveVoice->plug( changeMenu ); 2209 mActionRemoveVoice->plug( changeMenu );
2205 // settingsmings menu 2210 // settingsmings menu
2206//US special menuentry to configure the addressbook resources. On KDE 2211//US special menuentry to configure the addressbook resources. On KDE
2207// you do that through the control center !!! 2212// you do that through the control center !!!
2208 // settingsMenu->insertSeparator(); 2213 // settingsMenu->insertSeparator();
2209 2214
2210 mActionConfigKAddressbook->plug( settingsMenu, 0 ); 2215 mActionConfigKAddressbook->plug( settingsMenu, 0 );
2211 mActionConfigResources->plug( settingsMenu,1 ); 2216 mActionConfigResources->plug( settingsMenu,1 );
2212 settingsMenu->insertSeparator(2); 2217 settingsMenu->insertSeparator(2);
2213 2218
2214 if ( mIsPart ) { 2219 if ( mIsPart ) {
2215 //US not implemented yet 2220 //US not implemented yet
2216 //mActionConfigShortcuts->plug( settingsMenu ); 2221 //mActionConfigShortcuts->plug( settingsMenu );
2217 //mActionConfigureToolbars->plug( settingsMenu ); 2222 //mActionConfigureToolbars->plug( settingsMenu );
2218 2223
2219 } else { 2224 } else {
2220 //US not implemented yet 2225 //US not implemented yet
2221 //mActionKeyBindings->plug( settingsMenu ); 2226 //mActionKeyBindings->plug( settingsMenu );
2222 } 2227 }
2223 2228
2224 settingsMenu->insertSeparator(); 2229 settingsMenu->insertSeparator();
2225 2230
2226 mActionJumpBar->plug( settingsMenu ); 2231 mActionJumpBar->plug( settingsMenu );
2227 mActionDetails->plug( settingsMenu ); 2232 mActionDetails->plug( settingsMenu );
2228 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) 2233 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
2229 mActionDetails->plug( tb ); 2234 mActionDetails->plug( tb );
2230 settingsMenu->insertSeparator(); 2235 settingsMenu->insertSeparator();
2231#ifndef DESKTOP_VERSION 2236#ifndef DESKTOP_VERSION
2232 if ( Ir::supported() ) mActionBR->plug(settingsMenu ); 2237 if ( Ir::supported() ) mActionBR->plug(settingsMenu );
2233 settingsMenu->insertSeparator(); 2238 settingsMenu->insertSeparator();
2234#endif 2239#endif
2235 2240
2236 mActionWhoAmI->plug( settingsMenu ); 2241 mActionWhoAmI->plug( settingsMenu );
2237 mActionEditCategories->plug( settingsMenu ); 2242 mActionEditCategories->plug( settingsMenu );
2238 mActionEditCategories->plug( changeMenu ); 2243 mActionEditCategories->plug( changeMenu );
2239 mActionCategories->plug( changeMenu ); 2244 mActionCategories->plug( changeMenu );
2240 mActionManageCategories->plug( changeMenu ); 2245 mActionManageCategories->plug( changeMenu );
2241 2246
2242 mActionCategories->plug( settingsMenu ); 2247 mActionCategories->plug( settingsMenu );
2243 mActionManageCategories->plug( settingsMenu ); 2248 mActionManageCategories->plug( settingsMenu );
2244 2249
2245 2250
2246 mActionWN->plug( helpMenu ); 2251 mActionWN->plug( helpMenu );
2247 mActionSyncHowto->plug( helpMenu ); 2252 mActionSyncHowto->plug( helpMenu );
2248 mActionKdeSyncHowto->plug( helpMenu ); 2253 mActionKdeSyncHowto->plug( helpMenu );
2249 mActionMultiSyncHowto->plug( helpMenu ); 2254 mActionMultiSyncHowto->plug( helpMenu );
2250 mActionFaq->plug( helpMenu ); 2255 mActionFaq->plug( helpMenu );
2251 mActionLicence->plug( helpMenu ); 2256 mActionLicence->plug( helpMenu );
2252 mActionAboutKAddressbook->plug( helpMenu ); 2257 mActionAboutKAddressbook->plug( helpMenu );
2253 2258
2254 if (KGlobal::getDesktopSize() > KGlobal::Small ) { 2259 if (KGlobal::getDesktopSize() > KGlobal::Small ) {
2255 2260
2256 mActionSave->plug( tb ); 2261 mActionSave->plug( tb );
2257 mViewManager->getFilterAction()->plug ( tb); 2262 mViewManager->getFilterAction()->plug ( tb);
2258 //LR hide filteraction on started in 480x640 2263 //LR hide filteraction on started in 480x640
2259 if (QApplication::desktop()->width() == 480 ) { 2264 if (QApplication::desktop()->width() == 480 ) {
2260 mViewManager->getFilterAction()->setComboWidth( 0 ); 2265 mViewManager->getFilterAction()->setComboWidth( 0 );
2261 } 2266 }
2262 mActionUndo->plug( tb ); 2267 mActionUndo->plug( tb );
2263 mActionDelete->plug( tb ); 2268 mActionDelete->plug( tb );
2264 mActionRedo->plug( tb ); 2269 mActionRedo->plug( tb );
2265 } else { 2270 } else {
2266 mActionSave->plug( tb ); 2271 mActionSave->plug( tb );
2267 tb->enableMoving(false); 2272 tb->enableMoving(false);
2268 } 2273 }
2269 //mActionQuit->plug ( tb ); 2274 //mActionQuit->plug ( tb );
2270 // tb->insertWidget(-1, 0, mIncSearchWidget, 6); 2275 // tb->insertWidget(-1, 0, mIncSearchWidget, 6);
2271 2276
2272 //US link the searchwidget first to this. 2277 //US link the searchwidget first to this.
2273 // The real linkage to the toolbar happens later. 2278 // The real linkage to the toolbar happens later.
2274//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); 2279//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
2275//US tb->insertItem( mIncSearchWidget ); 2280//US tb->insertItem( mIncSearchWidget );
2276/*US 2281/*US
2277 mIncSearchWidget = new IncSearchWidget( tb ); 2282 mIncSearchWidget = new IncSearchWidget( tb );
2278 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 2283 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
2279 SLOT( incrementalSearch( const QString& ) ) ); 2284 SLOT( incrementalSearch( const QString& ) ) );
2280 2285
2281 mJumpButtonBar = new JumpButtonBar( this, this ); 2286 mJumpButtonBar = new JumpButtonBar( this, this );
2282 2287
2283//US topLayout->addWidget( mJumpButtonBar ); 2288//US topLayout->addWidget( mJumpButtonBar );
2284 this->layout()->add( mJumpButtonBar ); 2289 this->layout()->add( mJumpButtonBar );
2285*/ 2290*/
2286 2291
2287#endif //KAB_EMBEDDED 2292#endif //KAB_EMBEDDED
2288 2293
2289 mActionExport2phone->plug( ExportMenu ); 2294 mActionExport2phone->plug( ExportMenu );
2290 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); 2295 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) );
2291 syncManager->fillSyncMenu(); 2296 syncManager->fillSyncMenu();
2292 2297
2293} 2298}
2294void KABCore::showLicence() 2299void KABCore::showLicence()
2295{ 2300{
2296 KApplication::showLicence(); 2301 KApplication::showLicence();
2297} 2302}
2298 2303
2299void KABCore::manageCategories( ) 2304void KABCore::manageCategories( )
2300{ 2305{
2301 KABCatPrefs* cp = new KABCatPrefs(); 2306 KABCatPrefs* cp = new KABCatPrefs();
2302 cp->show(); 2307 cp->show();
2303 int w =cp->sizeHint().width() ; 2308 int w =cp->sizeHint().width() ;
2304 int h = cp->sizeHint().height() ; 2309 int h = cp->sizeHint().height() ;
2305 int dw = QApplication::desktop()->width(); 2310 int dw = QApplication::desktop()->width();
2306 int dh = QApplication::desktop()->height(); 2311 int dh = QApplication::desktop()->height();
2307 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2312 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2308 if ( !cp->exec() ) { 2313 if ( !cp->exec() ) {
2309 delete cp; 2314 delete cp;
2310 return; 2315 return;
2311 } 2316 }
2312 int count = 0; 2317 int count = 0;
2313 int cc = 0; 2318 int cc = 0;
2314 message( i18n("Please wait, processing categories...")); 2319 message( i18n("Please wait, processing categories..."));
2315 if ( cp->addCat() ) { 2320 if ( cp->addCat() ) {
2316 KABC::AddressBook::Iterator it; 2321 KABC::AddressBook::Iterator it;
2317 QStringList catList = KABPrefs::instance()->mCustomCategories; 2322 QStringList catList = KABPrefs::instance()->mCustomCategories;
2318 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2323 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2319 ++cc; 2324 ++cc;
2320 if ( cc %10 == 0) 2325 if ( cc %10 == 0)
2321 message(i18n("Processing contact #%1").arg(cc)); 2326 message(i18n("Processing contact #%1").arg(cc));
2322 QStringList catIncList = (*it).categories(); 2327 QStringList catIncList = (*it).categories();
2323 int i; 2328 int i;
2324 for( i = 0; i< catIncList.count(); ++i ) { 2329 for( i = 0; i< catIncList.count(); ++i ) {
2325 if ( !catList.contains (catIncList[i])) { 2330 if ( !catList.contains (catIncList[i])) {
2326 catList.append( catIncList[i] ); 2331 catList.append( catIncList[i] );
2327 //qDebug("add cat %s ", catIncList[i].latin1()); 2332 //qDebug("add cat %s ", catIncList[i].latin1());
2328 ++count; 2333 ++count;
2329 } 2334 }
2330 } 2335 }
2331 } 2336 }
2332 catList.sort(); 2337 catList.sort();
2333 KABPrefs::instance()->mCustomCategories = catList; 2338 KABPrefs::instance()->mCustomCategories = catList;
2334 KABPrefs::instance()->writeConfig(); 2339 KABPrefs::instance()->writeConfig();
2335 message(QString::number( count )+ i18n(" categories added to list! ")); 2340 message(QString::number( count )+ i18n(" categories added to list! "));
2336 } else { 2341 } else {
2337 QStringList catList = KABPrefs::instance()->mCustomCategories; 2342 QStringList catList = KABPrefs::instance()->mCustomCategories;
2338 QStringList catIncList; 2343 QStringList catIncList;
2339 QStringList newCatList; 2344 QStringList newCatList;
2340 KABC::AddressBook::Iterator it; 2345 KABC::AddressBook::Iterator it;
2341 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2346 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2342 ++cc; 2347 ++cc;
2343 if ( cc %10 == 0) 2348 if ( cc %10 == 0)
2344 message(i18n("Processing contact #%1").arg(cc)); 2349 message(i18n("Processing contact #%1").arg(cc));
2345 QStringList catIncList = (*it).categories(); 2350 QStringList catIncList = (*it).categories();
2346 int i; 2351 int i;
2347 if ( catIncList.count() ) { 2352 if ( catIncList.count() ) {
2348 newCatList.clear(); 2353 newCatList.clear();
2349 for( i = 0; i< catIncList.count(); ++i ) { 2354 for( i = 0; i< catIncList.count(); ++i ) {
2350 if ( catList.contains (catIncList[i])) { 2355 if ( catList.contains (catIncList[i])) {
2351 newCatList.append( catIncList[i] ); 2356 newCatList.append( catIncList[i] );
2352 } 2357 }
2353 } 2358 }
2354 newCatList.sort(); 2359 newCatList.sort();
2355 (*it).setCategories( newCatList ); 2360 (*it).setCategories( newCatList );
2356 mAddressBook->insertAddressee( (*it) ); 2361 mAddressBook->insertAddressee( (*it) );
2357 } 2362 }
2358 } 2363 }
2359 setModified( true ); 2364 setModified( true );
2360 mViewManager->refreshView(); 2365 mViewManager->refreshView();
2361 message( i18n("Removing categories done!")); 2366 message( i18n("Removing categories done!"));
2362 } 2367 }
2363 delete cp; 2368 delete cp;
2364} 2369}
2365void KABCore::removeVoice() 2370void KABCore::removeVoice()
2366{ 2371{
2367 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 ) 2372 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 )
2368 return; 2373 return;
2369 XXPortSelectDialog dlg( this, false, this ); 2374 XXPortSelectDialog dlg( this, false, this );
2370 if ( !dlg.exec() ) 2375 if ( !dlg.exec() )
2371 return; 2376 return;
2372 mAddressBook->setUntagged(); 2377 mAddressBook->setUntagged();
2373 dlg.tagSelected(); 2378 dlg.tagSelected();
2374 message(i18n("Removing voice..."), false ); 2379 message(i18n("Removing voice..."), false );
2375 KABC::AddressBook::Iterator it; 2380 KABC::AddressBook::Iterator it;
2376 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2381 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2377 if ( (*it).tagged() ) { 2382 if ( (*it).tagged() ) {
2378 (*it).removeVoice(); 2383 (*it).removeVoice();
2379 } 2384 }
2380 } 2385 }
2381 message(i18n("Refreshing view...") ); 2386 message(i18n("Refreshing view...") );
2382 qApp->processEvents(); 2387 qApp->processEvents();
2383 mViewManager->refreshView( "" ); 2388 mViewManager->refreshView( "" );
2384 Addressee add; 2389 Addressee add;
2385 mDetails->setAddressee( add ); 2390 mDetails->setAddressee( add );
2386 message(i18n("Remove voice completed!") ); 2391 message(i18n("Remove voice completed!") );
2387 2392
2388 2393
2389 2394
2390} 2395}
2391 2396
2392void KABCore::setFormattedName() 2397void KABCore::setFormattedName()
2393{ 2398{
2394 KABFormatPrefs setpref; 2399 KABFormatPrefs setpref;
2395 if ( !setpref.exec() ) { 2400 if ( !setpref.exec() ) {
2396 return; 2401 return;
2397 } 2402 }
2398 XXPortSelectDialog dlg( this, false, this ); 2403 XXPortSelectDialog dlg( this, false, this );
2399 if ( !dlg.exec() ) 2404 if ( !dlg.exec() )
2400 return; 2405 return;
2401 mAddressBook->setUntagged(); 2406 mAddressBook->setUntagged();
2402 dlg.tagSelected(); 2407 dlg.tagSelected();
2403 int count = 0; 2408 int count = 0;
2404 KABC::AddressBook::Iterator it; 2409 KABC::AddressBook::Iterator it;
2405 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2410 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2406 if ( (*it).tagged() ) { 2411 if ( (*it).tagged() ) {
2407 ++count; 2412 ++count;
2408 if ( count %10 == 0 ) 2413 if ( count %10 == 0 )
2409 message(i18n("Changing contact #%1").arg( count ) ); 2414 message(i18n("Changing contact #%1").arg( count ) );
2410 qApp->processEvents(); 2415 qApp->processEvents();
2411 QString fName; 2416 QString fName;
2412 if ( setpref.simple->isChecked() ) 2417 if ( setpref.simple->isChecked() )
2413 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); 2418 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName );
2414 else if ( setpref.full->isChecked() ) 2419 else if ( setpref.full->isChecked() )
2415 fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); 2420 fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName );
2416 else if ( setpref.reverse->isChecked() ) 2421 else if ( setpref.reverse->isChecked() )
2417 fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); 2422 fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName );
2418 else 2423 else
2419 fName = (*it).organization(); 2424 fName = (*it).organization();
2420 if ( setpref.setCompany->isChecked() ) 2425 if ( setpref.setCompany->isChecked() )
2421 if ( fName.isEmpty() || fName =="," ) 2426 if ( fName.isEmpty() || fName =="," )
2422 fName = (*it).organization(); 2427 fName = (*it).organization();
2423 (*it).setFormattedName( fName ); 2428 (*it).setFormattedName( fName );
2424 } 2429 }
2425 } 2430 }
2426 message(i18n("Refreshing view...") ); 2431 message(i18n("Refreshing view...") );
2427 qApp->processEvents(); 2432 qApp->processEvents();
2428 mViewManager->refreshView( "" ); 2433 mViewManager->refreshView( "" );
2429 Addressee add; 2434 Addressee add;
2430 mDetails->setAddressee( add ); 2435 mDetails->setAddressee( add );
2431 message(i18n("Setting formatted name completed!") ); 2436 message(i18n("Setting formatted name completed!") );
2432} 2437}
2433 2438
2434void KABCore::clipboardDataChanged() 2439void KABCore::clipboardDataChanged()
2435{ 2440{
2436 2441
2437 if ( mReadWrite ) 2442 if ( mReadWrite )
2438 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); 2443 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() );
2439 2444
2440} 2445}
2441 2446
2442void KABCore::updateActionMenu() 2447void KABCore::updateActionMenu()
2443{ 2448{
2444 UndoStack *undo = UndoStack::instance(); 2449 UndoStack *undo = UndoStack::instance();
2445 RedoStack *redo = RedoStack::instance(); 2450 RedoStack *redo = RedoStack::instance();
2446 2451
2447 if ( undo->isEmpty() ) 2452 if ( undo->isEmpty() )
2448 mActionUndo->setText( i18n( "Undo" ) ); 2453 mActionUndo->setText( i18n( "Undo" ) );
2449 else 2454 else
2450 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); 2455 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) );
2451 2456
2452 mActionUndo->setEnabled( !undo->isEmpty() ); 2457 mActionUndo->setEnabled( !undo->isEmpty() );
2453 2458
2454 if ( !redo->top() ) 2459 if ( !redo->top() )
2455 mActionRedo->setText( i18n( "Redo" ) ); 2460 mActionRedo->setText( i18n( "Redo" ) );
2456 else 2461 else
2457 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); 2462 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) );
2458 2463
2459 mActionRedo->setEnabled( !redo->isEmpty() ); 2464 mActionRedo->setEnabled( !redo->isEmpty() );
2460} 2465}
2461 2466
2462void KABCore::configureKeyBindings() 2467void KABCore::configureKeyBindings()
2463{ 2468{
2464#ifndef KAB_EMBEDDED 2469#ifndef KAB_EMBEDDED
2465 KKeyDialog::configure( actionCollection(), true ); 2470 KKeyDialog::configure( actionCollection(), true );
2466#else //KAB_EMBEDDED 2471#else //KAB_EMBEDDED
2467 qDebug("KABCore::configureKeyBindings() not implemented"); 2472 qDebug("KABCore::configureKeyBindings() not implemented");
2468#endif //KAB_EMBEDDED 2473#endif //KAB_EMBEDDED
2469} 2474}
2470 2475
2471#ifdef KAB_EMBEDDED 2476#ifdef KAB_EMBEDDED
2472void KABCore::configureResources() 2477void KABCore::configureResources()
2473{ 2478{
2474 KRES::KCMKResources dlg( this, "" , 0 ); 2479 KRES::KCMKResources dlg( this, "" , 0 );
2475 2480
2476 if ( !dlg.exec() ) 2481 if ( !dlg.exec() )
2477 return; 2482 return;
2478 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); 2483 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") );
2479} 2484}
2480#endif //KAB_EMBEDDED 2485#endif //KAB_EMBEDDED
2481 2486
2482 2487
2483/* this method will be called through the QCop interface from Ko/Pi to select addresses 2488/* this method will be called through the QCop interface from Ko/Pi to select addresses
2484 * for the attendees list of an event. 2489 * for the attendees list of an event.
2485 */ 2490 */
2486void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) 2491void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
2487{ 2492{
2488 QStringList nameList; 2493 QStringList nameList;
2489 QStringList emailList; 2494 QStringList emailList;
2490 QStringList uidList; 2495 QStringList uidList;
2491 2496
2492 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 2497 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
2493 uint i=0; 2498 uint i=0;
2494 for (i=0; i < list.count(); i++) 2499 for (i=0; i < list.count(); i++)
2495 { 2500 {
2496 nameList.append(list[i].realName()); 2501 nameList.append(list[i].realName());
2497 emailList.append(list[i].preferredEmail()); 2502 emailList.append(list[i].preferredEmail());
2498 uidList.append(list[i].uid()); 2503 uidList.append(list[i].uid());
2499 } 2504 }
2500 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); 2505 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
2501 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList); 2506 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(sourceChannel, uid, nameList, emailList, uidList);
2502 2507
2503} 2508}
2504 2509
2505/* this method will be called through the QCop interface from Ko/Pi to select birthdays 2510/* this method will be called through the QCop interface from Ko/Pi to select birthdays
2506 * to put them into the calendar. 2511 * to put them into the calendar.
2507 */ 2512 */
2508void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) 2513void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid)
2509{ 2514{
2510 // qDebug("KABCore::requestForBirthdayList"); 2515 // qDebug("KABCore::requestForBirthdayList");
2511 QStringList birthdayList; 2516 QStringList birthdayList;
2512 QStringList anniversaryList; 2517 QStringList anniversaryList;
2513 QStringList realNameList; 2518 QStringList realNameList;
2514 QStringList preferredEmailList; 2519 QStringList preferredEmailList;
2515 QStringList assembledNameList; 2520 QStringList assembledNameList;
2516 QStringList uidList; 2521 QStringList uidList;
2517 2522
2518 KABC::AddressBook::Iterator it; 2523 KABC::AddressBook::Iterator it;
2519 2524
2520 int count = 0; 2525 int count = 0;
2521 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2526 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2522 ++count; 2527 ++count;
2523 } 2528 }
2524 QProgressBar bar(count,0 ); 2529 QProgressBar bar(count,0 );
2525 int w = 300; 2530 int w = 300;
2526 if ( QApplication::desktop()->width() < 320 ) 2531 if ( QApplication::desktop()->width() < 320 )
2527 w = 220; 2532 w = 220;
2528 int h = bar.sizeHint().height() ; 2533 int h = bar.sizeHint().height() ;
2529 int dw = QApplication::desktop()->width(); 2534 int dw = QApplication::desktop()->width();
2530 int dh = QApplication::desktop()->height(); 2535 int dh = QApplication::desktop()->height();
2531 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2536 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2532 bar.show(); 2537 bar.show();
2533 bar.setCaption (i18n("Collecting birthdays - close to abort!") ); 2538 bar.setCaption (i18n("Collecting birthdays - close to abort!") );
2534 qApp->processEvents(); 2539 qApp->processEvents();
2535 2540
2536 QDate bday; 2541 QDate bday;
2537 QString anni; 2542 QString anni;
2538 QString formattedbday; 2543 QString formattedbday;
2539 2544
2540 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) 2545 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it )
2541 { 2546 {
2542 if ( ! bar.isVisible() ) 2547 if ( ! bar.isVisible() )
2543 return; 2548 return;
2544 bar.setProgress( count++ ); 2549 bar.setProgress( count++ );
2545 qApp->processEvents(); 2550 qApp->processEvents();
2546 bday = (*it).birthday().date(); 2551 bday = (*it).birthday().date();
2547 anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); 2552 anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" );
2548 2553
2549 if ( bday.isValid() || !anni.isEmpty()) 2554 if ( bday.isValid() || !anni.isEmpty())
2550 { 2555 {
2551 if (bday.isValid()) 2556 if (bday.isValid())
2552 formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); 2557 formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate);
2553 else 2558 else
2554 formattedbday = "NOTVALID"; 2559 formattedbday = "NOTVALID";
2555 if (anni.isEmpty()) 2560 if (anni.isEmpty())
2556 anni = "INVALID"; 2561 anni = "INVALID";
2557 2562
2558 birthdayList.append(formattedbday); 2563 birthdayList.append(formattedbday);
2559 anniversaryList.append(anni); //should be ISODate 2564 anniversaryList.append(anni); //should be ISODate
2560 realNameList.append((*it).realName()); 2565 realNameList.append((*it).realName());
2561 preferredEmailList.append((*it).preferredEmail()); 2566 preferredEmailList.append((*it).preferredEmail());
2562 assembledNameList.append((*it).assembledName()); 2567 assembledNameList.append((*it).assembledName());
2563 uidList.append((*it).uid()); 2568 uidList.append((*it).uid());
2564 2569
2565 //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() ); 2570 //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() );
2566 } 2571 }
2567 } 2572 }
2568 2573
2569 bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); 2574 bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList);
2570 2575
2571} 2576}
2572 2577
2573/* this method will be called through the QCop interface from other apps to show details of a contact. 2578/* this method will be called through the QCop interface from other apps to show details of a contact.
2574 */ 2579 */
2575void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) 2580void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid)
2576{ 2581{
2577 //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); 2582 //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1());
2578 2583
2579 QString foundUid = QString::null; 2584 QString foundUid = QString::null;
2580 if ( ! uid.isEmpty() ) { 2585 if ( ! uid.isEmpty() ) {
2581 Addressee adrr = mAddressBook->findByUid( uid ); 2586 Addressee adrr = mAddressBook->findByUid( uid );
2582 if ( !adrr.isEmpty() ) { 2587 if ( !adrr.isEmpty() ) {
2583 foundUid = uid; 2588 foundUid = uid;
2584 } 2589 }
2585 if ( email == "sendbacklist" ) { 2590 if ( email == "sendbacklist" ) {
2586 //qDebug("ssssssssssssssssssssssend "); 2591 //qDebug("ssssssssssssssssssssssend ");
2587 QStringList nameList; 2592 QStringList nameList;
2588 QStringList emailList; 2593 QStringList emailList;
2589 QStringList uidList; 2594 QStringList uidList;
2590 nameList.append(adrr.realName()); 2595 nameList.append(adrr.realName());
2591 emailList = adrr.emails(); 2596 emailList = adrr.emails();
2592 uidList.append( adrr.preferredEmail()); 2597 uidList.append( adrr.preferredEmail());
2593 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); 2598 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList);
2594 return; 2599 return;
2595 } 2600 }
2596 2601
2597 } 2602 }
2598 2603
2599 if ( email == "sendbacklist" ) 2604 if ( email == "sendbacklist" )
2600 return; 2605 return;
2601 if (foundUid.isEmpty()) 2606 if (foundUid.isEmpty())
2602 { 2607 {
2603 //find the uid of the person first 2608 //find the uid of the person first
2604 Addressee::List namelist; 2609 Addressee::List namelist;
2605 Addressee::List emaillist; 2610 Addressee::List emaillist;
2606 2611
2607 if (!name.isEmpty()) 2612 if (!name.isEmpty())
2608 namelist = mAddressBook->findByName( name ); 2613 namelist = mAddressBook->findByName( name );
2609 2614
2610 if (!email.isEmpty()) 2615 if (!email.isEmpty())
2611 emaillist = mAddressBook->findByEmail( email ); 2616 emaillist = mAddressBook->findByEmail( email );
2612 //qDebug("count %d %d ", namelist.count(),emaillist.count() ); 2617 //qDebug("count %d %d ", namelist.count(),emaillist.count() );
2613 //check if we have a match in Namelist and Emaillist 2618 //check if we have a match in Namelist and Emaillist
2614 if ((namelist.count() == 0) && (emaillist.count() > 0)) { 2619 if ((namelist.count() == 0) && (emaillist.count() > 0)) {
2615 foundUid = emaillist[0].uid(); 2620 foundUid = emaillist[0].uid();
2616 } 2621 }
2617 else if ((namelist.count() > 0) && (emaillist.count() == 0)) 2622 else if ((namelist.count() > 0) && (emaillist.count() == 0))
2618 foundUid = namelist[0].uid(); 2623 foundUid = namelist[0].uid();
2619 else 2624 else
2620 { 2625 {
2621 for (int i = 0; i < namelist.count(); i++) 2626 for (int i = 0; i < namelist.count(); i++)
2622 { 2627 {
2623 for (int j = 0; j < emaillist.count(); j++) 2628 for (int j = 0; j < emaillist.count(); j++)
2624 { 2629 {
2625 if (namelist[i] == emaillist[j]) 2630 if (namelist[i] == emaillist[j])
2626 { 2631 {
2627 foundUid = namelist[i].uid(); 2632 foundUid = namelist[i].uid();
2628 } 2633 }
2629 } 2634 }
2630 } 2635 }
2631 } 2636 }
2632 } 2637 }
2633 else 2638 else
2634 { 2639 {
2635 foundUid = uid; 2640 foundUid = uid;
2636 } 2641 }
2637 2642
2638 if (!foundUid.isEmpty()) 2643 if (!foundUid.isEmpty())
2639 { 2644 {
2640 2645
2641 // raise Ka/Pi if it is in the background 2646 // raise Ka/Pi if it is in the background
2642#ifndef DESKTOP_VERSION 2647#ifndef DESKTOP_VERSION
2643#ifndef KORG_NODCOP 2648#ifndef KORG_NODCOP
2644 //QCopEnvelope e("QPE/Application/kapi", "raise()"); 2649 //QCopEnvelope e("QPE/Application/kapi", "raise()");
2645#endif 2650#endif
2646#endif 2651#endif
2647 2652
2648 mMainWindow->showMaximized(); 2653 mMainWindow->showMaximized();
2649 mMainWindow-> raise(); 2654 mMainWindow-> raise();
2650 2655
2651 mViewManager->setSelected( "", false); 2656 mViewManager->setSelected( "", false);
2652 mViewManager->refreshView( "" ); 2657 mViewManager->refreshView( "" );
2653 mViewManager->setSelected( foundUid, true ); 2658 mViewManager->setSelected( foundUid, true );
2654 mViewManager->refreshView( foundUid ); 2659 mViewManager->refreshView( foundUid );
2655 2660
2656 if ( !mMultipleViewsAtOnce ) 2661 if ( !mMultipleViewsAtOnce )
2657 { 2662 {
2658 setDetailsVisible( true ); 2663 setDetailsVisible( true );
2659 mActionDetails->setChecked(true); 2664 mActionDetails->setChecked(true);
2660 } 2665 }
2661 } 2666 }
2662} 2667}
2663 2668
2664void KABCore::whatsnew() 2669void KABCore::whatsnew()
2665{ 2670{
2666 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 2671 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
2667} 2672}
2668void KABCore::synchowto() 2673void KABCore::synchowto()
2669{ 2674{
2670 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 2675 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
2671} 2676}
2672void KABCore::kdesynchowto() 2677void KABCore::kdesynchowto()
2673{ 2678{
2674 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 2679 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
2675} 2680}
2676void KABCore::multisynchowto() 2681void KABCore::multisynchowto()
2677{ 2682{
2678 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 2683 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
2679} 2684}
2680void KABCore::faq() 2685void KABCore::faq()
2681{ 2686{
2682 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); 2687 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" );
2683} 2688}
2684 2689
2685#include <libkcal/syncdefines.h> 2690#include <libkcal/syncdefines.h>
2686 2691
2687KABC::Addressee KABCore::getLastSyncAddressee() 2692KABC::Addressee KABCore::getLastSyncAddressee()
2688{ 2693{
2689 Addressee lse; 2694 Addressee lse;
2690 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2695 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2691 2696
2692 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); 2697 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() );
2693 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2698 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice );
2694 if (lse.isEmpty()) { 2699 if (lse.isEmpty()) {
2695 qDebug("KA: Creating new last-syncAddressee "); 2700 qDebug("KA: Creating new last-syncAddressee ");
2696 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2701 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice );
2697 QString sum = ""; 2702 QString sum = "";
2698 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) 2703 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
2699 sum = "E: "; 2704 sum = "E: ";
2700 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); 2705 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event"));
2701 lse.setRevision( mLastAddressbookSync ); 2706 lse.setRevision( mLastAddressbookSync );
2702 lse.setCategories( i18n("SyncEvent") ); 2707 lse.setCategories( i18n("SyncEvent") );
2703 mAddressBook->insertAddressee( lse ); 2708 mAddressBook->insertAddressee( lse );
2704 } 2709 }
2705 return lse; 2710 return lse;
2706} 2711}
2707int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) 2712int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full )
2708{ 2713{
2709 2714
2710 //void setZaurusId(int id); 2715 //void setZaurusId(int id);
2711 // int zaurusId() const; 2716 // int zaurusId() const;
2712 // void setZaurusUid(int id); 2717 // void setZaurusUid(int id);
2713 // int zaurusUid() const; 2718 // int zaurusUid() const;
2714 // void setZaurusStat(int id); 2719 // void setZaurusStat(int id);
2715 // int zaurusStat() const; 2720 // int zaurusStat() const;
2716 // 0 equal 2721 // 0 equal
2717 // 1 take local 2722 // 1 take local
2718 // 2 take remote 2723 // 2 take remote
2719 // 3 cancel 2724 // 3 cancel
2720 QDateTime lastSync = mLastAddressbookSync; 2725 QDateTime lastSync = mLastAddressbookSync;
2721 QDateTime localMod = local->revision(); 2726 QDateTime localMod = local->revision();
2722 QDateTime remoteMod = remote->revision(); 2727 QDateTime remoteMod = remote->revision();
2723 2728
2724 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2729 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2725 2730
2726 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2731 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2727 bool remCh, locCh; 2732 bool remCh, locCh;
2728 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); 2733 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
2729 //if ( remCh ) 2734 //if ( remCh )
2730 // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); 2735 // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
2731 locCh = ( localMod > mLastAddressbookSync ); 2736 locCh = ( localMod > mLastAddressbookSync );
2732 //qDebug("cahnged rem %d loc %d",remCh, locCh ); 2737 //qDebug("cahnged rem %d loc %d",remCh, locCh );
2733 if ( !remCh && ! locCh ) { 2738 if ( !remCh && ! locCh ) {
2734 //qDebug("both not changed "); 2739 //qDebug("both not changed ");
2735 lastSync = localMod.addDays(1); 2740 lastSync = localMod.addDays(1);
2736 if ( mode <= SYNC_PREF_ASK ) 2741 if ( mode <= SYNC_PREF_ASK )
2737 return 0; 2742 return 0;
2738 } else { 2743 } else {
2739 if ( locCh ) { 2744 if ( locCh ) {
2740 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); 2745 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1());
2741 lastSync = localMod.addDays( -1 ); 2746 lastSync = localMod.addDays( -1 );
2742 if ( !remCh ) 2747 if ( !remCh )
2743 remoteMod =( lastSync.addDays( -1 ) ); 2748 remoteMod =( lastSync.addDays( -1 ) );
2744 } else { 2749 } else {
2745 //qDebug(" not loc changed "); 2750 //qDebug(" not loc changed ");
2746 lastSync = localMod.addDays( 1 ); 2751 lastSync = localMod.addDays( 1 );
2747 if ( remCh ) { 2752 if ( remCh ) {
2748 //qDebug("rem changed "); 2753 //qDebug("rem changed ");
2749 remoteMod =( lastSync.addDays( 1 ) ); 2754 remoteMod =( lastSync.addDays( 1 ) );
2750 } 2755 }
2751 2756
2752 } 2757 }
2753 } 2758 }
2754 full = true; 2759 full = true;
2755 if ( mode < SYNC_PREF_ASK ) 2760 if ( mode < SYNC_PREF_ASK )
2756 mode = SYNC_PREF_ASK; 2761 mode = SYNC_PREF_ASK;
2757 } else { 2762 } else {
2758 if ( localMod == remoteMod ) 2763 if ( localMod == remoteMod )
2759 return 0; 2764 return 0;
2760 2765
2761 } 2766 }
2762 //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec()); 2767 //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec());
2763 //qDebug("lastsync %s ", lastSync.toString().latin1() ); 2768 //qDebug("lastsync %s ", lastSync.toString().latin1() );
2764 //full = true; //debug only 2769 //full = true; //debug only
2765 if ( full ) { 2770 if ( full ) {
2766 bool equ = ( (*local) == (*remote) ); 2771 bool equ = ( (*local) == (*remote) );
2767 if ( equ ) { 2772 if ( equ ) {
2768 //qDebug("equal "); 2773 //qDebug("equal ");
2769 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2774 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2770 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); 2775 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) );
2771 } 2776 }
2772 if ( mode < SYNC_PREF_FORCE_LOCAL ) 2777 if ( mode < SYNC_PREF_FORCE_LOCAL )
2773 return 0; 2778 return 0;
2774 2779
2775 }//else //debug only 2780 }//else //debug only
2776 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); 2781 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1());
2777 } 2782 }
2778 int result; 2783 int result;
2779 bool localIsNew; 2784 bool localIsNew;
2780 //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() ); 2785 //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() );
2781 2786
2782 if ( full && mode < SYNC_PREF_NEWEST ) 2787 if ( full && mode < SYNC_PREF_NEWEST )
2783 mode = SYNC_PREF_ASK; 2788 mode = SYNC_PREF_ASK;
2784 2789
2785 switch( mode ) { 2790 switch( mode ) {
2786 case SYNC_PREF_LOCAL: 2791 case SYNC_PREF_LOCAL:
2787 if ( lastSync > remoteMod ) 2792 if ( lastSync > remoteMod )
2788 return 1; 2793 return 1;
2789 if ( lastSync > localMod ) 2794 if ( lastSync > localMod )
2790 return 2; 2795 return 2;
2791 return 1; 2796 return 1;
2792 break; 2797 break;
2793 case SYNC_PREF_REMOTE: 2798 case SYNC_PREF_REMOTE:
2794 if ( lastSync > remoteMod ) 2799 if ( lastSync > remoteMod )
2795 return 1; 2800 return 1;
2796 if ( lastSync > localMod ) 2801 if ( lastSync > localMod )
2797 return 2; 2802 return 2;
2798 return 2; 2803 return 2;
2799 break; 2804 break;
2800 case SYNC_PREF_NEWEST: 2805 case SYNC_PREF_NEWEST:
2801 if ( localMod > remoteMod ) 2806 if ( localMod > remoteMod )
2802 return 1; 2807 return 1;
2803 else 2808 else
2804 return 2; 2809 return 2;
2805 break; 2810 break;
2806 case SYNC_PREF_ASK: 2811 case SYNC_PREF_ASK:
2807 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); 2812 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
2808 if ( lastSync > remoteMod ) 2813 if ( lastSync > remoteMod )
2809 return 1; 2814 return 1;
2810 if ( lastSync > localMod ) { 2815 if ( lastSync > localMod ) {
2811 return 2; 2816 return 2;
2812 } 2817 }
2813 localIsNew = localMod >= remoteMod; 2818 localIsNew = localMod >= remoteMod;
2814 //qDebug("conflict! ************************************** "); 2819 //qDebug("conflict! ************************************** ");
2815 { 2820 {
2816 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this ); 2821 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this );
2817 result = acd.executeD(localIsNew); 2822 result = acd.executeD(localIsNew);
2818 return result; 2823 return result;
2819 } 2824 }
2820 break; 2825 break;
2821 case SYNC_PREF_FORCE_LOCAL: 2826 case SYNC_PREF_FORCE_LOCAL:
2822 return 1; 2827 return 1;
2823 break; 2828 break;
2824 case SYNC_PREF_FORCE_REMOTE: 2829 case SYNC_PREF_FORCE_REMOTE:
2825 return 2; 2830 return 2;
2826 break; 2831 break;
2827 2832
2828 default: 2833 default:
2829 // SYNC_PREF_TAKE_BOTH not implemented 2834 // SYNC_PREF_TAKE_BOTH not implemented
2830 break; 2835 break;
2831 } 2836 }
2832 return 0; 2837 return 0;
2833} 2838}
2834 2839
2835 2840
2836bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode) 2841bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode)
2837{ 2842{
2838 bool syncOK = true; 2843 bool syncOK = true;
2839 int addedAddressee = 0; 2844 int addedAddressee = 0;
2840 int addedAddresseeR = 0; 2845 int addedAddresseeR = 0;
2841 int deletedAddresseeR = 0; 2846 int deletedAddresseeR = 0;
2842 int deletedAddresseeL = 0; 2847 int deletedAddresseeL = 0;
2843 int changedLocal = 0; 2848 int changedLocal = 0;
2844 int changedRemote = 0; 2849 int changedRemote = 0;
2845 int filteredIN = 0; 2850 int filteredIN = 0;
2846 int filteredOUT = 0; 2851 int filteredOUT = 0;
2847 2852
2848 QString mCurrentSyncName = syncManager->getCurrentSyncName(); 2853 QString mCurrentSyncName = syncManager->getCurrentSyncName();
2849 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2854 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2850 2855
2851 //QPtrList<Addressee> el = local->rawAddressees(); 2856 //QPtrList<Addressee> el = local->rawAddressees();
2852 Addressee addresseeR; 2857 Addressee addresseeR;
2853 QString uid; 2858 QString uid;
2854 int take; 2859 int take;
2855 Addressee addresseeL; 2860 Addressee addresseeL;
2856 Addressee addresseeRSync; 2861 Addressee addresseeRSync;
2857 Addressee addresseeLSync; 2862 Addressee addresseeLSync;
2858 // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees(); 2863 // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees();
2859 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); 2864 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees();
2860 bool fullDateRange = false; 2865 bool fullDateRange = false;
2861 local->resetTempSyncStat(); 2866 local->resetTempSyncStat();
2862 mLastAddressbookSync = QDateTime::currentDateTime(); 2867 mLastAddressbookSync = QDateTime::currentDateTime();
2863 if ( syncManager->syncWithDesktop() ) { 2868 if ( syncManager->syncWithDesktop() ) {
2864 // remote->removeSyncInfo( QString());//remove all info 2869 // remote->removeSyncInfo( QString());//remove all info
2865 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 2870 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
2866 mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; 2871 mLastAddressbookSync = KSyncManager::mRequestedSyncEvent;
2867 qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); 2872 qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() );
2868 } else { 2873 } else {
2869 qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime "); 2874 qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime ");
2870 } 2875 }
2871 } 2876 }
2872 QDateTime modifiedCalendar = mLastAddressbookSync; 2877 QDateTime modifiedCalendar = mLastAddressbookSync;
2873 addresseeLSync = getLastSyncAddressee(); 2878 addresseeLSync = getLastSyncAddressee();
2874 qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1()); 2879 qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1());
2875 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); 2880 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName );
2876 if ( !addresseeR.isEmpty() ) { 2881 if ( !addresseeR.isEmpty() ) {
2877 addresseeRSync = addresseeR; 2882 addresseeRSync = addresseeR;
2878 remote->removeAddressee(addresseeR ); 2883 remote->removeAddressee(addresseeR );
2879 2884
2880 } else { 2885 } else {
2881 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2886 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2882 addresseeRSync = addresseeLSync ; 2887 addresseeRSync = addresseeLSync ;
2883 } else { 2888 } else {
2884 //qDebug("FULLDATE 1"); 2889 //qDebug("FULLDATE 1");
2885 fullDateRange = true; 2890 fullDateRange = true;
2886 Addressee newAdd; 2891 Addressee newAdd;
2887 addresseeRSync = newAdd; 2892 addresseeRSync = newAdd;
2888 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); 2893 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee"));
2889 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); 2894 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName );
2890 addresseeRSync.setRevision( mLastAddressbookSync ); 2895 addresseeRSync.setRevision( mLastAddressbookSync );
2891 addresseeRSync.setCategories( i18n("SyncAddressee") ); 2896 addresseeRSync.setCategories( i18n("SyncAddressee") );
2892 } 2897 }
2893 } 2898 }
2894 if ( addresseeLSync.revision() == mLastAddressbookSync ) { 2899 if ( addresseeLSync.revision() == mLastAddressbookSync ) {
2895 // qDebug("FULLDATE 2"); 2900 // qDebug("FULLDATE 2");
2896 fullDateRange = true; 2901 fullDateRange = true;
2897 } 2902 }
2898 if ( ! fullDateRange ) { 2903 if ( ! fullDateRange ) {
2899 if ( addresseeLSync.revision() != addresseeRSync.revision() ) { 2904 if ( addresseeLSync.revision() != addresseeRSync.revision() ) {
2900 2905
2901 // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() ); 2906 // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() );
2902 //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec()); 2907 //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec());
2903 fullDateRange = true; 2908 fullDateRange = true;
2904 //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() ); 2909 //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() );
2905 } 2910 }
2906 } 2911 }
2907 // fullDateRange = true; // debug only! 2912 // fullDateRange = true; // debug only!
2908 if ( fullDateRange ) 2913 if ( fullDateRange )
2909 mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365); 2914 mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365);
2910 else 2915 else
2911 mLastAddressbookSync = addresseeLSync.revision(); 2916 mLastAddressbookSync = addresseeLSync.revision();
2912 // for resyncing if own file has changed 2917 // for resyncing if own file has changed
2913 // PENDING fixme later when implemented 2918 // PENDING fixme later when implemented
2914#if 0 2919#if 0
2915 if ( mCurrentSyncDevice == "deleteaftersync" ) { 2920 if ( mCurrentSyncDevice == "deleteaftersync" ) {
2916 mLastAddressbookSync = loadedFileVersion; 2921 mLastAddressbookSync = loadedFileVersion;
2917 qDebug("setting mLastAddressbookSync "); 2922 qDebug("setting mLastAddressbookSync ");
2918 } 2923 }
2919#endif 2924#endif
2920 2925
2921 2926
2922 // ********** setting filters **************** 2927 // ********** setting filters ****************
2923 Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB ); 2928 Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB );
2924 Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB ); 2929 Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB );
2925 2930
2926 //qDebug("*************************** "); 2931 //qDebug("*************************** ");
2927 // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() ); 2932 // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() );
2928 QStringList er = remote->uidList(); 2933 QStringList er = remote->uidList();
2929 Addressee inR ;//= er.first(); 2934 Addressee inR ;//= er.first();
2930 Addressee inL; 2935 Addressee inL;
2931 2936
2932 syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count()); 2937 syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count());
2933 2938
2934 int modulo = (er.count()/10)+1; 2939 int modulo = (er.count()/10)+1;
2935 int incCounter = 0; 2940 int incCounter = 0;
2936 while ( incCounter < er.count()) { 2941 while ( incCounter < er.count()) {
2937 if (syncManager->isProgressBarCanceled()) 2942 if (syncManager->isProgressBarCanceled())
2938 return false; 2943 return false;
2939 if ( incCounter % modulo == 0 ) 2944 if ( incCounter % modulo == 0 )
2940 syncManager->showProgressBar(incCounter); 2945 syncManager->showProgressBar(incCounter);
2941 2946
2942 uid = er[ incCounter ]; 2947 uid = er[ incCounter ];
2943 bool skipIncidence = false; 2948 bool skipIncidence = false;
2944 if ( uid.left(19) == QString("last-syncAddressee-") ) 2949 if ( uid.left(19) == QString("last-syncAddressee-") )
2945 skipIncidence = true; 2950 skipIncidence = true;
2946 QString idS,OidS; 2951 QString idS,OidS;
2947 qApp->processEvents(); 2952 qApp->processEvents();
2948 if ( !skipIncidence ) { 2953 if ( !skipIncidence ) {
2949 inL = local->findByUid( uid ); 2954 inL = local->findByUid( uid );
2950 inR = remote->findByUid( uid ); 2955 inR = remote->findByUid( uid );
2951 //inL.setResource( 0 ); 2956 //inL.setResource( 0 );
2952 //inR.setResource( 0 ); 2957 //inR.setResource( 0 );
2953 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars 2958 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars
2954 if ( !inL.resource() || inL.resource()->includeInSync() ) { 2959 if ( !inL.resource() || inL.resource()->includeInSync() ) {
2955 if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) { 2960 if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) {
2956 //qDebug("take %d %s ", take, inL.summary().latin1()); 2961 //qDebug("take %d %s ", take, inL.summary().latin1());
2957 if ( take == 3 ) 2962 if ( take == 3 )
2958 return false; 2963 return false;
2959 if ( take == 1 ) {// take local ********************** 2964 if ( take == 1 ) {// take local **********************
2960 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2965 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2961 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 2966 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
2962 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 2967 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
2963 local->insertAddressee( inL, false ); 2968 local->insertAddressee( inL, false );
2964 idS = inR.externalUID(); 2969 idS = inR.externalUID();
2965 OidS = inR.originalExternalUID(); 2970 OidS = inR.originalExternalUID();
2966 } 2971 }
2967 else 2972 else
2968 idS = inR.IDStr(); 2973 idS = inR.IDStr();
2969 remote->removeAddressee( inR ); 2974 remote->removeAddressee( inR );
2970 inR = inL; 2975 inR = inL;
2971 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 2976 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
2972 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2977 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2973 inR.setOriginalExternalUID( OidS ); 2978 inR.setOriginalExternalUID( OidS );
2974 inR.setExternalUID( idS ); 2979 inR.setExternalUID( idS );
2975 if ( syncManager->syncWithDesktop() ) { 2980 if ( syncManager->syncWithDesktop() ) {
2976 inR.setIDStr("changed" ); 2981 inR.setIDStr("changed" );
2977 } 2982 }
2978 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); 2983 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" );
2979 } else { 2984 } else {
2980 inR.setIDStr( idS ); 2985 inR.setIDStr( idS );
2981 } 2986 }
2982 inR.setResource( 0 ); 2987 inR.setResource( 0 );
2983 remote->insertAddressee( inR , false); 2988 remote->insertAddressee( inR , false);
2984 ++changedRemote; 2989 ++changedRemote;
2985 } else { // take == 2 take remote ********************** 2990 } else { // take == 2 take remote **********************
2986 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2991 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2987 if ( inR.revision().date().year() < 2004 ) 2992 if ( inR.revision().date().year() < 2004 )
2988 inR.setRevision( modifiedCalendar ); 2993 inR.setRevision( modifiedCalendar );
2989 } 2994 }
2990 idS = inL.IDStr(); 2995 idS = inL.IDStr();
2991 local->removeAddressee( inL ); 2996 local->removeAddressee( inL );
2992 inL = inR; 2997 inL = inR;
2993 inL.setIDStr( idS ); 2998 inL.setIDStr( idS );
2994 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2999 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2995 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3000 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
2996 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3001 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
2997 } 3002 }
2998 inL.setResource( 0 ); 3003 inL.setResource( 0 );
2999 local->insertAddressee( inL , false ); 3004 local->insertAddressee( inL , false );
3000 ++changedLocal; 3005 ++changedLocal;
3001 } 3006 }
3002 } 3007 }
3003 } 3008 }
3004 } else { // no conflict ********** add or delete remote 3009 } else { // no conflict ********** add or delete remote
3005 if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) { 3010 if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) {
3006 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3011 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3007 QString des = addresseeLSync.note(); 3012 QString des = addresseeLSync.note();
3008 if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it 3013 if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
3009 inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); 3014 inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE );
3010 remote->insertAddressee( inR, false ); 3015 remote->insertAddressee( inR, false );
3011 ++deletedAddresseeR; 3016 ++deletedAddresseeR;
3012 } else { 3017 } else {
3013 inR.setRevision( modifiedCalendar ); 3018 inR.setRevision( modifiedCalendar );
3014 remote->insertAddressee( inR, false ); 3019 remote->insertAddressee( inR, false );
3015 inL = inR; 3020 inL = inR;
3016 inL.setIDStr( ":" ); 3021 inL.setIDStr( ":" );
3017 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3022 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
3018 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3023 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
3019 inL.setResource( 0 ); 3024 inL.setResource( 0 );
3020 local->insertAddressee( inL , false); 3025 local->insertAddressee( inL , false);
3021 ++addedAddressee; 3026 ++addedAddressee;
3022 } 3027 }
3023 } else { 3028 } else {
3024 if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { 3029 if ( inR.revision() > mLastAddressbookSync || mode == 5 ) {
3025 inR.setRevision( modifiedCalendar ); 3030 inR.setRevision( modifiedCalendar );
3026 remote->insertAddressee( inR, false ); 3031 remote->insertAddressee( inR, false );
3027 inR.setResource( 0 ); 3032 inR.setResource( 0 );
3028 local->insertAddressee( inR, false ); 3033 local->insertAddressee( inR, false );
3029 ++addedAddressee; 3034 ++addedAddressee;
3030 } else { 3035 } else {
3031 // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); 3036 // pending checkExternSyncAddressee(addresseeRSyncSharp, inR);
3032 remote->removeAddressee( inR ); 3037 remote->removeAddressee( inR );
3033 ++deletedAddresseeR; 3038 ++deletedAddresseeR;
3034 } 3039 }
3035 } 3040 }
3036 } else { 3041 } else {
3037 ++filteredIN; 3042 ++filteredIN;
3038 } 3043 }
3039 } 3044 }
3040 } 3045 }
3041 ++incCounter; 3046 ++incCounter;
3042 } 3047 }
3043 er.clear(); 3048 er.clear();
3044 QStringList el = local->uidList(); 3049 QStringList el = local->uidList();
3045 modulo = (el.count()/10)+1; 3050 modulo = (el.count()/10)+1;
3046 3051
3047 syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); 3052 syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count());
3048 incCounter = 0; 3053 incCounter = 0;
3049 while ( incCounter < el.count()) { 3054 while ( incCounter < el.count()) {
3050 qApp->processEvents(); 3055 qApp->processEvents();
3051 if (syncManager->isProgressBarCanceled()) 3056 if (syncManager->isProgressBarCanceled())
3052 return false; 3057 return false;
3053 if ( incCounter % modulo == 0 ) 3058 if ( incCounter % modulo == 0 )
3054 syncManager->showProgressBar(incCounter); 3059 syncManager->showProgressBar(incCounter);
3055 uid = el[ incCounter ]; 3060 uid = el[ incCounter ];
3056 bool skipIncidence = false; 3061 bool skipIncidence = false;
3057 if ( uid.left(19) == QString("last-syncAddressee-") ) 3062 if ( uid.left(19) == QString("last-syncAddressee-") )
3058 skipIncidence = true; 3063 skipIncidence = true;
3059 if ( !skipIncidence ) { 3064 if ( !skipIncidence ) {
3060 inL = local->findByUid( uid ); 3065 inL = local->findByUid( uid );
3061 if ( !inL.resource() || inL.resource()->includeInSync() ) { 3066 if ( !inL.resource() || inL.resource()->includeInSync() ) {
3062 inR = remote->findByUid( uid ); 3067 inR = remote->findByUid( uid );
3063 if ( inR.isEmpty() ){ 3068 if ( inR.isEmpty() ){
3064 if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) { 3069 if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) {
3065 // no conflict ********** add or delete local 3070 // no conflict ********** add or delete local
3066 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3071 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3067 if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { 3072 if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) {
3068 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); 3073 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
3069 local->removeAddressee( inL ); 3074 local->removeAddressee( inL );
3070 ++deletedAddresseeL; 3075 ++deletedAddresseeL;
3071 } else { 3076 } else {
3072 if ( ! syncManager->mWriteBackExistingOnly ) { 3077 if ( ! syncManager->mWriteBackExistingOnly ) {
3073 inL.removeID(mCurrentSyncDevice ); 3078 inL.removeID(mCurrentSyncDevice );
3074 ++addedAddresseeR; 3079 ++addedAddresseeR;
3075 inL.setRevision( modifiedCalendar ); 3080 inL.setRevision( modifiedCalendar );
3076 local->insertAddressee( inL, false ); 3081 local->insertAddressee( inL, false );
3077 inR = inL; 3082 inR = inL;
3078 inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); 3083 inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL );
3079 inR.setResource( 0 ); 3084 inR.setResource( 0 );
3080 remote->insertAddressee( inR, false ); 3085 remote->insertAddressee( inR, false );
3081 } 3086 }
3082 } 3087 }
3083 } else { 3088 } else {
3084 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { 3089 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) {
3085 //qDebug("data %s ", inL.revision().toString().latin1()); 3090 //qDebug("data %s ", inL.revision().toString().latin1());
3086 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); 3091 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
3087 local->removeAddressee( inL ); 3092 local->removeAddressee( inL );
3088 ++deletedAddresseeL; 3093 ++deletedAddresseeL;
3089 } else { 3094 } else {
3090 if ( ! syncManager->mWriteBackExistingOnly ) { 3095 if ( ! syncManager->mWriteBackExistingOnly ) {
3091 ++addedAddresseeR; 3096 ++addedAddresseeR;
3092 inL.setRevision( modifiedCalendar ); 3097 inL.setRevision( modifiedCalendar );
3093 local->insertAddressee( inL, false ); 3098 local->insertAddressee( inL, false );
3094 inR = inL; 3099 inR = inL;
3095 inR.setIDStr( ":" ); 3100 inR.setIDStr( ":" );
3096 inR.setResource( 0 ); 3101 inR.setResource( 0 );
3097 remote->insertAddressee( inR, false ); 3102 remote->insertAddressee( inR, false );
3098 } 3103 }
3099 } 3104 }
3100 } 3105 }
3101 } else { 3106 } else {
3102 ++filteredOUT; 3107 ++filteredOUT;
3103 } 3108 }
3104 } 3109 }
3105 } 3110 }
3106 } 3111 }
3107 ++incCounter; 3112 ++incCounter;
3108 } 3113 }
3109 el.clear(); 3114 el.clear();
3110 syncManager->hideProgressBar(); 3115 syncManager->hideProgressBar();
3111 mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); 3116 mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 );
3112 // get rid of micro seconds 3117 // get rid of micro seconds
3113 QTime t = mLastAddressbookSync.time(); 3118 QTime t = mLastAddressbookSync.time();
3114 mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); 3119 mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) );
3115 addresseeLSync.setRevision( mLastAddressbookSync ); 3120 addresseeLSync.setRevision( mLastAddressbookSync );
3116 addresseeRSync.setRevision( mLastAddressbookSync ); 3121 addresseeRSync.setRevision( mLastAddressbookSync );
3117 addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; 3122 addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ;
3118 addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); 3123 addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName );
3119 addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; 3124 addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ;
3120 addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); 3125 addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") );
3121 addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; 3126 addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ;
3122 addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); 3127 addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() );
3123 addresseeRSync.setNote( "" ) ; 3128 addresseeRSync.setNote( "" ) ;
3124 addresseeLSync.setNote( "" ); 3129 addresseeLSync.setNote( "" );
3125 3130
3126 if ( mGlobalSyncMode == SYNC_MODE_NORMAL) 3131 if ( mGlobalSyncMode == SYNC_MODE_NORMAL)
3127 remote->insertAddressee( addresseeRSync, false ); 3132 remote->insertAddressee( addresseeRSync, false );
3128 local->insertAddressee( addresseeLSync, false ); 3133 local->insertAddressee( addresseeLSync, false );
3129 QString mes; 3134 QString mes;
3130 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 ); 3135 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 );
3131 qDebug( mes ); 3136 qDebug( mes );
3132 mes = i18n("Local addressbook changed!\n") +mes; 3137 mes = i18n("Local addressbook changed!\n") +mes;
3133 if ( syncManager->mShowSyncSummary ) { 3138 if ( syncManager->mShowSyncSummary ) {
3134 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, 3139 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
3135 i18n("KA/Pi Synchronization"),i18n("Write back"))) { 3140 i18n("KA/Pi Synchronization"),i18n("Write back"))) {
3136 qDebug("KA: WB cancelled "); 3141 qDebug("KA: WB cancelled ");
3137 syncManager->mWriteBackFile = false; 3142 syncManager->mWriteBackFile = false;
3138 return syncOK; 3143 return syncOK;
3139 } 3144 }
3140 } 3145 }
3141 return syncOK; 3146 return syncOK;
3142} 3147}
3143 3148
3144 3149
3145//this is a overwritten callbackmethods from the syncinterface 3150//this is a overwritten callbackmethods from the syncinterface
3146bool KABCore::sync(KSyncManager* manager, QString filename, int mode) 3151bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
3147{ 3152{
3148 3153
3149 //pending prepare addresseeview for output 3154 //pending prepare addresseeview for output
3150 //pending detect, if remote file has REV field. if not switch to external sync 3155 //pending detect, if remote file has REV field. if not switch to external sync
3151 mGlobalSyncMode = SYNC_MODE_NORMAL; 3156 mGlobalSyncMode = SYNC_MODE_NORMAL;
3152 if ( manager != syncManager ) 3157 if ( manager != syncManager )
3153 qDebug("KABCore::sync:: ERROR! :: manager != syncManager "); 3158 qDebug("KABCore::sync:: ERROR! :: manager != syncManager ");
3154 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 3159 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
3155 3160
3156 AddressBook abLocal(filename,"syncContact"); 3161 AddressBook abLocal(filename,"syncContact");
3157 bool syncOK = false; 3162 bool syncOK = false;
3158 if ( abLocal.load() ) { 3163 if ( abLocal.load() ) {
3159 qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode ); 3164 qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode );
3160 bool external = false; 3165 bool external = false;
3161 bool isXML = false; 3166 bool isXML = false;
3162 if ( filename.right(4) == ".xml") { 3167 if ( filename.right(4) == ".xml") {
3163 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3168 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3164 isXML = true; 3169 isXML = true;
3165 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); 3170 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
3166 } else { 3171 } else {
3167 external = !manager->mIsKapiFile; 3172 external = !manager->mIsKapiFile;
3168 if ( external ) { 3173 if ( external ) {
3169 qDebug("KA: Sync::Setting vcf mode to external "); 3174 qDebug("KA: Sync::Setting vcf mode to external ");
3170 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3175 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3171 AddressBook::Iterator it; 3176 AddressBook::Iterator it;
3172 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 3177 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
3173 (*it).setID( mCurrentSyncDevice, (*it).uid() ); 3178 (*it).setID( mCurrentSyncDevice, (*it).uid() );
3174 (*it).computeCsum( mCurrentSyncDevice ); 3179 (*it).computeCsum( mCurrentSyncDevice );
3175 } 3180 }
3176 } 3181 }
3177 } 3182 }
3178 //AddressBook::Iterator it; 3183 //AddressBook::Iterator it;
3179 //QStringList vcards; 3184 //QStringList vcards;
3180 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 3185 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
3181 // qDebug("Name %s ", (*it).familyName().latin1()); 3186 // qDebug("Name %s ", (*it).familyName().latin1());
3182 //} 3187 //}
3183 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); 3188 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode );
3184 if ( syncOK ) { 3189 if ( syncOK ) {
3185 if ( syncManager->mWriteBackFile ) 3190 if ( syncManager->mWriteBackFile )
3186 { 3191 {
3187 if ( external ) 3192 if ( external )
3188 abLocal.removeSyncAddressees( !isXML); 3193 abLocal.removeSyncAddressees( !isXML);
3189 qDebug("KA: Sync::Saving remote AB "); 3194 qDebug("KA: Sync::Saving remote AB ");
3190 if ( ! abLocal.saveAB()) 3195 if ( ! abLocal.saveAB())
3191 qDebug("KA: sync::Error writing back AB to file "); 3196 qDebug("KA: sync::Error writing back AB to file ");
3192 if ( external ) { 3197 if ( external ) {
3193 // afterwrite processing 3198 // afterwrite processing
3194 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); 3199 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML);
3195 } 3200 }
3196 } 3201 }
3197 } 3202 }
3198 setModified(); 3203 setModified();
3199 3204
3200 } 3205 }
3201 abLocal.removeResources(); 3206 abLocal.removeResources();
3202 if ( syncOK ) 3207 if ( syncOK )
3203 mViewManager->refreshView(); 3208 mViewManager->refreshView();
3204 return syncOK; 3209 return syncOK;
3205 3210
3206} 3211}
3207void KABCore::removeSyncInfo( QString syncProfile) 3212void KABCore::removeSyncInfo( QString syncProfile)
3208{ 3213{
3209 qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1()); 3214 qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1());
3210 mAddressBook->removeSyncInfo( syncProfile ); 3215 mAddressBook->removeSyncInfo( syncProfile );
3211 setModified(); 3216 setModified();
3212} 3217}
3213 3218
3214 3219
3215//this is a overwritten callbackmethods from the syncinterface 3220//this is a overwritten callbackmethods from the syncinterface
3216bool KABCore::syncExternal(KSyncManager* manager, QString resource) 3221bool KABCore::syncExternal(KSyncManager* manager, QString resource)
3217{ 3222{
3218 if ( resource == "phone" ) 3223 if ( resource == "phone" )
3219 return syncPhone(); 3224 return syncPhone();
3220 disableBR( true ); 3225 disableBR( true );
3221 if ( manager != syncManager ) 3226 if ( manager != syncManager )
3222 qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); 3227 qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager ");
3223 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 3228 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
3224 3229
3225 AddressBook abLocal( resource,"syncContact"); 3230 AddressBook abLocal( resource,"syncContact");
3226 bool syncOK = false; 3231 bool syncOK = false;
3227 message(i18n("Loading DTM address data..."), false); 3232 message(i18n("Loading DTM address data..."), false);
3228 if ( abLocal.load() ) { 3233 if ( abLocal.load() ) {
3229 qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); 3234 qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1());
3230 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3235 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3231 message(i18n("Sync preprocessing..."),false); 3236 message(i18n("Sync preprocessing..."),false);
3232 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); 3237 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false );
3233 message(i18n("Synchronizing..."),false); 3238 message(i18n("Synchronizing..."),false);
3234 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 3239 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
3235 if ( syncOK ) { 3240 if ( syncOK ) {
3236 if ( syncManager->mWriteBackFile ) { 3241 if ( syncManager->mWriteBackFile ) {
3237 abLocal.removeSyncAddressees( false ); 3242 abLocal.removeSyncAddressees( false );
3238 message(i18n("Saving DTM address data..."),false); 3243 message(i18n("Saving DTM address data..."),false);
3239 abLocal.saveAB(); 3244 abLocal.saveAB();
3240 message(i18n("Sync postprocessing..."),false); 3245 message(i18n("Sync postprocessing..."),false);
3241 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3246 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3242 } 3247 }
3243 } else 3248 } else
3244 message( i18n("Sync cancelled or failed.") ); 3249 message( i18n("Sync cancelled or failed.") );
3245 setModified(); 3250 setModified();
3246 } 3251 }
3247 abLocal.removeResources(); 3252 abLocal.removeResources();
3248 if ( syncOK ) { 3253 if ( syncOK ) {
3249 mViewManager->refreshView(); 3254 mViewManager->refreshView();
3250 message(i18n("DTM syncing finished.")); 3255 message(i18n("DTM syncing finished."));
3251 } 3256 }
3252 disableBR( false ); 3257 disableBR( false );
3253 return syncOK; 3258 return syncOK;
3254 3259
3255} 3260}
3256void KABCore::message( QString m, bool startTimer) 3261void KABCore::message( QString m, bool startTimer)
3257{ 3262{
3258 topLevelWidget()->setCaption( m ); 3263 topLevelWidget()->setCaption( m );
3259 qApp->processEvents(); 3264 qApp->processEvents();
3260 if ( startTimer ) 3265 if ( startTimer )
3261 mMessageTimer->start( 15000, true ); 3266 mMessageTimer->start( 15000, true );
3262 else 3267 else
3263 mMessageTimer->stop(); 3268 mMessageTimer->stop();
3264} 3269}
3265bool KABCore::syncPhone() 3270bool KABCore::syncPhone()
3266{ 3271{
3267 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 3272 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
3268 QString fileName = getPhoneFile(); 3273 QString fileName = getPhoneFile();
3269 if ( !PhoneAccess::readFromPhone( fileName) ) { 3274 if ( !PhoneAccess::readFromPhone( fileName) ) {
3270 message(i18n("Phone access failed!")); 3275 message(i18n("Phone access failed!"));
3271 return false; 3276 return false;
3272 } 3277 }
3273 AddressBook abLocal( fileName,"syncContact"); 3278 AddressBook abLocal( fileName,"syncContact");
3274 bool syncOK = false; 3279 bool syncOK = false;
3275 { 3280 {
3276 abLocal.importFromFile( fileName ); 3281 abLocal.importFromFile( fileName );
3277 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); 3282 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1());
3278 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3283 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3279 abLocal.preparePhoneSync( mCurrentSyncDevice, true ); 3284 abLocal.preparePhoneSync( mCurrentSyncDevice, true );
3280 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); 3285 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
3281 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 3286 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
3282 if ( syncOK ) { 3287 if ( syncOK ) {
3283 if ( syncManager->mWriteBackFile ) { 3288 if ( syncManager->mWriteBackFile ) {
3284 abLocal.removeSyncAddressees( true ); 3289 abLocal.removeSyncAddressees( true );
3285 abLocal.saveABphone( fileName ); 3290 abLocal.saveABphone( fileName );
3286 abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); 3291 abLocal.findNewExtIds( fileName, mCurrentSyncDevice );
3287 //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); 3292 //abLocal.preparePhoneSync( mCurrentSyncDevice, false );
3288 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3293 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3289 } 3294 }
3290 } 3295 }
3291 setModified(); 3296 setModified();
3292 } 3297 }
3293 abLocal.removeResources(); 3298 abLocal.removeResources();
3294 if ( syncOK ) 3299 if ( syncOK )
3295 mViewManager->refreshView(); 3300 mViewManager->refreshView();
3296 return syncOK; 3301 return syncOK;
3297} 3302}
3298void KABCore::getFile( bool success ) 3303void KABCore::getFile( bool success )
3299{ 3304{
3300 if ( ! success ) { 3305 if ( ! success ) {
3301 message( i18n("Error receiving file. Nothing changed!") ); 3306 message( i18n("Error receiving file. Nothing changed!") );
3302 return; 3307 return;
3303 } 3308 }
3304 int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); 3309 int count = mAddressBook->importFromFile( sentSyncFile() , false, true );
3305 if ( count ) 3310 if ( count )
3306 setModified( true ); 3311 setModified( true );
3307 message( i18n("Pi-Sync successful!") ); 3312 message( i18n("Pi-Sync successful!") );
3308 mViewManager->refreshView(); 3313 mViewManager->refreshView();
3309} 3314}
3310void KABCore::syncFileRequest() 3315void KABCore::syncFileRequest()
3311{ 3316{
3312 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { 3317 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) {
3313 syncManager->slotSyncMenu( 999 ); 3318 syncManager->slotSyncMenu( 999 );
3314 } 3319 }
3315 mAddressBook->export2File( sentSyncFile() ); 3320 mAddressBook->export2File( sentSyncFile() );
3316} 3321}
3317QString KABCore::sentSyncFile() 3322QString KABCore::sentSyncFile()
3318{ 3323{
3319#ifdef DESKTOP_VERSION 3324#ifdef DESKTOP_VERSION
3320 return locateLocal( "tmp", "copysyncab.vcf" ); 3325 return locateLocal( "tmp", "copysyncab.vcf" );
3321#else 3326#else
3322 return QString( "/tmp/copysyncab.vcf" ); 3327 return QString( "/tmp/copysyncab.vcf" );
3323#endif 3328#endif
3324} 3329}
3325 3330
3326void KABCore::setCaptionBack() 3331void KABCore::setCaptionBack()
3327{ 3332{
3328 mMessageTimer->stop(); 3333 mMessageTimer->stop();
3329 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); 3334 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") );
3330} 3335}