summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-10 11:53:12 (UTC)
committer zautrix <zautrix>2005-06-10 11:53:12 (UTC)
commitd2f00fc2034450bc9a3cd1d2c3510bef1758d3bc (patch) (unidiff)
tree0764371abfdb5d663ffebf408d47d49f0ca919f3
parente5ca8e0d8d6d08b597253f43de401aa1a99a6abe (diff)
downloadkdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.zip
kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.gz
kdepimpi-d2f00fc2034450bc9a3cd1d2c3510bef1758d3bc.tar.bz2
config dialog changes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt2
-rw-r--r--bin/kdepim/kopiemail/germantranslation.txt2
-rw-r--r--bin/kdepim/pwmanager/germantranslation.txt2
-rw-r--r--kaddressbook/kabcore.cpp6
-rw-r--r--kmicromail/koprefsdialog.cpp7
-rw-r--r--kmicromail/koprefsdialog.h1
-rw-r--r--kmicromail/mainwindow.cpp15
-rw-r--r--kmicromail/mainwindow.h1
-rw-r--r--kmicromail/opiemail.cpp5
-rw-r--r--kmicromail/opiemail.h1
-rw-r--r--microkde/kdialogbase.cpp5
-rw-r--r--microkde/kdialogbase.h4
-rw-r--r--pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h1
-rw-r--r--pwmanager/pwmanager/pwm.cpp45
-rw-r--r--pwmanager/pwmanager/pwm.h1
15 files changed, 76 insertions, 22 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index e076e1e..d6bf118 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -1,779 +1,781 @@
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","Hinzu" }, 108{ "Add","Hinzu" },
109{ "Remove","Entf." }, 109{ "Remove","Entf." },
110{ "Export","Exportiere" }, 110{ "Export","Exportiere" },
111{ "&Misc","Verschiedenes" }, 111{ "&Misc","Verschiedenes" },
112{ "Photo","Foto" }, 112{ "Photo","Foto" },
113{ "Store as URL","Speichere als URL" }, 113{ "Store as URL","Speichere als URL" },
114{ "Logo","Logo" }, 114{ "Logo","Logo" },
115{ "&Images","B&ilder" }, 115{ "&Images","B&ilder" },
116{ "Home","Privat" }, 116{ "Home","Privat" },
117{ "Work","Geschäft" }, 117{ "Work","Geschäft" },
118{ "Mobile","Handy" }, 118{ "Mobile","Handy" },
119{ "Fax","Fax" }, 119{ "Fax","Fax" },
120{ "Contact Editor","Bearbeite Kontakt" }, 120{ "Contact Editor","Bearbeite Kontakt" },
121{ "&Mail...","&Mail..." }, 121{ "&Mail...","&Mail..." },
122{ "&Print...","Drucken..." }, 122{ "&Print...","Drucken..." },
123{ "&Save","&Speichern" }, 123{ "&Save","&Speichern" },
124{ "&New Contact...","&Neuer Kontakt..." }, 124{ "&New Contact...","&Neuer Kontakt..." },
125{ "Mail &vCard...","Mail &vCard..." }, 125{ "Mail &vCard...","Mail &vCard..." },
126{ "Selected to phone","Auswahl zum Telefon" }, 126{ "Selected to phone","Auswahl zum Telefon" },
127{ "Beam selected v&Card(s)","Beame ausgewählte v&Card(s)" }, 127{ "Beam selected v&Card(s)","Beame ausgewählte v&Card(s)" },
128{ "&Beam personal vCard","Beame persönliche vCard" }, 128{ "&Beam personal vCard","Beame persönliche vCard" },
129{ "&Edit Contact...","Bearbeite Kontakt..." }, 129{ "&Edit Contact...","Bearbeite Kontakt..." },
130{ "&Exit","B&eenden" }, 130{ "&Exit","B&eenden" },
131{ "&Copy","Kopieren" }, 131{ "&Copy","Kopieren" },
132{ "Cu&t","Ausschneiden" }, 132{ "Cu&t","Ausschneiden" },
133{ "&Paste","Einfügen" }, 133{ "&Paste","Einfügen" },
134{ "Select &All","Alles auswählen" }, 134{ "Select &All","Alles auswählen" },
135{ "&Undo","Rückgängig machen" }, 135{ "&Undo","Rückgängig machen" },
136{ "Re&do","Wiederherstellen" }, 136{ "Re&do","Wiederherstellen" },
137{ "&Delete Contact","Lösche Kontakt" }, 137{ "&Delete Contact","Lösche Kontakt" },
138{ "Configure &Resources...","Konfiguriere &Resourcen..." }, 138{ "Configure &Resources...","Konfiguriere &Resourcen..." },
139{ "&Configure %1...","Konfiguriere %1..." }, 139{ "&Configure %1...","Konfiguriere %1..." },
140{ "Configure S&hortcuts...","Konfiguriere S&hortcuts..." }, 140{ "Configure S&hortcuts...","Konfiguriere S&hortcuts..." },
141{ "Show Jump Bar","Zeige Jump Bar" }, 141{ "Show Jump Bar","Zeige Jump Bar" },
142{ "Show Details","Zeige Details" }, 142{ "Show Details","Zeige Details" },
143{ "Beam receive enabled","Beam (IR) Empfang AN" }, 143{ "Beam receive enabled","Beam (IR) Empfang AN" },
144{ "Set Who Am I","Setze "wer bin ich"" }, 144{ "Set Who Am I","Setze "wer bin ich"" },
145{ "Set Categories for Contacts...","Setze Kategorien für Kontakte..." }, 145{ "Set Categories for Contacts...","Setze Kategorien für Kontakte..." },
146{ "Edit Category List...","Editiere Kategorieliste..." }, 146{ "Edit Category List...","Editiere Kategorieliste..." },
147{ "Remove "voice"...","Entferne "voice"..." }, 147{ "Remove "voice"...","Entferne "voice"..." },
148{ "Import from Outlook...","Importiere aus Outlook..." }, 148{ "Import from Outlook...","Importiere aus Outlook..." },
149{ "Licence","Lizenz" }, 149{ "Licence","Lizenz" },
150{ "Faq","Fragen + Antworten" }, 150{ "Faq","Fragen + Antworten" },
151{ "What's New?","Was ist neu?" }, 151{ "What's New?","Was ist neu?" },
152{ "Sync HowTo","Sync Anleitung" }, 152{ "Sync HowTo","Sync Anleitung" },
153{ "&About KAddressBook","Über KAdressBuch" }, 153{ "&About KAddressBook","Über KAdressBuch" },
154{ "Select Incremental Search Field","Selektiere Such Feld" }, 154{ "Select Incremental Search Field","Selektiere Such Feld" },
155{ "Synchronize","Synchronisieren" }, 155{ "Synchronize","Synchronisieren" },
156{ "Configure...","Konfigurieren..." }, 156{ "Configure...","Konfigurieren..." },
157{ "Enable Pi-Sync","Aktiviere Pi-Sync" }, 157{ "Enable Pi-Sync","Aktiviere Pi-Sync" },
158{ "Multiple sync","Multi Sync" }, 158{ "Multiple sync","Multi Sync" },
159{ "Import CSV List...","Importiere CSV-Datei..." }, 159{ "Import CSV List...","Importiere CSV-Datei..." },
160{ "Export CSV List...","Exportiere CSV-Datei..." }, 160{ "Export CSV List...","Exportiere CSV-Datei..." },
161{ "Import KDE 2 Addressbook...","Importiere KDE 2 Adressbuch..." }, 161{ "Import KDE 2 Addressbook...","Importiere KDE 2 Adressbuch..." },
162{ "Import vCard...","Importiere vCard..." }, 162{ "Import vCard...","Importiere vCard..." },
163{ "Export vCard 3.0...","Exportiere vCard 3.0..." }, 163{ "Export vCard 3.0...","Exportiere vCard 3.0..." },
164{ "Import Qtopia...","Importiere Qtopia..." }, 164{ "Import Qtopia...","Importiere Qtopia..." },
165{ "Export Qtopia...","Exportiere Qtopia..." }, 165{ "Export Qtopia...","Exportiere Qtopia..." },
166{ "Edit Contact","Bearbeite Kontakt" }, 166{ "Edit Contact","Bearbeite Kontakt" },
167{ "Ok","Ok" }, 167{ "Ok","Ok" },
168{ "Apply","Anwenden" }, 168{ "Apply","Anwenden" },
169{ "Cancel","Abbrechen" }, 169{ "Cancel","Abbrechen" },
170{ "KAddressbook/Pi","KAdressbuch/Pi" }, 170{ "KAddressbook/Pi","KAdressbuch/Pi" },
171{ "No Filter","Kein Filter" }, 171{ "No Filter","Kein Filter" },
172{ "Given Name","Vorname" }, 172{ "Given Name","Vorname" },
173{ "Family Name","Nachname" }, 173{ "Family Name","Nachname" },
174{ "Email Address","E-Mail Adresse" }, 174{ "Email Address","E-Mail Adresse" },
175{ "All Fields","Alle Felder" }, 175{ "All Fields","Alle Felder" },
176{ "Question","Frage" }, 176{ "Question","Frage" },
177{ "After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as "other".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?","After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as "other".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?" }, 177{ "After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as "other".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?","After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as "other".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?" },
178{ "No","Nein" }, 178{ "No","Nein" },
179{ "Yes","Ja" }, 179{ "Yes","Ja" },
180{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile" }, 180{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile" },
181{ "Local device name:","Name dieses Gerätes:" }, 181{ "Local device name:","Name dieses Gerätes:" },
182{ "New profile","Neues Profil" }, 182{ "New profile","Neues Profil" },
183{ "Clone profile","Klone Profil" }, 183{ "Clone profile","Klone Profil" },
184{ "Delete profile","Lösche Profil" }, 184{ "Delete profile","Lösche Profil" },
185{ "Profile:","Profil:" }, 185{ "Profile:","Profil:" },
186{ "Ask for every entry on conflict","Frage bei Konflikten nach"}, 186{ "Ask for every entry on conflict","Frage bei Konflikten nach"},
187{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, 187{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
188{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, 188{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
189{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" } 189{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }
190{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, 190{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
191{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, 191{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
192{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, 192{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
193{ "Write back file","Schreibe Datei zurück" }, 193{ "Write back file","Schreibe Datei zurück" },
194{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, 194{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
195{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 195{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
196{ "Local device name:","Name dieses Gerätes:" }, 196{ "Local device name:","Name dieses Gerätes:" },
197{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, 197{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
198{ "Sync preferences","Synchronisations Einstellungen" }, 198{ "Sync preferences","Synchronisations Einstellungen" },
199{ "Profile kind","Profil Art" }, 199{ "Profile kind","Profil Art" },
200{ "Local file","Lokale Datei" }, 200{ "Local file","Lokale Datei" },
201{ "Local file:","Lokale Datei:" }, 201{ "Local file:","Lokale Datei:" },
202{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 202{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
203{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 203{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
204{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 204{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
205{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, 205{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"},
206{ "Device","Gerät:" }, 206{ "Device","Gerät:" },
207{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, 207{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" },
208{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" }, 208{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n","Synchronisationsübersicht:\n\n %d items lokal hinzugefügt\n %d items entfernt hinzugefügt\n %d items lokal geändert\n %d items entfernt geändert\n %d items lokal gelöscht\n %d items entfernt gelöscht\n" },
209{ "Synchronization successful","Synchronisation erfolgreich" }, 209{ "Synchronization successful","Synchronisation erfolgreich" },
210{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, 210{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." },
211{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, 211{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" },
212{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, 212{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" },
213{ "Enter password","Passwort eingeben" }, 213{ "Enter password","Passwort eingeben" },
214{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, 214{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" },
215{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, 215{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." },
216{ "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" }, 216{ "Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n","Sorry, das Kopierkommando schlug fehl!\nKommando war:\n%1\n \nVersuche Kommando von Kosole um\nDetails für das Fehlschlagen\nzu erfahren.\n" },
217{ "Writing back file result: ","Resultat des Dateizurückschreibens: " }, 217{ "Writing back file result: ","Resultat des Dateizurückschreibens: " },
218{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, 218{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" },
219{ "Used %1 Client","Benutzter %1 Client" }, 219{ "Used %1 Client","Benutzter %1 Client" },
220{ "No email client installed","Kein Email Klient installiert" }, 220{ "No email client installed","Kein Email Klient installiert" },
221{ "Userdefined email client","Benutzerdef. Email Klient" }, 221{ "Userdefined email client","Benutzerdef. Email Klient" },
222{ "OM/Pi email client","OM/Pi Email Klient" }, 222{ "OM/Pi email client","OM/Pi Email Klient" },
223{ "Include in multiple ","Beziehe in mehrfach " }, 223{ "Include in multiple ","Beziehe in mehrfach " },
224{ "calendar ","Kalender " }, 224{ "calendar ","Kalender " },
225{ "addressbook ","Adressbuch " }, 225{ "addressbook ","Adressbuch " },
226{ "pwmanager","PWmanager" }, 226{ "pwmanager","PWmanager" },
227{ " sync"," Sync ein" }, 227{ " sync"," Sync ein" },
228{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 228{ "Write back synced data","Schreibe gesyncte Daten zurück" },
229{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, 229{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
230{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, 230{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
231{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, 231{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
232{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 232{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
233{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 233{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
234{ "Help...","Hilfe..." }, 234{ "Help...","Hilfe..." },
235{ "Local file Cal:","Lokale Datei Kal:" }, 235{ "Local file Cal:","Lokale Datei Kal:" },
236{ "Local file ABook:","Lokale Datei ABuch:" }, 236{ "Local file ABook:","Lokale Datei ABuch:" },
237{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 237{ "Local file PWMgr:","Lokale Datei PWMgr:" },
238{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 238{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
239{ "Calendar:","Kalender:" }, 239{ "Calendar:","Kalender:" },
240{ "AddressBook:","AdressBuch:" }, 240{ "AddressBook:","AdressBuch:" },
241{ "PWManager:","PWManager:" }, 241{ "PWManager:","PWManager:" },
242{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 242{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
243{ "ssh/scp","ssh/scp" }, 243{ "ssh/scp","ssh/scp" },
244{ "ftp","ftp" }, 244{ "ftp","ftp" },
245{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 245{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
246{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 246{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
247{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 247{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
248{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 248{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
249{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 249{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
250{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 250{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
251{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 251{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
252{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 252{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
253{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, 253{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Model\nautomatisch erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
254{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 254{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
255{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 255{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
256{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 256{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
257{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 257{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
258{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 258{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
259{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 259{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
260{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" }, 260{ "Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!","Wollen Sie wirklich\nmit allen selektierten\nProfilen \"Multi-Syncen\"?\nDas Syncen dauert einige Zeit -\nalle Profile werden zweimal gesynct!" },
261{ "KDE-Pim Sync","KDE-Pim Sync" }, 261{ "KDE-Pim Sync","KDE-Pim Sync" },
262{ "Multiple profiles","Multi-Sync Profile" }, 262{ "Multiple profiles","Multi-Sync Profile" },
263{ "Device: ","Gerät: " }, 263{ "Device: ","Gerät: " },
264{ "Multiple sync started.","Multi-Sync gestartet." }, 264{ "Multiple sync started.","Multi-Sync gestartet." },
265{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\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","Namensprefix" }, 288{ "Honorific Prefixes","Namensprefix" },
289{ "Honorific Suffixes","Namenssuffix" }, 289{ "Honorific Suffixes","Namenssuffix" },
290{ "Nick Name","Spitzname" }, 290{ "Nick Name","Spitzname" },
291{ "Birthday","Geburtstag" }, 291{ "Birthday","Geburtstag" },
292{ "Home Address Street","Privat Adresse Strasse" }, 292{ "Home Address Street","Privat Adresse Strasse" },
293{ "Home Address Locality","Privat Adresse Stadt" }, 293{ "Home Address Locality","Privat Adresse Stadt" },
294{ "Home Address Region","Privat Adresse Bundesland" }, 294{ "Home Address Region","Privat Adresse Bundesland" },
295{ "Home Address Postal Code","Privat Adresse PLZ" }, 295{ "Home Address Postal Code","Privat Adresse PLZ" },
296{ "Home Address Country","Privat Adresse Land" }, 296{ "Home Address Country","Privat Adresse Land" },
297{ "Home Address Label","Privat Adresse Label" }, 297{ "Home Address Label","Privat Adresse Label" },
298{ "Business Address Street","Büro Adresse Strasse" }, 298{ "Business Address Street","Büro Adresse Strasse" },
299{ "Business Address Locality","Büro Adresse Stadt" }, 299{ "Business Address Locality","Büro Adresse Stadt" },
300{ "Business Address Region","Büro Adresse Bundesland" }, 300{ "Business Address Region","Büro Adresse Bundesland" },
301{ "Business Address Postal Code","Büro Adresse PLZ" }, 301{ "Business Address Postal Code","Büro Adresse PLZ" },
302{ "Business Address Country","Büro Adresse Land" }, 302{ "Business Address Country","Büro Adresse Land" },
303{ "Business Address Label","Büro Adresse Label" }, 303{ "Business Address Label","Büro Adresse Label" },
304{ "Home Phone","Privat Telefon" }, 304{ "Home Phone","Privat Telefon" },
305{ "Business Phone","Büro Telefon" }, 305{ "Business Phone","Büro Telefon" },
306{ "Mobile Phone","Handy" }, 306{ "Mobile Phone","Handy" },
307{ "Home Fax","Privat Fax" }, 307{ "Home Fax","Privat Fax" },
308{ "Business Fax","Büro Fax" }, 308{ "Business Fax","Büro Fax" },
309{ "Car Phone","Autotelefon" }, 309{ "Car Phone","Autotelefon" },
310{ "ISDN","ISDN" }, 310{ "ISDN","ISDN" },
311{ "Pager","Pager" }, 311{ "Pager","Pager" },
312{ "Mail Client","Mail Klient" }, 312{ "Mail Client","Mail Klient" },
313{ "Title","Titel" }, 313{ "Title","Titel" },
314{ "Role","Rolle" }, 314{ "Role","Rolle" },
315{ "Note","Notiz" }, 315{ "Note","Notiz" },
316{ "URL","URL" }, 316{ "URL","URL" },
317{ "Resource","Resource" }, 317{ "Resource","Resource" },
318{ "SIP","SIP" }, 318{ "SIP","SIP" },
319{ "Default Filter","Default Filter" }, 319{ "Default Filter","Default Filter" },
320{ "The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime.","#The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime." }, 320{ "The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime.","#The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime." },
321{ "No default filter","Kein default Filter" }, 321{ "No default filter","Kein default Filter" },
322{ "Use last active filter","Nutze letzen aktiven Filter" }, 322{ "Use last active filter","Nutze letzen aktiven Filter" },
323{ "Use filter:","Nutze Filter:" }, 323{ "Use filter:","Nutze Filter:" },
324{ "Look & Feel","Look & Feel" }, 324{ "Look & Feel","Look & Feel" },
325{ "Row Separator","Reihen Separator" }, 325{ "Row Separator","Reihen Separator" },
326{ "Alternating backgrounds","Abwechselnder Hintergrund" }, 326{ "Alternating backgrounds","Abwechselnder Hintergrund" },
327{ "Single line","Einzelne Zeile" }, 327{ "Single line","Einzelne Zeile" },
328{ "Enable background image:","Hintergrundbild:" }, 328{ "Enable background image:","Hintergrundbild:" },
329{ "Enable contact tooltips","Contact Tooltips" }, 329{ "Enable contact tooltips","Contact Tooltips" },
330{ "&Enable custom Colors","Benutzerdef. Farben" }, 330{ "&Enable custom Colors","Benutzerdef. Farben" },
331{ "&Colors","Farben" }, 331{ "&Colors","Farben" },
332{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." }, 332{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." },
333{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." }, 333{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." },
334{ "&Enable custom fonts","B&enutzerdefinierte Schriften" }, 334{ "&Enable custom fonts","B&enutzerdefinierte Schriften" },
335{ "&Text font:","Textschriftart:" }, 335{ "&Text font:","Textschriftart:" },
336{ "&Header font:","Titelschriftart:" }, 336{ "&Header font:","Titelschriftart:" },
337{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." }, 337{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." },
338{ "&Fonts","Schri&ften" }, 338{ "&Fonts","Schri&ften" },
339{ "Background Color","Hintergrundfarbe" }, 339{ "Background Color","Hintergrundfarbe" },
340{ "Text Color","Textfarbe" }, 340{ "Text Color","Textfarbe" },
341{ "Header Background Color","Titel Hintergrundfarbe" }, 341{ "Header Background Color","Titel Hintergrundfarbe" },
342{ "Header Text Color","Titel Farbe" }, 342{ "Header Text Color","Titel Farbe" },
343{ "Highlight Color","Auswahlfarbe" }, 343{ "Highlight Color","Auswahlfarbe" },
344{ "Highlighted Text Color","Auswahltextfarbe" }, 344{ "Highlighted Text Color","Auswahltextfarbe" },
345{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" }, 345{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" },
346{ "Postal","Post" }, 346{ "Postal","Post" },
347{ "Dr.","Dr." }, 347{ "Dr.","Dr." },
348{ "Miss","Frl." }, 348{ "Miss","Frl." },
349{ "Mr.","Herr" }, 349{ "Mr.","Herr" },
350{ "Mrs.","Frau" }, 350{ "Mrs.","Frau" },
351{ "Ms.","Fr." }, 351{ "Ms.","Fr." },
352{ "Prof.","Prof." }, 352{ "Prof.","Prof." },
353{ "I","I" }, 353{ "I","I" },
354{ "II","II" }, 354{ "II","II" },
355{ "III","III" }, 355{ "III","III" },
356{ "Jr.","Jr." }, 356{ "Jr.","Jr." },
357{ "Sr.","Sr." }, 357{ "Sr.","Sr." },
358{ "Name:","Name:" }, 358{ "Name:","Name:" },
359{ "Documents","Dokumente" }, 359{ "Documents","Dokumente" },
360{ "Files","Dateien" }, 360{ "Files","Dateien" },
361{ "All Files","Alle Dateien" }, 361{ "All Files","Alle Dateien" },
362{ "Name","Name" }, 362{ "Name","Name" },
363{ "Size","Größe" }, 363{ "Size","Größe" },
364{ "Date","Datum" }, 364{ "Date","Datum" },
365{ "Mime Type","Mime Typ" }, 365{ "Mime Type","Mime Typ" },
366{ "Geo Data Input","Geo Dateneingabe" }, 366{ "Geo Data Input","Geo Dateneingabe" },
367{ "Sexagesimal","Sexagesimal" }, 367{ "Sexagesimal","Sexagesimal" },
368{ "North","Nord" }, 368{ "North","Nord" },
369{ "South","Süd" }, 369{ "South","Süd" },
370{ "East","Ost" }, 370{ "East","Ost" },
371{ "West","West" }, 371{ "West","West" },
372{ "Undefined","Unbestimmt" }, 372{ "Undefined","Unbestimmt" },
373{ "Edit Address","Bearbeite Adresse" }, 373{ "Edit Address","Bearbeite Adresse" },
374{ "Street:","Strasse:" }, 374{ "Street:","Strasse:" },
375{ "Post office box:","Postfach:" }, 375{ "Post office box:","Postfach:" },
376{ "Locality:","Stadt:" }, 376{ "Locality:","Stadt:" },
377{ "Region:","Region:" }, 377{ "Region:","Region:" },
378{ "Postal code:","PLZ:" }, 378{ "Postal code:","PLZ:" },
379{ "Country:","Staat:" }, 379{ "Country:","Staat:" },
380{ "This is the preferred address","Dies ist die bevorzugte Adresse" }, 380{ "This is the preferred address","Dies ist die bevorzugte Adresse" },
381{ "New...","Neu..." }, 381{ "New...","Neu..." },
382{ "Change Type","Ändere Art" }, 382{ "Change Type","Ändere Art" },
383{ "Edit Address Type","Ändere Address Art" }, 383{ "Edit Address Type","Ändere Address Art" },
384{ "Address Types","Address Art" }, 384{ "Address Types","Address Art" },
385{ "Domestic","Inland" }, 385{ "Domestic","Inland" },
386{ "International","International" }, 386{ "International","International" },
387{ "Parcel","Paket" }, 387{ "Parcel","Paket" },
388{ "Edit Contact Name","Ändere Kontakt Name" }, 388{ "Edit Contact Name","Ändere Kontakt Name" },
389{ "Honorific prefixes:","Namensprefixes:" }, 389{ "Honorific prefixes:","Namensprefixes:" },
390{ "Given name:","Vorname:" }, 390{ "Given name:","Vorname:" },
391{ "Additional names:","Mittelnamen:" }, 391{ "Additional names:","Mittelnamen:" },
392{ "Family names:","Nachname:" }, 392{ "Family names:","Nachname:" },
393{ "Honorific suffixes:","Namenssuffixe:" }, 393{ "Honorific suffixes:","Namenssuffixe:" },
394{ "Parse name automatically","Setze Namen automatisch" }, 394{ "Parse name automatically","Setze Namen automatisch" },
395{ "Edit Phone Numbers","Bearbeite Telefonnummern" }, 395{ "Edit Phone Numbers","Bearbeite Telefonnummern" },
396{ "Number","Nummer" }, 396{ "Number","Nummer" },
397{ "Type","Typ" }, 397{ "Type","Typ" },
398{ "Edit Phone Number","Bearbeite Telefonnummer" }, 398{ "Edit Phone Number","Bearbeite Telefonnummer" },
399{ "Number:","Nummer:" }, 399{ "Number:","Nummer:" },
400{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" }, 400{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" },
401{ "Types","Typen" }, 401{ "Types","Typen" },
402{ "Messenger","Messenger" }, 402{ "Messenger","Messenger" },
403{ "Other","Anderes" }, 403{ "Other","Anderes" },
404{ "Video","Video" }, 404{ "Video","Video" },
405{ "Mailbox","Mailbox" }, 405{ "Mailbox","Mailbox" },
406{ "Modem","Modem" }, 406{ "Modem","Modem" },
407{ "Car","Auto" }, 407{ "Car","Auto" },
408{ "PCS","PCS" }, 408{ "PCS","PCS" },
409{ "Category","Kategorie" }, 409{ "Category","Kategorie" },
410{ "Select Categories","Wähle Kategorien" }, 410{ "Select Categories","Wähle Kategorien" },
411{ " &Deselect All "," &Deselektiere alle " }, 411{ " &Deselect All "," &Deselektiere alle " },
412{ " &Edit Categories "," B&earbeite Kategorien " }, 412{ " &Edit Categories "," B&earbeite Kategorien " },
413{ "&OK","&OK" }, 413{ "&OK","&OK" },
414{ "&Cancel","Abbre&chen" }, 414{ "&Cancel","Abbre&chen" },
415{ "Configure","Konfiguriere" }, 415{ "Configure","Konfiguriere" },
416{ "Default","Voreinstellungen" }, 416{ "Default","Voreinstellungen" },
417{ "Addressbook","Adressbuch" }, 417{ "Addressbook","Adressbuch" },
418{ "Details view font","Schriftart Detailansicht" }, 418{ "Details view font","Schriftart Detailansicht" },
419{ "phone:123","phone:123" }, 419{ "phone:123","phone:123" },
420{ "Search only after <return> key pressed","Suche nur nach <return> Taste" }, 420{ "Search only after <return> key pressed","Suche nur nach <return> Taste" },
421{ "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","Allgemein" }, 425{ "General","Allgemein" },
426{ "Extensions (restart)","Extensions (restart)" }, 426{ "Extensions (restart)","Extensions (restart)" },
427{ "Description","Beschreibungen" }, 427{ "Description","Beschreibungen" },
428{ "Extensions","Extensions" }, 428{ "Extensions","Extensions" },
429{ "Prefixes","Prefixe" }, 429{ "Prefixes","Prefixe" },
430{ "Inclusions","Inclusions" }, 430{ "Inclusions","Inclusions" },
431{ "Suffixes","Suffixe" }, 431{ "Suffixes","Suffixe" },
432{ "Default formatted name:","Default format. Name:" }, 432{ "Default formatted name:","Default format. Name:" },
433{ "Empty","Leer" }, 433{ "Empty","Leer" },
434{ "Simple Name","Einfacher Name" }, 434{ "Simple Name","Einfacher Name" },
435{ "Full Name","Voller Name" }, 435{ "Full Name","Voller Name" },
436{ "Reverse Name","Namen umdrehen" }, 436{ "Reverse Name","Namen umdrehen" },
437{ "Contact","Kontakt" }, 437{ "Contact","Kontakt" },
438{ "Global","Allgemein" }, 438{ "Global","Allgemein" },
439{ "Phone","Telefon" }, 439{ "Phone","Telefon" },
440{ "SMS","SMS" }, 440{ "SMS","SMS" },
441{ "Language:(needs restart)","Sprache:(Neustart)" }, 441{ "Language:(needs restart)","Sprache:(Neustart)" },
442{ "English","English" }, 442{ "English","English" },
443{ "German","Deutsch" }, 443{ "German","Deutsch" },
444{ "French","Französisch" }, 444{ "French","Französisch" },
445{ "Italian","Italienisch" }, 445{ "Italian","Italienisch" },
446{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" }, 446{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" },
447{ "Time Format(nr):","Zeit Format(nr):" }, 447{ "Time Format(nr):","Zeit Format(nr):" },
448{ "24:00","24:00" }, 448{ "24:00","24:00" },
449{ "12:00am","12:00am" }, 449{ "12:00am","12:00am" },
450{ "Week starts on Sunday","Woche beginnt Sonntags" }, 450{ "Week starts on Sunday","Woche beginnt Sonntags" },
451{ "Locale","Locale" }, 451{ "Locale","Locale" },
452{ "Date Format:","Datums Format:" }, 452{ "Date Format:","Datums Format:" },
453{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 453{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
454{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 454{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
455{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 455{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
456{ "User defined","Benutzerdefiniert" }, 456{ "User defined","Benutzerdefiniert" },
457{ "User long date:","Format langes Datum:" }, 457{ "User long date:","Format langes Datum:" },
458{ "User short date:","Format kurzes Datum:" }, 458{ "User short date:","Format kurzes Datum:" },
459{ "Daylight start:","Sommerzeit Start:" }, 459{ "Daylight start:","Sommerzeit Start:" },
460{ "Daylight end:","Sommerzeit Ende:" }, 460{ "Daylight end:","Sommerzeit Ende:" },
461{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 461{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
462{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" }, 462{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" },
463{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 463{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
464{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 464{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
465{ "Date Format","Datums Format" }, 465{ "Date Format","Datums Format" },
466{ "Timezone:","Zeitzone:" }, 466{ "Timezone:","Zeitzone:" },
467{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 467{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
468{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 468{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
469{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 469{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
470{ "Used Mail Client","Benutzter Mail Client" }, 470{ "Used Mail Client","Benutzter Mail Client" },
471{ "Channel:","Channel:" }, 471{ "Channel:","Channel:" },
472{ "Message:","Message:" }, 472{ "Message:","Message:" },
473{ "Parameters:","Parameter:" }, 473{ "Parameters:","Parameter:" },
474{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 474{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
475{ "extra Message:","extra Message:" }, 475{ "extra Message:","extra Message:" },
476{ "extra Parameters:","extra Parameter:" }, 476{ "extra Parameters:","extra Parameter:" },
477{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 477{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
478{ "External Apps.","Externe Appl." }, 478{ "External Apps.","Externe Appl." },
479{ "Used %1 Client","Benutzer %1 Client" }, 479{ "Used %1 Client","Benutzer %1 Client" },
480{ "No email client installed","Keine Email Client installiert" }, 480{ "No email client installed","Keine Email Client installiert" },
481{ "Userdefined email client","Benutzerdef. Email Client" }, 481{ "Userdefined email client","Benutzerdef. Email Client" },
482{ "OM/Pi email client","OM/Pi Email Client" }, 482{ "OM/Pi email client","OM/Pi Email Client" },
483{ "Close KA/Pi?","Schließe KA/Pi?" }, 483{ "Close KA/Pi?","Schließe KA/Pi?" },
484{ "\nChanges will be saved!","\nÄnderungen werden gespeichert!" }, 484{ "\nChanges will be saved!","\nÄnderungen werden gespeichert!" },
485{ "Yes!","Ja!" }, 485{ "Yes!","Ja!" },
486{ "There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. ","#There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. " }, 486{ "There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. ","#There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. " },
487{ "Saving addressbook ... ","Speichere Adressbuch ... " }, 487{ "Saving addressbook ... ","Speichere Adressbuch ... " },
488{ "Addressbook saved!","Adressbuch gespeichert!" }, 488{ "Addressbook saved!","Adressbuch gespeichert!" },
489{ "Default Table View","Default Tabellenansicht" }, 489{ "Default Table View","Default Tabellenansicht" },
490{ "Merge and Remove","Zusammenfügen/entfernen" }, 490{ "Merge and Remove","Zusammenfügen/entfernen" },
491{ "Merge","Zusammenfügen" }, 491{ "Merge","Zusammenfügen" },
492{ "Merge Contacts Editor","Contact-Zusammenfüge-Editor" }, 492{ "Merge Contacts Editor","Contact-Zusammenfüge-Editor" },
493{ "New List...","Neue Liste..." }, 493{ "New List...","Neue Liste..." },
494{ "Rename List...","Ändere Namen..." }, 494{ "Rename List...","Ändere Namen..." },
495{ "Remove List","Lösche Liste" }, 495{ "Remove List","Lösche Liste" },
496{ "Add Contact","Kontakt hinzu" }, 496{ "Add Contact","Kontakt hinzu" },
497{ "Change Email...","Ändere Email..." }, 497{ "Change Email...","Ändere Email..." },
498{ "Remove Contact","Entferne Kontakt" }, 498{ "Remove Contact","Entferne Kontakt" },
499{ "Use Preferred","Nutze Preferred" }, 499{ "Use Preferred","Nutze Preferred" },
500{ "Distribution List Editor","Distribution List Editor" }, 500{ "Distribution List Editor","Distribution List Editor" },
501{ "Choose which contacts to export","Wähle Kontakte zum Exportieren" }, 501{ "Choose which contacts to export","Wähle Kontakte zum Exportieren" },
502{ "Which contacts do you want to export?","Welche Kontakte sollen exportiert werden?" }, 502{ "Which contacts do you want to export?","Welche Kontakte sollen exportiert werden?" },
503{ "Contact Selection","Kontaktauswahl" }, 503{ "Contact Selection","Kontaktauswahl" },
504{ "&All","&Alle" }, 504{ "&All","&Alle" },
505{ "Export the entire address book","Exportiere das komplette Addressbuch" }, 505{ "Export the entire address book","Exportiere das komplette Addressbuch" },
506{ "&Selected","Au&sgewählte" }, 506{ "&Selected","Au&sgewählte" },
507{ "Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","###Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected." }, 507{ "Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","###Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected." },
508{ "By matching &filter","Zutreffender &Filter" }, 508{ "By matching &filter","Zutreffender &Filter" },
509{ "Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","###Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters" }, 509{ "Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","###Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters" },
510{ "By Cate&gories","Kategorien" }, 510{ "By Cate&gories","Kategorien" },
511{ "Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","###Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories." }, 511{ "Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","###Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories." },
512{ "Select a filter to decide which contacts to export.","Wähle Filter zum Export aus." }, 512{ "Select a filter to decide which contacts to export.","Wähle Filter zum Export aus." },
513{ "Check the categories whose members you want to export.","Wähle die Kategorien zum Export aus." }, 513{ "Check the categories whose members you want to export.","Wähle die Kategorien zum Export aus." },
514{ "Sorting","Sortieren" }, 514{ "Sorting","Sortieren" },
515{ "Criterion:","Merkmal:" }, 515{ "Criterion:","Merkmal:" },
516{ "Order:","Reihenfolge:" }, 516{ "Order:","Reihenfolge:" },
517{ "Ascending","Aufsteigend" }, 517{ "Ascending","Aufsteigend" },
518{ "Descending","Absteigend" }, 518{ "Descending","Absteigend" },
519{ "Save file","Datei speichern" }, 519{ "Save file","Datei speichern" },
520{ "Error","Fehler" }, 520{ "Error","Fehler" },
521{ "Unable to export contacts.","Exportieren der Kontakte geht nicht." }, 521{ "Unable to export contacts.","Exportieren der Kontakte geht nicht." },
522{ "\nNo unsaved changes detected!\nNothing will be saved!","\nKeine ungespeicherten\nÄnderungen erkannt!\nNichts wird gespeichert!" }, 522{ "\nNo unsaved changes detected!\nNothing will be saved!","\nKeine ungespeicherten\nÄnderungen erkannt!\nNichts wird gespeichert!" },
523{ "Manage new categories...","Verwalte neue Kategorien..." }, 523{ "Manage new categories...","Verwalte neue Kategorien..." },
524{ "&File","Datei" }, 524{ "&File","Datei" },
525{ "&Edit","Bearbeite" }, 525{ "&Edit","Bearbeite" },
526{ "&View","Ansichten" }, 526{ "&View","Ansichten" },
527{ "&Settings","Konfiguration" }, 527{ "&Settings","Konfiguration" },
528{ "&Change selected","Ändere Selekt." }, 528{ "&Change selected","Ändere Selekt." },
529{ "&Help","Hilfe" }, 529{ "&Help","Hilfe" },
530{ "Remove sync info","Entferne Sync Info" }, 530{ "Remove sync info","Entferne Sync Info" },
531{ "For all profiles","Für alle Profile" }, 531{ "For all profiles","Für alle Profile" },
532{ "&Change","Ändere" }, 532{ "&Change","Ändere" },
533{ "Import xml (Qtopia)...","Importiere xml (Qtopia)..." }, 533{ "Import xml (Qtopia)...","Importiere xml (Qtopia)..." },
534{ "Export xml (Qtopia)...","Exportiere xml (Qtopia)..." }, 534{ "Export xml (Qtopia)...","Exportiere xml (Qtopia)..." },
535{ "Export to phone","Exportiere aufs Handy..." }, 535{ "Export to phone","Exportiere aufs Handy..." },
536{ "Which contacts do you want to select?","Welche Kontakte möchten Sie wählen?" }, 536{ "Which contacts do you want to select?","Welche Kontakte möchten Sie wählen?" },
537{ "&Modify","Ändere" }, 537{ "&Modify","Ändere" },
538{ "Choose which contacts to select","Bitte Kontakte auswählen!" }, 538{ "Choose which contacts to select","Bitte Kontakte auswählen!" },
539{ "After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nKontakten geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, 539{ "After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nKontakten geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " },
540{ "Manage new Categories","Verwalte neue Kategorien" }, 540{ "Manage new Categories","Verwalte neue Kategorien" },
541{ "Add to category list","Füge zur Kategorieliste hinzu" }, 541{ "Add to category list","Füge zur Kategorieliste hinzu" },
542{ "Remove from addressees","Entferne von den Kontakten" }, 542{ "Remove from addressees","Entferne von den Kontakten" },
543{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, 543{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" },
544{ "A&dd","Hinzufügen" }, 544{ "A&dd","Hinzufügen" },
545{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 545{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
546{ "NOTE: This will remove all old\ncontact data on phone!","ACHTUNG: Das löscht alle alten\nKontakt Daten auf dem Handy!" }, 546{ "NOTE: This will remove all old\ncontact data on phone!","ACHTUNG: Das löscht alle alten\nKontakt Daten auf dem Handy!" },
547{ "Export to mobile phone!","Exportiere auf das Handy!" }, 547{ "Export to mobile phone!","Exportiere auf das Handy!" },
548{ "Export to phone options","Export ans Handy Optionen" }, 548{ "Export to phone options","Export ans Handy Optionen" },
549{ "Writing to phone...","Sende Daten ans Handy..." }, 549{ "Writing to phone...","Sende Daten ans Handy..." },
550{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 550{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
551{ "Retry","Nochmal versuchen" }, 551{ "Retry","Nochmal versuchen" },
552{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 552{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
553{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 553{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
554{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 554{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
555{ "&Print View","Drucke Ansicht" }, 555{ "&Print View","Drucke Ansicht" },
556{ "&Print Details","Drucke Details" }, 556{ "&Print Details","Drucke Details" },
557{ "Beam v&Card(s)...","Beame v&Card(s)..." }, 557{ "Beam v&Card(s)...","Beame v&Card(s)..." },
558{ "Set formatted name...","Setze formatierten Namen..." }, 558{ "Set formatted name...","Setze formatierten Namen..." },
559{ "Kde Sync HowTo","Kde Sync HowTo" }, 559{ "Kde Sync HowTo","Kde Sync HowTo" },
560{ "Multi Sync HowTo","Multi Sync HowTo" }, 560{ "Multi Sync HowTo","Multi Sync HowTo" },
561{ "&Beam","&Beame" }, 561{ "&Beam","&Beame" },
562{ "Edit Email Addresses","Editiere Email Adressen" }, 562{ "Edit Email Addresses","Editiere Email Adressen" },
563{ "Email address:","Email Adresse:" }, 563{ "Email address:","Email Adresse:" },
564{ "Change","Ändere" }, 564{ "Change","Ändere" },
565{ "Set Standard","Setze Standard" }, 565{ "Set Standard","Setze Standard" },
566{ "New Contact","Neuer Contact" }, 566{ "New Contact","Neuer Contact" },
567{ "Undo %1","Rückgängig %1" }, 567{ "Undo %1","Rückgängig %1" },
568{ "Redo","Wiederholen" }, 568{ "Redo","Wiederholen" },
569{ "Saving ... please wait! ","Am Speichern ... bitte warten! " }, 569{ "Saving ... please wait! ","Am Speichern ... bitte warten! " },
570{ "CSV Import Dialog","CSV Import Dialog" }, 570{ "CSV Import Dialog","CSV Import Dialog" },
571{ "File to import:","Datei zum Import:" }, 571{ "File to import:","Datei zum Import:" },
572{ "Delimiter","Trennzeichen" }, 572{ "Delimiter","Trennzeichen" },
573{ "Comma","Komma" }, 573{ "Comma","Komma" },
574{ "Semicolon","Semikolon" }, 574{ "Semicolon","Semikolon" },
575{ "Tabulator","Tabulator" }, 575{ "Tabulator","Tabulator" },
576{ "Space","Leerzeichen" }, 576{ "Space","Leerzeichen" },
577{ "1","1" }, 577{ "1","1" },
578{ """,""" }, 578{ """,""" },
579{ "'","'" }, 579{ "'","'" },
580{ "Start at line:","Beginne mit Zeile:" }, 580{ "Start at line:","Beginne mit Zeile:" },
581{ "Textquote:","Textquote:" }, 581{ "Textquote:","Textquote:" },
582{ "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" }, 582{ "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" },
583{ "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" }, 583{ "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" },
584{ "Override previously imported entries?","Überschreibe bereits importierte Einträge?" }, 584{ "Override previously imported entries?","Überschreibe bereits importierte Einträge?" },
585{ "Select vCard to Import","Selektiere zu importierende vCard" }, 585{ "Select vCard to Import","Selektiere zu importierende vCard" },
586{ "Information","Information" }, 586{ "Information","Information" },
587{ "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","Typ der Ansicht" }, 633{ "View Type","Typ der Ansicht" },
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{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" }, 749{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" },
750{ "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" }, 750{ "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" },
751{ "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" }, 751{ "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" },
752{ "Edit new contact","Bearbeite neuen Kontakt" }, 752{ "Edit new contact","Bearbeite neuen Kontakt" },
753{ "Edit ","Bearbeite " }, 753{ "Edit ","Bearbeite " },
754{ "No contact changed!","Kein Kontakt verändert" }, 754{ "No contact changed!","Kein Kontakt verändert" },
755{ "%1 contacts changed!","%1 Kontakte geändert!" }, 755{ "%1 contacts changed!","%1 Kontakte geändert!" },
756{ "Mobile (home)","Handy (Arbeit)" }, 756{ "Mobile (home)","Handy (Arbeit)" },
757{ "Mobile (work)","Handy (Privat)" }, 757{ "Mobile (work)","Handy (Privat)" },
758{ "Def.Formatted Name","Def. Format. Name" }, 758{ "Def.Formatted Name","Def. Format. Name" },
759{ "Colors","Farben" }, 759{ "Colors","Farben" },
760{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 760{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
761{ "Backup enabled","Backup angeschaltet" }, 761{ "Backup enabled","Backup angeschaltet" },
762{ "Use standard backup dir","Standard Backupverzeichnis" }, 762{ "Use standard backup dir","Standard Backupverzeichnis" },
763{ "Number of Backups:","Anzahl der Backups" }, 763{ "Number of Backups:","Anzahl der Backups" },
764{ "Make backup every ","Mache ein Backup alle " }, 764{ "Make backup every ","Mache ein Backup alle " },
765{ " days"," Tage" }, 765{ " days"," Tage" },
766{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, 766{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
767{ "Backup Failed!","Backup Problem!" }, 767{ "Backup Failed!","Backup Problem!" },
768{ "Try again now","Versuche jetzt nochmal" }, 768{ "Try again now","Versuche jetzt nochmal" },
769{ "Try again later","Versuche später nochmal" }, 769{ "Try again later","Versuche später nochmal" },
770{ "Try again tomorrow","Versuche morgen nochmal" }, 770{ "Try again tomorrow","Versuche morgen nochmal" },
771{ "Disable backup","Schalte Backup ab" }, 771{ "Disable backup","Schalte Backup ab" },
772{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 772{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
773{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 773{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
774{ "Choose action","Wähle Aktion" }, 774{ "Choose action","Wähle Aktion" },
775{ "&Configure KA/Pi...","Konfiguriere KA/Pi..." },
776{ "Global Settings...","Globale Einstellungen..." },
775{ "","" }, 777{ "","" },
776{ "","" }, 778{ "","" },
777{ "","" }, 779{ "","" },
778{ "","" }, 780{ "","" },
779{ "","" }, \ No newline at end of file 781{ "","" }, \ No newline at end of file
diff --git a/bin/kdepim/kopiemail/germantranslation.txt b/bin/kdepim/kopiemail/germantranslation.txt
index 75fdd11..14e5c0b 100644
--- a/bin/kdepim/kopiemail/germantranslation.txt
+++ b/bin/kdepim/kopiemail/germantranslation.txt
@@ -1,280 +1,282 @@
1{ " Local Time"," Locale Zeit" }, 1{ " Local Time"," Locale Zeit" },
2{ "Preferences","Vorlieben" }, 2{ "Preferences","Vorlieben" },
3{ "Ok","Ok" }, 3{ "Ok","Ok" },
4{ "Default","Standard" }, 4{ "Default","Standard" },
5{ "Cancel","Abbrechen" }, 5{ "Cancel","Abbrechen" },
6{ "Global","Global" }, 6{ "Global","Global" },
7{ "Email","Email" }, 7{ "Email","Email" },
8{ "Phone","Phone" }, 8{ "Phone","Phone" },
9{ "SMS","SMS" }, 9{ "SMS","SMS" },
10{ "Fax","Fax" }, 10{ "Fax","Fax" },
11{ "Pager","Pager" }, 11{ "Pager","Pager" },
12{ "SIP","SIP" }, 12{ "SIP","SIP" },
13{ "Language:(needs restart)","Sprache (Neustart!)" }, 13{ "Language:(needs restart)","Sprache (Neustart!)" },
14{ "English","Englisch" }, 14{ "English","Englisch" },
15{ "German","Deutsch" }, 15{ "German","Deutsch" },
16{ "French","Französich" }, 16{ "French","Französich" },
17{ "Italian","Italienisch" }, 17{ "Italian","Italienisch" },
18{ "User defined (usertranslation.txt)","Benutzerdef.(usertranslation.txt)" }, 18{ "User defined (usertranslation.txt)","Benutzerdef.(usertranslation.txt)" },
19{ "Time Format(nr):","Zeit Format(Neustart!)" }, 19{ "Time Format(nr):","Zeit Format(Neustart!)" },
20{ "24:00","24:00" }, 20{ "24:00","24:00" },
21{ "12:00am","12:00am" }, 21{ "12:00am","12:00am" },
22{ "Week starts on Sunday","Woche beginnt Sonntags" }, 22{ "Week starts on Sunday","Woche beginnt Sonntags" },
23{ "Locale","Localisation" }, 23{ "Locale","Localisation" },
24{ "Date Format:","Datums Format:" }, 24{ "Date Format:","Datums Format:" },
25{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 25{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
26{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 26{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
27{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 27{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
28{ "User defined","Benutzerdefiniert" }, 28{ "User defined","Benutzerdefiniert" },
29{ "User long date:","Format langes Datum:" }, 29{ "User long date:","Format langes Datum:" },
30{ "User short date:","Format kurzes Datum:" }, 30{ "User short date:","Format kurzes Datum:" },
31{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, 31{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" },
32{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 32{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
33{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 33{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
34{ "Date Format","Datums Format" }, 34{ "Date Format","Datums Format" },
35{ "Timezone:","Zeitzone:" }, 35{ "Timezone:","Zeitzone:" },
36{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 36{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
37{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 37{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
38{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 38{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
39{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 39{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
40{ "Daylight start:","Sommerzeit Start:" }, 40{ "Daylight start:","Sommerzeit Start:" },
41{ "Mon","Mo" }, 41{ "Mon","Mo" },
42{ "Tue","Di" }, 42{ "Tue","Di" },
43{ "Wed","Mi" }, 43{ "Wed","Mi" },
44{ "Thu","Do" }, 44{ "Thu","Do" },
45{ "Fri","Fr" }, 45{ "Fri","Fr" },
46{ "Sat","Sa" }, 46{ "Sat","Sa" },
47{ "Sun","So" }, 47{ "Sun","So" },
48{ "January","Januar" }, 48{ "January","Januar" },
49{ "February","Februar" }, 49{ "February","Februar" },
50{ "March","März" }, 50{ "March","März" },
51{ "April","April" }, 51{ "April","April" },
52{ "May","Mai" }, 52{ "May","Mai" },
53{ "June","Juni" }, 53{ "June","Juni" },
54{ "July","Juli" }, 54{ "July","Juli" },
55{ "August","August" }, 55{ "August","August" },
56{ "September","September" }, 56{ "September","September" },
57{ "October","Oktober" }, 57{ "October","Oktober" },
58{ "November","November" }, 58{ "November","November" },
59{ "December","Dezember" }, 59{ "December","Dezember" },
60{ "tomorrow","morgen" }, 60{ "tomorrow","morgen" },
61{ "today","heute" }, 61{ "today","heute" },
62{ "yesterday","gestern" }, 62{ "yesterday","gestern" },
63{ "Monday","Montag" }, 63{ "Monday","Montag" },
64{ "Tuesday","Dienstag" }, 64{ "Tuesday","Dienstag" },
65{ "Wednesday","Mittwoch" }, 65{ "Wednesday","Mittwoch" },
66{ "Thursday","Donnerstag" }, 66{ "Thursday","Donnerstag" },
67{ "Friday","Freitag" }, 67{ "Friday","Freitag" },
68{ "Saturday","Samstag" }, 68{ "Saturday","Samstag" },
69{ "Sunday","Sonntag" }, 69{ "Sunday","Sonntag" },
70{ "Daylight end:","Sommerzeit Ende:" }, 70{ "Daylight end:","Sommerzeit Ende:" },
71{ "Time Zone","Zeitzone" }, 71{ "Time Zone","Zeitzone" },
72{ "Used Mail Client","Benutzter Mail Client" }, 72{ "Used Mail Client","Benutzter Mail Client" },
73{ "Channel:","Channel:" }, 73{ "Channel:","Channel:" },
74{ "Message:","Message:" }, 74{ "Message:","Message:" },
75{ "Parameters:","Parameter:" }, 75{ "Parameters:","Parameter:" },
76{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 76{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
77{ "extra Message:","extra Message:" }, 77{ "extra Message:","extra Message:" },
78{ "extra Parameters:","extra Parameter:" }, 78{ "extra Parameters:","extra Parameter:" },
79{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 79{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
80{ "External Apps.","Externe Appl." }, 80{ "External Apps.","Externe Appl." },
81{ "General","Allgemein" }, 81{ "General","Allgemein" },
82{ "Full &name:","Vor- und &Nachname:" }, 82{ "Full &name:","Vor- und &Nachname:" },
83{ "E&mail address:","E&mail Adresse:" }, 83{ "E&mail address:","E&mail Adresse:" },
84{ "Fonts","Schriftart" }, 84{ "Fonts","Schriftart" },
85{ "Choose...","Wähle..." }, 85{ "Choose...","Wähle..." },
86{ "Used %1 Client","Benutzter %1 Client" }, 86{ "Used %1 Client","Benutzter %1 Client" },
87{ "No email client installed","Kein Email Klient installiert" }, 87{ "No email client installed","Kein Email Klient installiert" },
88{ "Userdefined email client","Benutzerdef. Email Klient" }, 88{ "Userdefined email client","Benutzerdef. Email Klient" },
89{ "OM/Pi email client","OM/Pi Email Klient" }, 89{ "OM/Pi email client","OM/Pi Email Klient" },
90{ "Delete","Löschen" }, 90{ "Delete","Löschen" },
91{ "New","Neu" }, 91{ "New","Neu" },
92{ "Edit","Bearbeite" }, 92{ "Edit","Bearbeite" },
93{ "Close","Schließen" }, 93{ "Close","Schließen" },
94{ "Size","Größe" }, 94{ "Size","Größe" },
95{ "Date","Datum" }, 95{ "Date","Datum" },
96{ "Please set at","Bitte einstellen in" }, 96{ "Please set at","Bitte einstellen in" },
97{ "Settings@General TAB","Einstellungen@Allgemein TAB" }, 97{ "Settings@General TAB","Einstellungen@Allgemein TAB" },
98{ "KOpieMail/Pi","KOpieMail/Pi" }, 98{ "KOpieMail/Pi","KOpieMail/Pi" },
99{ "Mail","Mail" }, 99{ "Mail","Mail" },
100{ "Settings","Konfig" }, 100{ "Settings","Konfig" },
101{ "Get all new mails","Hole alle neuen Mails" }, 101{ "Get all new mails","Hole alle neuen Mails" },
102{ "Get new messages","Hole neue mails" }, 102{ "Get new messages","Hole neue mails" },
103{ "Compose new mail","Schreibe neue Mail" }, 103{ "Compose new mail","Schreibe neue Mail" },
104{ "Send queued mails","Sende gespeicherte Mails" }, 104{ "Send queued mails","Sende gespeicherte Mails" },
105{ "Show/Hide folders","Zeige Verzeichnisse" }, 105{ "Show/Hide folders","Zeige Verzeichnisse" },
106{ "Delete Mail","Lösche Mail" }, 106{ "Delete Mail","Lösche Mail" },
107{ "Edit settings","Ändere Einstellungen" }, 107{ "Edit settings","Ändere Einstellungen" },
108{ "Configure accounts","Konfiguriere Zugänge" }, 108{ "Configure accounts","Konfiguriere Zugänge" },
109{ "Mailbox","Mailbox" }, 109{ "Mailbox","Mailbox" },
110{ "Subject","Betreff" }, 110{ "Subject","Betreff" },
111{ "Sender","Sender" }, 111{ "Sender","Sender" },
112{ "Size","Größe" }, 112{ "Size","Größe" },
113{ "Date","Datum" }, 113{ "Date","Datum" },
114{ "Close","Schliessen" }, 114{ "Close","Schliessen" },
115{ "Help","Hilfe" }, 115{ "Help","Hilfe" },
116{ "About","Über" }, 116{ "About","Über" },
117{ "Licence","Lizenz" }, 117{ "Licence","Lizenz" },
118{ "LibEtPan Licence","LibEtPan Lizenz" }, 118{ "LibEtPan Licence","LibEtPan Lizenz" },
119{ "Settings - some need a restart (nr)","Einstellungen - manche benötigen einen Neustart (nr)" }, 119{ "Settings - some need a restart (nr)","Einstellungen - manche benötigen einen Neustart (nr)" },
120{ "HINT: Separate multiple\neMail addresses by ";"","Hinweis:Trenne mehrere\nAddressen mit einem ";"" }, 120{ "HINT: Separate multiple\neMail addresses by ";"","Hinweis:Trenne mehrere\nAddressen mit einem ";"" },
121{ "Ignore above settings and\nuse KA/Pi "Who am I" instead!","Ignoriere obige Einstellungen und\nbenutze KA/Pi "Wer bin ich"\nstattdessen!" }, 121{ "Ignore above settings and\nuse KA/Pi "Who am I" instead!","Ignoriere obige Einstellungen und\nbenutze KA/Pi "Wer bin ich"\nstattdessen!" },
122{ "View mail as html","Zeige Mails als html" }, 122{ "View mail as html","Zeige Mails als html" },
123{ "Send mails later","Sende Mails später" }, 123{ "Send mails later","Sende Mails später" },
124{ "Application(nr)","Applikation(nr)" }, 124{ "Application(nr)","Applikation(nr)" },
125{ "OK","OK" }, 125{ "OK","OK" },
126{ "Compose mail:","Verfasse Mail:" }, 126{ "Compose mail:","Verfasse Mail:" },
127{ "Dear Mr.","Hallo Herr" }, 127{ "Dear Mr.","Hallo Herr" },
128{ "Read mail:","Lese Mail:" }, 128{ "Read mail:","Lese Mail:" },
129{ "Hello","Hallo" }, 129{ "Hello","Hallo" },
130{ "Configure Accounts","Konfigure Zugänge" }, 130{ "Configure Accounts","Konfigure Zugänge" },
131{ "Name of the Account","Name des Zugangs" }, 131{ "Name of the Account","Name des Zugangs" },
132{ "News","News" }, 132{ "News","News" },
133{ "Account","Zugang" }, 133{ "Account","Zugang" },
134{ "Type","Typ" }, 134{ "Type","Typ" },
135{ "<p>Please select an account.</p>","<p>Bitte wähle einen Zugang.</p>" }, 135{ "<p>Please select an account.</p>","<p>Bitte wähle einen Zugang.</p>" },
136{ "Error","Fehler" }, 136{ "Error","Fehler" },
137{ "Configure NNTP","Konfiguriere News" }, 137{ "Configure NNTP","Konfiguriere News" },
138{ "Port","Port" }, 138{ "Port","Port" },
139{ "Server","Server" }, 139{ "Server","Server" },
140{ "Use SSL","Benutze SSL" }, 140{ "Use SSL","Benutze SSL" },
141{ "User","Benutzer" }, 141{ "User","Benutzer" },
142{ "Password","Passwort" }, 142{ "Password","Passwort" },
143{ "Use Login","Benutze Login" }, 143{ "Use Login","Benutze Login" },
144{ "Newsgroup","Newsgroup" }, 144{ "Newsgroup","Newsgroup" },
145{ "Get newsgroup list from server","Hole Newsgroup Liste vom Server" }, 145{ "Get newsgroup list from server","Hole Newsgroup Liste vom Server" },
146{ "Filter:","Filter:" }, 146{ "Filter:","Filter:" },
147{ "Show subscribed","Zeige abbonnierte" }, 147{ "Show subscribed","Zeige abbonnierte" },
148{ "Groups","NewsGroups" }, 148{ "Groups","NewsGroups" },
149{ "Configure IMAP","Konfiguriere IMAP" }, 149{ "Configure IMAP","Konfiguriere IMAP" },
150{ "Use secure sockets:","Benutze sichere Verbindung:" }, 150{ "Use secure sockets:","Benutze sichere Verbindung:" },
151{ "ssh $SERVER exec","ssh $SERVER exec" }, 151{ "ssh $SERVER exec","ssh $SERVER exec" },
152{ "Prefix","Prefix" }, 152{ "Prefix","Prefix" },
153{ "Local storage folder:","Lokales Verzeichnis:" }, 153{ "Local storage folder:","Lokales Verzeichnis:" },
154{ "Get only messages smaller","Hole nur Nachrichten kleiner" }, 154{ "Get only messages smaller","Hole nur Nachrichten kleiner" },
155{ "kB","kB" }, 155{ "kB","kB" },
156{ "Leave Messages on Server","Belasse Nachrichten auf dem Server" }, 156{ "Leave Messages on Server","Belasse Nachrichten auf dem Server" },
157{ "Configure POP3","Konfiguriere POP3" }, 157{ "Configure POP3","Konfiguriere POP3" },
158{ "ssh $SERVER exec imapd","ssh $SERVER exec imapd" }, 158{ "ssh $SERVER exec imapd","ssh $SERVER exec imapd" },
159{ "Configure SMTP","Konfiguriere SMTP" }, 159{ "Configure SMTP","Konfiguriere SMTP" },
160{ "Name of the SMTP Server","Name des SMTP Servers" }, 160{ "Name of the SMTP Server","Name des SMTP Servers" },
161{ "Port of the SMTP Server","Port des SMTP Servers" }, 161{ "Port of the SMTP Server","Port des SMTP Servers" },
162{ "Fetching folder list","Hole Verzeichnis Liste" }, 162{ "Fetching folder list","Hole Verzeichnis Liste" },
163{ "Fetch ","Hole " }, 163{ "Fetch ","Hole " },
164{ "Fetching header list","Hole Titel Liste" }, 164{ "Fetching header list","Hole Titel Liste" },
165{ "Mailbox has %1 mails","Mailbox hat %1 Mails" }, 165{ "Mailbox has %1 mails","Mailbox hat %1 Mails" },
166{ "Read this mail","Lies diese Mail" }, 166{ "Read this mail","Lies diese Mail" },
167{ "Move/Copy this mail","Verschiebe/kopiere diese Mail" }, 167{ "Move/Copy this mail","Verschiebe/kopiere diese Mail" },
168{ "Delete this mail","Lösche diese Mail" }, 168{ "Delete this mail","Lösche diese Mail" },
169{ "Move/Copy all selected mail","Verschiebe/kopiere selektierte Mails" }, 169{ "Move/Copy all selected mail","Verschiebe/kopiere selektierte Mails" },
170{ "Delete all selected mails","Lösche alle selektierten Mails" }, 170{ "Delete all selected mails","Lösche alle selektierten Mails" },
171{ "Clear selection","Selektion aufheben" }, 171{ "Clear selection","Selektion aufheben" },
172{ "Reply","Antworten" }, 172{ "Reply","Antworten" },
173{ "Forward","Weiterleiten" }, 173{ "Forward","Weiterleiten" },
174{ "Attachments","Anhang" }, 174{ "Attachments","Anhang" },
175{ "Show Html","Zeige in html" }, 175{ "Show Html","Zeige in html" },
176{ "Description","Beschreibung" }, 176{ "Description","Beschreibung" },
177{ "Filename","Dateiname" }, 177{ "Filename","Dateiname" },
178{ "E-Mail by %1","E-Mail von %1" }, 178{ "E-Mail by %1","E-Mail von %1" },
179{ "Cc","Kopie" }, 179{ "Cc","Kopie" },
180{ "To","An" }, 180{ "To","An" },
181{ "From","Von" }, 181{ "From","Von" },
182{ "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" }, 182{ "<p>Do you really want to delete this mail? <br><br>","<p>Wollen Sie diese Mail wirklich löschen? <br><br>" },
183{ "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" }, 183{ "Mailbox has %1 mail(s)","Mailbox hat %1 Mail(s)" },
184{ "Move/Copie all mails","Verschiebe/kopiere alle Mails" }, 184{ "Move/Copie all mails","Verschiebe/kopiere alle Mails" },
185{ "Delete all mails","Lösche alle Mails" }, 185{ "Delete all mails","Lösche alle Mails" },
186{ "Create new subfolder","Neues Unterverzeichnis" }, 186{ "Create new subfolder","Neues Unterverzeichnis" },
187{ "Delete folder","Lösche Verzeichnis" }, 187{ "Delete folder","Lösche Verzeichnis" },
188{ "Refresh folder list","Aktualisiere Liste" }, 188{ "Refresh folder list","Aktualisiere Liste" },
189{ "Create new folder","Neues Verzeichnis" }, 189{ "Create new folder","Neues Verzeichnis" },
190{ "Disconnect","Diskonnect" }, 190{ "Disconnect","Diskonnect" },
191{ "Set offline","Gehe offline" }, 191{ "Set offline","Gehe offline" },
192{ "Select target box","Wähle Ziel Box" }, 192{ "Select target box","Wähle Ziel Box" },
193{ "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" }, 193{ "<b>Store mail(s) to</b>","<b>Speichere Mail(s) nach</b>" },
194{ "Folder:","Verzeichnis:" }, 194{ "Folder:","Verzeichnis:" },
195{ "Account:","Zugang:" }, 195{ "Account:","Zugang:" },
196{ "Prefix will prepend, do not enter","Pfad-Prefix wird vorangestellt" }, 196{ "Prefix will prepend, do not enter","Pfad-Prefix wird vorangestellt" },
197{ "Move mail(s)","Verschiebe Mail(s)" }, 197{ "Move mail(s)","Verschiebe Mail(s)" },
198{ "only mails smaller","nur Mails kleiner" }, 198{ "only mails smaller","nur Mails kleiner" },
199{ " kB"," kB" }, 199{ " kB"," kB" },
200{ " message %1 of %2"," Nachricht %1 von %2" }, 200{ " message %1 of %2"," Nachricht %1 von %2" },
201{ "Copying...","Am Kopieren..." }, 201{ "Copying...","Am Kopieren..." },
202{ "Copy message %1 of %2","Kopiere Nachricht %1 von %2" }, 202{ "Copy message %1 of %2","Kopiere Nachricht %1 von %2" },
203{ "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" }, 203{ "Do you really want to delete\nall selected mails?","Wollen Sie wirklich alle\nselektierten Mails Löschen?" },
204{ "Delete All Mails","Lösche alle Mails" }, 204{ "Delete All Mails","Lösche alle Mails" },
205{ "Deleting ...","Am Löschen..." }, 205{ "Deleting ...","Am Löschen..." },
206{ "Delete message %1 of %2","Lösche Nachricht %1 von %2" }, 206{ "Delete message %1 of %2","Lösche Nachricht %1 von %2" },
207{ "Compose Message","Verfasse Nachricht" }, 207{ "Compose Message","Verfasse Nachricht" },
208{ "Reply-To","Antwort-An" }, 208{ "Reply-To","Antwort-An" },
209{ "BCC","BCC" }, 209{ "BCC","BCC" },
210{ "Signature","Signatur" }, 210{ "Signature","Signatur" },
211{ "CC","Kopie" }, 211{ "CC","Kopie" },
212{ "Options","Optionen" }, 212{ "Options","Optionen" },
213{ "Delete File","Lösche Datei" }, 213{ "Delete File","Lösche Datei" },
214{ "Add File","Füge Datei hinzu" }, 214{ "Add File","Füge Datei hinzu" },
215{ "Attachment","Anhang" }, 215{ "Attachment","Anhang" },
216{ "send later","sende später" }, 216{ "send later","sende später" },
217{ "use:","via:" }, 217{ "use:","via:" },
218{ "Save","Speichern" }, 218{ "Save","Speichern" },
219{ "Name","Name" }, 219{ "Name","Name" },
220{ "No Receiver spezified","Kein Empfänger angegeben" }, 220{ "No Receiver spezified","Kein Empfänger angegeben" },
221{ "Sending mail","Sende Mail" }, 221{ "Sending mail","Sende Mail" },
222{ "No","Nein" }, 222{ "No","Nein" },
223{ "Yes","Ja" }, 223{ "Yes","Ja" },
224{ "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" }, 224{ "Store message into drafts?\n","Speichere Nachricht in Entwürfe?\n" },
225{ "Store message?","Nachricht speichern?" }, 225{ "Store message?","Nachricht speichern?" },
226{ "Select Type","Selektiere Typ" }, 226{ "Select Type","Selektiere Typ" },
227{ "Select Account Type","Wähle Art des Zugangs" }, 227{ "Select Account Type","Wähle Art des Zugangs" },
228{ "IMAP","IMAP (online lesen)" }, 228{ "IMAP","IMAP (online lesen)" },
229{ "POP3","POP3 (holen)" }, 229{ "POP3","POP3 (holen)" },
230{ "SMTP","SMTP (senden)" }, 230{ "SMTP","SMTP (senden)" },
231{ "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" }, 231{ "<p>Do you really want to delete the selected Account?</p>","<p>Möchten Sie wirklich den ausgewählten Account löschen?</p>" },
232{ "Question","Eine Frage..." }, 232{ "Question","Eine Frage..." },
233{ "Send this message?","Nachricht wirklich senden?" }, 233{ "Send this message?","Nachricht wirklich senden?" },
234{ "Stop editing message","Stop editing message" }, 234{ "Stop editing message","Stop editing message" },
235{ "Sending mail %1 of %2","Sende Mail %1 von %2" }, 235{ "Sending mail %1 of %2","Sende Mail %1 von %2" },
236{ "%1 of %2 bytes send","%1 von %2 Bytes gesendet" }, 236{ "%1 of %2 bytes send","%1 von %2 Bytes gesendet" },
237{ "Refresh header list","Aktualisiere Titel Liste" }, 237{ "Refresh header list","Aktualisiere Titel Liste" },
238{ "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" }, 238{ "Define a smtp\n account first!\n","Bitte zuerst einen\nSMTP Account anlegen!\n" },
239{ "Mail queue flushed","Gespeicherte Mails gesendet!" }, 239{ "Mail queue flushed","Gespeicherte Mails gesendet!" },
240{ "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n","Bitte legen Sie einen\nSMTP Account an.\nDer SMTP Account wird\nfür das Versenden von\nMails benötigt!" }, 240{ "Please create an\nSMTP account first.\nThe SMTP is needed\nfor sending mail.\n","Bitte legen Sie einen\nSMTP Account an.\nDer SMTP Account wird\nfür das Versenden von\nMails benötigt!" },
241{ "Show next mail","Zeige nächste Mail" }, 241{ "Show next mail","Zeige nächste Mail" },
242{ "End of List","Ende der Liste" }, 242{ "End of List","Ende der Liste" },
243{ "Language","Sprache" }, 243{ "Language","Sprache" },
244{ "Time Format","Zeit Format" }, 244{ "Time Format","Zeit Format" },
245{ "%1 groups subscribed","%1 Guppen abboniert" }, 245{ "%1 groups subscribed","%1 Guppen abboniert" },
246{ "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" }, 246{ "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" },
247{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 247{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
248{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 248{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
249{ "Save settings","Speichere Einstellungen" }, 249{ "Save settings","Speichere Einstellungen" },
250{ "Save standard","Speichere Standard" }, 250{ "Save standard","Speichere Standard" },
251{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 251{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
252{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 252{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
253{ "Data storage path","Daten Speicherpfad" }, 253{ "Data storage path","Daten Speicherpfad" },
254{ "userdefined","benutzerdefiniert" }, 254{ "userdefined","benutzerdefiniert" },
255{ "Reply to this mail","Beantworte diese Mail" }, 255{ "Reply to this mail","Beantworte diese Mail" },
256{ "Su:","Be:" }, 256{ "Su:","Be:" },
257{ "Fr:","Vo:" }, 257{ "Fr:","Vo:" },
258{ "To:","An:" }, 258{ "To:","An:" },
259{ "Download Mail","Mail runterladen" }, 259{ "Download Mail","Mail runterladen" },
260{ "View Source","Zeige Source" }, 260{ "View Source","Zeige Source" },
261{ "Show "To" field in list view","Zeige "An" Feld in Listenansicht" }, 261{ "Show "To" field in list view","Zeige "An" Feld in Listenansicht" },
262{ "Show info fields at startup","Zeige Info Felder beim Start" }, 262{ "Show info fields at startup","Zeige Info Felder beim Start" },
263{ "Show "Subject" info field","Zeige "Betreff" Info Feld" }, 263{ "Show "Subject" info field","Zeige "Betreff" Info Feld" },
264{ "Show "From" info field","Zeige "Von" Info Feld" }, 264{ "Show "From" info field","Zeige "Von" Info Feld" },
265{ "Show "To" info field","Zeige "An" Info Feld" }, 265{ "Show "To" info field","Zeige "An" Info Feld" },
266{ "Mail saved as draft!","Mail als Entwurf gespeichert!" }, 266{ "Mail saved as draft!","Mail als Entwurf gespeichert!" },
267{ "Save signature","Speichere Signatur" }, 267{ "Save signature","Speichere Signatur" },
268{ "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically.","Beim lokalen Verzeichnis\nsind keine Pfade erlaubt.\nBitte Verzeichnisnamen\nangeben oder leer lassen\num automatisch ein lokales\nVerzeichnis mit dem\nZugangsnamen anzulegen." }, 268{ "No paths allowed in\nlocal folder settings.\nPlease specify a folder\nname or leave empty\nto create local folder\nwith account name\nautomatically.","Beim lokalen Verzeichnis\nsind keine Pfade erlaubt.\nBitte Verzeichnisnamen\nangeben oder leer lassen\num automatisch ein lokales\nVerzeichnis mit dem\nZugangsnamen anzulegen." },
269{ "Do you really want to\nsend all queued mails?","Möchten sie wirklich\nalle Mails im\nOutgoing-Ordner\nsenden?" }, 269{ "Do you really want to\nsend all queued mails?","Möchten sie wirklich\nalle Mails im\nOutgoing-Ordner\nsenden?" },
270{ "Sending all mails","Senden aller Mails" }, 270{ "Sending all mails","Senden aller Mails" },
271{ "SMTP Account:","SMTP Zugang:" }, 271{ "SMTP Account:","SMTP Zugang:" },
272{ "Select SMTP Account","Wähle SMTP Zugang" }, 272{ "Select SMTP Account","Wähle SMTP Zugang" },
273{ "Error sending mail:\n%1","Fehler beim Mailversand:\n%1\nHaben Sie vergessen\ndie Post ausreichend\nzu frankieren? ;-)" }, 273{ "Error sending mail:\n%1","Fehler beim Mailversand:\n%1\nHaben Sie vergessen\ndie Post ausreichend\nzu frankieren? ;-)" },
274{ "Error sending mail","Fehler beim Mailversand" }, 274{ "Error sending mail","Fehler beim Mailversand" },
275{ "Error sending queued mail.\nBreaking.","Fehler beim Mailversand.\nAbbruch." }, 275{ "Error sending queued mail.\nBreaking.","Fehler beim Mailversand.\nAbbruch." },
276{ "Colors","Farben" }, 276{ "Colors","Farben" },
277{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 277{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
278{ "Configure OM/Pi...","Konfiguriere OM/Pi..." },
279{ "Global Settings...","Globale Einstellungen..." },
278{ "","" }, 280{ "","" },
279{ "","" }, 281{ "","" },
280{ "","" }, \ No newline at end of file 282{ "","" }, \ No newline at end of file
diff --git a/bin/kdepim/pwmanager/germantranslation.txt b/bin/kdepim/pwmanager/germantranslation.txt
index 06fa727..255f2eb 100644
--- a/bin/kdepim/pwmanager/germantranslation.txt
+++ b/bin/kdepim/pwmanager/germantranslation.txt
@@ -1,376 +1,378 @@
1{ " Local Time","Ortszeit" }, 1{ " Local Time","Ortszeit" },
2{ "Default","Standard" }, 2{ "Default","Standard" },
3{ "Configure...","Konfigurieren..." }, 3{ "Configure...","Konfigurieren..." },
4{ "Remove sync info","Entferne Sync Info" }, 4{ "Remove sync info","Entferne Sync Info" },
5{ "For all profiles","Für alle Profile" }, 5{ "For all profiles","Für alle Profile" },
6{ "Enable Pi-Sync","Aktiviere Pi-Sync" }, 6{ "Enable Pi-Sync","Aktiviere Pi-Sync" },
7{ "Multiple sync","Multi Sync" }, 7{ "Multiple sync","Multi Sync" },
8{ "&Save","&Speichern" }, 8{ "&Save","&Speichern" },
9{ "&Print...","Drucken..." }, 9{ "&Print...","Drucken..." },
10{ "&File","Datei" }, 10{ "&File","Datei" },
11{ "&Edit","Bearbeite" }, 11{ "&Edit","Bearbeite" },
12{ "&View","Ansicht" }, 12{ "&View","Ansicht" },
13{ "&Help","Hilfe" }, 13{ "&Help","Hilfe" },
14{ "Description","Beschreibungen" }, 14{ "Description","Beschreibungen" },
15{ "URL","URL" }, 15{ "URL","URL" },
16{ "Name:","Name:" }, 16{ "Name:","Name:" },
17{ "Documents","Dokumente" }, 17{ "Documents","Dokumente" },
18{ "Files","Dateien" }, 18{ "Files","Dateien" },
19{ "All Files","Alle Dateien" }, 19{ "All Files","Alle Dateien" },
20{ "Name","Name" }, 20{ "Name","Name" },
21{ "Size","Größe" }, 21{ "Size","Größe" },
22{ "Date","Datum" }, 22{ "Date","Datum" },
23{ "Mime Type","Mime Typ" }, 23{ "Mime Type","Mime Typ" },
24{ "Ok","Ok" }, 24{ "Ok","Ok" },
25{ "Cancel","Abbrechen" }, 25{ "Cancel","Abbrechen" },
26{ "1","1" }, 26{ "1","1" },
27{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile" }, 27{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile" },
28{ "Local device name:","Name dieses Gerätes:" }, 28{ "Local device name:","Name dieses Gerätes:" },
29{ "New profile","Neues Profil" }, 29{ "New profile","Neues Profil" },
30{ "Clone profile","Klone Profil" }, 30{ "Clone profile","Klone Profil" },
31{ "Delete profile","Lösche Profil" }, 31{ "Delete profile","Lösche Profil" },
32{ "Profile:","Profil:" }, 32{ "Profile:","Profil:" },
33{ "Multiple Sync options","Multi Sync Optionen" }, 33{ "Multiple Sync options","Multi Sync Optionen" },
34{ "Include in multiple ","Beziehe in mehrfach " }, 34{ "Include in multiple ","Beziehe in mehrfach " },
35{ "calendar ","Kalender " }, 35{ "calendar ","Kalender " },
36{ "addressbook ","Adressbuch " }, 36{ "addressbook ","Adressbuch " },
37{ "pwmanager","PWmanager" }, 37{ "pwmanager","PWmanager" },
38{ " sync"," Sync ein" }, 38{ " sync"," Sync ein" },
39{ "Sync algo options","Sync Ablauf Optionen" }, 39{ "Sync algo options","Sync Ablauf Optionen" },
40{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, 40{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
41{ "Sync preferences","Synchronisations Einstellungen" }, 41{ "Sync preferences","Synchronisations Einstellungen" },
42{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, 42{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
43{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, 43{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" },
44{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, 44{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
45{ "Ask for every entry on conflict","Frage bei Konflikten nach" }, 45{ "Ask for every entry on conflict","Frage bei Konflikten nach" },
46{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, 46{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
47{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, 47{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
48{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, 48{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
49{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 49{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
50{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 50{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
51{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 51{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
52{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 52{ "Write back synced data","Schreibe gesyncte Daten zurück" },
53{ "Write back options","Optionen zum Zurückschreiben" }, 53{ "Write back options","Optionen zum Zurückschreiben" },
54{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 54{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
55{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 55{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
56{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 56{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
57{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 57{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
58{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 58{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
59{ "Time period","Zeitspanne" }, 59{ "Time period","Zeitspanne" },
60{ "From ","Von " }, 60{ "From ","Von " },
61{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 61{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
62{ " weeks in the future "," Wochen in der Zukunft " }, 62{ " weeks in the future "," Wochen in der Zukunft " },
63{ "Profile kind","Profil Art" }, 63{ "Profile kind","Profil Art" },
64{ "Local file","Lokale Datei" }, 64{ "Local file","Lokale Datei" },
65{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 65{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
66{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, 66{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
67{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 67{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
68{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 68{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
69{ "I/O device: ","I/O device: " }, 69{ "I/O device: ","I/O device: " },
70{ "Help...","Hilfe..." }, 70{ "Help...","Hilfe..." },
71{ "Connection: ","Connection: " }, 71{ "Connection: ","Connection: " },
72{ "Model(opt.): ","Model(opt.): " }, 72{ "Model(opt.): ","Model(opt.): " },
73{ "Local file Cal:","Lokale Datei Kal:" }, 73{ "Local file Cal:","Lokale Datei Kal:" },
74{ "Local file ABook:","Lokale Datei ABuch:" }, 74{ "Local file ABook:","Lokale Datei ABuch:" },
75{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 75{ "Local file PWMgr:","Lokale Datei PWMgr:" },
76{ "Choose...","Wähle..." }, 76{ "Choose...","Wähle..." },
77{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 77{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
78{ "Calendar:","Kalender:" }, 78{ "Calendar:","Kalender:" },
79{ "AddressBook:","AdressBuch:" }, 79{ "AddressBook:","AdressBuch:" },
80{ "PWManager:","PWManager:" }, 80{ "PWManager:","PWManager:" },
81{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 81{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
82{ "Local temp file:","Lokale temp Datei:" }, 82{ "Local temp file:","Lokale temp Datei:" },
83{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 83{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
84{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 84{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
85{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 85{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
86{ "ssh/scp","ssh/scp" }, 86{ "ssh/scp","ssh/scp" },
87{ "ftp","ftp" }, 87{ "ftp","ftp" },
88{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 88{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
89{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 89{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
90{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 90{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
91{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 91{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
92{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 92{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
93{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 93{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
94{ "No Filter","Kein Filter" }, 94{ "No Filter","Kein Filter" },
95{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 95{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
96{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 96{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
97{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 97{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
98{ "Configure","Konfiguriere" }, 98{ "Configure","Konfiguriere" },
99{ "Apply","Anwenden" }, 99{ "Apply","Anwenden" },
100{ "None","Kein" }, 100{ "None","Kein" },
101{ "Global","Allgemein" }, 101{ "Global","Allgemein" },
102{ "Email","E-Mail" }, 102{ "Email","E-Mail" },
103{ "Phone","Telefon" }, 103{ "Phone","Telefon" },
104{ "SMS","SMS" }, 104{ "SMS","SMS" },
105{ "Fax","Fax" }, 105{ "Fax","Fax" },
106{ "Pager","Pager" }, 106{ "Pager","Pager" },
107{ "SIP","SIP" }, 107{ "SIP","SIP" },
108{ "Language:(needs restart)","Sprache:(Neustart)" }, 108{ "Language:(needs restart)","Sprache:(Neustart)" },
109{ "English","English" }, 109{ "English","English" },
110{ "German","Deutsch" }, 110{ "German","Deutsch" },
111{ "French","Französisch" }, 111{ "French","Französisch" },
112{ "Italian","Italienisch" }, 112{ "Italian","Italienisch" },
113{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" }, 113{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" },
114{ "Language","Sprache" }, 114{ "Language","Sprache" },
115{ "Time Format(nr):","Zeit Format(nr):" }, 115{ "Time Format(nr):","Zeit Format(nr):" },
116{ "24:00","24:00" }, 116{ "24:00","24:00" },
117{ "12:00am","12:00am" }, 117{ "12:00am","12:00am" },
118{ "Week starts on Sunday","Woche beginnt Sonntags" }, 118{ "Week starts on Sunday","Woche beginnt Sonntags" },
119{ "Time Format","Zeit Format" }, 119{ "Time Format","Zeit Format" },
120{ "Date Format:","Datums Format:" }, 120{ "Date Format:","Datums Format:" },
121{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 121{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
122{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 122{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
123{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 123{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
124{ "User defined","Benutzerdefiniert" }, 124{ "User defined","Benutzerdefiniert" },
125{ "User long date:","Format langes Datum:" }, 125{ "User long date:","Format langes Datum:" },
126{ "User short date:","Format kurzes Datum:" }, 126{ "User short date:","Format kurzes Datum:" },
127{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" }, 127{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" },
128{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 128{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
129{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 129{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
130{ "Date Format","Datums Format" }, 130{ "Date Format","Datums Format" },
131{ "Timezone:","Zeitzone:" }, 131{ "Timezone:","Zeitzone:" },
132{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 132{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
133{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 133{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
134{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 134{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
135{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 135{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
136{ "Daylight start:","Sommerzeit Start:" }, 136{ "Daylight start:","Sommerzeit Start:" },
137{ "Mon","Mo" }, 137{ "Mon","Mo" },
138{ "Tue","Di" }, 138{ "Tue","Di" },
139{ "Wed","Mi" }, 139{ "Wed","Mi" },
140{ "Thu","Do" }, 140{ "Thu","Do" },
141{ "Fri","Fr" }, 141{ "Fri","Fr" },
142{ "Sat","Sa" }, 142{ "Sat","Sa" },
143{ "Sun","So" }, 143{ "Sun","So" },
144{ "January","Januar" }, 144{ "January","Januar" },
145{ "February","Februar" }, 145{ "February","Februar" },
146{ "March","März" }, 146{ "March","März" },
147{ "April","April" }, 147{ "April","April" },
148{ "May","Mai" }, 148{ "May","Mai" },
149{ "June","Juni" }, 149{ "June","Juni" },
150{ "July","July" }, 150{ "July","July" },
151{ "August","August" }, 151{ "August","August" },
152{ "September","September" }, 152{ "September","September" },
153{ "October","October" }, 153{ "October","October" },
154{ "November","November" }, 154{ "November","November" },
155{ "December","Dezember" }, 155{ "December","Dezember" },
156{ "tomorrow","Morgen" }, 156{ "tomorrow","Morgen" },
157{ "today","Heute" }, 157{ "today","Heute" },
158{ "yesterday","Gestern" }, 158{ "yesterday","Gestern" },
159{ "Monday","Montag" }, 159{ "Monday","Montag" },
160{ "Tuesday","Dienstag" }, 160{ "Tuesday","Dienstag" },
161{ "Wednesday","Mittwoch" }, 161{ "Wednesday","Mittwoch" },
162{ "Thursday","Donnerstag" }, 162{ "Thursday","Donnerstag" },
163{ "Friday","Freitag" }, 163{ "Friday","Freitag" },
164{ "Saturday","Samstag" }, 164{ "Saturday","Samstag" },
165{ "Sunday","Sonntag" }, 165{ "Sunday","Sonntag" },
166{ "Daylight end:","Sommerzeit Ende:" }, 166{ "Daylight end:","Sommerzeit Ende:" },
167{ "Time Zone","Zeit Zone" }, 167{ "Time Zone","Zeit Zone" },
168{ "Used Mail Client","Benutzter Mail Client" }, 168{ "Used Mail Client","Benutzter Mail Client" },
169{ "Channel:","Channel:" }, 169{ "Channel:","Channel:" },
170{ "Message:","Message:" }, 170{ "Message:","Message:" },
171{ "Parameters:","Parameter:" }, 171{ "Parameters:","Parameter:" },
172{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 172{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
173{ "extra Message:","extra Message:" }, 173{ "extra Message:","extra Message:" },
174{ "extra Parameters:","extra Parameter:" }, 174{ "extra Parameters:","extra Parameter:" },
175{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 175{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
176{ "External Apps.","Externe Appl." }, 176{ "External Apps.","Externe Appl." },
177{ "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" }, 177{ "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" },
178{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 178{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
179{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 179{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
180{ "Save settings","Speichere Einstellungen" }, 180{ "Save settings","Speichere Einstellungen" },
181{ "Save standard","Speichere Standard" }, 181{ "Save standard","Speichere Standard" },
182{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 182{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
183{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 183{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
184{ "Data storage path","Daten Speicherpfad" }, 184{ "Data storage path","Daten Speicherpfad" },
185{ "Used %1 Client","Benutzer %1 Client" }, 185{ "Used %1 Client","Benutzer %1 Client" },
186{ "No email client installed","Keine Email Client installiert" }, 186{ "No email client installed","Keine Email Client installiert" },
187{ "Userdefined email client","Benutzerdef. Email Client" }, 187{ "Userdefined email client","Benutzerdef. Email Client" },
188{ "OM/Pi email client","OM/Pi Email Client" }, 188{ "OM/Pi email client","OM/Pi Email Client" },
189{ "URL:","URL:" }, 189{ "URL:","URL:" },
190{ "No","Nein" }, 190{ "No","Nein" },
191{ "Yes","Ja" }, 191{ "Yes","Ja" },
192{ "Untitled","Unbenannt" }, 192{ "Untitled","Unbenannt" },
193{ "&New","&Neu" }, 193{ "&New","&Neu" },
194{ "&Open","&Öffne" }, 194{ "&Open","&Öffne" },
195{ "&Close","Schließen" }, 195{ "&Close","Schließen" },
196{ "Save &as...","Speichere &als..." }, 196{ "Save &as...","Speichere &als..." },
197{ "&Text-file...","&Text-Datei..." }, 197{ "&Text-file...","&Text-Datei..." },
198{ "&Gpasman / Kpasman ...","&Gpasman / Kpasman ..." }, 198{ "&Gpasman / Kpasman ...","&Gpasman / Kpasman ..." },
199{ "&CSV (Comma Separated Value) ...","&CSV (Komma getrennte Werte) ..." }, 199{ "&CSV (Comma Separated Value) ...","&CSV (Komma getrennte Werte) ..." },
200{ "E&xport","E&xport" }, 200{ "E&xport","E&xport" },
201{ "I&mport","I&mport" }, 201{ "I&mport","I&mport" },
202{ "&Quit","Beenden" }, 202{ "&Quit","Beenden" },
203{ "&Add password","&Passwort hinzufügen" }, 203{ "&Add password","&Passwort hinzufügen" },
204{ "&Delete","Lösche" }, 204{ "&Delete","Lösche" },
205{ "Change &Master Password","Ändere &Master Passwort" }, 205{ "Change &Master Password","Ändere &Master Passwort" },
206{ "&Manage","Verwalte" }, 206{ "&Manage","Verwalte" },
207{ "&Find","&Finde" }, 207{ "&Find","&Finde" },
208{ "&Lock all entries","Sperre alle Einträge" }, 208{ "&Lock all entries","Sperre alle Einträge" },
209{ "&Deep-lock all entries","Sperre total alle Einträge" }, 209{ "&Deep-lock all entries","Sperre total alle Einträge" },
210{ "&Unlock all entries","Entsperre alle Einträge" }, 210{ "&Unlock all entries","Entsperre alle Einträge" },
211{ "&Configure...","Konfiguriere..." }, 211{ "&Configure...","Konfiguriere..." },
212{ "&Options","Konfig" }, 212{ "&Options","Konfig" },
213{ "C&ategories...","K&ategorien..." }, 213{ "C&ategories...","K&ategorien..." },
214{ "&Sync","&Sync" }, 214{ "&Sync","&Sync" },
215{ "&License","&Lizenz" }, 215{ "&License","&Lizenz" },
216{ "&Faq","&Faq" }, 216{ "&Faq","&Faq" },
217{ "&About PwManager","Über PwManager" }, 217{ "&About PwManager","Über PwManager" },
218{ "&Sync HowTo","&Sync HowTo" }, 218{ "&Sync HowTo","&Sync HowTo" },
219{ "&What's New","Was ist neu?" }, 219{ "&What's New","Was ist neu?" },
220{ "New","Neu" }, 220{ "New","Neu" },
221{ "Open","Öffnen" }, 221{ "Open","Öffnen" },
222{ "Save","Speichern" }, 222{ "Save","Speichern" },
223{ "Save as","Speichern als" }, 223{ "Save as","Speichern als" },
224{ "Print...","Drucke..." }, 224{ "Print...","Drucke..." },
225{ "Add password","Passwort hinzufügen" }, 225{ "Add password","Passwort hinzufügen" },
226{ "Edit password","Passwort ändern" }, 226{ "Edit password","Passwort ändern" },
227{ "Delete password","Passwort löschen" }, 227{ "Delete password","Passwort löschen" },
228{ "Find entry","Finde Eintrag" }, 228{ "Find entry","Finde Eintrag" },
229{ "Lock all entries","Sperre alle Einträge" }, 229{ "Lock all entries","Sperre alle Einträge" },
230{ "Deep-Lock all entries","Sperre total alle Einträge" }, 230{ "Deep-Lock all entries","Sperre total alle Einträge" },
231{ "Unlock all entries","Entsperre alle Einträge" }, 231{ "Unlock all entries","Entsperre alle Einträge" },
232{ "Categories:","Kategorien:" }, 232{ "Categories:","Kategorien:" },
233{ "&Rename","&Umbenennen" }, 233{ "&Rename","&Umbenennen" },
234{ "Username","Benutzername" }, 234{ "Username","Benutzername" },
235{ "Password","Passwort" }, 235{ "Password","Passwort" },
236{ "Launcher","Launcher" }, 236{ "Launcher","Launcher" },
237{ "copy password to clipboard","Kopiere Passwort ins Clipboard" }, 237{ "copy password to clipboard","Kopiere Passwort ins Clipboard" },
238{ "copy username to clipboard","Kopiere Benutzername ins Clipboard" }, 238{ "copy username to clipboard","Kopiere Benutzername ins Clipboard" },
239{ "copy description to clipboard","Kopiere Beschreibung ins Clipboard" }, 239{ "copy description to clipboard","Kopiere Beschreibung ins Clipboard" },
240{ "copy url to clipboard","Kopiere URL ins Clipboard" }, 240{ "copy url to clipboard","Kopiere URL ins Clipboard" },
241{ "copy launcher to clipboard","Kopiere Launcher ins Clipboard" }, 241{ "copy launcher to clipboard","Kopiere Launcher ins Clipboard" },
242{ "copy comment to clipboard","Kopiere Kommentare ins Clipboard" }, 242{ "copy comment to clipboard","Kopiere Kommentare ins Clipboard" },
243{ "Execute "Launcher"",""Launcher" ausführen" }, 243{ "Execute "Launcher"",""Launcher" ausführen" },
244{ "Go to "URL"","Gehe zu "URL"" }, 244{ "Go to "URL"","Gehe zu "URL"" },
245{ "Ready.","Fertig." }, 245{ "Ready.","Fertig." },
246{ "password filename(*.pwm)","passwort dateiname(*.pwm)" }, 246{ "password filename(*.pwm)","passwort dateiname(*.pwm)" },
247{ "File error","Datei Fehler" }, 247{ "File error","Datei Fehler" },
248{ "Could not read file!","Kann Datei nicht lesen!" }, 248{ "Could not read file!","Kann Datei nicht lesen!" },
249{ "Master-password","Master-Passwort" }, 249{ "Master-password","Master-Passwort" },
250{ "Please enter the master-password:","Bitter Master-Passwort eingeben:" }, 250{ "Please enter the master-password:","Bitter Master-Passwort eingeben:" },
251{ "Wrong master-password!\nPlease try again.","Falsches Master-Passwort!\nBitte erneut versuchen." }, 251{ "Wrong master-password!\nPlease try again.","Falsches Master-Passwort!\nBitte erneut versuchen." },
252{ "password error","Passwort Fehler" }, 252{ "password error","Passwort Fehler" },
253{ "Successfully opened file.","Datei erfolgreich geöffnet." }, 253{ "Successfully opened file.","Datei erfolgreich geöffnet." },
254{ "DEEP-LOCKED","TOTAL-GESPERRT" }, 254{ "DEEP-LOCKED","TOTAL-GESPERRT" },
255{ "This file is DEEP-LOCKED!\nThat means all data has been encrypted\nand written out to the file. If you want\nto see the entries, please UNLOCK the file.\nWhile unlocking, you will be prompted for the\nmaster-password or the key-card.","Diese Datei ist TOTAL-GESPERRT!\nDas bedeutet, dass alle Daten verschlüsselt\nsind und in die Datei geschrieben wurden.\nWenn Sie die Einträge sehen möchten\nENTSPERREN Sie bitte die Datei.\nZum Entsperren werden Sie nach\ndem Master-Passwort gefragt." }, 255{ "This file is DEEP-LOCKED!\nThat means all data has been encrypted\nand written out to the file. If you want\nto see the entries, please UNLOCK the file.\nWhile unlocking, you will be prompted for the\nmaster-password or the key-card.","Diese Datei ist TOTAL-GESPERRT!\nDas bedeutet, dass alle Daten verschlüsselt\nsind und in die Datei geschrieben wurden.\nWenn Sie die Einträge sehen möchten\nENTSPERREN Sie bitte die Datei.\nZum Entsperren werden Sie nach\ndem Master-Passwort gefragt." },
256{ "<LOCKED>","<GESPERRT>" }, 256{ "<LOCKED>","<GESPERRT>" },
257{ "To unlock click the icon on the left.","Zum Entsperren auf linkes Icon klicken." }, 257{ "To unlock click the icon on the left.","Zum Entsperren auf linkes Icon klicken." },
258{ "PwManager","PwManager" }, 258{ "PwManager","PwManager" },
259{ "Window-style:","Window-Stil:" }, 259{ "Window-style:","Window-Stil:" },
260{ "Category on top","Kategorien oben" }, 260{ "Category on top","Kategorien oben" },
261{ "Category-list left/top","Kategorien links oben" }, 261{ "Category-list left/top","Kategorien links oben" },
262{ "Font for Password entries:","Schrift für Passwort Einträge:" }, 262{ "Font for Password entries:","Schrift für Passwort Einträge:" },
263{ "Font for Password summary:","Schrift für Passwort Übersicht:" }, 263{ "Font for Password summary:","Schrift für Passwort Übersicht:" },
264{ "Font:","Schriftart:" }, 264{ "Font:","Schriftart:" },
265{ "Summary","Übersicht" }, 265{ "Summary","Übersicht" },
266{ "Compression:","Kompression:" }, 266{ "Compression:","Kompression:" },
267{ "gzip","gzip" }, 267{ "gzip","gzip" },
268{ "Encryption:","Verschlüsselung:" }, 268{ "Encryption:","Verschlüsselung:" },
269{ "Blowfish (128 bit)","Blowfish (128 bit)" }, 269{ "Blowfish (128 bit)","Blowfish (128 bit)" },
270{ "AES-128, Rijndael (128 bit)","AES-128, Rijndael (128 bit)" }, 270{ "AES-128, Rijndael (128 bit)","AES-128, Rijndael (128 bit)" },
271{ "AES-192, Rijndael (192 bit)","AES-192, Rijndael (192 bit)" }, 271{ "AES-192, Rijndael (192 bit)","AES-192, Rijndael (192 bit)" },
272{ "AES-256, Rijndael (256 bit)","AES-256, Rijndael (256 bit)" }, 272{ "AES-256, Rijndael (256 bit)","AES-256, Rijndael (256 bit)" },
273{ "Triple-DES (168 bit)","Triple-DES (168 bit)" }, 273{ "Triple-DES (168 bit)","Triple-DES (168 bit)" },
274{ "Twofish (256 bit)","Twofish (256 bit)" }, 274{ "Twofish (256 bit)","Twofish (256 bit)" },
275{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" }, 275{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" },
276{ "Hashing:","Hashing:" }, 276{ "Hashing:","Hashing:" },
277{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" }, 277{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" },
278{ "SHA-256 (256 bit)","SHA-256 (256 bit)" }, 278{ "SHA-256 (256 bit)","SHA-256 (256 bit)" },
279{ "SHA-384 (384 bit)","SHA-384 (384 bit)" }, 279{ "SHA-384 (384 bit)","SHA-384 (384 bit)" },
280{ "SHA-512 (512 bit)","SHA-512 (512 bit)" }, 280{ "SHA-512 (512 bit)","SHA-512 (512 bit)" },
281{ "MD5 (128 bit)","MD5 (128 bit)" }, 281{ "MD5 (128 bit)","MD5 (128 bit)" },
282{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" }, 282{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" },
283{ "Tiger (192 bit)","Tiger (192 bit)" }, 283{ "Tiger (192 bit)","Tiger (192 bit)" },
284{ "Permissions:","Zugriffsrechte:" }, 284{ "Permissions:","Zugriffsrechte:" },
285{ "Make backup before saving","Mache Backup vor dem Speichern" }, 285{ "Make backup before saving","Mache Backup vor dem Speichern" },
286{ "Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:","Passwort Timeout\n(Timeout um das Passwort\nim Speicher zu halten,\nso dass es nicht noch mal\neingegeben werden muß.)\n[Setze auf 0 zum deaktivieren]:" }, 286{ "Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:","Passwort Timeout\n(Timeout um das Passwort\nim Speicher zu halten,\nso dass es nicht noch mal\neingegeben werden muß.)\n[Setze auf 0 zum deaktivieren]:" },
287{ "Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:","(Total-)Sperr-Timeout\n(Sperre Dokument total nach\ndieser Anzahl Sekunden)\n[Setze auf 0 zum deaktivieren]:" }, 287{ "Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:","(Total-)Sperr-Timeout\n(Sperre Dokument total nach\ndieser Anzahl Sekunden)\n[Setze auf 0 zum deaktivieren]:" },
288{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" }, 288{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" },
289{ "open deeplocked","Öffne total gesperrt" }, 289{ "open deeplocked","Öffne total gesperrt" },
290{ "Favourite browser:","Bevorzugter Browser:" }, 290{ "Favourite browser:","Bevorzugter Browser:" },
291{ "Favourite x-terminal:","Bevorzugtes x-terminal:" }, 291{ "Favourite x-terminal:","Bevorzugtes x-terminal:" },
292{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" }, 292{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" },
293{ "Look && feel","Aussehen" }, 293{ "Look && feel","Aussehen" },
294{ "File","Datei" }, 294{ "File","Datei" },
295{ "Timeout","Timeout" }, 295{ "Timeout","Timeout" },
296{ "Autostart","Autostart" }, 296{ "Autostart","Autostart" },
297{ "External apps","Externe Applik." }, 297{ "External apps","Externe Applik." },
298{ "Miscellaneous","Verschiedenes" }, 298{ "Miscellaneous","Verschiedenes" },
299{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 299{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
300{ "edit category descriptions","Ändere Label für Kategorie" }, 300{ "edit category descriptions","Ändere Label für Kategorie" },
301{ "Close","Schließen" }, 301{ "Close","Schließen" },
302{ "Category:","Category:" }, 302{ "Category:","Category:" },
303{ "Text1 (Description):","Text1 (Beschreibung):" }, 303{ "Text1 (Description):","Text1 (Beschreibung):" },
304{ "Text2 (Username):","Text2 (Benutzername):" }, 304{ "Text2 (Username):","Text2 (Benutzername):" },
305{ "Text3 (Password):","Text3 (Passwort):" }, 305{ "Text3 (Password):","Text3 (Passwort):" },
306{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" }, 306{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" },
307{ "Description:","Beschreibung:" }, 307{ "Description:","Beschreibung:" },
308{ "Username:","Benutzername:" }, 308{ "Username:","Benutzername:" },
309{ "Password:","Passwort:" }, 309{ "Password:","Passwort:" },
310{ "&Reveal","&Offen zeigen" }, 310{ "&Reveal","&Offen zeigen" },
311{ "&Generate","&Generiere" }, 311{ "&Generate","&Generiere" },
312{ "&Password","&Passwort" }, 312{ "&Password","&Passwort" },
313{ "&Comments","Kommentar" }, 313{ "&Comments","Kommentar" },
314{ "Launcher:","Launcher:" }, 314{ "Launcher:","Launcher:" },
315{ "$d = Description","$d = Beschreibung" }, 315{ "$d = Description","$d = Beschreibung" },
316{ "$n = Username","$n = Benutzername" }, 316{ "$n = Username","$n = Benutzername" },
317{ "$c = Comment","$c = Kommentar" }, 317{ "$c = Comment","$c = Kommentar" },
318{ "$u = URL","$u = URL" }, 318{ "$u = URL","$u = URL" },
319{ "$p = Password","$p = Passwort" }, 319{ "$p = Password","$p = Passwort" },
320{ "&Launcher","&Launcher" }, 320{ "&Launcher","&Launcher" },
321{ "Password generator","Passwort Generator" }, 321{ "Password generator","Passwort Generator" },
322{ "Character set:","Buchstaben Set:" }, 322{ "Character set:","Buchstaben Set:" },
323{ "Lowercase (abc)","Klein (abc)" }, 323{ "Lowercase (abc)","Klein (abc)" },
324{ "Uppercase (ABC)","Groß (ABC)" }, 324{ "Uppercase (ABC)","Groß (ABC)" },
325{ "Numbers (123)","Nummmern (123)" }, 325{ "Numbers (123)","Nummmern (123)" },
326{ "Special characters:","Spezielle Buchstaben:" }, 326{ "Special characters:","Spezielle Buchstaben:" },
327{ "Spaces (blank characters)","Leerzeichen" }, 327{ "Spaces (blank characters)","Leerzeichen" },
328{ "User defined:","Benutzer definiert:" }, 328{ "User defined:","Benutzer definiert:" },
329{ "Password Length:","Passwort Länge:" }, 329{ "Password Length:","Passwort Länge:" },
330{ "Enable Filtering to get better passwords","Enable Filtering to get better passwords" }, 330{ "Enable Filtering to get better passwords","Enable Filtering to get better passwords" },
331{ "no password","Kein Passwort" }, 331{ "no password","Kein Passwort" },
332{ "Sorry, you haven't set a password.","Sorry, Sie haben kein Passwort angegeben." }, 332{ "Sorry, you haven't set a password.","Sorry, Sie haben kein Passwort angegeben." },
333{ "not saved, yet","not saved, yet" }, 333{ "not saved, yet","not saved, yet" },
334{ "Can't deep-lock, because the document\nhasn't been saved, yet. Please save\nto a file and try again.","Kann nicht tiefsperren, weil das\nDokument noch nicht gespeichert wurde.\nBitte speichern und noch einmal versuchen." }, 334{ "Can't deep-lock, because the document\nhasn't been saved, yet. Please save\nto a file and try again.","Kann nicht tiefsperren, weil das\nDokument noch nicht gespeichert wurde.\nBitte speichern und noch einmal versuchen." },
335{ "Find","Finde" }, 335{ "Find","Finde" },
336{ "&Exact match","Genaue Übereinstimmung" }, 336{ "&Exact match","Genaue Übereinstimmung" },
337{ "&Case sensitive","Großschrift abhängig" }, 337{ "&Case sensitive","Großschrift abhängig" },
338{ "Search in Column","Suche in Spalten" }, 338{ "Search in Column","Suche in Spalten" },
339{ "&Description","Beschreibung" }, 339{ "&Description","Beschreibung" },
340{ "C&omment","Kommentar" }, 340{ "C&omment","Kommentar" },
341{ "&Username","Benutzername" }, 341{ "&Username","Benutzername" },
342{ "U&RL","URL" }, 342{ "U&RL","URL" },
343{ "delete?","Löschen?" }, 343{ "delete?","Löschen?" },
344{ "Do you really want to delete\nthe selected entry","Wollen Sie wirklich\nden Eintrag löschen:" }, 344{ "Do you really want to delete\nthe selected entry","Wollen Sie wirklich\nden Eintrag löschen:" },
345{ "Save?","Speichern?" }, 345{ "Save?","Speichern?" },
346{ ""\nhas been modified.\nDo you want to save it?",""\nwurde geändert.\nMöchten Sie speichern?" }, 346{ ""\nhas been modified.\nDo you want to save it?",""\nwurde geändert.\nMöchten Sie speichern?" },
347{ "The list\n "","Die Liste\n "" }, 347{ "The list\n "","Die Liste\n "" },
348{ "nothing to do","Nichts zu tun" }, 348{ "nothing to do","Nichts zu tun" },
349{ "Sorry, there's nothing to save.\nPlease first add some passwords.","Sorry, es gibt nichts zu speichern.\nBitte erst Passwörter hinzufügen." }, 349{ "Sorry, there's nothing to save.\nPlease first add some passwords.","Sorry, es gibt nichts zu speichern.\nBitte erst Passwörter hinzufügen." },
350{ "Add new password","Passwort hinzufügen" }, 350{ "Add new password","Passwort hinzufügen" },
351{ "Successfully saved data.","Datei gespeichert." }, 351{ "Successfully saved data.","Datei gespeichert." },
352{ "Category:","Kategorie:" }, 352{ "Category:","Kategorie:" },
353{ "LOCKED","GESPERRT" }, 353{ "LOCKED","GESPERRT" },
354{ "Colors","Farben" }, 354{ "Colors","Farben" },
355{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 355{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
356{ "Backup enabled","Backup angeschaltet" }, 356{ "Backup enabled","Backup angeschaltet" },
357{ "Use standard backup dir","Standard Backupverzeichnis" }, 357{ "Use standard backup dir","Standard Backupverzeichnis" },
358{ "Number of Backups:","Anzahl der Backups" }, 358{ "Number of Backups:","Anzahl der Backups" },
359{ "Make backup every ","Mache ein Backup alle " }, 359{ "Make backup every ","Mache ein Backup alle " },
360{ " days"," Tage" }, 360{ " days"," Tage" },
361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, 361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
362{ "Backup Failed!","Backup Problem!" }, 362{ "Backup Failed!","Backup Problem!" },
363{ "Try again now","Versuche jetzt nochmal" }, 363{ "Try again now","Versuche jetzt nochmal" },
364{ "Try again later","Versuche später nochmal" }, 364{ "Try again later","Versuche später nochmal" },
365{ "Try again tomorrow","Versuche morgen nochmal" }, 365{ "Try again tomorrow","Versuche morgen nochmal" },
366{ "Disable backup","Schalte Backup ab" }, 366{ "Disable backup","Schalte Backup ab" },
367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
369{ "Choose action","Wähle Aktion" }, 369{ "Choose action","Wähle Aktion" },
370{ "&Configure PwM/Pi...","Konfiguriere PwM/Pi..." },
371{ "Global Settings...","Globale Einstellungen..." },
370{ "","" }, 372{ "","" },
371{ "","" }, 373{ "","" },
372{ "","" }, 374{ "","" },
373{ "","" }, 375{ "","" },
374{ "","" }, 376{ "","" },
375{ "","" }, 377{ "","" },
376 378
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index cd833cf..b107e2d 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -94,3341 +94,3341 @@ $Id$
94#include <qmessagebox.h> 94#include <qmessagebox.h>
95#include <kdebug.h> 95#include <kdebug.h>
96#include <kiconloader.h> // needed for SmallIcon 96#include <kiconloader.h> // needed for SmallIcon
97#include <kresources/kcmkresources.h> 97#include <kresources/kcmkresources.h>
98#include <ktoolbar.h> 98#include <ktoolbar.h>
99#include <kprefsdialog.h> 99#include <kprefsdialog.h>
100 100
101 101
102//#include <qlabel.h> 102//#include <qlabel.h>
103 103
104 104
105#ifndef DESKTOP_VERSION 105#ifndef DESKTOP_VERSION
106#include <qpe/ir.h> 106#include <qpe/ir.h>
107#include <qpe/qpemenubar.h> 107#include <qpe/qpemenubar.h>
108#include <qtopia/qcopenvelope_qws.h> 108#include <qtopia/qcopenvelope_qws.h>
109#else 109#else
110 110
111#include <qmenubar.h> 111#include <qmenubar.h>
112#endif 112#endif
113 113
114#endif // KAB_EMBEDDED 114#endif // KAB_EMBEDDED
115#include "kcmconfigs/kcmkabconfig.h" 115#include "kcmconfigs/kcmkabconfig.h"
116#include "kcmconfigs/kcmkdepimconfig.h" 116#include "kcmconfigs/kcmkdepimconfig.h"
117#include "kpimglobalprefs.h" 117#include "kpimglobalprefs.h"
118#include "externalapphandler.h" 118#include "externalapphandler.h"
119#include "xxportselectdialog.h" 119#include "xxportselectdialog.h"
120 120
121 121
122#include <kresources/selectdialog.h> 122#include <kresources/selectdialog.h>
123#include <kmessagebox.h> 123#include <kmessagebox.h>
124 124
125#include <picture.h> 125#include <picture.h>
126#include <resource.h> 126#include <resource.h>
127 127
128//US#include <qsplitter.h> 128//US#include <qsplitter.h>
129#include <qmap.h> 129#include <qmap.h>
130#include <qdir.h> 130#include <qdir.h>
131#include <qfile.h> 131#include <qfile.h>
132#include <qvbox.h> 132#include <qvbox.h>
133#include <qlayout.h> 133#include <qlayout.h>
134#include <qclipboard.h> 134#include <qclipboard.h>
135#include <qtextstream.h> 135#include <qtextstream.h>
136#include <qradiobutton.h> 136#include <qradiobutton.h>
137#include <qbuttongroup.h> 137#include <qbuttongroup.h>
138 138
139#include <libkdepim/categoryselectdialog.h> 139#include <libkdepim/categoryselectdialog.h>
140#include <libkdepim/categoryeditdialog.h> 140#include <libkdepim/categoryeditdialog.h>
141#include <kabc/vcardconverter.h> 141#include <kabc/vcardconverter.h>
142 142
143 143
144#include "addresseeutil.h" 144#include "addresseeutil.h"
145#include "undocmds.h" 145#include "undocmds.h"
146#include "addresseeeditordialog.h" 146#include "addresseeeditordialog.h"
147#include "viewmanager.h" 147#include "viewmanager.h"
148#include "details/detailsviewcontainer.h" 148#include "details/detailsviewcontainer.h"
149#include "kabprefs.h" 149#include "kabprefs.h"
150#include "xxportmanager.h" 150#include "xxportmanager.h"
151#include "incsearchwidget.h" 151#include "incsearchwidget.h"
152#include "jumpbuttonbar.h" 152#include "jumpbuttonbar.h"
153#include "extensionmanager.h" 153#include "extensionmanager.h"
154#include "addresseeconfig.h" 154#include "addresseeconfig.h"
155#include "nameeditdialog.h" 155#include "nameeditdialog.h"
156#include <kcmultidialog.h> 156#include <kcmultidialog.h>
157 157
158#ifdef _WIN32_ 158#ifdef _WIN32_
159#ifdef _OL_IMPORT_ 159#ifdef _OL_IMPORT_
160#include "kaimportoldialog.h" 160#include "kaimportoldialog.h"
161#endif 161#endif
162#else 162#else
163#include <unistd.h> 163#include <unistd.h>
164#endif 164#endif
165// sync includes 165// sync includes
166#include <libkdepim/ksyncprofile.h> 166#include <libkdepim/ksyncprofile.h>
167#include <libkdepim/ksyncprefsdialog.h> 167#include <libkdepim/ksyncprefsdialog.h>
168 168
169 169
170class KABCatPrefs : public QDialog 170class KABCatPrefs : public QDialog
171{ 171{
172 public: 172 public:
173 KABCatPrefs( QWidget *parent=0, const char *name=0 ) : 173 KABCatPrefs( QWidget *parent=0, const char *name=0 ) :
174 QDialog( parent, name, true ) 174 QDialog( parent, name, true )
175 { 175 {
176 setCaption( i18n("Manage new Categories") ); 176 setCaption( i18n("Manage new Categories") );
177 QVBoxLayout* lay = new QVBoxLayout( this ); 177 QVBoxLayout* lay = new QVBoxLayout( this );
178 lay->setSpacing( 3 ); 178 lay->setSpacing( 3 );
179 lay->setMargin( 3 ); 179 lay->setMargin( 3 );
180 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); 180 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
181 lay->addWidget( lab ); 181 lay->addWidget( lab );
182 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 182 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
183 lay->addWidget( format ); 183 lay->addWidget( format );
184 format->setExclusive ( true ) ; 184 format->setExclusive ( true ) ;
185 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 185 addCatBut = new QRadioButton(i18n("Add to category list"), format );
186 new QRadioButton(i18n("Remove from addressees"), format ); 186 new QRadioButton(i18n("Remove from addressees"), format );
187 addCatBut->setChecked( true ); 187 addCatBut->setChecked( true );
188 QPushButton * ok = new QPushButton( i18n("OK"), this ); 188 QPushButton * ok = new QPushButton( i18n("OK"), this );
189 lay->addWidget( ok ); 189 lay->addWidget( ok );
190 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 190 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
191 lay->addWidget( cancel ); 191 lay->addWidget( cancel );
192 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 192 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
193 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 193 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
194 resize( 200, 200 ); 194 resize( 200, 200 );
195 } 195 }
196 196
197 bool addCat() { return addCatBut->isChecked(); } 197 bool addCat() { return addCatBut->isChecked(); }
198private: 198private:
199 QRadioButton* addCatBut; 199 QRadioButton* addCatBut;
200}; 200};
201 201
202class KABFormatPrefs : public QDialog 202class KABFormatPrefs : public QDialog
203{ 203{
204 public: 204 public:
205 KABFormatPrefs( QWidget *parent=0, const char *name=0 ) : 205 KABFormatPrefs( QWidget *parent=0, const char *name=0 ) :
206 QDialog( parent, name, true ) 206 QDialog( parent, name, true )
207 { 207 {
208 setCaption( i18n("Set formatted name") ); 208 setCaption( i18n("Set formatted name") );
209 QVBoxLayout* lay = new QVBoxLayout( this ); 209 QVBoxLayout* lay = new QVBoxLayout( this );
210 lay->setSpacing( 3 ); 210 lay->setSpacing( 3 );
211 lay->setMargin( 3 ); 211 lay->setMargin( 3 );
212 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this ); 212 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this );
213 lay->addWidget( lab ); 213 lay->addWidget( lab );
214 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this ); 214 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this );
215 lay->addWidget( format ); 215 lay->addWidget( format );
216 format->setExclusive ( true ) ; 216 format->setExclusive ( true ) ;
217 simple = new QRadioButton(i18n("Simple: James Bond"), format ); 217 simple = new QRadioButton(i18n("Simple: James Bond"), format );
218 full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format ); 218 full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format );
219 reverse = new QRadioButton(i18n("Reverse: Bond, James"), format ); 219 reverse = new QRadioButton(i18n("Reverse: Bond, James"), format );
220 company = new QRadioButton(i18n("Organization: MI6"), format ); 220 company = new QRadioButton(i18n("Organization: MI6"), format );
221 simple->setChecked( true ); 221 simple->setChecked( true );
222 setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this); 222 setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this);
223 lay->addWidget( setCompany ); 223 lay->addWidget( setCompany );
224 QPushButton * ok = new QPushButton( i18n("Select contact list"), this ); 224 QPushButton * ok = new QPushButton( i18n("Select contact list"), this );
225 lay->addWidget( ok ); 225 lay->addWidget( ok );
226 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 226 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
227 lay->addWidget( cancel ); 227 lay->addWidget( cancel );
228 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 228 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
229 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 229 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
230 //resize( 200, 200 ); 230 //resize( 200, 200 );
231 231
232 } 232 }
233public: 233public:
234 QRadioButton* simple, *full, *reverse, *company; 234 QRadioButton* simple, *full, *reverse, *company;
235 QCheckBox* setCompany; 235 QCheckBox* setCompany;
236}; 236};
237 237
238 238
239 239
240class KAex2phonePrefs : public QDialog 240class KAex2phonePrefs : public QDialog
241{ 241{
242 public: 242 public:
243 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) : 243 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
244 QDialog( parent, name, true ) 244 QDialog( parent, name, true )
245 { 245 {
246 setCaption( i18n("Export to phone options") ); 246 setCaption( i18n("Export to phone options") );
247 QVBoxLayout* lay = new QVBoxLayout( this ); 247 QVBoxLayout* lay = new QVBoxLayout( this );
248 lay->setSpacing( 3 ); 248 lay->setSpacing( 3 );
249 lay->setMargin( 3 ); 249 lay->setMargin( 3 );
250 QLabel *lab; 250 QLabel *lab;
251 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 251 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
252 lab->setAlignment (AlignHCenter ); 252 lab->setAlignment (AlignHCenter );
253 QHBox* temphb; 253 QHBox* temphb;
254 temphb = new QHBox( this ); 254 temphb = new QHBox( this );
255 new QLabel( i18n("I/O device: "), temphb ); 255 new QLabel( i18n("I/O device: "), temphb );
256 mPhoneDevice = new QLineEdit( temphb); 256 mPhoneDevice = new QLineEdit( temphb);
257 lay->addWidget( temphb ); 257 lay->addWidget( temphb );
258 temphb = new QHBox( this ); 258 temphb = new QHBox( this );
259 new QLabel( i18n("Connection: "), temphb ); 259 new QLabel( i18n("Connection: "), temphb );
260 mPhoneConnection = new QLineEdit( temphb); 260 mPhoneConnection = new QLineEdit( temphb);
261 lay->addWidget( temphb ); 261 lay->addWidget( temphb );
262 temphb = new QHBox( this ); 262 temphb = new QHBox( this );
263 new QLabel( i18n("Model(opt.): "), temphb ); 263 new QLabel( i18n("Model(opt.): "), temphb );
264 mPhoneModel = new QLineEdit( temphb); 264 mPhoneModel = new QLineEdit( temphb);
265 lay->addWidget( temphb ); 265 lay->addWidget( temphb );
266 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); 266 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this );
267 // lay->addWidget( mWriteToSim ); 267 // lay->addWidget( mWriteToSim );
268 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); 268 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) );
269 lab->setAlignment (AlignHCenter); 269 lab->setAlignment (AlignHCenter);
270 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 270 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
271 lay->addWidget( ok ); 271 lay->addWidget( ok );
272 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 272 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
273 lay->addWidget( cancel ); 273 lay->addWidget( cancel );
274 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 274 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
275 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 275 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
276 resize( 220, 240 ); 276 resize( 220, 240 );
277 277
278 } 278 }
279 279
280public: 280public:
281 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 281 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
282 QCheckBox* mWriteToSim; 282 QCheckBox* mWriteToSim;
283}; 283};
284 284
285 285
286bool pasteWithNewUid = true; 286bool pasteWithNewUid = true;
287 287
288#ifdef KAB_EMBEDDED 288#ifdef KAB_EMBEDDED
289KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) 289KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name )
290 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 290 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
291 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ 291 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/
292 mReadWrite( readWrite ), mModified( false ), mMainWindow(client) 292 mReadWrite( readWrite ), mModified( false ), mMainWindow(client)
293#else //KAB_EMBEDDED 293#else //KAB_EMBEDDED
294KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) 294KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name )
295 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 295 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
296 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), 296 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ),
297 mReadWrite( readWrite ), mModified( false ) 297 mReadWrite( readWrite ), mModified( false )
298#endif //KAB_EMBEDDED 298#endif //KAB_EMBEDDED
299{ 299{
300 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 300 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
301 // syncManager->setBlockSave(false); 301 // syncManager->setBlockSave(false);
302 mIncSearchWidget = 0; 302 mIncSearchWidget = 0;
303 mMiniSplitter = 0; 303 mMiniSplitter = 0;
304 mExtensionBarSplitter = 0; 304 mExtensionBarSplitter = 0;
305 mIsPart = !parent->inherits( "KAddressBookMain" ); 305 mIsPart = !parent->inherits( "KAddressBookMain" );
306 mAddressBook = KABC::StdAddressBook::self(); 306 mAddressBook = KABC::StdAddressBook::self();
307 KABC::StdAddressBook::setAutomaticSave( false ); 307 KABC::StdAddressBook::setAutomaticSave( false );
308 308
309#ifndef KAB_EMBEDDED 309#ifndef KAB_EMBEDDED
310 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); 310 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler );
311#endif //KAB_EMBEDDED 311#endif //KAB_EMBEDDED
312 312
313 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), 313 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ),
314 SLOT( addressBookChanged() ) ); 314 SLOT( addressBookChanged() ) );
315 315
316#if 0 316#if 0
317 // LR moved to addressbook init method 317 // LR moved to addressbook init method
318 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, 318 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization,
319 "X-Department", "KADDRESSBOOK" ); 319 "X-Department", "KADDRESSBOOK" );
320 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, 320 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization,
321 "X-Profession", "KADDRESSBOOK" ); 321 "X-Profession", "KADDRESSBOOK" );
322 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, 322 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization,
323 "X-AssistantsName", "KADDRESSBOOK" ); 323 "X-AssistantsName", "KADDRESSBOOK" );
324 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, 324 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization,
325 "X-ManagersName", "KADDRESSBOOK" ); 325 "X-ManagersName", "KADDRESSBOOK" );
326 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, 326 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal,
327 "X-SpousesName", "KADDRESSBOOK" ); 327 "X-SpousesName", "KADDRESSBOOK" );
328 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, 328 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal,
329 "X-Office", "KADDRESSBOOK" ); 329 "X-Office", "KADDRESSBOOK" );
330 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, 330 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal,
331 "X-IMAddress", "KADDRESSBOOK" ); 331 "X-IMAddress", "KADDRESSBOOK" );
332 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, 332 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal,
333 "X-Anniversary", "KADDRESSBOOK" ); 333 "X-Anniversary", "KADDRESSBOOK" );
334 334
335 //US added this field to become compatible with Opie/qtopia addressbook 335 //US added this field to become compatible with Opie/qtopia addressbook
336 // values can be "female" or "male" or "". An empty field represents undefined. 336 // values can be "female" or "male" or "". An empty field represents undefined.
337 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, 337 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal,
338 "X-Gender", "KADDRESSBOOK" ); 338 "X-Gender", "KADDRESSBOOK" );
339 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, 339 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal,
340 "X-Children", "KADDRESSBOOK" ); 340 "X-Children", "KADDRESSBOOK" );
341 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, 341 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal,
342 "X-FreeBusyUrl", "KADDRESSBOOK" ); 342 "X-FreeBusyUrl", "KADDRESSBOOK" );
343#endif 343#endif
344 initGUI(); 344 initGUI();
345 345
346 mIncSearchWidget->setFocus(); 346 mIncSearchWidget->setFocus();
347 347
348 348
349 connect( mViewManager, SIGNAL( selected( const QString& ) ), 349 connect( mViewManager, SIGNAL( selected( const QString& ) ),
350 SLOT( setContactSelected( const QString& ) ) ); 350 SLOT( setContactSelected( const QString& ) ) );
351 connect( mViewManager, SIGNAL( executed( const QString& ) ), 351 connect( mViewManager, SIGNAL( executed( const QString& ) ),
352 SLOT( executeContact( const QString& ) ) ); 352 SLOT( executeContact( const QString& ) ) );
353 353
354 connect( mViewManager, SIGNAL( deleteRequest( ) ), 354 connect( mViewManager, SIGNAL( deleteRequest( ) ),
355 SLOT( deleteContacts( ) ) ); 355 SLOT( deleteContacts( ) ) );
356 connect( mViewManager, SIGNAL( modified() ), 356 connect( mViewManager, SIGNAL( modified() ),
357 SLOT( setModified() ) ); 357 SLOT( setModified() ) );
358 358
359 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); 359 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) );
360 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); 360 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) );
361 361
362 connect( mXXPortManager, SIGNAL( modified() ), 362 connect( mXXPortManager, SIGNAL( modified() ),
363 SLOT( setModified() ) ); 363 SLOT( setModified() ) );
364 364
365 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), 365 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
366 SLOT( incrementalSearchJump( const QString& ) ) ); 366 SLOT( incrementalSearchJump( const QString& ) ) );
367 connect( mIncSearchWidget, SIGNAL( fieldChanged() ), 367 connect( mIncSearchWidget, SIGNAL( fieldChanged() ),
368 mJumpButtonBar, SLOT( recreateButtons() ) ); 368 mJumpButtonBar, SLOT( recreateButtons() ) );
369 369
370 connect( mDetails, SIGNAL( sendEmail( const QString& ) ), 370 connect( mDetails, SIGNAL( sendEmail( const QString& ) ),
371 SLOT( sendMail( const QString& ) ) ); 371 SLOT( sendMail( const QString& ) ) );
372 372
373 373
374 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); 374 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&)));
375 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); 375 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)));
376 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); 376 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&)));
377 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); 377 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
378 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); 378 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog()));
379 379
380 380
381#ifndef KAB_EMBEDDED 381#ifndef KAB_EMBEDDED
382 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), 382 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
383 mXXPortManager, SLOT( importVCard( const KURL& ) ) ); 383 mXXPortManager, SLOT( importVCard( const KURL& ) ) );
384 384
385 connect( mDetails, SIGNAL( browse( const QString& ) ), 385 connect( mDetails, SIGNAL( browse( const QString& ) ),
386 SLOT( browse( const QString& ) ) ); 386 SLOT( browse( const QString& ) ) );
387 387
388 388
389 mAddressBookService = new KAddressBookService( this ); 389 mAddressBookService = new KAddressBookService( this );
390 390
391#endif //KAB_EMBEDDED 391#endif //KAB_EMBEDDED
392 392
393 mMessageTimer = new QTimer( this ); 393 mMessageTimer = new QTimer( this );
394 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); 394 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
395 mEditorDialog = 0; 395 mEditorDialog = 0;
396 createAddresseeEditorDialog( this ); 396 createAddresseeEditorDialog( this );
397 setModified( false ); 397 setModified( false );
398 mBRdisabled = false; 398 mBRdisabled = false;
399#ifndef DESKTOP_VERSION 399#ifndef DESKTOP_VERSION
400 infrared = 0; 400 infrared = 0;
401#endif 401#endif
402 //toggleBeamReceive( ); 402 //toggleBeamReceive( );
403 mMainWindow->toolBar()->show(); 403 mMainWindow->toolBar()->show();
404 // we have a toolbar repainting error on the Zaurus when starting KA/Pi 404 // we have a toolbar repainting error on the Zaurus when starting KA/Pi
405 QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 405 QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
406} 406}
407 407
408void KABCore::updateToolBar() 408void KABCore::updateToolBar()
409{ 409{
410 static int iii = 0; 410 static int iii = 0;
411 ++iii; 411 ++iii;
412 mMainWindow->toolBar()->repaintMe(); 412 mMainWindow->toolBar()->repaintMe();
413 if ( iii < 4 ) 413 if ( iii < 4 )
414 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); 414 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar()));
415} 415}
416KABCore::~KABCore() 416KABCore::~KABCore()
417{ 417{
418 // save(); 418 // save();
419 //saveSettings(); 419 //saveSettings();
420 //KABPrefs::instance()->writeConfig(); 420 //KABPrefs::instance()->writeConfig();
421 delete AddresseeConfig::instance(); 421 delete AddresseeConfig::instance();
422 mAddressBook = 0; 422 mAddressBook = 0;
423 KABC::StdAddressBook::close(); 423 KABC::StdAddressBook::close();
424 424
425 delete syncManager; 425 delete syncManager;
426#ifndef DESKTOP_VERSION 426#ifndef DESKTOP_VERSION
427 if ( infrared ) 427 if ( infrared )
428 delete infrared; 428 delete infrared;
429#endif 429#endif
430} 430}
431void KABCore::receive( const QCString& cmsg, const QByteArray& data ) 431void KABCore::receive( const QCString& cmsg, const QByteArray& data )
432{ 432{
433 //qDebug("KA: QCOP message received: %s ", cmsg.data() ); 433 //qDebug("KA: QCOP message received: %s ", cmsg.data() );
434 if ( cmsg == "setDocument(QString)" ) { 434 if ( cmsg == "setDocument(QString)" ) {
435 QDataStream stream( data, IO_ReadOnly ); 435 QDataStream stream( data, IO_ReadOnly );
436 QString fileName; 436 QString fileName;
437 stream >> fileName; 437 stream >> fileName;
438 recieve( fileName ); 438 recieve( fileName );
439 return; 439 return;
440 } 440 }
441} 441}
442void KABCore::toggleBeamReceive( ) 442void KABCore::toggleBeamReceive( )
443{ 443{
444 if ( mBRdisabled ) 444 if ( mBRdisabled )
445 return; 445 return;
446#ifndef DESKTOP_VERSION 446#ifndef DESKTOP_VERSION
447 if ( infrared ) { 447 if ( infrared ) {
448 qDebug("KA: AB disable BeamReceive "); 448 qDebug("KA: AB disable BeamReceive ");
449 delete infrared; 449 delete infrared;
450 infrared = 0; 450 infrared = 0;
451 mActionBR->setChecked(false); 451 mActionBR->setChecked(false);
452 return; 452 return;
453 } 453 }
454 qDebug("KA: AB enable BeamReceive "); 454 qDebug("KA: AB enable BeamReceive ");
455 mActionBR->setChecked(true); 455 mActionBR->setChecked(true);
456 456
457 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; 457 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ;
458 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); 458 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& )));
459#endif 459#endif
460} 460}
461 461
462 462
463void KABCore::disableBR(bool b) 463void KABCore::disableBR(bool b)
464{ 464{
465#ifndef DESKTOP_VERSION 465#ifndef DESKTOP_VERSION
466 if ( b ) { 466 if ( b ) {
467 if ( infrared ) { 467 if ( infrared ) {
468 toggleBeamReceive( ); 468 toggleBeamReceive( );
469 } 469 }
470 mBRdisabled = true; 470 mBRdisabled = true;
471 } else { 471 } else {
472 if ( mBRdisabled ) { 472 if ( mBRdisabled ) {
473 mBRdisabled = false; 473 mBRdisabled = false;
474 //toggleBeamReceive( ); 474 //toggleBeamReceive( );
475 } 475 }
476 } 476 }
477#endif 477#endif
478 478
479} 479}
480void KABCore::recieve( QString fn ) 480void KABCore::recieve( QString fn )
481{ 481{
482 //qDebug("KABCore::recieve "); 482 //qDebug("KABCore::recieve ");
483 int count = mAddressBook->importFromFile( fn, true ); 483 int count = mAddressBook->importFromFile( fn, true );
484 if ( count ) 484 if ( count )
485 setModified( true ); 485 setModified( true );
486 mViewManager->refreshView(); 486 mViewManager->refreshView();
487 message(i18n("%1 contact(s) received!").arg( count )); 487 message(i18n("%1 contact(s) received!").arg( count ));
488 topLevelWidget()->showMaximized(); 488 topLevelWidget()->showMaximized();
489 topLevelWidget()->raise(); 489 topLevelWidget()->raise();
490} 490}
491void KABCore::restoreSettings() 491void KABCore::restoreSettings()
492{ 492{
493 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; 493 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce;
494 494
495 bool state; 495 bool state;
496 496
497 if (mMultipleViewsAtOnce) 497 if (mMultipleViewsAtOnce)
498 state = KABPrefs::instance()->mDetailsPageVisible; 498 state = KABPrefs::instance()->mDetailsPageVisible;
499 else 499 else
500 state = false; 500 state = false;
501 501
502 mActionDetails->setChecked( state ); 502 mActionDetails->setChecked( state );
503 setDetailsVisible( state ); 503 setDetailsVisible( state );
504 504
505 state = KABPrefs::instance()->mJumpButtonBarVisible; 505 state = KABPrefs::instance()->mJumpButtonBarVisible;
506 506
507 mActionJumpBar->setChecked( state ); 507 mActionJumpBar->setChecked( state );
508 setJumpButtonBarVisible( state ); 508 setJumpButtonBarVisible( state );
509/*US 509/*US
510 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; 510 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter;
511 if ( splitterSize.count() == 0 ) { 511 if ( splitterSize.count() == 0 ) {
512 splitterSize.append( width() / 2 ); 512 splitterSize.append( width() / 2 );
513 splitterSize.append( width() / 2 ); 513 splitterSize.append( width() / 2 );
514 } 514 }
515 mMiniSplitter->setSizes( splitterSize ); 515 mMiniSplitter->setSizes( splitterSize );
516 if ( mExtensionBarSplitter ) { 516 if ( mExtensionBarSplitter ) {
517 splitterSize = KABPrefs::instance()->mExtensionsSplitter; 517 splitterSize = KABPrefs::instance()->mExtensionsSplitter;
518 if ( splitterSize.count() == 0 ) { 518 if ( splitterSize.count() == 0 ) {
519 splitterSize.append( width() / 2 ); 519 splitterSize.append( width() / 2 );
520 splitterSize.append( width() / 2 ); 520 splitterSize.append( width() / 2 );
521 } 521 }
522 mExtensionBarSplitter->setSizes( splitterSize ); 522 mExtensionBarSplitter->setSizes( splitterSize );
523 523
524 } 524 }
525*/ 525*/
526 mViewManager->restoreSettings(); 526 mViewManager->restoreSettings();
527 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField ); 527 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField );
528 mExtensionManager->restoreSettings(); 528 mExtensionManager->restoreSettings();
529#ifdef DESKTOP_VERSION 529#ifdef DESKTOP_VERSION
530 int wid = width(); 530 int wid = width();
531 if ( wid < 10 ) 531 if ( wid < 10 )
532 wid = 400; 532 wid = 400;
533#else 533#else
534 int wid = QApplication::desktop()->width(); 534 int wid = QApplication::desktop()->width();
535 if ( wid < 640 ) 535 if ( wid < 640 )
536 wid = QApplication::desktop()->height(); 536 wid = QApplication::desktop()->height();
537#endif 537#endif
538 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; 538 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
539 if ( true /*splitterSize.count() == 0*/ ) { 539 if ( true /*splitterSize.count() == 0*/ ) {
540 splitterSize.append( wid / 2 ); 540 splitterSize.append( wid / 2 );
541 splitterSize.append( wid / 2 ); 541 splitterSize.append( wid / 2 );
542 } 542 }
543 mMiniSplitter->setSizes( splitterSize ); 543 mMiniSplitter->setSizes( splitterSize );
544 if ( mExtensionBarSplitter ) { 544 if ( mExtensionBarSplitter ) {
545 //splitterSize = KABPrefs::instance()->mExtensionsSplitter; 545 //splitterSize = KABPrefs::instance()->mExtensionsSplitter;
546 if ( true /*splitterSize.count() == 0*/ ) { 546 if ( true /*splitterSize.count() == 0*/ ) {
547 splitterSize.append( wid / 2 ); 547 splitterSize.append( wid / 2 );
548 splitterSize.append( wid / 2 ); 548 splitterSize.append( wid / 2 );
549 } 549 }
550 mExtensionBarSplitter->setSizes( splitterSize ); 550 mExtensionBarSplitter->setSizes( splitterSize );
551 551
552 } 552 }
553#ifdef DESKTOP_VERSION 553#ifdef DESKTOP_VERSION
554 KConfig *config = KABPrefs::instance()->getConfig(); 554 KConfig *config = KABPrefs::instance()->getConfig();
555 config->setGroup("WidgetLayout"); 555 config->setGroup("WidgetLayout");
556 QStringList list; 556 QStringList list;
557 list = config->readListEntry("MainLayout"); 557 list = config->readListEntry("MainLayout");
558 int x,y,w,h; 558 int x,y,w,h;
559 if ( ! list.isEmpty() ) { 559 if ( ! list.isEmpty() ) {
560 x = list[0].toInt(); 560 x = list[0].toInt();
561 y = list[1].toInt(); 561 y = list[1].toInt();
562 w = list[2].toInt(); 562 w = list[2].toInt();
563 h = list[3].toInt(); 563 h = list[3].toInt();
564 KApplication::testCoords( &x,&y,&w,&h ); 564 KApplication::testCoords( &x,&y,&w,&h );
565 topLevelWidget()->setGeometry(x,y,w,h); 565 topLevelWidget()->setGeometry(x,y,w,h);
566 566
567 } else { 567 } else {
568 topLevelWidget()->setGeometry( 40 ,40 , 640, 440); 568 topLevelWidget()->setGeometry( 40 ,40 , 640, 440);
569 } 569 }
570#endif 570#endif
571} 571}
572 572
573void KABCore::saveSettings() 573void KABCore::saveSettings()
574{ 574{
575 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); 575 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked();
576 if ( mExtensionBarSplitter ) 576 if ( mExtensionBarSplitter )
577 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 577 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
578 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); 578 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked();
579 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); 579 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes();
580#ifndef KAB_EMBEDDED 580#ifndef KAB_EMBEDDED
581 581
582 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 582 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
583 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); 583 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes();
584#endif //KAB_EMBEDDED 584#endif //KAB_EMBEDDED
585 mExtensionManager->saveSettings(); 585 mExtensionManager->saveSettings();
586 mViewManager->saveSettings(); 586 mViewManager->saveSettings();
587 587
588 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); 588 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem();
589 589
590 KABPrefs::instance()->writeConfig(); 590 KABPrefs::instance()->writeConfig();
591 qDebug("KA: KABCore::saveSettings() "); 591 qDebug("KA: KABCore::saveSettings() ");
592} 592}
593 593
594KABC::AddressBook *KABCore::addressBook() const 594KABC::AddressBook *KABCore::addressBook() const
595{ 595{
596 return mAddressBook; 596 return mAddressBook;
597} 597}
598 598
599KConfig *KABCore::config() 599KConfig *KABCore::config()
600{ 600{
601#ifndef KAB_EMBEDDED 601#ifndef KAB_EMBEDDED
602 return KABPrefs::instance()->config(); 602 return KABPrefs::instance()->config();
603#else //KAB_EMBEDDED 603#else //KAB_EMBEDDED
604 return KABPrefs::instance()->getConfig(); 604 return KABPrefs::instance()->getConfig();
605#endif //KAB_EMBEDDED 605#endif //KAB_EMBEDDED
606} 606}
607 607
608KActionCollection *KABCore::actionCollection() const 608KActionCollection *KABCore::actionCollection() const
609{ 609{
610 return mGUIClient->actionCollection(); 610 return mGUIClient->actionCollection();
611} 611}
612 612
613KABC::Field *KABCore::currentSearchField() const 613KABC::Field *KABCore::currentSearchField() const
614{ 614{
615 if (mIncSearchWidget) 615 if (mIncSearchWidget)
616 return mIncSearchWidget->currentField(); 616 return mIncSearchWidget->currentField();
617 else 617 else
618 return 0; 618 return 0;
619} 619}
620 620
621QStringList KABCore::selectedUIDs() const 621QStringList KABCore::selectedUIDs() const
622{ 622{
623 return mViewManager->selectedUids(); 623 return mViewManager->selectedUids();
624} 624}
625 625
626KABC::Resource *KABCore::requestResource( QWidget *parent ) 626KABC::Resource *KABCore::requestResource( QWidget *parent )
627{ 627{
628 QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); 628 QPtrList<KABC::Resource> kabcResources = addressBook()->resources();
629 629
630 QPtrList<KRES::Resource> kresResources; 630 QPtrList<KRES::Resource> kresResources;
631 QPtrListIterator<KABC::Resource> resIt( kabcResources ); 631 QPtrListIterator<KABC::Resource> resIt( kabcResources );
632 KABC::Resource *resource; 632 KABC::Resource *resource;
633 while ( ( resource = resIt.current() ) != 0 ) { 633 while ( ( resource = resIt.current() ) != 0 ) {
634 ++resIt; 634 ++resIt;
635 if ( !resource->readOnly() ) { 635 if ( !resource->readOnly() ) {
636 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 636 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
637 if ( res ) 637 if ( res )
638 kresResources.append( res ); 638 kresResources.append( res );
639 } 639 }
640 } 640 }
641 641
642 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent ); 642 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent );
643 return static_cast<KABC::Resource*>( res ); 643 return static_cast<KABC::Resource*>( res );
644} 644}
645 645
646#ifndef KAB_EMBEDDED 646#ifndef KAB_EMBEDDED
647KAboutData *KABCore::createAboutData() 647KAboutData *KABCore::createAboutData()
648#else //KAB_EMBEDDED 648#else //KAB_EMBEDDED
649void KABCore::createAboutData() 649void KABCore::createAboutData()
650#endif //KAB_EMBEDDED 650#endif //KAB_EMBEDDED
651{ 651{
652 652
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-2005 Lutz Rogowski\nrogowski@kde.org\n" 667 "(c) 2004-2005 Lutz Rogowski\nrogowski@kde.org\n"
668 "(c) 1997-2003, The KDE PIM Team\n" 668 "(c) 1997-2003, The KDE PIM Team\n"
669 "Tobias Koenig Maintainer\n" 669 "Tobias Koenig Maintainer\n"
670 "Don Sanders Original author\n" 670 "Don Sanders Original author\n"
671 "Cornelius Schumacher Co-maintainer\n" 671 "Cornelius Schumacher Co-maintainer\n"
672 "Mike Pilone GUI and framework redesign\n" 672 "Mike Pilone GUI and framework redesign\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" 675 "Michel Boyer de la Giroday LDAP Lookup\n"
676 "Steffen Hansen LDAP Lookup" 676 "Steffen Hansen LDAP Lookup"
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 mMainWindow->showMaximized(); 822 mMainWindow->showMaximized();
823 mMainWindow->update(); 823 mMainWindow->update();
824} 824}
825void KABCore::resizeEvent(QResizeEvent* e ) 825void KABCore::resizeEvent(QResizeEvent* e )
826{ 826{
827 if ( !mMiniSplitter ) 827 if ( !mMiniSplitter )
828 return; 828 return;
829 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); 829 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) ");
830 if ( QApplication::desktop()->width() >= 480 ) { 830 if ( QApplication::desktop()->width() >= 480 ) {
831 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 831 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480
832 if ( mMiniSplitter->orientation() == Qt::Vertical ) { 832 if ( mMiniSplitter->orientation() == Qt::Vertical ) {
833 mMiniSplitter->setOrientation( Qt::Horizontal); 833 mMiniSplitter->setOrientation( Qt::Horizontal);
834 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 834 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
835 } 835 }
836 if ( QApplication::desktop()->width() <= 640 ) { 836 if ( QApplication::desktop()->width() <= 640 ) {
837 mMainWindow->showMinimized(); 837 mMainWindow->showMinimized();
838 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 838 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
839 mViewManager->getFilterAction()->setComboWidth( 150 ); 839 mViewManager->getFilterAction()->setComboWidth( 150 );
840 if ( mIncSearchWidget ) 840 if ( mIncSearchWidget )
841 mIncSearchWidget->setSize(); 841 mIncSearchWidget->setSize();
842 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 842 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
843 } 843 }
844 844
845 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 845 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640
846 if ( mMiniSplitter->orientation() == Qt::Horizontal ) { 846 if ( mMiniSplitter->orientation() == Qt::Horizontal ) {
847 mMiniSplitter->setOrientation( Qt::Vertical ); 847 mMiniSplitter->setOrientation( Qt::Vertical );
848 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 848 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
849 } 849 }
850 if ( QApplication::desktop()->width() <= 640 ) { 850 if ( QApplication::desktop()->width() <= 640 ) {
851 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 851 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
852 mMainWindow->showMinimized(); 852 mMainWindow->showMinimized();
853 if ( KABPrefs::instance()->mHideSearchOnSwitch ) { 853 if ( KABPrefs::instance()->mHideSearchOnSwitch ) {
854 if ( mIncSearchWidget ) { 854 if ( mIncSearchWidget ) {
855 mIncSearchWidget->setSize(); 855 mIncSearchWidget->setSize();
856 } 856 }
857 } else { 857 } else {
858 mViewManager->getFilterAction()->setComboWidth( 0 ); 858 mViewManager->getFilterAction()->setComboWidth( 0 );
859 } 859 }
860 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 860 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
861 } 861 }
862 } 862 }
863 } 863 }
864 QWidget::resizeEvent( e ); 864 QWidget::resizeEvent( e );
865 865
866} 866}
867void KABCore::export2phone() 867void KABCore::export2phone()
868{ 868{
869 869
870 QStringList uids; 870 QStringList uids;
871 XXPortSelectDialog dlg( this, false, this ); 871 XXPortSelectDialog dlg( this, false, this );
872 if ( dlg.exec() ) 872 if ( dlg.exec() )
873 uids = dlg.uids(); 873 uids = dlg.uids();
874 else 874 else
875 return; 875 return;
876 if ( uids.isEmpty() ) 876 if ( uids.isEmpty() )
877 return; 877 return;
878 // qDebug("count %d ", uids.count()); 878 // qDebug("count %d ", uids.count());
879 879
880 KAex2phonePrefs ex2phone; 880 KAex2phonePrefs ex2phone;
881 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 881 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
882 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 882 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
883 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 883 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
884 884
885 if ( !ex2phone.exec() ) { 885 if ( !ex2phone.exec() ) {
886 return; 886 return;
887 } 887 }
888 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 888 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
889 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 889 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
890 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 890 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
891 891
892 892
893 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 893 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
894 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 894 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
895 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 895 KPimGlobalPrefs::instance()->mEx2PhoneModel );
896 896
897 QString fileName = getPhoneFile(); 897 QString fileName = getPhoneFile();
898 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) 898 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) )
899 return; 899 return;
900 900
901 message(i18n("Exporting to phone...")); 901 message(i18n("Exporting to phone..."));
902 QTimer::singleShot( 1, this , SLOT ( writeToPhone())); 902 QTimer::singleShot( 1, this , SLOT ( writeToPhone()));
903 903
904} 904}
905QString KABCore::getPhoneFile() 905QString KABCore::getPhoneFile()
906{ 906{
907#ifdef DESKTOP_VERSION 907#ifdef DESKTOP_VERSION
908 return locateLocal("tmp", "phonefile.vcf"); 908 return locateLocal("tmp", "phonefile.vcf");
909#else 909#else
910 return "/tmp/phonefile.vcf"; 910 return "/tmp/phonefile.vcf";
911#endif 911#endif
912 912
913} 913}
914void KABCore::writeToPhone( ) 914void KABCore::writeToPhone( )
915{ 915{
916 if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) 916 if ( PhoneAccess::writeToPhone( getPhoneFile() ) )
917 message(i18n("Export to phone finished!")); 917 message(i18n("Export to phone finished!"));
918 else 918 else
919 qDebug(i18n("KA: Error exporting to phone")); 919 qDebug(i18n("KA: Error exporting to phone"));
920} 920}
921void KABCore::beamVCard() 921void KABCore::beamVCard()
922{ 922{
923 QStringList uids; 923 QStringList uids;
924 XXPortSelectDialog dlg( this, false, this ); 924 XXPortSelectDialog dlg( this, false, this );
925 if ( dlg.exec() ) 925 if ( dlg.exec() )
926 uids = dlg.uids(); 926 uids = dlg.uids();
927 else 927 else
928 return; 928 return;
929 if ( uids.isEmpty() ) 929 if ( uids.isEmpty() )
930 return; 930 return;
931 beamVCard( uids ); 931 beamVCard( uids );
932} 932}
933 933
934 934
935void KABCore::beamVCard(const QStringList& uids) 935void KABCore::beamVCard(const QStringList& uids)
936{ 936{
937 937
938 // LR: we should use the /tmp dir on the Zaurus, 938 // LR: we should use the /tmp dir on the Zaurus,
939 // because: /tmp = RAM, (HOME)/kdepim = flash memory 939 // because: /tmp = RAM, (HOME)/kdepim = flash memory
940 940
941#ifdef DESKTOP_VERSION 941#ifdef DESKTOP_VERSION
942 QString fileName = locateLocal("tmp", "kapibeamfile.vcf"); 942 QString fileName = locateLocal("tmp", "kapibeamfile.vcf");
943#else 943#else
944 QString fileName = "/tmp/kapibeamfile.vcf"; 944 QString fileName = "/tmp/kapibeamfile.vcf";
945#endif 945#endif
946 946
947 KABC::VCardConverter converter; 947 KABC::VCardConverter converter;
948 QString description; 948 QString description;
949 QString datastream; 949 QString datastream;
950 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 950 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
951 KABC::Addressee a = mAddressBook->findByUid( *it ); 951 KABC::Addressee a = mAddressBook->findByUid( *it );
952 952
953 if ( a.isEmpty() ) 953 if ( a.isEmpty() )
954 continue; 954 continue;
955 955
956 if (description.isEmpty()) 956 if (description.isEmpty())
957 description = a.formattedName(); 957 description = a.formattedName();
958 958
959 QString vcard; 959 QString vcard;
960 converter.addresseeToVCard( a, vcard ); 960 converter.addresseeToVCard( a, vcard );
961 int start = 0; 961 int start = 0;
962 int next; 962 int next;
963 while ( (next = vcard.find("TYPE=", start) )>= 0 ) { 963 while ( (next = vcard.find("TYPE=", start) )>= 0 ) {
964 int semi = vcard.find(";", next); 964 int semi = vcard.find(";", next);
965 int dopp = vcard.find(":", next); 965 int dopp = vcard.find(":", next);
966 int sep; 966 int sep;
967 if ( semi < dopp && semi >= 0 ) 967 if ( semi < dopp && semi >= 0 )
968 sep = semi ; 968 sep = semi ;
969 else 969 else
970 sep = dopp; 970 sep = dopp;
971 datastream +=vcard.mid( start, next - start); 971 datastream +=vcard.mid( start, next - start);
972 datastream +=vcard.mid( next+5,sep -next -5 ).upper(); 972 datastream +=vcard.mid( next+5,sep -next -5 ).upper();
973 start = sep; 973 start = sep;
974 } 974 }
975 datastream += vcard.mid( start,vcard.length() ); 975 datastream += vcard.mid( start,vcard.length() );
976 } 976 }
977#ifndef DESKTOP_VERSION 977#ifndef DESKTOP_VERSION
978 QFile outFile(fileName); 978 QFile outFile(fileName);
979 if ( outFile.open(IO_WriteOnly) ) { 979 if ( outFile.open(IO_WriteOnly) ) {
980 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 980 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
981 QTextStream t( &outFile ); // use a text stream 981 QTextStream t( &outFile ); // use a text stream
982 //t.setEncoding( QTextStream::UnicodeUTF8 ); 982 //t.setEncoding( QTextStream::UnicodeUTF8 );
983 t.setEncoding( QTextStream::Latin1 ); 983 t.setEncoding( QTextStream::Latin1 );
984 t <<datastream.latin1(); 984 t <<datastream.latin1();
985 outFile.close(); 985 outFile.close();
986 Ir *ir = new Ir( this ); 986 Ir *ir = new Ir( this );
987 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 987 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
988 ir->send( fileName, description, "text/x-vCard" ); 988 ir->send( fileName, description, "text/x-vCard" );
989 } else { 989 } else {
990 qDebug("KA: Error open temp beam file "); 990 qDebug("KA: Error open temp beam file ");
991 return; 991 return;
992 } 992 }
993#endif 993#endif
994 994
995} 995}
996 996
997void KABCore::beamDone( Ir *ir ) 997void KABCore::beamDone( Ir *ir )
998{ 998{
999#ifndef DESKTOP_VERSION 999#ifndef DESKTOP_VERSION
1000 delete ir; 1000 delete ir;
1001#endif 1001#endif
1002 topLevelWidget()->raise(); 1002 topLevelWidget()->raise();
1003 message( i18n("Beaming finished!") ); 1003 message( i18n("Beaming finished!") );
1004} 1004}
1005 1005
1006 1006
1007void KABCore::browse( const QString& url ) 1007void KABCore::browse( const QString& url )
1008{ 1008{
1009#ifndef KAB_EMBEDDED 1009#ifndef KAB_EMBEDDED
1010 kapp->invokeBrowser( url ); 1010 kapp->invokeBrowser( url );
1011#else //KAB_EMBEDDED 1011#else //KAB_EMBEDDED
1012 qDebug("KABCore::browse must be fixed"); 1012 qDebug("KABCore::browse must be fixed");
1013#endif //KAB_EMBEDDED 1013#endif //KAB_EMBEDDED
1014} 1014}
1015 1015
1016void KABCore::selectAllContacts() 1016void KABCore::selectAllContacts()
1017{ 1017{
1018 mViewManager->setSelected( QString::null, true ); 1018 mViewManager->setSelected( QString::null, true );
1019} 1019}
1020 1020
1021void KABCore::deleteContacts() 1021void KABCore::deleteContacts()
1022{ 1022{
1023 QStringList uidList = mViewManager->selectedUids(); 1023 QStringList uidList = mViewManager->selectedUids();
1024 deleteContacts( uidList ); 1024 deleteContacts( uidList );
1025} 1025}
1026 1026
1027void KABCore::deleteContacts( const QStringList &uids ) 1027void KABCore::deleteContacts( const QStringList &uids )
1028{ 1028{
1029 if ( uids.count() > 0 ) { 1029 if ( uids.count() > 0 ) {
1030 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); 1030 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids );
1031 UndoStack::instance()->push( command ); 1031 UndoStack::instance()->push( command );
1032 RedoStack::instance()->clear(); 1032 RedoStack::instance()->clear();
1033 1033
1034 // now if we deleted anything, refresh 1034 // now if we deleted anything, refresh
1035 setContactSelected( QString::null ); 1035 setContactSelected( QString::null );
1036 setModified( true ); 1036 setModified( true );
1037 } 1037 }
1038} 1038}
1039 1039
1040void KABCore::copyContacts() 1040void KABCore::copyContacts()
1041{ 1041{
1042 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1042 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1043 1043
1044 QString clipText = AddresseeUtil::addresseesToClipboard( addrList ); 1044 QString clipText = AddresseeUtil::addresseesToClipboard( addrList );
1045 1045
1046 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl; 1046 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl;
1047 1047
1048 QClipboard *cb = QApplication::clipboard(); 1048 QClipboard *cb = QApplication::clipboard();
1049 cb->setText( clipText ); 1049 cb->setText( clipText );
1050} 1050}
1051 1051
1052void KABCore::cutContacts() 1052void KABCore::cutContacts()
1053{ 1053{
1054 QStringList uidList = mViewManager->selectedUids(); 1054 QStringList uidList = mViewManager->selectedUids();
1055 1055
1056//US if ( uidList.size() > 0 ) { 1056//US if ( uidList.size() > 0 ) {
1057 if ( uidList.count() > 0 ) { 1057 if ( uidList.count() > 0 ) {
1058 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList ); 1058 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList );
1059 UndoStack::instance()->push( command ); 1059 UndoStack::instance()->push( command );
1060 RedoStack::instance()->clear(); 1060 RedoStack::instance()->clear();
1061 1061
1062 setModified( true ); 1062 setModified( true );
1063 } 1063 }
1064} 1064}
1065 1065
1066void KABCore::pasteContacts() 1066void KABCore::pasteContacts()
1067{ 1067{
1068 QClipboard *cb = QApplication::clipboard(); 1068 QClipboard *cb = QApplication::clipboard();
1069 1069
1070 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); 1070 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() );
1071 1071
1072 pasteContacts( list ); 1072 pasteContacts( list );
1073} 1073}
1074 1074
1075void KABCore::pasteContacts( KABC::Addressee::List &list ) 1075void KABCore::pasteContacts( KABC::Addressee::List &list )
1076{ 1076{
1077 KABC::Resource *resource = requestResource( this ); 1077 KABC::Resource *resource = requestResource( this );
1078 KABC::Addressee::List::Iterator it; 1078 KABC::Addressee::List::Iterator it;
1079 for ( it = list.begin(); it != list.end(); ++it ) 1079 for ( it = list.begin(); it != list.end(); ++it )
1080 (*it).setResource( resource ); 1080 (*it).setResource( resource );
1081 1081
1082 PwPasteCommand *command = new PwPasteCommand( this, list ); 1082 PwPasteCommand *command = new PwPasteCommand( this, list );
1083 UndoStack::instance()->push( command ); 1083 UndoStack::instance()->push( command );
1084 RedoStack::instance()->clear(); 1084 RedoStack::instance()->clear();
1085 1085
1086 setModified( true ); 1086 setModified( true );
1087} 1087}
1088 1088
1089void KABCore::setWhoAmI() 1089void KABCore::setWhoAmI()
1090{ 1090{
1091 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1091 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1092 1092
1093 if ( addrList.count() > 1 ) { 1093 if ( addrList.count() > 1 ) {
1094 KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); 1094 KMessageBox::sorry( this, i18n( "Please select only one contact." ) );
1095 return; 1095 return;
1096 } 1096 }
1097 1097
1098 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); 1098 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) );
1099 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes ) 1099 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes )
1100 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); 1100 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] );
1101} 1101}
1102void KABCore::editCategories() 1102void KABCore::editCategories()
1103{ 1103{
1104 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true ); 1104 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true );
1105 dlg.exec(); 1105 dlg.exec();
1106} 1106}
1107void KABCore::setCategories() 1107void KABCore::setCategories()
1108{ 1108{
1109 1109
1110 QStringList uids; 1110 QStringList uids;
1111 XXPortSelectDialog dlgx( this, false, this ); 1111 XXPortSelectDialog dlgx( this, false, this );
1112 if ( dlgx.exec() ) 1112 if ( dlgx.exec() )
1113 uids = dlgx.uids(); 1113 uids = dlgx.uids();
1114 else 1114 else
1115 return; 1115 return;
1116 if ( uids.isEmpty() ) 1116 if ( uids.isEmpty() )
1117 return; 1117 return;
1118 // qDebug("count %d ", uids.count()); 1118 // qDebug("count %d ", uids.count());
1119 1119
1120 1120
1121 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); 1121 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true );
1122 if ( !dlg.exec() ) { 1122 if ( !dlg.exec() ) {
1123 message( i18n("Setting categories cancelled") ); 1123 message( i18n("Setting categories cancelled") );
1124 return; 1124 return;
1125 } 1125 }
1126 bool merge = false; 1126 bool merge = false;
1127 QString msg = i18n( "Merge with existing categories?" ); 1127 QString msg = i18n( "Merge with existing categories?" );
1128 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) 1128 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes )
1129 merge = true; 1129 merge = true;
1130 1130
1131 message( i18n("Setting categories ... please wait!") ); 1131 message( i18n("Setting categories ... please wait!") );
1132 QStringList categories = dlg.selectedCategories(); 1132 QStringList categories = dlg.selectedCategories();
1133 1133
1134 //QStringList uids = mViewManager->selectedUids(); 1134 //QStringList uids = mViewManager->selectedUids();
1135 QStringList::Iterator it; 1135 QStringList::Iterator it;
1136 for ( it = uids.begin(); it != uids.end(); ++it ) { 1136 for ( it = uids.begin(); it != uids.end(); ++it ) {
1137 KABC::Addressee addr = mAddressBook->findByUid( *it ); 1137 KABC::Addressee addr = mAddressBook->findByUid( *it );
1138 if ( !addr.isEmpty() ) { 1138 if ( !addr.isEmpty() ) {
1139 if ( !merge ) 1139 if ( !merge )
1140 addr.setCategories( categories ); 1140 addr.setCategories( categories );
1141 else { 1141 else {
1142 QStringList addrCategories = addr.categories(); 1142 QStringList addrCategories = addr.categories();
1143 QStringList::Iterator catIt; 1143 QStringList::Iterator catIt;
1144 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { 1144 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
1145 if ( !addrCategories.contains( *catIt ) ) 1145 if ( !addrCategories.contains( *catIt ) )
1146 addrCategories.append( *catIt ); 1146 addrCategories.append( *catIt );
1147 } 1147 }
1148 addr.setCategories( addrCategories ); 1148 addr.setCategories( addrCategories );
1149 } 1149 }
1150 mAddressBook->insertAddressee( addr ); 1150 mAddressBook->insertAddressee( addr );
1151 } 1151 }
1152 } 1152 }
1153 1153
1154 if ( uids.count() > 0 ) 1154 if ( uids.count() > 0 )
1155 setModified( true ); 1155 setModified( true );
1156 message( i18n("Setting categories completed!") ); 1156 message( i18n("Setting categories completed!") );
1157} 1157}
1158 1158
1159void KABCore::setSearchFields( const KABC::Field::List &fields ) 1159void KABCore::setSearchFields( const KABC::Field::List &fields )
1160{ 1160{
1161 mIncSearchWidget->setFields( fields ); 1161 mIncSearchWidget->setFields( fields );
1162} 1162}
1163 1163
1164void KABCore::incrementalSearch( const QString& text ) 1164void KABCore::incrementalSearch( const QString& text )
1165{ 1165{
1166 QString stext; 1166 QString stext;
1167 if ( KABPrefs::instance()->mAutoSearchWithWildcard ) { 1167 if ( KABPrefs::instance()->mAutoSearchWithWildcard ) {
1168 stext = "*" + text; 1168 stext = "*" + text;
1169 } else { 1169 } else {
1170 stext = text; 1170 stext = text;
1171 } 1171 }
1172 mViewManager->doSearch( stext, mIncSearchWidget->currentField() ); 1172 mViewManager->doSearch( stext, mIncSearchWidget->currentField() );
1173} 1173}
1174void KABCore::incrementalSearchJump( const QString& text ) 1174void KABCore::incrementalSearchJump( const QString& text )
1175{ 1175{
1176 mViewManager->doSearch( text, mIncSearchWidget->currentField() ); 1176 mViewManager->doSearch( text, mIncSearchWidget->currentField() );
1177} 1177}
1178 1178
1179void KABCore::setModified() 1179void KABCore::setModified()
1180{ 1180{
1181 setModified( true ); 1181 setModified( true );
1182} 1182}
1183 1183
1184void KABCore::setModifiedWOrefresh() 1184void KABCore::setModifiedWOrefresh()
1185{ 1185{
1186 // qDebug("KABCore::setModifiedWOrefresh() "); 1186 // qDebug("KABCore::setModifiedWOrefresh() ");
1187 mModified = true; 1187 mModified = true;
1188 mActionSave->setEnabled( mModified ); 1188 mActionSave->setEnabled( mModified );
1189 1189
1190 1190
1191} 1191}
1192void KABCore::setModified( bool modified ) 1192void KABCore::setModified( bool modified )
1193{ 1193{
1194 mModified = modified; 1194 mModified = modified;
1195 mActionSave->setEnabled( mModified ); 1195 mActionSave->setEnabled( mModified );
1196 1196
1197 if ( modified ) 1197 if ( modified )
1198 mJumpButtonBar->recreateButtons(); 1198 mJumpButtonBar->recreateButtons();
1199 1199
1200 mViewManager->refreshView(); 1200 mViewManager->refreshView();
1201 1201
1202} 1202}
1203 1203
1204bool KABCore::modified() const 1204bool KABCore::modified() const
1205{ 1205{
1206 return mModified; 1206 return mModified;
1207} 1207}
1208 1208
1209void KABCore::contactModified( const KABC::Addressee &addr ) 1209void KABCore::contactModified( const KABC::Addressee &addr )
1210{ 1210{
1211 addrModified( addr ); 1211 addrModified( addr );
1212#if 0 // debug only 1212#if 0 // debug only
1213 KABC::Addressee ad = addr; 1213 KABC::Addressee ad = addr;
1214 ad.computeCsum( "123"); 1214 ad.computeCsum( "123");
1215#endif 1215#endif
1216} 1216}
1217 1217
1218void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails ) 1218void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails )
1219{ 1219{
1220 1220
1221 Command *command = 0; 1221 Command *command = 0;
1222 QString uid; 1222 QString uid;
1223 1223
1224 // check if it exists already 1224 // check if it exists already
1225 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() ); 1225 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() );
1226 if ( origAddr.isEmpty() ) 1226 if ( origAddr.isEmpty() )
1227 command = new PwNewCommand( mAddressBook, addr ); 1227 command = new PwNewCommand( mAddressBook, addr );
1228 else { 1228 else {
1229 command = new PwEditCommand( mAddressBook, origAddr, addr ); 1229 command = new PwEditCommand( mAddressBook, origAddr, addr );
1230 uid = addr.uid(); 1230 uid = addr.uid();
1231 } 1231 }
1232 1232
1233 UndoStack::instance()->push( command ); 1233 UndoStack::instance()->push( command );
1234 RedoStack::instance()->clear(); 1234 RedoStack::instance()->clear();
1235 if ( updateDetails ) 1235 if ( updateDetails )
1236 mDetails->setAddressee( addr ); 1236 mDetails->setAddressee( addr );
1237 setModified( true ); 1237 setModified( true );
1238} 1238}
1239 1239
1240void KABCore::newContact() 1240void KABCore::newContact()
1241{ 1241{
1242 1242
1243 1243
1244 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); 1244 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources();
1245 1245
1246 QPtrList<KRES::Resource> kresResources; 1246 QPtrList<KRES::Resource> kresResources;
1247 QPtrListIterator<KABC::Resource> it( kabcResources ); 1247 QPtrListIterator<KABC::Resource> it( kabcResources );
1248 KABC::Resource *resource; 1248 KABC::Resource *resource;
1249 while ( ( resource = it.current() ) != 0 ) { 1249 while ( ( resource = it.current() ) != 0 ) {
1250 ++it; 1250 ++it;
1251 if ( !resource->readOnly() ) { 1251 if ( !resource->readOnly() ) {
1252 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 1252 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
1253 if ( res ) 1253 if ( res )
1254 kresResources.append( res ); 1254 kresResources.append( res );
1255 } 1255 }
1256 } 1256 }
1257 1257
1258 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this ); 1258 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this );
1259 resource = static_cast<KABC::Resource*>( res ); 1259 resource = static_cast<KABC::Resource*>( res );
1260 1260
1261 if ( resource ) { 1261 if ( resource ) {
1262 KABC::Addressee addr; 1262 KABC::Addressee addr;
1263 addr.setResource( resource ); 1263 addr.setResource( resource );
1264 mEditorDialog->setAddressee( addr ); 1264 mEditorDialog->setAddressee( addr );
1265 mEditorDialog->setCaption( i18n("Edit new contact")); 1265 mEditorDialog->setCaption( i18n("Edit new contact"));
1266 KApplication::execDialog ( mEditorDialog ); 1266 KApplication::execDialog ( mEditorDialog );
1267 1267
1268 } else 1268 } else
1269 return; 1269 return;
1270 1270
1271 // mEditorDict.insert( dialog->addressee().uid(), dialog ); 1271 // mEditorDict.insert( dialog->addressee().uid(), dialog );
1272 1272
1273 1273
1274} 1274}
1275 1275
1276void KABCore::addEmail( QString aStr ) 1276void KABCore::addEmail( QString aStr )
1277{ 1277{
1278#ifndef KAB_EMBEDDED 1278#ifndef KAB_EMBEDDED
1279 QString fullName, email; 1279 QString fullName, email;
1280 1280
1281 KABC::Addressee::parseEmailAddress( aStr, fullName, email ); 1281 KABC::Addressee::parseEmailAddress( aStr, fullName, email );
1282 1282
1283 // Try to lookup the addressee matching the email address 1283 // Try to lookup the addressee matching the email address
1284 bool found = false; 1284 bool found = false;
1285 QStringList emailList; 1285 QStringList emailList;
1286 KABC::AddressBook::Iterator it; 1286 KABC::AddressBook::Iterator it;
1287 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) { 1287 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) {
1288 emailList = (*it).emails(); 1288 emailList = (*it).emails();
1289 if ( emailList.contains( email ) > 0 ) { 1289 if ( emailList.contains( email ) > 0 ) {
1290 found = true; 1290 found = true;
1291 (*it).setNameFromString( fullName ); 1291 (*it).setNameFromString( fullName );
1292 editContact( (*it).uid() ); 1292 editContact( (*it).uid() );
1293 } 1293 }
1294 } 1294 }
1295 1295
1296 if ( !found ) { 1296 if ( !found ) {
1297 KABC::Addressee addr; 1297 KABC::Addressee addr;
1298 addr.setNameFromString( fullName ); 1298 addr.setNameFromString( fullName );
1299 addr.insertEmail( email, true ); 1299 addr.insertEmail( email, true );
1300 1300
1301 mAddressBook->insertAddressee( addr ); 1301 mAddressBook->insertAddressee( addr );
1302 mViewManager->refreshView( addr.uid() ); 1302 mViewManager->refreshView( addr.uid() );
1303 editContact( addr.uid() ); 1303 editContact( addr.uid() );
1304 } 1304 }
1305#else //KAB_EMBEDDED 1305#else //KAB_EMBEDDED
1306 qDebug("KABCore::addEmail finsih method"); 1306 qDebug("KABCore::addEmail finsih method");
1307#endif //KAB_EMBEDDED 1307#endif //KAB_EMBEDDED
1308} 1308}
1309 1309
1310void KABCore::importVCard( const KURL &url, bool showPreview ) 1310void KABCore::importVCard( const KURL &url, bool showPreview )
1311{ 1311{
1312 mXXPortManager->importVCard( url, showPreview ); 1312 mXXPortManager->importVCard( url, showPreview );
1313} 1313}
1314void KABCore::importFromOL() 1314void KABCore::importFromOL()
1315{ 1315{
1316#ifdef _OL_IMPORT_ 1316#ifdef _OL_IMPORT_
1317 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); 1317 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this );
1318 idgl->exec(); 1318 idgl->exec();
1319 KABC::Addressee::List list = idgl->getAddressList(); 1319 KABC::Addressee::List list = idgl->getAddressList();
1320 if ( list.count() > 0 ) { 1320 if ( list.count() > 0 ) {
1321 KABC::Addressee::List listNew; 1321 KABC::Addressee::List listNew;
1322 KABC::Addressee::List listExisting; 1322 KABC::Addressee::List listExisting;
1323 KABC::Addressee::List::Iterator it; 1323 KABC::Addressee::List::Iterator it;
1324 KABC::AddressBook::Iterator iter; 1324 KABC::AddressBook::Iterator iter;
1325 for ( it = list.begin(); it != list.end(); ++it ) { 1325 for ( it = list.begin(); it != list.end(); ++it ) {
1326 if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) 1326 if ( mAddressBook->findByUid((*it).uid() ).isEmpty())
1327 listNew.append( (*it) ); 1327 listNew.append( (*it) );
1328 else 1328 else
1329 listExisting.append( (*it) ); 1329 listExisting.append( (*it) );
1330 } 1330 }
1331 if ( listExisting.count() > 0 ) 1331 if ( listExisting.count() > 0 )
1332 KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() )); 1332 KMessageBox::information( this, i18n("%1 contacts not added to addressbook\nbecause they were already in the addressbook!").arg( listExisting.count() ));
1333 if ( listNew.count() > 0 ) { 1333 if ( listNew.count() > 0 ) {
1334 pasteWithNewUid = false; 1334 pasteWithNewUid = false;
1335 pasteContacts( listNew ); 1335 pasteContacts( listNew );
1336 pasteWithNewUid = true; 1336 pasteWithNewUid = true;
1337 } 1337 }
1338 } 1338 }
1339 delete idgl; 1339 delete idgl;
1340#endif 1340#endif
1341} 1341}
1342 1342
1343void KABCore::importVCard( const QString &vCard, bool showPreview ) 1343void KABCore::importVCard( const QString &vCard, bool showPreview )
1344{ 1344{
1345 mXXPortManager->importVCard( vCard, showPreview ); 1345 mXXPortManager->importVCard( vCard, showPreview );
1346} 1346}
1347 1347
1348//US added a second method without defaultparameter 1348//US added a second method without defaultparameter
1349void KABCore::editContact2() { 1349void KABCore::editContact2() {
1350 editContact( QString::null ); 1350 editContact( QString::null );
1351} 1351}
1352 1352
1353void KABCore::editContact( const QString &uid ) 1353void KABCore::editContact( const QString &uid )
1354{ 1354{
1355 1355
1356 if ( mExtensionManager->isQuickEditVisible() ) 1356 if ( mExtensionManager->isQuickEditVisible() )
1357 return; 1357 return;
1358 1358
1359 // First, locate the contact entry 1359 // First, locate the contact entry
1360 QString localUID = uid; 1360 QString localUID = uid;
1361 if ( localUID.isNull() ) { 1361 if ( localUID.isNull() ) {
1362 QStringList uidList = mViewManager->selectedUids(); 1362 QStringList uidList = mViewManager->selectedUids();
1363 if ( uidList.count() > 0 ) 1363 if ( uidList.count() > 0 )
1364 localUID = *( uidList.at( 0 ) ); 1364 localUID = *( uidList.at( 0 ) );
1365 } 1365 }
1366 1366
1367 KABC::Addressee addr = mAddressBook->findByUid( localUID ); 1367 KABC::Addressee addr = mAddressBook->findByUid( localUID );
1368 if ( !addr.isEmpty() ) { 1368 if ( !addr.isEmpty() ) {
1369 mEditorDialog->setAddressee( addr ); 1369 mEditorDialog->setAddressee( addr );
1370 KApplication::execDialog ( mEditorDialog ); 1370 KApplication::execDialog ( mEditorDialog );
1371 } 1371 }
1372} 1372}
1373 1373
1374/** 1374/**
1375 Shows or edits the detail view for the given uid. If the uid is QString::null, 1375 Shows or edits the detail view for the given uid. If the uid is QString::null,
1376 the method will try to find a selected addressee in the view. 1376 the method will try to find a selected addressee in the view.
1377 */ 1377 */
1378void KABCore::executeContact( const QString &uid /*US = QString::null*/ ) 1378void KABCore::executeContact( const QString &uid /*US = QString::null*/ )
1379{ 1379{
1380 if ( mMultipleViewsAtOnce ) 1380 if ( mMultipleViewsAtOnce )
1381 { 1381 {
1382 editContact( uid ); 1382 editContact( uid );
1383 } 1383 }
1384 else 1384 else
1385 { 1385 {
1386 setDetailsVisible( true ); 1386 setDetailsVisible( true );
1387 mActionDetails->setChecked(true); 1387 mActionDetails->setChecked(true);
1388 } 1388 }
1389 1389
1390} 1390}
1391 1391
1392void KABCore::save() 1392void KABCore::save()
1393{ 1393{
1394 if (syncManager->blockSave()) 1394 if (syncManager->blockSave())
1395 return; 1395 return;
1396 if ( !mModified ) 1396 if ( !mModified )
1397 return; 1397 return;
1398 1398
1399 syncManager->setBlockSave(true); 1399 syncManager->setBlockSave(true);
1400 QString text = i18n( "There was an error while attempting to save\n the " 1400 QString text = i18n( "There was an error while attempting to save\n the "
1401 "address book. Please check that some \nother application is " 1401 "address book. Please check that some \nother application is "
1402 "not using it. " ); 1402 "not using it. " );
1403 message(i18n("Saving ... please wait! "), false); 1403 message(i18n("Saving ... please wait! "), false);
1404 //qApp->processEvents(); 1404 //qApp->processEvents();
1405#ifndef KAB_EMBEDDED 1405#ifndef KAB_EMBEDDED
1406 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); 1406 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook );
1407 if ( !b || !b->save() ) { 1407 if ( !b || !b->save() ) {
1408 KMessageBox::error( this, text, i18n( "Unable to Save" ) ); 1408 KMessageBox::error( this, text, i18n( "Unable to Save" ) );
1409 } 1409 }
1410#else //KAB_EMBEDDED 1410#else //KAB_EMBEDDED
1411 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); 1411 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook );
1412 if ( !b || !b->save() ) { 1412 if ( !b || !b->save() ) {
1413 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); 1413 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok"));
1414 } 1414 }
1415#endif //KAB_EMBEDDED 1415#endif //KAB_EMBEDDED
1416 1416
1417 message(i18n("Addressbook saved!")); 1417 message(i18n("Addressbook saved!"));
1418 setModified( false ); 1418 setModified( false );
1419 syncManager->setBlockSave(false); 1419 syncManager->setBlockSave(false);
1420} 1420}
1421 1421
1422 1422
1423void KABCore::undo() 1423void KABCore::undo()
1424{ 1424{
1425 UndoStack::instance()->undo(); 1425 UndoStack::instance()->undo();
1426 1426
1427 // Refresh the view 1427 // Refresh the view
1428 mViewManager->refreshView(); 1428 mViewManager->refreshView();
1429} 1429}
1430 1430
1431void KABCore::redo() 1431void KABCore::redo()
1432{ 1432{
1433 RedoStack::instance()->redo(); 1433 RedoStack::instance()->redo();
1434 1434
1435 // Refresh the view 1435 // Refresh the view
1436 mViewManager->refreshView(); 1436 mViewManager->refreshView();
1437} 1437}
1438void KABCore::setJumpButtonBar( bool visible ) 1438void KABCore::setJumpButtonBar( bool visible )
1439{ 1439{
1440 setJumpButtonBarVisible(visible ); 1440 setJumpButtonBarVisible(visible );
1441 saveSettings(); 1441 saveSettings();
1442} 1442}
1443void KABCore::setJumpButtonBarVisible( bool visible ) 1443void KABCore::setJumpButtonBarVisible( bool visible )
1444{ 1444{
1445 if (mMultipleViewsAtOnce) 1445 if (mMultipleViewsAtOnce)
1446 { 1446 {
1447 if ( visible ) 1447 if ( visible )
1448 mJumpButtonBar->show(); 1448 mJumpButtonBar->show();
1449 else 1449 else
1450 mJumpButtonBar->hide(); 1450 mJumpButtonBar->hide();
1451 } 1451 }
1452 else 1452 else
1453 { 1453 {
1454 // show the jumpbar only if "the details are hidden" == "viewmanager are shown" 1454 // show the jumpbar only if "the details are hidden" == "viewmanager are shown"
1455 if (mViewManager->isVisible()) 1455 if (mViewManager->isVisible())
1456 { 1456 {
1457 if ( visible ) 1457 if ( visible )
1458 mJumpButtonBar->show(); 1458 mJumpButtonBar->show();
1459 else 1459 else
1460 mJumpButtonBar->hide(); 1460 mJumpButtonBar->hide();
1461 } 1461 }
1462 else 1462 else
1463 { 1463 {
1464 mJumpButtonBar->hide(); 1464 mJumpButtonBar->hide();
1465 } 1465 }
1466 } 1466 }
1467 if ( visible ) { 1467 if ( visible ) {
1468 if ( mIncSearchWidget->currentItem() == 0 ) { 1468 if ( mIncSearchWidget->currentItem() == 0 ) {
1469 message( i18n("Change search field enable jump bar") ); 1469 message( i18n("Change search field enable jump bar") );
1470 } 1470 }
1471 } 1471 }
1472} 1472}
1473 1473
1474 1474
1475void KABCore::setDetailsToState() 1475void KABCore::setDetailsToState()
1476{ 1476{
1477 setDetailsVisible( mActionDetails->isChecked() ); 1477 setDetailsVisible( mActionDetails->isChecked() );
1478} 1478}
1479void KABCore::setDetailsToggle() 1479void KABCore::setDetailsToggle()
1480{ 1480{
1481 mActionDetails->setChecked( !mActionDetails->isChecked() ); 1481 mActionDetails->setChecked( !mActionDetails->isChecked() );
1482 setDetailsToState(); 1482 setDetailsToState();
1483} 1483}
1484 1484
1485 1485
1486 1486
1487void KABCore::setDetailsVisible( bool visible ) 1487void KABCore::setDetailsVisible( bool visible )
1488{ 1488{
1489 if (visible && mDetails->isHidden()) 1489 if (visible && mDetails->isHidden())
1490 { 1490 {
1491 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1491 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1492 if ( addrList.count() > 0 ) 1492 if ( addrList.count() > 0 )
1493 mDetails->setAddressee( addrList[ 0 ] ); 1493 mDetails->setAddressee( addrList[ 0 ] );
1494 } 1494 }
1495 1495
1496 // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between 1496 // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between
1497 // the listview and the detailview. We do that by changing the splitbar size. 1497 // the listview and the detailview. We do that by changing the splitbar size.
1498 if (mMultipleViewsAtOnce) 1498 if (mMultipleViewsAtOnce)
1499 { 1499 {
1500 if ( visible ) 1500 if ( visible )
1501 mDetails->show(); 1501 mDetails->show();
1502 else 1502 else
1503 mDetails->hide(); 1503 mDetails->hide();
1504 } 1504 }
1505 else 1505 else
1506 { 1506 {
1507 if ( visible ) { 1507 if ( visible ) {
1508 mViewManager->hide(); 1508 mViewManager->hide();
1509 mDetails->show(); 1509 mDetails->show();
1510 mIncSearchWidget->setFocus(); 1510 mIncSearchWidget->setFocus();
1511 } 1511 }
1512 else { 1512 else {
1513 mViewManager->show(); 1513 mViewManager->show();
1514 mDetails->hide(); 1514 mDetails->hide();
1515 mViewManager->setFocusAV(); 1515 mViewManager->setFocusAV();
1516 } 1516 }
1517 setJumpButtonBarVisible( !visible ); 1517 setJumpButtonBarVisible( !visible );
1518 } 1518 }
1519 1519
1520} 1520}
1521 1521
1522void KABCore::extensionChanged( int id ) 1522void KABCore::extensionChanged( int id )
1523{ 1523{
1524 //change the details view only for non desktop systems 1524 //change the details view only for non desktop systems
1525#ifndef DESKTOP_VERSION 1525#ifndef DESKTOP_VERSION
1526 1526
1527 if (id == 0) 1527 if (id == 0)
1528 { 1528 {
1529 //the user disabled the extension. 1529 //the user disabled the extension.
1530 1530
1531 if (mMultipleViewsAtOnce) 1531 if (mMultipleViewsAtOnce)
1532 { // enable detailsview again 1532 { // enable detailsview again
1533 setDetailsVisible( true ); 1533 setDetailsVisible( true );
1534 mActionDetails->setChecked( true ); 1534 mActionDetails->setChecked( true );
1535 } 1535 }
1536 else 1536 else
1537 { //go back to the listview 1537 { //go back to the listview
1538 setDetailsVisible( false ); 1538 setDetailsVisible( false );
1539 mActionDetails->setChecked( false ); 1539 mActionDetails->setChecked( false );
1540 mActionDetails->setEnabled(true); 1540 mActionDetails->setEnabled(true);
1541 } 1541 }
1542 1542
1543 } 1543 }
1544 else 1544 else
1545 { 1545 {
1546 //the user enabled the extension. 1546 //the user enabled the extension.
1547 setDetailsVisible( false ); 1547 setDetailsVisible( false );
1548 mActionDetails->setChecked( false ); 1548 mActionDetails->setChecked( false );
1549 1549
1550 if (!mMultipleViewsAtOnce) 1550 if (!mMultipleViewsAtOnce)
1551 { 1551 {
1552 mActionDetails->setEnabled(false); 1552 mActionDetails->setEnabled(false);
1553 } 1553 }
1554 1554
1555 mExtensionManager->setSelectionChanged(); 1555 mExtensionManager->setSelectionChanged();
1556 1556
1557 } 1557 }
1558 1558
1559#endif// DESKTOP_VERSION 1559#endif// DESKTOP_VERSION
1560 1560
1561} 1561}
1562 1562
1563 1563
1564void KABCore::extensionModified( const KABC::Addressee::List &list ) 1564void KABCore::extensionModified( const KABC::Addressee::List &list )
1565{ 1565{
1566 1566
1567 if ( list.count() != 0 ) { 1567 if ( list.count() != 0 ) {
1568 KABC::Addressee::List::ConstIterator it; 1568 KABC::Addressee::List::ConstIterator it;
1569 for ( it = list.begin(); it != list.end(); ++it ) 1569 for ( it = list.begin(); it != list.end(); ++it )
1570 mAddressBook->insertAddressee( *it ); 1570 mAddressBook->insertAddressee( *it );
1571 if ( list.count() > 1 ) 1571 if ( list.count() > 1 )
1572 setModified(); 1572 setModified();
1573 else 1573 else
1574 setModifiedWOrefresh(); 1574 setModifiedWOrefresh();
1575 } 1575 }
1576 if ( list.count() == 0 ) 1576 if ( list.count() == 0 )
1577 mViewManager->refreshView(); 1577 mViewManager->refreshView();
1578 else 1578 else
1579 mViewManager->refreshView( list[ 0 ].uid() ); 1579 mViewManager->refreshView( list[ 0 ].uid() );
1580 1580
1581 1581
1582 1582
1583} 1583}
1584 1584
1585QString KABCore::getNameByPhone( const QString &phone ) 1585QString KABCore::getNameByPhone( const QString &phone )
1586{ 1586{
1587#ifndef KAB_EMBEDDED 1587#ifndef KAB_EMBEDDED
1588 QRegExp r( "[/*/-/ ]" ); 1588 QRegExp r( "[/*/-/ ]" );
1589 QString localPhone( phone ); 1589 QString localPhone( phone );
1590 1590
1591 bool found = false; 1591 bool found = false;
1592 QString ownerName = ""; 1592 QString ownerName = "";
1593 KABC::AddressBook::Iterator iter; 1593 KABC::AddressBook::Iterator iter;
1594 KABC::PhoneNumber::List::Iterator phoneIter; 1594 KABC::PhoneNumber::List::Iterator phoneIter;
1595 KABC::PhoneNumber::List phoneList; 1595 KABC::PhoneNumber::List phoneList;
1596 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) { 1596 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) {
1597 phoneList = (*iter).phoneNumbers(); 1597 phoneList = (*iter).phoneNumbers();
1598 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() ); 1598 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() );
1599 ++phoneIter) { 1599 ++phoneIter) {
1600 // Get rid of separator chars so just the numbers are compared. 1600 // Get rid of separator chars so just the numbers are compared.
1601 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { 1601 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) {
1602 ownerName = (*iter).formattedName(); 1602 ownerName = (*iter).formattedName();
1603 found = true; 1603 found = true;
1604 } 1604 }
1605 } 1605 }
1606 } 1606 }
1607 1607
1608 return ownerName; 1608 return ownerName;
1609#else //KAB_EMBEDDED 1609#else //KAB_EMBEDDED
1610 qDebug("KABCore::getNameByPhone finsih method"); 1610 qDebug("KABCore::getNameByPhone finsih method");
1611 return ""; 1611 return "";
1612#endif //KAB_EMBEDDED 1612#endif //KAB_EMBEDDED
1613 1613
1614} 1614}
1615void KABCore::openConfigGlobalDialog() 1615void KABCore::openConfigGlobalDialog()
1616{ 1616{
1617 KPimPrefsGlobalDialog gc ( this ); 1617 KPimPrefsGlobalDialog gc ( this );
1618 gc.exec(); 1618 gc.exec();
1619} 1619}
1620void KABCore::openConfigDialog() 1620void KABCore::openConfigDialog()
1621{ 1621{
1622 KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true); 1622 KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true);
1623 1623
1624 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog , "KCMKabConfig" ); 1624 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog , "KCMKabConfig" );
1625 ConfigureDialog->setMainWidget( kabcfg ); 1625 ConfigureDialog->setMainWidget( kabcfg );
1626 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1626 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1627 this, SLOT( configurationChanged() ) ); 1627 this, SLOT( configurationChanged() ) );
1628 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1628 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1629 kabcfg, SLOT( save() ) ); 1629 kabcfg, SLOT( save() ) );
1630 connect( ConfigureDialog, SIGNAL( okClicked() ), 1630 connect( ConfigureDialog, SIGNAL( acceptClicked() ),
1631 this, SLOT( configurationChanged() ) ); 1631 this, SLOT( configurationChanged() ) );
1632 connect( ConfigureDialog, SIGNAL( okClicked() ), 1632 connect( ConfigureDialog, SIGNAL( acceptClicked() ),
1633 kabcfg, SLOT( save() ) ); 1633 kabcfg, SLOT( save() ) );
1634 connect( ConfigureDialog, SIGNAL( defaultClicked() ), 1634 connect( ConfigureDialog, SIGNAL( defaultClicked() ),
1635 kabcfg, SLOT( defaults() ) ); 1635 kabcfg, SLOT( defaults() ) );
1636 saveSettings(); 1636 saveSettings();
1637 kabcfg->load(); 1637 kabcfg->load();
1638#ifndef DESKTOP_VERSION 1638#ifndef DESKTOP_VERSION
1639 if ( QApplication::desktop()->height() <= 480 ) 1639 if ( QApplication::desktop()->height() <= 480 )
1640 ConfigureDialog->hideButtons(); 1640 ConfigureDialog->hideButtons();
1641 ConfigureDialog->showMaximized(); 1641 ConfigureDialog->showMaximized();
1642#endif 1642#endif
1643 if ( ConfigureDialog->exec() ) 1643 if ( ConfigureDialog->exec() )
1644 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); 1644 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") );
1645 delete ConfigureDialog; 1645 delete ConfigureDialog;
1646} 1646}
1647 1647
1648void KABCore::openLDAPDialog() 1648void KABCore::openLDAPDialog()
1649{ 1649{
1650#ifndef KAB_EMBEDDED 1650#ifndef KAB_EMBEDDED
1651 if ( !mLdapSearchDialog ) { 1651 if ( !mLdapSearchDialog ) {
1652 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); 1652 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this );
1653 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, 1653 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager,
1654 SLOT( refreshView() ) ); 1654 SLOT( refreshView() ) );
1655 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, 1655 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this,
1656 SLOT( setModified() ) ); 1656 SLOT( setModified() ) );
1657 } else 1657 } else
1658 mLdapSearchDialog->restoreSettings(); 1658 mLdapSearchDialog->restoreSettings();
1659 1659
1660 if ( mLdapSearchDialog->isOK() ) 1660 if ( mLdapSearchDialog->isOK() )
1661 mLdapSearchDialog->exec(); 1661 mLdapSearchDialog->exec();
1662#else //KAB_EMBEDDED 1662#else //KAB_EMBEDDED
1663 qDebug("KABCore::openLDAPDialog() finsih method"); 1663 qDebug("KABCore::openLDAPDialog() finsih method");
1664#endif //KAB_EMBEDDED 1664#endif //KAB_EMBEDDED
1665} 1665}
1666 1666
1667void KABCore::print() 1667void KABCore::print()
1668{ 1668{
1669#ifndef KAB_EMBEDDED 1669#ifndef KAB_EMBEDDED
1670 KPrinter printer; 1670 KPrinter printer;
1671 if ( !printer.setup( this ) ) 1671 if ( !printer.setup( this ) )
1672 return; 1672 return;
1673 1673
1674 KABPrinting::PrintingWizard wizard( &printer, mAddressBook, 1674 KABPrinting::PrintingWizard wizard( &printer, mAddressBook,
1675 mViewManager->selectedUids(), this ); 1675 mViewManager->selectedUids(), this );
1676 1676
1677 wizard.exec(); 1677 wizard.exec();
1678#else //KAB_EMBEDDED 1678#else //KAB_EMBEDDED
1679 qDebug("KABCore::print() finsih method"); 1679 qDebug("KABCore::print() finsih method");
1680#endif //KAB_EMBEDDED 1680#endif //KAB_EMBEDDED
1681 1681
1682} 1682}
1683 1683
1684 1684
1685void KABCore::addGUIClient( KXMLGUIClient *client ) 1685void KABCore::addGUIClient( KXMLGUIClient *client )
1686{ 1686{
1687 if ( mGUIClient ) 1687 if ( mGUIClient )
1688 mGUIClient->insertChildClient( client ); 1688 mGUIClient->insertChildClient( client );
1689 else 1689 else
1690 KMessageBox::error( this, "no KXMLGUICLient"); 1690 KMessageBox::error( this, "no KXMLGUICLient");
1691} 1691}
1692 1692
1693 1693
1694void KABCore::configurationChanged() 1694void KABCore::configurationChanged()
1695{ 1695{
1696 mExtensionManager->reconfigure(); 1696 mExtensionManager->reconfigure();
1697} 1697}
1698 1698
1699void KABCore::addressBookChanged() 1699void KABCore::addressBookChanged()
1700{ 1700{
1701/*US 1701/*US
1702 QDictIterator<AddresseeEditorDialog> it( mEditorDict ); 1702 QDictIterator<AddresseeEditorDialog> it( mEditorDict );
1703 while ( it.current() ) { 1703 while ( it.current() ) {
1704 if ( it.current()->dirty() ) { 1704 if ( it.current()->dirty() ) {
1705 QString text = i18n( "Data has been changed externally. Unsaved " 1705 QString text = i18n( "Data has been changed externally. Unsaved "
1706 "changes will be lost." ); 1706 "changes will be lost." );
1707 KMessageBox::information( this, text ); 1707 KMessageBox::information( this, text );
1708 } 1708 }
1709 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); 1709 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) );
1710 ++it; 1710 ++it;
1711 } 1711 }
1712*/ 1712*/
1713 if (mEditorDialog) 1713 if (mEditorDialog)
1714 { 1714 {
1715 if (mEditorDialog->dirty()) 1715 if (mEditorDialog->dirty())
1716 { 1716 {
1717 QString text = i18n( "Data has been changed externally. Unsaved " 1717 QString text = i18n( "Data has been changed externally. Unsaved "
1718 "changes will be lost." ); 1718 "changes will be lost." );
1719 KMessageBox::information( this, text ); 1719 KMessageBox::information( this, text );
1720 } 1720 }
1721 QString currentuid = mEditorDialog->addressee().uid(); 1721 QString currentuid = mEditorDialog->addressee().uid();
1722 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); 1722 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) );
1723 } 1723 }
1724 mViewManager->refreshView(); 1724 mViewManager->refreshView();
1725 1725
1726 1726
1727} 1727}
1728 1728
1729AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, 1729AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
1730 const char *name ) 1730 const char *name )
1731{ 1731{
1732 1732
1733 if ( mEditorDialog == 0 ) { 1733 if ( mEditorDialog == 0 ) {
1734 mEditorDialog = new AddresseeEditorDialog( this, parent, 1734 mEditorDialog = new AddresseeEditorDialog( this, parent,
1735 name ? name : "editorDialog" ); 1735 name ? name : "editorDialog" );
1736 1736
1737 1737
1738 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ), 1738 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ),
1739 SLOT( contactModified( const KABC::Addressee& ) ) ); 1739 SLOT( contactModified( const KABC::Addressee& ) ) );
1740 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ), 1740 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ),
1741 // SLOT( slotEditorDestroyed( const QString& ) ) ; 1741 // SLOT( slotEditorDestroyed( const QString& ) ) ;
1742 } 1742 }
1743 1743
1744 return mEditorDialog; 1744 return mEditorDialog;
1745} 1745}
1746 1746
1747void KABCore::slotEditorDestroyed( const QString &uid ) 1747void KABCore::slotEditorDestroyed( const QString &uid )
1748{ 1748{
1749 //mEditorDict.remove( uid ); 1749 //mEditorDict.remove( uid );
1750} 1750}
1751 1751
1752void KABCore::initGUI() 1752void KABCore::initGUI()
1753{ 1753{
1754#ifndef KAB_EMBEDDED 1754#ifndef KAB_EMBEDDED
1755 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1755 QHBoxLayout *topLayout = new QHBoxLayout( this );
1756 topLayout->setSpacing( KDialogBase::spacingHint() ); 1756 topLayout->setSpacing( KDialogBase::spacingHint() );
1757 1757
1758 mExtensionBarSplitter = new QSplitter( this ); 1758 mExtensionBarSplitter = new QSplitter( this );
1759 mExtensionBarSplitter->setOrientation( Qt::Vertical ); 1759 mExtensionBarSplitter->setOrientation( Qt::Vertical );
1760 1760
1761 mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); 1761 mDetailsSplitter = new QSplitter( mExtensionBarSplitter );
1762 1762
1763 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1763 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1764 mIncSearchWidget = new IncSearchWidget( viewSpace ); 1764 mIncSearchWidget = new IncSearchWidget( viewSpace );
1765 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1765 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1766 SLOT( incrementalSearch( const QString& ) ) ); 1766 SLOT( incrementalSearch( const QString& ) ) );
1767 1767
1768 mViewManager = new ViewManager( this, viewSpace ); 1768 mViewManager = new ViewManager( this, viewSpace );
1769 viewSpace->setStretchFactor( mViewManager, 1 ); 1769 viewSpace->setStretchFactor( mViewManager, 1 );
1770 1770
1771 mDetails = new ViewContainer( mDetailsSplitter ); 1771 mDetails = new ViewContainer( mDetailsSplitter );
1772 1772
1773 mJumpButtonBar = new JumpButtonBar( this, this ); 1773 mJumpButtonBar = new JumpButtonBar( this, this );
1774 1774
1775 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1775 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1776 1776
1777 topLayout->addWidget( mExtensionBarSplitter ); 1777 topLayout->addWidget( mExtensionBarSplitter );
1778 topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); 1778 topLayout->setStretchFactor( mExtensionBarSplitter, 100 );
1779 topLayout->addWidget( mJumpButtonBar ); 1779 topLayout->addWidget( mJumpButtonBar );
1780 //topLayout->setStretchFactor( mJumpButtonBar, 1 ); 1780 //topLayout->setStretchFactor( mJumpButtonBar, 1 );
1781 1781
1782 mXXPortManager = new XXPortManager( this, this ); 1782 mXXPortManager = new XXPortManager( this, this );
1783 1783
1784#else //KAB_EMBEDDED 1784#else //KAB_EMBEDDED
1785 //US initialize viewMenu before settingup viewmanager. 1785 //US initialize viewMenu before settingup viewmanager.
1786 // Viewmanager needs this menu to plugin submenues. 1786 // Viewmanager needs this menu to plugin submenues.
1787 viewMenu = new QPopupMenu( this ); 1787 viewMenu = new QPopupMenu( this );
1788 settingsMenu = new QPopupMenu( this ); 1788 settingsMenu = new QPopupMenu( this );
1789 //filterMenu = new QPopupMenu( this ); 1789 //filterMenu = new QPopupMenu( this );
1790 ImportMenu = new QPopupMenu( this ); 1790 ImportMenu = new QPopupMenu( this );
1791 ExportMenu = new QPopupMenu( this ); 1791 ExportMenu = new QPopupMenu( this );
1792 syncMenu = new QPopupMenu( this ); 1792 syncMenu = new QPopupMenu( this );
1793 changeMenu= new QPopupMenu( this ); 1793 changeMenu= new QPopupMenu( this );
1794 beamMenu= new QPopupMenu( this ); 1794 beamMenu= new QPopupMenu( this );
1795 1795
1796//US since we have no splitter for the embedded system, setup 1796//US since we have no splitter for the embedded system, setup
1797// a layout with two frames. One left and one right. 1797// a layout with two frames. One left and one right.
1798 1798
1799 QBoxLayout *topLayout; 1799 QBoxLayout *topLayout;
1800 1800
1801 // = new QHBoxLayout( this ); 1801 // = new QHBoxLayout( this );
1802// QBoxLayout *topLayout = (QBoxLayout*)layout(); 1802// QBoxLayout *topLayout = (QBoxLayout*)layout();
1803 1803
1804// QWidget *mainBox = new QWidget( this ); 1804// QWidget *mainBox = new QWidget( this );
1805// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); 1805// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox);
1806 1806
1807#ifdef DESKTOP_VERSION 1807#ifdef DESKTOP_VERSION
1808 topLayout = new QHBoxLayout( this ); 1808 topLayout = new QHBoxLayout( this );
1809 1809
1810 1810
1811 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1811 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1812 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1812 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1813 1813
1814 topLayout->addWidget(mMiniSplitter ); 1814 topLayout->addWidget(mMiniSplitter );
1815 1815
1816 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); 1816 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter );
1817 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1817 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1818 mViewManager = new ViewManager( this, mExtensionBarSplitter ); 1818 mViewManager = new ViewManager( this, mExtensionBarSplitter );
1819 mDetails = new ViewContainer( mMiniSplitter ); 1819 mDetails = new ViewContainer( mMiniSplitter );
1820 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1820 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1821#else 1821#else
1822 if ( QApplication::desktop()->width() > 480 ) { 1822 if ( QApplication::desktop()->width() > 480 ) {
1823 topLayout = new QHBoxLayout( this ); 1823 topLayout = new QHBoxLayout( this );
1824 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1824 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1825 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1825 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1826 } else { 1826 } else {
1827 1827
1828 topLayout = new QHBoxLayout( this ); 1828 topLayout = new QHBoxLayout( this );
1829 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); 1829 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
1830 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1830 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1831 } 1831 }
1832 1832
1833 topLayout->addWidget(mMiniSplitter ); 1833 topLayout->addWidget(mMiniSplitter );
1834 mViewManager = new ViewManager( this, mMiniSplitter ); 1834 mViewManager = new ViewManager( this, mMiniSplitter );
1835 mDetails = new ViewContainer( mMiniSplitter ); 1835 mDetails = new ViewContainer( mMiniSplitter );
1836 1836
1837 1837
1838 mExtensionManager = new ExtensionManager( this, mMiniSplitter ); 1838 mExtensionManager = new ExtensionManager( this, mMiniSplitter );
1839#endif 1839#endif
1840 //eh->hide(); 1840 //eh->hide();
1841 // topLayout->addWidget(mExtensionManager ); 1841 // topLayout->addWidget(mExtensionManager );
1842 1842
1843 1843
1844/*US 1844/*US
1845#ifndef KAB_NOSPLITTER 1845#ifndef KAB_NOSPLITTER
1846 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1846 QHBoxLayout *topLayout = new QHBoxLayout( this );
1847//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1847//US topLayout->setSpacing( KDialogBase::spacingHint() );
1848 topLayout->setSpacing( 10 ); 1848 topLayout->setSpacing( 10 );
1849 1849
1850 mDetailsSplitter = new QSplitter( this ); 1850 mDetailsSplitter = new QSplitter( this );
1851 1851
1852 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1852 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1853 1853
1854 mViewManager = new ViewManager( this, viewSpace ); 1854 mViewManager = new ViewManager( this, viewSpace );
1855 viewSpace->setStretchFactor( mViewManager, 1 ); 1855 viewSpace->setStretchFactor( mViewManager, 1 );
1856 1856
1857 mDetails = new ViewContainer( mDetailsSplitter ); 1857 mDetails = new ViewContainer( mDetailsSplitter );
1858 1858
1859 topLayout->addWidget( mDetailsSplitter ); 1859 topLayout->addWidget( mDetailsSplitter );
1860 topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1860 topLayout->setStretchFactor( mDetailsSplitter, 100 );
1861#else //KAB_NOSPLITTER 1861#else //KAB_NOSPLITTER
1862 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1862 QHBoxLayout *topLayout = new QHBoxLayout( this );
1863//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1863//US topLayout->setSpacing( KDialogBase::spacingHint() );
1864 topLayout->setSpacing( 10 ); 1864 topLayout->setSpacing( 10 );
1865 1865
1866// mDetailsSplitter = new QSplitter( this ); 1866// mDetailsSplitter = new QSplitter( this );
1867 1867
1868 QVBox *viewSpace = new QVBox( this ); 1868 QVBox *viewSpace = new QVBox( this );
1869 1869
1870 mViewManager = new ViewManager( this, viewSpace ); 1870 mViewManager = new ViewManager( this, viewSpace );
1871 viewSpace->setStretchFactor( mViewManager, 1 ); 1871 viewSpace->setStretchFactor( mViewManager, 1 );
1872 1872
1873 mDetails = new ViewContainer( this ); 1873 mDetails = new ViewContainer( this );
1874 1874
1875 topLayout->addWidget( viewSpace ); 1875 topLayout->addWidget( viewSpace );
1876// topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1876// topLayout->setStretchFactor( mDetailsSplitter, 100 );
1877 topLayout->addWidget( mDetails ); 1877 topLayout->addWidget( mDetails );
1878#endif //KAB_NOSPLITTER 1878#endif //KAB_NOSPLITTER
1879*/ 1879*/
1880 1880
1881 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 1881 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
1882 syncManager->setBlockSave(false); 1882 syncManager->setBlockSave(false);
1883 1883
1884 connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 1884 connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
1885 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 1885 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
1886 QString sync_file = sentSyncFile(); 1886 QString sync_file = sentSyncFile();
1887 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1()); 1887 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1());
1888 syncManager->setDefaultFileName( sync_file ); 1888 syncManager->setDefaultFileName( sync_file );
1889 //connect(syncManager , SIGNAL( ), this, SLOT( ) ); 1889 //connect(syncManager , SIGNAL( ), this, SLOT( ) );
1890 1890
1891#endif //KAB_EMBEDDED 1891#endif //KAB_EMBEDDED
1892 initActions(); 1892 initActions();
1893 1893
1894#ifdef KAB_EMBEDDED 1894#ifdef KAB_EMBEDDED
1895 addActionsManually(); 1895 addActionsManually();
1896 //US make sure the export and import menues are initialized before creating the xxPortManager. 1896 //US make sure the export and import menues are initialized before creating the xxPortManager.
1897 mXXPortManager = new XXPortManager( this, this ); 1897 mXXPortManager = new XXPortManager( this, this );
1898 1898
1899 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); 1899 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() );
1900 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); 1900 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget);
1901 // mActionQuit->plug ( mMainWindow->toolBar()); 1901 // mActionQuit->plug ( mMainWindow->toolBar());
1902 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); 1902 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() );
1903 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); 1903 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget);
1904 // mIncSearchWidget->hide(); 1904 // mIncSearchWidget->hide();
1905 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1905 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1906 SLOT( incrementalSearch( const QString& ) ) ); 1906 SLOT( incrementalSearch( const QString& ) ) );
1907 connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) ); 1907 connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) );
1908 connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) ); 1908 connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) );
1909 1909
1910 mJumpButtonBar = new JumpButtonBar( this, this ); 1910 mJumpButtonBar = new JumpButtonBar( this, this );
1911 1911
1912 topLayout->addWidget( mJumpButtonBar ); 1912 topLayout->addWidget( mJumpButtonBar );
1913//US topLayout->setStretchFactor( mJumpButtonBar, 10 ); 1913//US topLayout->setStretchFactor( mJumpButtonBar, 10 );
1914 1914
1915// mMainWindow->getIconToolBar()->raise(); 1915// mMainWindow->getIconToolBar()->raise();
1916 1916
1917#endif //KAB_EMBEDDED 1917#endif //KAB_EMBEDDED
1918 1918
1919} 1919}
1920void KABCore::initActions() 1920void KABCore::initActions()
1921{ 1921{
1922//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 1922//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
1923 1923
1924#ifndef KAB_EMBEDDED 1924#ifndef KAB_EMBEDDED
1925 connect( QApplication::clipboard(), SIGNAL( dataChanged() ), 1925 connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
1926 SLOT( clipboardDataChanged() ) ); 1926 SLOT( clipboardDataChanged() ) );
1927#endif //KAB_EMBEDDED 1927#endif //KAB_EMBEDDED
1928 1928
1929 // file menu 1929 // file menu
1930 1930
1931 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); 1931 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() );
1932 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); 1932 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() );
1933 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager, 1933 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager,
1934 SLOT( printView() ), actionCollection(), "kaddressbook_print" ); 1934 SLOT( printView() ), actionCollection(), "kaddressbook_print" );
1935 1935
1936 1936
1937 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails, 1937 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails,
1938 SLOT( printView() ), actionCollection(), "kaddressbook_print2" ); 1938 SLOT( printView() ), actionCollection(), "kaddressbook_print2" );
1939 1939
1940 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, 1940 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this,
1941 SLOT( save() ), actionCollection(), "file_sync" ); 1941 SLOT( save() ), actionCollection(), "file_sync" );
1942 1942
1943 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, 1943 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this,
1944 SLOT( newContact() ), actionCollection(), "file_new_contact" ); 1944 SLOT( newContact() ), actionCollection(), "file_new_contact" );
1945 1945
1946 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, 1946 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0,
1947 this, SLOT( mailVCard() ), 1947 this, SLOT( mailVCard() ),
1948 actionCollection(), "file_mail_vcard"); 1948 actionCollection(), "file_mail_vcard");
1949 1949
1950 mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this, 1950 mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this,
1951 SLOT( export2phone() ), actionCollection(), 1951 SLOT( export2phone() ), actionCollection(),
1952 "kaddressbook_ex2phone" ); 1952 "kaddressbook_ex2phone" );
1953 1953
1954 mActionBeamVCard = 0; 1954 mActionBeamVCard = 0;
1955 mActionBeam = 0; 1955 mActionBeam = 0;
1956 1956
1957#ifndef DESKTOP_VERSION 1957#ifndef DESKTOP_VERSION
1958 if ( Ir::supported() ) { 1958 if ( Ir::supported() ) {
1959 mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this, 1959 mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this,
1960 SLOT( beamVCard() ), actionCollection(), 1960 SLOT( beamVCard() ), actionCollection(),
1961 "kaddressbook_beam_vcard" ); 1961 "kaddressbook_beam_vcard" );
1962 1962
1963 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, 1963 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this,
1964 SLOT( beamMySelf() ), actionCollection(), 1964 SLOT( beamMySelf() ), actionCollection(),
1965 "kaddressbook_beam_myself" ); 1965 "kaddressbook_beam_myself" );
1966 } 1966 }
1967#endif 1967#endif
1968 1968
1969 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, 1969 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0,
1970 this, SLOT( editContact2() ), 1970 this, SLOT( editContact2() ),
1971 actionCollection(), "file_properties" ); 1971 actionCollection(), "file_properties" );
1972 1972
1973#ifdef KAB_EMBEDDED 1973#ifdef KAB_EMBEDDED
1974 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); 1974 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() );
1975 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, 1975 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0,
1976 mMainWindow, SLOT( exit() ), 1976 mMainWindow, SLOT( exit() ),
1977 actionCollection(), "quit" ); 1977 actionCollection(), "quit" );
1978#endif //KAB_EMBEDDED 1978#endif //KAB_EMBEDDED
1979 1979
1980 // edit menu 1980 // edit menu
1981 if ( mIsPart ) { 1981 if ( mIsPart ) {
1982 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, 1982 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this,
1983 SLOT( copyContacts() ), actionCollection(), 1983 SLOT( copyContacts() ), actionCollection(),
1984 "kaddressbook_copy" ); 1984 "kaddressbook_copy" );
1985 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, 1985 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this,
1986 SLOT( cutContacts() ), actionCollection(), 1986 SLOT( cutContacts() ), actionCollection(),
1987 "kaddressbook_cut" ); 1987 "kaddressbook_cut" );
1988 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, 1988 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this,
1989 SLOT( pasteContacts() ), actionCollection(), 1989 SLOT( pasteContacts() ), actionCollection(),
1990 "kaddressbook_paste" ); 1990 "kaddressbook_paste" );
1991 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, 1991 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this,
1992 SLOT( selectAllContacts() ), actionCollection(), 1992 SLOT( selectAllContacts() ), actionCollection(),
1993 "kaddressbook_select_all" ); 1993 "kaddressbook_select_all" );
1994 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, 1994 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this,
1995 SLOT( undo() ), actionCollection(), 1995 SLOT( undo() ), actionCollection(),
1996 "kaddressbook_undo" ); 1996 "kaddressbook_undo" );
1997 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, 1997 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z,
1998 this, SLOT( redo() ), actionCollection(), 1998 this, SLOT( redo() ), actionCollection(),
1999 "kaddressbook_redo" ); 1999 "kaddressbook_redo" );
2000 } else { 2000 } else {
2001 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); 2001 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() );
2002 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); 2002 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() );
2003 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); 2003 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() );
2004 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); 2004 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() );
2005 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); 2005 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() );
2006 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); 2006 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() );
2007 } 2007 }
2008 2008
2009 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", 2009 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
2010 Key_Delete, this, SLOT( deleteContacts() ), 2010 Key_Delete, this, SLOT( deleteContacts() ),
2011 actionCollection(), "edit_delete" ); 2011 actionCollection(), "edit_delete" );
2012 2012
2013 mActionUndo->setEnabled( false ); 2013 mActionUndo->setEnabled( false );
2014 mActionRedo->setEnabled( false ); 2014 mActionRedo->setEnabled( false );
2015 2015
2016 // settings menu 2016 // settings menu
2017#ifdef KAB_EMBEDDED 2017#ifdef KAB_EMBEDDED
2018//US special menuentry to configure the addressbook resources. On KDE 2018//US special menuentry to configure the addressbook resources. On KDE
2019// you do that through the control center !!! 2019// you do that through the control center !!!
2020 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, 2020 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this,
2021 SLOT( configureResources() ), actionCollection(), 2021 SLOT( configureResources() ), actionCollection(),
2022 "kaddressbook_configure_resources" ); 2022 "kaddressbook_configure_resources" );
2023#endif //KAB_EMBEDDED 2023#endif //KAB_EMBEDDED
2024 2024
2025 if ( mIsPart ) { 2025 if ( mIsPart ) {
2026 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, 2026 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this,
2027 SLOT( openConfigDialog() ), actionCollection(), 2027 SLOT( openConfigDialog() ), actionCollection(),
2028 "kaddressbook_configure" ); 2028 "kaddressbook_configure" );
2029 2029
2030 //US not implemented yet 2030 //US not implemented yet
2031 //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, 2031 //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0,
2032 // this, SLOT( configureKeyBindings() ), actionCollection(), 2032 // this, SLOT( configureKeyBindings() ), actionCollection(),
2033 // "kaddressbook_configure_shortcuts" ); 2033 // "kaddressbook_configure_shortcuts" );
2034#ifdef KAB_EMBEDDED 2034#ifdef KAB_EMBEDDED
2035 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); 2035 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() );
2036 mActionConfigureToolbars->setEnabled( false ); 2036 mActionConfigureToolbars->setEnabled( false );
2037#endif //KAB_EMBEDDED 2037#endif //KAB_EMBEDDED
2038 2038
2039 } else { 2039 } else {
2040 mActionConfigKAddressbook = new KAction( i18n( "&Configure KA/Pi..." ), "configure", 0, this, 2040 mActionConfigKAddressbook = new KAction( i18n( "&Configure KA/Pi..." ), "configure", 0, this,
2041 SLOT( openConfigDialog() ), actionCollection(), 2041 SLOT( openConfigDialog() ), actionCollection(),
2042 "kaddressbook_configure" ); 2042 "kaddressbook_configure" );
2043 mActionConfigGlobal = new KAction( i18n( "Global Settings..." ), "configure", 0, this, 2043 mActionConfigGlobal = new KAction( i18n( "Global Settings..." ), "configure", 0, this,
2044 SLOT( openConfigGlobalDialog() ), actionCollection(), 2044 SLOT( openConfigGlobalDialog() ), actionCollection(),
2045 "kaddressbook_configure" ); 2045 "kaddressbook_configure" );
2046 } 2046 }
2047 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, 2047 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0,
2048 actionCollection(), "options_show_jump_bar" ); 2048 actionCollection(), "options_show_jump_bar" );
2049 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) ); 2049 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) );
2050 2050
2051 mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0, 2051 mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0,
2052 actionCollection(), "options_show_details" ); 2052 actionCollection(), "options_show_details" );
2053 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); 2053 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) );
2054 2054
2055 2055
2056 mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this, 2056 mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this,
2057 SLOT( toggleBeamReceive() ), actionCollection(), 2057 SLOT( toggleBeamReceive() ), actionCollection(),
2058 "kaddressbook_beam_rec" ); 2058 "kaddressbook_beam_rec" );
2059 2059
2060 2060
2061 // misc 2061 // misc
2062 // only enable LDAP lookup if we can handle the protocol 2062 // only enable LDAP lookup if we can handle the protocol
2063#ifndef KAB_EMBEDDED 2063#ifndef KAB_EMBEDDED
2064 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { 2064 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) {
2065 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, 2065 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0,
2066 this, SLOT( openLDAPDialog() ), actionCollection(), 2066 this, SLOT( openLDAPDialog() ), actionCollection(),
2067 "ldap_lookup" ); 2067 "ldap_lookup" );
2068 } 2068 }
2069#else //KAB_EMBEDDED 2069#else //KAB_EMBEDDED
2070 //qDebug("KABCore::initActions() LDAP has to be implemented"); 2070 //qDebug("KABCore::initActions() LDAP has to be implemented");
2071#endif //KAB_EMBEDDED 2071#endif //KAB_EMBEDDED
2072 2072
2073 2073
2074 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, 2074 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this,
2075 SLOT( setWhoAmI() ), actionCollection(), 2075 SLOT( setWhoAmI() ), actionCollection(),
2076 "set_personal" ); 2076 "set_personal" );
2077 2077
2078 2078
2079 mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this, 2079 mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this,
2080 SLOT( setCategories() ), actionCollection(), 2080 SLOT( setCategories() ), actionCollection(),
2081 "edit_set_categories" ); 2081 "edit_set_categories" );
2082 mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this, 2082 mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this,
2083 SLOT( editCategories() ), actionCollection(), 2083 SLOT( editCategories() ), actionCollection(),
2084 "edit__categories" ); 2084 "edit__categories" );
2085 2085
2086 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, 2086 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this,
2087 SLOT( removeVoice() ), actionCollection(), 2087 SLOT( removeVoice() ), actionCollection(),
2088 "remove_voice" ); 2088 "remove_voice" );
2089 mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this, 2089 mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this,
2090 SLOT( setFormattedName() ), actionCollection(), 2090 SLOT( setFormattedName() ), actionCollection(),
2091 "set_formatted" ); 2091 "set_formatted" );
2092 2092
2093 mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, 2093 mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this,
2094 SLOT( manageCategories() ), actionCollection(), 2094 SLOT( manageCategories() ), actionCollection(),
2095 "remove_voice" ); 2095 "remove_voice" );
2096 2096
2097 2097
2098 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, 2098 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this,
2099 SLOT( importFromOL() ), actionCollection(), 2099 SLOT( importFromOL() ), actionCollection(),
2100 "import_OL" ); 2100 "import_OL" );
2101#ifdef KAB_EMBEDDED 2101#ifdef KAB_EMBEDDED
2102 mActionLicence = new KAction( i18n( "Licence" ), 0, 2102 mActionLicence = new KAction( i18n( "Licence" ), 0,
2103 this, SLOT( showLicence() ), actionCollection(), 2103 this, SLOT( showLicence() ), actionCollection(),
2104 "licence_about_data" ); 2104 "licence_about_data" );
2105 mActionFaq = new KAction( i18n( "Faq" ), 0, 2105 mActionFaq = new KAction( i18n( "Faq" ), 0,
2106 this, SLOT( faq() ), actionCollection(), 2106 this, SLOT( faq() ), actionCollection(),
2107 "faq_about_data" ); 2107 "faq_about_data" );
2108 mActionWN = new KAction( i18n( "What's New?" ), 0, 2108 mActionWN = new KAction( i18n( "What's New?" ), 0,
2109 this, SLOT( whatsnew() ), actionCollection(), 2109 this, SLOT( whatsnew() ), actionCollection(),
2110 "wn" ); 2110 "wn" );
2111 2111
2112 2112
2113 2113
2114 mActionStorageHowto = new KAction( i18n( "Storage HowTo" ), 0, 2114 mActionStorageHowto = new KAction( i18n( "Storage HowTo" ), 0,
2115 this, SLOT( storagehowto() ), actionCollection(), 2115 this, SLOT( storagehowto() ), actionCollection(),
2116 "storage" ); 2116 "storage" );
2117 2117
2118 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, 2118 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0,
2119 this, SLOT( synchowto() ), actionCollection(), 2119 this, SLOT( synchowto() ), actionCollection(),
2120 "sync" ); 2120 "sync" );
2121 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, 2121 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0,
2122 this, SLOT( kdesynchowto() ), actionCollection(), 2122 this, SLOT( kdesynchowto() ), actionCollection(),
2123 "kdesync" ); 2123 "kdesync" );
2124 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, 2124 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0,
2125 this, SLOT( multisynchowto() ), actionCollection(), 2125 this, SLOT( multisynchowto() ), actionCollection(),
2126 "multisync" ); 2126 "multisync" );
2127 2127
2128 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, 2128 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
2129 this, SLOT( createAboutData() ), actionCollection(), 2129 this, SLOT( createAboutData() ), actionCollection(),
2130 "kaddressbook_about_data" ); 2130 "kaddressbook_about_data" );
2131#endif //KAB_EMBEDDED 2131#endif //KAB_EMBEDDED
2132 2132
2133 clipboardDataChanged(); 2133 clipboardDataChanged();
2134 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2134 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2135 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2135 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2136} 2136}
2137 2137
2138//US we need this function, to plug all actions into the correct menues. 2138//US we need this function, to plug all actions into the correct menues.
2139// KDE uses a XML format to plug the actions, but we work her without this overhead. 2139// KDE uses a XML format to plug the actions, but we work her without this overhead.
2140void KABCore::addActionsManually() 2140void KABCore::addActionsManually()
2141{ 2141{
2142//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 2142//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
2143 2143
2144#ifdef KAB_EMBEDDED 2144#ifdef KAB_EMBEDDED
2145 QPopupMenu *fileMenu = new QPopupMenu( this ); 2145 QPopupMenu *fileMenu = new QPopupMenu( this );
2146 QPopupMenu *editMenu = new QPopupMenu( this ); 2146 QPopupMenu *editMenu = new QPopupMenu( this );
2147 QPopupMenu *helpMenu = new QPopupMenu( this ); 2147 QPopupMenu *helpMenu = new QPopupMenu( this );
2148 2148
2149 KToolBar* tb = mMainWindow->toolBar(); 2149 KToolBar* tb = mMainWindow->toolBar();
2150 mMainWindow->setToolBarsMovable (false ); 2150 mMainWindow->setToolBarsMovable (false );
2151#ifndef DESKTOP_VERSION 2151#ifndef DESKTOP_VERSION
2152 if ( KABPrefs::instance()->mFullMenuBarVisible ) { 2152 if ( KABPrefs::instance()->mFullMenuBarVisible ) {
2153#endif 2153#endif
2154 QMenuBar* mb = mMainWindow->menuBar(); 2154 QMenuBar* mb = mMainWindow->menuBar();
2155 2155
2156 //US setup menubar. 2156 //US setup menubar.
2157 //Disable the following block if you do not want to have a menubar. 2157 //Disable the following block if you do not want to have a menubar.
2158 mb->insertItem( i18n("&File"), fileMenu ); 2158 mb->insertItem( i18n("&File"), fileMenu );
2159 mb->insertItem( i18n("&Edit"), editMenu ); 2159 mb->insertItem( i18n("&Edit"), editMenu );
2160 mb->insertItem( i18n("&View"), viewMenu ); 2160 mb->insertItem( i18n("&View"), viewMenu );
2161 mb->insertItem( i18n("&Settings"), settingsMenu ); 2161 mb->insertItem( i18n("&Settings"), settingsMenu );
2162#ifdef DESKTOP_VERSION 2162#ifdef DESKTOP_VERSION
2163 mb->insertItem( i18n("Synchronize"), syncMenu ); 2163 mb->insertItem( i18n("Synchronize"), syncMenu );
2164#else 2164#else
2165 mb->insertItem( i18n("Sync"), syncMenu ); 2165 mb->insertItem( i18n("Sync"), syncMenu );
2166#endif 2166#endif
2167 //mb->insertItem( i18n("&Change"), changeMenu ); 2167 //mb->insertItem( i18n("&Change"), changeMenu );
2168 mb->insertItem( i18n("&Help"), helpMenu ); 2168 mb->insertItem( i18n("&Help"), helpMenu );
2169 mIncSearchWidget = new IncSearchWidget( tb ); 2169 mIncSearchWidget = new IncSearchWidget( tb );
2170 // tb->insertWidget(-1, 0, mIncSearchWidget); 2170 // tb->insertWidget(-1, 0, mIncSearchWidget);
2171#ifndef DESKTOP_VERSION 2171#ifndef DESKTOP_VERSION
2172 } else { 2172 } else {
2173 //US setup toolbar 2173 //US setup toolbar
2174 QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); 2174 QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
2175 QPopupMenu *popupBarTB = new QPopupMenu( this ); 2175 QPopupMenu *popupBarTB = new QPopupMenu( this );
2176 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); 2176 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB);
2177 tb->insertWidget(-1, 0, menuBarTB); 2177 tb->insertWidget(-1, 0, menuBarTB);
2178 mIncSearchWidget = new IncSearchWidget( tb ); 2178 mIncSearchWidget = new IncSearchWidget( tb );
2179 tb->enableMoving(false); 2179 tb->enableMoving(false);
2180 popupBarTB->insertItem( i18n("&File"), fileMenu ); 2180 popupBarTB->insertItem( i18n("&File"), fileMenu );
2181 popupBarTB->insertItem( i18n("&Edit"), editMenu ); 2181 popupBarTB->insertItem( i18n("&Edit"), editMenu );
2182 popupBarTB->insertItem( i18n("&View"), viewMenu ); 2182 popupBarTB->insertItem( i18n("&View"), viewMenu );
2183 popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); 2183 popupBarTB->insertItem( i18n("&Settings"), settingsMenu );
2184 popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); 2184 popupBarTB->insertItem( i18n("Synchronize"), syncMenu );
2185 mViewManager->getFilterAction()->plug ( popupBarTB); 2185 mViewManager->getFilterAction()->plug ( popupBarTB);
2186 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); 2186 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu );
2187 popupBarTB->insertItem( i18n("&Help"), helpMenu ); 2187 popupBarTB->insertItem( i18n("&Help"), helpMenu );
2188 if (QApplication::desktop()->width() > 320 ) { 2188 if (QApplication::desktop()->width() > 320 ) {
2189 // mViewManager->getFilterAction()->plug ( tb); 2189 // mViewManager->getFilterAction()->plug ( tb);
2190 } 2190 }
2191 } 2191 }
2192#endif 2192#endif
2193 mIncSearchWidget->setSize(); 2193 mIncSearchWidget->setSize();
2194 // mActionQuit->plug ( mMainWindow->toolBar()); 2194 // mActionQuit->plug ( mMainWindow->toolBar());
2195 2195
2196 2196
2197 2197
2198 //US Now connect the actions with the menue entries. 2198 //US Now connect the actions with the menue entries.
2199#ifdef DESKTOP_VERSION 2199#ifdef DESKTOP_VERSION
2200 mActionPrint->plug( fileMenu ); 2200 mActionPrint->plug( fileMenu );
2201 mActionPrintDetails->plug( fileMenu ); 2201 mActionPrintDetails->plug( fileMenu );
2202 fileMenu->insertSeparator(); 2202 fileMenu->insertSeparator();
2203#endif 2203#endif
2204 mActionMail->plug( fileMenu ); 2204 mActionMail->plug( fileMenu );
2205 fileMenu->insertSeparator(); 2205 fileMenu->insertSeparator();
2206 2206
2207 mActionNewContact->plug( editMenu ); 2207 mActionNewContact->plug( editMenu );
2208 mActionNewContact->plug( tb ); 2208 mActionNewContact->plug( tb );
2209 2209
2210 mActionEditAddressee->plug( editMenu ); 2210 mActionEditAddressee->plug( editMenu );
2211 editMenu->insertSeparator(); 2211 editMenu->insertSeparator();
2212 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || 2212 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) ||
2213 // (!KABPrefs::instance()->mMultipleViewsAtOnce )) 2213 // (!KABPrefs::instance()->mMultipleViewsAtOnce ))
2214 mActionEditAddressee->plug( tb ); 2214 mActionEditAddressee->plug( tb );
2215 2215
2216 // fileMenu->insertSeparator(); 2216 // fileMenu->insertSeparator();
2217 mActionSave->plug( fileMenu ); 2217 mActionSave->plug( fileMenu );
2218 fileMenu->insertItem( "&Import", ImportMenu ); 2218 fileMenu->insertItem( "&Import", ImportMenu );
2219 fileMenu->insertItem( "&Export", ExportMenu ); 2219 fileMenu->insertItem( "&Export", ExportMenu );
2220 editMenu->insertItem( i18n("&Change"), changeMenu ); 2220 editMenu->insertItem( i18n("&Change"), changeMenu );
2221 editMenu->insertSeparator(); 2221 editMenu->insertSeparator();
2222#ifndef DESKTOP_VERSION 2222#ifndef DESKTOP_VERSION
2223 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); 2223 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu );
2224#endif 2224#endif
2225#if 0 2225#if 0
2226 // PENDING fix MailVCard 2226 // PENDING fix MailVCard
2227 fileMenu->insertSeparator(); 2227 fileMenu->insertSeparator();
2228 mActionMailVCard->plug( fileMenu ); 2228 mActionMailVCard->plug( fileMenu );
2229#endif 2229#endif
2230#ifndef DESKTOP_VERSION 2230#ifndef DESKTOP_VERSION
2231 if ( Ir::supported() ) mActionBR->plug( beamMenu ); 2231 if ( Ir::supported() ) mActionBR->plug( beamMenu );
2232 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); 2232 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu );
2233 if ( Ir::supported() ) mActionBeam->plug( beamMenu ); 2233 if ( Ir::supported() ) mActionBeam->plug( beamMenu );
2234#endif 2234#endif
2235 fileMenu->insertSeparator(); 2235 fileMenu->insertSeparator();
2236 mActionQuit->plug( fileMenu ); 2236 mActionQuit->plug( fileMenu );
2237#ifdef _OL_IMPORT_ 2237#ifdef _OL_IMPORT_
2238 mActionImportOL->plug( ImportMenu ); 2238 mActionImportOL->plug( ImportMenu );
2239#endif 2239#endif
2240 // edit menu 2240 // edit menu
2241 mActionUndo->plug( editMenu ); 2241 mActionUndo->plug( editMenu );
2242 mActionRedo->plug( editMenu ); 2242 mActionRedo->plug( editMenu );
2243 editMenu->insertSeparator(); 2243 editMenu->insertSeparator();
2244 mActionCut->plug( editMenu ); 2244 mActionCut->plug( editMenu );
2245 mActionCopy->plug( editMenu ); 2245 mActionCopy->plug( editMenu );
2246 mActionPaste->plug( editMenu ); 2246 mActionPaste->plug( editMenu );
2247 mActionDelete->plug( editMenu ); 2247 mActionDelete->plug( editMenu );
2248 editMenu->insertSeparator(); 2248 editMenu->insertSeparator();
2249 mActionSelectAll->plug( editMenu ); 2249 mActionSelectAll->plug( editMenu );
2250 2250
2251 mActionSetFormattedName->plug( changeMenu ); 2251 mActionSetFormattedName->plug( changeMenu );
2252 mActionRemoveVoice->plug( changeMenu ); 2252 mActionRemoveVoice->plug( changeMenu );
2253 // settingsmings menu 2253 // settingsmings menu
2254//US special menuentry to configure the addressbook resources. On KDE 2254//US special menuentry to configure the addressbook resources. On KDE
2255// you do that through the control center !!! 2255// you do that through the control center !!!
2256 // settingsMenu->insertSeparator(); 2256 // settingsMenu->insertSeparator();
2257 2257
2258 mActionConfigKAddressbook->plug( settingsMenu, 0 ); 2258 mActionConfigKAddressbook->plug( settingsMenu, 0 );
2259 mActionConfigGlobal->plug( settingsMenu, 1 ); 2259 mActionConfigGlobal->plug( settingsMenu, 1 );
2260 mActionConfigResources->plug( settingsMenu,2 ); 2260 mActionConfigResources->plug( settingsMenu,2 );
2261 settingsMenu->insertSeparator(3); 2261 settingsMenu->insertSeparator(3);
2262 2262
2263 if ( mIsPart ) { 2263 if ( mIsPart ) {
2264 //US not implemented yet 2264 //US not implemented yet
2265 //mActionConfigShortcuts->plug( settingsMenu ); 2265 //mActionConfigShortcuts->plug( settingsMenu );
2266 //mActionConfigureToolbars->plug( settingsMenu ); 2266 //mActionConfigureToolbars->plug( settingsMenu );
2267 2267
2268 } else { 2268 } else {
2269 //US not implemented yet 2269 //US not implemented yet
2270 //mActionKeyBindings->plug( settingsMenu ); 2270 //mActionKeyBindings->plug( settingsMenu );
2271 } 2271 }
2272 2272
2273 mActionEditCategories->plug( settingsMenu ); 2273 mActionEditCategories->plug( settingsMenu );
2274 mActionManageCategories->plug( settingsMenu ); 2274 mActionManageCategories->plug( settingsMenu );
2275 mActionJumpBar->plug( viewMenu,0 ); 2275 mActionJumpBar->plug( viewMenu,0 );
2276 mActionDetails->plug( viewMenu,0 ); 2276 mActionDetails->plug( viewMenu,0 );
2277 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) 2277 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
2278 mActionDetails->plug( tb ); 2278 mActionDetails->plug( tb );
2279 settingsMenu->insertSeparator(); 2279 settingsMenu->insertSeparator();
2280#ifndef DESKTOP_VERSION 2280#ifndef DESKTOP_VERSION
2281 if ( Ir::supported() ) mActionBR->plug(settingsMenu ); 2281 if ( Ir::supported() ) mActionBR->plug(settingsMenu );
2282 settingsMenu->insertSeparator(); 2282 settingsMenu->insertSeparator();
2283#endif 2283#endif
2284 2284
2285 mActionWhoAmI->plug( settingsMenu ); 2285 mActionWhoAmI->plug( settingsMenu );
2286 //mActionEditCategories->plug( changeMenu ); 2286 //mActionEditCategories->plug( changeMenu );
2287 mActionCategories->plug( changeMenu ); 2287 mActionCategories->plug( changeMenu );
2288 //mActionManageCategories->plug( changeMenu ); 2288 //mActionManageCategories->plug( changeMenu );
2289 2289
2290 //mActionCategories->plug( settingsMenu ); 2290 //mActionCategories->plug( settingsMenu );
2291 2291
2292 2292
2293 mActionWN->plug( helpMenu ); 2293 mActionWN->plug( helpMenu );
2294 mActionStorageHowto->plug( helpMenu ); 2294 mActionStorageHowto->plug( helpMenu );
2295 mActionSyncHowto->plug( helpMenu ); 2295 mActionSyncHowto->plug( helpMenu );
2296 mActionKdeSyncHowto->plug( helpMenu ); 2296 mActionKdeSyncHowto->plug( helpMenu );
2297 mActionMultiSyncHowto->plug( helpMenu ); 2297 mActionMultiSyncHowto->plug( helpMenu );
2298 mActionFaq->plug( helpMenu ); 2298 mActionFaq->plug( helpMenu );
2299 mActionLicence->plug( helpMenu ); 2299 mActionLicence->plug( helpMenu );
2300 mActionAboutKAddressbook->plug( helpMenu ); 2300 mActionAboutKAddressbook->plug( helpMenu );
2301 2301
2302 if (KGlobal::getDesktopSize() > KGlobal::Small ) { 2302 if (KGlobal::getDesktopSize() > KGlobal::Small ) {
2303 2303
2304 mActionSave->plug( tb ); 2304 mActionSave->plug( tb );
2305 mViewManager->getFilterAction()->plug ( tb); 2305 mViewManager->getFilterAction()->plug ( tb);
2306 //LR hide filteraction on started in 480x640 2306 //LR hide filteraction on started in 480x640
2307 if (QApplication::desktop()->width() == 480 ) { 2307 if (QApplication::desktop()->width() == 480 ) {
2308 mViewManager->getFilterAction()->setComboWidth( 0 ); 2308 mViewManager->getFilterAction()->setComboWidth( 0 );
2309 } 2309 }
2310 mActionUndo->plug( tb ); 2310 mActionUndo->plug( tb );
2311 mActionDelete->plug( tb ); 2311 mActionDelete->plug( tb );
2312 mActionRedo->plug( tb ); 2312 mActionRedo->plug( tb );
2313 } else { 2313 } else {
2314 mActionSave->plug( tb ); 2314 mActionSave->plug( tb );
2315 tb->enableMoving(false); 2315 tb->enableMoving(false);
2316 } 2316 }
2317 //mActionQuit->plug ( tb ); 2317 //mActionQuit->plug ( tb );
2318 //tb->insertWidget(-1, 0, mIncSearchWidget, 6); 2318 //tb->insertWidget(-1, 0, mIncSearchWidget, 6);
2319 2319
2320 //US link the searchwidget first to this. 2320 //US link the searchwidget first to this.
2321 // The real linkage to the toolbar happens later. 2321 // The real linkage to the toolbar happens later.
2322//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); 2322//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
2323//US tb->insertItem( mIncSearchWidget ); 2323//US tb->insertItem( mIncSearchWidget );
2324/*US 2324/*US
2325 mIncSearchWidget = new IncSearchWidget( tb ); 2325 mIncSearchWidget = new IncSearchWidget( tb );
2326 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 2326 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
2327 SLOT( incrementalSearch( const QString& ) ) ); 2327 SLOT( incrementalSearch( const QString& ) ) );
2328 2328
2329 mJumpButtonBar = new JumpButtonBar( this, this ); 2329 mJumpButtonBar = new JumpButtonBar( this, this );
2330 2330
2331//US topLayout->addWidget( mJumpButtonBar ); 2331//US topLayout->addWidget( mJumpButtonBar );
2332 this->layout()->add( mJumpButtonBar ); 2332 this->layout()->add( mJumpButtonBar );
2333*/ 2333*/
2334 2334
2335#endif //KAB_EMBEDDED 2335#endif //KAB_EMBEDDED
2336 2336
2337 mActionExport2phone->plug( ExportMenu ); 2337 mActionExport2phone->plug( ExportMenu );
2338 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); 2338 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) );
2339 syncManager->fillSyncMenu(); 2339 syncManager->fillSyncMenu();
2340 2340
2341} 2341}
2342void KABCore::showLicence() 2342void KABCore::showLicence()
2343{ 2343{
2344 KApplication::showLicence(); 2344 KApplication::showLicence();
2345} 2345}
2346 2346
2347void KABCore::manageCategories( ) 2347void KABCore::manageCategories( )
2348{ 2348{
2349 KABCatPrefs* cp = new KABCatPrefs(); 2349 KABCatPrefs* cp = new KABCatPrefs();
2350 cp->show(); 2350 cp->show();
2351 int w =cp->sizeHint().width() ; 2351 int w =cp->sizeHint().width() ;
2352 int h = cp->sizeHint().height() ; 2352 int h = cp->sizeHint().height() ;
2353 int dw = QApplication::desktop()->width(); 2353 int dw = QApplication::desktop()->width();
2354 int dh = QApplication::desktop()->height(); 2354 int dh = QApplication::desktop()->height();
2355 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2355 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2356 if ( !cp->exec() ) { 2356 if ( !cp->exec() ) {
2357 delete cp; 2357 delete cp;
2358 return; 2358 return;
2359 } 2359 }
2360 int count = 0; 2360 int count = 0;
2361 int cc = 0; 2361 int cc = 0;
2362 message( i18n("Please wait, processing categories...")); 2362 message( i18n("Please wait, processing categories..."));
2363 if ( cp->addCat() ) { 2363 if ( cp->addCat() ) {
2364 KABC::AddressBook::Iterator it; 2364 KABC::AddressBook::Iterator it;
2365 QStringList catList = KABPrefs::instance()->mCustomCategories; 2365 QStringList catList = KABPrefs::instance()->mCustomCategories;
2366 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2366 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2367 ++cc; 2367 ++cc;
2368 if ( cc %10 == 0) 2368 if ( cc %10 == 0)
2369 message(i18n("Processing contact #%1").arg(cc)); 2369 message(i18n("Processing contact #%1").arg(cc));
2370 QStringList catIncList = (*it).categories(); 2370 QStringList catIncList = (*it).categories();
2371 int i; 2371 int i;
2372 for( i = 0; i< catIncList.count(); ++i ) { 2372 for( i = 0; i< catIncList.count(); ++i ) {
2373 if ( !catList.contains (catIncList[i])) { 2373 if ( !catList.contains (catIncList[i])) {
2374 catList.append( catIncList[i] ); 2374 catList.append( catIncList[i] );
2375 //qDebug("add cat %s ", catIncList[i].latin1()); 2375 //qDebug("add cat %s ", catIncList[i].latin1());
2376 ++count; 2376 ++count;
2377 } 2377 }
2378 } 2378 }
2379 } 2379 }
2380 catList.sort(); 2380 catList.sort();
2381 KABPrefs::instance()->mCustomCategories = catList; 2381 KABPrefs::instance()->mCustomCategories = catList;
2382 KABPrefs::instance()->writeConfig(); 2382 KABPrefs::instance()->writeConfig();
2383 message(QString::number( count )+ i18n(" categories added to list! ")); 2383 message(QString::number( count )+ i18n(" categories added to list! "));
2384 } else { 2384 } else {
2385 QStringList catList = KABPrefs::instance()->mCustomCategories; 2385 QStringList catList = KABPrefs::instance()->mCustomCategories;
2386 QStringList catIncList; 2386 QStringList catIncList;
2387 QStringList newCatList; 2387 QStringList newCatList;
2388 KABC::AddressBook::Iterator it; 2388 KABC::AddressBook::Iterator it;
2389 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2389 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2390 ++cc; 2390 ++cc;
2391 if ( cc %10 == 0) 2391 if ( cc %10 == 0)
2392 message(i18n("Processing contact #%1").arg(cc)); 2392 message(i18n("Processing contact #%1").arg(cc));
2393 QStringList catIncList = (*it).categories(); 2393 QStringList catIncList = (*it).categories();
2394 int i; 2394 int i;
2395 if ( catIncList.count() ) { 2395 if ( catIncList.count() ) {
2396 newCatList.clear(); 2396 newCatList.clear();
2397 for( i = 0; i< catIncList.count(); ++i ) { 2397 for( i = 0; i< catIncList.count(); ++i ) {
2398 if ( catList.contains (catIncList[i])) { 2398 if ( catList.contains (catIncList[i])) {
2399 newCatList.append( catIncList[i] ); 2399 newCatList.append( catIncList[i] );
2400 } 2400 }
2401 } 2401 }
2402 newCatList.sort(); 2402 newCatList.sort();
2403 (*it).setCategories( newCatList ); 2403 (*it).setCategories( newCatList );
2404 mAddressBook->insertAddressee( (*it) ); 2404 mAddressBook->insertAddressee( (*it) );
2405 } 2405 }
2406 } 2406 }
2407 setModified( true ); 2407 setModified( true );
2408 mViewManager->refreshView(); 2408 mViewManager->refreshView();
2409 message( i18n("Removing categories done!")); 2409 message( i18n("Removing categories done!"));
2410 } 2410 }
2411 delete cp; 2411 delete cp;
2412} 2412}
2413void KABCore::removeVoice() 2413void KABCore::removeVoice()
2414{ 2414{
2415 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 ) 2415 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 )
2416 return; 2416 return;
2417 XXPortSelectDialog dlg( this, false, this ); 2417 XXPortSelectDialog dlg( this, false, this );
2418 if ( !dlg.exec() ) 2418 if ( !dlg.exec() )
2419 return; 2419 return;
2420 mAddressBook->setUntagged(); 2420 mAddressBook->setUntagged();
2421 dlg.tagSelected(); 2421 dlg.tagSelected();
2422 message(i18n("Removing voice..."), false ); 2422 message(i18n("Removing voice..."), false );
2423 KABC::AddressBook::Iterator it; 2423 KABC::AddressBook::Iterator it;
2424 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2424 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2425 if ( (*it).tagged() ) { 2425 if ( (*it).tagged() ) {
2426 (*it).removeVoice(); 2426 (*it).removeVoice();
2427 } 2427 }
2428 } 2428 }
2429 message(i18n("Refreshing view...") ); 2429 message(i18n("Refreshing view...") );
2430 qApp->processEvents(); 2430 qApp->processEvents();
2431 mViewManager->refreshView( "" ); 2431 mViewManager->refreshView( "" );
2432 Addressee add; 2432 Addressee add;
2433 mDetails->setAddressee( add ); 2433 mDetails->setAddressee( add );
2434 message(i18n("Remove voice completed!") ); 2434 message(i18n("Remove voice completed!") );
2435 2435
2436 2436
2437 2437
2438} 2438}
2439 2439
2440void KABCore::setFormattedName() 2440void KABCore::setFormattedName()
2441{ 2441{
2442 KABFormatPrefs setpref; 2442 KABFormatPrefs setpref;
2443 if ( !setpref.exec() ) { 2443 if ( !setpref.exec() ) {
2444 return; 2444 return;
2445 } 2445 }
2446 XXPortSelectDialog dlg( this, false, this ); 2446 XXPortSelectDialog dlg( this, false, this );
2447 if ( !dlg.exec() ) 2447 if ( !dlg.exec() )
2448 return; 2448 return;
2449 mAddressBook->setUntagged(); 2449 mAddressBook->setUntagged();
2450 dlg.tagSelected(); 2450 dlg.tagSelected();
2451 int count = 0; 2451 int count = 0;
2452 KABC::AddressBook::Iterator it; 2452 KABC::AddressBook::Iterator it;
2453 bool modified = false; 2453 bool modified = false;
2454 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2454 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2455 if ( (*it).tagged() ) { 2455 if ( (*it).tagged() ) {
2456 if ( (*it).uid().left( 2 ) == "la" ) 2456 if ( (*it).uid().left( 2 ) == "la" )
2457 if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) 2457 if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") )
2458 continue; 2458 continue;
2459 ++count; 2459 ++count;
2460 if ( count %10 == 0 ) 2460 if ( count %10 == 0 )
2461 message(i18n("Changing contact #%1").arg( count ) ); 2461 message(i18n("Changing contact #%1").arg( count ) );
2462 qApp->processEvents(); 2462 qApp->processEvents();
2463 QString fName; 2463 QString fName;
2464 if ( setpref.simple->isChecked() ) 2464 if ( setpref.simple->isChecked() )
2465 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); 2465 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName );
2466 else if ( setpref.full->isChecked() ) 2466 else if ( setpref.full->isChecked() )
2467 fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); 2467 fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName );
2468 else if ( setpref.reverse->isChecked() ) 2468 else if ( setpref.reverse->isChecked() )
2469 fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); 2469 fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName );
2470 else 2470 else
2471 fName = (*it).organization(); 2471 fName = (*it).organization();
2472 if ( setpref.setCompany->isChecked() ) 2472 if ( setpref.setCompany->isChecked() )
2473 if ( fName.isEmpty() || fName =="," ) 2473 if ( fName.isEmpty() || fName =="," )
2474 fName = (*it).organization(); 2474 fName = (*it).organization();
2475 (*it).setFormattedName( fName ); 2475 (*it).setFormattedName( fName );
2476 (*it).setChanged( true ); 2476 (*it).setChanged( true );
2477 modified = true; 2477 modified = true;
2478 (*it).setRevision( QDateTime::currentDateTime() ); 2478 (*it).setRevision( QDateTime::currentDateTime() );
2479 } 2479 }
2480 } 2480 }
2481 message(i18n("Refreshing view...") ); 2481 message(i18n("Refreshing view...") );
2482 qApp->processEvents(); 2482 qApp->processEvents();
2483 if ( modified ) 2483 if ( modified )
2484 setModified( true ); 2484 setModified( true );
2485 Addressee add; 2485 Addressee add;
2486 mDetails->setAddressee( add ); 2486 mDetails->setAddressee( add );
2487 if ( count == 0 ) 2487 if ( count == 0 )
2488 message(i18n("No contact changed!") ); 2488 message(i18n("No contact changed!") );
2489 else 2489 else
2490 message(i18n("%1 contacts changed!").arg( count ) ); 2490 message(i18n("%1 contacts changed!").arg( count ) );
2491} 2491}
2492 2492
2493void KABCore::clipboardDataChanged() 2493void KABCore::clipboardDataChanged()
2494{ 2494{
2495 2495
2496 if ( mReadWrite ) 2496 if ( mReadWrite )
2497 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); 2497 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() );
2498 2498
2499} 2499}
2500 2500
2501void KABCore::updateActionMenu() 2501void KABCore::updateActionMenu()
2502{ 2502{
2503 UndoStack *undo = UndoStack::instance(); 2503 UndoStack *undo = UndoStack::instance();
2504 RedoStack *redo = RedoStack::instance(); 2504 RedoStack *redo = RedoStack::instance();
2505 2505
2506 if ( undo->isEmpty() ) 2506 if ( undo->isEmpty() )
2507 mActionUndo->setText( i18n( "Undo" ) ); 2507 mActionUndo->setText( i18n( "Undo" ) );
2508 else 2508 else
2509 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); 2509 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) );
2510 2510
2511 mActionUndo->setEnabled( !undo->isEmpty() ); 2511 mActionUndo->setEnabled( !undo->isEmpty() );
2512 2512
2513 if ( !redo->top() ) 2513 if ( !redo->top() )
2514 mActionRedo->setText( i18n( "Redo" ) ); 2514 mActionRedo->setText( i18n( "Redo" ) );
2515 else 2515 else
2516 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); 2516 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) );
2517 2517
2518 mActionRedo->setEnabled( !redo->isEmpty() ); 2518 mActionRedo->setEnabled( !redo->isEmpty() );
2519} 2519}
2520 2520
2521void KABCore::configureKeyBindings() 2521void KABCore::configureKeyBindings()
2522{ 2522{
2523#ifndef KAB_EMBEDDED 2523#ifndef KAB_EMBEDDED
2524 KKeyDialog::configure( actionCollection(), true ); 2524 KKeyDialog::configure( actionCollection(), true );
2525#else //KAB_EMBEDDED 2525#else //KAB_EMBEDDED
2526 qDebug("KABCore::configureKeyBindings() not implemented"); 2526 qDebug("KABCore::configureKeyBindings() not implemented");
2527#endif //KAB_EMBEDDED 2527#endif //KAB_EMBEDDED
2528} 2528}
2529 2529
2530#ifdef KAB_EMBEDDED 2530#ifdef KAB_EMBEDDED
2531void KABCore::configureResources() 2531void KABCore::configureResources()
2532{ 2532{
2533 KRES::KCMKResources dlg( this, "" , 0 ); 2533 KRES::KCMKResources dlg( this, "" , 0 );
2534 2534
2535 if ( !dlg.exec() ) 2535 if ( !dlg.exec() )
2536 return; 2536 return;
2537 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); 2537 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") );
2538} 2538}
2539#endif //KAB_EMBEDDED 2539#endif //KAB_EMBEDDED
2540 2540
2541 2541
2542/* this method will be called through the QCop interface from Ko/Pi to select addresses 2542/* this method will be called through the QCop interface from Ko/Pi to select addresses
2543 * for the attendees list of an event. 2543 * for the attendees list of an event.
2544 */ 2544 */
2545void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) 2545void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
2546{ 2546{
2547 2547
2548 bool ok = false; 2548 bool ok = false;
2549 mEmailSourceChannel = sourceChannel; 2549 mEmailSourceChannel = sourceChannel;
2550 mEmailSourceUID = uid; 2550 mEmailSourceUID = uid;
2551 callContactdialog(); 2551 callContactdialog();
2552#if 0 2552#if 0
2553 int wid = uid.toInt( &ok ); 2553 int wid = uid.toInt( &ok );
2554 qDebug("UID %s ", uid.latin1()); 2554 qDebug("UID %s ", uid.latin1());
2555 if ( ok ) { 2555 if ( ok ) {
2556 if ( wid != QApplication::desktop()->width() ) { 2556 if ( wid != QApplication::desktop()->width() ) {
2557 qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); 2557 qDebug("KA/Pi: Request from different desktop geometry. Resizing ...");
2558 message( i18n("Resizing, please wait...") ); 2558 message( i18n("Resizing, please wait...") );
2559 mMainWindow->showMinimized(); 2559 mMainWindow->showMinimized();
2560 /* 2560 /*
2561 { 2561 {
2562 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); 2562 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2563 } 2563 }
2564 */ 2564 */
2565 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) ); 2565 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) );
2566 return; 2566 return;
2567 } 2567 }
2568 2568
2569 } else { 2569 } else {
2570 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); 2570 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid ");
2571 } 2571 }
2572 callContactdialog(); 2572 callContactdialog();
2573 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); 2573 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2574#endif 2574#endif
2575} 2575}
2576void KABCore::resizeAndCallContactdialog() 2576void KABCore::resizeAndCallContactdialog()
2577{ 2577{
2578 updateMainWindow(); 2578 updateMainWindow();
2579 QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) ); 2579 QTimer::singleShot( 100,this, SLOT ( callContactdialog() ) );
2580} 2580}
2581 2581
2582void KABCore::callContactdialog() 2582void KABCore::callContactdialog()
2583{ 2583{
2584 QStringList nameList; 2584 QStringList nameList;
2585 QStringList emailList; 2585 QStringList emailList;
2586 QStringList uidList; 2586 QStringList uidList;
2587 qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() ); 2587 qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() );
2588 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 2588 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
2589 uint i=0; 2589 uint i=0;
2590 for (i=0; i < list.count(); i++) 2590 for (i=0; i < list.count(); i++)
2591 { 2591 {
2592 nameList.append(list[i].realName()); 2592 nameList.append(list[i].realName());
2593 emailList.append(list[i].preferredEmail()); 2593 emailList.append(list[i].preferredEmail());
2594 uidList.append(list[i].uid()); 2594 uidList.append(list[i].uid());
2595 } 2595 }
2596 QString uid = mEmailSourceUID; 2596 QString uid = mEmailSourceUID;
2597 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); 2597 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
2598 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList); 2598 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList);
2599 2599
2600} 2600}
2601/* this method will be called through the QCop interface from Ko/Pi to select birthdays 2601/* this method will be called through the QCop interface from Ko/Pi to select birthdays
2602 * to put them into the calendar. 2602 * to put them into the calendar.
2603 */ 2603 */
2604void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) 2604void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid)
2605{ 2605{
2606 // qDebug("KABCore::requestForBirthdayList"); 2606 // qDebug("KABCore::requestForBirthdayList");
2607 QStringList birthdayList; 2607 QStringList birthdayList;
2608 QStringList anniversaryList; 2608 QStringList anniversaryList;
2609 QStringList realNameList; 2609 QStringList realNameList;
2610 QStringList preferredEmailList; 2610 QStringList preferredEmailList;
2611 QStringList assembledNameList; 2611 QStringList assembledNameList;
2612 QStringList uidList; 2612 QStringList uidList;
2613 2613
2614 KABC::AddressBook::Iterator it; 2614 KABC::AddressBook::Iterator it;
2615 2615
2616 int count = 0; 2616 int count = 0;
2617 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2617 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2618 ++count; 2618 ++count;
2619 } 2619 }
2620 QProgressBar bar(count,0 ); 2620 QProgressBar bar(count,0 );
2621 int w = 300; 2621 int w = 300;
2622 if ( QApplication::desktop()->width() < 320 ) 2622 if ( QApplication::desktop()->width() < 320 )
2623 w = 220; 2623 w = 220;
2624 int h = bar.sizeHint().height() ; 2624 int h = bar.sizeHint().height() ;
2625 int dw = QApplication::desktop()->width(); 2625 int dw = QApplication::desktop()->width();
2626 int dh = QApplication::desktop()->height(); 2626 int dh = QApplication::desktop()->height();
2627 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2627 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2628 bar.show(); 2628 bar.show();
2629 bar.setCaption (i18n("Collecting birthdays - close to abort!") ); 2629 bar.setCaption (i18n("Collecting birthdays - close to abort!") );
2630 qApp->processEvents(); 2630 qApp->processEvents();
2631 2631
2632 QDate bday; 2632 QDate bday;
2633 QString anni; 2633 QString anni;
2634 QString formattedbday; 2634 QString formattedbday;
2635 2635
2636 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) 2636 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it )
2637 { 2637 {
2638 if ( ! bar.isVisible() ) 2638 if ( ! bar.isVisible() )
2639 return; 2639 return;
2640 bar.setProgress( count++ ); 2640 bar.setProgress( count++ );
2641 qApp->processEvents(); 2641 qApp->processEvents();
2642 bday = (*it).birthday().date(); 2642 bday = (*it).birthday().date();
2643 anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); 2643 anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" );
2644 2644
2645 if ( bday.isValid() || !anni.isEmpty()) 2645 if ( bday.isValid() || !anni.isEmpty())
2646 { 2646 {
2647 if (bday.isValid()) 2647 if (bday.isValid())
2648 formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); 2648 formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate);
2649 else 2649 else
2650 formattedbday = "NOTVALID"; 2650 formattedbday = "NOTVALID";
2651 if (anni.isEmpty()) 2651 if (anni.isEmpty())
2652 anni = "INVALID"; 2652 anni = "INVALID";
2653 2653
2654 birthdayList.append(formattedbday); 2654 birthdayList.append(formattedbday);
2655 anniversaryList.append(anni); //should be ISODate 2655 anniversaryList.append(anni); //should be ISODate
2656 realNameList.append((*it).realName()); 2656 realNameList.append((*it).realName());
2657 preferredEmailList.append((*it).preferredEmail()); 2657 preferredEmailList.append((*it).preferredEmail());
2658 assembledNameList.append((*it).assembledName()); 2658 assembledNameList.append((*it).assembledName());
2659 uidList.append((*it).uid()); 2659 uidList.append((*it).uid());
2660 2660
2661 //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() ); 2661 //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() );
2662 } 2662 }
2663 } 2663 }
2664 2664
2665 bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); 2665 bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList);
2666 2666
2667} 2667}
2668 2668
2669/* this method will be called through the QCop interface from other apps to show details of a contact. 2669/* this method will be called through the QCop interface from other apps to show details of a contact.
2670 */ 2670 */
2671void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) 2671void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid)
2672{ 2672{
2673 //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); 2673 //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1());
2674 2674
2675 QString foundUid = QString::null; 2675 QString foundUid = QString::null;
2676 if ( ! uid.isEmpty() ) { 2676 if ( ! uid.isEmpty() ) {
2677 Addressee adrr = mAddressBook->findByUid( uid ); 2677 Addressee adrr = mAddressBook->findByUid( uid );
2678 if ( !adrr.isEmpty() ) { 2678 if ( !adrr.isEmpty() ) {
2679 foundUid = uid; 2679 foundUid = uid;
2680 } 2680 }
2681 if ( email == "sendbacklist" ) { 2681 if ( email == "sendbacklist" ) {
2682 //qDebug("ssssssssssssssssssssssend "); 2682 //qDebug("ssssssssssssssssssssssend ");
2683 QStringList nameList; 2683 QStringList nameList;
2684 QStringList emailList; 2684 QStringList emailList;
2685 QStringList uidList; 2685 QStringList uidList;
2686 nameList.append(adrr.realName()); 2686 nameList.append(adrr.realName());
2687 emailList = adrr.emails(); 2687 emailList = adrr.emails();
2688 uidList.append( adrr.preferredEmail()); 2688 uidList.append( adrr.preferredEmail());
2689 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); 2689 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList);
2690 return; 2690 return;
2691 } 2691 }
2692 2692
2693 } 2693 }
2694 2694
2695 if ( email == "sendbacklist" ) 2695 if ( email == "sendbacklist" )
2696 return; 2696 return;
2697 if (foundUid.isEmpty()) 2697 if (foundUid.isEmpty())
2698 { 2698 {
2699 //find the uid of the person first 2699 //find the uid of the person first
2700 Addressee::List namelist; 2700 Addressee::List namelist;
2701 Addressee::List emaillist; 2701 Addressee::List emaillist;
2702 2702
2703 if (!name.isEmpty()) 2703 if (!name.isEmpty())
2704 namelist = mAddressBook->findByName( name ); 2704 namelist = mAddressBook->findByName( name );
2705 2705
2706 if (!email.isEmpty()) 2706 if (!email.isEmpty())
2707 emaillist = mAddressBook->findByEmail( email ); 2707 emaillist = mAddressBook->findByEmail( email );
2708 //qDebug("count %d %d ", namelist.count(),emaillist.count() ); 2708 //qDebug("count %d %d ", namelist.count(),emaillist.count() );
2709 //check if we have a match in Namelist and Emaillist 2709 //check if we have a match in Namelist and Emaillist
2710 if ((namelist.count() == 0) && (emaillist.count() > 0)) { 2710 if ((namelist.count() == 0) && (emaillist.count() > 0)) {
2711 foundUid = emaillist[0].uid(); 2711 foundUid = emaillist[0].uid();
2712 } 2712 }
2713 else if ((namelist.count() > 0) && (emaillist.count() == 0)) 2713 else if ((namelist.count() > 0) && (emaillist.count() == 0))
2714 foundUid = namelist[0].uid(); 2714 foundUid = namelist[0].uid();
2715 else 2715 else
2716 { 2716 {
2717 for (int i = 0; i < namelist.count(); i++) 2717 for (int i = 0; i < namelist.count(); i++)
2718 { 2718 {
2719 for (int j = 0; j < emaillist.count(); j++) 2719 for (int j = 0; j < emaillist.count(); j++)
2720 { 2720 {
2721 if (namelist[i] == emaillist[j]) 2721 if (namelist[i] == emaillist[j])
2722 { 2722 {
2723 foundUid = namelist[i].uid(); 2723 foundUid = namelist[i].uid();
2724 } 2724 }
2725 } 2725 }
2726 } 2726 }
2727 } 2727 }
2728 } 2728 }
2729 else 2729 else
2730 { 2730 {
2731 foundUid = uid; 2731 foundUid = uid;
2732 } 2732 }
2733 2733
2734 if (!foundUid.isEmpty()) 2734 if (!foundUid.isEmpty())
2735 { 2735 {
2736 2736
2737 // raise Ka/Pi if it is in the background 2737 // raise Ka/Pi if it is in the background
2738#ifndef DESKTOP_VERSION 2738#ifndef DESKTOP_VERSION
2739#ifndef KORG_NODCOP 2739#ifndef KORG_NODCOP
2740 //QCopEnvelope e("QPE/Application/kapi", "raise()"); 2740 //QCopEnvelope e("QPE/Application/kapi", "raise()");
2741#endif 2741#endif
2742#endif 2742#endif
2743 2743
2744 mMainWindow->showMaximized(); 2744 mMainWindow->showMaximized();
2745 mMainWindow-> raise(); 2745 mMainWindow-> raise();
2746 2746
2747 mViewManager->setSelected( "", false); 2747 mViewManager->setSelected( "", false);
2748 mViewManager->refreshView( "" ); 2748 mViewManager->refreshView( "" );
2749 mViewManager->setSelected( foundUid, true ); 2749 mViewManager->setSelected( foundUid, true );
2750 mViewManager->refreshView( foundUid ); 2750 mViewManager->refreshView( foundUid );
2751 2751
2752 if ( !mMultipleViewsAtOnce ) 2752 if ( !mMultipleViewsAtOnce )
2753 { 2753 {
2754 setDetailsVisible( true ); 2754 setDetailsVisible( true );
2755 mActionDetails->setChecked(true); 2755 mActionDetails->setChecked(true);
2756 } 2756 }
2757 } 2757 }
2758} 2758}
2759void KABCore::storagehowto() 2759void KABCore::storagehowto()
2760{ 2760{
2761 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); 2761 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" );
2762} 2762}
2763void KABCore::whatsnew() 2763void KABCore::whatsnew()
2764{ 2764{
2765 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 2765 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
2766} 2766}
2767void KABCore::synchowto() 2767void KABCore::synchowto()
2768{ 2768{
2769 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 2769 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
2770} 2770}
2771void KABCore::kdesynchowto() 2771void KABCore::kdesynchowto()
2772{ 2772{
2773 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 2773 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
2774} 2774}
2775void KABCore::multisynchowto() 2775void KABCore::multisynchowto()
2776{ 2776{
2777 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 2777 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
2778} 2778}
2779void KABCore::faq() 2779void KABCore::faq()
2780{ 2780{
2781 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); 2781 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" );
2782} 2782}
2783 2783
2784#include <libkcal/syncdefines.h> 2784#include <libkcal/syncdefines.h>
2785 2785
2786KABC::Addressee KABCore::getLastSyncAddressee() 2786KABC::Addressee KABCore::getLastSyncAddressee()
2787{ 2787{
2788 Addressee lse; 2788 Addressee lse;
2789 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2789 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2790 2790
2791 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); 2791 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() );
2792 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2792 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice );
2793 if (lse.isEmpty()) { 2793 if (lse.isEmpty()) {
2794 qDebug("KA: Creating new last-syncAddressee "); 2794 qDebug("KA: Creating new last-syncAddressee ");
2795 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2795 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice );
2796 QString sum = ""; 2796 QString sum = "";
2797 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) 2797 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
2798 sum = "E: "; 2798 sum = "E: ";
2799 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); 2799 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event"));
2800 lse.setRevision( mLastAddressbookSync ); 2800 lse.setRevision( mLastAddressbookSync );
2801 lse.setCategories( i18n("SyncEvent") ); 2801 lse.setCategories( i18n("SyncEvent") );
2802 mAddressBook->insertAddressee( lse ); 2802 mAddressBook->insertAddressee( lse );
2803 } 2803 }
2804 return lse; 2804 return lse;
2805} 2805}
2806int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) 2806int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full )
2807{ 2807{
2808 2808
2809 //void setZaurusId(int id); 2809 //void setZaurusId(int id);
2810 // int zaurusId() const; 2810 // int zaurusId() const;
2811 // void setZaurusUid(int id); 2811 // void setZaurusUid(int id);
2812 // int zaurusUid() const; 2812 // int zaurusUid() const;
2813 // void setZaurusStat(int id); 2813 // void setZaurusStat(int id);
2814 // int zaurusStat() const; 2814 // int zaurusStat() const;
2815 // 0 equal 2815 // 0 equal
2816 // 1 take local 2816 // 1 take local
2817 // 2 take remote 2817 // 2 take remote
2818 // 3 cancel 2818 // 3 cancel
2819 QDateTime lastSync = mLastAddressbookSync; 2819 QDateTime lastSync = mLastAddressbookSync;
2820 QDateTime localMod = local->revision(); 2820 QDateTime localMod = local->revision();
2821 QDateTime remoteMod = remote->revision(); 2821 QDateTime remoteMod = remote->revision();
2822 2822
2823 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2823 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2824 2824
2825 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2825 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2826 bool remCh, locCh; 2826 bool remCh, locCh;
2827 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); 2827 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
2828 //if ( remCh ) 2828 //if ( remCh )
2829 // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); 2829 // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
2830 locCh = ( localMod > mLastAddressbookSync ); 2830 locCh = ( localMod > mLastAddressbookSync );
2831 //qDebug("cahnged rem %d loc %d",remCh, locCh ); 2831 //qDebug("cahnged rem %d loc %d",remCh, locCh );
2832 if ( !remCh && ! locCh ) { 2832 if ( !remCh && ! locCh ) {
2833 //qDebug("both not changed "); 2833 //qDebug("both not changed ");
2834 lastSync = localMod.addDays(1); 2834 lastSync = localMod.addDays(1);
2835 if ( mode <= SYNC_PREF_ASK ) 2835 if ( mode <= SYNC_PREF_ASK )
2836 return 0; 2836 return 0;
2837 } else { 2837 } else {
2838 if ( locCh ) { 2838 if ( locCh ) {
2839 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); 2839 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1());
2840 lastSync = localMod.addDays( -1 ); 2840 lastSync = localMod.addDays( -1 );
2841 if ( !remCh ) 2841 if ( !remCh )
2842 remoteMod =( lastSync.addDays( -1 ) ); 2842 remoteMod =( lastSync.addDays( -1 ) );
2843 } else { 2843 } else {
2844 //qDebug(" not loc changed "); 2844 //qDebug(" not loc changed ");
2845 lastSync = localMod.addDays( 1 ); 2845 lastSync = localMod.addDays( 1 );
2846 if ( remCh ) { 2846 if ( remCh ) {
2847 //qDebug("rem changed "); 2847 //qDebug("rem changed ");
2848 remoteMod =( lastSync.addDays( 1 ) ); 2848 remoteMod =( lastSync.addDays( 1 ) );
2849 } 2849 }
2850 2850
2851 } 2851 }
2852 } 2852 }
2853 full = true; 2853 full = true;
2854 if ( mode < SYNC_PREF_ASK ) 2854 if ( mode < SYNC_PREF_ASK )
2855 mode = SYNC_PREF_ASK; 2855 mode = SYNC_PREF_ASK;
2856 } else { 2856 } else {
2857 if ( localMod == remoteMod ) 2857 if ( localMod == remoteMod )
2858 return 0; 2858 return 0;
2859 2859
2860 } 2860 }
2861 //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec()); 2861 //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec());
2862 //qDebug("lastsync %s ", lastSync.toString().latin1() ); 2862 //qDebug("lastsync %s ", lastSync.toString().latin1() );
2863 //full = true; //debug only 2863 //full = true; //debug only
2864 if ( full ) { 2864 if ( full ) {
2865 bool equ = ( (*local) == (*remote) ); 2865 bool equ = ( (*local) == (*remote) );
2866 if ( equ ) { 2866 if ( equ ) {
2867 //qDebug("equal "); 2867 //qDebug("equal ");
2868 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2868 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2869 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); 2869 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) );
2870 } 2870 }
2871 if ( mode < SYNC_PREF_FORCE_LOCAL ) 2871 if ( mode < SYNC_PREF_FORCE_LOCAL )
2872 return 0; 2872 return 0;
2873 2873
2874 }//else //debug only 2874 }//else //debug only
2875 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); 2875 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1());
2876 } 2876 }
2877 int result; 2877 int result;
2878 bool localIsNew; 2878 bool localIsNew;
2879 //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() ); 2879 //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() );
2880 2880
2881 if ( full && mode < SYNC_PREF_NEWEST ) 2881 if ( full && mode < SYNC_PREF_NEWEST )
2882 mode = SYNC_PREF_ASK; 2882 mode = SYNC_PREF_ASK;
2883 2883
2884 switch( mode ) { 2884 switch( mode ) {
2885 case SYNC_PREF_LOCAL: 2885 case SYNC_PREF_LOCAL:
2886 if ( lastSync > remoteMod ) 2886 if ( lastSync > remoteMod )
2887 return 1; 2887 return 1;
2888 if ( lastSync > localMod ) 2888 if ( lastSync > localMod )
2889 return 2; 2889 return 2;
2890 return 1; 2890 return 1;
2891 break; 2891 break;
2892 case SYNC_PREF_REMOTE: 2892 case SYNC_PREF_REMOTE:
2893 if ( lastSync > localMod ) 2893 if ( lastSync > localMod )
2894 return 2; 2894 return 2;
2895 if ( lastSync > remoteMod ) 2895 if ( lastSync > remoteMod )
2896 return 1; 2896 return 1;
2897 return 2; 2897 return 2;
2898 break; 2898 break;
2899 case SYNC_PREF_NEWEST: 2899 case SYNC_PREF_NEWEST:
2900 if ( localMod > remoteMod ) 2900 if ( localMod > remoteMod )
2901 return 1; 2901 return 1;
2902 else 2902 else
2903 return 2; 2903 return 2;
2904 break; 2904 break;
2905 case SYNC_PREF_ASK: 2905 case SYNC_PREF_ASK:
2906 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); 2906 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
2907 if ( lastSync > remoteMod && lastSync > localMod) 2907 if ( lastSync > remoteMod && lastSync > localMod)
2908 return 0; 2908 return 0;
2909 if ( lastSync > remoteMod ) 2909 if ( lastSync > remoteMod )
2910 return 1; 2910 return 1;
2911 if ( lastSync > localMod ) { 2911 if ( lastSync > localMod ) {
2912 return 2; 2912 return 2;
2913 } 2913 }
2914 localIsNew = localMod >= remoteMod; 2914 localIsNew = localMod >= remoteMod;
2915 //qDebug("conflict! ************************************** "); 2915 //qDebug("conflict! ************************************** ");
2916 { 2916 {
2917 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this ); 2917 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this );
2918 result = acd.executeD(localIsNew); 2918 result = acd.executeD(localIsNew);
2919 return result; 2919 return result;
2920 } 2920 }
2921 break; 2921 break;
2922 case SYNC_PREF_FORCE_LOCAL: 2922 case SYNC_PREF_FORCE_LOCAL:
2923 return 1; 2923 return 1;
2924 break; 2924 break;
2925 case SYNC_PREF_FORCE_REMOTE: 2925 case SYNC_PREF_FORCE_REMOTE:
2926 return 2; 2926 return 2;
2927 break; 2927 break;
2928 2928
2929 default: 2929 default:
2930 // SYNC_PREF_TAKE_BOTH not implemented 2930 // SYNC_PREF_TAKE_BOTH not implemented
2931 break; 2931 break;
2932 } 2932 }
2933 return 0; 2933 return 0;
2934} 2934}
2935 2935
2936 2936
2937bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode) 2937bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode)
2938{ 2938{
2939 bool syncOK = true; 2939 bool syncOK = true;
2940 int addedAddressee = 0; 2940 int addedAddressee = 0;
2941 int addedAddresseeR = 0; 2941 int addedAddresseeR = 0;
2942 int deletedAddresseeR = 0; 2942 int deletedAddresseeR = 0;
2943 int deletedAddresseeL = 0; 2943 int deletedAddresseeL = 0;
2944 int changedLocal = 0; 2944 int changedLocal = 0;
2945 int changedRemote = 0; 2945 int changedRemote = 0;
2946 int filteredIN = 0; 2946 int filteredIN = 0;
2947 int filteredOUT = 0; 2947 int filteredOUT = 0;
2948 2948
2949 QString mCurrentSyncName = syncManager->getCurrentSyncName(); 2949 QString mCurrentSyncName = syncManager->getCurrentSyncName();
2950 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2950 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2951 2951
2952 //QPtrList<Addressee> el = local->rawAddressees(); 2952 //QPtrList<Addressee> el = local->rawAddressees();
2953 Addressee addresseeR; 2953 Addressee addresseeR;
2954 QString uid; 2954 QString uid;
2955 int take; 2955 int take;
2956 Addressee addresseeL; 2956 Addressee addresseeL;
2957 Addressee addresseeRSync; 2957 Addressee addresseeRSync;
2958 Addressee addresseeLSync; 2958 Addressee addresseeLSync;
2959 // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees(); 2959 // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees();
2960 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); 2960 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees();
2961 bool fullDateRange = false; 2961 bool fullDateRange = false;
2962 local->resetTempSyncStat(); 2962 local->resetTempSyncStat();
2963 mLastAddressbookSync = QDateTime::currentDateTime(); 2963 mLastAddressbookSync = QDateTime::currentDateTime();
2964 if ( syncManager->syncWithDesktop() ) { 2964 if ( syncManager->syncWithDesktop() ) {
2965 // remote->removeSyncInfo( QString());//remove all info 2965 // remote->removeSyncInfo( QString());//remove all info
2966 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 2966 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
2967 mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; 2967 mLastAddressbookSync = KSyncManager::mRequestedSyncEvent;
2968 qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); 2968 qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() );
2969 } else { 2969 } else {
2970 qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime "); 2970 qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime ");
2971 } 2971 }
2972 } 2972 }
2973 QDateTime modifiedCalendar = mLastAddressbookSync; 2973 QDateTime modifiedCalendar = mLastAddressbookSync;
2974 addresseeLSync = getLastSyncAddressee(); 2974 addresseeLSync = getLastSyncAddressee();
2975 qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1()); 2975 qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1());
2976 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); 2976 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName );
2977 if ( !addresseeR.isEmpty() ) { 2977 if ( !addresseeR.isEmpty() ) {
2978 addresseeRSync = addresseeR; 2978 addresseeRSync = addresseeR;
2979 remote->removeAddressee(addresseeR ); 2979 remote->removeAddressee(addresseeR );
2980 2980
2981 } else { 2981 } else {
2982 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2982 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2983 addresseeRSync = addresseeLSync ; 2983 addresseeRSync = addresseeLSync ;
2984 } else { 2984 } else {
2985 //qDebug("FULLDATE 1"); 2985 //qDebug("FULLDATE 1");
2986 fullDateRange = true; 2986 fullDateRange = true;
2987 Addressee newAdd; 2987 Addressee newAdd;
2988 addresseeRSync = newAdd; 2988 addresseeRSync = newAdd;
2989 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); 2989 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee"));
2990 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); 2990 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName );
2991 addresseeRSync.setRevision( mLastAddressbookSync ); 2991 addresseeRSync.setRevision( mLastAddressbookSync );
2992 addresseeRSync.setCategories( i18n("SyncAddressee") ); 2992 addresseeRSync.setCategories( i18n("SyncAddressee") );
2993 } 2993 }
2994 } 2994 }
2995 if ( addresseeLSync.revision() == mLastAddressbookSync ) { 2995 if ( addresseeLSync.revision() == mLastAddressbookSync ) {
2996 // qDebug("FULLDATE 2"); 2996 // qDebug("FULLDATE 2");
2997 fullDateRange = true; 2997 fullDateRange = true;
2998 } 2998 }
2999 if ( ! fullDateRange ) { 2999 if ( ! fullDateRange ) {
3000 if ( addresseeLSync.revision() != addresseeRSync.revision() ) { 3000 if ( addresseeLSync.revision() != addresseeRSync.revision() ) {
3001 3001
3002 // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() ); 3002 // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() );
3003 //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec()); 3003 //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec());
3004 fullDateRange = true; 3004 fullDateRange = true;
3005 //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() ); 3005 //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() );
3006 } 3006 }
3007 } 3007 }
3008 // fullDateRange = true; // debug only! 3008 // fullDateRange = true; // debug only!
3009 if ( fullDateRange ) 3009 if ( fullDateRange )
3010 mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365); 3010 mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365);
3011 else 3011 else
3012 mLastAddressbookSync = addresseeLSync.revision(); 3012 mLastAddressbookSync = addresseeLSync.revision();
3013 // for resyncing if own file has changed 3013 // for resyncing if own file has changed
3014 // PENDING fixme later when implemented 3014 // PENDING fixme later when implemented
3015#if 0 3015#if 0
3016 if ( mCurrentSyncDevice == "deleteaftersync" ) { 3016 if ( mCurrentSyncDevice == "deleteaftersync" ) {
3017 mLastAddressbookSync = loadedFileVersion; 3017 mLastAddressbookSync = loadedFileVersion;
3018 qDebug("setting mLastAddressbookSync "); 3018 qDebug("setting mLastAddressbookSync ");
3019 } 3019 }
3020#endif 3020#endif
3021 3021
3022 3022
3023 // ********** setting filters **************** 3023 // ********** setting filters ****************
3024 Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB ); 3024 Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB );
3025 Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB ); 3025 Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB );
3026 3026
3027 //qDebug("*************************** "); 3027 //qDebug("*************************** ");
3028 // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() ); 3028 // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() );
3029 QStringList er = remote->uidList(); 3029 QStringList er = remote->uidList();
3030 Addressee inR ;//= er.first(); 3030 Addressee inR ;//= er.first();
3031 Addressee inL; 3031 Addressee inL;
3032 3032
3033 syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count()); 3033 syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count());
3034 3034
3035 int modulo = (er.count()/10)+1; 3035 int modulo = (er.count()/10)+1;
3036 int incCounter = 0; 3036 int incCounter = 0;
3037 while ( incCounter < er.count()) { 3037 while ( incCounter < er.count()) {
3038 if (syncManager->isProgressBarCanceled()) 3038 if (syncManager->isProgressBarCanceled())
3039 return false; 3039 return false;
3040 if ( incCounter % modulo == 0 ) 3040 if ( incCounter % modulo == 0 )
3041 syncManager->showProgressBar(incCounter); 3041 syncManager->showProgressBar(incCounter);
3042 3042
3043 uid = er[ incCounter ]; 3043 uid = er[ incCounter ];
3044 bool skipIncidence = false; 3044 bool skipIncidence = false;
3045 if ( uid.left(19) == QString("last-syncAddressee-") ) 3045 if ( uid.left(19) == QString("last-syncAddressee-") )
3046 skipIncidence = true; 3046 skipIncidence = true;
3047 QString idS,OidS; 3047 QString idS,OidS;
3048 qApp->processEvents(); 3048 qApp->processEvents();
3049 if ( !skipIncidence ) { 3049 if ( !skipIncidence ) {
3050 inL = local->findByUid( uid ); 3050 inL = local->findByUid( uid );
3051 inR = remote->findByUid( uid ); 3051 inR = remote->findByUid( uid );
3052 //inL.setResource( 0 ); 3052 //inL.setResource( 0 );
3053 //inR.setResource( 0 ); 3053 //inR.setResource( 0 );
3054 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars 3054 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars
3055 if ( !inL.resource() || inL.resource()->includeInSync() ) { 3055 if ( !inL.resource() || inL.resource()->includeInSync() ) {
3056 if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) { 3056 if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) {
3057 //qDebug("take %d %s ", take, inL.summary().latin1()); 3057 //qDebug("take %d %s ", take, inL.summary().latin1());
3058 if ( take == 3 ) 3058 if ( take == 3 )
3059 return false; 3059 return false;
3060 if ( take == 1 ) {// take local ********************** 3060 if ( take == 1 ) {// take local **********************
3061 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3061 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3062 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3062 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
3063 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3063 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
3064 local->insertAddressee( inL, false ); 3064 local->insertAddressee( inL, false );
3065 idS = inR.externalUID(); 3065 idS = inR.externalUID();
3066 OidS = inR.originalExternalUID(); 3066 OidS = inR.originalExternalUID();
3067 } 3067 }
3068 else 3068 else
3069 idS = inR.IDStr(); 3069 idS = inR.IDStr();
3070 remote->removeAddressee( inR ); 3070 remote->removeAddressee( inR );
3071 inR = inL; 3071 inR = inL;
3072 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 3072 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
3073 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3073 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3074 inR.setOriginalExternalUID( OidS ); 3074 inR.setOriginalExternalUID( OidS );
3075 inR.setExternalUID( idS ); 3075 inR.setExternalUID( idS );
3076 if ( syncManager->syncWithDesktop() ) { 3076 if ( syncManager->syncWithDesktop() ) {
3077 inR.setIDStr("changed" ); 3077 inR.setIDStr("changed" );
3078 } 3078 }
3079 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); 3079 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" );
3080 } else { 3080 } else {
3081 inR.setIDStr( idS ); 3081 inR.setIDStr( idS );
3082 } 3082 }
3083 inR.setResource( 0 ); 3083 inR.setResource( 0 );
3084 remote->insertAddressee( inR , false); 3084 remote->insertAddressee( inR , false);
3085 ++changedRemote; 3085 ++changedRemote;
3086 } else { // take == 2 take remote ********************** 3086 } else { // take == 2 take remote **********************
3087 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3087 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3088 if ( inR.revision().date().year() < 2004 ) 3088 if ( inR.revision().date().year() < 2004 )
3089 inR.setRevision( modifiedCalendar ); 3089 inR.setRevision( modifiedCalendar );
3090 } 3090 }
3091 idS = inL.IDStr(); 3091 idS = inL.IDStr();
3092 local->removeAddressee( inL ); 3092 local->removeAddressee( inL );
3093 inL = inR; 3093 inL = inR;
3094 inL.setIDStr( idS ); 3094 inL.setIDStr( idS );
3095 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3095 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3096 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3096 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
3097 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3097 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
3098 } 3098 }
3099 inL.setResource( 0 ); 3099 inL.setResource( 0 );
3100 local->insertAddressee( inL , false ); 3100 local->insertAddressee( inL , false );
3101 ++changedLocal; 3101 ++changedLocal;
3102 } 3102 }
3103 } 3103 }
3104 } 3104 }
3105 } else { // no conflict ********** add or delete remote 3105 } else { // no conflict ********** add or delete remote
3106 if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) { 3106 if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) {
3107 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3107 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3108 QString des = addresseeLSync.note(); 3108 QString des = addresseeLSync.note();
3109 if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it 3109 if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
3110 inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); 3110 inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE );
3111 remote->insertAddressee( inR, false ); 3111 remote->insertAddressee( inR, false );
3112 ++deletedAddresseeR; 3112 ++deletedAddresseeR;
3113 } else { 3113 } else {
3114 inR.setRevision( modifiedCalendar ); 3114 inR.setRevision( modifiedCalendar );
3115 remote->insertAddressee( inR, false ); 3115 remote->insertAddressee( inR, false );
3116 inL = inR; 3116 inL = inR;
3117 inL.setIDStr( ":" ); 3117 inL.setIDStr( ":" );
3118 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3118 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
3119 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3119 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
3120 inL.setResource( 0 ); 3120 inL.setResource( 0 );
3121 local->insertAddressee( inL , false); 3121 local->insertAddressee( inL , false);
3122 ++addedAddressee; 3122 ++addedAddressee;
3123 } 3123 }
3124 } else { 3124 } else {
3125 if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { 3125 if ( inR.revision() > mLastAddressbookSync || mode == 5 ) {
3126 inR.setRevision( modifiedCalendar ); 3126 inR.setRevision( modifiedCalendar );
3127 remote->insertAddressee( inR, false ); 3127 remote->insertAddressee( inR, false );
3128 inR.setResource( 0 ); 3128 inR.setResource( 0 );
3129 local->insertAddressee( inR, false ); 3129 local->insertAddressee( inR, false );
3130 ++addedAddressee; 3130 ++addedAddressee;
3131 } else { 3131 } else {
3132 // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); 3132 // pending checkExternSyncAddressee(addresseeRSyncSharp, inR);
3133 remote->removeAddressee( inR ); 3133 remote->removeAddressee( inR );
3134 ++deletedAddresseeR; 3134 ++deletedAddresseeR;
3135 } 3135 }
3136 } 3136 }
3137 } else { 3137 } else {
3138 ++filteredIN; 3138 ++filteredIN;
3139 } 3139 }
3140 } 3140 }
3141 } 3141 }
3142 ++incCounter; 3142 ++incCounter;
3143 } 3143 }
3144 er.clear(); 3144 er.clear();
3145 QStringList el = local->uidList(); 3145 QStringList el = local->uidList();
3146 modulo = (el.count()/10)+1; 3146 modulo = (el.count()/10)+1;
3147 3147
3148 syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); 3148 syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count());
3149 incCounter = 0; 3149 incCounter = 0;
3150 while ( incCounter < el.count()) { 3150 while ( incCounter < el.count()) {
3151 qApp->processEvents(); 3151 qApp->processEvents();
3152 if (syncManager->isProgressBarCanceled()) 3152 if (syncManager->isProgressBarCanceled())
3153 return false; 3153 return false;
3154 if ( incCounter % modulo == 0 ) 3154 if ( incCounter % modulo == 0 )
3155 syncManager->showProgressBar(incCounter); 3155 syncManager->showProgressBar(incCounter);
3156 uid = el[ incCounter ]; 3156 uid = el[ incCounter ];
3157 bool skipIncidence = false; 3157 bool skipIncidence = false;
3158 if ( uid.left(19) == QString("last-syncAddressee-") ) 3158 if ( uid.left(19) == QString("last-syncAddressee-") )
3159 skipIncidence = true; 3159 skipIncidence = true;
3160 if ( !skipIncidence ) { 3160 if ( !skipIncidence ) {
3161 inL = local->findByUid( uid ); 3161 inL = local->findByUid( uid );
3162 if ( !inL.resource() || inL.resource()->includeInSync() ) { 3162 if ( !inL.resource() || inL.resource()->includeInSync() ) {
3163 inR = remote->findByUid( uid ); 3163 inR = remote->findByUid( uid );
3164 if ( inR.isEmpty() ){ 3164 if ( inR.isEmpty() ){
3165 if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) { 3165 if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) {
3166 // no conflict ********** add or delete local 3166 // no conflict ********** add or delete local
3167 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3167 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3168 if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { 3168 if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) {
3169 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); 3169 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
3170 local->removeAddressee( inL ); 3170 local->removeAddressee( inL );
3171 ++deletedAddresseeL; 3171 ++deletedAddresseeL;
3172 } else { 3172 } else {
3173 if ( ! syncManager->mWriteBackExistingOnly ) { 3173 if ( ! syncManager->mWriteBackExistingOnly ) {
3174 inL.removeID(mCurrentSyncDevice ); 3174 inL.removeID(mCurrentSyncDevice );
3175 ++addedAddresseeR; 3175 ++addedAddresseeR;
3176 inL.setRevision( modifiedCalendar ); 3176 inL.setRevision( modifiedCalendar );
3177 local->insertAddressee( inL, false ); 3177 local->insertAddressee( inL, false );
3178 inR = inL; 3178 inR = inL;
3179 inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); 3179 inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL );
3180 inR.setResource( 0 ); 3180 inR.setResource( 0 );
3181 remote->insertAddressee( inR, false ); 3181 remote->insertAddressee( inR, false );
3182 } 3182 }
3183 } 3183 }
3184 } else { 3184 } else {
3185 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { 3185 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) {
3186 //qDebug("data %s ", inL.revision().toString().latin1()); 3186 //qDebug("data %s ", inL.revision().toString().latin1());
3187 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); 3187 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
3188 local->removeAddressee( inL ); 3188 local->removeAddressee( inL );
3189 ++deletedAddresseeL; 3189 ++deletedAddresseeL;
3190 } else { 3190 } else {
3191 if ( ! syncManager->mWriteBackExistingOnly ) { 3191 if ( ! syncManager->mWriteBackExistingOnly ) {
3192 ++addedAddresseeR; 3192 ++addedAddresseeR;
3193 inL.setRevision( modifiedCalendar ); 3193 inL.setRevision( modifiedCalendar );
3194 local->insertAddressee( inL, false ); 3194 local->insertAddressee( inL, false );
3195 inR = inL; 3195 inR = inL;
3196 inR.setIDStr( ":" ); 3196 inR.setIDStr( ":" );
3197 inR.setResource( 0 ); 3197 inR.setResource( 0 );
3198 remote->insertAddressee( inR, false ); 3198 remote->insertAddressee( inR, false );
3199 } 3199 }
3200 } 3200 }
3201 } 3201 }
3202 } else { 3202 } else {
3203 ++filteredOUT; 3203 ++filteredOUT;
3204 } 3204 }
3205 } 3205 }
3206 } 3206 }
3207 } 3207 }
3208 ++incCounter; 3208 ++incCounter;
3209 } 3209 }
3210 el.clear(); 3210 el.clear();
3211 syncManager->hideProgressBar(); 3211 syncManager->hideProgressBar();
3212 mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); 3212 mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 );
3213 // get rid of micro seconds 3213 // get rid of micro seconds
3214 QTime t = mLastAddressbookSync.time(); 3214 QTime t = mLastAddressbookSync.time();
3215 mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); 3215 mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) );
3216 addresseeLSync.setRevision( mLastAddressbookSync ); 3216 addresseeLSync.setRevision( mLastAddressbookSync );
3217 addresseeRSync.setRevision( mLastAddressbookSync ); 3217 addresseeRSync.setRevision( mLastAddressbookSync );
3218 addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; 3218 addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ;
3219 addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); 3219 addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName );
3220 addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; 3220 addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ;
3221 addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); 3221 addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") );
3222 addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; 3222 addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ;
3223 addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); 3223 addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() );
3224 addresseeRSync.setNote( "" ) ; 3224 addresseeRSync.setNote( "" ) ;
3225 addresseeLSync.setNote( "" ); 3225 addresseeLSync.setNote( "" );
3226 3226
3227 if ( mGlobalSyncMode == SYNC_MODE_NORMAL) 3227 if ( mGlobalSyncMode == SYNC_MODE_NORMAL)
3228 remote->insertAddressee( addresseeRSync, false ); 3228 remote->insertAddressee( addresseeRSync, false );
3229 local->insertAddressee( addresseeLSync, false ); 3229 local->insertAddressee( addresseeLSync, false );
3230 QString mes; 3230 QString mes;
3231 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 ); 3231 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 );
3232 qDebug( mes ); 3232 qDebug( mes );
3233 mes = i18n("Local addressbook changed!\n") +mes; 3233 mes = i18n("Local addressbook changed!\n") +mes;
3234 if ( syncManager->mShowSyncSummary ) { 3234 if ( syncManager->mShowSyncSummary ) {
3235 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, 3235 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
3236 i18n("KA/Pi Synchronization"),i18n("Write back"))) { 3236 i18n("KA/Pi Synchronization"),i18n("Write back"))) {
3237 qDebug("KA: WB cancelled "); 3237 qDebug("KA: WB cancelled ");
3238 syncManager->mWriteBackFile = false; 3238 syncManager->mWriteBackFile = false;
3239 return syncOK; 3239 return syncOK;
3240 } 3240 }
3241 } 3241 }
3242 return syncOK; 3242 return syncOK;
3243} 3243}
3244 3244
3245 3245
3246//this is a overwritten callbackmethods from the syncinterface 3246//this is a overwritten callbackmethods from the syncinterface
3247bool KABCore::sync(KSyncManager* manager, QString filename, int mode) 3247bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
3248{ 3248{
3249 3249
3250 //pending prepare addresseeview for output 3250 //pending prepare addresseeview for output
3251 //pending detect, if remote file has REV field. if not switch to external sync 3251 //pending detect, if remote file has REV field. if not switch to external sync
3252 mGlobalSyncMode = SYNC_MODE_NORMAL; 3252 mGlobalSyncMode = SYNC_MODE_NORMAL;
3253 if ( manager != syncManager ) 3253 if ( manager != syncManager )
3254 qDebug("KABCore::sync:: ERROR! :: manager != syncManager "); 3254 qDebug("KABCore::sync:: ERROR! :: manager != syncManager ");
3255 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 3255 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
3256 3256
3257 AddressBook abLocal(filename,"syncContact"); 3257 AddressBook abLocal(filename,"syncContact");
3258 bool syncOK = false; 3258 bool syncOK = false;
3259 if ( abLocal.load() ) { 3259 if ( abLocal.load() ) {
3260 qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode ); 3260 qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode );
3261 bool external = false; 3261 bool external = false;
3262 bool isXML = false; 3262 bool isXML = false;
3263 if ( filename.right(4) == ".xml") { 3263 if ( filename.right(4) == ".xml") {
3264 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3264 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3265 isXML = true; 3265 isXML = true;
3266 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); 3266 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
3267 } else { 3267 } else {
3268 external = !manager->mIsKapiFile; 3268 external = !manager->mIsKapiFile;
3269 if ( external ) { 3269 if ( external ) {
3270 qDebug("KA: Sync::Setting vcf mode to external "); 3270 qDebug("KA: Sync::Setting vcf mode to external ");
3271 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3271 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3272 AddressBook::Iterator it; 3272 AddressBook::Iterator it;
3273 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 3273 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
3274 (*it).setID( mCurrentSyncDevice, (*it).uid() ); 3274 (*it).setID( mCurrentSyncDevice, (*it).uid() );
3275 (*it).computeCsum( mCurrentSyncDevice ); 3275 (*it).computeCsum( mCurrentSyncDevice );
3276 } 3276 }
3277 } 3277 }
3278 } 3278 }
3279 //AddressBook::Iterator it; 3279 //AddressBook::Iterator it;
3280 //QStringList vcards; 3280 //QStringList vcards;
3281 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 3281 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
3282 // qDebug("Name %s ", (*it).familyName().latin1()); 3282 // qDebug("Name %s ", (*it).familyName().latin1());
3283 //} 3283 //}
3284 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); 3284 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode );
3285 syncManager->hideProgressBar(); 3285 syncManager->hideProgressBar();
3286 if ( syncOK ) { 3286 if ( syncOK ) {
3287 if ( syncManager->mWriteBackFile ) 3287 if ( syncManager->mWriteBackFile )
3288 { 3288 {
3289 if ( external ) 3289 if ( external )
3290 abLocal.removeSyncAddressees( !isXML); 3290 abLocal.removeSyncAddressees( !isXML);
3291 qDebug("KA: Sync::Saving remote AB "); 3291 qDebug("KA: Sync::Saving remote AB ");
3292 if ( ! abLocal.saveAB()) 3292 if ( ! abLocal.saveAB())
3293 qDebug("KA: sync::Error writing back AB to file "); 3293 qDebug("KA: sync::Error writing back AB to file ");
3294 if ( external ) { 3294 if ( external ) {
3295 // afterwrite processing 3295 // afterwrite processing
3296 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); 3296 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML);
3297 } 3297 }
3298 } 3298 }
3299 } 3299 }
3300 setModified(); 3300 setModified();
3301 3301
3302 } 3302 }
3303 abLocal.removeResources(); 3303 abLocal.removeResources();
3304 if ( syncOK ) 3304 if ( syncOK )
3305 mViewManager->refreshView(); 3305 mViewManager->refreshView();
3306 return syncOK; 3306 return syncOK;
3307 3307
3308} 3308}
3309void KABCore::removeSyncInfo( QString syncProfile) 3309void KABCore::removeSyncInfo( QString syncProfile)
3310{ 3310{
3311 qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1()); 3311 qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1());
3312 mAddressBook->removeSyncInfo( syncProfile ); 3312 mAddressBook->removeSyncInfo( syncProfile );
3313 setModified(); 3313 setModified();
3314} 3314}
3315 3315
3316 3316
3317//this is a overwritten callbackmethods from the syncinterface 3317//this is a overwritten callbackmethods from the syncinterface
3318bool KABCore::syncExternal(KSyncManager* manager, QString resource) 3318bool KABCore::syncExternal(KSyncManager* manager, QString resource)
3319{ 3319{
3320 if ( resource == "phone" ) 3320 if ( resource == "phone" )
3321 return syncPhone(); 3321 return syncPhone();
3322 disableBR( true ); 3322 disableBR( true );
3323 if ( manager != syncManager ) 3323 if ( manager != syncManager )
3324 qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); 3324 qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager ");
3325 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 3325 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
3326 3326
3327 AddressBook abLocal( resource,"syncContact"); 3327 AddressBook abLocal( resource,"syncContact");
3328 bool syncOK = false; 3328 bool syncOK = false;
3329 message(i18n("Loading DTM address data..."), false); 3329 message(i18n("Loading DTM address data..."), false);
3330 if ( abLocal.load() ) { 3330 if ( abLocal.load() ) {
3331 qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); 3331 qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1());
3332 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3332 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3333 message(i18n("Sync preprocessing..."),false); 3333 message(i18n("Sync preprocessing..."),false);
3334 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); 3334 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false );
3335 message(i18n("Synchronizing..."),false); 3335 message(i18n("Synchronizing..."),false);
3336 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 3336 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
3337 syncManager->hideProgressBar(); 3337 syncManager->hideProgressBar();
3338 if ( syncOK ) { 3338 if ( syncOK ) {
3339 if ( syncManager->mWriteBackFile ) { 3339 if ( syncManager->mWriteBackFile ) {
3340 abLocal.removeSyncAddressees( false ); 3340 abLocal.removeSyncAddressees( false );
3341 message(i18n("Saving DTM address data..."),false); 3341 message(i18n("Saving DTM address data..."),false);
3342 abLocal.saveAB(); 3342 abLocal.saveAB();
3343 message(i18n("Sync postprocessing..."),false); 3343 message(i18n("Sync postprocessing..."),false);
3344 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3344 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3345 } 3345 }
3346 } else 3346 } else
3347 message( i18n("Sync cancelled or failed.") ); 3347 message( i18n("Sync cancelled or failed.") );
3348 setModified(); 3348 setModified();
3349 } 3349 }
3350 abLocal.removeResources(); 3350 abLocal.removeResources();
3351 if ( syncOK ) { 3351 if ( syncOK ) {
3352 mViewManager->refreshView(); 3352 mViewManager->refreshView();
3353 message(i18n("DTM syncing finished.")); 3353 message(i18n("DTM syncing finished."));
3354 } 3354 }
3355 disableBR( false ); 3355 disableBR( false );
3356 return syncOK; 3356 return syncOK;
3357 3357
3358} 3358}
3359void KABCore::message( QString m, bool startTimer) 3359void KABCore::message( QString m, bool startTimer)
3360{ 3360{
3361 topLevelWidget()->setCaption( m ); 3361 topLevelWidget()->setCaption( m );
3362 qApp->processEvents(); 3362 qApp->processEvents();
3363 if ( startTimer ) 3363 if ( startTimer )
3364 mMessageTimer->start( 15000, true ); 3364 mMessageTimer->start( 15000, true );
3365 else 3365 else
3366 mMessageTimer->stop(); 3366 mMessageTimer->stop();
3367} 3367}
3368bool KABCore::syncPhone() 3368bool KABCore::syncPhone()
3369{ 3369{
3370 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 3370 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
3371 QString fileName = getPhoneFile(); 3371 QString fileName = getPhoneFile();
3372 if ( !PhoneAccess::readFromPhone( fileName) ) { 3372 if ( !PhoneAccess::readFromPhone( fileName) ) {
3373 message(i18n("Phone access failed!")); 3373 message(i18n("Phone access failed!"));
3374 return false; 3374 return false;
3375 } 3375 }
3376 AddressBook abLocal( fileName,"syncContact"); 3376 AddressBook abLocal( fileName,"syncContact");
3377 bool syncOK = false; 3377 bool syncOK = false;
3378 { 3378 {
3379 abLocal.importFromFile( fileName ); 3379 abLocal.importFromFile( fileName );
3380 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); 3380 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1());
3381 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3381 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3382 abLocal.preparePhoneSync( mCurrentSyncDevice, true ); 3382 abLocal.preparePhoneSync( mCurrentSyncDevice, true );
3383 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); 3383 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
3384 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 3384 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
3385 syncManager->hideProgressBar(); 3385 syncManager->hideProgressBar();
3386 if ( syncOK ) { 3386 if ( syncOK ) {
3387 if ( syncManager->mWriteBackFile ) { 3387 if ( syncManager->mWriteBackFile ) {
3388 abLocal.removeSyncAddressees( true ); 3388 abLocal.removeSyncAddressees( true );
3389 abLocal.saveABphone( fileName ); 3389 abLocal.saveABphone( fileName );
3390 abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); 3390 abLocal.findNewExtIds( fileName, mCurrentSyncDevice );
3391 //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); 3391 //abLocal.preparePhoneSync( mCurrentSyncDevice, false );
3392 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3392 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3393 } 3393 }
3394 } 3394 }
3395 setModified(); 3395 setModified();
3396 } 3396 }
3397 abLocal.removeResources(); 3397 abLocal.removeResources();
3398 if ( syncOK ) 3398 if ( syncOK )
3399 mViewManager->refreshView(); 3399 mViewManager->refreshView();
3400 return syncOK; 3400 return syncOK;
3401} 3401}
3402void KABCore::getFile( bool success ) 3402void KABCore::getFile( bool success )
3403{ 3403{
3404 if ( ! success ) { 3404 if ( ! success ) {
3405 message( i18n("Error receiving file. Nothing changed!") ); 3405 message( i18n("Error receiving file. Nothing changed!") );
3406 return; 3406 return;
3407 } 3407 }
3408 int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); 3408 int count = mAddressBook->importFromFile( sentSyncFile() , false, true );
3409 if ( count ) 3409 if ( count )
3410 setModified( true ); 3410 setModified( true );
3411 message( i18n("Pi-Sync successful!") ); 3411 message( i18n("Pi-Sync successful!") );
3412 mViewManager->refreshView(); 3412 mViewManager->refreshView();
3413} 3413}
3414void KABCore::syncFileRequest() 3414void KABCore::syncFileRequest()
3415{ 3415{
3416 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { 3416 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) {
3417 syncManager->slotSyncMenu( 999 ); 3417 syncManager->slotSyncMenu( 999 );
3418 } 3418 }
3419 mAddressBook->export2File( sentSyncFile() ); 3419 mAddressBook->export2File( sentSyncFile() );
3420} 3420}
3421QString KABCore::sentSyncFile() 3421QString KABCore::sentSyncFile()
3422{ 3422{
3423#ifdef DESKTOP_VERSION 3423#ifdef DESKTOP_VERSION
3424 return locateLocal( "tmp", "copysyncab.vcf" ); 3424 return locateLocal( "tmp", "copysyncab.vcf" );
3425#else 3425#else
3426 return QString( "/tmp/copysyncab.vcf" ); 3426 return QString( "/tmp/copysyncab.vcf" );
3427#endif 3427#endif
3428} 3428}
3429 3429
3430void KABCore::setCaptionBack() 3430void KABCore::setCaptionBack()
3431{ 3431{
3432 mMessageTimer->stop(); 3432 mMessageTimer->stop();
3433 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); 3433 topLevelWidget()->setCaption( i18n("KA/Pi") );
3434} 3434}
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 7de7064..017f1f7 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -1,1752 +1,1747 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#include <kdialog.h> 23#include <kdialog.h>
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qgroupbox.h> 26#include <qgroupbox.h>
27#include <qbuttongroup.h> 27#include <qbuttongroup.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qfont.h> 29#include <qfont.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qtextstream.h> 32#include <qtextstream.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qvbox.h> 34#include <qvbox.h>
35#include <qhbox.h> 35#include <qhbox.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <qstrlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44 44
45#include <kcolorbutton.h> 45#include <kcolorbutton.h>
46#include <kdebug.h> 46#include <kdebug.h>
47#include <klocale.h> 47#include <klocale.h>
48#include <kglobal.h> 48#include <kglobal.h>
49#include <kfontdialog.h> 49#include <kfontdialog.h>
50#include <kfiledialog.h> 50#include <kfiledialog.h>
51#include <kmessagebox.h> 51#include <kmessagebox.h>
52#include <kcolordialog.h> 52#include <kcolordialog.h>
53#include <kiconloader.h> 53#include <kiconloader.h>
54#include <kemailsettings.h> 54#include <kemailsettings.h>
55#include <kstandarddirs.h> 55#include <kstandarddirs.h>
56#include <kglobalsettings.h> 56#include <kglobalsettings.h>
57 57
58#include <klineedit.h> 58#include <klineedit.h>
59 59
60 60
61#include "koprefs.h" 61#include "koprefs.h"
62 62
63#include "koprefsdialog.h" 63#include "koprefsdialog.h"
64//#include <kprefswidget.h> 64//#include <kprefswidget.h>
65 65
66 66
67KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 67KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
68 KPrefsDialog(KOPrefs::instance(),parent,name,true) 68 KPrefsDialog(KOPrefs::instance(),parent,name,true)
69{ 69{
70 70
71 setFont( KGlobalSettings::generalMaxFont() ); 71 setFont( KGlobalSettings::generalMaxFont() );
72 setCaption( i18n("Settings - some need a restart (nr)")); 72 setCaption( i18n("Settings - some need a restart (nr)"));
73 setupGlobalTab(); 73 setupGlobalTab();
74 setupMainTab(); 74 setupMainTab();
75 setupMailTab();; 75 setupMailTab();;
76 setupFontsTab(); 76 setupFontsTab();
77 readConfig(); 77 readConfig();
78#ifndef DESKTOP_VERSION 78#ifndef DESKTOP_VERSION
79 if ( QApplication::desktop()->height() == 480 ) 79 if ( QApplication::desktop()->height() == 480 )
80 hideButtons(); 80 hideButtons();
81#endif 81#endif
82 82
83#if 0 83#if 0
84 84
85 setupMainTab(); 85 setupMainTab();
86 setupLocaleTab(); 86 setupLocaleTab();
87 setupTimeZoneTab(); 87 setupTimeZoneTab();
88 setupTimeTab(); 88 setupTimeTab();
89 setupLocaleDateTab(); 89 setupLocaleDateTab();
90 setupFontsTab(); 90 setupFontsTab();
91 setupColorsTab(); 91 setupColorsTab();
92 setupViewsTab(); 92 setupViewsTab();
93 //setupSyncTab(); 93 //setupSyncTab();
94 //setupSyncAlgTab(); 94 //setupSyncAlgTab();
95 //setupPrinterTab(); 95 //setupPrinterTab();
96 //setupGroupSchedulingTab(); 96 //setupGroupSchedulingTab();
97 //setupGroupAutomationTab(); 97 //setupGroupAutomationTab();
98#endif 98#endif
99} 99}
100 100
101#include "kpimglobalprefs.h" 101#include "kpimglobalprefs.h"
102 102
103KOPrefsDialog::~KOPrefsDialog() 103KOPrefsDialog::~KOPrefsDialog()
104{ 104{
105} 105}
106void KOPrefsDialog::setupGlobalTab() 106void KOPrefsDialog::setupGlobalTab()
107{ 107{
108 QFrame *topFrame = addPage(i18n("Global"),0,0); 108
109 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
110 QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
111 topLayout->addWidget( kdelibcfg );
112 109
113 110
114} 111}
115void KOPrefsDialog::setupMainTab() 112void KOPrefsDialog::setupMainTab()
116{ 113{
117 QFrame *topFrame = addPage(i18n("General"),0,0); 114 QFrame *topFrame = addPage(i18n("General"),0,0);
118 115
119 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 116 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
120 topLayout->setSpacing(spacingHint()); 117 topLayout->setSpacing(spacingHint());
121 topLayout->setMargin(marginHint()); 118 topLayout->setMargin(marginHint());
122 119
123 120
124 mNameEdit = new QLineEdit(topFrame); 121 mNameEdit = new QLineEdit(topFrame);
125 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 122 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
126 topLayout->addWidget(mNameLabel,0,0); 123 topLayout->addWidget(mNameLabel,0,0);
127 topLayout->addWidget(mNameEdit,0,1); 124 topLayout->addWidget(mNameEdit,0,1);
128 125
129 mEmailEdit = new QLineEdit(topFrame); 126 mEmailEdit = new QLineEdit(topFrame);
130 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 127 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
131 topLayout->addWidget(mEmailLabel,1,0); 128 topLayout->addWidget(mEmailLabel,1,0);
132 topLayout->addWidget(mEmailEdit,1,1); 129 topLayout->addWidget(mEmailEdit,1,1);
133 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); 130 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame);
134 topLayout->addMultiCellWidget(lab,2,2,0,1); 131 topLayout->addMultiCellWidget(lab,2,2,0,1);
135 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), 132 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"),
136 &(KOPrefs::instance()->mUseKapi),topFrame); 133 &(KOPrefs::instance()->mUseKapi),topFrame);
137 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); 134 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1);
138} 135}
139 136
140void KOPrefsDialog::setupMailTab() 137void KOPrefsDialog::setupMailTab()
141{ 138{
142 QFrame *topFrame = addPage(i18n("Mail"),0,0); 139 QFrame *topFrame = addPage(i18n("Mail"),0,0);
143 140
144 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 141 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
145 topLayout->setSpacing(spacingHint()); 142 topLayout->setSpacing(spacingHint());
146 topLayout->setMargin(marginHint()); 143 topLayout->setMargin(marginHint());
147 144
148 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), 145 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"),
149 &(KOPrefs::instance()->mViewAsHtml),topFrame); 146 &(KOPrefs::instance()->mViewAsHtml),topFrame);
150 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); 147 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1);
151 148
152 149
153 ttt = addWidBool(i18n("Send mails later"), 150 ttt = addWidBool(i18n("Send mails later"),
154 &(KOPrefs::instance()->mSendLater),topFrame); 151 &(KOPrefs::instance()->mSendLater),topFrame);
155 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); 152 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1);
156 ttt = addWidBool(i18n("Show \"To\" field in list view"), 153 ttt = addWidBool(i18n("Show \"To\" field in list view"),
157 &(KOPrefs::instance()->mShowToField),topFrame); 154 &(KOPrefs::instance()->mShowToField),topFrame);
158 topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); 155 topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1);
159 156
160 int iii =3; 157 int iii =3;
161 ttt = addWidBool(i18n("Show info fields at startup"), 158 ttt = addWidBool(i18n("Show info fields at startup"),
162 &(KOPrefs::instance()->mShowInfoStart),topFrame); 159 &(KOPrefs::instance()->mShowInfoStart),topFrame);
163 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 160 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
164 ++iii; 161 ++iii;
165 ttt = addWidBool(i18n("Show \"Subject\" info field"), 162 ttt = addWidBool(i18n("Show \"Subject\" info field"),
166 &(KOPrefs::instance()->mShowInfoSub),topFrame); 163 &(KOPrefs::instance()->mShowInfoSub),topFrame);
167 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 164 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
168 ++iii; 165 ++iii;
169 ttt = addWidBool(i18n("Show \"From\" info field"), 166 ttt = addWidBool(i18n("Show \"From\" info field"),
170 &(KOPrefs::instance()->mShowInfoFrom),topFrame); 167 &(KOPrefs::instance()->mShowInfoFrom),topFrame);
171 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 168 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
172 ++iii; 169 ++iii;
173 ttt = addWidBool(i18n("Show \"To\" info field"), 170 ttt = addWidBool(i18n("Show \"To\" info field"),
174 &(KOPrefs::instance()->mShowInfoTo),topFrame); 171 &(KOPrefs::instance()->mShowInfoTo),topFrame);
175 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 172 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
176 ++iii; 173 ++iii;
177 174
178 /* 175 /*
179 mCodecEdit = new QLineEdit(topFrame); 176 mCodecEdit = new QLineEdit(topFrame);
180 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1); 177 topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1);
181 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1); 178 topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1);
182 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1); 179 topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1);
183 */ 180 */
184} 181}
185void KOPrefsDialog::setupFontsTab() 182void KOPrefsDialog::setupFontsTab()
186{ 183{
187 184
188 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 185 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
189 // DesktopIcon("fonts",KIcon::SizeMedium)); 186 // DesktopIcon("fonts",KIcon::SizeMedium));
190 187
191 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 188 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
192 topLayout->setSpacing(1); 189 topLayout->setSpacing(1);
193 topLayout->setMargin(3); 190 topLayout->setMargin(3);
194 KPrefsDialogWidFont * tVFont; 191 KPrefsDialogWidFont * tVFont;
195 int i = 0; 192 int i = 0;
196 KPrefsDialogWidFont *timeLabelsFont = 193 KPrefsDialogWidFont *timeLabelsFont =
197 addWidFont(i18n("OK"),i18n("Application(nr)"), 194 addWidFont(i18n("OK"),i18n("Application(nr)"),
198 &(KOPrefs::instance()->mAppFont),topFrame); 195 &(KOPrefs::instance()->mAppFont),topFrame);
199 topLayout->addWidget(timeLabelsFont->label(),i,0); 196 topLayout->addWidget(timeLabelsFont->label(),i,0);
200 topLayout->addWidget(timeLabelsFont->preview(),i,1); 197 topLayout->addWidget(timeLabelsFont->preview(),i,1);
201 topLayout->addWidget(timeLabelsFont->button(),i,2); 198 topLayout->addWidget(timeLabelsFont->button(),i,2);
202 ++i; 199 ++i;
203 200
204 201
205 timeLabelsFont = 202 timeLabelsFont =
206 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"), 203 addWidFont(i18n("Dear Mr."),i18n("Compose mail:"),
207 &(KOPrefs::instance()->mComposeFont),topFrame); 204 &(KOPrefs::instance()->mComposeFont),topFrame);
208 topLayout->addWidget(timeLabelsFont->label(),i,0); 205 topLayout->addWidget(timeLabelsFont->label(),i,0);
209 topLayout->addWidget(timeLabelsFont->preview(),i,1); 206 topLayout->addWidget(timeLabelsFont->preview(),i,1);
210 topLayout->addWidget(timeLabelsFont->button(),i,2); 207 topLayout->addWidget(timeLabelsFont->button(),i,2);
211 ++i; 208 ++i;
212 209
213 KPrefsDialogWidFont *timeBarFont = 210 KPrefsDialogWidFont *timeBarFont =
214 addWidFont(i18n("Hello"),i18n("Read mail:"), 211 addWidFont(i18n("Hello"),i18n("Read mail:"),
215 &(KOPrefs::instance()->mReadFont),topFrame); 212 &(KOPrefs::instance()->mReadFont),topFrame);
216 topLayout->addWidget(timeBarFont->label(),i,0); 213 topLayout->addWidget(timeBarFont->label(),i,0);
217 topLayout->addWidget(timeBarFont->preview(),i,1); 214 topLayout->addWidget(timeBarFont->preview(),i,1);
218 topLayout->addWidget(timeBarFont->button(),i,2); 215 topLayout->addWidget(timeBarFont->button(),i,2);
219 ++i; 216 ++i;
220 217
221 topLayout->setColStretch(1,1); 218 topLayout->setColStretch(1,1);
222 topLayout->setRowStretch(4,1); 219 topLayout->setRowStretch(4,1);
223 220
224} 221}
225void KOPrefsDialog::usrReadConfig() 222void KOPrefsDialog::usrReadConfig()
226{ 223{
227 224
228 mNameEdit->setText(KOPrefs::instance()->mName); 225 mNameEdit->setText(KOPrefs::instance()->mName);
229 mEmailEdit->setText(KOPrefs::instance()->mEmail); 226 mEmailEdit->setText(KOPrefs::instance()->mEmail);
230 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec); 227 //mCodecEdit->setText(KOPrefs::instance()->mSendCodec);
231 kdelibcfg->readConfig();
232} 228}
233void KOPrefsDialog::usrWriteConfig() 229void KOPrefsDialog::usrWriteConfig()
234{ 230{
235 KOPrefs::instance()->mName = mNameEdit->text(); 231 KOPrefs::instance()->mName = mNameEdit->text();
236 KOPrefs::instance()->mEmail = mEmailEdit->text(); 232 KOPrefs::instance()->mEmail = mEmailEdit->text();
237 //KOPrefs::instance()->mSendCodec = mCodecEdit->text(); 233 //KOPrefs::instance()->mSendCodec = mCodecEdit->text();
238 kdelibcfg->writeConfig();
239 234
240 235
241} 236}
242 237
243#if 0 238#if 0
244void KOPrefsDialog::setupLocaleDateTab() 239void KOPrefsDialog::setupLocaleDateTab()
245{ 240{
246QFrame *topFrame = addPage(i18n("Date Format"),0,0); 241QFrame *topFrame = addPage(i18n("Date Format"),0,0);
247 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 242 QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
248 topLayout->setSpacing(spacingHint()); 243 topLayout->setSpacing(spacingHint());
249 topLayout->setMargin(marginHint()); 244 topLayout->setMargin(marginHint());
250 int iii = 0; 245 int iii = 0;
251 246
252 247
253 KPrefsWidRadios *syncPrefsGroup = 248 KPrefsWidRadios *syncPrefsGroup =
254 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); 249 addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
255 QString format; 250 QString format;
256 if ( QApplication::desktop()->width() < 480 ) 251 if ( QApplication::desktop()->width() < 480 )
257 format = "(%d.%m.%Y)"; 252 format = "(%d.%m.%Y)";
258 else 253 else
259 format = "(%d.%m.%Y|%A %d %B %Y)"; 254 format = "(%d.%m.%Y|%A %d %B %Y)";
260 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); 255 syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
261 if ( QApplication::desktop()->width() < 480 ) 256 if ( QApplication::desktop()->width() < 480 )
262 format = "(%m.%d.%Y)"; 257 format = "(%m.%d.%Y)";
263 else 258 else
264 format = "(%m.%d.%Y|%A %B %d %Y)"; 259 format = "(%m.%d.%Y|%A %B %d %Y)";
265 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); 260 syncPrefsGroup->addRadio(i18n("03.24.2004 "+format));
266 if ( QApplication::desktop()->width() < 480 ) 261 if ( QApplication::desktop()->width() < 480 )
267 format = "(%Y-%m-%d)"; 262 format = "(%Y-%m-%d)";
268 else 263 else
269 format = "(%Y-%m-%d|%A %Y %B %d)"; 264 format = "(%Y-%m-%d|%A %Y %B %d)";
270 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); 265 syncPrefsGroup->addRadio(i18n("2004-03-24 "+format));
271 syncPrefsGroup->addRadio(i18n("User defined")); 266 syncPrefsGroup->addRadio(i18n("User defined"));
272 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 267 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
273 ++iii; 268 ++iii;
274 ++iii; 269 ++iii;
275 QLabel * lab; 270 QLabel * lab;
276 mUserDateFormatLong = new QLineEdit(topFrame); 271 mUserDateFormatLong = new QLineEdit(topFrame);
277 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); 272 lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame);
278 topLayout->addWidget(lab ,iii,0); 273 topLayout->addWidget(lab ,iii,0);
279 topLayout->addWidget(mUserDateFormatLong,iii,1); 274 topLayout->addWidget(mUserDateFormatLong,iii,1);
280 ++iii; 275 ++iii;
281 mUserDateFormatShort = new QLineEdit(topFrame); 276 mUserDateFormatShort = new QLineEdit(topFrame);
282 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); 277 lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame);
283 topLayout->addWidget(lab ,iii,0); 278 topLayout->addWidget(lab ,iii,0);
284 topLayout->addWidget(mUserDateFormatShort,iii,1); 279 topLayout->addWidget(mUserDateFormatShort,iii,1);
285 ++iii; 280 ++iii;
286 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); 281 lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
287 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 282 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
288 ++iii; 283 ++iii;
289 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); 284 lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
290 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 285 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
291 ++iii; 286 ++iii;
292 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); 287 lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
293 topLayout->addMultiCellWidget(lab ,iii,iii,0,1); 288 topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
294 ++iii; 289 ++iii;
295 290
296} 291}
297 292
298void KOPrefsDialog::setupLocaleTab() 293void KOPrefsDialog::setupLocaleTab()
299{ 294{
300 QFrame *topFrame = addPage(i18n("Locale"),0,0); 295 QFrame *topFrame = addPage(i18n("Locale"),0,0);
301 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 296 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
302 topLayout->setSpacing(spacingHint()); 297 topLayout->setSpacing(spacingHint());
303 topLayout->setMargin(marginHint()); 298 topLayout->setMargin(marginHint());
304 int iii = 0; 299 int iii = 0;
305 KPrefsWidRadios *syncPrefsGroup = 300 KPrefsWidRadios *syncPrefsGroup =
306 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); 301 addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
307 syncPrefsGroup->addRadio(i18n("English")); 302 syncPrefsGroup->addRadio(i18n("English"));
308 syncPrefsGroup->addRadio(i18n("German")); 303 syncPrefsGroup->addRadio(i18n("German"));
309 syncPrefsGroup->addRadio(i18n("French")); 304 syncPrefsGroup->addRadio(i18n("French"));
310 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); 305 syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
311 if ( QApplication::desktop()->width() < 300 ) 306 if ( QApplication::desktop()->width() < 300 )
312 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 307 ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
313 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 308 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
314 ++iii; 309 ++iii;
315 310
316 syncPrefsGroup = 311 syncPrefsGroup =
317 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); 312 addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame);
318 if ( QApplication::desktop()->width() > 300 ) 313 if ( QApplication::desktop()->width() > 300 )
319 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 314 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
320 syncPrefsGroup->addRadio(i18n("24:00")); 315 syncPrefsGroup->addRadio(i18n("24:00"));
321 syncPrefsGroup->addRadio(i18n("12:00am")); 316 syncPrefsGroup->addRadio(i18n("12:00am"));
322 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); 317 syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
323 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 318 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
324 ++iii; 319 ++iii;
325 KPrefsDialogWidBool *sb; 320 KPrefsDialogWidBool *sb;
326 if ( QApplication::desktop()->width() < 300 ) { 321 if ( QApplication::desktop()->width() < 300 ) {
327 sb = 322 sb =
328 addWidBool(i18n("Week starts on Sunday"), 323 addWidBool(i18n("Week starts on Sunday"),
329 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); 324 &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame);
330 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 325 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
331 ++iii; 326 ++iii;
332 sb = 327 sb =
333 addWidBool(i18n("Use short date in (WN/E) view"), 328 addWidBool(i18n("Use short date in (WN/E) view"),
334 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 329 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
335 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 330 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
336 } 331 }
337 else { 332 else {
338 QWidget * hb = new QWidget( topFrame ); 333 QWidget * hb = new QWidget( topFrame );
339 QHBoxLayout *hbLayout = new QHBoxLayout(hb); 334 QHBoxLayout *hbLayout = new QHBoxLayout(hb);
340 sb = 335 sb =
341 addWidBool(i18n("Week starts on Sunday"), 336 addWidBool(i18n("Week starts on Sunday"),
342 &(KOPrefs::instance()->mWeekStartsOnSunday),hb); 337 &(KOPrefs::instance()->mWeekStartsOnSunday),hb);
343 hbLayout->addWidget(sb->checkBox() ); 338 hbLayout->addWidget(sb->checkBox() );
344 sb = 339 sb =
345 addWidBool(i18n("Use short date in (WN/E) view"), 340 addWidBool(i18n("Use short date in (WN/E) view"),
346 &(KOPrefs::instance()->mShortDateInViewer),hb); 341 &(KOPrefs::instance()->mShortDateInViewer),hb);
347 hbLayout->addWidget(sb->checkBox() ); 342 hbLayout->addWidget(sb->checkBox() );
348 topLayout->addMultiCellWidget(hb, iii,iii,0,1); 343 topLayout->addMultiCellWidget(hb, iii,iii,0,1);
349 344
350 } 345 }
351 //#ifndef DESKTOP_VERSION 346 //#ifndef DESKTOP_VERSION
352#if 0 347#if 0
353 ++iii; 348 ++iii;
354 sb = 349 sb =
355 addWidBool(i18n("Quick load/save (w/o Unicode)"), 350 addWidBool(i18n("Quick load/save (w/o Unicode)"),
356 &(KOPrefs::instance()->mUseQuicksave),topFrame); 351 &(KOPrefs::instance()->mUseQuicksave),topFrame);
357 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 352 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
358#endif 353#endif
359} 354}
360void KOPrefsDialog::showSyncPage() 355void KOPrefsDialog::showSyncPage()
361{ 356{
362 showPage ( 2 ) ; 357 showPage ( 2 ) ;
363 358
364} 359}
365void KOPrefsDialog::setupSyncAlgTab() 360void KOPrefsDialog::setupSyncAlgTab()
366{ 361{
367#if 0 362#if 0
368 QLabel * lab; 363 QLabel * lab;
369 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); 364 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
370 mSetupSyncAlgTab = topFrame; 365 mSetupSyncAlgTab = topFrame;
371 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 366 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
372 topLayout->setSpacing(spacingHint()); 367 topLayout->setSpacing(spacingHint());
373 topLayout->setMargin(marginHint()); 368 topLayout->setMargin(marginHint());
374 int iii = 0; 369 int iii = 0;
375 370
376 KPrefsDialogWidBool *sb = 371 KPrefsDialogWidBool *sb =
377 addWidBool(i18n("Ask for preferences before syncing"), 372 addWidBool(i18n("Ask for preferences before syncing"),
378 &(KOPrefs::instance()->mAskForPreferences),topFrame); 373 &(KOPrefs::instance()->mAskForPreferences),topFrame);
379 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 374 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
380 375
381 ++iii; 376 ++iii;
382 377
383 KPrefsWidRadios *syncPrefsGroup = 378 KPrefsWidRadios *syncPrefsGroup =
384 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), 379 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs),
385 topFrame); 380 topFrame);
386 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 381 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
387 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 382 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
388 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 383 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
389 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 384 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
390 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 385 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
391 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 386 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
392 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); 387 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
393 ++iii; 388 ++iii;
394 sb = 389 sb =
395 addWidBool(i18n("Show summary after syncing"), 390 addWidBool(i18n("Show summary after syncing"),
396 &(KOPrefs::instance()->mShowSyncSummary),topFrame); 391 &(KOPrefs::instance()->mShowSyncSummary),topFrame);
397 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 392 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
398 393
399 ++iii; 394 ++iii;
400#endif 395#endif
401 396
402 397
403 398
404} 399}
405 400
406 401
407void KOPrefsDialog::setupSyncTab() 402void KOPrefsDialog::setupSyncTab()
408{ 403{
409#if 0 404#if 0
410 QLabel * lab; 405 QLabel * lab;
411 QFrame *topFrame = addPage(i18n("Sync Network"),0,0); 406 QFrame *topFrame = addPage(i18n("Sync Network"),0,0);
412 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 407 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
413 topLayout->setSpacing(spacingHint()); 408 topLayout->setSpacing(spacingHint());
414 topLayout->setMargin(marginHint()); 409 topLayout->setMargin(marginHint());
415 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); 410 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
416 int iii = 0; 411 int iii = 0;
417 topLayout->addMultiCellWidget(lab , iii,iii,0,1); 412 topLayout->addMultiCellWidget(lab , iii,iii,0,1);
418 ++iii; 413 ++iii;
419 414
420 mRemoteIPEdit = new QLineEdit(topFrame); 415 mRemoteIPEdit = new QLineEdit(topFrame);
421 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); 416 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame);
422 topLayout->addWidget(lab ,iii,0); 417 topLayout->addWidget(lab ,iii,0);
423 topLayout->addWidget(mRemoteIPEdit,iii,1); 418 topLayout->addWidget(mRemoteIPEdit,iii,1);
424 ++iii; 419 ++iii;
425 mRemoteUser = new QLineEdit(topFrame); 420 mRemoteUser = new QLineEdit(topFrame);
426 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); 421 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame);
427 topLayout->addWidget(lab ,iii,0); 422 topLayout->addWidget(lab ,iii,0);
428 topLayout->addWidget(mRemoteUser, iii,1); 423 topLayout->addWidget(mRemoteUser, iii,1);
429 ++iii; 424 ++iii;
430 425
431 mRemoteFile = new QLineEdit(topFrame); 426 mRemoteFile = new QLineEdit(topFrame);
432 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); 427 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame);
433 topLayout->addWidget(lab ,iii,0); 428 topLayout->addWidget(lab ,iii,0);
434 topLayout->addWidget(mRemoteFile,iii,1); 429 topLayout->addWidget(mRemoteFile,iii,1);
435 ++iii; 430 ++iii;
436 431
437 mLocalTempFile = new QLineEdit(topFrame); 432 mLocalTempFile = new QLineEdit(topFrame);
438 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); 433 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame);
439 topLayout->addWidget(lab ,iii,0); 434 topLayout->addWidget(lab ,iii,0);
440 topLayout->addWidget(mLocalTempFile,iii,1); 435 topLayout->addWidget(mLocalTempFile,iii,1);
441 ++iii; 436 ++iii;
442 437
443 KPrefsDialogWidBool *wb = 438 KPrefsDialogWidBool *wb =
444 addWidBool(i18n("Write back synced file"), 439 addWidBool(i18n("Write back synced file"),
445 &(KOPrefs::instance()->mWriteBackFile),topFrame); 440 &(KOPrefs::instance()->mWriteBackFile),topFrame);
446 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 441 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
447 ++iii; 442 ++iii;
448 wb = 443 wb =
449 addWidBool(i18n("Write back existing entries only"), 444 addWidBool(i18n("Write back existing entries only"),
450 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); 445 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame);
451 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); 446 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
452 ++iii; 447 ++iii;
453 448
454#endif 449#endif
455} 450}
456 451
457void KOPrefsDialog::setupMainTab() 452void KOPrefsDialog::setupMainTab()
458{ 453{
459 QFrame *topFrame = addPage(i18n("General"),0,0); 454 QFrame *topFrame = addPage(i18n("General"),0,0);
460 // DesktopIcon("identity",KIcon::SizeMedium)); 455 // DesktopIcon("identity",KIcon::SizeMedium));
461 456
462 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 457 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
463 topLayout->setSpacing(spacingHint()); 458 topLayout->setSpacing(spacingHint());
464 topLayout->setMargin(marginHint()); 459 topLayout->setMargin(marginHint());
465 460
466 // KPrefsDialogWidBool *emailControlCenter = 461 // KPrefsDialogWidBool *emailControlCenter =
467// addWidBool(i18n("&Use email settings from Control Center"), 462// addWidBool(i18n("&Use email settings from Control Center"),
468// &(KOPrefs::instance()->mEmailControlCenter),topFrame); 463// &(KOPrefs::instance()->mEmailControlCenter),topFrame);
469// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); 464// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1);
470 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), 465 // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)),
471 // SLOT(toggleEmailSettings(bool))); 466 // SLOT(toggleEmailSettings(bool)));
472 467
473 mNameEdit = new QLineEdit(topFrame); 468 mNameEdit = new QLineEdit(topFrame);
474 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 469 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
475 topLayout->addWidget(mNameLabel,0,0); 470 topLayout->addWidget(mNameLabel,0,0);
476 topLayout->addWidget(mNameEdit,0,1); 471 topLayout->addWidget(mNameEdit,0,1);
477 472
478 mEmailEdit = new QLineEdit(topFrame); 473 mEmailEdit = new QLineEdit(topFrame);
479 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 474 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
480 topLayout->addWidget(mEmailLabel,1,0); 475 topLayout->addWidget(mEmailLabel,1,0);
481 topLayout->addWidget(mEmailEdit,1,1); 476 topLayout->addWidget(mEmailEdit,1,1);
482 KPrefsDialogWidBool *wb; 477 KPrefsDialogWidBool *wb;
483 QHBox *dummy; 478 QHBox *dummy;
484 if ( QApplication::desktop()->width() > 480 ) { 479 if ( QApplication::desktop()->width() > 480 ) {
485 dummy = new QHBox(topFrame); 480 dummy = new QHBox(topFrame);
486 } else { 481 } else {
487 dummy = new QVBox(topFrame); 482 dummy = new QVBox(topFrame);
488 } 483 }
489 484
490 topLayout->addMultiCellWidget(dummy, 2,2,0,1); 485 topLayout->addMultiCellWidget(dummy, 2,2,0,1);
491 addWidBool(i18n("Full menu bar(nr)"), 486 addWidBool(i18n("Full menu bar(nr)"),
492 &(KOPrefs::instance()->mShowFullMenu),dummy); 487 &(KOPrefs::instance()->mShowFullMenu),dummy);
493 488
494 489
495 addWidBool(i18n("Mini icons in toolbar(nr)"), 490 addWidBool(i18n("Mini icons in toolbar(nr)"),
496 &(KOPrefs::instance()->mToolBarMiniIcons),dummy); 491 &(KOPrefs::instance()->mToolBarMiniIcons),dummy);
497 492
498 493
499 dummy = new QHBox(topFrame); 494 dummy = new QHBox(topFrame);
500 new QLabel(i18n("Days in What's Next:"),dummy); 495 new QLabel(i18n("Days in What's Next:"),dummy);
501 mWhatsNextSpin = new QSpinBox(1,14,1,dummy); 496 mWhatsNextSpin = new QSpinBox(1,14,1,dummy);
502 497
503 topLayout->addMultiCellWidget(dummy,3,3,0,1); 498 topLayout->addMultiCellWidget(dummy,3,3,0,1);
504 499
505 500
506 501
507 dummy = new QHBox(topFrame); 502 dummy = new QHBox(topFrame);
508 new QLabel(i18n("Days in Next-X-Days:"),dummy); 503 new QLabel(i18n("Days in Next-X-Days:"),dummy);
509 mNextXDaysSpin = new QSpinBox(2,14,1,dummy); 504 mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
510 505
511 topLayout->addMultiCellWidget(dummy,4,4,0,1); 506 topLayout->addMultiCellWidget(dummy,4,4,0,1);
512 507
513 QHBox *prioBox = new QHBox(topFrame); 508 QHBox *prioBox = new QHBox(topFrame);
514 // intervalBox->setSpacing(spacingHint()); 509 // intervalBox->setSpacing(spacingHint());
515 topLayout->addMultiCellWidget(prioBox,5,5,0,1); 510 topLayout->addMultiCellWidget(prioBox,5,5,0,1);
516 QString messa = i18n("Show topmost todo prios in What's Next:"); 511 QString messa = i18n("Show topmost todo prios in What's Next:");
517 512
518 if ( QApplication::desktop()->width() < 300 ) 513 if ( QApplication::desktop()->width() < 300 )
519 messa = i18n("Show topmost todo prios in What's N.:"); 514 messa = i18n("Show topmost todo prios in What's N.:");
520 QLabel *prioLabel = new QLabel(messa, prioBox); 515 QLabel *prioLabel = new QLabel(messa, prioBox);
521 mPrioSpin = new QSpinBox(0,5,1,prioBox); 516 mPrioSpin = new QSpinBox(0,5,1,prioBox);
522 if ( QApplication::desktop()->width() < 300 ) 517 if ( QApplication::desktop()->width() < 300 )
523 mPrioSpin->setFixedWidth( 40 ); 518 mPrioSpin->setFixedWidth( 40 );
524 519
525 // KPrefsDialogWidBool *bcc = 520 // KPrefsDialogWidBool *bcc =
526// addWidBool(i18n("Send copy to owner when mailing events"), 521// addWidBool(i18n("Send copy to owner when mailing events"),
527// &(KOPrefs::instance()->mBcc),topFrame); 522// &(KOPrefs::instance()->mBcc),topFrame);
528// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); 523// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1);
529 524
530 525
531 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); 526 // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame);
532 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); 527 //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1);
533 528
534 // addWidBool(i18n("Enable automatic saving of calendar"), 529 // addWidBool(i18n("Enable automatic saving of calendar"),
535 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); 530 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
536 531
537 QHBox *intervalBox = new QHBox(topFrame); 532 QHBox *intervalBox = new QHBox(topFrame);
538 // intervalBox->setSpacing(spacingHint()); 533 // intervalBox->setSpacing(spacingHint());
539 topLayout->addMultiCellWidget(intervalBox,6,6,0,1); 534 topLayout->addMultiCellWidget(intervalBox,6,6,0,1);
540 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); 535 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
541 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); 536 mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox);
542 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); 537 autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin);
543 /* 538 /*
544 QHBox * agendasize = new QHBox ( topFrame ); 539 QHBox * agendasize = new QHBox ( topFrame );
545 540
546 new QLabel (i18n("AllDayAgenda Height:"), agendasize ); 541 new QLabel (i18n("AllDayAgenda Height:"), agendasize );
547 542
548 543
549 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); 544 mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize);
550 topLayout->addMultiCellWidget(agendasize,7,7,0,1); 545 topLayout->addMultiCellWidget(agendasize,7,7,0,1);
551 */ 546 */
552 KPrefsDialogWidBool *verticalScreen = 547 KPrefsDialogWidBool *verticalScreen =
553 addWidBool(i18n("Show vertical screen (Needs restart)"), 548 addWidBool(i18n("Show vertical screen (Needs restart)"),
554 &(KOPrefs::instance()->mVerticalScreen),topFrame); 549 &(KOPrefs::instance()->mVerticalScreen),topFrame);
555 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); 550 //topLayout->addWidget(verticalScreen->checkBox(),ii++,0);
556 topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1); 551 topLayout->addMultiCellWidget(verticalScreen->checkBox(),7,7,0,1);
557 552
558 KPrefsDialogWidBool *ask = 553 KPrefsDialogWidBool *ask =
559 addWidBool(i18n("Ask for quit when closing KO/Pi"), 554 addWidBool(i18n("Ask for quit when closing KO/Pi"),
560 &(KOPrefs::instance()->mAskForQuit),topFrame); 555 &(KOPrefs::instance()->mAskForQuit),topFrame);
561 topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1); 556 topLayout->addMultiCellWidget(ask->checkBox(),8,8,0,1);
562 557
563 558
564 /* 559 /*
565 KPrefsDialogWidBool *confirmCheck = 560 KPrefsDialogWidBool *confirmCheck =
566 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), 561 addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm),
567 topFrame); 562 topFrame);
568 topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); 563 topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1);
569 564
570 565
571 mEnableGroupScheduling = 566 mEnableGroupScheduling =
572 addWidBool(i18n("Enable group scheduling"), 567 addWidBool(i18n("Enable group scheduling"),
573 &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); 568 &(KOPrefs::instance()->mEnableGroupScheduling),topFrame);
574 topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); 569 topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0);
575 connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), 570 connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()),
576 SLOT(warningGroupScheduling())); 571 SLOT(warningGroupScheduling()));
577 572
578 mEnableProjectView = 573 mEnableProjectView =
579 addWidBool(i18n("Enable project view"), 574 addWidBool(i18n("Enable project view"),
580 &(KOPrefs::instance()->mEnableProjectView),topFrame); 575 &(KOPrefs::instance()->mEnableProjectView),topFrame);
581 topLayout->addWidget(mEnableProjectView->checkBox(),9,0); 576 topLayout->addWidget(mEnableProjectView->checkBox(),9,0);
582 connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), 577 connect(mEnableProjectView->checkBox(),SIGNAL(clicked()),
583 SLOT(warningProjectView())); 578 SLOT(warningProjectView()));
584 579
585 // Can't be disabled anymore 580 // Can't be disabled anymore
586 mEnableGroupScheduling->checkBox()->hide(); 581 mEnableGroupScheduling->checkBox()->hide();
587 582
588 // Disable setting, because this feature now becomes stable 583 // Disable setting, because this feature now becomes stable
589 mEnableProjectView->checkBox()->hide(); 584 mEnableProjectView->checkBox()->hide();
590 585
591 KPrefsWidRadios *defaultFormatGroup = 586 KPrefsWidRadios *defaultFormatGroup =
592 addWidRadios(i18n("Default Calendar Format"), 587 addWidRadios(i18n("Default Calendar Format"),
593 &(KOPrefs::instance()->mDefaultFormat),topFrame); 588 &(KOPrefs::instance()->mDefaultFormat),topFrame);
594 defaultFormatGroup->addRadio(i18n("vCalendar")); 589 defaultFormatGroup->addRadio(i18n("vCalendar"));
595 defaultFormatGroup->addRadio(i18n("iCalendar")); 590 defaultFormatGroup->addRadio(i18n("iCalendar"));
596 591
597 topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); 592 topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1);
598 593
599 // Default format unconditionally is iCalendar 594 // Default format unconditionally is iCalendar
600 defaultFormatGroup->groupBox()->hide(); 595 defaultFormatGroup->groupBox()->hide();
601 596
602 KPrefsWidRadios *mailClientGroup = 597 KPrefsWidRadios *mailClientGroup =
603 addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), 598 addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient),
604 topFrame); 599 topFrame);
605 mailClientGroup->addRadio(i18n("KMail")); 600 mailClientGroup->addRadio(i18n("KMail"));
606 mailClientGroup->addRadio(i18n("Sendmail")); 601 mailClientGroup->addRadio(i18n("Sendmail"));
607 topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); 602 topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1);
608 603
609 KPrefsDialogWidBool *htmlsave = 604 KPrefsDialogWidBool *htmlsave =
610 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), 605 addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave),
611 topFrame); 606 topFrame);
612 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); 607 topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1);
613 608
614 KPrefsWidRadios *destinationGroup = 609 KPrefsWidRadios *destinationGroup =
615 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), 610 addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination),
616 topFrame); 611 topFrame);
617 destinationGroup->addRadio(i18n("be added to the standard resource")); 612 destinationGroup->addRadio(i18n("be added to the standard resource"));
618 destinationGroup->addRadio(i18n("be asked which resource to use")); 613 destinationGroup->addRadio(i18n("be asked which resource to use"));
619 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); 614 topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1);
620 615
621 topLayout->setRowStretch(14,1); 616 topLayout->setRowStretch(14,1);
622 */ 617 */
623} 618}
624 619
625 620
626void KOPrefsDialog::setupTimeTab() 621void KOPrefsDialog::setupTimeTab()
627{ 622{
628 QFrame *topFrame = addPage(i18n("Time"),0,0); 623 QFrame *topFrame = addPage(i18n("Time"),0,0);
629 // DesktopIcon("clock",KIcon::SizeMedium)); 624 // DesktopIcon("clock",KIcon::SizeMedium));
630 625
631 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 626 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
632 topLayout->setSpacing(spacingHint()); 627 topLayout->setSpacing(spacingHint());
633 topLayout->setMargin(marginHint()); 628 topLayout->setMargin(marginHint());
634 629
635 QHBox *dummy = new QHBox(topFrame); 630 QHBox *dummy = new QHBox(topFrame);
636 KPrefsWidTime *dayBegins = 631 KPrefsWidTime *dayBegins =
637 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 632 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
638 dummy); 633 dummy);
639 //topLayout->addWidget(dayBegins->label(),2,0); 634 //topLayout->addWidget(dayBegins->label(),2,0);
640 635
641 //topLayout->addWidget(dayBegins->spinBox(),2,1); 636 //topLayout->addWidget(dayBegins->spinBox(),2,1);
642 topLayout->addMultiCellWidget(dummy,0,0,0,1); 637 topLayout->addMultiCellWidget(dummy,0,0,0,1);
643 638
644 topLayout->addWidget(new QLabel(i18n("Default appointment time:"), 639 topLayout->addWidget(new QLabel(i18n("Default appointment time:"),
645 topFrame),1,0); 640 topFrame),1,0);
646 mStartTimeSpin = new QSpinBox(0,23,1,topFrame); 641 mStartTimeSpin = new QSpinBox(0,23,1,topFrame);
647 mStartTimeSpin->setSuffix(":00"); 642 mStartTimeSpin->setSuffix(":00");
648 topLayout->addWidget(mStartTimeSpin,1,1); 643 topLayout->addWidget(mStartTimeSpin,1,1);
649 644
650 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), 645 topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"),
651 topFrame),2,0); 646 topFrame),2,0);
652 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); 647 mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame);
653 mDefaultDurationSpin->setSuffix(":00"); 648 mDefaultDurationSpin->setSuffix(":00");
654 topLayout->addWidget(mDefaultDurationSpin,2,1); 649 topLayout->addWidget(mDefaultDurationSpin,2,1);
655 650
656 QStringList alarmList; 651 QStringList alarmList;
657 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") 652 alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes")
658 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; 653 << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ;
659 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), 654 topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame),
660 3,0); 655 3,0);
661 mAlarmTimeCombo = new QComboBox(topFrame); 656 mAlarmTimeCombo = new QComboBox(topFrame);
662 mAlarmTimeCombo->insertStringList(alarmList); 657 mAlarmTimeCombo->insertStringList(alarmList);
663 topLayout->addWidget(mAlarmTimeCombo,3,1); 658 topLayout->addWidget(mAlarmTimeCombo,3,1);
664 659
665 660
666 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, 661 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal,
667 i18n("Working Hours"), 662 i18n("Working Hours"),
668 topFrame); 663 topFrame);
669 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); 664 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1);
670 workingHoursGroup->layout()->setSpacing( 0 ); 665 workingHoursGroup->layout()->setSpacing( 0 );
671 workingHoursGroup->layout()->setMargin( 4 ); 666 workingHoursGroup->layout()->setMargin( 4 );
672 QHBox *workStartBox = new QHBox(workingHoursGroup); 667 QHBox *workStartBox = new QHBox(workingHoursGroup);
673 // workStartBox->setMargin( 0 ); 668 // workStartBox->setMargin( 0 );
674 addWidTime(i18n("Daily starting hour:"), 669 addWidTime(i18n("Daily starting hour:"),
675 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); 670 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox);
676 671
677 QHBox *workEndBox = new QHBox(workingHoursGroup); 672 QHBox *workEndBox = new QHBox(workingHoursGroup);
678 //workEndBox->setMargin( 0 ); 673 //workEndBox->setMargin( 0 );
679 addWidTime(i18n("Daily ending hour:"), 674 addWidTime(i18n("Daily ending hour:"),
680 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); 675 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox);
681 QVBox *excludeBox = new QVBox(workingHoursGroup); 676 QVBox *excludeBox = new QVBox(workingHoursGroup);
682 //excludeBox->setMargin( 0 ); 677 //excludeBox->setMargin( 0 );
683 addWidBool(i18n("Exclude holidays"), 678 addWidBool(i18n("Exclude holidays"),
684 &(KOPrefs::instance()->mExcludeHolidays),excludeBox); 679 &(KOPrefs::instance()->mExcludeHolidays),excludeBox);
685 680
686 addWidBool(i18n("Exclude Saturdays"), 681 addWidBool(i18n("Exclude Saturdays"),
687 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); 682 &(KOPrefs::instance()->mExcludeSaturdays),excludeBox);
688 683
689// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), 684// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"),
690 // &(KOPrefs::instance()->mMarcusBainsShowSeconds), 685 // &(KOPrefs::instance()->mMarcusBainsShowSeconds),
691 // topFrame); 686 // topFrame);
692// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); 687// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0);
693 688
694 // topLayout->setRowStretch(6,1); 689 // topLayout->setRowStretch(6,1);
695} 690}
696 691
697 692
698void KOPrefsDialog::setupViewsTab() 693void KOPrefsDialog::setupViewsTab()
699{ 694{
700 695
701 QFrame *topFrame = addPage(i18n("Views"),0,0); 696 QFrame *topFrame = addPage(i18n("Views"),0,0);
702 // DesktopIcon("viewmag",KIcon::SizeMedium)); 697 // DesktopIcon("viewmag",KIcon::SizeMedium));
703 698
704 QGridLayout *topLayout = new QGridLayout(topFrame,6,1); 699 QGridLayout *topLayout = new QGridLayout(topFrame,6,1);
705 topLayout->setSpacing(spacingHint()); 700 topLayout->setSpacing(spacingHint());
706 topLayout->setMargin(marginHint()); 701 topLayout->setMargin(marginHint());
707 702
708// QBoxLayout *dayBeginsLayout = new QHBoxLayout; 703// QBoxLayout *dayBeginsLayout = new QHBoxLayout;
709// topLayout->addLayout(dayBeginsLayout,0,0); 704// topLayout->addLayout(dayBeginsLayout,0,0);
710 705
711// KPrefsWidTime *dayBegins = 706// KPrefsWidTime *dayBegins =
712// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 707// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
713// topFrame); 708// topFrame);
714// dayBeginsLayout->addWidget(dayBegins->label()); 709// dayBeginsLayout->addWidget(dayBegins->label());
715// dayBeginsLayout->addStretch(1); 710// dayBeginsLayout->addStretch(1);
716// dayBeginsLayout->addWidget(dayBegins->spinBox()); 711// dayBeginsLayout->addWidget(dayBegins->spinBox());
717 712
718// QBoxLayout *nextDaysLayout = new QHBoxLayout; 713// QBoxLayout *nextDaysLayout = new QHBoxLayout;
719// topLayout->addLayout(nextDaysLayout,1,0); 714// topLayout->addLayout(nextDaysLayout,1,0);
720// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); 715// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame));
721// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); 716// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame);
722// nextDaysLayout->addStretch(1); 717// nextDaysLayout->addStretch(1);
723// nextDaysLayout->addWidget(mNextXDaysSpin); 718// nextDaysLayout->addWidget(mNextXDaysSpin);
724 719
725 720
726 int ii = 0; 721 int ii = 0;
727 KPrefsDialogWidBool *dummy = 722 KPrefsDialogWidBool *dummy =
728 addWidBool(i18n("Edit item on doubleclick (if not, show)"), 723 addWidBool(i18n("Edit item on doubleclick (if not, show)"),
729 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); 724 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame);
730 topLayout->addWidget(dummy->checkBox(),ii++,0); 725 topLayout->addWidget(dummy->checkBox(),ii++,0);
731 726
732 dummy = 727 dummy =
733 addWidBool(i18n("Highlight current day in agenda"), 728 addWidBool(i18n("Highlight current day in agenda"),
734 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); 729 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame);
735 topLayout->addWidget(dummy->checkBox(),ii++,0); 730 topLayout->addWidget(dummy->checkBox(),ii++,0);
736 731
737 dummy = 732 dummy =
738 addWidBool(i18n("Use light color for highlight current day"), 733 addWidBool(i18n("Use light color for highlight current day"),
739 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); 734 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame);
740 topLayout->addWidget(dummy->checkBox(),ii++,0); 735 topLayout->addWidget(dummy->checkBox(),ii++,0);
741 736
742 KPrefsDialogWidBool *dailyRecur = 737 KPrefsDialogWidBool *dailyRecur =
743 addWidBool(i18n("Show events that recur daily in date nav."), 738 addWidBool(i18n("Show events that recur daily in date nav."),
744 &(KOPrefs::instance()->mDailyRecur),topFrame); 739 &(KOPrefs::instance()->mDailyRecur),topFrame);
745 topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 740 topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
746 741
747 KPrefsDialogWidBool *weeklyRecur = 742 KPrefsDialogWidBool *weeklyRecur =
748 addWidBool(i18n("Show ev. that recur weekly in date nav."), 743 addWidBool(i18n("Show ev. that recur weekly in date nav."),
749 &(KOPrefs::instance()->mWeeklyRecur),topFrame); 744 &(KOPrefs::instance()->mWeeklyRecur),topFrame);
750 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); 745 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0);
751 if ( QApplication::desktop()->width() > 640 ) { 746 if ( QApplication::desktop()->width() > 640 ) {
752 747
753 KPrefsDialogWidBool *enableToolTips = 748 KPrefsDialogWidBool *enableToolTips =
754 addWidBool(i18n("Enable tooltips displaying summary of ev."), 749 addWidBool(i18n("Enable tooltips displaying summary of ev."),
755 &(KOPrefs::instance()->mEnableToolTips),topFrame); 750 &(KOPrefs::instance()->mEnableToolTips),topFrame);
756 topLayout->addWidget(enableToolTips->checkBox(),ii++,0); 751 topLayout->addWidget(enableToolTips->checkBox(),ii++,0);
757 752
758 } 753 }
759 KPrefsDialogWidBool *passwdk = 754 KPrefsDialogWidBool *passwdk =
760 addWidBool(i18n("Show parent To-Do's in What's Next view"), 755 addWidBool(i18n("Show parent To-Do's in What's Next view"),
761 &(KOPrefs::instance()->mWNViewShowsParents),topFrame); 756 &(KOPrefs::instance()->mWNViewShowsParents),topFrame);
762 topLayout->addWidget(passwdk->checkBox(), ii++,0); 757 topLayout->addWidget(passwdk->checkBox(), ii++,0);
763 758
764 passwdk = 759 passwdk =
765 addWidBool(i18n("Show location in What's Next view"), 760 addWidBool(i18n("Show location in What's Next view"),
766 &(KOPrefs::instance()->mWNViewShowLocation),topFrame); 761 &(KOPrefs::instance()->mWNViewShowLocation),topFrame);
767 topLayout->addWidget(passwdk->checkBox(), ii++,0); 762 topLayout->addWidget(passwdk->checkBox(), ii++,0);
768 763
769 passwdk = 764 passwdk =
770 addWidBool(i18n("Show Sync Events in WN/Agenda view"), 765 addWidBool(i18n("Show Sync Events in WN/Agenda view"),
771 &(KOPrefs::instance()->mShowSyncEvents),topFrame); 766 &(KOPrefs::instance()->mShowSyncEvents),topFrame);
772 topLayout->addWidget(passwdk->checkBox(), ii++,0); 767 topLayout->addWidget(passwdk->checkBox(), ii++,0);
773 768
774 769
775 KPrefsDialogWidBool *marcusBainsEnabled = 770 KPrefsDialogWidBool *marcusBainsEnabled =
776 addWidBool(i18n("Show Marcus Bains line"), 771 addWidBool(i18n("Show Marcus Bains line"),
777 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); 772 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame);
778 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); 773 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0);
779 774
780 775
781 // topLayout->addWidget(hourSizeGroup,ii++,0); 776 // topLayout->addWidget(hourSizeGroup,ii++,0);
782 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); 777 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0);
783 //topLayout->setRowStretch(11,1); 778 //topLayout->setRowStretch(11,1);
784 779
785 780
786 781
787 782
788 783
789 784
790 topFrame = addPage(i18n("ViewChange"),0,0); 785 topFrame = addPage(i18n("ViewChange"),0,0);
791 // DesktopIcon("viewmag",KIcon::SizeMedium)); 786 // DesktopIcon("viewmag",KIcon::SizeMedium));
792 787
793 topLayout = new QGridLayout(topFrame,6,1); 788 topLayout = new QGridLayout(topFrame,6,1);
794 topLayout->setSpacing(spacingHint()); 789 topLayout->setSpacing(spacingHint());
795 topLayout->setMargin(marginHint()); 790 topLayout->setMargin(marginHint());
796 ii = 0; 791 ii = 0;
797 792
798 793
799 dummy = 794 dummy =
800 addWidBool(i18n("Hold fullscreen on view change"), 795 addWidBool(i18n("Hold fullscreen on view change"),
801 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); 796 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame);
802 topLayout->addWidget(dummy->checkBox(),ii++,0); 797 topLayout->addWidget(dummy->checkBox(),ii++,0);
803 798
804 dummy = 799 dummy =
805 addWidBool(i18n("Hold non-fullscreen on view change"), 800 addWidBool(i18n("Hold non-fullscreen on view change"),
806 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); 801 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame);
807 topLayout->addWidget(dummy->checkBox(),ii++,0); 802 topLayout->addWidget(dummy->checkBox(),ii++,0);
808 803
809 804
810 KPrefsDialogWidBool *fullViewTodo = 805 KPrefsDialogWidBool *fullViewTodo =
811 addWidBool(i18n("Event list view uses full window"), 806 addWidBool(i18n("Event list view uses full window"),
812 &(KOPrefs::instance()->mFullViewTodo),topFrame); 807 &(KOPrefs::instance()->mFullViewTodo),topFrame);
813 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); 808 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0);
814 809
815 KPrefsDialogWidBool *fullViewMonth = 810 KPrefsDialogWidBool *fullViewMonth =
816 addWidBool(i18n("Next days view uses full window"), 811 addWidBool(i18n("Next days view uses full window"),
817 &(KOPrefs::instance()->mFullViewMonth),topFrame); 812 &(KOPrefs::instance()->mFullViewMonth),topFrame);
818 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); 813 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0);
819 814
820 dummy = 815 dummy =
821 addWidBool(i18n("Set agenda to DayBeginsAt on change"), 816 addWidBool(i18n("Set agenda to DayBeginsAt on change"),
822 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); 817 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame);
823 topLayout->addWidget(dummy->checkBox(),ii++,0); 818 topLayout->addWidget(dummy->checkBox(),ii++,0);
824 819
825 dummy = 820 dummy =
826 addWidBool(i18n("Set agenda to current time on change"), 821 addWidBool(i18n("Set agenda to current time on change"),
827 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); 822 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame);
828 topLayout->addWidget(dummy->checkBox(),ii++,0); 823 topLayout->addWidget(dummy->checkBox(),ii++,0);
829 824
830 dummy = 825 dummy =
831 addWidBool(i18n("Listview uses monthly timespan"), 826 addWidBool(i18n("Listview uses monthly timespan"),
832 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); 827 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame);
833 topLayout->addWidget(dummy->checkBox(),ii++,0); 828 topLayout->addWidget(dummy->checkBox(),ii++,0);
834 dummy = 829 dummy =
835 addWidBool(i18n("Highlight selection in Time Edit"), 830 addWidBool(i18n("Highlight selection in Time Edit"),
836 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); 831 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame);
837 topLayout->addWidget( dummy->checkBox(), ii++,0); 832 topLayout->addWidget( dummy->checkBox(), ii++,0);
838 833
839 834
840 835
841 836
842 837
843 topFrame = addPage(i18n("Month View"),0,0); 838 topFrame = addPage(i18n("Month View"),0,0);
844 // DesktopIcon("viewmag",KIcon::SizeMedium)); 839 // DesktopIcon("viewmag",KIcon::SizeMedium));
845 840
846 topLayout = new QGridLayout(topFrame,5,1); 841 topLayout = new QGridLayout(topFrame,5,1);
847 topLayout->setSpacing(spacingHint()); 842 topLayout->setSpacing(spacingHint());
848 topLayout->setMargin(marginHint()); 843 topLayout->setMargin(marginHint());
849 ii = 0; 844 ii = 0;
850 QLabel *lab; 845 QLabel *lab;
851 QHBox *habo = new QHBox( topFrame ); 846 QHBox *habo = new QHBox( topFrame );
852 if ( QApplication::desktop()->width() < 320 ) { 847 if ( QApplication::desktop()->width() < 320 ) {
853 lab = new QLabel ( i18n("Show events that recur "), topFrame ); 848 lab = new QLabel ( i18n("Show events that recur "), topFrame );
854 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 849 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
855 ii++; 850 ii++;
856 851
857 } else { 852 } else {
858 new QLabel ( i18n("Show events that recur "), habo ); 853 new QLabel ( i18n("Show events that recur "), habo );
859 854
860 } 855 }
861 dailyRecur = 856 dailyRecur =
862 addWidBool(i18n("daily"), 857 addWidBool(i18n("daily"),
863 &(KOPrefs::instance()->mMonthDailyRecur),habo); 858 &(KOPrefs::instance()->mMonthDailyRecur),habo);
864 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 859 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
865 860
866 weeklyRecur = 861 weeklyRecur =
867 addWidBool(i18n("weekly"), 862 addWidBool(i18n("weekly"),
868 &(KOPrefs::instance()->mMonthWeeklyRecur),habo); 863 &(KOPrefs::instance()->mMonthWeeklyRecur),habo);
869 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 864 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
870 ii++; 865 ii++;
871 866
872 867
873 habo = new QHBox( topFrame ); 868 habo = new QHBox( topFrame );
874 if ( QApplication::desktop()->width() < 320 ) { 869 if ( QApplication::desktop()->width() < 320 ) {
875 lab = new QLabel (i18n("Show in every cell ") , topFrame ); 870 lab = new QLabel (i18n("Show in every cell ") , topFrame );
876 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 871 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
877 ii++; 872 ii++;
878 873
879 } else { 874 } else {
880 new QLabel ( i18n("Show in every cell "), habo ); 875 new QLabel ( i18n("Show in every cell "), habo );
881 } 876 }
882 weeklyRecur = 877 weeklyRecur =
883 addWidBool(i18n("short month"), 878 addWidBool(i18n("short month"),
884 &(KOPrefs::instance()->mMonthShowShort),habo); 879 &(KOPrefs::instance()->mMonthShowShort),habo);
885 weeklyRecur = 880 weeklyRecur =
886 addWidBool(i18n("icons"), 881 addWidBool(i18n("icons"),
887 &(KOPrefs::instance()->mMonthShowIcons),habo); 882 &(KOPrefs::instance()->mMonthShowIcons),habo);
888 883
889 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 884 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
890 ii++; 885 ii++;
891#ifdef DESKTOP_VERSION 886#ifdef DESKTOP_VERSION
892 KPrefsDialogWidBool *enableMonthScroll = 887 KPrefsDialogWidBool *enableMonthScroll =
893 addWidBool(i18n("Enable scrollbars in month view cells"), 888 addWidBool(i18n("Enable scrollbars in month view cells"),
894 &(KOPrefs::instance()->mEnableMonthScroll),topFrame); 889 &(KOPrefs::instance()->mEnableMonthScroll),topFrame);
895 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); 890 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0);
896#endif 891#endif
897 892
898 dummy = 893 dummy =
899 addWidBool(i18n("Show Sat/Sun together"), 894 addWidBool(i18n("Show Sat/Sun together"),
900 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); 895 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame);
901 topLayout->addWidget(dummy->checkBox(),ii++,0); 896 topLayout->addWidget(dummy->checkBox(),ii++,0);
902 897
903 KPrefsDialogWidBool *coloredCategoriesInMonthView = 898 KPrefsDialogWidBool *coloredCategoriesInMonthView =
904 addWidBool(i18n("Month view uses category colors"), 899 addWidBool(i18n("Month view uses category colors"),
905 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); 900 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame);
906 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 901 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
907 902
908 dummy = 903 dummy =
909 addWidBool(i18n("Categorie colors are applied to text"), 904 addWidBool(i18n("Categorie colors are applied to text"),
910 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); 905 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame);
911 topLayout->addWidget(dummy->checkBox(),ii++,0); 906 topLayout->addWidget(dummy->checkBox(),ii++,0);
912 coloredCategoriesInMonthView = 907 coloredCategoriesInMonthView =
913 addWidBool(i18n("Month view uses day colors"), 908 addWidBool(i18n("Month view uses day colors"),
914 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); 909 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame);
915 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 910 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
916 911
917 KPrefsWidColor *holidayColor = 912 KPrefsWidColor *holidayColor =
918 addWidColor(i18n("Day color odd months"), 913 addWidColor(i18n("Day color odd months"),
919 &(KOPrefs::instance()->mMonthViewOddColor),topFrame); 914 &(KOPrefs::instance()->mMonthViewOddColor),topFrame);
920 topLayout->addWidget(holidayColor->label(),ii,0); 915 topLayout->addWidget(holidayColor->label(),ii,0);
921 topLayout->addWidget(holidayColor->button(),ii++,1); 916 topLayout->addWidget(holidayColor->button(),ii++,1);
922 917
923 holidayColor = 918 holidayColor =
924 addWidColor(i18n("Day color even months"), 919 addWidColor(i18n("Day color even months"),
925 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); 920 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame);
926 topLayout->addWidget(holidayColor->label(),ii,0); 921 topLayout->addWidget(holidayColor->label(),ii,0);
927 topLayout->addWidget(holidayColor->button(),ii++,1); 922 topLayout->addWidget(holidayColor->button(),ii++,1);
928 923
929 924
930 holidayColor = 925 holidayColor =
931 addWidColor(i18n("Color for Sundays + category \"Holiday\""), 926 addWidColor(i18n("Color for Sundays + category \"Holiday\""),
932 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); 927 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame);
933 topLayout->addWidget(holidayColor->label(),ii,0); 928 topLayout->addWidget(holidayColor->label(),ii,0);
934 topLayout->addWidget(holidayColor->button(),ii++,1); 929 topLayout->addWidget(holidayColor->button(),ii++,1);
935 930
936 // *********************** Todo View 931 // *********************** Todo View
937 932
938 topFrame = addPage(i18n("Todo View"),0,0); 933 topFrame = addPage(i18n("Todo View"),0,0);
939 // DesktopIcon("viewmag",KIcon::SizeMedium)); 934 // DesktopIcon("viewmag",KIcon::SizeMedium));
940 935
941 topLayout = new QGridLayout(topFrame,4,1); 936 topLayout = new QGridLayout(topFrame,4,1);
942 topLayout->setSpacing(spacingHint()); 937 topLayout->setSpacing(spacingHint());
943 topLayout->setMargin(marginHint()); 938 topLayout->setMargin(marginHint());
944 ii = 0; 939 ii = 0;
945 940
946 KPrefsDialogWidBool *showCompletedTodo = 941 KPrefsDialogWidBool *showCompletedTodo =
947 addWidBool(i18n("To-do view shows completed Todos"), 942 addWidBool(i18n("To-do view shows completed Todos"),
948 &(KOPrefs::instance()->mShowCompletedTodo),topFrame); 943 &(KOPrefs::instance()->mShowCompletedTodo),topFrame);
949 topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); 944 topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0);
950 dummy = 945 dummy =
951 addWidBool(i18n("To-do view shows complete as 'xx %'"), 946 addWidBool(i18n("To-do view shows complete as 'xx %'"),
952 &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); 947 &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame);
953 topLayout->addWidget(dummy->checkBox(),ii++,0); 948 topLayout->addWidget(dummy->checkBox(),ii++,0);
954 949
955 dummy = 950 dummy =
956 addWidBool(i18n("Small To-do view uses smaller font"), 951 addWidBool(i18n("Small To-do view uses smaller font"),
957 &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); 952 &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame);
958 topLayout->addWidget(dummy->checkBox(),ii++,0); 953 topLayout->addWidget(dummy->checkBox(),ii++,0);
959 954
960 955
961 956
962 dummy = 957 dummy =
963 addWidBool(i18n("Todo view uses category colors"), 958 addWidBool(i18n("Todo view uses category colors"),
964 &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); 959 &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame);
965 topLayout->addWidget(dummy->checkBox(),ii++,0); 960 topLayout->addWidget(dummy->checkBox(),ii++,0);
966 961
967 962
968 QWidget* wid = new QWidget( topFrame ); 963 QWidget* wid = new QWidget( topFrame );
969 // Todo due today color 964 // Todo due today color
970 KPrefsWidColor *todoDueTodayColor = 965 KPrefsWidColor *todoDueTodayColor =
971 addWidColor(i18n("Todo due today color:"), 966 addWidColor(i18n("Todo due today color:"),
972 &(KOPrefs::instance()->mTodoDueTodayColor),wid); 967 &(KOPrefs::instance()->mTodoDueTodayColor),wid);
973 QHBoxLayout *widLayout = new QHBoxLayout(wid); 968 QHBoxLayout *widLayout = new QHBoxLayout(wid);
974 widLayout->addWidget( todoDueTodayColor->label() ); 969 widLayout->addWidget( todoDueTodayColor->label() );
975 widLayout->addWidget( todoDueTodayColor->button() ); 970 widLayout->addWidget( todoDueTodayColor->button() );
976 topLayout->addWidget(wid,ii++,0); 971 topLayout->addWidget(wid,ii++,0);
977 //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); 972 //topLayout->addWidget(todoDueTodayColor->button(),ii++,1);
978 973
979 // Todo overdue color 974 // Todo overdue color
980 wid = new QWidget( topFrame ); 975 wid = new QWidget( topFrame );
981 widLayout = new QHBoxLayout(wid); 976 widLayout = new QHBoxLayout(wid);
982 KPrefsWidColor *todoOverdueColor = 977 KPrefsWidColor *todoOverdueColor =
983 addWidColor(i18n("Todo overdue color:"), 978 addWidColor(i18n("Todo overdue color:"),
984 &(KOPrefs::instance()->mTodoOverdueColor),wid); 979 &(KOPrefs::instance()->mTodoOverdueColor),wid);
985 widLayout->addWidget(todoOverdueColor->label()); 980 widLayout->addWidget(todoOverdueColor->label());
986 widLayout->addWidget(todoOverdueColor->button()); 981 widLayout->addWidget(todoOverdueColor->button());
987 topLayout->addWidget(wid,ii++,0); 982 topLayout->addWidget(wid,ii++,0);
988 983
989 dummy = 984 dummy =
990 addWidBool(i18n("Colors are applied to text"), 985 addWidBool(i18n("Colors are applied to text"),
991 &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); 986 &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame);
992 topLayout->addWidget(dummy->checkBox(),ii++,0); 987 topLayout->addWidget(dummy->checkBox(),ii++,0);
993 988
994 dummy = 989 dummy =
995 addWidBool(i18n("Allday Agenda view shows todos"), 990 addWidBool(i18n("Allday Agenda view shows todos"),
996 &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); 991 &(KOPrefs::instance()->mShowTodoInAgenda),topFrame);
997 topLayout->addWidget(dummy->checkBox(),ii++,0); 992 topLayout->addWidget(dummy->checkBox(),ii++,0);
998 993
999 994
1000 995
1001 996
1002 topFrame = addPage(i18n("Alarm"),0,0); 997 topFrame = addPage(i18n("Alarm"),0,0);
1003 // DesktopIcon("viewmag",KIcon::SizeMedium)); 998 // DesktopIcon("viewmag",KIcon::SizeMedium));
1004 999
1005 topLayout = new QGridLayout(topFrame,2,1); 1000 topLayout = new QGridLayout(topFrame,2,1);
1006 topLayout->setSpacing(spacingHint()); 1001 topLayout->setSpacing(spacingHint());
1007 topLayout->setMargin(marginHint()); 1002 topLayout->setMargin(marginHint());
1008 int iii = 0; 1003 int iii = 0;
1009 1004
1010 dummy = 1005 dummy =
1011 addWidBool(i18n("Use internal alarm notification"), 1006 addWidBool(i18n("Use internal alarm notification"),
1012 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); 1007 &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame);
1013 topLayout->addWidget(dummy->checkBox(),iii++,0); 1008 topLayout->addWidget(dummy->checkBox(),iii++,0);
1014 lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); 1009 lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame);
1015 1010
1016 topLayout->addWidget(lab ,iii++,0); 1011 topLayout->addWidget(lab ,iii++,0);
1017#ifndef DESKTOP_VERSION 1012#ifndef DESKTOP_VERSION
1018 lab->setAlignment( AlignLeft|WordBreak|AlignTop); 1013 lab->setAlignment( AlignLeft|WordBreak|AlignTop);
1019#else 1014#else
1020 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 1015 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
1021 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 1016 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
1022#endif 1017#endif
1023 1018
1024 QHBox* dummyBox = new QHBox(topFrame); 1019 QHBox* dummyBox = new QHBox(topFrame);
1025 new QLabel(i18n("Play beeps count:"),dummyBox); 1020 new QLabel(i18n("Play beeps count:"),dummyBox);
1026 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); 1021 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox);
1027 topLayout->addWidget(dummyBox,iii++,0); 1022 topLayout->addWidget(dummyBox,iii++,0);
1028 1023
1029 dummyBox = new QHBox(topFrame); 1024 dummyBox = new QHBox(topFrame);
1030 new QLabel(i18n("Beeps interval in sec:"),dummyBox); 1025 new QLabel(i18n("Beeps interval in sec:"),dummyBox);
1031 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); 1026 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox);
1032 topLayout->addWidget(dummyBox,iii++,0); 1027 topLayout->addWidget(dummyBox,iii++,0);
1033 1028
1034 dummyBox = new QHBox(topFrame); 1029 dummyBox = new QHBox(topFrame);
1035 new QLabel(i18n("Default suspend time in min:"),dummyBox); 1030 new QLabel(i18n("Default suspend time in min:"),dummyBox);
1036 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); 1031 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox);
1037 topLayout->addWidget(dummyBox,iii++,0); 1032 topLayout->addWidget(dummyBox,iii++,0);
1038 1033
1039 dummyBox = new QHBox(topFrame); 1034 dummyBox = new QHBox(topFrame);
1040 new QLabel(i18n("Auto suspend count:"),dummyBox); 1035 new QLabel(i18n("Auto suspend count:"),dummyBox);
1041 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); 1036 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox);
1042 topLayout->addWidget(dummyBox,iii++,0); 1037 topLayout->addWidget(dummyBox,iii++,0);
1043 1038
1044 1039
1045 1040
1046 1041
1047 1042
1048 1043
1049 1044
1050 QHBox* hbo = new QHBox ( topFrame ); 1045 QHBox* hbo = new QHBox ( topFrame );
1051 mDefaultAlarmFile = new QLineEdit(hbo); 1046 mDefaultAlarmFile = new QLineEdit(hbo);
1052 QPushButton * loadTemplate = new QPushButton(hbo); 1047 QPushButton * loadTemplate = new QPushButton(hbo);
1053 QPixmap icon; 1048 QPixmap icon;
1054 if ( QApplication::desktop()->width() < 321 ) 1049 if ( QApplication::desktop()->width() < 321 )
1055 icon = SmallIcon("fileimport16"); 1050 icon = SmallIcon("fileimport16");
1056 else 1051 else
1057 icon = SmallIcon("fileimport"); 1052 icon = SmallIcon("fileimport");
1058 loadTemplate->setIconSet (icon ) ; 1053 loadTemplate->setIconSet (icon ) ;
1059 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) ); 1054 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) );
1060 int size = loadTemplate->sizeHint().height(); 1055 int size = loadTemplate->sizeHint().height();
1061 loadTemplate->setFixedSize( size, size ); 1056 loadTemplate->setFixedSize( size, size );
1062 //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame); 1057 //lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame);
1063 // topLayout->addWidget(lab ,iii++,0); 1058 // topLayout->addWidget(lab ,iii++,0);
1064 lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame); 1059 lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame);
1065 topLayout->addWidget(lab ,iii++,0); 1060 topLayout->addWidget(lab ,iii++,0);
1066 topLayout->addWidget(hbo,iii++,0); 1061 topLayout->addWidget(hbo,iii++,0);
1067 // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame); 1062 // lab = new QLabel( i18n("Note: This does not mean, that for every alarm this file is replayed. This file here is associated with a newly created alarm."), topFrame);
1068 1063
1069// topLayout->addWidget(lab ,iii++,0); 1064// topLayout->addWidget(lab ,iii++,0);
1070// #ifndef DESKTOP_VERSION 1065// #ifndef DESKTOP_VERSION
1071// lab->setAlignment( AlignLeft|WordBreak|AlignTop); 1066// lab->setAlignment( AlignLeft|WordBreak|AlignTop);
1072// #else 1067// #else
1073// lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 1068// lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
1074// lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 1069// lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
1075// #endif 1070// #endif
1076 1071
1077 1072
1078} 1073}
1079 1074
1080void KOPrefsDialog::selectSoundFile() 1075void KOPrefsDialog::selectSoundFile()
1081{ 1076{
1082 QString fileName = mDefaultAlarmFile->text(); 1077 QString fileName = mDefaultAlarmFile->text();
1083 fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this ); 1078 fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this );
1084 if ( fileName.length() > 0 ) 1079 if ( fileName.length() > 0 )
1085 mDefaultAlarmFile->setText( fileName ); 1080 mDefaultAlarmFile->setText( fileName );
1086} 1081}
1087void KOPrefsDialog::setupFontsTab() 1082void KOPrefsDialog::setupFontsTab()
1088{ 1083{
1089 1084
1090 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 1085 QFrame *topFrame = addPage(i18n("Fonts"),0,0);
1091 // DesktopIcon("fonts",KIcon::SizeMedium)); 1086 // DesktopIcon("fonts",KIcon::SizeMedium));
1092 1087
1093 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 1088 QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
1094 topLayout->setSpacing(1); 1089 topLayout->setSpacing(1);
1095 topLayout->setMargin(3); 1090 topLayout->setMargin(3);
1096 KPrefsDialogWidFont * tVFont; 1091 KPrefsDialogWidFont * tVFont;
1097 int i = 0; 1092 int i = 0;
1098 KPrefsDialogWidFont *timeLabelsFont = 1093 KPrefsDialogWidFont *timeLabelsFont =
1099 addWidFont(i18n("23"),i18n("DateNavigator:(nr)"), 1094 addWidFont(i18n("23"),i18n("DateNavigator:(nr)"),
1100 &(KOPrefs::instance()->mDateNavigatorFont),topFrame); 1095 &(KOPrefs::instance()->mDateNavigatorFont),topFrame);
1101 topLayout->addWidget(timeLabelsFont->label(),i,0); 1096 topLayout->addWidget(timeLabelsFont->label(),i,0);
1102 topLayout->addWidget(timeLabelsFont->preview(),i,1); 1097 topLayout->addWidget(timeLabelsFont->preview(),i,1);
1103 topLayout->addWidget(timeLabelsFont->button(),i,2); 1098 topLayout->addWidget(timeLabelsFont->button(),i,2);
1104 ++i; 1099 ++i;
1105 1100
1106 1101
1107 timeLabelsFont = 1102 timeLabelsFont =
1108 addWidFont(i18n("Mon 15"),i18n("Date Labels:"), 1103 addWidFont(i18n("Mon 15"),i18n("Date Labels:"),
1109 &(KOPrefs::instance()->mTimeLabelsFont),topFrame); 1104 &(KOPrefs::instance()->mTimeLabelsFont),topFrame);
1110 topLayout->addWidget(timeLabelsFont->label(),i,0); 1105 topLayout->addWidget(timeLabelsFont->label(),i,0);
1111 topLayout->addWidget(timeLabelsFont->preview(),i,1); 1106 topLayout->addWidget(timeLabelsFont->preview(),i,1);
1112 topLayout->addWidget(timeLabelsFont->button(),i,2); 1107 topLayout->addWidget(timeLabelsFont->button(),i,2);
1113 ++i; 1108 ++i;
1114 1109
1115 KPrefsDialogWidFont *timeBarFont = 1110 KPrefsDialogWidFont *timeBarFont =
1116 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"), 1111 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)),i18n("Time bar:"),
1117 &(KOPrefs::instance()->mTimeBarFont),topFrame); 1112 &(KOPrefs::instance()->mTimeBarFont),topFrame);
1118 topLayout->addWidget(timeBarFont->label(),i,0); 1113 topLayout->addWidget(timeBarFont->label(),i,0);
1119 topLayout->addWidget(timeBarFont->preview(),i,1); 1114 topLayout->addWidget(timeBarFont->preview(),i,1);
1120 topLayout->addWidget(timeBarFont->button(),i,2); 1115 topLayout->addWidget(timeBarFont->button(),i,2);
1121 ++i; 1116 ++i;
1122 1117
1123 1118
1124 KPrefsDialogWidFont *marcusBainsFont = 1119 KPrefsDialogWidFont *marcusBainsFont =
1125 addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"), 1120 addWidFont(KGlobal::locale()->formatTime(QTime(12,34,23)),i18n("M. Bains line:"),
1126 &(KOPrefs::instance()->mMarcusBainsFont),topFrame); 1121 &(KOPrefs::instance()->mMarcusBainsFont),topFrame);
1127 topLayout->addWidget(marcusBainsFont->label(),i,0); 1122 topLayout->addWidget(marcusBainsFont->label(),i,0);
1128 topLayout->addWidget(marcusBainsFont->preview(),i,1); 1123 topLayout->addWidget(marcusBainsFont->preview(),i,1);
1129 topLayout->addWidget(marcusBainsFont->button(),i,2); 1124 topLayout->addWidget(marcusBainsFont->button(),i,2);
1130 ++i; 1125 ++i;
1131 1126
1132 tVFont = 1127 tVFont =
1133 addWidFont(i18n("Summary"),i18n("Event Viewer:"), 1128 addWidFont(i18n("Summary"),i18n("Event Viewer:"),
1134 &(KOPrefs::instance()->mEventViewFont),topFrame); 1129 &(KOPrefs::instance()->mEventViewFont),topFrame);
1135 topLayout->addWidget(tVFont->label(),i,0); 1130 topLayout->addWidget(tVFont->label(),i,0);
1136 topLayout->addWidget(tVFont->preview(),i,1); 1131 topLayout->addWidget(tVFont->preview(),i,1);
1137 topLayout->addWidget(tVFont->button(),i,2); 1132 topLayout->addWidget(tVFont->button(),i,2);
1138 ++i; 1133 ++i;
1139 1134
1140 1135
1141 1136
1142 tVFont = 1137 tVFont =
1143 addWidFont(i18n("Details"),i18n("EditorBox:"), 1138 addWidFont(i18n("Details"),i18n("EditorBox:"),
1144 &(KOPrefs::instance()->mEditBoxFont),topFrame); 1139 &(KOPrefs::instance()->mEditBoxFont),topFrame);
1145 topLayout->addWidget(tVFont->label(),i,0); 1140 topLayout->addWidget(tVFont->label(),i,0);
1146 topLayout->addWidget(tVFont->preview(),i,1); 1141 topLayout->addWidget(tVFont->preview(),i,1);
1147 topLayout->addWidget(tVFont->button(),i,2); 1142 topLayout->addWidget(tVFont->button(),i,2);
1148 ++i; 1143 ++i;
1149 1144
1150 1145
1151 1146
1152 topLayout->setColStretch(1,1); 1147 topLayout->setColStretch(1,1);
1153 topLayout->setRowStretch(4,1); 1148 topLayout->setRowStretch(4,1);
1154 1149
1155 1150
1156 i = 0; 1151 i = 0;
1157 topFrame = addPage(i18n("View Fonts"),0, 1152 topFrame = addPage(i18n("View Fonts"),0,
1158 DesktopIcon("fonts",KIcon::SizeMedium)); 1153 DesktopIcon("fonts",KIcon::SizeMedium));
1159 1154
1160 topLayout = new QGridLayout(topFrame,7,3); 1155 topLayout = new QGridLayout(topFrame,7,3);
1161 topLayout->setSpacing(1); 1156 topLayout->setSpacing(1);
1162 topLayout->setMargin(3); 1157 topLayout->setMargin(3);
1163 1158
1164 tVFont = 1159 tVFont =
1165 addWidFont(i18n("Configure KO"),i18n("What's Next View:"), 1160 addWidFont(i18n("Configure KO"),i18n("What's Next View:"),
1166 &(KOPrefs::instance()->mWhatsNextFont),topFrame); 1161 &(KOPrefs::instance()->mWhatsNextFont),topFrame);
1167 topLayout->addWidget(tVFont->label(),i,0); 1162 topLayout->addWidget(tVFont->label(),i,0);
1168 topLayout->addWidget(tVFont->preview(),i,1); 1163 topLayout->addWidget(tVFont->preview(),i,1);
1169 topLayout->addWidget(tVFont->button(),i,2); 1164 topLayout->addWidget(tVFont->button(),i,2);
1170 ++i; 1165 ++i;
1171 KPrefsDialogWidFont *agendaViewFont = 1166 KPrefsDialogWidFont *agendaViewFont =
1172 addWidFont(i18n("Event text"),i18n("Agenda view:"), 1167 addWidFont(i18n("Event text"),i18n("Agenda view:"),
1173 &(KOPrefs::instance()->mAgendaViewFont),topFrame); 1168 &(KOPrefs::instance()->mAgendaViewFont),topFrame);
1174 topLayout->addWidget(agendaViewFont->label(),i,0); 1169 topLayout->addWidget(agendaViewFont->label(),i,0);
1175 topLayout->addWidget(agendaViewFont->preview(),i,1); 1170 topLayout->addWidget(agendaViewFont->preview(),i,1);
1176 topLayout->addWidget(agendaViewFont->button(),i,2); 1171 topLayout->addWidget(agendaViewFont->button(),i,2);
1177 ++i; 1172 ++i;
1178 1173
1179 1174
1180 KPrefsDialogWidFont *monthViewFont = 1175 KPrefsDialogWidFont *monthViewFont =
1181 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"), 1176 addWidFont(KGlobal::locale()->formatTime(QTime(12,34)) + " " + i18n("Event"),
1182 i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame); 1177 i18n("Month view:"),&(KOPrefs::instance()->mMonthViewFont),topFrame);
1183 topLayout->addWidget(monthViewFont->label(),i,0); 1178 topLayout->addWidget(monthViewFont->label(),i,0);
1184 topLayout->addWidget(monthViewFont->preview(),i,1); 1179 topLayout->addWidget(monthViewFont->preview(),i,1);
1185 topLayout->addWidget(monthViewFont->button(),i,2); 1180 topLayout->addWidget(monthViewFont->button(),i,2);
1186 ++i; 1181 ++i;
1187 1182
1188 1183
1189 KPrefsDialogWidFont *lVFont = 1184 KPrefsDialogWidFont *lVFont =
1190 addWidFont(i18n("Event"),i18n("List View:"), 1185 addWidFont(i18n("Event"),i18n("List View:"),
1191 &(KOPrefs::instance()->mListViewFont),topFrame); 1186 &(KOPrefs::instance()->mListViewFont),topFrame);
1192 topLayout->addWidget(lVFont->label(),i,0); 1187 topLayout->addWidget(lVFont->label(),i,0);
1193 topLayout->addWidget(lVFont->preview(),i,1); 1188 topLayout->addWidget(lVFont->preview(),i,1);
1194 topLayout->addWidget(lVFont->button(),i,2); 1189 topLayout->addWidget(lVFont->button(),i,2);
1195 ++i; 1190 ++i;
1196 1191
1197 1192
1198 tVFont = 1193 tVFont =
1199 addWidFont(i18n("ToDo"),i18n("ToDoView:"), 1194 addWidFont(i18n("ToDo"),i18n("ToDoView:"),
1200 &(KOPrefs::instance()->mTodoViewFont),topFrame); 1195 &(KOPrefs::instance()->mTodoViewFont),topFrame);
1201 topLayout->addWidget(tVFont->label(),i,0); 1196 topLayout->addWidget(tVFont->label(),i,0);
1202 topLayout->addWidget(tVFont->preview(),i,1); 1197 topLayout->addWidget(tVFont->preview(),i,1);
1203 topLayout->addWidget(tVFont->button(),i,2); 1198 topLayout->addWidget(tVFont->button(),i,2);
1204 ++i; 1199 ++i;
1205 1200
1206 1201
1207 tVFont = 1202 tVFont =
1208 addWidFont(i18n("Today"),i18n("JournalView:"), 1203 addWidFont(i18n("Today"),i18n("JournalView:"),
1209 &(KOPrefs::instance()->mJornalViewFont),topFrame); 1204 &(KOPrefs::instance()->mJornalViewFont),topFrame);
1210 topLayout->addWidget(tVFont->label(),i,0); 1205 topLayout->addWidget(tVFont->label(),i,0);
1211 topLayout->addWidget(tVFont->preview(),i,1); 1206 topLayout->addWidget(tVFont->preview(),i,1);
1212 topLayout->addWidget(tVFont->button(),i,2); 1207 topLayout->addWidget(tVFont->button(),i,2);
1213 ++i; 1208 ++i;
1214 1209
1215 1210
1216 1211
1217 1212
1218 topLayout->setColStretch(1,1); 1213 topLayout->setColStretch(1,1);
1219 topLayout->setRowStretch(4,1); 1214 topLayout->setRowStretch(4,1);
1220 1215
1221 1216
1222 1217
1223 1218
1224} 1219}
1225 1220
1226void KOPrefsDialog::setupColorsTab() 1221void KOPrefsDialog::setupColorsTab()
1227{ 1222{
1228 QFrame *topFrame = addPage(i18n("Colors"),0,0); 1223 QFrame *topFrame = addPage(i18n("Colors"),0,0);
1229 // DesktopIcon("colorize",KIcon::SizeMedium)); 1224 // DesktopIcon("colorize",KIcon::SizeMedium));
1230 1225
1231 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1226 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1232 // topLayout->setSpacing(spacingHint()); 1227 // topLayout->setSpacing(spacingHint());
1233 // topLayout->setMargin(marginHint()); 1228 // topLayout->setMargin(marginHint());
1234 1229
1235 topLayout->setSpacing(2); 1230 topLayout->setSpacing(2);
1236 topLayout->setMargin(3); 1231 topLayout->setMargin(3);
1237 1232
1238 int ii = 1; 1233 int ii = 1;
1239 QGroupBox *categoryGroup ; 1234 QGroupBox *categoryGroup ;
1240 1235
1241 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), 1236 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"),
1242 topFrame); 1237 topFrame);
1243 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); 1238 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1);
1244 1239
1245 mCategoryCombo = new QComboBox(categoryGroup); 1240 mCategoryCombo = new QComboBox(categoryGroup);
1246 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1241 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1247 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); 1242 connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor()));
1248 1243
1249 mCategoryButton = new KColorButton(categoryGroup); 1244 mCategoryButton = new KColorButton(categoryGroup);
1250 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); 1245 connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor()));
1251 updateCategoryColor(); 1246 updateCategoryColor();
1252 1247
1253 1248
1254 // Holiday Color 1249 // Holiday Color
1255 1250
1256 KPrefsWidColor *holidayColor = 1251 KPrefsWidColor *holidayColor =
1257 addWidColor(i18n("Holiday color:"), 1252 addWidColor(i18n("Holiday color:"),
1258 &(KOPrefs::instance()->mHolidayColor),topFrame); 1253 &(KOPrefs::instance()->mHolidayColor),topFrame);
1259 topLayout->addWidget(holidayColor->label(),ii,0); 1254 topLayout->addWidget(holidayColor->label(),ii,0);
1260 topLayout->addWidget(holidayColor->button(),ii++,1); 1255 topLayout->addWidget(holidayColor->button(),ii++,1);
1261 1256
1262 // Highlight Color 1257 // Highlight Color
1263 KPrefsWidColor *highlightColor = 1258 KPrefsWidColor *highlightColor =
1264 addWidColor(i18n("Highlight color:"), 1259 addWidColor(i18n("Highlight color:"),
1265 &(KOPrefs::instance()->mHighlightColor),topFrame); 1260 &(KOPrefs::instance()->mHighlightColor),topFrame);
1266 topLayout->addWidget(highlightColor->label(),ii,0); 1261 topLayout->addWidget(highlightColor->label(),ii,0);
1267 topLayout->addWidget(highlightColor->button(),ii++,1); 1262 topLayout->addWidget(highlightColor->button(),ii++,1);
1268 1263
1269 // Event color 1264 // Event color
1270 KPrefsWidColor *eventColor = 1265 KPrefsWidColor *eventColor =
1271 addWidColor(i18n("Default event color:"), 1266 addWidColor(i18n("Default event color:"),
1272 &(KOPrefs::instance()->mEventColor),topFrame); 1267 &(KOPrefs::instance()->mEventColor),topFrame);
1273 topLayout->addWidget(eventColor->label(),ii,0); 1268 topLayout->addWidget(eventColor->label(),ii,0);
1274 topLayout->addWidget(eventColor->button(),ii++,1); 1269 topLayout->addWidget(eventColor->button(),ii++,1);
1275 1270
1276 // agenda view background color 1271 // agenda view background color
1277 KPrefsWidColor *agendaBgColor = 1272 KPrefsWidColor *agendaBgColor =
1278 addWidColor(i18n("Agenda view background color:"), 1273 addWidColor(i18n("Agenda view background color:"),
1279 &(KOPrefs::instance()->mAgendaBgColor),topFrame); 1274 &(KOPrefs::instance()->mAgendaBgColor),topFrame);
1280 topLayout->addWidget(agendaBgColor->label(),ii,0); 1275 topLayout->addWidget(agendaBgColor->label(),ii,0);
1281 topLayout->addWidget(agendaBgColor->button(),ii++,1); 1276 topLayout->addWidget(agendaBgColor->button(),ii++,1);
1282 1277
1283 // working hours color 1278 // working hours color
1284 KPrefsWidColor *workingHoursColor = 1279 KPrefsWidColor *workingHoursColor =
1285 addWidColor(i18n("Working hours color:"), 1280 addWidColor(i18n("Working hours color:"),
1286 &(KOPrefs::instance()->mWorkingHoursColor),topFrame); 1281 &(KOPrefs::instance()->mWorkingHoursColor),topFrame);
1287 topLayout->addWidget(workingHoursColor->label(),ii,0); 1282 topLayout->addWidget(workingHoursColor->label(),ii,0);
1288 topLayout->addWidget(workingHoursColor->button(),ii++,1); 1283 topLayout->addWidget(workingHoursColor->button(),ii++,1);
1289 1284
1290 KPrefsDialogWidBool *sb = 1285 KPrefsDialogWidBool *sb =
1291 addWidBool(i18n("Use colors for application:"), 1286 addWidBool(i18n("Use colors for application:"),
1292 &(KOPrefs::instance()->mUseAppColors),topFrame); 1287 &(KOPrefs::instance()->mUseAppColors),topFrame);
1293 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); 1288 topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 );
1294 1289
1295 ii++; 1290 ii++;
1296 KPrefsWidColor * workingHoursColor1 = 1291 KPrefsWidColor * workingHoursColor1 =
1297 addWidColor(i18n("Buttons, menus, etc.:"), 1292 addWidColor(i18n("Buttons, menus, etc.:"),
1298 &(KOPrefs::instance()->mAppColor1),topFrame); 1293 &(KOPrefs::instance()->mAppColor1),topFrame);
1299 topLayout->addWidget(workingHoursColor1->label(),ii,0); 1294 topLayout->addWidget(workingHoursColor1->label(),ii,0);
1300 topLayout->addWidget(workingHoursColor1->button(),ii++,1); 1295 topLayout->addWidget(workingHoursColor1->button(),ii++,1);
1301 1296
1302 KPrefsWidColor * workingHoursColor2 = 1297 KPrefsWidColor * workingHoursColor2 =
1303 addWidColor(i18n("Frames, labels, etc.:"), 1298 addWidColor(i18n("Frames, labels, etc.:"),
1304 &(KOPrefs::instance()->mAppColor2),topFrame); 1299 &(KOPrefs::instance()->mAppColor2),topFrame);
1305 topLayout->addWidget(workingHoursColor2->label(),ii,0); 1300 topLayout->addWidget(workingHoursColor2->label(),ii,0);
1306 topLayout->addWidget(workingHoursColor2->button(),ii++,1); 1301 topLayout->addWidget(workingHoursColor2->button(),ii++,1);
1307 1302
1308 1303
1309 1304
1310} 1305}
1311 1306
1312void KOPrefsDialog::setCategoryColor() 1307void KOPrefsDialog::setCategoryColor()
1313{ 1308{
1314 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); 1309 mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color()));
1315} 1310}
1316 1311
1317void KOPrefsDialog::updateCategoryColor() 1312void KOPrefsDialog::updateCategoryColor()
1318{ 1313{
1319 QString cat = mCategoryCombo->currentText(); 1314 QString cat = mCategoryCombo->currentText();
1320 QColor *color = mCategoryDict.find(cat); 1315 QColor *color = mCategoryDict.find(cat);
1321 if (!color) { 1316 if (!color) {
1322 color = KOPrefs::instance()->categoryColor(cat); 1317 color = KOPrefs::instance()->categoryColor(cat);
1323 } 1318 }
1324 if (color) { 1319 if (color) {
1325 mCategoryButton->setColor(*color); 1320 mCategoryButton->setColor(*color);
1326 } 1321 }
1327} 1322}
1328 1323
1329void KOPrefsDialog::setupPrinterTab() 1324void KOPrefsDialog::setupPrinterTab()
1330{ 1325{
1331 mPrinterTab = addPage(i18n("Printing"),0, 1326 mPrinterTab = addPage(i18n("Printing"),0,
1332 DesktopIcon("fileprint",KIcon::SizeMedium)); 1327 DesktopIcon("fileprint",KIcon::SizeMedium));
1333 1328
1334 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); 1329 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2);
1335 topLayout->setSpacing(spacingHint()); 1330 topLayout->setSpacing(spacingHint());
1336 topLayout->setMargin(marginHint()); 1331 topLayout->setMargin(marginHint());
1337 1332
1338 topLayout->setRowStretch(4,1); 1333 topLayout->setRowStretch(4,1);
1339} 1334}
1340 1335
1341void KOPrefsDialog::setupGroupSchedulingTab() 1336void KOPrefsDialog::setupGroupSchedulingTab()
1342{ 1337{
1343#if 0 1338#if 0
1344 QFrame *topFrame = addPage(i18n("Group Scheduling"),0, 1339 QFrame *topFrame = addPage(i18n("Group Scheduling"),0,
1345 DesktopIcon("personal",KIcon::SizeMedium)); 1340 DesktopIcon("personal",KIcon::SizeMedium));
1346 1341
1347 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 1342 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
1348 topLayout->setSpacing(spacingHint()); 1343 topLayout->setSpacing(spacingHint());
1349 topLayout->setMargin(marginHint()); 1344 topLayout->setMargin(marginHint());
1350 1345
1351#if 0 1346#if 0
1352 KPrefsWidRadios *schedulerGroup = 1347 KPrefsWidRadios *schedulerGroup =
1353 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), 1348 addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler),
1354 topFrame); 1349 topFrame);
1355 schedulerGroup->addRadio("Dummy"); // Only for debugging 1350 schedulerGroup->addRadio("Dummy"); // Only for debugging
1356 schedulerGroup->addRadio(i18n("Mail client")); 1351 schedulerGroup->addRadio(i18n("Mail client"));
1357 1352
1358 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); 1353 topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1);
1359#endif 1354#endif
1360 1355
1361 KPrefsWidRadios *sendGroup = 1356 KPrefsWidRadios *sendGroup =
1362 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), 1357 addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend),
1363 topFrame); 1358 topFrame);
1364 sendGroup->addRadio(i18n("Send to outbox")); 1359 sendGroup->addRadio(i18n("Send to outbox"));
1365 sendGroup->addRadio(i18n("Send directly")); 1360 sendGroup->addRadio(i18n("Send directly"));
1366 1361
1367 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); 1362 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1);
1368 1363
1369 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); 1364 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1);
1370 mAMails = new QListView(topFrame); 1365 mAMails = new QListView(topFrame);
1371 mAMails->addColumn(i18n("Email"),300); 1366 mAMails->addColumn(i18n("Email"),300);
1372 topLayout->addMultiCellWidget(mAMails,3,3,0,1); 1367 topLayout->addMultiCellWidget(mAMails,3,3,0,1);
1373 1368
1374 topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); 1369 topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0);
1375 aEmailsEdit = new QLineEdit(topFrame); 1370 aEmailsEdit = new QLineEdit(topFrame);
1376 aEmailsEdit->setEnabled(false); 1371 aEmailsEdit->setEnabled(false);
1377 topLayout->addWidget(aEmailsEdit,4,1); 1372 topLayout->addWidget(aEmailsEdit,4,1);
1378 1373
1379 QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); 1374 QPushButton *add = new QPushButton(i18n("New"),topFrame,"new");
1380 topLayout->addWidget(add,5,0); 1375 topLayout->addWidget(add,5,0);
1381 QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); 1376 QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove");
1382 topLayout->addWidget(del,5,1); 1377 topLayout->addWidget(del,5,1);
1383 1378
1384 //topLayout->setRowStretch(2,1); 1379 //topLayout->setRowStretch(2,1);
1385 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); 1380 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) );
1386 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); 1381 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) );
1387 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); 1382 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem()));
1388 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); 1383 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput()));
1389#endif 1384#endif
1390} 1385}
1391 1386
1392void KOPrefsDialog::setupGroupAutomationTab() 1387void KOPrefsDialog::setupGroupAutomationTab()
1393{ 1388{
1394 return; 1389 return;
1395 QFrame *topFrame = addPage(i18n("Group Automation"),0, 1390 QFrame *topFrame = addPage(i18n("Group Automation"),0,
1396 DesktopIcon("personal",KIcon::SizeMedium)); 1391 DesktopIcon("personal",KIcon::SizeMedium));
1397 1392
1398 QGridLayout *topLayout = new QGridLayout(topFrame,5,1); 1393 QGridLayout *topLayout = new QGridLayout(topFrame,5,1);
1399 topLayout->setSpacing(spacingHint()); 1394 topLayout->setSpacing(spacingHint());
1400 topLayout->setMargin(marginHint()); 1395 topLayout->setMargin(marginHint());
1401 1396
1402 KPrefsWidRadios *autoRefreshGroup = 1397 KPrefsWidRadios *autoRefreshGroup =
1403 addWidRadios(i18n("Auto Send Refresh"), 1398 addWidRadios(i18n("Auto Send Refresh"),
1404 &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); 1399 &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame);
1405 autoRefreshGroup->addRadio(i18n("Never")); 1400 autoRefreshGroup->addRadio(i18n("Never"));
1406 autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); 1401 autoRefreshGroup->addRadio(i18n("If attendee is in addressbook"));
1407 //autoRefreshGroup->addRadio(i18n("selected emails")); 1402 //autoRefreshGroup->addRadio(i18n("selected emails"));
1408 topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); 1403 topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0);
1409 1404
1410 KPrefsWidRadios *autoInsertGroup = 1405 KPrefsWidRadios *autoInsertGroup =
1411 addWidRadios(i18n("Auto Insert IMIP Replies"), 1406 addWidRadios(i18n("Auto Insert IMIP Replies"),
1412 &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); 1407 &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame);
1413 autoInsertGroup->addRadio(i18n("Never")); 1408 autoInsertGroup->addRadio(i18n("Never"));
1414 autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); 1409 autoInsertGroup->addRadio(i18n("If attendee is in addressbook"));
1415 //autoInsertGroup->addRadio(i18n("selected emails")); 1410 //autoInsertGroup->addRadio(i18n("selected emails"));
1416 topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); 1411 topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0);
1417 1412
1418 KPrefsWidRadios *autoRequestGroup = 1413 KPrefsWidRadios *autoRequestGroup =
1419 addWidRadios(i18n("Auto Insert IMIP Requests"), 1414 addWidRadios(i18n("Auto Insert IMIP Requests"),
1420 &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); 1415 &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame);
1421 autoRequestGroup->addRadio(i18n("Never")); 1416 autoRequestGroup->addRadio(i18n("Never"));
1422 autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); 1417 autoRequestGroup->addRadio(i18n("If organizer is in addressbook"));
1423 //autoInsertGroup->addRadio(i18n("selected emails")); 1418 //autoInsertGroup->addRadio(i18n("selected emails"));
1424 topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); 1419 topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0);
1425 1420
1426 KPrefsWidRadios *autoFreeBusyGroup = 1421 KPrefsWidRadios *autoFreeBusyGroup =
1427 addWidRadios(i18n("Auto Send FreeBusy Information"), 1422 addWidRadios(i18n("Auto Send FreeBusy Information"),
1428 &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); 1423 &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame);
1429 autoFreeBusyGroup->addRadio(i18n("Never")); 1424 autoFreeBusyGroup->addRadio(i18n("Never"));
1430 autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); 1425 autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook"));
1431 //autoFreeBusyGroup->addRadio(i18n("selected emails")); 1426 //autoFreeBusyGroup->addRadio(i18n("selected emails"));
1432 topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); 1427 topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0);
1433 1428
1434 KPrefsWidRadios *autoFreeBusyReplyGroup = 1429 KPrefsWidRadios *autoFreeBusyReplyGroup =
1435 addWidRadios(i18n("Auto Save FreeBusy Replies"), 1430 addWidRadios(i18n("Auto Save FreeBusy Replies"),
1436 &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); 1431 &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame);
1437 autoFreeBusyReplyGroup->addRadio(i18n("Never")); 1432 autoFreeBusyReplyGroup->addRadio(i18n("Never"));
1438 autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); 1433 autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook"));
1439 //autoFreeBusyGroup->addRadio(i18n("selected emails")); 1434 //autoFreeBusyGroup->addRadio(i18n("selected emails"));
1440 topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); 1435 topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0);
1441} 1436}
1442 1437
1443void KOPrefsDialog::showPrinterTab() 1438void KOPrefsDialog::showPrinterTab()
1444{ 1439{
1445 showPage(pageIndex(mPrinterTab)); 1440 showPage(pageIndex(mPrinterTab));
1446} 1441}
1447 1442
1448 1443
1449void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text, 1444void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text,
1450 const QStringList *tags) 1445 const QStringList *tags)
1451{ 1446{
1452 if (tags) { 1447 if (tags) {
1453 int i = tags->findIndex(text); 1448 int i = tags->findIndex(text);
1454 if (i > 0) combo->setCurrentItem(i); 1449 if (i > 0) combo->setCurrentItem(i);
1455 } else { 1450 } else {
1456 for(int i=0;i<combo->count();++i) { 1451 for(int i=0;i<combo->count();++i) {
1457 if (combo->text(i) == text) { 1452 if (combo->text(i) == text) {
1458 combo->setCurrentItem(i); 1453 combo->setCurrentItem(i);
1459 break; 1454 break;
1460 } 1455 }
1461 } 1456 }
1462 } 1457 }
1463} 1458}
1464 1459
1465void KOPrefsDialog::usrReadConfig() 1460void KOPrefsDialog::usrReadConfig()
1466{ 1461{
1467 mNameEdit->setText(KOPrefs::instance()->fullName()); 1462 mNameEdit->setText(KOPrefs::instance()->fullName());
1468 mEmailEdit->setText(KOPrefs::instance()->email()); 1463 mEmailEdit->setText(KOPrefs::instance()->email());
1469 1464
1470 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); 1465 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval);
1471 QDate current ( 2001, 1,1); 1466 QDate current ( 2001, 1,1);
1472 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1467 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1473 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1468 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1474 setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId)); 1469 setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId));
1475 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1470 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1476 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); 1471 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime);
1477 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration); 1472 mDefaultDurationSpin->setValue(KOPrefs::instance()->mDefaultDuration);
1478 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); 1473 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime);
1479 // if (KOPrefs::instance()->mAllDaySize > 47 ) 1474 // if (KOPrefs::instance()->mAllDaySize > 47 )
1480 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2; 1475 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2;
1481 //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize); 1476 //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize);
1482 1477
1483 mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays); 1478 mNextXDaysSpin->setValue(KOPrefs::instance()->mNextXDays);
1484 mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays); 1479 mWhatsNextSpin->setValue(KOPrefs::instance()->mWhatsNextDays);
1485 mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); 1480 mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios);
1486 // mAMails->clear(); 1481 // mAMails->clear();
1487 // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); 1482 // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin();
1488// it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { 1483// it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) {
1489// QListViewItem *item = new QListViewItem(mAMails); 1484// QListViewItem *item = new QListViewItem(mAMails);
1490// item->setText(0,*it); 1485// item->setText(0,*it);
1491// mAMails->insertItem(item); 1486// mAMails->insertItem(item);
1492// } 1487// }
1493 1488
1494 // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP); 1489 // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP);
1495 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser); 1490 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser);
1496 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd); 1491 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd);
1497 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile); 1492 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile);
1498 1493
1499 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); 1494 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile);
1500 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); 1495 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile);
1501 QString dummy = KOPrefs::instance()->mUserDateFormatLong; 1496 QString dummy = KOPrefs::instance()->mUserDateFormatLong;
1502 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); 1497 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
1503 dummy = KOPrefs::instance()->mUserDateFormatShort; 1498 dummy = KOPrefs::instance()->mUserDateFormatShort;
1504 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); 1499 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
1505 updateCategories(); 1500 updateCategories();
1506 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); 1501 mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps );
1507 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); 1502 mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime );
1508 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); 1503 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount );
1509 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); 1504 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
1510} 1505}
1511 1506
1512 1507
1513void KOPrefsDialog::usrWriteConfig() 1508void KOPrefsDialog::usrWriteConfig()
1514{ 1509{
1515 1510
1516 // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text(); 1511 // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text();
1517 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text(); 1512 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text();
1518 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text(); 1513 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text();
1519 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text(); 1514 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text();
1520 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text(); 1515 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text();
1521 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); 1516 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
1522 1517
1523 KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); 1518 KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
1524 KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); 1519 KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
1525 KOPrefs::instance()->setFullName(mNameEdit->text()); 1520 KOPrefs::instance()->setFullName(mNameEdit->text());
1526 KOPrefs::instance()->setEmail(mEmailEdit->text()); 1521 KOPrefs::instance()->setEmail(mEmailEdit->text());
1527 1522
1528 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); 1523 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value();
1529 1524
1530 KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText(); 1525 KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText();
1531 QDate date; 1526 QDate date;
1532 date = mStartDateSavingEdit->date(); 1527 date = mStartDateSavingEdit->date();
1533 int sub = 0; 1528 int sub = 0;
1534 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1529 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1535 sub = 1; 1530 sub = 1;
1536 KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub; 1531 KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub;
1537 date = mEndDateSavingEdit->date(); 1532 date = mEndDateSavingEdit->date();
1538 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 1533 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1539 sub = 1; 1534 sub = 1;
1540 else 1535 else
1541 sub = 0; 1536 sub = 0;
1542 KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub; 1537 KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub;
1543 // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value(); 1538 // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value();
1544 1539
1545 KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); 1540 KOPrefs::instance()->mStartTime = mStartTimeSpin->value();
1546 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); 1541 KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value();
1547 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); 1542 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem();
1548 1543
1549 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); 1544 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value();
1550 1545
1551 QDictIterator<QColor> it(mCategoryDict); 1546 QDictIterator<QColor> it(mCategoryDict);
1552 while (it.current()) { 1547 while (it.current()) {
1553 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); 1548 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current());
1554 ++it; 1549 ++it;
1555 } 1550 }
1556 1551
1557 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); 1552 KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value();
1558 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); 1553 KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value();
1559 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); 1554 KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value();
1560 1555
1561 KOPrefs::instance()->mAdditionalMails.clear(); 1556 KOPrefs::instance()->mAdditionalMails.clear();
1562 // QListViewItem *item; 1557 // QListViewItem *item;
1563 // item = mAMails->firstChild(); 1558 // item = mAMails->firstChild();
1564 // while (item) 1559 // while (item)
1565 // { 1560 // {
1566 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); 1561 // KOPrefs::instance()->mAdditionalMails.append( item->text(0) );
1567 // item = item->nextSibling(); 1562 // item = item->nextSibling();
1568 // } 1563 // }
1569 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); 1564 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value();
1570 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; 1565 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
1571 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; 1566 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
1572 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; 1567 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
1573 1568
1574} 1569}
1575 1570
1576void KOPrefsDialog::updateCategories() 1571void KOPrefsDialog::updateCategories()
1577{ 1572{
1578 mCategoryCombo->clear(); 1573 mCategoryCombo->clear();
1579 mCategoryDict.clear(); 1574 mCategoryDict.clear();
1580 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); 1575 mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
1581 updateCategoryColor(); 1576 updateCategoryColor();
1582} 1577}
1583 1578
1584void KOPrefsDialog::warningGroupScheduling() 1579void KOPrefsDialog::warningGroupScheduling()
1585{ 1580{
1586 warningExperimental(mEnableGroupScheduling->checkBox()->isChecked()); 1581 warningExperimental(mEnableGroupScheduling->checkBox()->isChecked());
1587} 1582}
1588 1583
1589void KOPrefsDialog::warningProjectView() 1584void KOPrefsDialog::warningProjectView()
1590{ 1585{
1591 warningExperimental(mEnableProjectView->checkBox()->isChecked()); 1586 warningExperimental(mEnableProjectView->checkBox()->isChecked());
1592} 1587}
1593 1588
1594void KOPrefsDialog::warningExperimental(bool on) 1589void KOPrefsDialog::warningExperimental(bool on)
1595{ 1590{
1596 if (on) { 1591 if (on) {
1597 KMessageBox::information(this,i18n("This is an experimental feature. " 1592 KMessageBox::information(this,i18n("This is an experimental feature. "
1598 "It may not work, it may do nothing useful and it may cause data loss. " 1593 "It may not work, it may do nothing useful and it may cause data loss. "
1599 "Use with care.\n" 1594 "Use with care.\n"
1600 "You have to restart KOrganizer for this setting to take effect.")); 1595 "You have to restart KOrganizer for this setting to take effect."));
1601 } else { 1596 } else {
1602 KMessageBox::information(this, 1597 KMessageBox::information(this,
1603 i18n("You have to restart KOrganizer for this setting to take effect.")); 1598 i18n("You have to restart KOrganizer for this setting to take effect."));
1604 } 1599 }
1605} 1600}
1606 1601
1607void KOPrefsDialog::toggleEmailSettings(bool on) 1602void KOPrefsDialog::toggleEmailSettings(bool on)
1608{ 1603{
1609 if (on) { 1604 if (on) {
1610 mEmailEdit->setEnabled(false); 1605 mEmailEdit->setEnabled(false);
1611 mNameEdit->setEnabled(false); 1606 mNameEdit->setEnabled(false);
1612 mEmailLabel->setEnabled(false); 1607 mEmailLabel->setEnabled(false);
1613 mNameLabel->setEnabled(false); 1608 mNameLabel->setEnabled(false);
1614 1609
1615 KEMailSettings settings; 1610 KEMailSettings settings;
1616 mNameEdit->setText(settings.getSetting(KEMailSettings::RealName)); 1611 mNameEdit->setText(settings.getSetting(KEMailSettings::RealName));
1617 mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress)); 1612 mEmailEdit->setText(settings.getSetting(KEMailSettings::EmailAddress));
1618 } else { 1613 } else {
1619 mEmailEdit->setEnabled(true); 1614 mEmailEdit->setEnabled(true);
1620 mNameEdit->setEnabled(true); 1615 mNameEdit->setEnabled(true);
1621 mEmailLabel->setEnabled(true); 1616 mEmailLabel->setEnabled(true);
1622 mNameLabel->setEnabled(true); 1617 mNameLabel->setEnabled(true);
1623 } 1618 }
1624} 1619}
1625 1620
1626void KOPrefsDialog::addItem() 1621void KOPrefsDialog::addItem()
1627{ 1622{
1628 // aEmailsEdit->setEnabled(true); 1623 // aEmailsEdit->setEnabled(true);
1629// QListViewItem *item = new QListViewItem(mAMails); 1624// QListViewItem *item = new QListViewItem(mAMails);
1630// mAMails->insertItem(item); 1625// mAMails->insertItem(item);
1631// mAMails->setSelected(item,true); 1626// mAMails->setSelected(item,true);
1632// aEmailsEdit->setText(i18n("(EmptyEmail)")); 1627// aEmailsEdit->setText(i18n("(EmptyEmail)"));
1633} 1628}
1634 1629
1635void KOPrefsDialog::removeItem() 1630void KOPrefsDialog::removeItem()
1636{ 1631{
1637// QListViewItem *item; 1632// QListViewItem *item;
1638// item = mAMails->selectedItem(); 1633// item = mAMails->selectedItem();
1639// if (!item) return; 1634// if (!item) return;
1640// mAMails->takeItem(item); 1635// mAMails->takeItem(item);
1641// item = mAMails->selectedItem(); 1636// item = mAMails->selectedItem();
1642// if (!item) { 1637// if (!item) {
1643// aEmailsEdit->setText(""); 1638// aEmailsEdit->setText("");
1644// aEmailsEdit->setEnabled(false); 1639// aEmailsEdit->setEnabled(false);
1645// } 1640// }
1646// if (mAMails->childCount() == 0) { 1641// if (mAMails->childCount() == 0) {
1647// aEmailsEdit->setEnabled(false); 1642// aEmailsEdit->setEnabled(false);
1648// } 1643// }
1649} 1644}
1650 1645
1651void KOPrefsDialog::updateItem() 1646void KOPrefsDialog::updateItem()
1652{ 1647{
1653 // QListViewItem *item; 1648 // QListViewItem *item;
1654// item = mAMails->selectedItem(); 1649// item = mAMails->selectedItem();
1655// if (!item) return; 1650// if (!item) return;
1656// item->setText(0,aEmailsEdit->text()); 1651// item->setText(0,aEmailsEdit->text());
1657} 1652}
1658 1653
1659void KOPrefsDialog::updateInput() 1654void KOPrefsDialog::updateInput()
1660{ 1655{
1661// QListViewItem *item; 1656// QListViewItem *item;
1662// item = mAMails->selectedItem(); 1657// item = mAMails->selectedItem();
1663// if (!item) return; 1658// if (!item) return;
1664// aEmailsEdit->setEnabled(true); 1659// aEmailsEdit->setEnabled(true);
1665// aEmailsEdit->setText(item->text(0)); 1660// aEmailsEdit->setText(item->text(0));
1666} 1661}
1667void KOPrefsDialog::updateTimezoneOffset( int index ) 1662void KOPrefsDialog::updateTimezoneOffset( int index )
1668{ 1663{
1669 /* 1664 /*
1670 qDebug("updateTimezoneOffset %d ", index); 1665 qDebug("updateTimezoneOffset %d ", index);
1671 if ( index < 24 ) { 1666 if ( index < 24 ) {
1672 mTimezoneOffsetSpin->setEnabled ( false ); 1667 mTimezoneOffsetSpin->setEnabled ( false );
1673 mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); 1668 mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 );
1674 1669
1675 1670
1676 } else { 1671 } else {
1677 if ( index == 24 ) { 1672 if ( index == 24 ) {
1678 mTimezoneOffsetSpin->setEnabled ( true ); 1673 mTimezoneOffsetSpin->setEnabled ( true );
1679 mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); 1674 mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1680 1675
1681 } else { 1676 } else {
1682 mTimezoneOffsetSpin->setEnabled ( false ); 1677 mTimezoneOffsetSpin->setEnabled ( false );
1683 mTimezoneOffsetSpin->setValue( 0 ); 1678 mTimezoneOffsetSpin->setValue( 0 );
1684 } 1679 }
1685 } 1680 }
1686 */ 1681 */
1687} 1682}
1688 1683
1689void KOPrefsDialog::setupTimeZoneTab() 1684void KOPrefsDialog::setupTimeZoneTab()
1690{ 1685{
1691 QFrame *topFrame = addPage(i18n("Time Zone"),0,0); 1686 QFrame *topFrame = addPage(i18n("Time Zone"),0,0);
1692 // DesktopIcon("clock",KIcon::SizeMedium)); 1687 // DesktopIcon("clock",KIcon::SizeMedium));
1693 1688
1694 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1689 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1695 topLayout->setSpacing(spacingHint()); 1690 topLayout->setSpacing(spacingHint());
1696 topLayout->setMargin(marginHint()); 1691 topLayout->setMargin(marginHint());
1697 1692
1698 QHBox *timeZoneBox = new QHBox( topFrame ); 1693 QHBox *timeZoneBox = new QHBox( topFrame );
1699 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 1694 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
1700 1695
1701 new QLabel( i18n("Timezone:"), timeZoneBox ); 1696 new QLabel( i18n("Timezone:"), timeZoneBox );
1702 mTimeZoneCombo = new QComboBox( timeZoneBox ); 1697 mTimeZoneCombo = new QComboBox( timeZoneBox );
1703 if ( QApplication::desktop()->width() < 300 ) { 1698 if ( QApplication::desktop()->width() < 300 ) {
1704 mTimeZoneCombo->setMaximumWidth(150); 1699 mTimeZoneCombo->setMaximumWidth(150);
1705 } 1700 }
1706 1701
1707 QStringList list; 1702 QStringList list;
1708 list = KGlobal::locale()->timeZoneList(); 1703 list = KGlobal::locale()->timeZoneList();
1709 mTimeZoneCombo->insertStringList(list); 1704 mTimeZoneCombo->insertStringList(list);
1710 1705
1711 // find the currently set time zone and select it 1706 // find the currently set time zone and select it
1712 QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; 1707 QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId;
1713 int nCurrentlySet = 11; 1708 int nCurrentlySet = 11;
1714 for (int i = 0; i < mTimeZoneCombo->count(); i++) 1709 for (int i = 0; i < mTimeZoneCombo->count(); i++)
1715 { 1710 {
1716 if (mTimeZoneCombo->text(i) == sCurrentlySet) 1711 if (mTimeZoneCombo->text(i) == sCurrentlySet)
1717 { 1712 {
1718 nCurrentlySet = i; 1713 nCurrentlySet = i;
1719 break; 1714 break;
1720 } 1715 }
1721 } 1716 }
1722 mTimeZoneCombo->setCurrentItem(nCurrentlySet); 1717 mTimeZoneCombo->setCurrentItem(nCurrentlySet);
1723 int iii = 1; 1718 int iii = 1;
1724 KPrefsDialogWidBool *sb = 1719 KPrefsDialogWidBool *sb =
1725 addWidBool(i18n("Timezone has daylight saving"), 1720 addWidBool(i18n("Timezone has daylight saving"),
1726 &(KOPrefs::instance()->mUseDaylightsaving),topFrame); 1721 &(KOPrefs::instance()->mUseDaylightsaving),topFrame);
1727 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); 1722 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
1728 ++iii; 1723 ++iii;
1729 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); 1724 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame );
1730 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 1725 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
1731 ++iii; 1726 ++iii;
1732 lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); 1727 lab = new QLabel( i18n("The year in the date is ignored."), topFrame );
1733 topLayout->addMultiCellWidget(lab, iii,iii,0,1); 1728 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
1734 ++iii; 1729 ++iii;
1735 lab = new QLabel( i18n("Daylight start:"), topFrame ); 1730 lab = new QLabel( i18n("Daylight start:"), topFrame );
1736 topLayout->addWidget(lab, iii,0); 1731 topLayout->addWidget(lab, iii,0);
1737 mStartDateSavingEdit = new KDateEdit(topFrame); 1732 mStartDateSavingEdit = new KDateEdit(topFrame);
1738 topLayout->addWidget(mStartDateSavingEdit, iii,1); 1733 topLayout->addWidget(mStartDateSavingEdit, iii,1);
1739 ++iii; 1734 ++iii;
1740 1735
1741 lab = new QLabel( i18n("Daylight end:"), topFrame ); 1736 lab = new QLabel( i18n("Daylight end:"), topFrame );
1742 topLayout->addWidget(lab, iii,0); 1737 topLayout->addWidget(lab, iii,0);
1743 mEndDateSavingEdit = new KDateEdit(topFrame); 1738 mEndDateSavingEdit = new KDateEdit(topFrame);
1744 topLayout->addWidget(mEndDateSavingEdit, iii,1); 1739 topLayout->addWidget(mEndDateSavingEdit, iii,1);
1745 ++iii; 1740 ++iii;
1746 QDate current ( 2001, 1,1); 1741 QDate current ( 2001, 1,1);
1747 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1)); 1742 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1748 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1)); 1743 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1749 1744
1750 1745
1751} 1746}
1752#endif 1747#endif
diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h
index a0416ae..7fa9261 100644
--- a/kmicromail/koprefsdialog.h
+++ b/kmicromail/koprefsdialog.h
@@ -1,180 +1,179 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#ifndef _KOPREFSDIALOG_H 23#ifndef _KOPREFSDIALOG_H
24#define _KOPREFSDIALOG_H 24#define _KOPREFSDIALOG_H
25 25
26#include <qframe.h> 26#include <qframe.h>
27#include <qdict.h> 27#include <qdict.h>
28#include <qcolor.h> 28#include <qcolor.h>
29#include <qlistview.h> 29#include <qlistview.h>
30 30
31#include <kdialogbase.h> 31#include <kdialogbase.h>
32 32
33#include <libkdepim/kprefsdialog.h> 33#include <libkdepim/kprefsdialog.h>
34#include <libkdepim/kdateedit.h> 34#include <libkdepim/kdateedit.h>
35#include <kcmconfigs/kdepimconfigwidget.h> 35#include <kcmconfigs/kdepimconfigwidget.h>
36 36
37class KColorButton; 37class KColorButton;
38class QSpinBox; 38class QSpinBox;
39class QSlider; 39class QSlider;
40class KURLRequester; 40class KURLRequester;
41class QComboBox; 41class QComboBox;
42class QLineEdit; 42class QLineEdit;
43class QStringList; 43class QStringList;
44 44
45/** Dialog to change the korganizer configuration. 45/** Dialog to change the korganizer configuration.
46 */ 46 */
47class KOPrefsDialog : public KPrefsDialog 47class KOPrefsDialog : public KPrefsDialog
48{ 48{
49 Q_OBJECT 49 Q_OBJECT
50 public: 50 public:
51 /** Initialize dialog and pages */ 51 /** Initialize dialog and pages */
52 KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false); 52 KOPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false);
53 ~KOPrefsDialog(); 53 ~KOPrefsDialog();
54 54
55protected: 55protected:
56 void usrReadConfig(); 56 void usrReadConfig();
57 void usrWriteConfig(); 57 void usrWriteConfig();
58 58
59 void setupMainTab(); 59 void setupMainTab();
60 void setupGlobalTab(); 60 void setupGlobalTab();
61 void setupMailTab(); 61 void setupMailTab();
62 void setupFontsTab(); 62 void setupFontsTab();
63 private: 63 private:
64 KDEPIMConfigWidget* kdelibcfg;
65 QLineEdit *mNameEdit; 64 QLineEdit *mNameEdit;
66 QLineEdit *mCodecEdit; 65 QLineEdit *mCodecEdit;
67 QLineEdit *mEmailEdit; 66 QLineEdit *mEmailEdit;
68 QLabel *mNameLabel; 67 QLabel *mNameLabel;
69 QLabel *mEmailLabel; 68 QLabel *mEmailLabel;
70#if 0 69#if 0
71 /* 70 /*
72 public slots: 71 public slots:
73 void showPrinterTab(); 72 void showPrinterTab();
74 73
75 74
76 void updateCategories(); 75 void updateCategories();
77 void showSyncPage(); 76 void showSyncPage();
78 protected slots: 77 protected slots:
79 void selectSoundFile(); 78 void selectSoundFile();
80 void setCategoryColor(); 79 void setCategoryColor();
81 void updateCategoryColor(); 80 void updateCategoryColor();
82 void updateTimezoneOffset( int ); 81 void updateTimezoneOffset( int );
83 82
84 83
85 void warningExperimental(bool on); 84 void warningExperimental(bool on);
86 void warningGroupScheduling(); 85 void warningGroupScheduling();
87 void warningProjectView(); 86 void warningProjectView();
88 87
89 void toggleEmailSettings(bool); 88 void toggleEmailSettings(bool);
90 89
91 //additional emails 90 //additional emails
92 void addItem(); 91 void addItem();
93 void removeItem(); 92 void removeItem();
94 void updateItem(); 93 void updateItem();
95 void updateInput(); 94 void updateInput();
96*/ 95*/
97 protected: 96 protected:
98 void usrReadConfig(); 97 void usrReadConfig();
99 void usrWriteConfig(); 98 void usrWriteConfig();
100 99
101 void setupMainTab(); 100 void setupMainTab();
102 void setupTimeTab(); 101 void setupTimeTab();
103 void setupTimeZoneTab(); 102 void setupTimeZoneTab();
104 void setupLocaleTab(); 103 void setupLocaleTab();
105 void setupLocaleDateTab(); 104 void setupLocaleDateTab();
106 void setupFontsTab(); 105 void setupFontsTab();
107 void setupColorsTab(); 106 void setupColorsTab();
108 void setupViewsTab(); 107 void setupViewsTab();
109 void setupDisplayTab(); 108 void setupDisplayTab();
110 void setupPrinterTab(); 109 void setupPrinterTab();
111 void setupGroupSchedulingTab(); 110 void setupGroupSchedulingTab();
112 void setupGroupAutomationTab(); 111 void setupGroupAutomationTab();
113 void setupSyncTab(); 112 void setupSyncTab();
114 void setupSyncAlgTab(); 113 void setupSyncAlgTab();
115 114
116 void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0); 115 void setCombo(QComboBox *combo,const QString & text, const QStringList *tags = 0);
117 116
118 117
119 private: 118 private:
120 KPrefsWidBool *mEnableGroupScheduling; 119 KPrefsWidBool *mEnableGroupScheduling;
121 KPrefsWidBool *mEnableProjectView; 120 KPrefsWidBool *mEnableProjectView;
122 121
123 QFrame *mPrinterTab; 122 QFrame *mPrinterTab;
124 123
125 QLineEdit *nameEdit; 124 QLineEdit *nameEdit;
126 QLineEdit *emailEdit; 125 QLineEdit *emailEdit;
127 126
128 QComboBox *timeCombo; 127 QComboBox *timeCombo;
129 QComboBox *tzCombo; 128 QComboBox *tzCombo;
130 129
131 // widgets holding preferences data 130 // widgets holding preferences data
132 QLineEdit *mNameEdit; 131 QLineEdit *mNameEdit;
133 QLineEdit *mEmailEdit; 132 QLineEdit *mEmailEdit;
134 QLabel *mNameLabel; 133 QLabel *mNameLabel;
135 QLabel *mEmailLabel; 134 QLabel *mEmailLabel;
136 QLineEdit *mAdditionalEdit; 135 QLineEdit *mAdditionalEdit;
137 QSpinBox *mAutoSaveIntervalSpin; 136 QSpinBox *mAutoSaveIntervalSpin;
138 QSpinBox *mPrioSpin; 137 QSpinBox *mPrioSpin;
139 // QListView *mAMails; 138 // QListView *mAMails;
140 QLineEdit *aEmailsEdit; 139 QLineEdit *aEmailsEdit;
141 140
142 QComboBox *mTimeZoneCombo; 141 QComboBox *mTimeZoneCombo;
143 QStringList tzonenames; 142 QStringList tzonenames;
144 QSpinBox *mStartTimeSpin; 143 QSpinBox *mStartTimeSpin;
145 QSpinBox *mDefaultDurationSpin; 144 QSpinBox *mDefaultDurationSpin;
146 QComboBox *mAlarmTimeCombo; 145 QComboBox *mAlarmTimeCombo;
147 146
148 QComboBox *mCategoryCombo; 147 QComboBox *mCategoryCombo;
149 KColorButton *mCategoryButton; 148 KColorButton *mCategoryButton;
150 QDict<QColor> mCategoryDict; 149 QDict<QColor> mCategoryDict;
151 150
152 QSlider *mHourSizeSlider; 151 QSlider *mHourSizeSlider;
153 152
154 QSpinBox *mNextXDaysSpin; 153 QSpinBox *mNextXDaysSpin;
155 QSpinBox *mWhatsNextSpin; 154 QSpinBox *mWhatsNextSpin;
156 155
157 QLineEdit * mRemoteIPEdit; 156 QLineEdit * mRemoteIPEdit;
158 QLineEdit * mRemoteUser; 157 QLineEdit * mRemoteUser;
159 QLineEdit * mRemotePassWd; 158 QLineEdit * mRemotePassWd;
160 QLineEdit * mRemoteFile; 159 QLineEdit * mRemoteFile;
161 QLineEdit * mLocalTempFile; 160 QLineEdit * mLocalTempFile;
162 QWidget* mSetupSyncAlgTab; 161 QWidget* mSetupSyncAlgTab;
163 QLineEdit * mUserDateFormatLong; 162 QLineEdit * mUserDateFormatLong;
164 QLineEdit * mUserDateFormatShort; 163 QLineEdit * mUserDateFormatShort;
165 164
166 QSpinBox *mTimezoneOffsetSpin; 165 QSpinBox *mTimezoneOffsetSpin;
167 QSpinBox *mDaylightsavingStart; 166 QSpinBox *mDaylightsavingStart;
168 QSpinBox *mDaylightsavingEnd; 167 QSpinBox *mDaylightsavingEnd;
169 KDateEdit* mStartDateSavingEdit; 168 KDateEdit* mStartDateSavingEdit;
170 KDateEdit* mEndDateSavingEdit; 169 KDateEdit* mEndDateSavingEdit;
171 QSpinBox * mAlarmPlayBeeps; 170 QSpinBox * mAlarmPlayBeeps;
172 QSpinBox * mAlarmSuspendTime; 171 QSpinBox * mAlarmSuspendTime;
173 QSpinBox * mAlarmSuspendCount; 172 QSpinBox * mAlarmSuspendCount;
174 QSpinBox * mAlarmBeepInterval; 173 QSpinBox * mAlarmBeepInterval;
175 174
176 QLineEdit * mDefaultAlarmFile; 175 QLineEdit * mDefaultAlarmFile;
177#endif 176#endif
178}; 177};
179 178
180#endif 179#endif
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 9a52d1b..e3c5ec3 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -1,416 +1,429 @@
1 1
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qvbox.h> 4#include <qvbox.h>
5#include <qheader.h> 5#include <qheader.h>
6#include <qtimer.h> 6#include <qtimer.h>
7#include <qlayout.h> 7#include <qlayout.h>
8//#include <kdialog.h> 8//#include <kdialog.h>
9#include <kiconloader.h> 9#include <kiconloader.h>
10#include <kapplication.h> 10#include <kapplication.h>
11 11
12#ifdef DESKTOP_VERSION 12#ifdef DESKTOP_VERSION
13#include <qapplication.h> 13#include <qapplication.h>
14#include <qstatusbar.h> 14#include <qstatusbar.h>
15#include <kabc/stdaddressbook.h> 15#include <kabc/stdaddressbook.h>
16extern QStatusBar* globalSstatusBarMainWindow; 16extern QStatusBar* globalSstatusBarMainWindow;
17#else 17#else
18#include <qpe/qpeapplication.h> 18#include <qpe/qpeapplication.h>
19#include <klocale.h> 19#include <klocale.h>
20#endif 20#endif
21#include "defines.h" 21#include "defines.h"
22#include "koprefs.h" 22#include "koprefs.h"
23#include "mainwindow.h" 23#include "mainwindow.h"
24#include "mailistviewitem.h" 24#include "mailistviewitem.h"
25#include <KDGanttMinimizeSplitter.h> 25#include <KDGanttMinimizeSplitter.h>
26 26
27#include "koprefs.h" 27#include "koprefs.h"
28 28
29MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 29MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
30 : QMainWindow( parent, name ) //, flags ) 30 : QMainWindow( parent, name ) //, flags )
31{ 31{
32#ifdef DESKTOP_VERSION 32#ifdef DESKTOP_VERSION
33 globalSstatusBarMainWindow = statusBar(); 33 globalSstatusBarMainWindow = statusBar();
34#endif 34#endif
35 setCaption( i18n( "KOpieMail/Pi" ) ); 35 setCaption( i18n( "KOpieMail/Pi" ) );
36 setToolBarsMovable( false ); 36 setToolBarsMovable( false );
37 //KABC::StdAddressBook::self(); 37 //KABC::StdAddressBook::self();
38 toolBar = new QToolBar( this ); 38 toolBar = new QToolBar( this );
39 menuBar = new QPEMenuBar( toolBar ); 39 menuBar = new QPEMenuBar( toolBar );
40 mailMenu = new QPopupMenu( menuBar ); 40 mailMenu = new QPopupMenu( menuBar );
41 menuBar->insertItem( i18n( "Mail" ), mailMenu ); 41 menuBar->insertItem( i18n( "Mail" ), mailMenu );
42 settingsMenu = new QPopupMenu( menuBar ); 42 settingsMenu = new QPopupMenu( menuBar );
43 menuBar->insertItem( i18n( "Settings" ), settingsMenu ); 43 menuBar->insertItem( i18n( "Settings" ), settingsMenu );
44 44
45 addToolBar( toolBar ); 45 addToolBar( toolBar );
46 toolBar->setHorizontalStretchable( true ); 46 toolBar->setHorizontalStretchable( true );
47 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), 47 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"),
48 0, 0, this ); 48 0, 0, this );
49 connect(getMail, SIGNAL( activated() ), 49 connect(getMail, SIGNAL( activated() ),
50 SLOT( slotGetAllMail() ) ); 50 SLOT( slotGetAllMail() ) );
51 getMail->addTo( mailMenu ); 51 getMail->addTo( mailMenu );
52 52
53 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), 53 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"),
54 0, 0, this ); 54 0, 0, this );
55 getMail->addTo( toolBar ); 55 getMail->addTo( toolBar );
56 getMail->addTo( mailMenu ); 56 getMail->addTo( mailMenu );
57 connect(getMail, SIGNAL( activated() ), 57 connect(getMail, SIGNAL( activated() ),
58 SLOT( slotGetMail() ) ); 58 SLOT( slotGetMail() ) );
59 59
60 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), 60 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"),
61 0, 0, this ); 61 0, 0, this );
62 composeMail->addTo( toolBar ); 62 composeMail->addTo( toolBar );
63 composeMail->addTo( mailMenu ); 63 composeMail->addTo( mailMenu );
64 64
65 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , 65 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") ,
66 0, 0, this ); 66 0, 0, this );
67 sendQueued->addTo( toolBar ); 67 sendQueued->addTo( toolBar );
68 sendQueued->addTo( mailMenu ); 68 sendQueued->addTo( mailMenu );
69 69
70 /* 70 /*
71 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, 71 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC,
72 0, 0, this ); 72 0, 0, this );
73 syncFolders->addTo( toolBar ); 73 syncFolders->addTo( toolBar );
74 syncFolders->addTo( mailMenu ); 74 syncFolders->addTo( mailMenu );
75 */ 75 */
76 76
77 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , 77 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") ,
78 0, 0, this, 0, true ); 78 0, 0, this, 0, true );
79 showFolders->addTo( toolBar ); 79 showFolders->addTo( toolBar );
80 showFolders->addTo( mailMenu ); 80 showFolders->addTo( mailMenu );
81 showFolders->setOn( true ); 81 showFolders->setOn( true );
82 connect(showFolders, SIGNAL( toggled(bool) ), 82 connect(showFolders, SIGNAL( toggled(bool) ),
83 SLOT( slotShowFolders(bool) ) ); 83 SLOT( slotShowFolders(bool) ) );
84 84
85 /* 85 /*
86 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), 86 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ),
87 0, 0, this ); 87 0, 0, this );
88 searchMails->kopddTo( toolBar ); 88 searchMails->kopddTo( toolBar );
89 searchMails->addTo( mailMenu ); 89 searchMails->addTo( mailMenu );
90 */ 90 */
91 91
92 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); 92 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this);
93 deleteMails->addTo( toolBar ); 93 deleteMails->addTo( toolBar );
94 deleteMails->addTo( mailMenu ); 94 deleteMails->addTo( mailMenu );
95 connect( deleteMails, SIGNAL( activated() ), 95 connect( deleteMails, SIGNAL( activated() ),
96 SLOT( slotDeleteAllMail() ) ); 96 SLOT( slotDeleteAllMail() ) );
97 97
98 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , 98 editSettings = new QAction( i18n( "Configure OM/Pi..." ), SmallIcon("SettingsIcon") ,
99 0, 0, this ); 99 0, 0, this );
100 editSettings->addTo( settingsMenu ); 100 editSettings->addTo( settingsMenu );
101 connect( editSettings, SIGNAL( activated() ), 101 connect( editSettings, SIGNAL( activated() ),
102 SLOT( slotEditSettings() ) ); 102 SLOT( slotEditSettings() ) );
103
104
105 QAction * editSettings2 = new QAction( i18n( "Global Settings..." ), SmallIcon("SettingsIcon") ,
106 0, 0, this );
107 editSettings2->addTo( settingsMenu );
108 connect( editSettings2, SIGNAL( activated() ),
109 SLOT( slotEditGlobalSettings() ) );
110
111
112
103 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 113 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
104 0, 0, this ); 114 0, 0, this );
105 editAccounts->addTo( settingsMenu ); 115 editAccounts->addTo( settingsMenu );
106 codecMenu = new QPopupMenu( menuBar ); 116 codecMenu = new QPopupMenu( menuBar );
107 codecMenu->insertItem( "Western (iso-8859-1)",0,0); 117 codecMenu->insertItem( "Western (iso-8859-1)",0,0);
108 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); 118 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1);
109 codecMenu->insertItem( "Western (iso-8859-15)",2,2); 119 codecMenu->insertItem( "Western (iso-8859-15)",2,2);
110 codecMenu->insertItem( "Chinese (big-5)",3,3); 120 codecMenu->insertItem( "Chinese (big-5)",3,3);
111 codecMenu->insertItem( "Unicode (utf-8)",4,4); 121 codecMenu->insertItem( "Unicode (utf-8)",4,4);
112 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); 122 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5);
113 //disabled 123 //disabled
114 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); 124 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
115 //setCentralWidget( view ); 125 //setCentralWidget( view );
116 126
117 QVBox* wrapperBox = new QVBox( this ); 127 QVBox* wrapperBox = new QVBox( this );
118 setCentralWidget( wrapperBox ); 128 setCentralWidget( wrapperBox );
119 129
120 // QWidget *view = new QWidget( wrapperBox ); 130 // QWidget *view = new QWidget( wrapperBox );
121 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox); 131 KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox);
122 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down); 132 splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down);
123 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor); 133 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor);
124 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 134 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
125 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 135 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
126 subLE = 0; 136 subLE = 0;
127 fromLE = 0; 137 fromLE = 0;
128 toLE = 0; 138 toLE = 0;
129 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) { 139 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) {
130 QWidget* infoBox = new QWidget( splithor ); 140 QWidget* infoBox = new QWidget( splithor );
131 QGridLayout *griLay = new QGridLayout( infoBox, 2,2); 141 QGridLayout *griLay = new QGridLayout( infoBox, 2,2);
132 if ( KOPrefs::instance()->mShowInfoSub ) { 142 if ( KOPrefs::instance()->mShowInfoSub ) {
133 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); 143 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 );
134 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; 144 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ;
135 } 145 }
136 if ( KOPrefs::instance()->mShowInfoFrom ) { 146 if ( KOPrefs::instance()->mShowInfoFrom ) {
137 griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 ); 147 griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 );
138 griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ; 148 griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ;
139 } 149 }
140 if ( KOPrefs::instance()->mShowInfoTo ) { 150 if ( KOPrefs::instance()->mShowInfoTo ) {
141 griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 ); 151 griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 );
142 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ; 152 griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ;
143 } 153 }
144 infoBox->setMaximumHeight( infoBox->sizeHint().height() ); 154 infoBox->setMaximumHeight( infoBox->sizeHint().height() );
145 if ( !KOPrefs::instance()->mShowInfoStart ) { 155 if ( !KOPrefs::instance()->mShowInfoStart ) {
146 QTimer::singleShot( 1,splithor, SLOT ( toggle() ) ); 156 QTimer::singleShot( 1,splithor, SLOT ( toggle() ) );
147 } 157 }
148 } 158 }
149 159
150 160
151 folderView = new AccountView( split ); 161 folderView = new AccountView( split );
152 folderView->header()->hide(); 162 folderView->header()->hide();
153 folderView->setRootIsDecorated( false ); 163 folderView->setRootIsDecorated( false );
154 folderView->addColumn( i18n( "Mailbox" ) ); 164 folderView->addColumn( i18n( "Mailbox" ) );
155 165
156 //layout->addWidget( folderView ); 166 //layout->addWidget( folderView );
157 167
158 mailView = new QListView( split ); 168 mailView = new QListView( split );
159 mailView->addColumn( i18n( " " ) ); 169 mailView->addColumn( i18n( " " ) );
160 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 170 mailView->addColumn( i18n( "Subject" ),QListView::Manual );
161 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 171 mailView->addColumn( i18n( "Sender" ),QListView::Manual );
162 mailView->addColumn( i18n( "Size" ),QListView::Manual); 172 mailView->addColumn( i18n( "Size" ),QListView::Manual);
163 mailView->addColumn( i18n( "Date" ),QListView::Manual); 173 mailView->addColumn( i18n( "Date" ),QListView::Manual);
164 if ( KOPrefs::instance()->mShowToField ) 174 if ( KOPrefs::instance()->mShowToField )
165 mailView->addColumn( i18n( "To" ),QListView::Manual); 175 mailView->addColumn( i18n( "To" ),QListView::Manual);
166 mailView->setAllColumnsShowFocus(true); 176 mailView->setAllColumnsShowFocus(true);
167 //mailView->setSorting(-1); 177 //mailView->setSorting(-1);
168 mailView->setRootIsDecorated( false ); 178 mailView->setRootIsDecorated( false );
169 statusWidget = new StatusWidget( wrapperBox ); 179 statusWidget = new StatusWidget( wrapperBox );
170 statusWidget->hide(); 180 statusWidget->hide();
171 181
172 //layout->addWidget( mailView ); 182 //layout->addWidget( mailView );
173 //layout->setStretchFactor( folderView, 1 ); 183 //layout->setStretchFactor( folderView, 1 );
174 //layout->setStretchFactor( mailView, 2 ); 184 //layout->setStretchFactor( mailView, 2 );
175 185
176 slotAdjustLayout(); 186 slotAdjustLayout();
177#ifndef DESKTOP_VERSION 187#ifndef DESKTOP_VERSION
178 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); 188 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
179 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); 189 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
180 if ( subLE ) 190 if ( subLE )
181 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold); 191 QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold);
182 if ( fromLE ) 192 if ( fromLE )
183 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); 193 QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold);
184 if ( toLE ) 194 if ( toLE )
185 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); 195 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold);
186#endif 196#endif
187 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, 197 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this,
188 SLOT( mailLeftClicked(QListViewItem*) ) ); 198 SLOT( mailLeftClicked(QListViewItem*) ) );
189 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, 199 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this,
190 SLOT( mailLeftClicked(QListViewItem*) ) ); 200 SLOT( mailLeftClicked(QListViewItem*) ) );
191 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 201 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
192 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 202 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
193 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 203 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
194 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 204 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
195 205
196 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, 206 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this,
197 SLOT( setInfoFields(QListViewItem*) ) ); 207 SLOT( setInfoFields(QListViewItem*) ) );
198 208
199 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 209 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
200 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 210 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
201// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 211// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
202 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 212 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
203 //mailView->setMultiSelection ( true ); 213 //mailView->setMultiSelection ( true );
204 mailView->setSelectionMode( QListView::Extended ); 214 mailView->setSelectionMode( QListView::Extended );
205 QValueList<int> list; 215 QValueList<int> list;
206 int fw = 100; 216 int fw = 100;
207 if ( QApplication::desktop()->width() > 320 ) 217 if ( QApplication::desktop()->width() > 320 )
208 fw = 50; 218 fw = 50;
209 list.append( fw ); 219 list.append( fw );
210 list.append( 100 ); 220 list.append( 100 );
211 split->setSizes( list ); 221 split->setSizes( list );
212 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 222 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
213 mailView->setShowSortIndicator ( true ); 223 mailView->setShowSortIndicator ( true );
214 QLabel *spacer = new QLabel( toolBar ); 224 QLabel *spacer = new QLabel( toolBar );
215 spacer->setBackgroundMode( QWidget::PaletteButton ); 225 spacer->setBackgroundMode( QWidget::PaletteButton );
216 toolBar->setStretchableWidget( spacer ); 226 toolBar->setStretchableWidget( spacer );
217 227
218 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 228 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
219 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); 229 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
220 if ( QApplication::desktop()->width() > 320 ) 230 if ( QApplication::desktop()->width() > 320 )
221 closeMail->addTo(toolBar); 231 closeMail->addTo(toolBar);
222 closeMail->addTo(mailMenu); 232 closeMail->addTo(mailMenu);
223 233
224 234
225 QPopupMenu* helpMenu = new QPopupMenu( menuBar ); 235 QPopupMenu* helpMenu = new QPopupMenu( menuBar );
226 menuBar->insertItem( i18n( "Help" ), helpMenu ); 236 menuBar->insertItem( i18n( "Help" ), helpMenu );
227 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); 237 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this);
228 connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); 238 connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
229 li->addTo(helpMenu); 239 li->addTo(helpMenu);
230 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); 240 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this);
231 connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); 241 connect( li, SIGNAL( activated() ), SLOT( showLicence()) );
232 li->addTo(helpMenu); 242 li->addTo(helpMenu);
233 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); 243 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this);
234 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); 244 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) );
235 li->addTo(helpMenu); 245 li->addTo(helpMenu);
236 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); 246 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) );
237 slotSetCodec( KOPrefs::instance()->mCurrentCodec ); 247 slotSetCodec( KOPrefs::instance()->mCurrentCodec );
238 menuBar->setMaximumWidth( menuBar->sizeHint().width()); 248 menuBar->setMaximumWidth( menuBar->sizeHint().width());
239 //menuBar->setMaximumSize( menuBar->sizeHint()); 249 //menuBar->setMaximumSize( menuBar->sizeHint());
240#ifdef DESKTOP_VERSION 250#ifdef DESKTOP_VERSION
241 resize ( 640, 480 ); 251 resize ( 640, 480 );
242#endif 252#endif
243} 253}
244 254
245MainWindow::~MainWindow() 255MainWindow::~MainWindow()
246{ 256{
247} 257}
248 258
249void MainWindow::setInfoFields(QListViewItem* item ) 259void MainWindow::setInfoFields(QListViewItem* item )
250{ 260{
251 if ( item == 0) { 261 if ( item == 0) {
252 if ( subLE ) subLE->setText(""); 262 if ( subLE ) subLE->setText("");
253 if ( fromLE ) fromLE->setText(""); 263 if ( fromLE ) fromLE->setText("");
254 if ( toLE ) toLE->setText(""); 264 if ( toLE ) toLE->setText("");
255 return; 265 return;
256 } 266 }
257 RecMailP mail = ((MailListViewItem*)item)->data(); 267 RecMailP mail = ((MailListViewItem*)item)->data();
258 if ( subLE ) subLE->setText(mail->getSubject()); 268 if ( subLE ) subLE->setText(mail->getSubject());
259 if ( fromLE ) fromLE->setText(mail->getFrom()); 269 if ( fromLE ) fromLE->setText(mail->getFrom());
260 if ( toLE ) toLE->setText(mail->To().join(";" )); 270 if ( toLE ) toLE->setText(mail->To().join(";" ));
261 if ( subLE ) subLE->setCursorPosition(0); 271 if ( subLE ) subLE->setCursorPosition(0);
262 if ( fromLE ) fromLE->setCursorPosition(0); 272 if ( fromLE ) fromLE->setCursorPosition(0);
263 if ( toLE ) toLE->setCursorPosition(0); 273 if ( toLE ) toLE->setCursorPosition(0);
264 274
265} 275}
266void MainWindow::slotSetCodec( int codec ) 276void MainWindow::slotSetCodec( int codec )
267{ 277{
268 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); 278 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false );
269 //qDebug("codec %d ", codec); 279 //qDebug("codec %d ", codec);
270 KOPrefs::instance()->mCurrentCodec = codec; 280 KOPrefs::instance()->mCurrentCodec = codec;
271 KOPrefs::instance()->isDirty = true; 281 KOPrefs::instance()->isDirty = true;
272 QString name; 282 QString name;
273 switch ( codec ) { 283 switch ( codec ) {
274 case 0: 284 case 0:
275 name = "iso-8859-1"; 285 name = "iso-8859-1";
276 break; 286 break;
277 case 1: 287 case 1:
278 name = "iso-8859-5"; 288 name = "iso-8859-5";
279 break; 289 break;
280 case 2: 290 case 2:
281 name = "iso-8859-15"; 291 name = "iso-8859-15";
282 break; 292 break;
283 case 3: 293 case 3:
284 name = "big-5"; 294 name = "big-5";
285 break; 295 break;
286 case 4: 296 case 4:
287 name = "utf-8"; 297 name = "utf-8";
288 break; 298 break;
289 case 5: 299 case 5:
290 name = KOPrefs::instance()->mSendCodec.lower(); 300 name = KOPrefs::instance()->mSendCodec.lower();
291 break; 301 break;
292 } 302 }
293 KOPrefs::instance()->mCurrentCodeName = name ; 303 KOPrefs::instance()->mCurrentCodeName = name ;
294 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); 304 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")");
295 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); 305 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true );
296} 306}
297void MainWindow::showLicence() 307void MainWindow::showLicence()
298{ 308{
299 KApplication::showLicence(); 309 KApplication::showLicence();
300} 310}
301void MainWindow::showAbout() 311void MainWindow::showAbout()
302{ 312{
303 QString version; 313 QString version;
304#include <../version> 314#include <../version>
305 315
306 QString cap = "About KOpieMail/Pi"; 316 QString cap = "About KOpieMail/Pi";
307 QString text =i18n("KOpieMail/Platform-independent\n") + 317 QString text =i18n("KOpieMail/Platform-independent\n") +
308 "(OM/Pi) " + version + " - " 318 "(OM/Pi) " + version + " - "
309 319
310#ifdef DESKTOP_VERSION 320#ifdef DESKTOP_VERSION
311 "Desktop Edition\n" 321 "Desktop Edition\n"
312#else 322#else
313 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" 323 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n"
314#endif 324#endif
315 "www.pi-sync.info\n\n" 325 "www.pi-sync.info\n\n"
316 326
317 327
318 328
319"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n" 329"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n"
320 "KOpieMail/Pi is based on Opie Mail\n" 330 "KOpieMail/Pi is based on Opie Mail\n"
321 "Copyright (c) Rajko Albrecht and the Opie team\n" 331 "Copyright (c) Rajko Albrecht and the Opie team\n"
322 "KOpieMail/Pi is licensed under the GPL\n" 332 "KOpieMail/Pi is licensed under the GPL\n"
323 "\n" 333 "\n"
324 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" 334 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n"
325 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" 335 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n"
326 "libEtPan has its own licence - see LibEtPan licence\n"; 336 "libEtPan has its own licence - see LibEtPan licence\n";
327 337
328 KApplication::showText( cap, text ); 338 KApplication::showText( cap, text );
329} 339}
330void MainWindow::showEtpanLicence() 340void MainWindow::showEtpanLicence()
331{ 341{
332 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); 342 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" );
333 343
334} 344}
335void MainWindow::appMessage(const QCString &, const QByteArray &) 345void MainWindow::appMessage(const QCString &, const QByteArray &)
336{ 346{
337 qDebug("appMessage implemented by subclass"); 347 qDebug("appMessage implemented by subclass");
338} 348}
339 349
340void MainWindow::slotAdjustLayout() { 350void MainWindow::slotAdjustLayout() {
341 351
342 /* 352 /*
343 QWidget *d = QApplication::desktop(); 353 QWidget *d = QApplication::desktop();
344 354
345 if ( d->width() < d->height() ) { 355 if ( d->width() < d->height() ) {
346 layout->setDirection( QBoxLayout::TopToBottom ); 356 layout->setDirection( QBoxLayout::TopToBottom );
347 } else { 357 } else {
348 layout->setDirection( QBoxLayout::LeftToRight ); 358 layout->setDirection( QBoxLayout::LeftToRight );
349 } 359 }
350 */ 360 */
351} 361}
352 362
353void MainWindow::slotAdjustColumns() 363void MainWindow::slotAdjustColumns()
354{ 364{
355 bool hidden = folderView->isHidden(); 365 bool hidden = folderView->isHidden();
356 if ( hidden ) folderView->show(); 366 if ( hidden ) folderView->show();
357 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 367 folderView->setColumnWidth( 0, folderView->visibleWidth() );
358 if ( hidden ) folderView->hide(); 368 if ( hidden ) folderView->hide();
359 369
360 mailView->setColumnWidth( 0, 10 ); 370 mailView->setColumnWidth( 0, 10 );
361 mailView->setColumnWidth( 1, 100 ); 371 mailView->setColumnWidth( 1, 100 );
362 mailView->setColumnWidth( 2, 100 ); 372 mailView->setColumnWidth( 2, 100 );
363 mailView->setColumnWidth( 3, 50 ); 373 mailView->setColumnWidth( 3, 50 );
364 mailView->setColumnWidth( 4, 120 ); 374 mailView->setColumnWidth( 4, 120 );
365 if ( KOPrefs::instance()->mShowToField ) 375 if ( KOPrefs::instance()->mShowToField )
366 mailView->setColumnWidth( 5, 100 ); 376 mailView->setColumnWidth( 5, 100 );
367} 377}
368 378
369void MainWindow::slotEditSettings() 379void MainWindow::slotEditSettings()
370{ 380{
371} 381}
382void MainWindow::slotEditGlobalSettings()
383{
384}
372 385
373void MainWindow::slotShowFolders( bool ) 386void MainWindow::slotShowFolders( bool )
374{ 387{
375 qDebug("not implemented: "); 388 qDebug("not implemented: ");
376} 389}
377 390
378void MainWindow::refreshMailView(const QValueList<RecMailP>&) 391void MainWindow::refreshMailView(const QValueList<RecMailP>&)
379{ 392{
380 qDebug("not implemented: "); 393 qDebug("not implemented: ");
381} 394}
382 395
383void MainWindow::mailLeftClicked(QListViewItem * ) 396void MainWindow::mailLeftClicked(QListViewItem * )
384{ 397{
385 qDebug("not implemented: "); 398 qDebug("not implemented: ");
386} 399}
387 400
388void MainWindow::displayMail() 401void MainWindow::displayMail()
389{ 402{
390 qDebug("not implemented: "); 403 qDebug("not implemented: ");
391} 404}
392 405
393void MainWindow::slotDeleteMail() 406void MainWindow::slotDeleteMail()
394{ 407{
395 qDebug("not implemented: "); 408 qDebug("not implemented: ");
396} 409}
397 410
398void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) 411void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int )
399{ 412{
400 qDebug("not implemented: "); 413 qDebug("not implemented: ");
401} 414}
402 415
403void MainWindow::slotSendQueued() 416void MainWindow::slotSendQueued()
404{ 417{
405 qDebug("not implemented: "); 418 qDebug("not implemented: ");
406} 419}
407 420
408void MainWindow::slotEditAccounts() 421void MainWindow::slotEditAccounts()
409{ 422{
410 qDebug("not implemented: "); 423 qDebug("not implemented: ");
411} 424}
412 425
413void MainWindow::slotComposeMail() 426void MainWindow::slotComposeMail()
414{ 427{
415 qDebug("not implemented: "); 428 qDebug("not implemented: ");
416} 429}
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index ddb3fca..6894039 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -1,73 +1,74 @@
1 1
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3#ifndef MAINWINDOW_H 3#ifndef MAINWINDOW_H
4#define MAINWINDOW_H 4#define MAINWINDOW_H
5 5
6#include <qmainwindow.h> 6#include <qmainwindow.h>
7#include <qlistview.h> 7#include <qlistview.h>
8#include <qaction.h> 8#include <qaction.h>
9#include <qlineedit.h> 9#include <qlineedit.h>
10 10
11#include <qtoolbar.h> 11#include <qtoolbar.h>
12#ifdef DESKTOP_VERSION 12#ifdef DESKTOP_VERSION
13#include <qmenubar.h> 13#include <qmenubar.h>
14#define QPEMenuBar QMenuBar 14#define QPEMenuBar QMenuBar
15#else 15#else
16#include <qpe/qpemenubar.h> 16#include <qpe/qpemenubar.h>
17#endif 17#endif
18 18
19#include "accountview.h" 19#include "accountview.h"
20#include "statuswidget.h" 20#include "statuswidget.h"
21 21
22#include <libmailwrapper/mailtypes.h> 22#include <libmailwrapper/mailtypes.h>
23#include <opie2/osmartpointer.h> 23#include <opie2/osmartpointer.h>
24 24
25class RecMail; 25class RecMail;
26 26
27class MainWindow : public QMainWindow 27class MainWindow : public QMainWindow
28{ 28{
29 Q_OBJECT 29 Q_OBJECT
30 30
31public: 31public:
32 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); 32 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 );
33 virtual ~MainWindow(); 33 virtual ~MainWindow();
34 34
35public slots: 35public slots:
36 virtual void slotAdjustColumns(); 36 virtual void slotAdjustColumns();
37 virtual void appMessage(const QCString &msg, const QByteArray &data); 37 virtual void appMessage(const QCString &msg, const QByteArray &data);
38 virtual void slotComposeMail(); 38 virtual void slotComposeMail();
39 39
40protected slots: 40protected slots:
41 virtual void setInfoFields(QListViewItem* ); 41 virtual void setInfoFields(QListViewItem* );
42 virtual void slotSendQueued(); 42 virtual void slotSendQueued();
43 virtual void slotEditAccounts(); 43 virtual void slotEditAccounts();
44 virtual void slotShowFolders( bool show ); 44 virtual void slotShowFolders( bool show );
45 virtual void refreshMailView(const QValueList<RecMailP>&); 45 virtual void refreshMailView(const QValueList<RecMailP>&);
46 virtual void displayMail(); 46 virtual void displayMail();
47 virtual void slotGetMail() = 0; 47 virtual void slotGetMail() = 0;
48 virtual void slotGetAllMail() = 0; 48 virtual void slotGetAllMail() = 0;
49 virtual void slotDeleteMail(); 49 virtual void slotDeleteMail();
50 virtual void slotDeleteAllMail() = 0; 50 virtual void slotDeleteAllMail() = 0;
51 virtual void slotSetCodec(int); 51 virtual void slotSetCodec(int);
52 virtual void mailHold(int, QListViewItem *,const QPoint&,int); 52 virtual void mailHold(int, QListViewItem *,const QPoint&,int);
53 virtual void slotAdjustLayout(); 53 virtual void slotAdjustLayout();
54 virtual void slotEditSettings(); 54 virtual void slotEditSettings();
55 virtual void slotEditGlobalSettings();
55 virtual void mailLeftClicked( QListViewItem * ); 56 virtual void mailLeftClicked( QListViewItem * );
56 void showLicence(); 57 void showLicence();
57 void showAbout(); 58 void showAbout();
58 void showEtpanLicence(); 59 void showEtpanLicence();
59 60
60protected: 61protected:
61 QToolBar *toolBar; 62 QToolBar *toolBar;
62 StatusWidget *statusWidget; 63 StatusWidget *statusWidget;
63 QPEMenuBar *menuBar; 64 QPEMenuBar *menuBar;
64 QPopupMenu *mailMenu, *settingsMenu, *codecMenu; 65 QPopupMenu *mailMenu, *settingsMenu, *codecMenu;
65 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, 66 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails,
66 *editSettings, *editAccounts, *syncFolders; 67 *editSettings, *editAccounts, *syncFolders;
67 AccountView *folderView; 68 AccountView *folderView;
68 QListView *mailView; 69 QListView *mailView;
69 QLineEdit* toLE,*fromLE,*subLE; 70 QLineEdit* toLE,*fromLE,*subLE;
70 //QBoxLayout *layout; 71 //QBoxLayout *layout;
71}; 72};
72 73
73#endif 74#endif
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 4436ad6..8ac3451 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -1,676 +1,681 @@
1// CHANGED 2004-09-31 Lutz Rogowski 1// CHANGED 2004-09-31 Lutz Rogowski
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3 3
4 4
5#define protected public 5#define protected public
6#include <qwidget.h> 6#include <qwidget.h>
7#undef protected 7#undef protected
8#include "koprefsdialog.h" 8#include "koprefsdialog.h"
9#include <kapplication.h> 9#include <kapplication.h>
10#include <libkdepim/externalapphandler.h> 10#include <libkdepim/externalapphandler.h>
11#include <libkdepim/kpimglobalprefs.h> 11#include <libkdepim/kpimglobalprefs.h>
12#ifdef MINIKDE_KDIALOG_H 12#ifdef MINIKDE_KDIALOG_H
13#undef MINIKDE_KDIALOG_H 13#undef MINIKDE_KDIALOG_H
14#endif 14#endif
15#include "settingsdialog.h" 15#include "settingsdialog.h"
16#include "opiemail.h" 16#include "opiemail.h"
17#include "editaccounts.h" 17#include "editaccounts.h"
18#include "composemail.h" 18#include "composemail.h"
19#include "mailistviewitem.h" 19#include "mailistviewitem.h"
20#include "viewmail.h" 20#include "viewmail.h"
21#include "selectstore.h" 21#include "selectstore.h"
22#include "selectsmtp.h" 22#include "selectsmtp.h"
23#include "accountitem.h" 23#include "accountitem.h"
24#include "accountview.h" 24#include "accountview.h"
25#include "klocale.h" 25#include "klocale.h"
26 26
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qcursor.h> 29#include <qcursor.h>
30#include <qtextbrowser.h> 30#include <qtextbrowser.h>
31#include <qregexp.h> 31#include <qregexp.h>
32#include <qpe/global.h> 32#include <qpe/global.h>
33 33
34#ifdef DESKTOP_VERSION 34#ifdef DESKTOP_VERSION
35#include <qapplication.h> 35#include <qapplication.h>
36#else 36#else
37#include <qpe/qpeapplication.h> 37#include <qpe/qpeapplication.h>
38#endif 38#endif
39#include <libmailwrapper/smtpwrapper.h> 39#include <libmailwrapper/smtpwrapper.h>
40#include <libmailwrapper/mailtypes.h> 40#include <libmailwrapper/mailtypes.h>
41#include <libmailwrapper/abstractmail.h> 41#include <libmailwrapper/abstractmail.h>
42#include "koprefs.h" 42#include "koprefs.h"
43 43
44//using namespace Opie::Core; 44//using namespace Opie::Core;
45 45
46OpieMail::OpieMail( QWidget *parent, const char *name ) 46OpieMail::OpieMail( QWidget *parent, const char *name )
47 : MainWindow( parent, name) //, WStyle_ContextHelp ) 47 : MainWindow( parent, name) //, WStyle_ContextHelp )
48{ 48{
49 mCurrentComposer = 0; 49 mCurrentComposer = 0;
50 settings = new Settings(); 50 settings = new Settings();
51 tb = 0; 51 tb = 0;
52 setIcon(SmallIcon( "kmicromail" ) ); 52 setIcon(SmallIcon( "kmicromail" ) );
53 folderView->populate( settings->getAccounts() ); 53 folderView->populate( settings->getAccounts() );
54 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), 54 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
55 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); 55 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
56 folderView->setFocus(); 56 folderView->setFocus();
57} 57}
58 58
59OpieMail::~OpieMail() 59OpieMail::~OpieMail()
60{ 60{
61 if (settings) delete settings; 61 if (settings) delete settings;
62 if ( tb ) 62 if ( tb )
63 delete tb; 63 delete tb;
64} 64}
65 65
66void OpieMail::appMessage(const QCString &msg, const QByteArray &data) 66void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
67{ 67{
68 68
69} 69}
70#include <stdlib.h> 70#include <stdlib.h>
71void OpieMail::message(const QCString &msg, const QByteArray &data) 71void OpieMail::message(const QCString &msg, const QByteArray &data)
72{ 72{
73 // copied from old mail2 73 // copied from old mail2
74 static int ii = 0; 74 static int ii = 0;
75 //qDebug("QCOP CALL ############################# %d ", ii); 75 //qDebug("QCOP CALL ############################# %d ", ii);
76 //QString mess ( msg ); 76 //QString mess ( msg );
77 //qDebug("Message = %s ",mess.latin1()); 77 //qDebug("Message = %s ",mess.latin1());
78 ++ii; 78 ++ii;
79 //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this); 79 //qDebug("KM:appMessage %d *%s* %x", ii, msg.data(), this);
80 80
81 mPendingEmail = QString::null; 81 mPendingEmail = QString::null;
82 mPendingName = QString::null; 82 mPendingName = QString::null;
83 if (msg == "writeMail(QString,QString)") 83 if (msg == "writeMail(QString,QString)")
84 { 84 {
85 //qDebug("writeMail(QString,QString) "); 85 //qDebug("writeMail(QString,QString) ");
86 QDataStream stream(data,IO_ReadOnly); 86 QDataStream stream(data,IO_ReadOnly);
87 stream >> mPendingName >> mPendingEmail; 87 stream >> mPendingName >> mPendingEmail;
88 // removing the whitespaces at beginning and end is needed! 88 // removing the whitespaces at beginning and end is needed!
89 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); 89 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
90 } 90 }
91 else if (msg == "newMail()") 91 else if (msg == "newMail()")
92 { 92 {
93 //qDebug("slotComposeMail() "); 93 //qDebug("slotComposeMail() ");
94 // we cannot call slotComposeMail(); directly, because may be executing a QCOP call 94 // we cannot call slotComposeMail(); directly, because may be executing a QCOP call
95 // and a QCOP call does not like a processevents in his execution 95 // and a QCOP call does not like a processevents in his execution
96 // with the Qtimer we call slotComposeMail() after we reached the main event loop 96 // with the Qtimer we call slotComposeMail() after we reached the main event loop
97 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); 97 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
98 // slotComposeMail(); 98 // slotComposeMail();
99 } 99 }
100 else if (msg == "newMail(QString)") 100 else if (msg == "newMail(QString)")
101 { 101 {
102 //qDebug(" newMail(QString)"); 102 //qDebug(" newMail(QString)");
103 QDataStream stream(data,IO_ReadOnly); 103 QDataStream stream(data,IO_ReadOnly);
104 stream >> mPendingName; 104 stream >> mPendingName;
105 // the format is 105 // the format is
106 // NAME <EMAIL>:SUBJECT 106 // NAME <EMAIL>:SUBJECT
107 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); 107 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
108 } else { 108 } else {
109 mPendingData = data; 109 mPendingData = data;
110 mPendingMessage = msg; 110 mPendingMessage = msg;
111 QTimer::singleShot ( 50, this, SLOT(slotExtAppHandler() ) ); 111 QTimer::singleShot ( 50, this, SLOT(slotExtAppHandler() ) );
112 } 112 }
113 113
114 //qDebug("END OpieMail::message "); 114 //qDebug("END OpieMail::message ");
115} 115}
116void OpieMail::slotExtAppHandler() 116void OpieMail::slotExtAppHandler()
117{ 117{
118 ExternalAppHandler::instance()->appMessage ( mPendingMessage, mPendingData ); 118 ExternalAppHandler::instance()->appMessage ( mPendingMessage, mPendingData );
119} 119}
120void OpieMail::slotwriteMail2(const QString& namemail ) 120void OpieMail::slotwriteMail2(const QString& namemail )
121{ 121{
122 //qDebug("OpieMail::slotwriteMail2 "); 122 //qDebug("OpieMail::slotwriteMail2 ");
123 //qApp->processEvents(); 123 //qApp->processEvents();
124 ComposeMail compose( settings, this, 0, true ); 124 ComposeMail compose( settings, this, 0, true );
125 if ( !namemail.isEmpty() ) { 125 if ( !namemail.isEmpty() ) {
126 QString to = namemail; 126 QString to = namemail;
127 if ( namemail.find( " <") > 1 ) { 127 if ( namemail.find( " <") > 1 ) {
128 to = "\"" +to.replace( QRegExp( " <"), "\" <") ; 128 to = "\"" +to.replace( QRegExp( " <"), "\" <") ;
129 } else 129 } else
130 if ( namemail.find( "<") > 1 ) { 130 if ( namemail.find( "<") > 1 ) {
131 to = "\"" +to.replace( QRegExp( "<"), "\" <") ; 131 to = "\"" +to.replace( QRegExp( "<"), "\" <") ;
132 } 132 }
133 int sub = to.find( ">:"); 133 int sub = to.find( ">:");
134 if ( sub > 0 ) { 134 if ( sub > 0 ) {
135 compose.setTo( to.left(sub+1) ); 135 compose.setTo( to.left(sub+1) );
136 compose.setSubject( to.mid(sub+2) ); 136 compose.setSubject( to.mid(sub+2) );
137 } else 137 } else
138 compose.setTo( to ); 138 compose.setTo( to );
139 } 139 }
140 compose.slotAdjustColumns(); 140 compose.slotAdjustColumns();
141#ifndef DESKTOP_VERSION 141#ifndef DESKTOP_VERSION
142 compose.showMaximized(); 142 compose.showMaximized();
143#endif 143#endif
144 mCurrentComposer = &compose; 144 mCurrentComposer = &compose;
145 compose.exec(); 145 compose.exec();
146 mCurrentComposer = 0; 146 mCurrentComposer = 0;
147 folderView->refreshOutgoing(); 147 folderView->refreshOutgoing();
148 raise(); 148 raise();
149 //qDebug("retttich "); 149 //qDebug("retttich ");
150} 150}
151void OpieMail::slotwriteMail(const QString&name,const QString&email) 151void OpieMail::slotwriteMail(const QString&name,const QString&email)
152{ 152{
153 // qDebug("OpieMail::slotwriteMail "); 153 // qDebug("OpieMail::slotwriteMail ");
154 ComposeMail compose( settings, this, 0, true ); 154 ComposeMail compose( settings, this, 0, true );
155 if (!email.isEmpty()) 155 if (!email.isEmpty())
156 { 156 {
157 if (!name.isEmpty()) 157 if (!name.isEmpty())
158 { 158 {
159 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">"); 159 compose.setTo("\"" + name + "\"" + " " + "<"+ email + ">");
160 } 160 }
161 else 161 else
162 { 162 {
163 compose.setTo(email); 163 compose.setTo(email);
164 } 164 }
165 } 165 }
166 compose.slotAdjustColumns(); 166 compose.slotAdjustColumns();
167#ifndef DESKTOP_VERSION 167#ifndef DESKTOP_VERSION
168 compose.showMaximized(); 168 compose.showMaximized();
169#endif 169#endif
170 170
171 mCurrentComposer = &compose; 171 mCurrentComposer = &compose;
172 compose.exec(); 172 compose.exec();
173 mCurrentComposer = 0; 173 mCurrentComposer = 0;
174 folderView->refreshOutgoing(); 174 folderView->refreshOutgoing();
175 raise(); 175 raise();
176} 176}
177 177
178void OpieMail::slotComposeMail() 178void OpieMail::slotComposeMail()
179{ 179{
180 if ( mPendingEmail == QString::null && mPendingName == QString::null) 180 if ( mPendingEmail == QString::null && mPendingName == QString::null)
181 slotwriteMail2( QString () ); 181 slotwriteMail2( QString () );
182 else { 182 else {
183 if ( mPendingEmail == QString::null ) 183 if ( mPendingEmail == QString::null )
184 slotwriteMail2( mPendingName ); 184 slotwriteMail2( mPendingName );
185 else 185 else
186 slotwriteMail( mPendingName, mPendingEmail ); 186 slotwriteMail( mPendingName, mPendingEmail );
187 } 187 }
188 //slotwriteMail(0l,0l); 188 //slotwriteMail(0l,0l);
189} 189}
190 190
191void OpieMail::slotSendQueued() 191void OpieMail::slotSendQueued()
192{ 192{
193 SMTPaccount *smtp = 0; 193 SMTPaccount *smtp = 0;
194 194
195 QList<Account> list = settings->getAccounts(); 195 QList<Account> list = settings->getAccounts();
196 QList<SMTPaccount> smtpList; 196 QList<SMTPaccount> smtpList;
197 smtpList.setAutoDelete(false); 197 smtpList.setAutoDelete(false);
198 Account *it; 198 Account *it;
199 for ( it = list.first(); it; it = list.next() ) 199 for ( it = list.first(); it; it = list.next() )
200 { 200 {
201 if ( it->getType() == MAILLIB::A_SMTP ) 201 if ( it->getType() == MAILLIB::A_SMTP )
202 { 202 {
203 smtp = static_cast<SMTPaccount *>(it); 203 smtp = static_cast<SMTPaccount *>(it);
204 smtpList.append(smtp); 204 smtpList.append(smtp);
205 } 205 }
206 } 206 }
207 if (smtpList.count()==0) 207 if (smtpList.count()==0)
208 { 208 {
209 QMessageBox::information(0,i18n("Info"),i18n("Define a smtp\n account first!\n")); 209 QMessageBox::information(0,i18n("Info"),i18n("Define a smtp\n account first!\n"));
210 return; 210 return;
211 } 211 }
212 if ( QMessageBox::warning(this, i18n("Sending all mails"), i18n("Do you really want to\nsend all queued mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No ) 212 if ( QMessageBox::warning(this, i18n("Sending all mails"), i18n("Do you really want to\nsend all queued mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No )
213 return; 213 return;
214 if (smtpList.count()==1) 214 if (smtpList.count()==1)
215 { 215 {
216 smtp = smtpList.at(0); 216 smtp = smtpList.at(0);
217 } 217 }
218 else 218 else
219 { 219 {
220 smtp = 0; 220 smtp = 0;
221 selectsmtp selsmtp; 221 selectsmtp selsmtp;
222 selsmtp.setSelectionlist(&smtpList); 222 selsmtp.setSelectionlist(&smtpList);
223 selsmtp.resize( selsmtp.sizeHint() ); 223 selsmtp.resize( selsmtp.sizeHint() );
224 if ( selsmtp.exec() == QDialog::Accepted ) 224 if ( selsmtp.exec() == QDialog::Accepted )
225 { 225 {
226 smtp = selsmtp.selected_smtp(); 226 smtp = selsmtp.selected_smtp();
227 } 227 }
228 } 228 }
229 if (smtp) 229 if (smtp)
230 { 230 {
231 231
232 Global::statusMessage("Sending mails...!"); 232 Global::statusMessage("Sending mails...!");
233 SMTPwrapper * wrap = new SMTPwrapper(smtp); 233 SMTPwrapper * wrap = new SMTPwrapper(smtp);
234 if ( wrap->flushOutbox() ) 234 if ( wrap->flushOutbox() )
235 { 235 {
236 Global::statusMessage("Mails sent!"); 236 Global::statusMessage("Mails sent!");
237 } 237 }
238 delete wrap; 238 delete wrap;
239 } 239 }
240 folderView->refreshOutgoing(); 240 folderView->refreshOutgoing();
241} 241}
242 242
243void OpieMail::slotSearchMails() 243void OpieMail::slotSearchMails()
244{ 244{
245 qDebug("OpieMail::slotSearchMails():not implemented "); 245 qDebug("OpieMail::slotSearchMails():not implemented ");
246} 246}
247void OpieMail::slotEditGlobalSettings()
248{
249 KPimPrefsGlobalDialog gc ( this );
250 gc.exec();
251}
247 252
248void OpieMail::slotEditSettings() 253void OpieMail::slotEditSettings()
249{ 254{
250 255
251 KOPrefsDialog settingsDialog( this, "koprefs", true ); 256 KOPrefsDialog settingsDialog( this, "koprefs", true );
252#ifndef DESKTOP_VERSION 257#ifndef DESKTOP_VERSION
253 settingsDialog.showMaximized(); 258 settingsDialog.showMaximized();
254#endif 259#endif
255 settingsDialog.exec(); 260 settingsDialog.exec();
256 261
257 slotSetCodec( KOPrefs::instance()->mCurrentCodec ); 262 slotSetCodec( KOPrefs::instance()->mCurrentCodec );
258 // KApplication::execDialog(settingsDialog); 263 // KApplication::execDialog(settingsDialog);
259} 264}
260 265
261void OpieMail::slotEditAccounts() 266void OpieMail::slotEditAccounts()
262{ 267{
263 EditAccounts eaDialog( settings, this, 0, true ); 268 EditAccounts eaDialog( settings, this, 0, true );
264 eaDialog.slotAdjustColumns(); 269 eaDialog.slotAdjustColumns();
265#ifndef DESKTOP_VERSION 270#ifndef DESKTOP_VERSION
266 eaDialog.showMaximized(); 271 eaDialog.showMaximized();
267#endif 272#endif
268 eaDialog.exec(); 273 eaDialog.exec();
269 if ( settings ) delete settings; 274 if ( settings ) delete settings;
270 settings = new Settings(); 275 settings = new Settings();
271 276
272 folderView->populate( settings->getAccounts() ); 277 folderView->populate( settings->getAccounts() );
273} 278}
274void OpieMail::replyMail() 279void OpieMail::replyMail()
275{ 280{
276 281
277 QListViewItem*item = mailView->currentItem(); 282 QListViewItem*item = mailView->currentItem();
278 if (!item) return; 283 if (!item) return;
279 RecMailP mail = ((MailListViewItem*)item)->data(); 284 RecMailP mail = ((MailListViewItem*)item)->data();
280 RecBodyP body = folderView->fetchBody(mail); 285 RecBodyP body = folderView->fetchBody(mail);
281 286
282 QString rtext; 287 QString rtext;
283 rtext += QString("* %1 wrote on %2:\n") // no i18n on purpose 288 rtext += QString("* %1 wrote on %2:\n") // no i18n on purpose
284 .arg( mail->getFrom()) 289 .arg( mail->getFrom())
285 .arg( mail->getDate()); 290 .arg( mail->getDate());
286 291
287 QString text = body->Bodytext(); 292 QString text = body->Bodytext();
288 QStringList lines = QStringList::split(QRegExp("\\n"), text); 293 QStringList lines = QStringList::split(QRegExp("\\n"), text);
289 QStringList::Iterator it; 294 QStringList::Iterator it;
290 for (it = lines.begin(); it != lines.end(); it++) 295 for (it = lines.begin(); it != lines.end(); it++)
291 { 296 {
292 rtext += "> " + *it + "\n"; 297 rtext += "> " + *it + "\n";
293 } 298 }
294 rtext += "\n"; 299 rtext += "\n";
295 300
296 QString prefix; 301 QString prefix;
297 if ( mail->getSubject().find(QRegExp("^Re: .*$")) != -1) prefix = ""; 302 if ( mail->getSubject().find(QRegExp("^Re: .*$")) != -1) prefix = "";
298 else prefix = "Re: "; // no i18n on purpose 303 else prefix = "Re: "; // no i18n on purpose
299 304
300 Settings *settings = new Settings(); 305 Settings *settings = new Settings();
301 ComposeMail composer( settings ,this, 0, true); 306 ComposeMail composer( settings ,this, 0, true);
302 if (mail->Replyto().isEmpty()) { 307 if (mail->Replyto().isEmpty()) {
303 composer.setTo( mail->getFrom()); 308 composer.setTo( mail->getFrom());
304 } else { 309 } else {
305 composer.setTo( mail->Replyto()); 310 composer.setTo( mail->Replyto());
306 } 311 }
307 composer.setSubject( prefix + mail->getSubject()); 312 composer.setSubject( prefix + mail->getSubject());
308 composer.setMessage( rtext ); 313 composer.setMessage( rtext );
309 composer.setInReplyTo( mail->Msgid()); 314 composer.setInReplyTo( mail->Msgid());
310 composer.setCharset( body->getCharset() ); 315 composer.setCharset( body->getCharset() );
311 316
312 mCurrentComposer = &composer; 317 mCurrentComposer = &composer;
313 if ( QDialog::Accepted == KApplication::execDialog( &composer ) ) 318 if ( QDialog::Accepted == KApplication::execDialog( &composer ) )
314 { 319 {
315 mail->Wrapper()->answeredMail(mail); 320 mail->Wrapper()->answeredMail(mail);
316 } 321 }
317 mCurrentComposer = 0; 322 mCurrentComposer = 0;
318 folderView->refreshOutgoing(); 323 folderView->refreshOutgoing();
319 delete settings; 324 delete settings;
320 325
321} 326}
322void OpieMail::closeViewMail(ViewMail * vm) 327void OpieMail::closeViewMail(ViewMail * vm)
323{ 328{
324 vm->hide(); 329 vm->hide();
325} 330}
326 331
327void OpieMail::slotDownloadMail( ) 332void OpieMail::slotDownloadMail( )
328{ 333{
329 QListViewItem*item = mailView->currentItem(); 334 QListViewItem*item = mailView->currentItem();
330 if (!item ) { 335 if (!item ) {
331 Global::statusMessage("Error: No item slected!"); 336 Global::statusMessage("Error: No item slected!");
332 return; 337 return;
333 } 338 }
334 RecMailP mail = ((MailListViewItem*)item)->data(); 339 RecMailP mail = ((MailListViewItem*)item)->data();
335 Account * acc = mail->Wrapper()->getAccount(); 340 Account * acc = mail->Wrapper()->getAccount();
336 if ( !acc ) { 341 if ( !acc ) {
337 Global::statusMessage("Mail is already stored locally!"); 342 Global::statusMessage("Mail is already stored locally!");
338 return; 343 return;
339 } 344 }
340 QString lfName = acc->getLocalFolder(); 345 QString lfName = acc->getLocalFolder();
341 //qDebug("local folder " + lfName ); 346 //qDebug("local folder " + lfName );
342 if ( lfName.isEmpty() ) 347 if ( lfName.isEmpty() )
343 lfName = acc->getAccountName(); 348 lfName = acc->getAccountName();
344 AbstractMail* targetMail = folderView->allAccounts()[0]->getWrapper(); 349 AbstractMail* targetMail = folderView->allAccounts()[0]->getWrapper();
345 //qDebug("target %d %d ",targetMail,mail->Wrapper() ); 350 //qDebug("target %d %d ",targetMail,mail->Wrapper() );
346 if ( targetMail == mail->Wrapper() ) { 351 if ( targetMail == mail->Wrapper() ) {
347 Global::statusMessage("Mail is already locally stored!"); 352 Global::statusMessage("Mail is already locally stored!");
348 return; 353 return;
349 } 354 }
350 if ( !targetMail->createMbox(lfName)) { 355 if ( !targetMail->createMbox(lfName)) {
351 Global::statusMessage("Error creating folder!"); 356 Global::statusMessage("Error creating folder!");
352 return; 357 return;
353 } 358 }
354 Global::statusMessage("Fetching mail...please wait!"); 359 Global::statusMessage("Fetching mail...please wait!");
355 qApp->processEvents(); 360 qApp->processEvents();
356 encodedString*st = 0; 361 encodedString*st = 0;
357 st = mail->Wrapper()->fetchRawBody(mail); 362 st = mail->Wrapper()->fetchRawBody(mail);
358 if ( st ) { 363 if ( st ) {
359 targetMail->storeMessage(st->Content(),st->Length(),lfName); 364 targetMail->storeMessage(st->Content(),st->Length(),lfName);
360 Global::statusMessage("Mail stored in "+ lfName); 365 Global::statusMessage("Mail stored in "+ lfName);
361 delete st; 366 delete st;
362 } else { 367 } else {
363 Global::statusMessage("Error: Cannot fetch mail!"); 368 Global::statusMessage("Error: Cannot fetch mail!");
364 } 369 }
365} 370}
366 371
367 372
368void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) 373void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
369{ 374{
370 QListViewItem*item = mailView->currentItem(); 375 QListViewItem*item = mailView->currentItem();
371 if (!item ) { 376 if (!item ) {
372 closeViewMail(vm); 377 closeViewMail(vm);
373 return; 378 return;
374 } 379 }
375 RecMailP mail = ((MailListViewItem*)item)->data(); 380 RecMailP mail = ((MailListViewItem*)item)->data();
376 mail->Wrapper()->deleteMail( mail ); 381 mail->Wrapper()->deleteMail( mail );
377 item = item->itemBelow(); 382 item = item->itemBelow();
378 if (!item ) { 383 if (!item ) {
379 closeViewMail(vm); 384 closeViewMail(vm);
380 return; 385 return;
381 } 386 }
382 mailView->setCurrentItem(item); 387 mailView->setCurrentItem(item);
383 mail = ((MailListViewItem*)item)->data(); 388 mail = ((MailListViewItem*)item)->data();
384 RecBodyP body = folderView->fetchBody(mail); 389 RecBodyP body = folderView->fetchBody(mail);
385 vm->setBody( body ); 390 vm->setBody( body );
386 vm->setMail( mail ); 391 vm->setMail( mail );
387} 392}
388void OpieMail::displayNextMail(ViewMail * vm) 393void OpieMail::displayNextMail(ViewMail * vm)
389{ 394{
390 QListViewItem*item = mailView->currentItem(); 395 QListViewItem*item = mailView->currentItem();
391 if (!item) return; 396 if (!item) return;
392 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); 397 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
393 item = item->itemBelow(); 398 item = item->itemBelow();
394 if (!item) { 399 if (!item) {
395 vm->setCaption(i18n("End of List" )); 400 vm->setCaption(i18n("End of List" ));
396 return; 401 return;
397 } 402 }
398 mailView->setCurrentItem(item); 403 mailView->setCurrentItem(item);
399 RecMailP mail = ((MailListViewItem*)item)->data(); 404 RecMailP mail = ((MailListViewItem*)item)->data();
400 RecBodyP body = folderView->fetchBody(mail); 405 RecBodyP body = folderView->fetchBody(mail);
401 vm->setBody( body ); 406 vm->setBody( body );
402 vm->setMail( mail ); 407 vm->setMail( mail );
403} 408}
404void OpieMail::displayMail() 409void OpieMail::displayMail()
405{ 410{
406 QListViewItem*item = mailView->currentItem(); 411 QListViewItem*item = mailView->currentItem();
407 if (!item) return; 412 if (!item) return;
408 RecMailP mail = ((MailListViewItem*)item)->data(); 413 RecMailP mail = ((MailListViewItem*)item)->data();
409 RecBodyP body = folderView->fetchBody(mail); 414 RecBodyP body = folderView->fetchBody(mail);
410 ViewMail readMail( this,"", Qt::WType_Modal ); 415 ViewMail readMail( this,"", Qt::WType_Modal );
411 readMail.setBody( body ); 416 readMail.setBody( body );
412 readMail.setMail( mail ); 417 readMail.setMail( mail );
413#ifndef DESKTOP_VERSION 418#ifndef DESKTOP_VERSION
414 readMail.showMaximized(); 419 readMail.showMaximized();
415#else 420#else
416 readMail.resize( 640, 480); 421 readMail.resize( 640, 480);
417#endif 422#endif
418 connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) ); 423 connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) );
419 connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) ); 424 connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) );
420 connect( &readMail,SIGNAL( signalDownloadMail() ), this, SLOT( slotDownloadMail() ) ); 425 connect( &readMail,SIGNAL( signalDownloadMail() ), this, SLOT( slotDownloadMail() ) );
421 426
422 readMail.exec(); 427 readMail.exec();
423 428
424 if ( readMail.deleted ) 429 if ( readMail.deleted )
425 { 430 {
426 folderView->refreshCurrent(); 431 folderView->refreshCurrent();
427 } 432 }
428 else 433 else
429 { 434 {
430 QListViewItem*item = mailView->currentItem(); 435 QListViewItem*item = mailView->currentItem();
431 if (item) 436 if (item)
432 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); 437 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
433 } 438 }
434} 439}
435void OpieMail::slotGetAllMail() 440void OpieMail::slotGetAllMail()
436{ 441{
437 QListViewItem * item = folderView->firstChild(); 442 QListViewItem * item = folderView->firstChild();
438 while ( item ){ 443 while ( item ){
439 ((AccountViewItem *)item)->contextMenuSelected( 101 ); 444 ((AccountViewItem *)item)->contextMenuSelected( 101 );
440 item = item->nextSibling (); 445 item = item->nextSibling ();
441 } 446 }
442} 447}
443void OpieMail::slotGetMail() 448void OpieMail::slotGetMail()
444{ 449{
445 QListViewItem * item = folderView->currentItem(); 450 QListViewItem * item = folderView->currentItem();
446 if ( ! item ) return; 451 if ( ! item ) return;
447 ((AccountViewItem *)item)->contextMenuSelected( 101 ); 452 ((AccountViewItem *)item)->contextMenuSelected( 101 );
448} 453}
449void OpieMail::slotDeleteMail() 454void OpieMail::slotDeleteMail()
450{ 455{
451 if (!mailView->currentItem()) return; 456 if (!mailView->currentItem()) return;
452 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); 457 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data();
453 if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 458 if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + mail->getFrom() + " - " + mail->getSubject() ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
454 { 459 {
455 mail->Wrapper()->deleteMail( mail ); 460 mail->Wrapper()->deleteMail( mail );
456 folderView->refreshCurrent(); 461 folderView->refreshCurrent();
457 } 462 }
458} 463}
459void OpieMail::slotDeleteAllMail() 464void OpieMail::slotDeleteAllMail()
460{ 465{
461 466
462 QValueList<RecMailP> t; 467 QValueList<RecMailP> t;
463 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 468 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
464 { 469 {
465 MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); 470 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
466 while ( item ) { 471 while ( item ) {
467 if ( item->isSelected() ) { 472 if ( item->isSelected() ) {
468 t.append( item->data() ); 473 t.append( item->data() );
469 } 474 }
470 item = (MailListViewItem*)item->nextSibling(); 475 item = (MailListViewItem*)item->nextSibling();
471 } 476 }
472 } 477 }
473 else 478 else
474 return; 479 return;
475 if ( t.count() == 0 ) 480 if ( t.count() == 0 )
476 return; 481 return;
477 RecMailP mail = t.first(); 482 RecMailP mail = t.first();
478 mail->Wrapper()->deleteMailList(t); 483 mail->Wrapper()->deleteMailList(t);
479 folderView->refreshCurrent(); 484 folderView->refreshCurrent();
480 485
481 486
482} 487}
483void OpieMail::clearSelection() 488void OpieMail::clearSelection()
484{ 489{
485 mailView->clearSelection(); 490 mailView->clearSelection();
486 491
487} 492}
488 493
489void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) 494void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int )
490{ 495{
491 if (!mailView->currentItem()) return; 496 if (!mailView->currentItem()) return;
492 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); 497 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType();
493 /* just the RIGHT button - or hold on pda */ 498 /* just the RIGHT button - or hold on pda */
494 if (button!=2) {return;} 499 if (button!=2) {return;}
495 if (!item) return; 500 if (!item) return;
496 QPopupMenu *m = new QPopupMenu(0); 501 QPopupMenu *m = new QPopupMenu(0);
497 if (m) 502 if (m)
498 { 503 {
499 if (mailtype==MAILLIB::A_NNTP) { 504 if (mailtype==MAILLIB::A_NNTP) {
500 m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); 505 m->insertItem(i18n("Read this posting"),this,SLOT(displayMail()));
501 m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail())); 506 m->insertItem(i18n("Copy this posting"),this,SLOT(slotMoveCopyMail()));
502 m->insertSeparator(); 507 m->insertSeparator();
503 m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail())); 508 m->insertItem(i18n("Copy all selected postings"),this,SLOT(slotMoveCopyAllMail()));
504 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); 509 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
505 } else { 510 } else {
506 if (folderView->currentisDraft()) { 511 if (folderView->currentisDraft()) {
507 m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail())); 512 m->insertItem(i18n("Edit this mail"),this,SLOT(reEditMail()));
508 } 513 }
509 m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail())); 514 m->insertItem(i18n("Reply to this mail"),this,SLOT(replyMail()));
510 m->insertItem(i18n("Read this mail"),this,SLOT(displayMail())); 515 m->insertItem(i18n("Read this mail"),this,SLOT(displayMail()));
511 m->insertSeparator(); 516 m->insertSeparator();
512 m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail())); 517 m->insertItem(i18n("Move/Copy this mail"),this,SLOT(slotMoveCopyMail()));
513 m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail())); 518 m->insertItem(i18n("Delete this mail"),this,SLOT(slotDeleteMail()));
514 m->insertSeparator(); 519 m->insertSeparator();
515 m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail())); 520 m->insertItem(i18n("Move/Copy all selected mail"),this,SLOT(slotMoveCopyAllMail()));
516 m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail())); 521 m->insertItem(i18n("Delete all selected mails"),this,SLOT(slotDeleteAllMail()));
517 m->insertSeparator(); 522 m->insertSeparator();
518 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection())); 523 m->insertItem(i18n("Clear selection"),this,SLOT(clearSelection()));
519 } 524 }
520 m->setFocus(); 525 m->setFocus();
521 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); 526 m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) );
522 delete m; 527 delete m;
523 } 528 }
524} 529}
525 530
526void OpieMail::slotShowFolders( bool show ) 531void OpieMail::slotShowFolders( bool show )
527{ 532{
528 if ( show && folderView->isHidden() ) 533 if ( show && folderView->isHidden() )
529 { 534 {
530 folderView->show(); 535 folderView->show();
531 } 536 }
532 else if ( !show && !folderView->isHidden() ) 537 else if ( !show && !folderView->isHidden() )
533 { 538 {
534 folderView->hide(); 539 folderView->hide();
535 } 540 }
536} 541}
537 542
538void OpieMail::refreshMailView(const QValueList<RecMailP>&list) 543void OpieMail::refreshMailView(const QValueList<RecMailP>&list)
539{ 544{
540 MailListViewItem*item = 0; 545 MailListViewItem*item = 0;
541 mailView->clear(); 546 mailView->clear();
542 547
543 QValueList<RecMailP>::ConstIterator it; 548 QValueList<RecMailP>::ConstIterator it;
544 for (it = list.begin(); it != list.end();++it) 549 for (it = list.begin(); it != list.end();++it)
545 { 550 {
546 item = new MailListViewItem(mailView,item); 551 item = new MailListViewItem(mailView,item);
547 item->storeData((*it)); 552 item->storeData((*it));
548 item->showEntry(); 553 item->showEntry();
549 } 554 }
550 mailView->setSorting ( 4, false ); 555 mailView->setSorting ( 4, false );
551} 556}
552 557
553void OpieMail::mailLeftClicked( QListViewItem *item ) 558void OpieMail::mailLeftClicked( QListViewItem *item )
554{ 559{
555 mailView->clearSelection(); 560 mailView->clearSelection();
556 /* just LEFT button - or tap with stylus on pda */ 561 /* just LEFT button - or tap with stylus on pda */
557 //if (button!=1) return; 562 //if (button!=1) return;
558 if (!item) return; 563 if (!item) return;
559 if (folderView->currentisDraft()) { 564 if (folderView->currentisDraft()) {
560 reEditMail(); 565 reEditMail();
561 } else { 566 } else {
562 displayMail(); 567 displayMail();
563 } 568 }
564} 569}
565 570
566void OpieMail::slotMoveCopyMail() 571void OpieMail::slotMoveCopyMail()
567{ 572{
568 if (!mailView->currentItem()) return; 573 if (!mailView->currentItem()) return;
569 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data(); 574 RecMailP mail = ((MailListViewItem*)mailView->currentItem() )->data();
570 AbstractMail*targetMail = 0; 575 AbstractMail*targetMail = 0;
571 QString targetFolder = ""; 576 QString targetFolder = "";
572 Selectstore sels; 577 Selectstore sels;
573 folderView->setupFolderselect(&sels); 578 folderView->setupFolderselect(&sels);
574 if (!sels.exec()) return; 579 if (!sels.exec()) return;
575 targetMail = sels.currentMail(); 580 targetMail = sels.currentMail();
576 targetFolder = sels.currentFolder(); 581 targetFolder = sels.currentFolder();
577 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || 582 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
578 targetFolder.isEmpty()) 583 targetFolder.isEmpty())
579 { 584 {
580 return; 585 return;
581 } 586 }
582 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) 587 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
583 { 588 {
584 QMessageBox::critical(0,i18n("Error creating new Folder"), 589 QMessageBox::critical(0,i18n("Error creating new Folder"),
585 i18n("<center>Error while creating<br>new folder - breaking.</center>")); 590 i18n("<center>Error while creating<br>new folder - breaking.</center>"));
586 return; 591 return;
587 } 592 }
588 sels.hide(); 593 sels.hide();
589 qApp->processEvents(); 594 qApp->processEvents();
590 // qDebug("hiding sels "); 595 // qDebug("hiding sels ");
591 mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails()); 596 mail->Wrapper()->mvcpMail(mail,targetFolder,targetMail,sels.moveMails());
592 folderView->refreshCurrent(); 597 folderView->refreshCurrent();
593} 598}
594 599
595void OpieMail::slotMoveCopyAllMail() 600void OpieMail::slotMoveCopyAllMail()
596{ 601{
597 602
598 if (!mailView->currentItem()) return; 603 if (!mailView->currentItem()) return;
599 QValueList<RecMailP> t; 604 QValueList<RecMailP> t;
600 // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 605 // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
601 { 606 {
602 MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); 607 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
603 while ( item ) { 608 while ( item ) {
604 if ( item->isSelected() ) { 609 if ( item->isSelected() ) {
605 t.append( item->data() ); 610 t.append( item->data() );
606 } 611 }
607 item = (MailListViewItem*)item->nextSibling(); 612 item = (MailListViewItem*)item->nextSibling();
608 } 613 }
609 } 614 }
610 // else 615 // else
611 // return; 616 // return;
612 if ( t.count() == 0 ) 617 if ( t.count() == 0 )
613 return; 618 return;
614 RecMailP mail = t.first(); 619 RecMailP mail = t.first();
615 AbstractMail*targetMail = 0; 620 AbstractMail*targetMail = 0;
616 QString targetFolder = ""; 621 QString targetFolder = "";
617 Selectstore sels; 622 Selectstore sels;
618 folderView->setupFolderselect(&sels); 623 folderView->setupFolderselect(&sels);
619 if (!sels.exec()) return; 624 if (!sels.exec()) return;
620 targetMail = sels.currentMail(); 625 targetMail = sels.currentMail();
621 targetFolder = sels.currentFolder(); 626 targetFolder = sels.currentFolder();
622 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) || 627 if ( (mail->Wrapper()==targetMail && mail->getMbox()==targetFolder) ||
623 targetFolder.isEmpty()) 628 targetFolder.isEmpty())
624 { 629 {
625 return; 630 return;
626 } 631 }
627 if (sels.newFolder() && !targetMail->createMbox(targetFolder)) 632 if (sels.newFolder() && !targetMail->createMbox(targetFolder))
628 { 633 {
629 QMessageBox::critical(0,i18n("Error creating new Folder"), 634 QMessageBox::critical(0,i18n("Error creating new Folder"),
630 i18n("<center>Error while creating<br>new folder - breaking.</center>")); 635 i18n("<center>Error while creating<br>new folder - breaking.</center>"));
631 return; 636 return;
632 } 637 }
633 sels.hide(); 638 sels.hide();
634 qApp->processEvents(); 639 qApp->processEvents();
635 //qDebug("hiding sels "); 640 //qDebug("hiding sels ");
636 mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails()); 641 mail->Wrapper()->mvcpMailList(t,targetFolder,targetMail,sels.moveMails());
637 folderView->refreshCurrent(); 642 folderView->refreshCurrent();
638} 643}
639 644
640void OpieMail::reEditMail() 645void OpieMail::reEditMail()
641{ 646{
642 if (!mailView->currentItem()) return; 647 if (!mailView->currentItem()) return;
643 648
644 ComposeMail compose( settings, this, 0, true ); 649 ComposeMail compose( settings, this, 0, true );
645 compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data()); 650 compose.reEditMail(((MailListViewItem*)mailView->currentItem() )->data());
646 compose.slotAdjustColumns(); 651 compose.slotAdjustColumns();
647#ifndef DESKTOP_VERSION 652#ifndef DESKTOP_VERSION
648 compose.showMaximized(); 653 compose.showMaximized();
649#else 654#else
650 compose.resize(640,480); 655 compose.resize(640,480);
651#endif 656#endif
652 mCurrentComposer = &compose; 657 mCurrentComposer = &compose;
653 compose.exec(); 658 compose.exec();
654 folderView->refreshOutgoing(); 659 folderView->refreshOutgoing();
655 mCurrentComposer = 0; 660 mCurrentComposer = 0;
656} 661}
657 662
658void OpieMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList) 663void OpieMail::insertAttendees(const QString& uid,const QStringList& nameList,const QStringList& emailList,const QStringList& uidList)
659{ 664{
660 665
661 if ( mCurrentComposer ) { 666 if ( mCurrentComposer ) {
662 mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList); 667 mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList);
663 } else { 668 } else {
664 ComposeMail compose( settings, this, 0, true ); 669 ComposeMail compose( settings, this, 0, true );
665 compose.slotAdjustColumns(); 670 compose.slotAdjustColumns();
666#ifndef DESKTOP_VERSION 671#ifndef DESKTOP_VERSION
667 compose.showMaximized(); 672 compose.showMaximized();
668#endif 673#endif
669 mCurrentComposer = &compose; 674 mCurrentComposer = &compose;
670 mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList); 675 mCurrentComposer->insertAttendees(uid,nameList,emailList,uidList);
671 compose.exec(); 676 compose.exec();
672 mCurrentComposer = 0; 677 mCurrentComposer = 0;
673 folderView->refreshOutgoing(); 678 folderView->refreshOutgoing();
674 raise(); 679 raise();
675 } 680 }
676} 681}
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 4f75b3f..48c5dda 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -1,66 +1,67 @@
1// CHANGED 2004-09-31 Lutz Rogowski 1// CHANGED 2004-09-31 Lutz Rogowski
2#ifndef OPIEMAIL_H 2#ifndef OPIEMAIL_H
3#define OPIEMAIL_H 3#define OPIEMAIL_H
4 4
5#include "mainwindow.h" 5#include "mainwindow.h"
6#include <libmailwrapper/settings.h> 6#include <libmailwrapper/settings.h>
7 7
8#include <opie2/osmartpointer.h> 8#include <opie2/osmartpointer.h>
9#include <libmailwrapper/mailtypes.h> 9#include <libmailwrapper/mailtypes.h>
10#include <viewmail.h> 10#include <viewmail.h>
11#include <qstringlist.h> 11#include <qstringlist.h>
12 12
13class ComposeMail; 13class ComposeMail;
14 14
15class OpieMail : public MainWindow 15class OpieMail : public MainWindow
16{ 16{
17 Q_OBJECT 17 Q_OBJECT
18 18
19public: 19public:
20 OpieMail( QWidget *parent = 0, const char *name = 0 ); 20 OpieMail( QWidget *parent = 0, const char *name = 0 );
21 virtual ~OpieMail(); 21 virtual ~OpieMail();
22 static QString appName() { return QString::fromLatin1("kopiemail"); } 22 static QString appName() { return QString::fromLatin1("kopiemail"); }
23 23
24public slots: 24public slots:
25 virtual void slotwriteMail(const QString&name,const QString&email); 25 virtual void slotwriteMail(const QString&name,const QString&email);
26 virtual void slotwriteMail2(const QString&nameemail); 26 virtual void slotwriteMail2(const QString&nameemail);
27 virtual void slotComposeMail(); 27 virtual void slotComposeMail();
28 virtual void slotExtAppHandler(); 28 virtual void slotExtAppHandler();
29 virtual void appMessage(const QCString &msg, const QByteArray &data); 29 virtual void appMessage(const QCString &msg, const QByteArray &data);
30 virtual void message(const QCString &msg, const QByteArray &data); 30 virtual void message(const QCString &msg, const QByteArray &data);
31 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); 31 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist);
32protected slots: 32protected slots:
33 virtual void deleteAndDisplayNextMail(ViewMail * vm); 33 virtual void deleteAndDisplayNextMail(ViewMail * vm);
34 virtual void displayNextMail(ViewMail * vm); 34 virtual void displayNextMail(ViewMail * vm);
35 virtual void slotSendQueued(); 35 virtual void slotSendQueued();
36 virtual void slotSearchMails(); 36 virtual void slotSearchMails();
37 virtual void slotEditSettings(); 37 virtual void slotEditSettings();
38 virtual void slotEditGlobalSettings();
38 virtual void slotEditAccounts(); 39 virtual void slotEditAccounts();
39 virtual void displayMail(); 40 virtual void displayMail();
40 virtual void replyMail(); 41 virtual void replyMail();
41 virtual void slotDeleteMail(); 42 virtual void slotDeleteMail();
42 virtual void slotGetMail(); 43 virtual void slotGetMail();
43 virtual void slotGetAllMail(); 44 virtual void slotGetAllMail();
44 virtual void slotDeleteAllMail(); 45 virtual void slotDeleteAllMail();
45 virtual void mailHold(int, QListViewItem *,const QPoint&,int); 46 virtual void mailHold(int, QListViewItem *,const QPoint&,int);
46 virtual void slotShowFolders( bool show ); 47 virtual void slotShowFolders( bool show );
47 virtual void refreshMailView(const QValueList<RecMailP>&); 48 virtual void refreshMailView(const QValueList<RecMailP>&);
48 virtual void mailLeftClicked( QListViewItem * ); 49 virtual void mailLeftClicked( QListViewItem * );
49 virtual void slotMoveCopyMail(); 50 virtual void slotMoveCopyMail();
50 virtual void slotMoveCopyAllMail(); 51 virtual void slotMoveCopyAllMail();
51 virtual void reEditMail(); 52 virtual void reEditMail();
52 void clearSelection(); 53 void clearSelection();
53 void slotDownloadMail(); 54 void slotDownloadMail();
54private: 55private:
55 ComposeMail* mCurrentComposer; 56 ComposeMail* mCurrentComposer;
56 void closeViewMail(ViewMail * vm); 57 void closeViewMail(ViewMail * vm);
57 QString mPendingEmail; 58 QString mPendingEmail;
58 QString mPendingName; 59 QString mPendingName;
59 QByteArray mPendingData; 60 QByteArray mPendingData;
60 QCString mPendingMessage; 61 QCString mPendingMessage;
61 Settings *settings; 62 Settings *settings;
62 QTextBrowser * tb; 63 QTextBrowser * tb;
63 64
64}; 65};
65 66
66#endif 67#endif
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index 11635e1..d5c7e61 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -1,296 +1,301 @@
1#include <qtabwidget.h> 1#include <qtabwidget.h>
2#include <qpushbutton.h> 2#include <qpushbutton.h>
3#include <qlayout.h> 3#include <qlayout.h>
4#include <qframe.h> 4#include <qframe.h>
5 5
6 6
7#include "klocale.h" 7#include "klocale.h"
8#include "kdebug.h" 8#include "kdebug.h"
9 9
10#include "kdialogbase.h" 10#include "kdialogbase.h"
11 11
12KDialogBase::KDialogBase() 12KDialogBase::KDialogBase()
13{ 13{
14} 14}
15 15
16KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal, 16KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
17 const QString &caption, 17 const QString &caption,
18 int buttonMask, ButtonCode defaultButton, 18 int buttonMask, ButtonCode defaultButton,
19 bool separator, 19 bool separator,
20 const QString &user1, 20 const QString &user1,
21 const QString &user2, 21 const QString &user2,
22 const QString &user3) : 22 const QString &user3) :
23 KDialog( parent, name, modal ) 23 KDialog( parent, name, modal )
24{ 24{
25 init( caption, buttonMask, user1, user2 ); 25 init( caption, buttonMask, user1, user2 );
26 if (findButton( defaultButton ) ) { 26 if (findButton( defaultButton ) ) {
27 (findButton( defaultButton ) )->setFocus(); 27 (findButton( defaultButton ) )->setFocus();
28 (findButton( defaultButton ) )->setDefault( true ); 28 (findButton( defaultButton ) )->setDefault( true );
29 } 29 }
30 30
31} 31}
32 32
33KDialogBase::KDialogBase( int dialogFace, const QString &caption, 33KDialogBase::KDialogBase( int dialogFace, const QString &caption,
34 int buttonMask, ButtonCode defaultButton, 34 int buttonMask, ButtonCode defaultButton,
35 QWidget *parent, const char *name, bool modal, 35 QWidget *parent, const char *name, bool modal,
36 bool separator, 36 bool separator,
37 const QString &user1, 37 const QString &user1,
38 const QString &user2, 38 const QString &user2,
39 const QString &user3) : 39 const QString &user3) :
40 KDialog( parent, name, modal ) 40 KDialog( parent, name, modal )
41{ 41{
42 init( caption, buttonMask, user1, user2 ); 42 init( caption, buttonMask, user1, user2 );
43 if (findButton( defaultButton ) ) { 43 if (findButton( defaultButton ) ) {
44 (findButton( defaultButton ) )->setFocus(); 44 (findButton( defaultButton ) )->setFocus();
45 (findButton( defaultButton ) )->setDefault( true ); 45 (findButton( defaultButton ) )->setDefault( true );
46 } 46 }
47 47
48} 48}
49 49
50KDialogBase::~KDialogBase() 50KDialogBase::~KDialogBase()
51{ 51{
52} 52}
53 53
54void KDialogBase::init( const QString &caption, int buttonMask, 54void KDialogBase::init( const QString &caption, int buttonMask,
55 const QString &user1 ,const QString &user2 ) 55 const QString &user1 ,const QString &user2 )
56{ 56{
57 mMainWidget = 0; 57 mMainWidget = 0;
58 mTabWidget = 0; 58 mTabWidget = 0;
59 mPlainPage = 0; 59 mPlainPage = 0;
60 mTopLayout = 0; 60 mTopLayout = 0;
61 if ( !caption.isEmpty() ) { 61 if ( !caption.isEmpty() ) {
62 setCaption( caption ); 62 setCaption( caption );
63 } 63 }
64 64
65 if ( buttonMask & User1 ) { 65 if ( buttonMask & User1 ) {
66 mUser1Button = new QPushButton( user1, this ); 66 mUser1Button = new QPushButton( user1, this );
67 connect( mUser1Button, SIGNAL( clicked() ), SLOT( slotUser1() ) ); 67 connect( mUser1Button, SIGNAL( clicked() ), SLOT( slotUser1() ) );
68 } else { 68 } else {
69 mUser1Button = 0; 69 mUser1Button = 0;
70 } 70 }
71 if ( buttonMask & User2 ) { 71 if ( buttonMask & User2 ) {
72 mUser2Button = new QPushButton( user2, this ); 72 mUser2Button = new QPushButton( user2, this );
73 connect( mUser2Button, SIGNAL( clicked() ), SLOT( slotUser2() ) ); 73 connect( mUser2Button, SIGNAL( clicked() ), SLOT( slotUser2() ) );
74 } else { 74 } else {
75 mUser2Button = 0; 75 mUser2Button = 0;
76 } 76 }
77 77
78 if ( buttonMask & Ok ) { 78 if ( buttonMask & Ok ) {
79 mOkButton = new QPushButton( i18n("Ok"), this ); 79 mOkButton = new QPushButton( i18n("Ok"), this );
80 connect( mOkButton, SIGNAL( clicked() ), SLOT( slotOk() ) ); 80 connect( mOkButton, SIGNAL( clicked() ), SLOT( slotOk() ) );
81 //mOkButton->setDefault( true ); 81 //mOkButton->setDefault( true );
82 } else { 82 } else {
83 mOkButton = 0; 83 mOkButton = 0;
84 } 84 }
85 if ( buttonMask & Default ) { 85 if ( buttonMask & Default ) {
86 mDefaultButton = new QPushButton( i18n("Default"), this ); 86 mDefaultButton = new QPushButton( i18n("Default"), this );
87 connect( mDefaultButton, SIGNAL( clicked() ), SIGNAL( defaultClicked() ) ); 87 connect( mDefaultButton, SIGNAL( clicked() ), SIGNAL( defaultClicked() ) );
88 } else { 88 } else {
89 mDefaultButton = 0; 89 mDefaultButton = 0;
90 } 90 }
91 91
92 if ( buttonMask & Apply ) { 92 if ( buttonMask & Apply ) {
93 mApplyButton = new QPushButton( i18n("Apply"), this ); 93 mApplyButton = new QPushButton( i18n("Apply"), this );
94 connect( mApplyButton, SIGNAL( clicked() ), SLOT( slotApply() ) ); 94 connect( mApplyButton, SIGNAL( clicked() ), SLOT( slotApply() ) );
95 } else { 95 } else {
96 mApplyButton = 0; 96 mApplyButton = 0;
97 } 97 }
98 98
99 if ( buttonMask & Cancel ) { 99 if ( buttonMask & Cancel ) {
100 mCancelButton = new QPushButton( i18n("Cancel"), this ); 100 mCancelButton = new QPushButton( i18n("Cancel"), this );
101 connect( mCancelButton, SIGNAL( clicked() ), SLOT( slotCancel() ) ); 101 connect( mCancelButton, SIGNAL( clicked() ), SLOT( slotCancel() ) );
102 } else { 102 } else {
103 mCancelButton = 0; 103 mCancelButton = 0;
104 } 104 }
105 105
106 if ( buttonMask & Close ) { 106 if ( buttonMask & Close ) {
107 mCloseButton = new QPushButton( i18n("Close"), this ); 107 mCloseButton = new QPushButton( i18n("Close"), this );
108 connect( mCloseButton, SIGNAL( clicked() ), SLOT( slotClose() ) ); 108 connect( mCloseButton, SIGNAL( clicked() ), SLOT( slotClose() ) );
109 } else { 109 } else {
110 mCloseButton = 0; 110 mCloseButton = 0;
111 } 111 }
112} 112}
113 113
114QTabWidget *KDialogBase::tabWidget() 114QTabWidget *KDialogBase::tabWidget()
115{ 115{
116 if ( !mTabWidget ) { 116 if ( !mTabWidget ) {
117 mTabWidget = new QTabWidget( this ); 117 mTabWidget = new QTabWidget( this );
118 setMainWidget( mTabWidget ); 118 setMainWidget( mTabWidget );
119 } 119 }
120 return mTabWidget; 120 return mTabWidget;
121} 121}
122 122
123void KDialogBase::hideButtons() 123void KDialogBase::hideButtons()
124{ 124{
125 if ( mUser1Button ) mUser1Button->hide() ; 125 if ( mUser1Button ) mUser1Button->hide() ;
126 if ( mUser2Button ) mUser2Button->hide() ; 126 if ( mUser2Button ) mUser2Button->hide() ;
127 if ( mOkButton ) mOkButton->hide() ; 127 if ( mOkButton ) mOkButton->hide() ;
128 if ( mApplyButton ) mApplyButton->hide() ; 128 if ( mApplyButton ) mApplyButton->hide() ;
129 if ( mDefaultButton ) mDefaultButton->hide(); 129 if ( mDefaultButton ) mDefaultButton->hide();
130 if ( mCancelButton ) mCancelButton->hide() ; 130 if ( mCancelButton ) mCancelButton->hide() ;
131 if ( mCloseButton ) mCloseButton->hide() ; 131 if ( mCloseButton ) mCloseButton->hide() ;
132 132
133} 133}
134void KDialogBase::initLayout() 134void KDialogBase::initLayout()
135{ 135{
136 136
137 delete mTopLayout; 137 delete mTopLayout;
138 mTopLayout = new QVBoxLayout( this ); 138 mTopLayout = new QVBoxLayout( this );
139 mTopLayout->setMargin( marginHintSmall() ); 139 mTopLayout->setMargin( marginHintSmall() );
140 mTopLayout->setSpacing( spacingHintSmall() ); 140 mTopLayout->setSpacing( spacingHintSmall() );
141 141
142 mTopLayout->addWidget( mMainWidget ); 142 mTopLayout->addWidget( mMainWidget );
143 143
144 QBoxLayout *buttonLayout = new QHBoxLayout; 144 QBoxLayout *buttonLayout = new QHBoxLayout;
145 mTopLayout->addLayout( buttonLayout ); 145 mTopLayout->addLayout( buttonLayout );
146 146
147 if ( mUser1Button ) buttonLayout->addWidget( mUser1Button ); 147 if ( mUser1Button ) buttonLayout->addWidget( mUser1Button );
148 if ( mUser2Button ) buttonLayout->addWidget( mUser2Button ); 148 if ( mUser2Button ) buttonLayout->addWidget( mUser2Button );
149 if ( mOkButton ) buttonLayout->addWidget( mOkButton ); 149 if ( mOkButton ) buttonLayout->addWidget( mOkButton );
150 if ( mApplyButton ) buttonLayout->addWidget( mApplyButton ); 150 if ( mApplyButton ) buttonLayout->addWidget( mApplyButton );
151 if ( mDefaultButton ) buttonLayout->addWidget( mDefaultButton ); 151 if ( mDefaultButton ) buttonLayout->addWidget( mDefaultButton );
152 if ( mCancelButton ) buttonLayout->addWidget( mCancelButton ); 152 if ( mCancelButton ) buttonLayout->addWidget( mCancelButton );
153 if ( mCloseButton ) buttonLayout->addWidget( mCloseButton ); 153 if ( mCloseButton ) buttonLayout->addWidget( mCloseButton );
154 buttonLayout->setMargin( marginHintSmall() ); 154 buttonLayout->setMargin( marginHintSmall() );
155 buttonLayout->setSpacing( spacingHintSmall() ); 155 buttonLayout->setSpacing( spacingHintSmall() );
156} 156}
157 157
158QFrame *KDialogBase::addPage( const QString &name ) 158QFrame *KDialogBase::addPage( const QString &name )
159{ 159{
160// kdDebug() << "KDialogBase::addPage(): " << name << endl; 160// kdDebug() << "KDialogBase::addPage(): " << name << endl;
161 QFrame *frame = new QFrame( tabWidget() ); 161 QFrame *frame = new QFrame( tabWidget() );
162 tabWidget()->addTab( frame, name ); 162 tabWidget()->addTab( frame, name );
163 return frame; 163 return frame;
164} 164}
165 165
166QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & ) 166QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & )
167{ 167{
168 return addPage( name ); 168 return addPage( name );
169} 169}
170 170
171 171
172void KDialogBase::setMainWidget( QWidget *widget ) 172void KDialogBase::setMainWidget( QWidget *widget )
173{ 173{
174 kdDebug() << "KDialogBase::setMainWidget()" << endl; 174 kdDebug() << "KDialogBase::setMainWidget()" << endl;
175 175
176 mMainWidget = widget; 176 mMainWidget = widget;
177 initLayout(); 177 initLayout();
178} 178}
179 179
180void KDialogBase::setButtonText( ButtonCode id, const QString &text ) 180void KDialogBase::setButtonText( ButtonCode id, const QString &text )
181{ 181{
182 QPushButton *button = findButton( id ); 182 QPushButton *button = findButton( id );
183 if ( button ) { 183 if ( button ) {
184 button->setText( text ); 184 button->setText( text );
185 } 185 }
186} 186}
187 187
188void KDialogBase::enableButton( ButtonCode id, bool state ) 188void KDialogBase::enableButton( ButtonCode id, bool state )
189{ 189{
190 QPushButton *button = findButton( id ); 190 QPushButton *button = findButton( id );
191 if ( button ) { 191 if ( button ) {
192 button->setEnabled( state ); 192 button->setEnabled( state );
193 } 193 }
194} 194}
195 195
196QPushButton *KDialogBase::findButton( ButtonCode id ) 196QPushButton *KDialogBase::findButton( ButtonCode id )
197{ 197{
198 QPushButton *button = 0; 198 QPushButton *button = 0;
199 switch ( id ) { 199 switch ( id ) {
200 case Ok: 200 case Ok:
201 button = mOkButton; 201 button = mOkButton;
202 break; 202 break;
203 case Apply: 203 case Apply:
204 button = mApplyButton; 204 button = mApplyButton;
205 break; 205 break;
206 case User1: 206 case User1:
207 button = mUser1Button; 207 button = mUser1Button;
208 break; 208 break;
209 case User2: 209 case User2:
210 button = mUser2Button; 210 button = mUser2Button;
211 break; 211 break;
212 case Cancel: 212 case Cancel:
213 button = mCancelButton; 213 button = mCancelButton;
214 break; 214 break;
215 case Default: 215 case Default:
216 button = mDefaultButton; 216 button = mDefaultButton;
217 break; 217 break;
218 case Close: 218 case Close:
219 button = mCloseButton; 219 button = mCloseButton;
220 break; 220 break;
221 default: 221 default:
222 break; 222 break;
223 } 223 }
224 return button; 224 return button;
225} 225}
226 226
227void KDialogBase::enableButtonOK( bool state ) 227void KDialogBase::enableButtonOK( bool state )
228{ 228{
229 enableButton( Ok, state ); 229 enableButton( Ok, state );
230} 230}
231 231
232void KDialogBase::enableButtonApply( bool state ) 232void KDialogBase::enableButtonApply( bool state )
233{ 233{
234 enableButton( Apply, state ); 234 enableButton( Apply, state );
235} 235}
236 236
237void KDialogBase::showButton( ButtonCode id, bool show ) 237void KDialogBase::showButton( ButtonCode id, bool show )
238{ 238{
239 QPushButton *button = findButton( id ); 239 QPushButton *button = findButton( id );
240 if ( button ) { 240 if ( button ) {
241 if ( show ) button->show(); 241 if ( show ) button->show();
242 else button->hide(); 242 else button->hide();
243 } 243 }
244} 244}
245 245
246int KDialogBase::pageIndex( QWidget *widget ) const 246int KDialogBase::pageIndex( QWidget *widget ) const
247{ 247{
248 return 0; 248 return 0;
249} 249}
250 250
251 251
252bool KDialogBase::showPage( int index ) 252bool KDialogBase::showPage( int index )
253{ 253{
254 tabWidget()->setCurrentPage( index );return false; 254 tabWidget()->setCurrentPage( index );return false;
255} 255}
256 256
257QFrame *KDialogBase::plainPage() 257QFrame *KDialogBase::plainPage()
258{ 258{
259 if ( !mPlainPage ) { 259 if ( !mPlainPage ) {
260 mPlainPage = new QFrame( this ); 260 mPlainPage = new QFrame( this );
261 setMainWidget( mPlainPage ); 261 setMainWidget( mPlainPage );
262 } 262 }
263 return mPlainPage; 263 return mPlainPage;
264} 264}
265 265
266void KDialogBase::slotOk() 266void KDialogBase::slotOk()
267{ 267{
268 emit okClicked(); 268 emit okClicked();
269 accept(); 269 accept();
270} 270}
271 271
272void KDialogBase::slotApply() 272void KDialogBase::slotApply()
273{ 273{
274 emit applyClicked(); 274 emit applyClicked();
275} 275}
276 276
277void KDialogBase::slotCancel() 277void KDialogBase::slotCancel()
278{ 278{
279 emit cancelClicked(); 279 emit cancelClicked();
280 reject(); 280 reject();
281} 281}
282 282
283void KDialogBase::slotClose() 283void KDialogBase::slotClose()
284{ 284{
285 emit closeClicked(); 285 emit closeClicked();
286 reject(); 286 reject();
287} 287}
288 288
289void KDialogBase::accept ()
290{
291 emit acceptClicked();
292 KDialog::accept();
293}
289void KDialogBase::slotUser1() 294void KDialogBase::slotUser1()
290{ 295{
291 emit user1Clicked(); 296 emit user1Clicked();
292} 297}
293void KDialogBase::slotUser2() 298void KDialogBase::slotUser2()
294{ 299{
295 emit user2Clicked(); 300 emit user2Clicked();
296} 301}
diff --git a/microkde/kdialogbase.h b/microkde/kdialogbase.h
index a2fc2dc..17c186b 100644
--- a/microkde/kdialogbase.h
+++ b/microkde/kdialogbase.h
@@ -1,141 +1,143 @@
1#ifndef MINIKDE_KDIALOGBASE_H 1#ifndef MINIKDE_KDIALOGBASE_H
2#define MINIKDE_KDIALOGBASE_H 2#define MINIKDE_KDIALOGBASE_H
3 3
4#include <qframe.h> 4#include <qframe.h>
5 5
6#include "kdialog.h" 6#include "kdialog.h"
7 7
8class QPushButton; 8class QPushButton;
9class QLayout; 9class QLayout;
10class QTabWidget; 10class QTabWidget;
11class QBoxLayout; 11class QBoxLayout;
12 12
13class KDialogBase : public KDialog 13class KDialogBase : public KDialog
14{ 14{
15 Q_OBJECT 15 Q_OBJECT
16 public: 16 public:
17 enum ButtonCode 17 enum ButtonCode
18 { 18 {
19 Help = 0x00000001, 19 Help = 0x00000001,
20 Default = 0x00000002, 20 Default = 0x00000002,
21 Ok = 0x00000004, 21 Ok = 0x00000004,
22 Apply = 0x00000008, 22 Apply = 0x00000008,
23 Try = 0x00000010, 23 Try = 0x00000010,
24 Cancel = 0x00000020, 24 Cancel = 0x00000020,
25 Close = 0x00000040, 25 Close = 0x00000040,
26 User1 = 0x00000080, 26 User1 = 0x00000080,
27 User2 = 0x00000100, 27 User2 = 0x00000100,
28 User3 = 0x00000200, 28 User3 = 0x00000200,
29 No = 0x00000080, 29 No = 0x00000080,
30 Yes = 0x00000100, 30 Yes = 0x00000100,
31 Details = 0x00000400, 31 Details = 0x00000400,
32 Filler = 0x40000000, 32 Filler = 0x40000000,
33 Stretch = 0x80000000 33 Stretch = 0x80000000
34 }; 34 };
35 35
36 enum DialogType 36 enum DialogType
37 { 37 {
38 TreeList, 38 TreeList,
39 Tabbed, 39 Tabbed,
40 Plain, 40 Plain,
41 Swallow, 41 Swallow,
42 IconList 42 IconList
43 }; 43 };
44 44
45 KDialogBase(); 45 KDialogBase();
46 KDialogBase( QWidget *parent=0, const char *name=0, bool modal=true, 46 KDialogBase( QWidget *parent=0, const char *name=0, bool modal=true,
47 const QString &caption=QString::null, 47 const QString &caption=QString::null,
48 int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok, 48 int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok,
49 bool separator=false, 49 bool separator=false,
50 const QString &user1=QString::null, 50 const QString &user1=QString::null,
51 const QString &user2=QString::null, 51 const QString &user2=QString::null,
52 const QString &user3=QString::null); 52 const QString &user3=QString::null);
53 KDialogBase( int dialogFace, const QString &caption, 53 KDialogBase( int dialogFace, const QString &caption,
54 int buttonMask, ButtonCode defaultButton, 54 int buttonMask, ButtonCode defaultButton,
55 QWidget *parent=0, const char *name=0, bool modal=true, 55 QWidget *parent=0, const char *name=0, bool modal=true,
56 bool separator=false, 56 bool separator=false,
57 const QString &user1=QString::null, 57 const QString &user1=QString::null,
58 const QString &user2=QString::null, 58 const QString &user2=QString::null,
59 const QString &user3=QString::null); 59 const QString &user3=QString::null);
60 virtual ~KDialogBase(); 60 virtual ~KDialogBase();
61 61
62 QFrame *addPage( const QString & ); 62 QFrame *addPage( const QString & );
63 QFrame *addPage( const QString &, int, const QPixmap & ); 63 QFrame *addPage( const QString &, int, const QPixmap & );
64 64
65 void setMainWidget( QWidget *widget ); 65 void setMainWidget( QWidget *widget );
66 66
67 void setButtonText( ButtonCode id, const QString &text ); 67 void setButtonText( ButtonCode id, const QString &text );
68 68
69 void enableButton( ButtonCode id, bool state ); 69 void enableButton( ButtonCode id, bool state );
70 void enableButtonOK( bool state ); 70 void enableButtonOK( bool state );
71 void enableButtonApply( bool state ); 71 void enableButtonApply( bool state );
72 72
73 void showButton( ButtonCode, bool show ); 73 void showButton( ButtonCode, bool show );
74 74
75 int pageIndex( QWidget *widget ) const; 75 int pageIndex( QWidget *widget ) const;
76 76
77 bool showPage( int index ); 77 bool showPage( int index );
78 void hideButtons(); 78 void hideButtons();
79 79
80 QFrame *plainPage(); 80 QFrame *plainPage();
81 81
82 signals: 82 signals:
83 void user1Clicked(); 83 void user1Clicked();
84 void user2Clicked(); 84 void user2Clicked();
85 /** 85 /**
86 * The Apply button was pressed. This signal is only emitted if 86 * The Apply button was pressed. This signal is only emitted if
87 * @ref slotApply() is not replaced. 87 * @ref slotApply() is not replaced.
88 */ 88 */
89 void applyClicked(); 89 void applyClicked();
90 90
91 /** 91 /**
92 * The OK button was pressed. This signal is only emitted if 92 * The OK button was pressed. This signal is only emitted if
93 * @ref slotOk() is not replaced. 93 * @ref slotOk() is not replaced.
94 */ 94 */
95 void okClicked(); 95 void okClicked();
96 96
97 /** 97 /**
98 * The Cancel button was pressed. This signal is only emitted if 98 * The Cancel button was pressed. This signal is only emitted if
99 * @ref slotCancel() is not replaced. 99 * @ref slotCancel() is not replaced.
100 */ 100 */
101 void cancelClicked(); 101 void cancelClicked();
102 102
103 /** 103 /**
104 * The Close button was pressed. This signal is only emitted if 104 * The Close button was pressed. This signal is only emitted if
105 * @ref slotClose() is not replaced. 105 * @ref slotClose() is not replaced.
106 */ 106 */
107 void closeClicked(); 107 void closeClicked();
108 void defaultClicked(); 108 void defaultClicked();
109 109
110 void acceptClicked();
111
110 protected slots: 112 protected slots:
111 virtual void slotOk(); 113 virtual void slotOk();
112 virtual void slotApply(); 114 virtual void slotApply();
113 virtual void slotCancel(); 115 virtual void slotCancel();
114 virtual void slotClose(); 116 virtual void slotClose();
115 virtual void slotUser1(); 117 virtual void slotUser1();
116 virtual void slotUser2(); 118 virtual void slotUser2();
117 119 virtual void accept ();
118 protected: 120 protected:
119 QPushButton *findButton( ButtonCode ); 121 QPushButton *findButton( ButtonCode );
120 QTabWidget *tabWidget(); 122 QTabWidget *tabWidget();
121 123
122 private: 124 private:
123 void init( const QString &caption, int buttonMask, 125 void init( const QString &caption, int buttonMask,
124 const QString &user1=QString::null, const QString &user2=QString::null ); 126 const QString &user1=QString::null, const QString &user2=QString::null );
125 void initLayout(); 127 void initLayout();
126 128
127 QWidget *mMainWidget; 129 QWidget *mMainWidget;
128 QTabWidget *mTabWidget; 130 QTabWidget *mTabWidget;
129 QFrame *mPlainPage; 131 QFrame *mPlainPage;
130 QBoxLayout *mTopLayout; 132 QBoxLayout *mTopLayout;
131 133
132 QPushButton *mUser1Button; 134 QPushButton *mUser1Button;
133 QPushButton *mUser2Button; 135 QPushButton *mUser2Button;
134 QPushButton *mCloseButton; 136 QPushButton *mCloseButton;
135 QPushButton *mOkButton; 137 QPushButton *mOkButton;
136 QPushButton *mApplyButton; 138 QPushButton *mApplyButton;
137 QPushButton *mCancelButton; 139 QPushButton *mCancelButton;
138 QPushButton *mDefaultButton; 140 QPushButton *mDefaultButton;
139}; 141};
140 142
141#endif 143#endif
diff --git a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h
index b9ea6b8..2d19680 100644
--- a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h
+++ b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.h
@@ -1,47 +1,48 @@
1/* 1/*
2 This file is part of PwManager/Pi. 2 This file is part of PwManager/Pi.
3 Copyright (c) 2004 Ulf Schenk 3 Copyright (c) 2004 Ulf Schenk
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#ifndef KCMPWMCONFIG_H 24#ifndef KCMPWMCONFIG_H
25#define KCMPWMCONFIG_H 25#define KCMPWMCONFIG_H
26 26
27#include <kcmodule.h> 27#include <kcmodule.h>
28 28
29class PWMConfigWidget; 29class PWMConfigWidget;
30class PWMPrefs; 30class PWMPrefs;
31 31
32class KCMPwmConfig : public KCModule 32class KCMPwmConfig : public KCModule
33{ 33{
34 Q_OBJECT 34 Q_OBJECT
35 35
36 public: 36 public:
37 KCMPwmConfig(QWidget *parent = 0, const char *name = 0 ); 37 KCMPwmConfig(QWidget *parent = 0, const char *name = 0 );
38 38
39 public slots:
39 virtual void load(); 40 virtual void load();
40 virtual void save(); 41 virtual void save();
41 virtual void defaults(); 42 virtual void defaults();
42 43
43 private: 44 private:
44 PWMConfigWidget *mConfigWidget; 45 PWMConfigWidget *mConfigWidget;
45}; 46};
46 47
47#endif 48#endif
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 9c8d12d..e12dc49 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -1,1574 +1,1599 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * copyright (C) 2003, 2004 by Michael Buesch * 3 * copyright (C) 2003, 2004 by Michael Buesch *
4 * email: mbuesch@freenet.de * 4 * email: mbuesch@freenet.de *
5 * * 5 * *
6 * This program is free software; you can redistribute it and/or modify * 6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License version 2 * 7 * it under the terms of the GNU General Public License version 2 *
8 * as published by the Free Software Foundation. * 8 * as published by the Free Software Foundation. *
9 * * 9 * *
10 ***************************************************************************/ 10 ***************************************************************************/
11 11
12/*************************************************************************** 12/***************************************************************************
13 * copyright (C) 2004 by Ulf Schenk 13 * copyright (C) 2004 by Ulf Schenk
14 * This file is originaly based on version 1.0.1 of pwmanager 14 * This file is originaly based on version 1.0.1 of pwmanager
15 * and was modified to run on embedded devices that run microkde 15 * and was modified to run on embedded devices that run microkde
16 * 16 *
17 * $Id$ 17 * $Id$
18 **************************************************************************/ 18 **************************************************************************/
19 19
20#include <klocale.h> 20#include <klocale.h>
21#include <klistview.h> 21#include <klistview.h>
22#include <ktoolbar.h> 22#include <ktoolbar.h>
23#include <kfiledialog.h> 23#include <kfiledialog.h>
24#include <kiconloader.h> 24#include <kiconloader.h>
25#include <kmessagebox.h> 25#include <kmessagebox.h>
26 26
27#include <qstatusbar.h> 27#include <qstatusbar.h>
28 28
29#ifndef PWM_EMBEDDED 29#ifndef PWM_EMBEDDED
30#include <kmenubar.h> 30#include <kmenubar.h>
31#include <kstatusbar.h> 31#include <kstatusbar.h>
32#include <dcopclient.h> 32#include <dcopclient.h>
33#include "configwndimpl.h" 33#include "configwndimpl.h"
34#include "configuration.h" 34#include "configuration.h"
35#else 35#else
36#include <qmenubar.h> 36#include <qmenubar.h>
37#include <qmessagebox.h> 37#include <qmessagebox.h>
38#include <pwmprefs.h> 38#include <pwmprefs.h>
39#include <kpimglobalprefs.h> 39#include <kpimglobalprefs.h>
40#include <kprefsdialog.h>
40#include <kcmconfigs/kcmpwmconfig.h> 41#include <kcmconfigs/kcmpwmconfig.h>
41#include <kcmconfigs/kcmkdepimconfig.h> 42#include <kcmconfigs/kcmkdepimconfig.h>
42#include <kcmultidialog.h> 43#include <kcmultidialog.h>
43#include "editcategory.h" 44#include "editcategory.h"
44#endif 45#endif
45 46
46 47
47#ifndef DESKTOP_VERSION 48#ifndef DESKTOP_VERSION
48#include <qpe/global.h> 49#include <qpe/global.h>
49#endif 50#endif
50 51
51#include <qpixmap.h> 52#include <qpixmap.h>
52#include <qcheckbox.h> 53#include <qcheckbox.h>
53#include <qspinbox.h> 54#include <qspinbox.h>
54#include <qlineedit.h> 55#include <qlineedit.h>
55#include <qfileinfo.h> 56#include <qfileinfo.h>
56#include <qclipboard.h> 57#include <qclipboard.h>
57 58
58 59
59#include <stdio.h> 60#include <stdio.h>
60 61
61#include "pwm.h" 62#include "pwm.h"
62#include "pwminit.h" 63#include "pwminit.h"
63#include "pwmprint.h" 64#include "pwmprint.h"
64#include "addentrywndimpl.h" 65#include "addentrywndimpl.h"
65#include "globalstuff.h" 66#include "globalstuff.h"
66#include "findwndimpl.h" 67#include "findwndimpl.h"
67#include "csv.h" 68#include "csv.h"
68 69
69#ifdef CONFIG_KWALLETIF 70#ifdef CONFIG_KWALLETIF
70# include "kwalletif.h" 71# include "kwalletif.h"
71# include "kwalletemu.h" 72# include "kwalletemu.h"
72#endif 73#endif
73#ifdef CONFIG_KEYCARD 74#ifdef CONFIG_KEYCARD
74# include "pwmkeycard.h" 75# include "pwmkeycard.h"
75#endif 76#endif
76 77
77
78 #define DEFAULT_SIZE (QSize(700, 400)) 78 #define DEFAULT_SIZE (QSize(700, 400))
79 79
80// Button IDs for "file" popup menu 80// Button IDs for "file" popup menu
81enum { 81enum {
82 BUTTON_POPUP_FILE_NEW = 0, 82 BUTTON_POPUP_FILE_NEW = 0,
83 BUTTON_POPUP_FILE_OPEN, 83 BUTTON_POPUP_FILE_OPEN,
84 BUTTON_POPUP_FILE_CLOSE, 84 BUTTON_POPUP_FILE_CLOSE,
85 BUTTON_POPUP_FILE_SAVE, 85 BUTTON_POPUP_FILE_SAVE,
86 BUTTON_POPUP_FILE_SAVEAS, 86 BUTTON_POPUP_FILE_SAVEAS,
87 BUTTON_POPUP_FILE_EXPORT, 87 BUTTON_POPUP_FILE_EXPORT,
88 BUTTON_POPUP_FILE_IMPORT, 88 BUTTON_POPUP_FILE_IMPORT,
89 BUTTON_POPUP_FILE_PRINT, 89 BUTTON_POPUP_FILE_PRINT,
90 BUTTON_POPUP_FILE_QUIT 90 BUTTON_POPUP_FILE_QUIT
91}; 91};
92// Button IDs for "manage" popup menu 92// Button IDs for "manage" popup menu
93enum { 93enum {
94 BUTTON_POPUP_MANAGE_ADD = 0, 94 BUTTON_POPUP_MANAGE_ADD = 0,
95 BUTTON_POPUP_MANAGE_EDIT, 95 BUTTON_POPUP_MANAGE_EDIT,
96 BUTTON_POPUP_MANAGE_DEL, 96 BUTTON_POPUP_MANAGE_DEL,
97 BUTTON_POPUP_MANAGE_CHANGEMP 97 BUTTON_POPUP_MANAGE_CHANGEMP
98}; 98};
99// Button IDs for chipcard popup menu 99// Button IDs for chipcard popup menu
100enum { 100enum {
101#ifdef CONFIG_KEYCARD 101#ifdef CONFIG_KEYCARD
102 BUTTON_POPUP_CHIPCARD_GENNEW = 0, 102 BUTTON_POPUP_CHIPCARD_GENNEW = 0,
103 BUTTON_POPUP_CHIPCARD_DEL, 103 BUTTON_POPUP_CHIPCARD_DEL,
104 BUTTON_POPUP_CHIPCARD_READID, 104 BUTTON_POPUP_CHIPCARD_READID,
105 BUTTON_POPUP_CHIPCARD_SAVEBACKUP, 105 BUTTON_POPUP_CHIPCARD_SAVEBACKUP,
106 BUTTON_POPUP_CHIPCARD_REPLAYBACKUP 106 BUTTON_POPUP_CHIPCARD_REPLAYBACKUP
107#else // CONFIG_KEYCARD 107#else // CONFIG_KEYCARD
108 BUTTON_POPUP_CHIPCARD_NO = 0 108 BUTTON_POPUP_CHIPCARD_NO = 0
109#endif // CONFIG_KEYCARD 109#endif // CONFIG_KEYCARD
110}; 110};
111// Button IDs for "view" popup menu 111// Button IDs for "view" popup menu
112enum { 112enum {
113 BUTTON_POPUP_VIEW_FIND = 0, 113 BUTTON_POPUP_VIEW_FIND = 0,
114 BUTTON_POPUP_VIEW_LOCK, 114 BUTTON_POPUP_VIEW_LOCK,
115 BUTTON_POPUP_VIEW_DEEPLOCK, 115 BUTTON_POPUP_VIEW_DEEPLOCK,
116 BUTTON_POPUP_VIEW_UNLOCK 116 BUTTON_POPUP_VIEW_UNLOCK
117}; 117};
118// Button IDs for "options" popup menu 118// Button IDs for "options" popup menu
119enum { 119enum {
120 BUTTON_POPUP_OPTIONS_CONFIG = 0 120 BUTTON_POPUP_OPTIONS_CONFIG = 0,
121 BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG
121#ifdef PWM_EMBEDDED 122#ifdef PWM_EMBEDDED
122 ,BUTTON_POPUP_OPTIONS_CATEGORY 123 ,BUTTON_POPUP_OPTIONS_CATEGORY
123#endif 124#endif
124}; 125};
125// Button IDs for "export" popup menu (in "file" popup menu) 126// Button IDs for "export" popup menu (in "file" popup menu)
126enum { 127enum {
127 BUTTON_POPUP_EXPORT_TEXT = 0, 128 BUTTON_POPUP_EXPORT_TEXT = 0,
128 BUTTON_POPUP_EXPORT_GPASMAN, 129 BUTTON_POPUP_EXPORT_GPASMAN,
129 BUTTON_POPUP_EXPORT_CSV 130 BUTTON_POPUP_EXPORT_CSV
130#ifdef CONFIG_KWALLETIF 131#ifdef CONFIG_KWALLETIF
131 ,BUTTON_POPUP_EXPORT_KWALLET 132 ,BUTTON_POPUP_EXPORT_KWALLET
132#endif 133#endif
133}; 134};
134// Button IDs for "import" popup menu (in "file" popup menu) 135// Button IDs for "import" popup menu (in "file" popup menu)
135enum { 136enum {
136 BUTTON_POPUP_IMPORT_TEXT = 0, 137 BUTTON_POPUP_IMPORT_TEXT = 0,
137 BUTTON_POPUP_IMPORT_GPASMAN, 138 BUTTON_POPUP_IMPORT_GPASMAN,
138 BUTTON_POPUP_IMPORT_CSV 139 BUTTON_POPUP_IMPORT_CSV
139#ifdef CONFIG_KWALLETIF 140#ifdef CONFIG_KWALLETIF
140 ,BUTTON_POPUP_IMPORT_KWALLET 141 ,BUTTON_POPUP_IMPORT_KWALLET
141#endif 142#endif
142}; 143};
143 144
144#ifdef PWM_EMBEDDED 145#ifdef PWM_EMBEDDED
145// Button IDs for "help" popup menu 146// Button IDs for "help" popup menu
146enum { 147enum {
147 BUTTON_POPUP_HELP_LICENSE = 0, 148 BUTTON_POPUP_HELP_LICENSE = 0,
148 BUTTON_POPUP_HELP_FAQ, 149 BUTTON_POPUP_HELP_FAQ,
149 BUTTON_POPUP_HELP_ABOUT, 150 BUTTON_POPUP_HELP_ABOUT,
150 BUTTON_POPUP_HELP_SYNC, 151 BUTTON_POPUP_HELP_SYNC,
151 BUTTON_POPUP_HELP_WHATSNEW 152 BUTTON_POPUP_HELP_WHATSNEW
152}; 153};
153#endif 154#endif
154 155
155// Button IDs for toolbar 156// Button IDs for toolbar
156enum { 157enum {
157 BUTTON_TOOL_NEW = 0, 158 BUTTON_TOOL_NEW = 0,
158 BUTTON_TOOL_OPEN, 159 BUTTON_TOOL_OPEN,
159 BUTTON_TOOL_SAVE, 160 BUTTON_TOOL_SAVE,
160 BUTTON_TOOL_SAVEAS, 161 BUTTON_TOOL_SAVEAS,
161 BUTTON_TOOL_PRINT, 162 BUTTON_TOOL_PRINT,
162 BUTTON_TOOL_ADD, 163 BUTTON_TOOL_ADD,
163 BUTTON_TOOL_EDIT, 164 BUTTON_TOOL_EDIT,
164 BUTTON_TOOL_DEL, 165 BUTTON_TOOL_DEL,
165 BUTTON_TOOL_FIND, 166 BUTTON_TOOL_FIND,
166 BUTTON_TOOL_LOCK, 167 BUTTON_TOOL_LOCK,
167 BUTTON_TOOL_DEEPLOCK, 168 BUTTON_TOOL_DEEPLOCK,
168 BUTTON_TOOL_UNLOCK 169 BUTTON_TOOL_UNLOCK
169}; 170};
170 171
171 172
172PwM::PwM(PwMInit *_init, PwMDoc *doc, 173PwM::PwM(PwMInit *_init, PwMDoc *doc,
173 bool virginity, 174 bool virginity,
174 QWidget *parent, const char *name) 175 QWidget *parent, const char *name)
175 : KMainWindow(parent, "HALLO") 176 : KMainWindow(parent, "HALLO")
176 , forceQuit (false) 177 , forceQuit (false)
177 , forceMinimizeToTray (false) 178 , forceMinimizeToTray (false)
178{ 179{
179 syncManager = 0; 180 syncManager = 0;
180 virgin = !virginity; 181 virgin = !virginity;
181 init = _init; 182 init = _init;
182 connect(doc, SIGNAL(docClosed(PwMDoc *)), 183 connect(doc, SIGNAL(docClosed(PwMDoc *)),
183 this, SLOT(docClosed(PwMDoc *))); 184 this, SLOT(docClosed(PwMDoc *)));
184 initMenubar(); 185 initMenubar();
185 initToolbar(); 186 initToolbar();
186 initMetrics(); 187 initMetrics();
187 setVirgin(virginity); 188 setVirgin(virginity);
188 setFocusPolicy(QWidget::WheelFocus); 189 setFocusPolicy(QWidget::WheelFocus);
189#ifndef PWM_EMBEDDED 190#ifndef PWM_EMBEDDED
190 statusBar()->show(); 191 statusBar()->show();
191#endif 192#endif
192 view = makeNewListView(doc); 193 view = makeNewListView(doc);
193 setCentralWidget(view); 194 setCentralWidget(view);
194 updateCaption(); 195 updateCaption();
195 showStatMsg(i18n("Ready.")); 196 showStatMsg(i18n("Ready."));
196} 197}
197 198
198PwM::~PwM() 199PwM::~PwM()
199{ 200{
200 //qDebug("PwM::~PwM() %x", this); 201 //qDebug("PwM::~PwM() %x", this);
201 disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)), 202 disconnect(curDoc(), SIGNAL(docClosed(PwMDoc *)),
202 this, SLOT(docClosed(PwMDoc *))); 203 this, SLOT(docClosed(PwMDoc *)));
203 conf()->confWndMainWndSize(size()); 204 conf()->confWndMainWndSize(size());
204 //LR closing of windows changed 205 //LR closing of windows changed
205 //needed for fastload option on PDA 206 //needed for fastload option on PDA
206 //emit closed(this); 207 //emit closed(this);
207 //qDebug("PwM::~PwM() emited closed(this)"); 208 //qDebug("PwM::~PwM() emited closed(this)");
208 delete view; 209 delete view;
209 delete syncManager; 210 delete syncManager;
210} 211}
211 212
212void PwM::initMenubar() 213void PwM::initMenubar()
213{ 214{
214 KIconLoader* picons; 215 KIconLoader* picons;
215#ifndef PWM_EMBEDDED 216#ifndef PWM_EMBEDDED
216 KIconLoader icons; 217 KIconLoader icons;
217 picons = &icons; 218 picons = &icons;
218#else 219#else
219 picons = KGlobal::iconLoader(); 220 picons = KGlobal::iconLoader();
220 221
221 222
222 syncPopup = new KPopupMenu(this); 223 syncPopup = new KPopupMenu(this);
223 224
224 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::PWMPI, PWMPrefs::instance(), syncPopup); 225 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::PWMPI, PWMPrefs::instance(), syncPopup);
225 syncManager->setBlockSave(false); 226 syncManager->setBlockSave(false);
226 227
227 connect ( syncPopup, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); 228 connect ( syncPopup, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) );
228 syncManager->fillSyncMenu(); 229 syncManager->fillSyncMenu();
229 230
230#endif 231#endif
231 filePopup = new KPopupMenu(this); 232 filePopup = new KPopupMenu(this);
232 importPopup = new KPopupMenu(filePopup); 233 importPopup = new KPopupMenu(filePopup);
233 exportPopup = new KPopupMenu(filePopup); 234 exportPopup = new KPopupMenu(filePopup);
234 managePopup = new KPopupMenu(this); 235 managePopup = new KPopupMenu(this);
235#ifdef CONFIG_KEYCARD 236#ifdef CONFIG_KEYCARD
236 chipcardPopup = new KPopupMenu(this); 237 chipcardPopup = new KPopupMenu(this);
237#endif // CONFIG_KEYCARD 238#endif // CONFIG_KEYCARD
238 viewPopup = new KPopupMenu(this); 239 viewPopup = new KPopupMenu(this);
239 optionsPopup = new KPopupMenu(this); 240 optionsPopup = new KPopupMenu(this);
240 241
241// "file" popup menu 242// "file" popup menu
242 filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), 243 filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)),
243 i18n("&New"), this, 244 i18n("&New"), this,
244 SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); 245 SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW);
245 filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)), 246 filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)),
246 i18n("&Open"), this, 247 i18n("&Open"), this,
247 SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); 248 SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN);
248 filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)), 249 filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)),
249 i18n("&Close"), this, 250 i18n("&Close"), this,
250 SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); 251 SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE);
251 filePopup->insertSeparator(); 252 filePopup->insertSeparator();
252 filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)), 253 filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)),
253 i18n("&Save"), this, 254 i18n("&Save"), this,
254 SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); 255 SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE);
255 filePopup->insertItem(QIconSet(picons->loadIcon("filesaveas", KIcon::Small)), 256 filePopup->insertItem(QIconSet(picons->loadIcon("filesaveas", KIcon::Small)),
256 i18n("Save &as..."), 257 i18n("Save &as..."),
257 this, SLOT(saveAs_slot()), 0, 258 this, SLOT(saveAs_slot()), 0,
258 BUTTON_POPUP_FILE_SAVEAS); 259 BUTTON_POPUP_FILE_SAVEAS);
259 filePopup->insertSeparator(); 260 filePopup->insertSeparator();
260 // "file/export" popup menu 261 // "file/export" popup menu
261 exportPopup->insertItem(i18n("&Text-file..."), this, 262 exportPopup->insertItem(i18n("&Text-file..."), this,
262 SLOT(exportToText()), 0, BUTTON_POPUP_EXPORT_TEXT); 263 SLOT(exportToText()), 0, BUTTON_POPUP_EXPORT_TEXT);
263 exportPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this, 264 exportPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this,
264 SLOT(exportToGpasman()), 0, BUTTON_POPUP_EXPORT_GPASMAN); 265 SLOT(exportToGpasman()), 0, BUTTON_POPUP_EXPORT_GPASMAN);
265 exportPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this, 266 exportPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this,
266 SLOT(exportToCsv()), 0, BUTTON_POPUP_EXPORT_CSV); 267 SLOT(exportToCsv()), 0, BUTTON_POPUP_EXPORT_CSV);
267#ifdef CONFIG_KWALLETIF 268#ifdef CONFIG_KWALLETIF
268 exportPopup->insertItem(i18n("&KWallet..."), this, 269 exportPopup->insertItem(i18n("&KWallet..."), this,
269 SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET); 270 SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET);
270#endif 271#endif
271 filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)), 272 filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)),
272 i18n("E&xport"), exportPopup, 273 i18n("E&xport"), exportPopup,
273 BUTTON_POPUP_FILE_EXPORT); 274 BUTTON_POPUP_FILE_EXPORT);
274 // "file/import" popup menu 275 // "file/import" popup menu
275 importPopup->insertItem(i18n("&Text-file..."), this, 276 importPopup->insertItem(i18n("&Text-file..."), this,
276 SLOT(importFromText()), 0, BUTTON_POPUP_IMPORT_TEXT); 277 SLOT(importFromText()), 0, BUTTON_POPUP_IMPORT_TEXT);
277 importPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this, 278 importPopup->insertItem(i18n("&Gpasman / Kpasman ..."), this,
278 SLOT(importFromGpasman()), 0, BUTTON_POPUP_IMPORT_GPASMAN); 279 SLOT(importFromGpasman()), 0, BUTTON_POPUP_IMPORT_GPASMAN);
279 importPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this, 280 importPopup->insertItem(i18n("&CSV (Comma Separated Value) ..."), this,
280 SLOT(importCsv()), 0, BUTTON_POPUP_IMPORT_CSV); 281 SLOT(importCsv()), 0, BUTTON_POPUP_IMPORT_CSV);
281#ifdef CONFIG_KWALLETIF 282#ifdef CONFIG_KWALLETIF
282 importPopup->insertItem(i18n("&KWallet..."), this, 283 importPopup->insertItem(i18n("&KWallet..."), this,
283 SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET); 284 SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET);
284#endif 285#endif
285 filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)), 286 filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)),
286 i18n("I&mport"), importPopup, 287 i18n("I&mport"), importPopup,
287 BUTTON_POPUP_FILE_IMPORT); 288 BUTTON_POPUP_FILE_IMPORT);
288 filePopup->insertSeparator(); 289 filePopup->insertSeparator();
289#if 0 290#if 0
290 filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)), 291 filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)),
291 i18n("&Print..."), this, 292 i18n("&Print..."), this,
292 SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT); 293 SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT);
293 filePopup->insertSeparator(); 294 filePopup->insertSeparator();
294#endif 295#endif
295 filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)), 296 filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)),
296 i18n("&Quit"), this, 297 i18n("&Quit"), this,
297 SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT); 298 SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT);
298 menuBar()->insertItem(i18n("&File"), filePopup); 299 menuBar()->insertItem(i18n("&File"), filePopup);
299// "manage" popup menu 300// "manage" popup menu
300 managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)), 301 managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)),
301 i18n("&Add password"), this, 302 i18n("&Add password"), this,
302 SLOT(addPwd_slot()), 0, 303 SLOT(addPwd_slot()), 0,
303 BUTTON_POPUP_MANAGE_ADD); 304 BUTTON_POPUP_MANAGE_ADD);
304 managePopup->insertSeparator(); 305 managePopup->insertSeparator();
305 managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)), 306 managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)),
306 i18n("&Edit"), this, SLOT(editPwd_slot()), 0, 307 i18n("&Edit"), this, SLOT(editPwd_slot()), 0,
307 BUTTON_POPUP_MANAGE_EDIT); 308 BUTTON_POPUP_MANAGE_EDIT);
308 managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), 309 managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)),
309 i18n("&Delete"), this, SLOT(deletePwd_slot()), 310 i18n("&Delete"), this, SLOT(deletePwd_slot()),
310 0, BUTTON_POPUP_MANAGE_DEL); 311 0, BUTTON_POPUP_MANAGE_DEL);
311 managePopup->insertSeparator(); 312 managePopup->insertSeparator();
312 managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)), 313 managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)),
313 i18n("Change &Master Password"), this, 314 i18n("Change &Master Password"), this,
314 SLOT(changeMasterPwd_slot()), 0, 315 SLOT(changeMasterPwd_slot()), 0,
315 BUTTON_POPUP_MANAGE_CHANGEMP); 316 BUTTON_POPUP_MANAGE_CHANGEMP);
316 menuBar()->insertItem(i18n("&Manage"), managePopup); 317 menuBar()->insertItem(i18n("&Manage"), managePopup);
317// "chipcard" popup menu 318// "chipcard" popup menu
318#ifdef CONFIG_KEYCARD 319#ifdef CONFIG_KEYCARD
319 chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), 320 chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)),
320 i18n("&Generate new key-card"), this, 321 i18n("&Generate new key-card"), this,
321 SLOT(genNewCard_slot()), 0, 322 SLOT(genNewCard_slot()), 0,
322 BUTTON_POPUP_CHIPCARD_GENNEW); 323 BUTTON_POPUP_CHIPCARD_GENNEW);
323 chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), 324 chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)),
324 i18n("&Erase key-card"), this, 325 i18n("&Erase key-card"), this,
325 SLOT(eraseCard_slot()), 0, 326 SLOT(eraseCard_slot()), 0,
326 BUTTON_POPUP_CHIPCARD_DEL); 327 BUTTON_POPUP_CHIPCARD_DEL);
327 chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)), 328 chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)),
328 i18n("Read card-&ID"), this, 329 i18n("Read card-&ID"), this,
329 SLOT(readCardId_slot()), 0, 330 SLOT(readCardId_slot()), 0,
330 BUTTON_POPUP_CHIPCARD_READID); 331 BUTTON_POPUP_CHIPCARD_READID);
331 chipcardPopup->insertSeparator(); 332 chipcardPopup->insertSeparator();
332 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)), 333 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)),
333 i18n("&Make card backup-image"), this, 334 i18n("&Make card backup-image"), this,
334 SLOT(makeCardBackup_slot()), 0, 335 SLOT(makeCardBackup_slot()), 0,
335 BUTTON_POPUP_CHIPCARD_SAVEBACKUP); 336 BUTTON_POPUP_CHIPCARD_SAVEBACKUP);
336 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)), 337 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)),
337 i18n("&Replay card backup-image"), this, 338 i18n("&Replay card backup-image"), this,
338 SLOT(replayCardBackup_slot()), 0, 339 SLOT(replayCardBackup_slot()), 0,
339 BUTTON_POPUP_CHIPCARD_REPLAYBACKUP); 340 BUTTON_POPUP_CHIPCARD_REPLAYBACKUP);
340 menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup); 341 menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup);
341#endif // CONFIG_KEYCARD 342#endif // CONFIG_KEYCARD
342// "view" popup menu 343// "view" popup menu
343 viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)), 344 viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)),
344 i18n("&Find"), this, 345 i18n("&Find"), this,
345 SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); 346 SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND);
346 viewPopup->insertSeparator(); 347 viewPopup->insertSeparator();
347 viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), 348 viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)),
348 i18n("&Lock all entries"), this, 349 i18n("&Lock all entries"), this,
349 SLOT(lockWnd_slot()), 0, 350 SLOT(lockWnd_slot()), 0,
350 BUTTON_POPUP_VIEW_LOCK); 351 BUTTON_POPUP_VIEW_LOCK);
351 viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), 352 viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)),
352 i18n("&Deep-lock all entries"), this, 353 i18n("&Deep-lock all entries"), this,
353 SLOT(deepLockWnd_slot()), 0, 354 SLOT(deepLockWnd_slot()), 0,
354 BUTTON_POPUP_VIEW_DEEPLOCK); 355 BUTTON_POPUP_VIEW_DEEPLOCK);
355 viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), 356 viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)),
356 i18n("&Unlock all entries"), this, 357 i18n("&Unlock all entries"), this,
357 SLOT(unlockWnd_slot()), 0, 358 SLOT(unlockWnd_slot()), 0,
358 BUTTON_POPUP_VIEW_UNLOCK); 359 BUTTON_POPUP_VIEW_UNLOCK);
359 menuBar()->insertItem(i18n("&View"), viewPopup); 360 menuBar()->insertItem(i18n("&View"), viewPopup);
360// "options" popup menu 361// "options" popup menu
361 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), 362 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
362 i18n("&Configure..."), this, 363 i18n("&Configure PwM/Pi..."), this,
363 SLOT(config_slot()),0, 364 SLOT(config_slot()),0,
364 BUTTON_POPUP_OPTIONS_CONFIG); 365 BUTTON_POPUP_OPTIONS_CONFIG);
366 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
367 i18n("Global Settings..."), this,
368 SLOT(config_global_slot()),0,
369 BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG);
365 if ( QApplication::desktop()->width() <= 240 ) { 370 if ( QApplication::desktop()->width() <= 240 ) {
366 managePopup->insertSeparator(); 371 managePopup->insertSeparator();
367 managePopup->insertItem(i18n("&Options"), optionsPopup); 372 managePopup->insertItem(i18n("&Options"), optionsPopup);
368 } else 373 } else
369 menuBar()->insertItem(i18n("&Options"), optionsPopup); 374 menuBar()->insertItem(i18n("&Options"), optionsPopup);
370// "help" popup menu 375// "help" popup menu
371#ifndef PWM_EMBEDDED 376#ifndef PWM_EMBEDDED
372 helpPopup = helpMenu(QString::null, false); 377 helpPopup = helpMenu(QString::null, false);
373#else 378#else
374 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), 379 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)),
375 i18n("C&ategories..."), this, 380 i18n("C&ategories..."), this,
376 SLOT(category_slot()),0, 381 SLOT(category_slot()),0,
377 BUTTON_POPUP_OPTIONS_CATEGORY); 382 BUTTON_POPUP_OPTIONS_CATEGORY);
378 383
379 384
380 menuBar()->insertItem(i18n("&Sync"), syncPopup); 385 menuBar()->insertItem(i18n("&Sync"), syncPopup);
381 386
382 387
383 388
384 389
385 390
386 helpPopup = new KPopupMenu(this); 391 helpPopup = new KPopupMenu(this);
387 392
388 393
389 helpPopup->insertItem(i18n("&License"), this, 394 helpPopup->insertItem(i18n("&License"), this,
390 SLOT(showLicense_slot()), 0, 395 SLOT(showLicense_slot()), 0,
391 BUTTON_POPUP_HELP_LICENSE); 396 BUTTON_POPUP_HELP_LICENSE);
392 397
393 helpPopup->insertItem(i18n("&Faq"), this, 398 helpPopup->insertItem(i18n("&Faq"), this,
394 SLOT(faq_slot()), 0, 399 SLOT(faq_slot()), 0,
395 BUTTON_POPUP_HELP_FAQ); 400 BUTTON_POPUP_HELP_FAQ);
396 401
397 helpPopup->insertItem(i18n("&About PwManager"), this, 402 helpPopup->insertItem(i18n("&About PwManager"), this,
398 SLOT(createAboutData_slot()), 0, 403 SLOT(createAboutData_slot()), 0,
399 BUTTON_POPUP_HELP_ABOUT); 404 BUTTON_POPUP_HELP_ABOUT);
400 405
401 helpPopup->insertItem(i18n("&Sync HowTo"), this, 406 helpPopup->insertItem(i18n("&Sync HowTo"), this,
402 SLOT(syncHowTo_slot()), 0, 407 SLOT(syncHowTo_slot()), 0,
403 BUTTON_POPUP_HELP_SYNC); 408 BUTTON_POPUP_HELP_SYNC);
404 409
405 helpPopup->insertItem(i18n("&What's New"), this, 410 helpPopup->insertItem(i18n("&What's New"), this,
406 SLOT(whatsnew_slot()), 0, 411 SLOT(whatsnew_slot()), 0,
407 BUTTON_POPUP_HELP_WHATSNEW); 412 BUTTON_POPUP_HELP_WHATSNEW);
408 413
409#endif 414#endif
410 menuBar()->insertItem(i18n("&Help"), helpPopup); 415 menuBar()->insertItem(i18n("&Help"), helpPopup);
411 416
412} 417}
413 418
414void PwM::initToolbar() 419void PwM::initToolbar()
415{ 420{
416 KIconLoader* picons; 421 KIconLoader* picons;
417#ifndef PWM_EMBEDDED 422#ifndef PWM_EMBEDDED
418 KIconLoader icons; 423 KIconLoader icons;
419 picons = &icons; 424 picons = &icons;
420#else 425#else
421 picons = KGlobal::iconLoader(); 426 picons = KGlobal::iconLoader();
422#endif 427#endif
423 428
424#if 0 429#if 0
425 toolBar()->insertButton(picons->loadIcon("filenew", KIcon::Toolbar), 430 toolBar()->insertButton(picons->loadIcon("filenew", KIcon::Toolbar),
426 BUTTON_TOOL_NEW, SIGNAL(clicked(int)), this, 431 BUTTON_TOOL_NEW, SIGNAL(clicked(int)), this,
427 SLOT(new_slot()), true, i18n("New")); 432 SLOT(new_slot()), true, i18n("New"));
428#endif 433#endif
429 toolBar()->insertButton(picons->loadIcon("fileopen", KIcon::Toolbar), 434 toolBar()->insertButton(picons->loadIcon("fileopen", KIcon::Toolbar),
430 BUTTON_TOOL_OPEN, SIGNAL(clicked(int)), this, 435 BUTTON_TOOL_OPEN, SIGNAL(clicked(int)), this,
431 SLOT(open_slot()), true, i18n("Open")); 436 SLOT(open_slot()), true, i18n("Open"));
432 toolBar()->insertButton(picons->loadIcon("pencil", KIcon::Toolbar), 437 toolBar()->insertButton(picons->loadIcon("pencil", KIcon::Toolbar),
433 BUTTON_TOOL_ADD, SIGNAL(clicked(int)), this, 438 BUTTON_TOOL_ADD, SIGNAL(clicked(int)), this,
434 SLOT(addPwd_slot()), true, 439 SLOT(addPwd_slot()), true,
435 i18n("Add password")); 440 i18n("Add password"));
436 toolBar()->insertSeparator(); 441 toolBar()->insertSeparator();
437 442
438 toolBar()->insertButton(picons->loadIcon("find", KIcon::Toolbar), 443 toolBar()->insertButton(picons->loadIcon("find", KIcon::Toolbar),
439 BUTTON_TOOL_FIND, SIGNAL(clicked(int)), this, 444 BUTTON_TOOL_FIND, SIGNAL(clicked(int)), this,
440 SLOT(find_slot()), true, i18n("Find entry")); 445 SLOT(find_slot()), true, i18n("Find entry"));
441 toolBar()->insertSeparator(); 446 toolBar()->insertSeparator();
442 toolBar()->insertButton(picons->loadIcon("filesave", KIcon::Toolbar), 447 toolBar()->insertButton(picons->loadIcon("filesave", KIcon::Toolbar),
443 BUTTON_TOOL_SAVE, SIGNAL(clicked(int)), this, 448 BUTTON_TOOL_SAVE, SIGNAL(clicked(int)), this,
444 SLOT(save_slot()), true, i18n("Save")); 449 SLOT(save_slot()), true, i18n("Save"));
445#if 0 450#if 0
446 toolBar()->insertButton(picons->loadIcon("filesaveas", KIcon::Toolbar), 451 toolBar()->insertButton(picons->loadIcon("filesaveas", KIcon::Toolbar),
447 BUTTON_TOOL_SAVEAS, SIGNAL(clicked(int)), this, 452 BUTTON_TOOL_SAVEAS, SIGNAL(clicked(int)), this,
448 SLOT(saveAs_slot()), true, i18n("Save as")); 453 SLOT(saveAs_slot()), true, i18n("Save as"));
449#endif 454#endif
450 455
451 456
452#if 0 457#if 0
453 toolBar()->insertButton(picons->loadIcon("fileprint", KIcon::Toolbar), 458 toolBar()->insertButton(picons->loadIcon("fileprint", KIcon::Toolbar),
454 BUTTON_TOOL_PRINT, SIGNAL(clicked(int)), this, 459 BUTTON_TOOL_PRINT, SIGNAL(clicked(int)), this,
455 SLOT(print_slot()), true, i18n("Print...")); 460 SLOT(print_slot()), true, i18n("Print..."));
456#endif 461#endif
457 toolBar()->insertSeparator(); 462 toolBar()->insertSeparator();
458 toolBar()->insertButton(picons->loadIcon("edit", KIcon::Toolbar), 463 toolBar()->insertButton(picons->loadIcon("edit", KIcon::Toolbar),
459 BUTTON_TOOL_EDIT, SIGNAL(clicked(int)), this, 464 BUTTON_TOOL_EDIT, SIGNAL(clicked(int)), this,
460 SLOT(editPwd_slot()), true, 465 SLOT(editPwd_slot()), true,
461 i18n("Edit password")); 466 i18n("Edit password"));
462 toolBar()->insertButton(picons->loadIcon("editdelete", KIcon::Toolbar), 467 toolBar()->insertButton(picons->loadIcon("editdelete", KIcon::Toolbar),
463 BUTTON_TOOL_DEL, SIGNAL(clicked(int)), this, 468 BUTTON_TOOL_DEL, SIGNAL(clicked(int)), this,
464 SLOT(deletePwd_slot()), true, 469 SLOT(deletePwd_slot()), true,
465 i18n("Delete password")); 470 i18n("Delete password"));
466 toolBar()->insertSeparator(); 471 toolBar()->insertSeparator();
467 toolBar()->insertButton(picons->loadIcon("halfencrypted", KIcon::Toolbar), 472 toolBar()->insertButton(picons->loadIcon("halfencrypted", KIcon::Toolbar),
468 BUTTON_TOOL_LOCK, SIGNAL(clicked(int)), this, 473 BUTTON_TOOL_LOCK, SIGNAL(clicked(int)), this,
469 SLOT(lockWnd_slot()), true, 474 SLOT(lockWnd_slot()), true,
470 i18n("Lock all entries")); 475 i18n("Lock all entries"));
471 toolBar()->insertButton(picons->loadIcon("encrypted", KIcon::Toolbar), 476 toolBar()->insertButton(picons->loadIcon("encrypted", KIcon::Toolbar),
472 BUTTON_TOOL_DEEPLOCK, SIGNAL(clicked(int)), this, 477 BUTTON_TOOL_DEEPLOCK, SIGNAL(clicked(int)), this,
473 SLOT(deepLockWnd_slot()), true, 478 SLOT(deepLockWnd_slot()), true,
474 i18n("Deep-Lock all entries")); 479 i18n("Deep-Lock all entries"));
475 toolBar()->insertButton(picons->loadIcon("decrypted", KIcon::Toolbar), 480 toolBar()->insertButton(picons->loadIcon("decrypted", KIcon::Toolbar),
476 BUTTON_TOOL_UNLOCK, SIGNAL(clicked(int)), this, 481 BUTTON_TOOL_UNLOCK, SIGNAL(clicked(int)), this,
477 SLOT(unlockWnd_slot()), true, 482 SLOT(unlockWnd_slot()), true,
478 i18n("Unlock all entries")); 483 i18n("Unlock all entries"));
479} 484}
480 485
481void PwM::initMetrics() 486void PwM::initMetrics()
482{ 487{
483 QSize s = conf()->confWndMainWndSize(); 488 QSize s = conf()->confWndMainWndSize();
484 if (s.isValid()) 489 if (s.isValid())
485 resize(s); 490 resize(s);
486 else 491 else
487 resize(DEFAULT_SIZE); 492 resize(DEFAULT_SIZE);
488} 493}
489 494
490void PwM::updateCaption() 495void PwM::updateCaption()
491{ 496{
492 QString s = curDoc()->getTitle(); 497 QString s = curDoc()->getTitle();
493 int maxlen = 50; 498 int maxlen = 50;
494 if ( QApplication::desktop()->width() < 640 ) { 499 if ( QApplication::desktop()->width() < 640 ) {
495 if ( QApplication::desktop()->width() < 320 ) 500 if ( QApplication::desktop()->width() < 320 )
496 maxlen = 22; 501 maxlen = 22;
497 else 502 else
498 maxlen = 35; 503 maxlen = 35;
499 } 504 }
500 if ( s.length() > maxlen ) { 505 if ( s.length() > maxlen ) {
501 s = "..."+s.right(maxlen -3); 506 s = "..."+s.right(maxlen -3);
502 } 507 }
503 setPlainCaption( s ); 508 setPlainCaption( s );
504} 509}
505 510
506void PwM::hideEvent(QHideEvent *) 511void PwM::hideEvent(QHideEvent *)
507{ 512{
508 if (isMinimized()) { 513 if (isMinimized()) {
509 if (init->tray()) { 514 if (init->tray()) {
510 forceMinimizeToTray = true; 515 forceMinimizeToTray = true;
511 close(); 516 close();
512 } 517 }
513 int mmlock = conf()->confGlobMinimizeLock(); 518 int mmlock = conf()->confGlobMinimizeLock();
514 switch (mmlock) { 519 switch (mmlock) {
515 case 0: // don't lock anything 520 case 0: // don't lock anything
516 break; 521 break;
517 case 1: {// normal lock 522 case 1: {// normal lock
518 curDoc()->lockAll(true); 523 curDoc()->lockAll(true);
519 break; 524 break;
520 } case 2: {// deep-lock 525 } case 2: {// deep-lock
521 curDoc()->deepLock(); 526 curDoc()->deepLock();
522 break; 527 break;
523 } default: 528 } default:
524 WARN(); 529 WARN();
525 } 530 }
526 } 531 }
527} 532}
528 533
529void PwM::setVirgin(bool v) 534void PwM::setVirgin(bool v)
530{ 535{
531 if (virgin == v) 536 if (virgin == v)
532 return; 537 return;
533 virgin = v; 538 virgin = v;
534 filePopup->setItemEnabled(BUTTON_POPUP_FILE_SAVE, !v); 539 filePopup->setItemEnabled(BUTTON_POPUP_FILE_SAVE, !v);
535 filePopup->setItemEnabled(BUTTON_POPUP_FILE_SAVEAS, !v); 540 filePopup->setItemEnabled(BUTTON_POPUP_FILE_SAVEAS, !v);
536 filePopup->setItemEnabled(BUTTON_POPUP_FILE_EXPORT, !v); 541 filePopup->setItemEnabled(BUTTON_POPUP_FILE_EXPORT, !v);
537 filePopup->setItemEnabled(BUTTON_POPUP_FILE_PRINT, !v); 542 filePopup->setItemEnabled(BUTTON_POPUP_FILE_PRINT, !v);
538 managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_EDIT, !v); 543 managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_EDIT, !v);
539 managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_DEL, !v); 544 managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_DEL, !v);
540 managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, !v); 545 managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, !v);
541 viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_LOCK, !v); 546 viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_LOCK, !v);
542 viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_DEEPLOCK, !v); 547 viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_DEEPLOCK, !v);
543 viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_UNLOCK, !v); 548 viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_UNLOCK, !v);
544 viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_FIND, !v); 549 viewPopup->setItemEnabled(BUTTON_POPUP_VIEW_FIND, !v);
545 toolBar()->setItemEnabled(BUTTON_TOOL_SAVE, !v); 550 toolBar()->setItemEnabled(BUTTON_TOOL_SAVE, !v);
546 toolBar()->setItemEnabled(BUTTON_TOOL_SAVEAS, !v); 551 toolBar()->setItemEnabled(BUTTON_TOOL_SAVEAS, !v);
547 toolBar()->setItemEnabled(BUTTON_TOOL_PRINT, !v); 552 toolBar()->setItemEnabled(BUTTON_TOOL_PRINT, !v);
548 toolBar()->setItemEnabled(BUTTON_TOOL_EDIT, !v); 553 toolBar()->setItemEnabled(BUTTON_TOOL_EDIT, !v);
549 toolBar()->setItemEnabled(BUTTON_TOOL_DEL, !v); 554 toolBar()->setItemEnabled(BUTTON_TOOL_DEL, !v);
550 toolBar()->setItemEnabled(BUTTON_TOOL_LOCK, !v); 555 toolBar()->setItemEnabled(BUTTON_TOOL_LOCK, !v);
551 toolBar()->setItemEnabled(BUTTON_TOOL_DEEPLOCK, !v); 556 toolBar()->setItemEnabled(BUTTON_TOOL_DEEPLOCK, !v);
552 toolBar()->setItemEnabled(BUTTON_TOOL_UNLOCK, !v); 557 toolBar()->setItemEnabled(BUTTON_TOOL_UNLOCK, !v);
553 toolBar()->setItemEnabled(BUTTON_TOOL_FIND, !v); 558 toolBar()->setItemEnabled(BUTTON_TOOL_FIND, !v);
554} 559}
555 560
556void PwM::new_slot() 561void PwM::new_slot()
557{ 562{
558 init->createMainWnd(); 563 init->createMainWnd();
559} 564}
560 565
561//US ENH 566//US ENH
562void PwM::open_slot() 567void PwM::open_slot()
563{ 568{
564 open_slot(""); 569 open_slot("");
565} 570}
566 571
567void PwM::open_slot(QString fn) 572void PwM::open_slot(QString fn)
568{ 573{
569 openDoc(fn); 574 openDoc(fn);
570} 575}
571 576
572PwMDoc * PwM::openDoc(QString filename, bool openDeepLocked) 577PwMDoc * PwM::openDoc(QString filename, bool openDeepLocked)
573{ 578{
574 if (!isVirgin()) { 579 if (!isVirgin()) {
575 // open the document in a new window. 580 // open the document in a new window.
576 PwM *newInstance = init->createMainWnd(); 581 PwM *newInstance = init->createMainWnd();
577 PwMDoc *newDoc = newInstance->openDoc(filename, openDeepLocked); 582 PwMDoc *newDoc = newInstance->openDoc(filename, openDeepLocked);
578 if (!newDoc) { 583 if (!newDoc) {
579 newInstance->setForceQuit(true); 584 newInstance->setForceQuit(true);
580 delete_and_null(newInstance); 585 delete_and_null(newInstance);
581 } 586 }
582 return newDoc; 587 return newDoc;
583 } 588 }
584 589
585 if (!curDoc()->openDocUi(curDoc(), filename, openDeepLocked)) 590 if (!curDoc()->openDocUi(curDoc(), filename, openDeepLocked))
586 return 0; 591 return 0;
587 showStatMsg(i18n("Successfully opened file.")); 592 showStatMsg(i18n("Successfully opened file."));
588 updateCaption(); 593 updateCaption();
589 setVirgin(false); 594 setVirgin(false);
590 return curDoc(); 595 return curDoc();
591} 596}
592 597
593PwMView * PwM::makeNewListView(PwMDoc *doc) 598PwMView * PwM::makeNewListView(PwMDoc *doc)
594{ 599{
595 PwMView *ret = new PwMView(this, this, doc); 600 PwMView *ret = new PwMView(this, this, doc);
596 ret->setFont(conf()->confGlobEntryFont()); 601 ret->setFont(conf()->confGlobEntryFont());
597 ret->show(); 602 ret->show();
598 return ret; 603 return ret;
599} 604}
600 605
601void PwM::close_slot() 606void PwM::close_slot()
602{ 607{
603 close(); 608 close();
604} 609}
605 610
606void PwM::quitButton_slot() 611void PwM::quitButton_slot()
607{ 612{
608 init->shutdownApp(0); 613 init->shutdownApp(0);
609} 614}
610 615
611void PwM::save_slot() 616void PwM::save_slot()
612{ 617{
613 save(); 618 save();
614} 619}
615 620
616bool PwM::save() 621bool PwM::save()
617{ 622{
618 if (!curDoc()->saveDocUi(curDoc())) 623 if (!curDoc()->saveDocUi(curDoc()))
619 return false; 624 return false;
620 showStatMsg(i18n("Successfully saved data.")); 625 showStatMsg(i18n("Successfully saved data."));
621 updateCaption(); 626 updateCaption();
622 return true; 627 return true;
623} 628}
624 629
625void PwM::saveAs_slot() 630void PwM::saveAs_slot()
626{ 631{
627 saveAs(); 632 saveAs();
628} 633}
629 634
630bool PwM::saveAs() 635bool PwM::saveAs()
631{ 636{
632 if (!curDoc()->saveAsDocUi(curDoc())) 637 if (!curDoc()->saveAsDocUi(curDoc()))
633 return false; 638 return false;
634 showStatMsg(i18n("Successfully saved data.")); 639 showStatMsg(i18n("Successfully saved data."));
635 updateCaption(); 640 updateCaption();
636 return true; 641 return true;
637} 642}
638 643
639//US ENH : changed code to run with older MOC 644//US ENH : changed code to run with older MOC
640void PwM::addPwd_slot() 645void PwM::addPwd_slot()
641{ 646{
642 addPwd_slot1(0, 0); 647 addPwd_slot1(0, 0);
643} 648}
644 649
645void PwM::addPwd_slot1(QString *pw, PwMDoc *_doc) 650void PwM::addPwd_slot1(QString *pw, PwMDoc *_doc)
646{ 651{
647 PwMDoc *doc; 652 PwMDoc *doc;
648 if (_doc) { 653 if (_doc) {
649 doc = _doc; 654 doc = _doc;
650 } else { 655 } else {
651 doc = curDoc(); 656 doc = curDoc();
652 } 657 }
653 PWM_ASSERT(doc); 658 PWM_ASSERT(doc);
654 doc->timer()->getLock(DocTimer::id_autoLockTimer); 659 doc->timer()->getLock(DocTimer::id_autoLockTimer);
655#ifndef PWM_EMBEDDED 660#ifndef PWM_EMBEDDED
656 AddEntryWndImpl w; 661 AddEntryWndImpl w;
657#else 662#else
658 AddEntryWndImpl w(doc, this, "addentrywndimpl"); 663 AddEntryWndImpl w(doc, this, "addentrywndimpl");
659#endif 664#endif
660 w.setCaption( i18n ("Add new password") ); 665 w.setCaption( i18n ("Add new password") );
661 vector<string> catList; 666 vector<string> catList;
662 doc->getCategoryList(&catList); 667 doc->getCategoryList(&catList);
663 unsigned i, size = catList.size(); 668 unsigned i, size = catList.size();
664 for (i = 0; i < size; ++i) { 669 for (i = 0; i < size; ++i) {
665 w.addCategory(catList[i].c_str()); 670 w.addCategory(catList[i].c_str());
666 } 671 }
667 w.setCurrCategory(view->getCurrentCategory()); 672 w.setCurrCategory(view->getCurrentCategory());
668 if (pw) 673 if (pw)
669 w.pwLineEdit->setText(*pw); 674 w.pwLineEdit->setText(*pw);
670 675
671 tryAgain: 676 tryAgain:
672 w.descLineEdit->setFocus(); 677 w.descLineEdit->setFocus();
673 if (w.exec() == 1) 678 if (w.exec() == 1)
674 { 679 {
675 PwMDataItem d; 680 PwMDataItem d;
676 681
677 //US BUG: to initialize all values of curEntr with meaningfulldata, 682 //US BUG: to initialize all values of curEntr with meaningfulldata,
678 // we call clear on it. Reason: Metadata will be uninitialized otherwise. 683 // we call clear on it. Reason: Metadata will be uninitialized otherwise.
679 // another option would be to create a constructor for PwMDataItem 684 // another option would be to create a constructor for PwMDataItem
680 d.clear(true); 685 d.clear(true);
681 686
682 d.desc = w.getDescription().latin1(); 687 d.desc = w.getDescription().latin1();
683 d.name = w.getUsername().latin1(); 688 d.name = w.getUsername().latin1();
684 d.pw = w.getPassword().latin1(); 689 d.pw = w.getPassword().latin1();
685 d.comment = w.getComment().latin1(); 690 d.comment = w.getComment().latin1();
686 d.url = w.getUrl().latin1(); 691 d.url = w.getUrl().latin1();
687 d.launcher = w.getLauncher().latin1(); 692 d.launcher = w.getLauncher().latin1();
688 PwMerror ret = doc->addEntry(w.getCategory(), &d); 693 PwMerror ret = doc->addEntry(w.getCategory(), &d);
689 if (ret == e_entryExists) { 694 if (ret == e_entryExists) {
690 KMessageBox::error(this, 695 KMessageBox::error(this,
691 i18n 696 i18n
692 ("An entry with this \"Description\",\n" 697 ("An entry with this \"Description\",\n"
693 "does already exist.\n" 698 "does already exist.\n"
694 "Please select another description."), 699 "Please select another description."),
695 i18n("entry already exists.")); 700 i18n("entry already exists."));
696 goto tryAgain; 701 goto tryAgain;
697 } else if (ret == e_maxAllowedEntr) { 702 } else if (ret == e_maxAllowedEntr) {
698 KMessageBox::error(this, i18n("The maximum possible number of\nentries" 703 KMessageBox::error(this, i18n("The maximum possible number of\nentries"
699 "has been reached.\nYou can't add more entries."), 704 "has been reached.\nYou can't add more entries."),
700 i18n("maximum number of entries")); 705 i18n("maximum number of entries"));
701 doc->timer()->putLock(DocTimer::id_autoLockTimer); 706 doc->timer()->putLock(DocTimer::id_autoLockTimer);
702 return; 707 return;
703 } 708 }
704 } 709 }
705 setVirgin(false); 710 setVirgin(false);
706 doc->timer()->putLock(DocTimer::id_autoLockTimer); 711 doc->timer()->putLock(DocTimer::id_autoLockTimer);
707} 712}
708 713
709//US ENH : changed code to run with older MOC 714//US ENH : changed code to run with older MOC
710void PwM::editPwd_slot() 715void PwM::editPwd_slot()
711{ 716{
712 editPwd_slot3(0,0,0); 717 editPwd_slot3(0,0,0);
713} 718}
714 719
715void PwM::editPwd_slot1(const QString *category) 720void PwM::editPwd_slot1(const QString *category)
716{ 721{
717 editPwd_slot3(category, 0, 0); 722 editPwd_slot3(category, 0, 0);
718} 723}
719 724
720void PwM::editPwd_slot3(const QString *category, const int *index, 725void PwM::editPwd_slot3(const QString *category, const int *index,
721 PwMDoc *_doc) 726 PwMDoc *_doc)
722{ 727{
723 PwMDoc *doc; 728 PwMDoc *doc;
724 if (_doc) { 729 if (_doc) {
725 doc = _doc; 730 doc = _doc;
726 } else { 731 } else {
727 doc = curDoc(); 732 doc = curDoc();
728 } 733 }
729 PWM_ASSERT(doc); 734 PWM_ASSERT(doc);
730 if (doc->isDocEmpty()) 735 if (doc->isDocEmpty())
731 return; 736 return;
732 if (doc->isDeepLocked()) 737 if (doc->isDeepLocked())
733 return; 738 return;
734 doc->timer()->getLock(DocTimer::id_autoLockTimer); 739 doc->timer()->getLock(DocTimer::id_autoLockTimer);
735 unsigned int curEntryIndex; 740 unsigned int curEntryIndex;
736 if (index) { 741 if (index) {
737 curEntryIndex = *index; 742 curEntryIndex = *index;
738 } else { 743 } else {
739 if (!(view->getCurEntryIndex(&curEntryIndex))) { 744 if (!(view->getCurEntryIndex(&curEntryIndex))) {
740 qDebug("couldn't get index. Maybe we have a binary entry here. "); 745 qDebug("couldn't get index. Maybe we have a binary entry here. ");
741 printDebug("couldn't get index. Maybe we have a binary entry here."); 746 printDebug("couldn't get index. Maybe we have a binary entry here.");
742 doc->timer()->putLock(DocTimer::id_autoLockTimer); 747 doc->timer()->putLock(DocTimer::id_autoLockTimer);
743 return; 748 return;
744 } 749 }
745 } 750 }
746 QString curCategory; 751 QString curCategory;
747 if (category) { 752 if (category) {
748 curCategory = *category; 753 curCategory = *category;
749 } else { 754 } else {
750 curCategory = view->getCurrentCategory(); 755 curCategory = view->getCurrentCategory();
751 } 756 }
752 PwMDataItem currItem; 757 PwMDataItem currItem;
753 if (!doc->getEntry(curCategory, curEntryIndex, &currItem, true)) { 758 if (!doc->getEntry(curCategory, curEntryIndex, &currItem, true)) {
754 doc->timer()->putLock(DocTimer::id_autoLockTimer); 759 doc->timer()->putLock(DocTimer::id_autoLockTimer);
755 return; 760 return;
756 } 761 }
757 BUG_ON(currItem.binary); 762 BUG_ON(currItem.binary);
758 AddEntryWndImpl w(doc); 763 AddEntryWndImpl w(doc);
759 w.setCaption( i18n ("Edit password") ); 764 w.setCaption( i18n ("Edit password") );
760 vector<string> catList; 765 vector<string> catList;
761 doc->getCategoryList(&catList); 766 doc->getCategoryList(&catList);
762 unsigned i, size = catList.size(); 767 unsigned i, size = catList.size();
763 for (i = 0; i < size; ++i) { 768 for (i = 0; i < size; ++i) {
764 w.addCategory(catList[i].c_str()); 769 w.addCategory(catList[i].c_str());
765 } 770 }
766 w.setCurrCategory(curCategory); 771 w.setCurrCategory(curCategory);
767 w.setDescription(currItem.desc.c_str()); 772 w.setDescription(currItem.desc.c_str());
768 w.setUsername(currItem.name.c_str()); 773 w.setUsername(currItem.name.c_str());
769 w.setPassword(currItem.pw.c_str()); 774 w.setPassword(currItem.pw.c_str());
770 w.setUrl(currItem.url.c_str()); 775 w.setUrl(currItem.url.c_str());
771 w.setLauncher(currItem.launcher.c_str()); 776 w.setLauncher(currItem.launcher.c_str());
772 w.setComment(currItem.comment.c_str()); 777 w.setComment(currItem.comment.c_str());
773 w.descLineEdit->setFocus(); 778 w.descLineEdit->setFocus();
774 if (w.exec() == 1) { 779 if (w.exec() == 1) {
775 currItem.desc = w.getDescription().latin1(); 780 currItem.desc = w.getDescription().latin1();
776 currItem.name = w.getUsername().latin1(); 781 currItem.name = w.getUsername().latin1();
777 currItem.pw = w.getPassword().latin1(); 782 currItem.pw = w.getPassword().latin1();
778 currItem.comment = w.getComment().latin1(); 783 currItem.comment = w.getComment().latin1();
779 currItem.url = w.getUrl().latin1(); 784 currItem.url = w.getUrl().latin1();
780 currItem.launcher = w.getLauncher().latin1(); 785 currItem.launcher = w.getLauncher().latin1();
781 if (!doc->editEntry(curCategory, w.getCategory(), 786 if (!doc->editEntry(curCategory, w.getCategory(),
782 curEntryIndex, &currItem)) { 787 curEntryIndex, &currItem)) {
783 KMessageBox::error(this, 788 KMessageBox::error(this,
784 i18n("Couldn't edit the entry.\n" 789 i18n("Couldn't edit the entry.\n"
785 "Maybe you changed the category and\n" 790 "Maybe you changed the category and\n"
786 "this entry is already present\nin the new " 791 "this entry is already present\nin the new "
787 "category?"), 792 "category?"),
788 i18n("couldn't edit entry.")); 793 i18n("couldn't edit entry."));
789 doc->timer()->putLock(DocTimer::id_autoLockTimer); 794 doc->timer()->putLock(DocTimer::id_autoLockTimer);
790 return; 795 return;
791 } 796 }
792 } 797 }
793 doc->timer()->putLock(DocTimer::id_autoLockTimer); 798 doc->timer()->putLock(DocTimer::id_autoLockTimer);
794} 799}
795 800
796void PwM::deletePwd_slot() 801void PwM::deletePwd_slot()
797{ 802{
798 PWM_ASSERT(curDoc()); 803 PWM_ASSERT(curDoc());
799 if (curDoc()->isDocEmpty()) 804 if (curDoc()->isDocEmpty())
800 return; 805 return;
801 if (curDoc()->isDeepLocked()) 806 if (curDoc()->isDeepLocked())
802 return; 807 return;
803 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 808 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
804 unsigned int curEntryIndex = 0; 809 unsigned int curEntryIndex = 0;
805 if (!(view->getCurEntryIndex(&curEntryIndex))) { 810 if (!(view->getCurEntryIndex(&curEntryIndex))) {
806 printDebug("couldn't get index"); 811 printDebug("couldn't get index");
807 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 812 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
808 return; 813 return;
809 } 814 }
810 815
811 PwMDataItem currItem; 816 PwMDataItem currItem;
812 QString curCategory = view->getCurrentCategory(); 817 QString curCategory = view->getCurrentCategory();
813 if (!curDoc()->getEntry(curCategory, curEntryIndex, &currItem)) { 818 if (!curDoc()->getEntry(curCategory, curEntryIndex, &currItem)) {
814 printDebug("couldn't get entry"); 819 printDebug("couldn't get entry");
815 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 820 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
816 return; 821 return;
817 } 822 }
818 if (KMessageBox:: 823 if (KMessageBox::
819 questionYesNo(this, 824 questionYesNo(this,
820 i18n 825 i18n
821 ("Do you really want to delete\nthe selected entry") + 826 ("Do you really want to delete\nthe selected entry") +
822 " \n\"" + QString(currItem.desc.c_str()) 827 " \n\"" + QString(currItem.desc.c_str())
823 + "\" ?", i18n("delete?")) 828 + "\" ?", i18n("delete?"))
824 == KMessageBox::Yes) { 829 == KMessageBox::Yes) {
825 830
826 curDoc()->delEntry(curCategory, curEntryIndex); 831 curDoc()->delEntry(curCategory, curEntryIndex);
827 } 832 }
828 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 833 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
829} 834}
830 835
831void PwM::changeMasterPwd_slot() 836void PwM::changeMasterPwd_slot()
832{ 837{
833 PWM_ASSERT(curDoc()); 838 PWM_ASSERT(curDoc());
834 curDoc()->changeCurrentPw(); 839 curDoc()->changeCurrentPw();
835} 840}
836 841
837void PwM::lockWnd_slot() 842void PwM::lockWnd_slot()
838{ 843{
839 PWM_ASSERT(curDoc()); 844 PWM_ASSERT(curDoc());
840 curDoc()->lockAll(true); 845 curDoc()->lockAll(true);
841} 846}
842 847
843void PwM::deepLockWnd_slot() 848void PwM::deepLockWnd_slot()
844{ 849{
845 PWM_ASSERT(curDoc()); 850 PWM_ASSERT(curDoc());
846 curDoc()->deepLock(); 851 curDoc()->deepLock();
847} 852}
848 853
849void PwM::unlockWnd_slot() 854void PwM::unlockWnd_slot()
850{ 855{
851 PWM_ASSERT(curDoc()); 856 PWM_ASSERT(curDoc());
852 curDoc()->lockAll(false); 857 curDoc()->lockAll(false);
853} 858}
854 859void PwM::config_global_slot()
860{
861 KPimPrefsGlobalDialog gc ( this );
862 gc.exec();
863}
855void PwM::config_slot() 864void PwM::config_slot()
856{ 865{
857 int oldStyle = conf()->confWndMainViewStyle(); 866 int oldStyle = conf()->confWndMainViewStyle();
858#ifdef PWM_EMBEDDED 867
868#if 0
859 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true ); 869 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"pwmconfigdialog", true );
860 870
861 KCMPwmConfig* pwmcfg = new KCMPwmConfig( ConfigureDialog->getNewVBoxPage(i18n( "PwManager")) , "KCMPwmConfig" ); 871 KCMPwmConfig* pwmcfg = new KCMPwmConfig( ConfigureDialog->getNewVBoxPage(i18n( "PwManager")) , "KCMPwmConfig" );
862 ConfigureDialog->addModule(pwmcfg ); 872 ConfigureDialog->addModule(pwmcfg );
863 873
864 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" ); 874 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" );
865 ConfigureDialog->addModule(kdelibcfg ); 875 ConfigureDialog->addModule(kdelibcfg );
876#endif
877
866 878
879
880 KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true);
881
882 KCMPwmConfig* kabcfg = new KCMPwmConfig( ConfigureDialog , "KCMpwmConfig" );
883 ConfigureDialog->setMainWidget( kabcfg );
884 connect( ConfigureDialog, SIGNAL( applyClicked() ),
885 kabcfg, SLOT( save() ) );
886 connect( ConfigureDialog, SIGNAL( acceptClicked() ),
887 kabcfg, SLOT( save() ) );
888 connect( ConfigureDialog, SIGNAL( defaultClicked() ),
889 kabcfg, SLOT( defaults() ) );
890 //saveSettings();
891 kabcfg->load();
867#ifndef DESKTOP_VERSION 892#ifndef DESKTOP_VERSION
893 if ( QApplication::desktop()->height() <= 480 )
894 ;// ConfigureDialog->hideButtons();
868 ConfigureDialog->showMaximized(); 895 ConfigureDialog->showMaximized();
869#endif 896#endif
897
898
870 if ( ConfigureDialog->exec() ) 899 if ( ConfigureDialog->exec() )
871 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); 900 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") );
872 delete ConfigureDialog; 901 delete ConfigureDialog;
873 902
874#else //PWM_EMBEDDED 903
875 // display the configuration window (modal mode)
876 if (!conf()->showConfWnd(this))
877 return;
878#endif
879 904
880 int newStyle = conf()->confWndMainViewStyle(); 905 int newStyle = conf()->confWndMainViewStyle();
881 // reinitialize tray 906 // reinitialize tray
882 init->initTray(); 907 init->initTray();
883 // reinitialize KWallet emulation 908 // reinitialize KWallet emulation
884 init->initKWalletEmu(); 909 init->initKWalletEmu();
885 910
886 PwMDocList *_dl = PwMDoc::getOpenDocList(); 911 PwMDocList *_dl = PwMDoc::getOpenDocList();
887 const vector<PwMDocList::listItem> *dl = _dl->getList(); 912 const vector<PwMDocList::listItem> *dl = _dl->getList();
888 vector<PwMDocList::listItem>::const_iterator i = dl->begin(), 913 vector<PwMDocList::listItem>::const_iterator i = dl->begin(),
889 end = dl->end(); 914 end = dl->end();
890 PwMDoc *doc; 915 PwMDoc *doc;
891 while (i != end) { 916 while (i != end) {
892 doc = (*i).doc; 917 doc = (*i).doc;
893 // unlock-without-mpw timeout 918 // unlock-without-mpw timeout
894 doc->timer()->start(DocTimer::id_mpwTimer); 919 doc->timer()->start(DocTimer::id_mpwTimer);
895 // auto-lock timeout 920 // auto-lock timeout
896 doc->timer()->start(DocTimer::id_autoLockTimer); 921 doc->timer()->start(DocTimer::id_autoLockTimer);
897 ++i; 922 ++i;
898 } 923 }
899 924
900 const QValueList<PwM *> *ml = init->mainWndList(); 925 const QValueList<PwM *> *ml = init->mainWndList();
901#ifndef PWM_EMBEDDED 926#ifndef PWM_EMBEDDED
902 QValueList<PwM *>::const_iterator i2 = ml->begin(), 927 QValueList<PwM *>::const_iterator i2 = ml->begin(),
903 end2 = ml->end(); 928 end2 = ml->end();
904#else 929#else
905 QValueList<PwM *>::ConstIterator i2 = ml->begin(), 930 QValueList<PwM *>::ConstIterator i2 = ml->begin(),
906 end2 = ml->end(); 931 end2 = ml->end();
907#endif 932#endif
908 PwM *pwm; 933 PwM *pwm;
909 while (i2 != end2) { 934 while (i2 != end2) {
910 pwm = *i2; 935 pwm = *i2;
911 // reinitialize the window style. 936 // reinitialize the window style.
912 if (oldStyle != newStyle) 937 if (oldStyle != newStyle)
913 pwm->curView()->initStyle(newStyle); 938 pwm->curView()->initStyle(newStyle);
914 // set the new font 939 // set the new font
915 pwm->curView()->setFont(conf()->confGlobEntryFont()); 940 pwm->curView()->setFont(conf()->confGlobEntryFont());
916 ++i2; 941 ++i2;
917 } 942 }
918} 943}
919 944
920void PwM::activateMpButton(bool activate) 945void PwM::activateMpButton(bool activate)
921{ 946{
922 managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, activate); 947 managePopup->setItemEnabled(BUTTON_POPUP_MANAGE_CHANGEMP, activate);
923} 948}
924 949
925void PwM::closeEvent(QCloseEvent *e) 950void PwM::closeEvent(QCloseEvent *e)
926{ 951{
927 //qDebug("PwM::closeEvent "); 952 //qDebug("PwM::closeEvent ");
928 emit closed( this ); 953 emit closed( this );
929 return; 954 return;
930 e->accept(); 955 e->accept();
931} 956}
932 957
933void PwM::docClosed(PwMDoc *doc) 958void PwM::docClosed(PwMDoc *doc)
934{ 959{
935 //qDebug("PwM::docClosed "); 960 //qDebug("PwM::docClosed ");
936 PARAM_UNUSED(doc); 961 PARAM_UNUSED(doc);
937 PWM_ASSERT(doc == curDoc()); 962 PWM_ASSERT(doc == curDoc());
938 close(); 963 close();
939} 964}
940 965
941void PwM::find_slot() 966void PwM::find_slot()
942{ 967{
943 PWM_ASSERT(curDoc()); 968 PWM_ASSERT(curDoc());
944 if (curDoc()->isDocEmpty()) 969 if (curDoc()->isDocEmpty())
945 return; 970 return;
946 if (curDoc()->isDeepLocked()) 971 if (curDoc()->isDeepLocked())
947 return; 972 return;
948 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 973 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
949 FindWndImpl findWnd(view); 974 FindWndImpl findWnd(view);
950 findWnd.exec(); 975 findWnd.exec();
951 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 976 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
952} 977}
953 978
954void PwM::exportToText() 979void PwM::exportToText()
955{ 980{
956 PWM_ASSERT(curDoc()); 981 PWM_ASSERT(curDoc());
957 if (curDoc()->isDocEmpty()) { 982 if (curDoc()->isDocEmpty()) {
958 KMessageBox::information(this, 983 KMessageBox::information(this,
959 i18n 984 i18n
960 ("Sorry, there's nothing to export.\n" 985 ("Sorry, there's nothing to export.\n"
961 "Please first add some passwords."), 986 "Please first add some passwords."),
962 i18n("nothing to do")); 987 i18n("nothing to do"));
963 return; 988 return;
964 } 989 }
965 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 990 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
966 QString fn(KFileDialog::getSaveFileName(QString::null, 991 QString fn(KFileDialog::getSaveFileName(QString::null,
967 i18n("*|plain-text file"), 992 i18n("*|plain-text file"),
968 this)); 993 this));
969 if (fn == "") { 994 if (fn == "") {
970 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 995 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
971 return; 996 return;
972 } 997 }
973 998
974 PwMerror ret = curDoc()->exportToText(&fn); 999 PwMerror ret = curDoc()->exportToText(&fn);
975 if (ret != e_success) { 1000 if (ret != e_success) {
976 KMessageBox::error(this, 1001 KMessageBox::error(this,
977 i18n("Error: Couldn't write to file.\n" 1002 i18n("Error: Couldn't write to file.\n"
978 "Please check if you have permission to write\n" 1003 "Please check if you have permission to write\n"
979 "to the file in that directory."), 1004 "to the file in that directory."),
980 i18n("error while writing")); 1005 i18n("error while writing"));
981 } else 1006 } else
982 showStatMsg(i18n("Successfully exported data.")); 1007 showStatMsg(i18n("Successfully exported data."));
983 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1008 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
984} 1009}
985 1010
986bool PwM::importFromText() 1011bool PwM::importFromText()
987{ 1012{
988 if (!isVirgin()) { 1013 if (!isVirgin()) {
989 if (KMessageBox::questionYesNo(this, 1014 if (KMessageBox::questionYesNo(this,
990 i18n("Do you want to import the data\n" 1015 i18n("Do you want to import the data\n"
991 "into the current document? (If you\n" 1016 "into the current document? (If you\n"
992 "select \"no\", a new document will be\n" 1017 "select \"no\", a new document will be\n"
993 "opened.)"), 1018 "opened.)"),
994 i18n("import into this document?")) 1019 i18n("import into this document?"))
995 == KMessageBox::No) { 1020 == KMessageBox::No) {
996 // import the data to a new window. 1021 // import the data to a new window.
997 PwM *newInstance = init->createMainWnd(); 1022 PwM *newInstance = init->createMainWnd();
998 bool ok = newInstance->importFromText(); 1023 bool ok = newInstance->importFromText();
999 if (!ok) { 1024 if (!ok) {
1000 newInstance->setForceQuit(true); 1025 newInstance->setForceQuit(true);
1001 delete_and_null(newInstance); 1026 delete_and_null(newInstance);
1002 } 1027 }
1003 return ok; 1028 return ok;
1004 } 1029 }
1005 } 1030 }
1006 1031
1007 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 1032 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
1008 PwMerror ret; 1033 PwMerror ret;
1009 QString path(KFileDialog::getOpenFileName(QString::null, 1034 QString path(KFileDialog::getOpenFileName(QString::null,
1010 i18n("*|PWM-exported text file"), 1035 i18n("*|PWM-exported text file"),
1011 this)); 1036 this));
1012 if (path == "") 1037 if (path == "")
1013 goto cancelImport; 1038 goto cancelImport;
1014 1039
1015 ret = curDoc()->importFromText(&path, 0); 1040 ret = curDoc()->importFromText(&path, 0);
1016 if (ret == e_fileFormat) { 1041 if (ret == e_fileFormat) {
1017 KMessageBox::error(this, 1042 KMessageBox::error(this,
1018 i18n("Could not read file-format.\n" 1043 i18n("Could not read file-format.\n"
1019 "This seems to be _not_ a valid file\n" 1044 "This seems to be _not_ a valid file\n"
1020 "exported by PwM."), 1045 "exported by PwM."),
1021 i18n("invalid file-format")); 1046 i18n("invalid file-format"));
1022 goto cancelImport; 1047 goto cancelImport;
1023 } else if (ret == e_invalidArg) { 1048 } else if (ret == e_invalidArg) {
1024 BUG(); 1049 BUG();
1025 goto cancelImport; 1050 goto cancelImport;
1026 } else if (ret != e_success) { 1051 } else if (ret != e_success) {
1027 KMessageBox::error(this, 1052 KMessageBox::error(this,
1028 i18n("Could not import file!\n" 1053 i18n("Could not import file!\n"
1029 "Do you have permission to read this file?\n" 1054 "Do you have permission to read this file?\n"
1030 "Do you have enough free memory?"), 1055 "Do you have enough free memory?"),
1031 i18n("import failed")); 1056 i18n("import failed"));
1032 goto cancelImport; 1057 goto cancelImport;
1033 } 1058 }
1034 setVirgin(false); 1059 setVirgin(false);
1035 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1060 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1036 return true; 1061 return true;
1037 1062
1038cancelImport: 1063cancelImport:
1039 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1064 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1040 return false; 1065 return false;
1041} 1066}
1042 1067
1043void PwM::exportToGpasman() 1068void PwM::exportToGpasman()
1044{ 1069{
1045 PWM_ASSERT(curDoc()); 1070 PWM_ASSERT(curDoc());
1046 if (curDoc()->isDocEmpty()) { 1071 if (curDoc()->isDocEmpty()) {
1047 KMessageBox::information(this, 1072 KMessageBox::information(this,
1048 i18n 1073 i18n
1049 ("Sorry, there's nothing to export.\n" 1074 ("Sorry, there's nothing to export.\n"
1050 "Please first add some passwords."), 1075 "Please first add some passwords."),
1051 i18n("nothing to do")); 1076 i18n("nothing to do"));
1052 return; 1077 return;
1053 } 1078 }
1054 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 1079 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
1055 QString fn(KFileDialog::getSaveFileName(QString::null, 1080 QString fn(KFileDialog::getSaveFileName(QString::null,
1056 i18n("*|Gpasman or Kpasman file"), 1081 i18n("*|Gpasman or Kpasman file"),
1057 this)); 1082 this));
1058 if (fn == "") { 1083 if (fn == "") {
1059 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1084 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1060 return; 1085 return;
1061 } 1086 }
1062 1087
1063 PwMerror ret = curDoc()->exportToGpasman(&fn); 1088 PwMerror ret = curDoc()->exportToGpasman(&fn);
1064 if (ret != e_success) { 1089 if (ret != e_success) {
1065 if (ret == e_noPw) { 1090 if (ret == e_noPw) {
1066 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1091 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1067 return; 1092 return;
1068 } 1093 }
1069 KMessageBox::error(this, 1094 KMessageBox::error(this,
1070 i18n("Error: Couldn't write to file.\n" 1095 i18n("Error: Couldn't write to file.\n"
1071 "Please check if you have permission to write " 1096 "Please check if you have permission to write "
1072 "to the file in that directory."), 1097 "to the file in that directory."),
1073 i18n("error while writing")); 1098 i18n("error while writing"));
1074 } else 1099 } else
1075 showStatMsg(i18n("Successfully exported data.")); 1100 showStatMsg(i18n("Successfully exported data."));
1076 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1101 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1077} 1102}
1078 1103
1079 1104
1080 1105
1081void PwM::exportToCsv() 1106void PwM::exportToCsv()
1082{ 1107{
1083 PWM_ASSERT(curDoc()); 1108 PWM_ASSERT(curDoc());
1084 if (curDoc()->isDocEmpty()) { 1109 if (curDoc()->isDocEmpty()) {
1085 KMessageBox::information(this, 1110 KMessageBox::information(this,
1086 i18n 1111 i18n
1087 ("Sorry, there is nothing to export;\n" 1112 ("Sorry, there is nothing to export;\n"
1088 "please add some passwords first."), 1113 "please add some passwords first."),
1089 i18n("Nothing to Do")); 1114 i18n("Nothing to Do"));
1090 return; 1115 return;
1091 } 1116 }
1092 1117
1093 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 1118 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
1094 QString fn(KFileDialog::getSaveFileName("*.csv", i18n("*|CSV Text File"), this)); 1119 QString fn(KFileDialog::getSaveFileName("*.csv", i18n("*|CSV Text File"), this));
1095 if (fn.isEmpty()) { 1120 if (fn.isEmpty()) {
1096 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1121 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1097 return; 1122 return;
1098 } 1123 }
1099 1124
1100 Csv csv(this); 1125 Csv csv(this);
1101 if (!csv.exportData(fn, curDoc())) { 1126 if (!csv.exportData(fn, curDoc())) {
1102 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1127 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1103 showStatMsg(i18n("CSV file export failed.")); 1128 showStatMsg(i18n("CSV file export failed."));
1104 return; 1129 return;
1105 } 1130 }
1106 showStatMsg(i18n("Successfully exported data.")); 1131 showStatMsg(i18n("Successfully exported data."));
1107 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1132 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1108} 1133}
1109 1134
1110bool PwM::importCsv() 1135bool PwM::importCsv()
1111{ 1136{
1112 Csv csv(this); 1137 Csv csv(this);
1113 if (!isVirgin()) { 1138 if (!isVirgin()) {
1114 if (KMessageBox::questionYesNo(this, 1139 if (KMessageBox::questionYesNo(this,
1115 i18n("Do you want to import the data\n" 1140 i18n("Do you want to import the data\n"
1116 "into the current document? (If you\n" 1141 "into the current document? (If you\n"
1117 "select \"no\", a new document will be\n" 1142 "select \"no\", a new document will be\n"
1118 "opened.)"), 1143 "opened.)"),
1119 i18n("Import into This Document?")) 1144 i18n("Import into This Document?"))
1120 == KMessageBox::No) { 1145 == KMessageBox::No) {
1121 // import the data to a new window. 1146 // import the data to a new window.
1122 PwM *newInstance = init->createMainWnd(); 1147 PwM *newInstance = init->createMainWnd();
1123 bool ok = newInstance->importCsv(); 1148 bool ok = newInstance->importCsv();
1124 if (!ok) { 1149 if (!ok) {
1125 newInstance->setForceQuit(true); 1150 newInstance->setForceQuit(true);
1126 delete_and_null(newInstance); 1151 delete_and_null(newInstance);
1127 } 1152 }
1128 return ok; 1153 return ok;
1129 } 1154 }
1130 } 1155 }
1131 1156
1132 QString filename = KFileDialog::getOpenFileName("*.csv", i18n("*|CSV Text File"), this); 1157 QString filename = KFileDialog::getOpenFileName("*.csv", i18n("*|CSV Text File"), this);
1133 if (filename.isEmpty()) 1158 if (filename.isEmpty())
1134 return false; 1159 return false;
1135 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 1160 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
1136 if (!csv.importData(filename, curDoc())) { 1161 if (!csv.importData(filename, curDoc())) {
1137 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1162 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1138 showStatMsg(i18n("CSV file import failed.")); 1163 showStatMsg(i18n("CSV file import failed."));
1139 return false; 1164 return false;
1140 } 1165 }
1141 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1166 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1142 KMessageBox::information(this, 1167 KMessageBox::information(this,
1143 i18n("Successfully imported the CSV data\n" 1168 i18n("Successfully imported the CSV data\n"
1144 "into the current document."), i18n("Successfully Imported")); 1169 "into the current document."), i18n("Successfully Imported"));
1145 showStatMsg(i18n("Successfully imported")); 1170 showStatMsg(i18n("Successfully imported"));
1146 setVirgin(false); 1171 setVirgin(false);
1147 return true; 1172 return true;
1148} 1173}
1149 1174
1150 1175
1151void PwM::exportToKWallet() 1176void PwM::exportToKWallet()
1152{ 1177{
1153#ifdef CONFIG_KWALLETIF 1178#ifdef CONFIG_KWALLETIF
1154 if (!checkAndAskForKWalletEmu()) 1179 if (!checkAndAskForKWalletEmu())
1155 return; 1180 return;
1156 PWM_ASSERT(curDoc()); 1181 PWM_ASSERT(curDoc());
1157 if (curDoc()->isDocEmpty()) { 1182 if (curDoc()->isDocEmpty()) {
1158 KMessageBox::information(this, 1183 KMessageBox::information(this,
1159 i18n 1184 i18n
1160 ("Sorry, there's nothing to export.\n" 1185 ("Sorry, there's nothing to export.\n"
1161 "Please first add some passwords."), 1186 "Please first add some passwords."),
1162 i18n("nothing to do")); 1187 i18n("nothing to do"));
1163 init->initKWalletEmu(); 1188 init->initKWalletEmu();
1164 return; 1189 return;
1165 } 1190 }
1166 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 1191 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
1167 KWalletIf walletIf(this); 1192 KWalletIf walletIf(this);
1168 if (walletIf.kwalletExport(curDoc())) { 1193 if (walletIf.kwalletExport(curDoc())) {
1169 KMessageBox::information(this, 1194 KMessageBox::information(this,
1170 i18n("Successfully exported the data of the current " 1195 i18n("Successfully exported the data of the current "
1171 "document to KWallet."), 1196 "document to KWallet."),
1172 i18n("Successfully exported data.")); 1197 i18n("Successfully exported data."));
1173 showStatMsg(i18n("Successfully exported data.")); 1198 showStatMsg(i18n("Successfully exported data."));
1174 } 1199 }
1175 init->initKWalletEmu(); 1200 init->initKWalletEmu();
1176 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1201 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1177#endif // CONFIG_KWALLETIF 1202#endif // CONFIG_KWALLETIF
1178} 1203}
1179 1204
1180bool PwM::importFromGpasman() 1205bool PwM::importFromGpasman()
1181{ 1206{
1182 if (!isVirgin()) { 1207 if (!isVirgin()) {
1183 if (KMessageBox::questionYesNo(this, 1208 if (KMessageBox::questionYesNo(this,
1184 i18n("Do you want to import the data\n" 1209 i18n("Do you want to import the data\n"
1185 "into the current document? (If you\n" 1210 "into the current document? (If you\n"
1186 "select \"no\", a new document will be\n" 1211 "select \"no\", a new document will be\n"
1187 "opened.)"), 1212 "opened.)"),
1188 i18n("import into this document?")) 1213 i18n("import into this document?"))
1189 == KMessageBox::No) { 1214 == KMessageBox::No) {
1190 // import the data to a new window. 1215 // import the data to a new window.
1191 PwM *newInstance = init->createMainWnd(); 1216 PwM *newInstance = init->createMainWnd();
1192 bool ok = newInstance->importFromGpasman(); 1217 bool ok = newInstance->importFromGpasman();
1193 if (!ok) { 1218 if (!ok) {
1194 newInstance->setForceQuit(true); 1219 newInstance->setForceQuit(true);
1195 delete_and_null(newInstance); 1220 delete_and_null(newInstance);
1196 } 1221 }
1197 return ok; 1222 return ok;
1198 } 1223 }
1199 } 1224 }
1200 1225
1201 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 1226 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
1202 PwMerror ret; 1227 PwMerror ret;
1203 QString path(KFileDialog::getOpenFileName(QString::null, 1228 QString path(KFileDialog::getOpenFileName(QString::null,
1204 i18n("*|Gpasman or Kpasman file"), this)); 1229 i18n("*|Gpasman or Kpasman file"), this));
1205 if (path == "") 1230 if (path == "")
1206 goto cancelImport; 1231 goto cancelImport;
1207 ret = curDoc()->importFromGpasman(&path); 1232 ret = curDoc()->importFromGpasman(&path);
1208 if (ret == e_wrongPw) { 1233 if (ret == e_wrongPw) {
1209 if (KMessageBox::questionYesNo(this, 1234 if (KMessageBox::questionYesNo(this,
1210 i18n 1235 i18n
1211 ("This is probably the wrong master-password\n" 1236 ("This is probably the wrong master-password\n"
1212 "you have typed in.\n" 1237 "you have typed in.\n"
1213 "There is no real way to determine the\n" 1238 "There is no real way to determine the\n"
1214 "correctness of the password in the Gpasman\n" 1239 "correctness of the password in the Gpasman\n"
1215 "file-format. But I think this\n" 1240 "file-format. But I think this\n"
1216 "password ist wrong.\n" 1241 "password ist wrong.\n"
1217 "Do you want to continue nevertheless?"), 1242 "Do you want to continue nevertheless?"),
1218 i18n("password error")) 1243 i18n("password error"))
1219 == KMessageBox::No) { 1244 == KMessageBox::No) {
1220 goto cancelImport; 1245 goto cancelImport;
1221 } 1246 }
1222 } else if (ret != e_success) { 1247 } else if (ret != e_success) {
1223 KMessageBox::error(this, 1248 KMessageBox::error(this,
1224 i18n("Could not import file!\n" 1249 i18n("Could not import file!\n"
1225 "Do you have permission to read this file?"), 1250 "Do you have permission to read this file?"),
1226 i18n("import failed")); 1251 i18n("import failed"));
1227 goto cancelImport; 1252 goto cancelImport;
1228 } 1253 }
1229 setVirgin(false); 1254 setVirgin(false);
1230 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1255 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1231 return true; 1256 return true;
1232 1257
1233cancelImport: 1258cancelImport:
1234 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1259 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1235 return false; 1260 return false;
1236} 1261}
1237 1262
1238#ifdef CONFIG_KWALLETIF 1263#ifdef CONFIG_KWALLETIF
1239bool PwM::checkAndAskForKWalletEmu() 1264bool PwM::checkAndAskForKWalletEmu()
1240{ 1265{
1241 if (init->kwalletEmu()) { 1266 if (init->kwalletEmu()) {
1242 /* KWallet emulation is enabled. We can't import/export 1267 /* KWallet emulation is enabled. We can't import/export
1243 * data from/to it, while emulation is active. 1268 * data from/to it, while emulation is active.
1244 */ 1269 */
1245 if (KMessageBox::questionYesNo(this, 1270 if (KMessageBox::questionYesNo(this,
1246 i18n("KWallet emulation is enabled.\n" 1271 i18n("KWallet emulation is enabled.\n"
1247 "You can't import or export data from/to " 1272 "You can't import or export data from/to "
1248 "the original KWallet, while the emulation " 1273 "the original KWallet, while the emulation "
1249 "is active.\n" 1274 "is active.\n"
1250 "Do you want to tempoarly disable the KWallet emulation?"), 1275 "Do you want to tempoarly disable the KWallet emulation?"),
1251 i18n("Tempoarly disable KWallet emulation?")) 1276 i18n("Tempoarly disable KWallet emulation?"))
1252 == KMessageBox::Yes) { 1277 == KMessageBox::Yes) {
1253 init->initKWalletEmu(true); 1278 init->initKWalletEmu(true);
1254 PWM_ASSERT(!init->kwalletEmu()); 1279 PWM_ASSERT(!init->kwalletEmu());
1255 return true; 1280 return true;
1256 } 1281 }
1257 return false; 1282 return false;
1258 } 1283 }
1259 return true; 1284 return true;
1260} 1285}
1261#endif // CONFIG_KWALLETIF 1286#endif // CONFIG_KWALLETIF
1262 1287
1263bool PwM::importKWallet() 1288bool PwM::importKWallet()
1264{ 1289{
1265#ifdef CONFIG_KWALLETIF 1290#ifdef CONFIG_KWALLETIF
1266 if (!checkAndAskForKWalletEmu()) 1291 if (!checkAndAskForKWalletEmu())
1267 return false; 1292 return false;
1268 KWalletIf walletIf(this); 1293 KWalletIf walletIf(this);
1269 if (!isVirgin()) { 1294 if (!isVirgin()) {
1270 if (KMessageBox::questionYesNo(this, 1295 if (KMessageBox::questionYesNo(this,
1271 i18n("Do you want to import the data " 1296 i18n("Do you want to import the data "
1272 "into the current document? (If you " 1297 "into the current document? (If you "
1273 "select \"no\", a new document will be " 1298 "select \"no\", a new document will be "
1274 "opened.)"), 1299 "opened.)"),
1275 i18n("import into this document?")) 1300 i18n("import into this document?"))
1276 == KMessageBox::No) { 1301 == KMessageBox::No) {
1277 // import the data to a new window. 1302 // import the data to a new window.
1278 PwM *newInstance = init->createMainWnd(); 1303 PwM *newInstance = init->createMainWnd();
1279 bool ok = newInstance->importKWallet(); 1304 bool ok = newInstance->importKWallet();
1280 if (!ok) { 1305 if (!ok) {
1281 newInstance->setForceQuit(true); 1306 newInstance->setForceQuit(true);
1282 delete_and_null(newInstance); 1307 delete_and_null(newInstance);
1283 goto exit_fail; 1308 goto exit_fail;
1284 } else { 1309 } else {
1285 goto exit_ok; 1310 goto exit_ok;
1286 } 1311 }
1287 } 1312 }
1288 } 1313 }
1289 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 1314 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
1290 if (!walletIf.kwalletImport(curDoc())) { 1315 if (!walletIf.kwalletImport(curDoc())) {
1291 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1316 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1292 showStatMsg(i18n("KWallet import failed")); 1317 showStatMsg(i18n("KWallet import failed"));
1293 goto exit_fail; 1318 goto exit_fail;
1294 } 1319 }
1295 KMessageBox::information(this, 1320 KMessageBox::information(this,
1296 i18n("Successfully imported the KWallet data " 1321 i18n("Successfully imported the KWallet data "
1297 "into the current document."), 1322 "into the current document."),
1298 i18n("successfully imported")); 1323 i18n("successfully imported"));
1299 showStatMsg(i18n("successfully imported")); 1324 showStatMsg(i18n("successfully imported"));
1300 setVirgin(false); 1325 setVirgin(false);
1301 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1326 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1302 1327
1303exit_ok: 1328exit_ok:
1304 init->initKWalletEmu(); 1329 init->initKWalletEmu();
1305 return true; 1330 return true;
1306 1331
1307exit_fail: 1332exit_fail:
1308 init->initKWalletEmu(); 1333 init->initKWalletEmu();
1309#endif // CONFIG_KWALLETIF 1334#endif // CONFIG_KWALLETIF
1310 return false; 1335 return false;
1311} 1336}
1312 1337
1313void PwM::print_slot() 1338void PwM::print_slot()
1314{ 1339{
1315 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer); 1340 curDoc()->timer()->getLock(DocTimer::id_autoLockTimer);
1316#ifndef PWM_EMBEDDED 1341#ifndef PWM_EMBEDDED
1317 PwMPrint p(curDoc(), this); 1342 PwMPrint p(curDoc(), this);
1318 p.printNow(); 1343 p.printNow();
1319#else 1344#else
1320 qDebug("PwM::print_slot , PRINTING IS NOT IMPLEMENTED"); 1345 qDebug("PwM::print_slot , PRINTING IS NOT IMPLEMENTED");
1321#endif 1346#endif
1322 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer); 1347 curDoc()->timer()->putLock(DocTimer::id_autoLockTimer);
1323} 1348}
1324 1349
1325void PwM::genNewCard_slot() 1350void PwM::genNewCard_slot()
1326{ 1351{
1327#ifdef CONFIG_KEYCARD 1352#ifdef CONFIG_KEYCARD
1328 init->keycard()->genNewCard(); 1353 init->keycard()->genNewCard();
1329#endif 1354#endif
1330} 1355}
1331 1356
1332void PwM::eraseCard_slot() 1357void PwM::eraseCard_slot()
1333{ 1358{
1334#ifdef CONFIG_KEYCARD 1359#ifdef CONFIG_KEYCARD
1335 init->keycard()->eraseCard(); 1360 init->keycard()->eraseCard();
1336#endif 1361#endif
1337} 1362}
1338 1363
1339void PwM::readCardId_slot() 1364void PwM::readCardId_slot()
1340{ 1365{
1341#ifdef CONFIG_KEYCARD 1366#ifdef CONFIG_KEYCARD
1342 init->keycard()->displayKey(); 1367 init->keycard()->displayKey();
1343#endif 1368#endif
1344} 1369}
1345 1370
1346void PwM::makeCardBackup_slot() 1371void PwM::makeCardBackup_slot()
1347{ 1372{
1348#ifdef CONFIG_KEYCARD 1373#ifdef CONFIG_KEYCARD
1349 init->keycard()->makeBackupImage(); 1374 init->keycard()->makeBackupImage();
1350#endif 1375#endif
1351} 1376}
1352 1377
1353void PwM::replayCardBackup_slot() 1378void PwM::replayCardBackup_slot()
1354{ 1379{
1355#ifdef CONFIG_KEYCARD 1380#ifdef CONFIG_KEYCARD
1356 init->keycard()->replayBackupImage(); 1381 init->keycard()->replayBackupImage();
1357#endif 1382#endif
1358} 1383}
1359 1384
1360void PwM::execLauncher_slot() 1385void PwM::execLauncher_slot()
1361{ 1386{
1362 PWM_ASSERT(curDoc()); 1387 PWM_ASSERT(curDoc());
1363 if (curDoc()->isDeepLocked()) 1388 if (curDoc()->isDeepLocked())
1364 return; 1389 return;
1365 unsigned int curEntryIndex; 1390 unsigned int curEntryIndex;
1366 if (!view->getCurEntryIndex(&curEntryIndex)) 1391 if (!view->getCurEntryIndex(&curEntryIndex))
1367 return; 1392 return;
1368 bool ret = curDoc()->execLauncher(view->getCurrentCategory(), 1393 bool ret = curDoc()->execLauncher(view->getCurrentCategory(),
1369 curEntryIndex); 1394 curEntryIndex);
1370 if (ret) 1395 if (ret)
1371 showStatMsg(i18n("Executed the \"Launcher\".")); 1396 showStatMsg(i18n("Executed the \"Launcher\"."));
1372 else 1397 else
1373 showStatMsg(i18n("ERROR: Couldn't execute the \"Launcher\"!")); 1398 showStatMsg(i18n("ERROR: Couldn't execute the \"Launcher\"!"));
1374} 1399}
1375 1400
1376void PwM::goToURL_slot() 1401void PwM::goToURL_slot()
1377{ 1402{
1378 PWM_ASSERT(curDoc()); 1403 PWM_ASSERT(curDoc());
1379 if (curDoc()->isDeepLocked()) 1404 if (curDoc()->isDeepLocked())
1380 return; 1405 return;
1381 unsigned int curEntryIndex; 1406 unsigned int curEntryIndex;
1382 if (!view->getCurEntryIndex(&curEntryIndex)) 1407 if (!view->getCurEntryIndex(&curEntryIndex))
1383 return; 1408 return;
1384 bool ret = curDoc()->goToURL(view->getCurrentCategory(), 1409 bool ret = curDoc()->goToURL(view->getCurrentCategory(),
1385 curEntryIndex); 1410 curEntryIndex);
1386 if (ret) 1411 if (ret)
1387 showStatMsg(i18n("started browser with current URL.")); 1412 showStatMsg(i18n("started browser with current URL."));
1388 else 1413 else
1389 showStatMsg(i18n("ERROR: Couldn't start browser! Maybe invalid URL?")); 1414 showStatMsg(i18n("ERROR: Couldn't start browser! Maybe invalid URL?"));
1390} 1415}
1391 1416
1392void PwM::copyToClipboard(const QString &s) 1417void PwM::copyToClipboard(const QString &s)
1393{ 1418{
1394 QClipboard *cb = QApplication::clipboard(); 1419 QClipboard *cb = QApplication::clipboard();
1395#ifndef PWM_EMBEDDED 1420#ifndef PWM_EMBEDDED
1396 if (cb->supportsSelection()) 1421 if (cb->supportsSelection())
1397 cb->setText(s, QClipboard::Selection); 1422 cb->setText(s, QClipboard::Selection);
1398 cb->setText(s, QClipboard::Clipboard); 1423 cb->setText(s, QClipboard::Clipboard);
1399#else 1424#else
1400 cb->setText(s); 1425 cb->setText(s);
1401 1426
1402#endif 1427#endif
1403 1428
1404} 1429}
1405 1430
1406 1431
1407void PwM::showStatMsg(const QString &msg) 1432void PwM::showStatMsg(const QString &msg)
1408{ 1433{
1409#ifdef DESKTOP_VERSION 1434#ifdef DESKTOP_VERSION
1410 statusBar()->message(msg, STATUSBAR_MSG_TIMEOUT * 1000); 1435 statusBar()->message(msg, STATUSBAR_MSG_TIMEOUT * 1000);
1411#else 1436#else
1412 //qDebug("Statusbar : %s",msg.latin1()); 1437 //qDebug("Statusbar : %s",msg.latin1());
1413 Global::statusMessage(msg); 1438 Global::statusMessage(msg);
1414#endif 1439#endif
1415} 1440}
1416 1441
1417void PwM::focusInEvent(QFocusEvent *e) 1442void PwM::focusInEvent(QFocusEvent *e)
1418{ 1443{
1419 if (e->gotFocus()) { 1444 if (e->gotFocus()) {
1420 emit gotFocus(this); 1445 emit gotFocus(this);
1421 } else if (e->lostFocus()) { 1446 } else if (e->lostFocus()) {
1422 emit lostFocus(this); 1447 emit lostFocus(this);
1423 } 1448 }
1424} 1449}
1425 1450
1426 1451
1427#ifdef PWM_EMBEDDED 1452#ifdef PWM_EMBEDDED
1428 1453
1429void PwM::category_slot() 1454void PwM::category_slot()
1430{ 1455{
1431 PwMDoc *doc = curDoc(); 1456 PwMDoc *doc = curDoc();
1432 PWM_ASSERT(doc); 1457 PWM_ASSERT(doc);
1433 doc->timer()->getLock(DocTimer::id_autoLockTimer); 1458 doc->timer()->getLock(DocTimer::id_autoLockTimer);
1434 1459
1435 editCategoryWnd w(doc, this, "editcategory"); 1460 editCategoryWnd w(doc, this, "editcategory");
1436/* 1461/*
1437 vector<string> catList; 1462 vector<string> catList;
1438 doc->getCategoryList(&catList); 1463 doc->getCategoryList(&catList);
1439 unsigned i, size = catList.size(); 1464 unsigned i, size = catList.size();
1440 for (i = 0; i < size; ++i) { 1465 for (i = 0; i < size; ++i) {
1441 w.addCategory(catList[i].c_str()); 1466 w.addCategory(catList[i].c_str());
1442 } 1467 }
1443 w.setCurrCategory(view->getCurrentCategory()); 1468 w.setCurrCategory(view->getCurrentCategory());
1444 if (pw) 1469 if (pw)
1445 w.pwLineEdit->setText(*pw); 1470 w.pwLineEdit->setText(*pw);
1446*/ 1471*/
1447 w.setCurrCategory(view->getCurrentCategory()); 1472 w.setCurrCategory(view->getCurrentCategory());
1448 1473
1449 tryAgain: 1474 tryAgain:
1450 if (w.exec() == 1) 1475 if (w.exec() == 1)
1451 { 1476 {
1452 PwMDataItem d; 1477 PwMDataItem d;
1453 1478
1454 //US BUG: to initialize all values of curEntr with meaningfulldata, 1479 //US BUG: to initialize all values of curEntr with meaningfulldata,
1455 // we call clear on it. Reason: Metadata will be uninitialized otherwise. 1480 // we call clear on it. Reason: Metadata will be uninitialized otherwise.
1456 // another option would be to create a constructor for PwMDataItem 1481 // another option would be to create a constructor for PwMDataItem
1457 d.clear(true); 1482 d.clear(true);
1458 /* 1483 /*
1459 d.desc = w.getDescription().latin1(); 1484 d.desc = w.getDescription().latin1();
1460 d.name = w.getUsername().latin1(); 1485 d.name = w.getUsername().latin1();
1461 d.pw = w.getPassword().latin1(); 1486 d.pw = w.getPassword().latin1();
1462 d.comment = w.getComment().latin1(); 1487 d.comment = w.getComment().latin1();
1463 d.url = w.getUrl().latin1(); 1488 d.url = w.getUrl().latin1();
1464 d.launcher = w.getLauncher().latin1(); 1489 d.launcher = w.getLauncher().latin1();
1465 PwMerror ret = doc->addEntry(w.getCategory(), &d); 1490 PwMerror ret = doc->addEntry(w.getCategory(), &d);
1466 if (ret == e_entryExists) { 1491 if (ret == e_entryExists) {
1467 KMessageBox::error(this, 1492 KMessageBox::error(this,
1468 i18n 1493 i18n
1469 ("An entry with this \"Description\",\n" 1494 ("An entry with this \"Description\",\n"
1470 "does already exist.\n" 1495 "does already exist.\n"
1471 "Please select another description."), 1496 "Please select another description."),
1472 i18n("entry already exists.")); 1497 i18n("entry already exists."));
1473 goto tryAgain; 1498 goto tryAgain;
1474 } else if (ret == e_maxAllowedEntr) { 1499 } else if (ret == e_maxAllowedEntr) {
1475 KMessageBox::error(this, i18n("The maximum possible number of\nentries" 1500 KMessageBox::error(this, i18n("The maximum possible number of\nentries"
1476 "has been reached.\nYou can't add more entries."), 1501 "has been reached.\nYou can't add more entries."),
1477 i18n("maximum number of entries")); 1502 i18n("maximum number of entries"));
1478 doc->timer()->putLock(DocTimer::id_autoLockTimer); 1503 doc->timer()->putLock(DocTimer::id_autoLockTimer);
1479 return; 1504 return;
1480 } 1505 }
1481 */ 1506 */
1482 } 1507 }
1483 setVirgin(false); 1508 setVirgin(false);
1484 doc->timer()->putLock(DocTimer::id_autoLockTimer); 1509 doc->timer()->putLock(DocTimer::id_autoLockTimer);
1485} 1510}
1486 1511
1487 1512
1488void PwM::whatsnew_slot() 1513void PwM::whatsnew_slot()
1489{ 1514{
1490 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 1515 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
1491} 1516}
1492 1517
1493void PwM::showLicense_slot() 1518void PwM::showLicense_slot()
1494{ 1519{
1495 KApplication::showLicence(); 1520 KApplication::showLicence();
1496} 1521}
1497 1522
1498void PwM::faq_slot() 1523void PwM::faq_slot()
1499{ 1524{
1500 KApplication::showFile( "PWM/Pi FAQ", "kdepim/pwmanager/pwmanagerFAQ.txt" ); 1525 KApplication::showFile( "PWM/Pi FAQ", "kdepim/pwmanager/pwmanagerFAQ.txt" );
1501} 1526}
1502 1527
1503void PwM::syncHowTo_slot() 1528void PwM::syncHowTo_slot()
1504{ 1529{
1505 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 1530 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
1506} 1531}
1507 1532
1508 1533
1509void PwM::createAboutData_slot() 1534void PwM::createAboutData_slot()
1510{ 1535{
1511 QString version; 1536 QString version;
1512#include <../version> 1537#include <../version>
1513; 1538;
1514 QMessageBox::about( this, "About PwManager/Pi", 1539 QMessageBox::about( this, "About PwManager/Pi",
1515 "PwManager/Platform-independent\n" 1540 "PwManager/Platform-independent\n"
1516 "(PWM/Pi) " +version + " - " + 1541 "(PWM/Pi) " +version + " - " +
1517#ifdef DESKTOP_VERSION 1542#ifdef DESKTOP_VERSION
1518 "Desktop Edition\n" 1543 "Desktop Edition\n"
1519#else 1544#else
1520 "PDA-Edition\n" 1545 "PDA-Edition\n"
1521 "for: Zaurus 5500 / 7x0 / 8x0\n" 1546 "for: Zaurus 5500 / 7x0 / 8x0\n"
1522#endif 1547#endif
1523 1548
1524 "(c) 2004 Ulf Schenk\n" 1549 "(c) 2004 Ulf Schenk\n"
1525 "(c) 2004 Lutz Rogowski\n" 1550 "(c) 2004 Lutz Rogowski\n"
1526 "(c) 1997-2004, The KDE PIM Team\n" 1551 "(c) 1997-2004, The KDE PIM Team\n"
1527 1552
1528 "(c) Michael Buesch - main programming\nand current maintainer\nmbuesch@freenet.de\n" 1553 "(c) Michael Buesch - main programming\nand current maintainer\nmbuesch@freenet.de\n"
1529 "Matt Scifo - mscifo@o1.com\n" 1554 "Matt Scifo - mscifo@o1.com\n"
1530 "Elias Probst - elias.probst@gmx.de\n" 1555 "Elias Probst - elias.probst@gmx.de\n"
1531 "George Staikos - staikos@kde.org\n" 1556 "George Staikos - staikos@kde.org\n"
1532 "Matthew Palmer - mjp16@uow.edu.au\n" 1557 "Matthew Palmer - mjp16@uow.edu.au\n"
1533 "Olivier Sessink - gpasman@nl.linux.org\n" 1558 "Olivier Sessink - gpasman@nl.linux.org\n"
1534 "The libgcrypt developers -\nBlowfish and SHA1 algorithms\nftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/\n" 1559 "The libgcrypt developers -\nBlowfish and SHA1 algorithms\nftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/\n"
1535 "Troy Engel - tengel@sonic.net\n" 1560 "Troy Engel - tengel@sonic.net\n"
1536 "Wickey - wickey@gmx.at\n" 1561 "Wickey - wickey@gmx.at\n"
1537 "Ian MacGregor - original documentation author.\n" 1562 "Ian MacGregor - original documentation author.\n"
1538 ); 1563 );
1539} 1564}
1540 1565
1541 1566
1542//this are the overwritten callbackmethods from the syncinterface 1567//this are the overwritten callbackmethods from the syncinterface
1543bool PwM::sync(KSyncManager* manager, QString filename, int mode) 1568bool PwM::sync(KSyncManager* manager, QString filename, int mode)
1544{ 1569{
1545 PWM_ASSERT(curDoc()); 1570 PWM_ASSERT(curDoc());
1546 1571
1547 bool ret = curDoc()->sync(manager, filename, mode); 1572 bool ret = curDoc()->sync(manager, filename, mode);
1548 1573
1549 qDebug("PwM::sync save now: ret=%i", ret); 1574 qDebug("PwM::sync save now: ret=%i", ret);
1550 1575
1551 if (ret == true) { 1576 if (ret == true) {
1552 //US BUG: what can we call here to update the view of the current doc? 1577 //US BUG: what can we call here to update the view of the current doc?
1553 //mViewManager->refreshView(); 1578 //mViewManager->refreshView();
1554 1579
1555 //US curDoc()->sync sets the dirtyFlag in case the sync was successfull. 1580 //US curDoc()->sync sets the dirtyFlag in case the sync was successfull.
1556 save(); 1581 save();
1557 } 1582 }
1558 1583
1559 return ret; 1584 return ret;
1560} 1585}
1561 1586
1562void PwM::removeSyncInfo( QString syncProfile) 1587void PwM::removeSyncInfo( QString syncProfile)
1563{ 1588{
1564 qDebug("PWM:removeSyncInfo for profile %s ", syncProfile.latin1()); 1589 qDebug("PWM:removeSyncInfo for profile %s ", syncProfile.latin1());
1565 curDoc()->removeSyncInfo( syncProfile ); 1590 curDoc()->removeSyncInfo( syncProfile );
1566 //US curDoc()->removeSyncInfo sets the dirtyFlag. 1591 //US curDoc()->removeSyncInfo sets the dirtyFlag.
1567} 1592}
1568 1593
1569#endif 1594#endif
1570 1595
1571 1596
1572#ifndef PWM_EMBEDDED 1597#ifndef PWM_EMBEDDED
1573#include "pwm.moc" 1598#include "pwm.moc"
1574#endif 1599#endif
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h
index 9fa9edc..2d1b854 100644
--- a/pwmanager/pwmanager/pwm.h
+++ b/pwmanager/pwmanager/pwm.h
@@ -1,299 +1,300 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * copyright (C) 2003, 2004 by Michael Buesch * 3 * copyright (C) 2003, 2004 by Michael Buesch *
4 * email: mbuesch@freenet.de * 4 * email: mbuesch@freenet.de *
5 * * 5 * *
6 * This program is free software; you can redistribute it and/or modify * 6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License version 2 * 7 * it under the terms of the GNU General Public License version 2 *
8 * as published by the Free Software Foundation. * 8 * as published by the Free Software Foundation. *
9 * * 9 * *
10 ***************************************************************************/ 10 ***************************************************************************/
11 11
12/*************************************************************************** 12/***************************************************************************
13 * copyright (C) 2004 by Ulf Schenk 13 * copyright (C) 2004 by Ulf Schenk
14 * This file is originaly based on version 1.0.1 of pwmanager 14 * This file is originaly based on version 1.0.1 of pwmanager
15 * and was modified to run on embedded devices that run microkde 15 * and was modified to run on embedded devices that run microkde
16 * 16 *
17 * $Id$ 17 * $Id$
18 **************************************************************************/ 18 **************************************************************************/
19 19
20#ifndef __PWM_H 20#ifndef __PWM_H
21#define __PWM_H 21#define __PWM_H
22 22
23 23
24#include <kpopupmenu.h> 24#include <kpopupmenu.h>
25#include <klistview.h> 25#include <klistview.h>
26#include <kmainwindow.h> 26#include <kmainwindow.h>
27 27
28#ifndef PWM_EMBEDDED 28#ifndef PWM_EMBEDDED
29#include <kwin.h> 29#include <kwin.h>
30#include <kapp.h> 30#include <kapp.h>
31#include <kdeversion.h> 31#include <kdeversion.h>
32#else 32#else
33#include <ksyncmanager.h> 33#include <ksyncmanager.h>
34#endif 34#endif
35 35
36#include <kaction.h> 36#include <kaction.h>
37 37
38#include <qglobal.h> 38#include <qglobal.h>
39 39
40#include "pwmview.h" 40#include "pwmview.h"
41#include "pwmexception.h" 41#include "pwmexception.h"
42 42
43 43
44/** timeout for displaying a message on the status-bar (in seconds) */ 44/** timeout for displaying a message on the status-bar (in seconds) */
45 #define STATUSBAR_MSG_TIMEOUT5 45 #define STATUSBAR_MSG_TIMEOUT5
46 46
47 47
48class PwMInit; 48class PwMInit;
49class KSyncManager; 49class KSyncManager;
50 50
51/** PwM is the base class of the project */ 51/** PwM is the base class of the project */
52#ifndef PWM_EMBEDDED 52#ifndef PWM_EMBEDDED
53//MOC_SKIP_BEGIN 53//MOC_SKIP_BEGIN
54class PwM : public KMainWindow 54class PwM : public KMainWindow
55//MOC_SKIP_END 55//MOC_SKIP_END
56#else 56#else
57class PwM : public KMainWindow, public KSyncInterface 57class PwM : public KMainWindow, public KSyncInterface
58#endif 58#endif
59{ 59{
60 Q_OBJECT 60 Q_OBJECT
61public: 61public:
62 friend class PwMView; 62 friend class PwMView;
63 /** construtor */ 63 /** construtor */
64 PwM(PwMInit *_init, PwMDoc *doc, 64 PwM(PwMInit *_init, PwMDoc *doc,
65 bool virginity = true, 65 bool virginity = true,
66 QWidget* parent = 0, const char *name = 0); 66 QWidget* parent = 0, const char *name = 0);
67 /** destructor */ 67 /** destructor */
68 ~PwM(); 68 ~PwM();
69 69
70 /** copy some text to the global clipboard */ 70 /** copy some text to the global clipboard */
71 static void copyToClipboard(const QString &s); 71 static void copyToClipboard(const QString &s);
72 72
73 /** returns pointer to the view */ 73 /** returns pointer to the view */
74 PwMView * curView() 74 PwMView * curView()
75 { return view; } 75 { return view; }
76 /** returns pointer to the currently using document. */ 76 /** returns pointer to the currently using document. */
77 PwMDoc * curDoc() 77 PwMDoc * curDoc()
78 { return curView()->document(); } 78 { return curView()->document(); }
79 /** open a new doc with the given filename */ 79 /** open a new doc with the given filename */
80 PwMDoc * openDoc(QString filename, bool openDeepLocked = false); 80 PwMDoc * openDoc(QString filename, bool openDeepLocked = false);
81 /** show a message on the global status bar. 81 /** show a message on the global status bar.
82 * The message times out after some seconds. 82 * The message times out after some seconds.
83 */ 83 */
84 void showStatMsg(const QString &msg); 84 void showStatMsg(const QString &msg);
85 /** ask the user where to save the doc (if it has not been saved, yet) 85 /** ask the user where to save the doc (if it has not been saved, yet)
86 * and write the data to disk. 86 * and write the data to disk.
87 */ 87 */
88 bool save(); 88 bool save();
89 /** ask the user where to save the doc 89 /** ask the user where to save the doc
90 * and write the data to disk. 90 * and write the data to disk.
91 */ 91 */
92 bool saveAs(); 92 bool saveAs();
93 /** force quit. Quit this window, always! Don't minimize it */ 93 /** force quit. Quit this window, always! Don't minimize it */
94 bool isForceQuit() 94 bool isForceQuit()
95 { return forceQuit; } 95 { return forceQuit; }
96 /** set forceQuit */ 96 /** set forceQuit */
97 void setForceQuit(bool force) 97 void setForceQuit(bool force)
98 { forceQuit = force; } 98 { forceQuit = force; }
99 /** force minimize this window */ 99 /** force minimize this window */
100 bool isForceMinimizeToTray() 100 bool isForceMinimizeToTray()
101 { return forceMinimizeToTray; } 101 { return forceMinimizeToTray; }
102 /** set forceMinimizeToTray */ 102 /** set forceMinimizeToTray */
103 void setForceMinimizeToTray(bool force) 103 void setForceMinimizeToTray(bool force)
104 { forceMinimizeToTray = force; } 104 { forceMinimizeToTray = force; }
105 105
106public slots: 106public slots:
107 /** file/new triggered */ 107 /** file/new triggered */
108 void new_slot(); 108 void new_slot();
109 /** file/open triggered */ 109 /** file/open triggered */
110//US ENH 110//US ENH
111 void open_slot(); 111 void open_slot();
112 void open_slot(QString fn); 112 void open_slot(QString fn);
113 /** file/close triggered */ 113 /** file/close triggered */
114 void close_slot(); 114 void close_slot();
115 /** file/quit triggered */ 115 /** file/quit triggered */
116 void quitButton_slot(); 116 void quitButton_slot();
117 /** file/save triggered */ 117 /** file/save triggered */
118 void save_slot(); 118 void save_slot();
119 /** file/saveAs triggered */ 119 /** file/saveAs triggered */
120 void saveAs_slot(); 120 void saveAs_slot();
121 /** file/export/text triggered */ 121 /** file/export/text triggered */
122 void exportToText(); 122 void exportToText();
123 /** file/export/gpasman triggered */ 123 /** file/export/gpasman triggered */
124 void exportToGpasman(); 124 void exportToGpasman();
125 /** file/export/kwallet triggered */ 125 /** file/export/kwallet triggered */
126 void exportToKWallet(); 126 void exportToKWallet();
127 /** file/export/csv triggered */ 127 /** file/export/csv triggered */
128 void exportToCsv(); 128 void exportToCsv();
129 /** file/import/text triggered */ 129 /** file/import/text triggered */
130 bool importFromText(); 130 bool importFromText();
131 /** file/import/gpasman triggered */ 131 /** file/import/gpasman triggered */
132 bool importFromGpasman(); 132 bool importFromGpasman();
133 /** file/import/kwallet triggered */ 133 /** file/import/kwallet triggered */
134 bool importKWallet(); 134 bool importKWallet();
135 /** file/import/csv triggered */ 135 /** file/import/csv triggered */
136 bool importCsv(); 136 bool importCsv();
137 /** file/print triggered */ 137 /** file/print triggered */
138 void print_slot(); 138 void print_slot();
139 /** manage/add triggered */ 139 /** manage/add triggered */
140 //US ENH : changed code to run with older MOC 140 //US ENH : changed code to run with older MOC
141 141
142 void addPwd_slot(); 142 void addPwd_slot();
143 void addPwd_slot1(QString *pw, PwMDoc *_doc); 143 void addPwd_slot1(QString *pw, PwMDoc *_doc);
144 /** manage/edit triggered */ 144 /** manage/edit triggered */
145 //US ENH : changed code to run with older MOC 145 //US ENH : changed code to run with older MOC
146 void editPwd_slot(); 146 void editPwd_slot();
147 void editPwd_slot1(const QString *category); 147 void editPwd_slot1(const QString *category);
148 void editPwd_slot3(const QString *category, const int *index ,PwMDoc *_doc ); 148 void editPwd_slot3(const QString *category, const int *index ,PwMDoc *_doc );
149 149
150 /** manage/delete triggered */ 150 /** manage/delete triggered */
151 void deletePwd_slot(); 151 void deletePwd_slot();
152 /** execute the "Launcher" entry */ 152 /** execute the "Launcher" entry */
153 void execLauncher_slot(); 153 void execLauncher_slot();
154 /** open browser with URL entry */ 154 /** open browser with URL entry */
155 void goToURL_slot(); 155 void goToURL_slot();
156 /** manage/changeMasterPwd triggered */ 156 /** manage/changeMasterPwd triggered */
157 void changeMasterPwd_slot(); 157 void changeMasterPwd_slot();
158 /** lock current document */ 158 /** lock current document */
159 void lockWnd_slot(); 159 void lockWnd_slot();
160 /** deeplock current document */ 160 /** deeplock current document */
161 void deepLockWnd_slot(); 161 void deepLockWnd_slot();
162 /** window/unlock triggered */ 162 /** window/unlock triggered */
163 void unlockWnd_slot(); 163 void unlockWnd_slot();
164 /** find item */ 164 /** find item */
165 void find_slot(); 165 void find_slot();
166 /** configure clicked */ 166 /** configure clicked */
167 void config_slot(); 167 void config_slot();
168 void config_global_slot();
168 /** (de)activate the "change master pw" button in the menu-bar */ 169 /** (de)activate the "change master pw" button in the menu-bar */
169 void activateMpButton(bool activate = true); 170 void activateMpButton(bool activate = true);
170 /** generate a new chipcard */ 171 /** generate a new chipcard */
171 void genNewCard_slot(); 172 void genNewCard_slot();
172 /** completely erase the current card */ 173 /** completely erase the current card */
173 void eraseCard_slot(); 174 void eraseCard_slot();
174 /** returns the ID number of the current card */ 175 /** returns the ID number of the current card */
175 void readCardId_slot(); 176 void readCardId_slot();
176 /** make backup image of the current card */ 177 /** make backup image of the current card */
177 void makeCardBackup_slot(); 178 void makeCardBackup_slot();
178 /** write backup image to current card */ 179 /** write backup image to current card */
179 void replayCardBackup_slot(); 180 void replayCardBackup_slot();
180 181
181#ifdef PWM_EMBEDDED 182#ifdef PWM_EMBEDDED
182 void category_slot(); 183 void category_slot();
183 void whatsnew_slot(); 184 void whatsnew_slot();
184 void showLicense_slot(); 185 void showLicense_slot();
185 void faq_slot(); 186 void faq_slot();
186 void createAboutData_slot(); 187 void createAboutData_slot();
187 void syncHowTo_slot(); 188 void syncHowTo_slot();
188#endif 189#endif
189 190
190protected: 191protected:
191 /** is this window virgin? */ 192 /** is this window virgin? */
192 bool isVirgin() 193 bool isVirgin()
193 { return virgin; } 194 { return virgin; }
194 /** add/remove virginity */ 195 /** add/remove virginity */
195 void setVirgin(bool v); 196 void setVirgin(bool v);
196 /** initialize the menubar */ 197 /** initialize the menubar */
197 void initMenubar(); 198 void initMenubar();
198 /** initialize the toolbar */ 199 /** initialize the toolbar */
199 void initToolbar(); 200 void initToolbar();
200 /** initialize the window-metrics */ 201 /** initialize the window-metrics */
201 void initMetrics(); 202 void initMetrics();
202 /** close-event */ 203 /** close-event */
203 void closeEvent(QCloseEvent *e); 204 void closeEvent(QCloseEvent *e);
204 /** creates a new PwM-ListView and returns it */ 205 /** creates a new PwM-ListView and returns it */
205 PwMView * makeNewListView(PwMDoc *doc); 206 PwMView * makeNewListView(PwMDoc *doc);
206 /** Window hide-event */ 207 /** Window hide-event */
207 void hideEvent(QHideEvent *); 208 void hideEvent(QHideEvent *);
208 /** is this window minimized? */ 209 /** is this window minimized? */
209 bool isMinimized() 210 bool isMinimized()
210 { 211 {
211#ifndef PWM_EMBEDDED 212#ifndef PWM_EMBEDDED
212 #if KDE_VERSION >= KDE_MAKE_VERSION(3, 2, 0) 213 #if KDE_VERSION >= KDE_MAKE_VERSION(3, 2, 0)
213 return KWin::windowInfo(winId()).isMinimized(); 214 return KWin::windowInfo(winId()).isMinimized();
214 #else // KDE_VERSION 215 #else // KDE_VERSION
215 return KWin::info(winId()).isIconified(); 216 return KWin::info(winId()).isIconified();
216 #endif // KDE_VERSION 217 #endif // KDE_VERSION
217#else 218#else
218 return false; 219 return false;
219#endif 220#endif
220 } 221 }
221 /** window got the focus */ 222 /** window got the focus */
222 void focusInEvent(QFocusEvent *e); 223 void focusInEvent(QFocusEvent *e);
223 /** update the caption string */ 224 /** update the caption string */
224 void updateCaption(); 225 void updateCaption();
225#ifdef CONFIG_KWALLETIF 226#ifdef CONFIG_KWALLETIF
226 /** check if kwalletemu is enabled and ask the user what to do */ 227 /** check if kwalletemu is enabled and ask the user what to do */
227 bool checkAndAskForKWalletEmu(); 228 bool checkAndAskForKWalletEmu();
228#endif // CONFIG_KWALLETIF 229#endif // CONFIG_KWALLETIF
229 230
230protected slots: 231protected slots:
231 /** doc got closed */ 232 /** doc got closed */
232 void docClosed(PwMDoc *doc); 233 void docClosed(PwMDoc *doc);
233 234
234signals: 235signals:
235 /** window got closed (by user or someone else) */ 236 /** window got closed (by user or someone else) */
236 void closed(PwM *wnd); 237 void closed(PwM *wnd);
237 /** window got the focus (was brought to foreground) */ 238 /** window got the focus (was brought to foreground) */
238 void gotFocus(PwM *wnd); 239 void gotFocus(PwM *wnd);
239 /** window lost the focus */ 240 /** window lost the focus */
240 void lostFocus(PwM *wnd); 241 void lostFocus(PwM *wnd);
241 242
242protected: 243protected:
243 /** pointer to the view active in this KMainWindow */ 244 /** pointer to the view active in this KMainWindow */
244 PwMView *view; 245 PwMView *view;
245 /** pointer to the init class */ 246 /** pointer to the init class */
246 PwMInit *init; 247 PwMInit *init;
247 /** has this window already lost its virginity? 248 /** has this window already lost its virginity?
248 * Means is there an open working document 249 * Means is there an open working document
249 */ 250 */
250 bool virgin; 251 bool virgin;
251 /** "file" popup-menu */ 252 /** "file" popup-menu */
252 KPopupMenu *filePopup; 253 KPopupMenu *filePopup;
253 254
254 /** "manage" popup-menu */ 255 /** "manage" popup-menu */
255 KPopupMenu *managePopup; 256 KPopupMenu *managePopup;
256#ifdef CONFIG_KEYCARD 257#ifdef CONFIG_KEYCARD
257 /** "chipcard" popup-menu */ 258 /** "chipcard" popup-menu */
258 KPopupMenu *chipcardPopup; 259 KPopupMenu *chipcardPopup;
259#endif // CONFIG_KEYCARD 260#endif // CONFIG_KEYCARD
260 /** "view" popup-menu */ 261 /** "view" popup-menu */
261 KPopupMenu *viewPopup; 262 KPopupMenu *viewPopup;
262 /** "options" popup-menu */ 263 /** "options" popup-menu */
263 KPopupMenu *optionsPopup; 264 KPopupMenu *optionsPopup;
264 /** "help" popup-menu */ 265 /** "help" popup-menu */
265 KPopupMenu *helpPopup; 266 KPopupMenu *helpPopup;
266 /** "export" popup-menu */ 267 /** "export" popup-menu */
267 KPopupMenu *exportPopup; 268 KPopupMenu *exportPopup;
268 /** "import" popup-menu */ 269 /** "import" popup-menu */
269 KPopupMenu *importPopup; 270 KPopupMenu *importPopup;
270 /** force quit this window? */ 271 /** force quit this window? */
271 bool forceQuit; 272 bool forceQuit;
272 /** force minimize this window to the tray */ 273 /** force minimize this window to the tray */
273 bool forceMinimizeToTray; 274 bool forceMinimizeToTray;
274 275
275 276
276 277
277 278
278 private: 279 private:
279#ifdef PWM_EMBEDDED 280#ifdef PWM_EMBEDDED
280 //this are the overwritten callbackmethods from the syncinterface 281 //this are the overwritten callbackmethods from the syncinterface
281 virtual bool sync(KSyncManager* manager, QString filename, int mode); 282 virtual bool sync(KSyncManager* manager, QString filename, int mode);
282 virtual void removeSyncInfo( QString syncProfile); 283 virtual void removeSyncInfo( QString syncProfile);
283 284
284 // LR ******************************* 285 // LR *******************************
285 // sync stuff! 286 // sync stuff!
286 QPopupMenu *syncPopup; 287 QPopupMenu *syncPopup;
287 KSyncManager* syncManager; 288 KSyncManager* syncManager;
288#endif 289#endif
289 290
290 291
291 292
292 293
293 294
294 295
295 296
296 297
297}; 298};
298 299
299#endif 300#endif