summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt4
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--kaddressbook/addresseeeditorwidget.cpp6
-rw-r--r--kaddressbook/kabcore.cpp5
-rw-r--r--kaddressbook/kabcore.h1
-rw-r--r--korganizer/mainwindow.cpp23
-rw-r--r--korganizer/mainwindow.h1
-rw-r--r--libkdepim/externalapphandler.cpp12
-rw-r--r--libkdepim/externalapphandler.h1
-rw-r--r--libkdepim/ksyncmanager.cpp18
11 files changed, 55 insertions, 23 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 54376a0..10778ac 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,178 +1,183 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.1.11 ************ 3********** VERSION 2.1.11 ************
4 4
5KO/Pi: 5KO/Pi:
6Because we can have many calendars now in KO/Pi we can have more than one journal entry per day. 6Because we can have many calendars now in KO/Pi we can have more than one journal entry per day.
7Added features to handle (and add ) more than one journal entry per day. 7Added features to handle (and add ) more than one journal entry per day.
8Added option for a journal title. 8Added option for a journal title.
9 9
10Added info about the calendar, the item belongs to, to the event/todo/journal viewer. 10Added info about the calendar, the item belongs to, to the event/todo/journal viewer.
11 11
12
13Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet.
14
15Added KA/Pi multi sync to the multi sync called from the alarm applet.
16
12********** VERSION 2.1.10 ************ 17********** VERSION 2.1.10 ************
13 18
14KO/Pi: 19KO/Pi:
15Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file. 20Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file.
16When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted. 21When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted.
17Fixed a bug in searching for a small timerange, i.e. one day. 22Fixed a bug in searching for a small timerange, i.e. one day.
18 23
19KA/Pi: 24KA/Pi:
20Fixed two problems in csv export. 25Fixed two problems in csv export.
21Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi. 26Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi.
22 27
23********** VERSION 2.1.9 ************ 28********** VERSION 2.1.9 ************
24 29
25KO/Pi: 30KO/Pi:
26Fixed some problems of the new search options in the search dialog. 31Fixed some problems of the new search options in the search dialog.
27Fixed some problems in the new resource config options. 32Fixed some problems in the new resource config options.
28Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page. 33Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page.
29Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown: 34Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown:
30Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup. 35Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup.
31 36
32Fixed a problem in recurrence range in syncing with DTM. 37Fixed a problem in recurrence range in syncing with DTM.
33 38
34KA/Pi: 39KA/Pi:
35Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...) 40Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...)
36 41
37PwM/Pi: 42PwM/Pi:
38Added "sec" to the timeout config settings to make it clear the timeout values are seconds. 43Added "sec" to the timeout config settings to make it clear the timeout values are seconds.
39 44
40********** VERSION 2.1.8 ************ 45********** VERSION 2.1.8 ************
41 46
42KO/Pi: 47KO/Pi:
43Added info about the completion state of a todo in the ListView/Searchdialog. 48Added info about the completion state of a todo in the ListView/Searchdialog.
44If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well. 49If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well.
45Fixed some updating problems when changing the filter. 50Fixed some updating problems when changing the filter.
46 51
47KA/Pi: 52KA/Pi:
48In the addressee selection dialog now the formatted name is shown, if not empty. 53In the addressee selection dialog now the formatted name is shown, if not empty.
49Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category. 54Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category.
50Now in the addressee selection dialog a selected contact is remove with a single click from the selected list. 55Now in the addressee selection dialog a selected contact is remove with a single click from the selected list.
51 56
52Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored. 57Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored.
53Fixed the sorting for size in the file selector on the Z. 58Fixed the sorting for size in the file selector on the Z.
54 59
55Changed the color selection dialog on the Zaurus to a more user friendly version. 60Changed the color selection dialog on the Zaurus to a more user friendly version.
56 61
57********** VERSION 2.1.7 ************ 62********** VERSION 2.1.7 ************
58 63
59KO/Pi: 64KO/Pi:
60Fixed several problems in the new Resource handling. 65Fixed several problems in the new Resource handling.
61Added more options to the search dialog. 66Added more options to the search dialog.
62Fixed a problem in the Month view. 67Fixed a problem in the Month view.
63Added more options to the dialog when setting a todo to stopped. 68Added more options to the dialog when setting a todo to stopped.
64 69
65Fixed two small problems in KO/Pi Alarm applet. 70Fixed two small problems in KO/Pi Alarm applet.
66 71
67********** VERSION 2.1.6 ************ 72********** VERSION 2.1.6 ************
68 73
69This release is for testing only. 74This release is for testing only.
70 75
71KO/Pi: 76KO/Pi:
72Added to the list view (the list view is used in search dialog as well) the possibility to print it. 77Added to the list view (the list view is used in search dialog as well) the possibility to print it.
73Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view. 78Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
74Added to the list view the possibility to add all subtodos of selected todos to an export/beam. 79Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
75Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout. 80Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
76Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus. 81Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus.
77Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly. 82Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly.
78 83
79Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars. 84Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars.
80In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later. 85In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later.
81Now on every sync the set of calendars is synced which are enabled in the resource view. 86Now on every sync the set of calendars is synced which are enabled in the resource view.
82 87
83A calendar is enabled in the resource view if the "eye" column is checked. 88A calendar is enabled in the resource view if the "eye" column is checked.
84You can set a calendar to be the default for new items( "+" column ). 89You can set a calendar to be the default for new items( "+" column ).
85You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly. 90You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly.
86To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ... 91To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ...
87 92
88 93
89********** VERSION 2.1.5 ************ 94********** VERSION 2.1.5 ************
90 95
91This is the new stable version. 96This is the new stable version.
92Bugfix: 97Bugfix:
93Fixed a problem with agenda popup on the desktop in KO/Pi. 98Fixed a problem with agenda popup on the desktop in KO/Pi.
94Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. 99Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
95Added config option to not display completed todos in agenda view. 100Added config option to not display completed todos in agenda view.
96Addressee view is now using the formatted name, if defined. 101Addressee view is now using the formatted name, if defined.
97That makes it possible to display "lastname, firstname" in that view now. 102That makes it possible to display "lastname, firstname" in that view now.
98To set the formatted name for all contacts, please use menu: 103To set the formatted name for all contacts, please use menu:
99Edit->Change->Set formatted name. 104Edit->Change->Set formatted name.
100Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. 105Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
101 106
102********** VERSION 2.1.4 ************ 107********** VERSION 2.1.4 ************
103 108
104Fixed two more bugs in the KA/Pi CSV import dialog: 109Fixed two more bugs in the KA/Pi CSV import dialog:
105Made it possible to read multi-line fields and import it to the "Note" field. 110Made it possible to read multi-line fields and import it to the "Note" field.
106Fixed a problem in mapping custom fields, whatever a custem field is... 111Fixed a problem in mapping custom fields, whatever a custem field is...
107 112
108********** VERSION 2.1.3 ************ 113********** VERSION 2.1.3 ************
109 114
110Changed the menu structure of the alarm applet: 115Changed the menu structure of the alarm applet:
111Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". 116Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
112 117
113Fixed several problems in the KA/Pi CSV import dialog: 118Fixed several problems in the KA/Pi CSV import dialog:
114Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. 119Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
115 120
116 121
117********** VERSION 2.1.2 ************ 122********** VERSION 2.1.2 ************
118 123
119Fixed a problem closing the alarm dialog on Zaurus with "OK" button. 124Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
120 125
121Fixed a problem when importing data from Outlook with mutiple categories set. 126Fixed a problem when importing data from Outlook with mutiple categories set.
122 127
123Changed display of days in datenavigator: 128Changed display of days in datenavigator:
124Birthdays are now blue, not dark green. 129Birthdays are now blue, not dark green.
125When todo view is shown, no birtdays are shown and days with due todos are shown blue. 130When todo view is shown, no birtdays are shown and days with due todos are shown blue.
126When journal view is shown, only holidays are shown and days with journals are blue. 131When journal view is shown, only holidays are shown and days with journals are blue.
127 132
128Added Backup options to global config: 133Added Backup options to global config:
129You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ). 134You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ).
130It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again. 135It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again.
131The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups. 136The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups.
132 137
133********** VERSION 2.1.1 ************ 138********** VERSION 2.1.1 ************
134 139
135Stable release 2.1.1! 140Stable release 2.1.1!
136 141
137KO/Pi: 142KO/Pi:
138Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. 143Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
139 144
140********** VERSION 2.1.0 ************ 145********** VERSION 2.1.0 ************
141 146
142Stable release 2.1.0! 147Stable release 2.1.0!
143 148
144Summary of changes/fixes compared to version 2.0.6: 149Summary of changes/fixes compared to version 2.0.6:
145 150
146Many bugs of version 2.0.6 fixed. 151Many bugs of version 2.0.6 fixed.
147Most of them were small bugs, but some of them were important. 152Most of them were small bugs, but some of them were important.
148It is recommended to use version 2.1.0 and not version 2.0.6. 153It is recommended to use version 2.1.0 and not version 2.0.6.
149 154
150Important changes: 155Important changes:
151 156
152Added recurring todos to KO/Pi. 157Added recurring todos to KO/Pi.
153 158
154Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. 159Added global application font settings (for all KDE-Pim/Pi apps) to the general settings.
155 160
156Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 161Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
157 162
158Datenavigator can now display many months. Very useful on the desktop. 163Datenavigator can now display many months. Very useful on the desktop.
159 164
160KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. 165KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements.
161 166
162Made alarm sound working on Linux desktop. 167Made alarm sound working on Linux desktop.
163 168
164Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. 169Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details.
165 170
166Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. 171Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details.
167 172
168Many other usebility enhancements. 173Many other usebility enhancements.
169Special thanks to Ben for his suggestions! 174Special thanks to Ben for his suggestions!
170 175
171You can find the complete changelog 176You can find the complete changelog
172from version 1.7.7 to 2.1.0 177from version 1.7.7 to 2.1.0
173in the source package or on 178in the source package or on
174 179
175http://www.pi-sync.net/html/changelog.html 180http://www.pi-sync.net/html/changelog.html
176 181
177 182
178 183
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index 515161f..c18a241 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -1,793 +1,793 @@
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 selektiert für Multi-Sync" },
266{ "KDE-Pim sync config","KDE-Pim Sync Konfig" }, 266{ "KDE-Pim sync config","KDE-Pim Sync Konfig" },
267{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein, z.B.:\n" }, 267{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein, z.B.:\n" },
268{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Modell\nautomatisch\erkannt\nwerden kann)\nOder füge Model Name ein:\n" }, 268{ "Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n","Empfohlen: Leer lassen!\n(So dass das Modell\nautomatisch\erkannt\nwerden kann)\nOder füge Model Name ein:\n" },
269{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 269{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
270{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 270{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
271{ "Edit Address Book Filters","Editiere Addressbuch Filter" }, 271{ "Edit Address Book Filters","Editiere Addressbuch Filter" },
272{ "&Add...","Hinzufügen..." }, 272{ "&Add...","Hinzufügen..." },
273{ "&Edit...","B&earbeiten..." }, 273{ "&Edit...","B&earbeiten..." },
274{ "&Remove","Entfe&rne" }, 274{ "&Remove","Entfe&rne" },
275{ "Modify View: ","Ansicht ändern: " }, 275{ "Modify View: ","Ansicht ändern: " },
276{ "Fields","Felder" }, 276{ "Fields","Felder" },
277{ "Select Fields to Display","Wähle anzuzeigende Felder" }, 277{ "Select Fields to Display","Wähle anzuzeigende Felder" },
278{ "All","Alles" }, 278{ "All","Alles" },
279{ "Frequent","Frequent" }, 279{ "Frequent","Frequent" },
280{ "Address","Adresse" }, 280{ "Address","Adresse" },
281{ "Email","E-Mail" }, 281{ "Email","E-Mail" },
282{ "Personal","Persönl." }, 282{ "Personal","Persönl." },
283{ "Organization","Organisation" }, 283{ "Organization","Organisation" },
284{ "Custom","Benutzerdefiniert" }, 284{ "Custom","Benutzerdefiniert" },
285{ "&Selected\nfields:","&Selektierte\nFelder:" }, 285{ "&Selected\nfields:","&Selektierte\nFelder:" },
286{ "Formatted Name","Format. Name" }, 286{ "Formatted Name","Format. Name" },
287{ "Additional Names","Mittelname" }, 287{ "Additional Names","Mittelname" },
288{ "Honorific Prefixes","Namensprefix" }, 288{ "Honorific Prefixes","Namensprefix" },
289{ "Honorific Suffixes","Namenssuffix" }, 289{ "Honorific Suffixes","Namenssuffix" },
290{ "Nick Name","Spitzname" }, 290{ "Nick Name","Spitzname" },
291{ "Birthday","Geburtstag" }, 291{ "Birthday","Geburtstag" },
292{ "Home Address Street","Privat Adresse Strasse" }, 292{ "Home Address Street","Privat Adresse Strasse" },
293{ "Home Address Locality","Privat Adresse Stadt" }, 293{ "Home Address Locality","Privat Adresse Stadt" },
294{ "Home Address Region","Privat Adresse Bundesland" }, 294{ "Home Address Region","Privat Adresse Bundesland" },
295{ "Home Address Postal Code","Privat Adresse PLZ" }, 295{ "Home Address Postal Code","Privat Adresse PLZ" },
296{ "Home Address Country","Privat Adresse Land" }, 296{ "Home Address Country","Privat Adresse Land" },
297{ "Home Address Label","Privat Adresse Label" }, 297{ "Home Address Label","Privat Adresse Label" },
298{ "Business Address Street","Büro Adresse Strasse" }, 298{ "Business Address Street","Büro Adresse Strasse" },
299{ "Business Address Locality","Büro Adresse Stadt" }, 299{ "Business Address Locality","Büro Adresse Stadt" },
300{ "Business Address Region","Büro Adresse Bundesland" }, 300{ "Business Address Region","Büro Adresse Bundesland" },
301{ "Business Address Postal Code","Büro Adresse PLZ" }, 301{ "Business Address Postal Code","Büro Adresse PLZ" },
302{ "Business Address Country","Büro Adresse Land" }, 302{ "Business Address Country","Büro Adresse Land" },
303{ "Business Address Label","Büro Adresse Label" }, 303{ "Business Address Label","Büro Adresse Label" },
304{ "Home Phone","Privat Telefon" }, 304{ "Home Phone","Privat Telefon" },
305{ "Business Phone","Büro Telefon" }, 305{ "Business Phone","Büro Telefon" },
306{ "Mobile Phone","Handy" }, 306{ "Mobile Phone","Handy" },
307{ "Home Fax","Privat Fax" }, 307{ "Home Fax","Privat Fax" },
308{ "Business Fax","Büro Fax" }, 308{ "Business Fax","Büro Fax" },
309{ "Car Phone","Autotelefon" }, 309{ "Car Phone","Autotelefon" },
310{ "ISDN","ISDN" }, 310{ "ISDN","ISDN" },
311{ "Pager","Pager" }, 311{ "Pager","Pager" },
312{ "Mail Client","Mail Klient" }, 312{ "Mail Client","Mail Klient" },
313{ "Title","Titel" }, 313{ "Title","Titel" },
314{ "Role","Rolle" }, 314{ "Role","Rolle" },
315{ "Note","Notiz" }, 315{ "Note","Notiz" },
316{ "URL","URL" }, 316{ "URL","URL" },
317{ "Resource","Resource" }, 317{ "Resource","Resource" },
318{ "SIP","SIP" }, 318{ "SIP","SIP" },
319{ "Default Filter","Default Filter" }, 319{ "Default Filter","Default Filter" },
320{ "The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime.","#The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime." }, 320{ "The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime.","#The default filter will be activated whenever this view is displayed. This feature allows you to configure views that only interact with certain types of information based on the filter. Once the view is activated, the filter can be changed at anytime." },
321{ "No default filter","Kein default Filter" }, 321{ "No default filter","Kein default Filter" },
322{ "Use last active filter","Nutze letzen aktiven Filter" }, 322{ "Use last active filter","Nutze letzen aktiven Filter" },
323{ "Use filter:","Nutze Filter:" }, 323{ "Use filter:","Nutze Filter:" },
324{ "Look & Feel","Look & Feel" }, 324{ "Look & Feel","Look & Feel" },
325{ "Row Separator","Reihen Separator" }, 325{ "Row Separator","Reihen Separator" },
326{ "Alternating backgrounds","Abwechselnder Hintergrund" }, 326{ "Alternating backgrounds","Abwechselnder Hintergrund" },
327{ "Single line","Einzelne Zeile" }, 327{ "Single line","Einzelne Zeile" },
328{ "Enable background image:","Hintergrundbild:" }, 328{ "Enable background image:","Hintergrundbild:" },
329{ "Enable contact tooltips","Contact Tooltips" }, 329{ "Enable contact tooltips","Contact Tooltips" },
330{ "&Enable custom Colors","Benutzerdef. Farben" }, 330{ "&Enable custom Colors","Benutzerdef. Farben" },
331{ "&Colors","Farben" }, 331{ "&Colors","Farben" },
332{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." }, 332{ "If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used.","#If custom colors are enabled, you may choose the colors for the view below. Otherwise colors from your current KDE color scheme are used." },
333{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." }, 333{ "Double click or press RETURN on a item to select a color for the related strings in the view.","#Double click or press RETURN on a item to select a color for the related strings in the view." },
334{ "&Enable custom fonts","B&enutzerdefinierte Schriften" }, 334{ "&Enable custom fonts","B&enutzerdefinierte Schriften" },
335{ "&Text font:","Textschriftart:" }, 335{ "&Text font:","Textschriftart:" },
336{ "&Header font:","Titelschriftart:" }, 336{ "&Header font:","Titelschriftart:" },
337{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." }, 337{ "If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data.","#If custom fonts are enabled, you may choose which fonts to use for this view below. Otherwise the default KDE font will be used, in bold style for the header and normal style for the data." },
338{ "&Fonts","Schri&ften" }, 338{ "&Fonts","Schri&ften" },
339{ "Background Color","Hintergrundfarbe" }, 339{ "Background Color","Hintergrundfarbe" },
340{ "Text Color","Textfarbe" }, 340{ "Text Color","Textfarbe" },
341{ "Header Background Color","Titel Hintergrundfarbe" }, 341{ "Header Background Color","Titel Hintergrundfarbe" },
342{ "Header Text Color","Titel Farbe" }, 342{ "Header Text Color","Titel Farbe" },
343{ "Highlight Color","Auswahlfarbe" }, 343{ "Highlight Color","Auswahlfarbe" },
344{ "Highlighted Text Color","Auswahltextfarbe" }, 344{ "Highlighted Text Color","Auswahltextfarbe" },
345{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" }, 345{ "Alternating Background Color","Abwechselnder Hintergrundfarbe" },
346{ "Postal","Post" }, 346{ "Postal","Post" },
347{ "Dr.","Dr." }, 347{ "Dr.","Dr." },
348{ "Miss","Frl." }, 348{ "Miss","Frl." },
349{ "Mr.","Herr" }, 349{ "Mr.","Herr" },
350{ "Mrs.","Frau" }, 350{ "Mrs.","Frau" },
351{ "Ms.","Fr." }, 351{ "Ms.","Fr." },
352{ "Prof.","Prof." }, 352{ "Prof.","Prof." },
353{ "I","I" }, 353{ "I","I" },
354{ "II","II" }, 354{ "II","II" },
355{ "III","III" }, 355{ "III","III" },
356{ "Jr.","Jr." }, 356{ "Jr.","Jr." },
357{ "Sr.","Sr." }, 357{ "Sr.","Sr." },
358{ "Name:","Name:" }, 358{ "Name:","Name:" },
359{ "Documents","Dokumente" }, 359{ "Documents","Dokumente" },
360{ "Files","Dateien" }, 360{ "Files","Dateien" },
361{ "All Files","Alle Dateien" }, 361{ "All Files","Alle Dateien" },
362{ "Name","Name" }, 362{ "Name","Name" },
363{ "Size","Größe" }, 363{ "Size","Größe" },
364{ "Date","Datum" }, 364{ "Date","Datum" },
365{ "Mime Type","Mime Typ" }, 365{ "Mime Type","Mime Typ" },
366{ "Geo Data Input","Geo Dateneingabe" }, 366{ "Geo Data Input","Geo Dateneingabe" },
367{ "Sexagesimal","Sexagesimal" }, 367{ "Sexagesimal","Sexagesimal" },
368{ "North","Nord" }, 368{ "North","Nord" },
369{ "South","Süd" }, 369{ "South","Süd" },
370{ "East","Ost" }, 370{ "East","Ost" },
371{ "West","West" }, 371{ "West","West" },
372{ "Undefined","Unbestimmt" }, 372{ "Undefined","Unbestimmt" },
373{ "Edit Address","Bearbeite Adresse" }, 373{ "Edit Address","Bearbeite Adresse" },
374{ "Street:","Strasse:" }, 374{ "Street:","Strasse:" },
375{ "Post office box:","Postfach:" }, 375{ "Post office box:","Postfach:" },
376{ "Locality:","Stadt:" }, 376{ "Locality:","Stadt:" },
377{ "Region:","Region:" }, 377{ "Region:","Region:" },
378{ "Postal code:","PLZ:" }, 378{ "Postal code:","PLZ:" },
379{ "Country:","Staat:" }, 379{ "Country:","Staat:" },
380{ "This is the preferred address","Dies ist die bevorzugte Adresse" }, 380{ "This is the preferred address","Dies ist die bevorzugte Adresse" },
381{ "New...","Neu..." }, 381{ "New...","Neu..." },
382{ "Change Type","Ändere Art" }, 382{ "Change Type","Ändere Art" },
383{ "Edit Address Type","Ändere Address Art" }, 383{ "Edit Address Type","Ändere Address Art" },
384{ "Address Types","Address Art" }, 384{ "Address Types","Address Art" },
385{ "Domestic","Inland" }, 385{ "Domestic","Inland" },
386{ "International","International" }, 386{ "International","International" },
387{ "Parcel","Paket" }, 387{ "Parcel","Paket" },
388{ "Edit Contact Name","Ändere Kontakt Name" }, 388{ "Edit Contact Name","Ändere Kontakt Name" },
389{ "Honorific prefixes:","Namensprefixes:" }, 389{ "Honorific prefixes:","Namensprefixes:" },
390{ "Given name:","Vorname:" }, 390{ "Given name:","Vorname:" },
391{ "Additional names:","Mittelnamen:" }, 391{ "Additional names:","Mittelnamen:" },
392{ "Family names:","Nachname:" }, 392{ "Family names:","Nachname:" },
393{ "Honorific suffixes:","Namenssuffixe:" }, 393{ "Honorific suffixes:","Namenssuffixe:" },
394{ "Parse name automatically","Setze Namen automatisch" }, 394{ "Parse name automatically","Setze Namen automatisch" },
395{ "Edit Phone Numbers","Bearbeite Telefonnummern" }, 395{ "Edit Phone Numbers","Bearbeite Telefonnummern" },
396{ "Number","Nummer" }, 396{ "Number","Nummer" },
397{ "Type","Typ" }, 397{ "Type","Typ" },
398{ "Edit Phone Number","Bearbeite Telefonnummer" }, 398{ "Edit Phone Number","Bearbeite Telefonnummer" },
399{ "Number:","Nummer:" }, 399{ "Number:","Nummer:" },
400{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" }, 400{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" },
401{ "Types","Typen" }, 401{ "Types","Typen" },
402{ "Messenger","Messenger" }, 402{ "Messenger","Messenger" },
403{ "Other","Anderes" }, 403{ "Other","Anderes" },
404{ "Video","Video" }, 404{ "Video","Video" },
405{ "Mailbox","Mailbox" }, 405{ "Mailbox","Mailbox" },
406{ "Modem","Modem" }, 406{ "Modem","Modem" },
407{ "Car","Auto" }, 407{ "Car","Auto" },
408{ "PCS","PCS" }, 408{ "PCS","PCS" },
409{ "Category","Kategorie" }, 409{ "Category","Kategorie" },
410{ "Select Categories","Wähle Kategorien" }, 410{ "Select Categories","Wähle Kategorien" },
411{ " &Deselect All "," &Deselektiere alle " }, 411{ " &Deselect All "," &Deselektiere alle " },
412{ " &Edit Categories "," B&earbeite Kategorien " }, 412{ " &Edit Categories "," B&earbeite Kategorien " },
413{ "&OK","&OK" }, 413{ "&OK","&OK" },
414{ "&Cancel","Abbre&chen" }, 414{ "&Cancel","Abbre&chen" },
415{ "Configure","Konfiguriere" }, 415{ "Configure","Konfiguriere" },
416{ "Default","Voreinstellungen" }, 416{ "Default","Voreinstellungen" },
417{ "Addressbook","Adressbuch" }, 417{ "Addressbook","Adressbuch" },
418{ "Details view font","Schriftart Detailansicht" }, 418{ "Details view font","Schriftart Detailansicht" },
419{ "phone:123","phone:123" }, 419{ "phone:123","phone:123" },
420{ "Search only after <return> key pressed","Suche nur nach <return> Taste" }, 420{ "Search only after <return> key pressed","Suche nur nach <return> Taste" },
421{ "Show edit dialog on single click","Zeige Edit Dialog bei Einzelklick" }, 421{ "Show edit dialog on single click","Zeige Edit Dialog bei Einzelklick" },
422{ "Automatic name parsing for new contacts","Automa. Name Parsen für neue Kontakte" }, 422{ "Automatic name parsing for new contacts","Automa. Name Parsen für neue Kontakte" },
423{ "Display List and Details at once (restart)","Zeige Liste und Details zusammen(neustart)" }, 423{ "Display List and Details at once (restart)","Zeige Liste und Details zusammen(neustart)" },
424{ "Show exit confirmation","Vor dem Beenden nachfragen" }, 424{ "Show exit confirmation","Vor dem Beenden nachfragen" },
425{ "General","Allgemein" }, 425{ "General","Allgemein" },
426{ "Extensions (restart)","Extensions (restart)" }, 426{ "Extensions (restart)","Extensions (restart)" },
427{ "Description","Beschreibungen" }, 427{ "Description","Beschreibungen" },
428{ "Extensions","Extensions" }, 428{ "Extensions","Extensions" },
429{ "Prefixes","Prefixe" }, 429{ "Prefixes","Prefixe" },
430{ "Inclusions","Inclusions" }, 430{ "Inclusions","Inclusions" },
431{ "Suffixes","Suffixe" }, 431{ "Suffixes","Suffixe" },
432{ "Default formatted name:","Default format. Name:" }, 432{ "Default formatted name:","Default format. Name:" },
433{ "Empty","Leer" }, 433{ "Empty","Leer" },
434{ "Simple Name","Einfacher Name" }, 434{ "Simple Name","Einfacher Name" },
435{ "Full Name","Voller Name" }, 435{ "Full Name","Voller Name" },
436{ "Reverse Name","Namen umdrehen" }, 436{ "Reverse Name","Namen umdrehen" },
437{ "Contact","Kontakt" }, 437{ "Contact","Kontakt" },
438{ "Global","Allgemein" }, 438{ "Global","Allgemein" },
439{ "Phone","Telefon" }, 439{ "Phone","Telefon" },
440{ "SMS","SMS" }, 440{ "SMS","SMS" },
441{ "Language:(needs restart)","Sprache:(Neustart)" }, 441{ "Language:(needs restart)","Sprache:(Neustart)" },
442{ "English","English" }, 442{ "English","English" },
443{ "German","Deutsch" }, 443{ "German","Deutsch" },
444{ "French","Französisch" }, 444{ "French","Französisch" },
445{ "Italian","Italienisch" }, 445{ "Italian","Italienisch" },
446{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" }, 446{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" },
447{ "Time Format(nr):","Zeit Format(nr):" }, 447{ "Time Format(nr):","Zeit Format(nr):" },
448{ "24:00","24:00" }, 448{ "24:00","24:00" },
449{ "12:00am","12:00am" }, 449{ "12:00am","12:00am" },
450{ "Week starts on Sunday","Woche beginnt Sonntags" }, 450{ "Week starts on Sunday","Woche beginnt Sonntags" },
451{ "Locale","Locale" }, 451{ "Locale","Locale" },
452{ "Date Format:","Datums Format:" }, 452{ "Date Format:","Datums Format:" },
453{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 453{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
454{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 454{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
455{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 455{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
456{ "User defined","Benutzerdefiniert" }, 456{ "User defined","Benutzerdefiniert" },
457{ "User long date:","Format langes Datum:" }, 457{ "User long date:","Format langes Datum:" },
458{ "User short date:","Format kurzes Datum:" }, 458{ "User short date:","Format kurzes Datum:" },
459{ "Daylight start:","Sommerzeit Start:" }, 459{ "Daylight start:","Sommerzeit Start:" },
460{ "Daylight end:","Sommerzeit Ende:" }, 460{ "Daylight end:","Sommerzeit Ende:" },
461{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 461{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
462{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" }, 462{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" },
463{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 463{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
464{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 464{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
465{ "Date Format","Datums Format" }, 465{ "Date Format","Datums Format" },
466{ "Timezone:","Zeitzone:" }, 466{ "Timezone:","Zeitzone:" },
467{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 467{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
468{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 468{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
469{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 469{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
470{ "Used Mail Client","Benutzter Mail Client" }, 470{ "Used Mail Client","Benutzter Mail Client" },
471{ "Channel:","Channel:" }, 471{ "Channel:","Channel:" },
472{ "Message:","Message:" }, 472{ "Message:","Message:" },
473{ "Parameters:","Parameter:" }, 473{ "Parameters:","Parameter:" },
474{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 474{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
475{ "extra Message:","extra Message:" }, 475{ "extra Message:","extra Message:" },
476{ "extra Parameters:","extra Parameter:" }, 476{ "extra Parameters:","extra Parameter:" },
477{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 477{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
478{ "External Apps.","Externe Appl." }, 478{ "External Apps.","Externe Appl." },
479{ "Used %1 Client","Benutzer %1 Client" }, 479{ "Used %1 Client","Benutzer %1 Client" },
480{ "No email client installed","Keine Email Client installiert" }, 480{ "No email client installed","Keine Email Client installiert" },
481{ "Userdefined email client","Benutzerdef. Email Client" }, 481{ "Userdefined email client","Benutzerdef. Email Client" },
482{ "OM/Pi email client","OM/Pi Email Client" }, 482{ "OM/Pi email client","OM/Pi Email Client" },
483{ "Close KA/Pi?","Schließe KA/Pi?" }, 483{ "Close KA/Pi?","Schließe KA/Pi?" },
484{ "\nChanges will be saved!","\nÄnderungen werden gespeichert!" }, 484{ "\nChanges will be saved!","\nÄnderungen werden gespeichert!" },
485{ "Yes!","Ja!" }, 485{ "Yes!","Ja!" },
486{ "There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. ","#There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. " }, 486{ "There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. ","#There was an error while attempting to save\n the address book. Please check that some \nother application is not using it. " },
487{ "Saving addressbook ... ","Speichere Adressbuch ... " }, 487{ "Saving addressbook ... ","Speichere Adressbuch ... " },
488{ "Addressbook saved!","Adressbuch gespeichert!" }, 488{ "Addressbook saved!","Adressbuch gespeichert!" },
489{ "Default Table View","Default Tabellenansicht" }, 489{ "Default Table View","Default Tabellenansicht" },
490{ "Merge and Remove","Zusammenfügen/entfernen" }, 490{ "Merge and Remove","Zusammenfügen/entfernen" },
491{ "Merge","Zusammenfügen" }, 491{ "Merge","Zusammenfügen" },
492{ "Merge Contacts Editor","Contact-Zusammenfüge-Editor" }, 492{ "Merge Contacts Editor","Contact-Zusammenfüge-Editor" },
493{ "New List...","Neue Liste..." }, 493{ "New List...","Neue Liste..." },
494{ "Rename List...","Ändere Namen..." }, 494{ "Rename List...","Ändere Namen..." },
495{ "Remove List","Lösche Liste" }, 495{ "Remove List","Lösche Liste" },
496{ "Add Contact","Kontakt hinzu" }, 496{ "Add Contact","Kontakt hinzu" },
497{ "Change Email...","Ändere Email..." }, 497{ "Change Email...","Ändere Email..." },
498{ "Remove Contact","Entferne Kontakt" }, 498{ "Remove Contact","Entferne Kontakt" },
499{ "Use Preferred","Nutze Preferred" }, 499{ "Use Preferred","Nutze Preferred" },
500{ "Distribution List Editor","Distribution List Editor" }, 500{ "Distribution List Editor","Distribution List Editor" },
501{ "Choose which contacts to export","Wähle Kontakte zum Exportieren" }, 501{ "Choose which contacts to export","Wähle Kontakte zum Exportieren" },
502{ "Which contacts do you want to export?","Welche Kontakte sollen exportiert werden?" }, 502{ "Which contacts do you want to export?","Welche Kontakte sollen exportiert werden?" },
503{ "Contact Selection","Kontaktauswahl" }, 503{ "Contact Selection","Kontaktauswahl" },
504{ "&All","&Alle" }, 504{ "&All","&Alle" },
505{ "Export the entire address book","Exportiere das komplette Addressbuch" }, 505{ "Export the entire address book","Exportiere das komplette Addressbuch" },
506{ "&Selected","Au&sgewählte" }, 506{ "&Selected","Au&sgewählte" },
507{ "Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","###Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected." }, 507{ "Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected.","###Only export contacts selected in KAddressBook.\nThis option is disabled if no contacts are selected." },
508{ "By matching &filter","Zutreffender &Filter" }, 508{ "By matching &filter","Zutreffender &Filter" },
509{ "Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","###Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters" }, 509{ "Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters","###Only export contacts matching the selected filter.\nThis option is disabled if you haven't defined any filters" },
510{ "By Cate&gories","Kategorien" }, 510{ "By Cate&gories","Kategorien" },
511{ "Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","###Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories." }, 511{ "Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories.","###Only export contacts who are members of a category that is checked on the list to the left.\nThis option is disabled if you have no categories." },
512{ "Select a filter to decide which contacts to export.","Wähle Filter zum Export aus." }, 512{ "Select a filter to decide which contacts to export.","Wähle Filter zum Export aus." },
513{ "Check the categories whose members you want to export.","Wähle die Kategorien zum Export aus." }, 513{ "Check the categories whose members you want to export.","Wähle die Kategorien zum Export aus." },
514{ "Sorting","Sortieren" }, 514{ "Sorting","Sortieren" },
515{ "Criterion:","Merkmal:" }, 515{ "Criterion:","Merkmal:" },
516{ "Order:","Reihenfolge:" }, 516{ "Order:","Reihenfolge:" },
517{ "Ascending","Aufsteigend" }, 517{ "Ascending","Aufsteigend" },
518{ "Descending","Absteigend" }, 518{ "Descending","Absteigend" },
519{ "Save file","Datei speichern" }, 519{ "Save file","Datei speichern" },
520{ "Error","Fehler" }, 520{ "Error","Fehler" },
521{ "Unable to export contacts.","Exportieren der Kontakte geht nicht." }, 521{ "Unable to export contacts.","Exportieren der Kontakte geht nicht." },
522{ "\nNo unsaved changes detected!\nNothing will be saved!","\nKeine ungespeicherten\nÄnderungen erkannt!\nNichts wird gespeichert!" }, 522{ "\nNo unsaved changes detected!\nNothing will be saved!","\nKeine ungespeicherten\nÄnderungen erkannt!\nNichts wird gespeichert!" },
523{ "Manage new categories...","Verwalte neue Kategorien..." }, 523{ "Manage new categories...","Verwalte neue Kategorien..." },
524{ "&File","Datei" }, 524{ "&File","Datei" },
525{ "&Edit","Bearbeite" }, 525{ "&Edit","Bearbeite" },
526{ "&View","Ansichten" }, 526{ "&View","Ansichten" },
527{ "&Settings","Konfiguration" }, 527{ "&Settings","Konfiguration" },
528{ "&Change selected","Ändere Selekt." }, 528{ "&Change selected","Ändere Selekt." },
529{ "&Help","Hilfe" }, 529{ "&Help","Hilfe" },
530{ "Remove sync info","Entferne Sync Info" }, 530{ "Remove sync info","Entferne Sync Info" },
531{ "For all profiles","Für alle Profile" }, 531{ "For all profiles","Für alle Profile" },
532{ "&Change","Ändere" }, 532{ "&Change","Ändere" },
533{ "Import xml (Qtopia)...","Importiere xml (Qtopia)..." }, 533{ "Import xml (Qtopia)...","Importiere xml (Qtopia)..." },
534{ "Export xml (Qtopia)...","Exportiere xml (Qtopia)..." }, 534{ "Export xml (Qtopia)...","Exportiere xml (Qtopia)..." },
535{ "Export to phone","Exportiere aufs Handy..." }, 535{ "Export to phone","Exportiere aufs Handy..." },
536{ "Which contacts do you want to select?","Welche Kontakte möchten Sie wählen?" }, 536{ "Which contacts do you want to select?","Welche Kontakte möchten Sie wählen?" },
537{ "&Modify","Ändere" }, 537{ "&Modify","Ändere" },
538{ "Choose which contacts to select","Bitte Kontakte auswählen!" }, 538{ "Choose which contacts to select","Bitte Kontakte auswählen!" },
539{ "After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nKontakten geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, 539{ "After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nKontakten geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " },
540{ "Manage new Categories","Verwalte neue Kategorien" }, 540{ "Manage new Categories","Verwalte neue Kategorien" },
541{ "Add to category list","Füge zur Kategorieliste hinzu" }, 541{ "Add to category list","Füge zur Kategorieliste hinzu" },
542{ "Remove from addressees","Entferne von den Kontakten" }, 542{ "Remove from addressees","Entferne von den Kontakten" },
543{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, 543{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" },
544{ "A&dd","Hinzufügen" }, 544{ "A&dd","Hinzufügen" },
545{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 545{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
546{ "NOTE: This will remove all old\ncontact data on phone!","ACHTUNG: Das löscht alle alten\nKontakt Daten auf dem Handy!" }, 546{ "NOTE: This will remove all old\ncontact data on phone!","ACHTUNG: Das löscht alle alten\nKontakt Daten auf dem Handy!" },
547{ "Export to mobile phone!","Exportiere auf das Handy!" }, 547{ "Export to mobile phone!","Exportiere auf das Handy!" },
548{ "Export to phone options","Export ans Handy Optionen" }, 548{ "Export to phone options","Export ans Handy Optionen" },
549{ "Writing to phone...","Sende Daten ans Handy..." }, 549{ "Writing to phone...","Sende Daten ans Handy..." },
550{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 550{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
551{ "Retry","Nochmal versuchen" }, 551{ "Retry","Nochmal versuchen" },
552{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 552{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
553{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 553{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
554{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 554{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
555{ "&Print View","Drucke Ansicht" }, 555{ "&Print View","Drucke Ansicht" },
556{ "&Print Details","Drucke Details" }, 556{ "&Print Details","Drucke Details" },
557{ "Beam v&Card(s)...","Beame v&Card(s)..." }, 557{ "Beam v&Card(s)...","Beame v&Card(s)..." },
558{ "Set formatted name...","Setze formatierten Namen..." }, 558{ "Set formatted name...","Setze formatierten Namen..." },
559{ "Kde Sync HowTo","Kde Sync HowTo" }, 559{ "Kde Sync HowTo","Kde Sync HowTo" },
560{ "Multi Sync HowTo","Multi Sync HowTo" }, 560{ "Multi Sync HowTo","Multi Sync HowTo" },
561{ "&Beam","&Beame" }, 561{ "&Beam","&Beame" },
562{ "Edit Email Addresses","Editiere Email Adressen" }, 562{ "Edit Email Addresses","Editiere Email Adressen" },
563{ "Email address:","Email Adresse:" }, 563{ "Email address:","Email Adresse:" },
564{ "Change","Ändere" }, 564{ "Change","Ändere" },
565{ "Set Standard","Setze Standard" }, 565{ "Set Standard","Setze Standard" },
566{ "New Contact","Neuer Contact" }, 566{ "New Contact","Neuer Contact" },
567{ "Undo %1","Rückgängig %1" }, 567{ "Undo %1","Rückgängig %1" },
568{ "Redo","Wiederholen" }, 568{ "Redo","Wiederholen" },
569{ "Saving ... please wait! ","Am Speichern ... bitte warten! " }, 569{ "Saving ... please wait! ","Am Speichern ... bitte warten! " },
570{ "CSV Import Dialog","CSV Import Dialog" }, 570{ "CSV Import Dialog","CSV Import Dialog" },
571{ "File to import:","Datei zum Import:" }, 571{ "File to import:","Datei zum Import:" },
572{ "Delimiter","Trennzeichen" }, 572{ "Delimiter","Trennzeichen" },
573{ "Comma","Komma" }, 573{ "Comma","Komma" },
574{ "Semicolon","Semikolon" }, 574{ "Semicolon","Semikolon" },
575{ "Tabulator","Tabulator" }, 575{ "Tabulator","Tabulator" },
576{ "Space","Leerzeichen" }, 576{ "Space","Leerzeichen" },
577{ "1","1" }, 577{ "1","1" },
578{ """,""" }, 578{ """,""" },
579{ "'","'" }, 579{ "'","'" },
580{ "Start at line:","Beginne mit Zeile:" }, 580{ "Start at line:","Beginne mit Zeile:" },
581{ "Textquote:","Textquote:" }, 581{ "Textquote:","Textquote:" },
582{ "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" }, 582{ "Ignore duplicate delimiters","Ignoriere doppelte Trennzeichen" },
583{ "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" }, 583{ "Import KDE 2 Addressbook","Importiere KDE 2 Addressbook" },
584{ "Override previously imported entries?","Überschreibe bereits importierte Einträge?" }, 584{ "Override previously imported entries?","Überschreibe bereits importierte Einträge?" },
585{ "Select vCard to Import","Selektiere zu importierende vCard" }, 585{ "Select vCard to Import","Selektiere zu importierende vCard" },
586{ "Information","Information" }, 586{ "Information","Information" },
587{ "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..." }, 775{ "&Configure KA/Pi...","Konfiguriere KA/Pi..." },
776{ "Global Settings...","Globale Einstellungen..." }, 776{ "Global Settings...","Globale Einstellungen..." },
777{ "Spouse","Ehegatte" }, 777{ "Spouse","Ehegatte" },
778{ "Notes","Notizen" }, 778{ "Notes","Notizen" },
779{ "Messanger","Messanger" }, 779{ "Messanger","Messanger" },
780{ "Assistant","Assistent" }, 780{ "Assistant","Assistent" },
781{ "Manager","Manager" }, 781{ "Manager","Manager" },
782{ "Secrecy","Sichtbar" }, 782{ "Secrecy","Sichtbar" },
783{ "male","männlich" }, 783{ "male","männlich" },
784{ "female","weiblich" }, 784{ "female","weiblich" },
785{ "Hide!","Verbergen!" }, 785{ "Hide!","Verbergen!" },
786{ "Show!","Anzeigen!" }, 786{ "Show!","Anzeigen!" },
787{ "Details","Details" }, 787{ "Details","Details" },
788{ "","" }, 788{ "","" },
789{ "","" }, 789{ "","" },
790{ "","" }, 790{ "","" },
791{ "","" }, 791{ "","" },
792{ "","" }, 792{ "","" },
793{ "","" }, \ No newline at end of file 793{ "","" }, \ No newline at end of file
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 510f4bf..792cb91 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1,1472 +1,1472 @@
1{ "10 minutes","10 Minuten" }, 1{ "10 minutes","10 Minuten" },
2{ "10th","10." }, 2{ "10th","10." },
3{ "11th","11." }, 3{ "11th","11." },
4{ "12 pm Format","12 AM/PM Format" }, 4{ "12 pm Format","12 AM/PM Format" },
5{ "12th","12." }, 5{ "12th","12." },
6{ "13th","13." }, 6{ "13th","13." },
7{ "14th","14." }, 7{ "14th","14." },
8{ "15th","15." }, 8{ "15th","15." },
9{ "16th","16." }, 9{ "16th","16." },
10{ "17th","17." }, 10{ "17th","17." },
11{ "18th","18." }, 11{ "18th","18." },
12{ "19th","19." }, 12{ "19th","19." },
13{ "1 Day","1 Tag" }, 13{ "1 Day","1 Tag" },
14{ "1 h","1 Std" }, 14{ "1 h","1 Std" },
15{ "1 (high)","1 (hoch)" }, 15{ "1 (high)","1 (hoch)" },
16{ "5 (low)","5" }, 16{ "5 (low)","5" },
17{ "1st","1." }, 17{ "1st","1." },
18{ "20th","20." }, 18{ "20th","20." },
19{ "21st","21." }, 19{ "21st","21." },
20{ "22nd","22." }, 20{ "22nd","22." },
21{ "23rd","23." }, 21{ "23rd","23." },
22{ "24:00 Hour Format","24:00 Stunden Format" }, 22{ "24:00 Hour Format","24:00 Stunden Format" },
23{ "24th","24." }, 23{ "24th","24." },
24{ "25th","25." }, 24{ "25th","25." },
25{ "26th","26." }, 25{ "26th","26." },
26{ "27th","27." }, 26{ "27th","27." },
27{ "28th","28." }, 27{ "28th","28." },
28{ "29th","29." }, 28{ "29th","29." },
29{ "2nd","2." }, 29{ "2nd","2." },
30{ "30 minutes","30 Minuten" }, 30{ "30 minutes","30 Minuten" },
31{ "30th","30." }, 31{ "30th","30." },
32{ "31st","31." }, 32{ "31st","31." },
33{ "3rd","3." }, 33{ "3rd","3." },
34{ "4th","4." }, 34{ "4th","4." },
35{ "5 (lowest)","5 (Niedrigster)" }, 35{ "5 (lowest)","5 (Niedrigster)" },
36{ "5th","5." }, 36{ "5th","5." },
37{ "6th","6." }, 37{ "6th","6." },
38{ "7th","7." }, 38{ "7th","7." },
39{ "8th","8." }, 39{ "8th","8." },
40{ "9th","9." }, 40{ "9th","9." },
41{ "About...","Über..." }, 41{ "About...","Über..." },
42{ "&Accept","&Akzeptieren" }, 42{ "&Accept","&Akzeptieren" },
43{ "Accept","Akzeptieren" }, 43{ "Accept","Akzeptieren" },
44{ "Accept A&ll","A&lles Akzepieren" }, 44{ "Accept A&ll","A&lles Akzepieren" },
45{ "Access:","Zugriff:" }, 45{ "Access:","Zugriff:" },
46{ "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" }, 46{ "A corresponding event is missing in your calendar!","Ein zugehöriger Termin fehlt in ihrem Kalender!" },
47{ "Actions","Aktionen" }, 47{ "Actions","Aktionen" },
48{ "Add Filter","Filter Hinzufügen" }, 48{ "Add Filter","Filter Hinzufügen" },
49{ "&Add","Hinzufügen" }, 49{ "&Add","Hinzufügen" },
50{ "Add","Hinzufügen" }, 50{ "Add","Hinzufügen" },
51{ "Additional email addresses:","Zusätzliche E-Mail Adressen:" }, 51{ "Additional email addresses:","Zusätzliche E-Mail Adressen:" },
52{ "Additional email address:","Zusätzliche E-Mail Adresse:" }, 52{ "Additional email address:","Zusätzliche E-Mail Adresse:" },
53{ "&Addressbook","&Adressbuch" }, 53{ "&Addressbook","&Adressbuch" },
54{ "Address &Book...","Adress&buch..." }, 54{ "Address &Book...","Adress&buch..." },
55{ "Agenda Size","Agende Größe" }, 55{ "Agenda Size","Agende Größe" },
56{ "Agenda Size:","Größe der Agenda:" }, 56{ "Agenda Size:","Größe der Agenda:" },
57{ "Agenda view:","Agenda Ansicht:" }, 57{ "Agenda view:","Agenda Ansicht:" },
58{ "Agenda view background color:","Hintergrund der Agenda Ansicht:" }, 58{ "Agenda view background color:","Hintergrund der Agenda Ansicht:" },
59{ "All attendees","Alle Teilnehmer" }, 59{ "All attendees","Alle Teilnehmer" },
60{ "AllDayAgenda Height:","Höhe Ganztages Agenda:" }, 60{ "AllDayAgenda Height:","Höhe Ganztages Agenda:" },
61{ "All day event","Ganztägig" }, 61{ "All day event","Ganztägig" },
62{ "Anonymous","Anonym" }, 62{ "Anonymous","Anonym" },
63{ "Apply","Anwenden" }, 63{ "Apply","Anwenden" },
64{ "Apr","Apr" }, 64{ "Apr","Apr" },
65{ "April","April" }, 65{ "April","April" },
66{"Ask for every entry on conflict","Frage bei Konflikten nach"}, 66{"Ask for every entry on conflict","Frage bei Konflikten nach"},
67{ "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" }, 67{ "Ask for preferences before syncing","Vor dem Syncronisieren nachfragen" },
68{ "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" }, 68{ "Ask for quit when closing KO/Pi","Vor dem Beenden von KO/Pi nachfragen" },
69{ "Attendees","Teilnehmer" }, 69{ "Attendees","Teilnehmer" },
70{ "Aug","Aug" }, 70{ "Aug","Aug" },
71{ "August","August" }, 71{ "August","August" },
72{ "Auto-Save","Automatisches Abspeichern" }, 72{ "Auto-Save","Automatisches Abspeichern" },
73{ "Auto save delay in minutes:","Verzög.autom.Speichern in Min" }, 73{ "Auto save delay in minutes:","Verzög.autom.Speichern in Min" },
74{ "Auto saving...","Automatische Sicherung..." }, 74{ "Auto saving...","Automatische Sicherung..." },
75{ "Begin on:","Starte mit:" }, 75{ "Begin on:","Starte mit:" },
76{ "Begins on: %1","Starte mit: %1" }, 76{ "Begins on: %1","Starte mit: %1" },
77{ "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" }, 77{ "<b>From:</b> %1 <b>To:</b> %2","<b>Vom:</b> %1 <b>Zum:</b> %2" },
78{ "<b>On:</b> %1","<b>Am:</b> %1" }, 78{ "<b>On:</b> %1","<b>Am:</b> %1" },
79{ "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" }, 79{ "<b>On:</b> %1 <b>From:S</b> %2 <b>To:</b> %3","<b>Am:</b> %1 <b>Vom:S</b> %2 <b>Zum:</b> %3" },
80{ "<b>Original event:</b><p>","<b>Original Termin:</b><p>" }, 80{ "<b>Original event:</b><p>","<b>Original Termin:</b><p>" },
81{ " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" }, 81{ " - both are modified after last sync"," - beide wurden nach der letzten Syncronisation verändert" },
82{ "Busy","Belegt" }, 82{ "Busy","Belegt" },
83{ "&Cancel","Abbre&chen" }, 83{ "&Cancel","Abbre&chen" },
84{ "Cancel","Abbrechen" }, 84{ "Cancel","Abbrechen" },
85{ "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" }, 85{ "Cannot delete To-Do\nwhich has children.","Kann Todo nicht löschen,\n da noch Einträge vorhanden sind" },
86{ "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." }, 86{ "Can't generate mail:\nNo event selected.","Kann e-Mail nicht erstellen:\nKein Termin ausgewählt." },
87{ "Categories...","Kategorien..." }, 87{ "Categories...","Kategorien..." },
88{ "Categories","Kategorien" }, 88{ "Categories","Kategorien" },
89{ "Category","Kategorie" }, 89{ "Category","Kategorie" },
90{ "Center View","Zentriere Ansicht" }, 90{ "Center View","Zentriere Ansicht" },
91{ "Change","Ändere" }, 91{ "Change","Ändere" },
92{ "Cinema","Kino" }, 92{ "Cinema","Kino" },
93{ "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" }, 93{ "Click to add a new Todo","Hier klicken, um ein neues Todo anzulegen" },
94{ "Clone Item","Klone Eintrag" }, 94{ "Clone Item","Klone Eintrag" },
95{ "&Close","S&chließen" }, 95{ "&Close","S&chließen" },
96{ "Close","Schließen" }, 96{ "Close","Schließen" },
97{ "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" }, 97{ "Close this dialog to abort deletion!","Zum Abbrechen des Löschvorganges Dialog schließen!" },
98{ "Colors","Farben" }, 98{ "Colors","Farben" },
99{ "completed","erledigt" }, 99{ "completed","erledigt" },
100{ "completed on %1","erledigt am %1" }, 100{ "completed on %1","erledigt am %1" },
101{ "Complete","Erledigt" }, 101{ "Complete","Erledigt" },
102{ "Confidential","Vertraulich" }, 102{ "Confidential","Vertraulich" },
103{ "Configure...","Einstellungen..." }, 103{ "Configure...","Einstellungen..." },
104{ "Confirm &deletes","Löschvogang bestätigen" }, 104{ "Confirm &deletes","Löschvogang bestätigen" },
105{ "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." }, 105{ "Couldn't load calendar\n '%1'.","Kann Kalender\n '%1' nicht laden." },
106{ "Counter-event Viewer","Terminzähler Ansicht" }, 106{ "Counter-event Viewer","Terminzähler Ansicht" },
107{ "Daily ending hour:","Feierabend:" }, 107{ "Daily ending hour:","Feierabend:" },
108{ "Daily starting hour:","Anfangszeit:" }, 108{ "Daily starting hour:","Anfangszeit:" },
109{ "Daily","Täglich" }, 109{ "Daily","Täglich" },
110{ "Date Format","Datums Format" }, 110{ "Date Format","Datums Format" },
111{ "Date Format:","Datums Format:" }, 111{ "Date Format:","Datums Format:" },
112{ "DateNavigator:(nr)","Datums Navigator" }, 112{ "DateNavigator:(nr)","Datums Navigator" },
113{ "Dates: ","Datum: " }, 113{ "Dates: ","Datum: " },
114{ "Date && Time","Datum && Zeit" }, 114{ "Date && Time","Datum && Zeit" },
115{ "Day begins at:","Der Tag beginnt um:" }, 115{ "Day begins at:","Der Tag beginnt um:" },
116{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" }, 116{ "Days in Next-X-Days:","Tage in Nächste-X-Tage:" },
117{ "Days in What's Next:","Tage in What's Next:" }, 117{ "Days in What's Next:","Tage in What's Next:" },
118{ "day(s)","Tag(e)" }, 118{ "day(s)","Tag(e)" },
119{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" }, 119{ "Days to show in Next-X-Days view:","Welche Tage in Nächste-X-Tagen anzeigen:" },
120{ "day","Tag" }, 120{ "day","Tag" },
121{ "Dec","Dez" }, 121{ "Dec","Dez" },
122{ "December","Dezember" }, 122{ "December","Dezember" },
123{ "Default alarm time:","Standard Alarmzeit:" }, 123{ "Default alarm time:","Standard Alarmzeit:" },
124{ "Default appointment time:","Standard Termin Startzeit:" }, 124{ "Default appointment time:","Standard Termin Startzeit:" },
125{ "Default event color:","Standard Terminfarbe:" }, 125{ "Default event color:","Standard Terminfarbe:" },
126{ "Default","Standard" }, 126{ "Default","Standard" },
127{ "Def. duration of new app.:","Standard Termin Länge:" }, 127{ "Def. duration of new app.:","Standard Termin Länge:" },
128{ "Delete All","Lösche alles" }, 128{ "Delete All","Lösche alles" },
129{ "Delete all selected","Lösche alle Selektierten" }, 129{ "Delete all selected","Lösche alle Selektierten" },
130{ "Delete Current","Aktuellen löschen" }, 130{ "Delete Current","Aktuellen löschen" },
131{ "Delete Event...","Lösche Termin..." }, 131{ "Delete Event...","Lösche Termin..." },
132{ "Delete Event","Lösche Termin" }, 132{ "Delete Event","Lösche Termin" },
133{ "&Delete","Löschen" }, 133{ "&Delete","Löschen" },
134{ "Delete...","Löschen..." }, 134{ "Delete...","Löschen..." },
135{ "Delete","Löschen" }, 135{ "Delete","Löschen" },
136{ "Delete Todo...","Lösche Todo..." }, 136{ "Delete Todo...","Lösche Todo..." },
137{ "Delete To-Do","Lösche Todo" }, 137{ "Delete To-Do","Lösche Todo" },
138{ "Deleting item %d ...","Lösche Eintrag %d..." }, 138{ "Deleting item %d ...","Lösche Eintrag %d..." },
139{ "Descriptions","Beschreibungen" }, 139{ "Descriptions","Beschreibungen" },
140{ "Deselect all","Deselektiere Alle" }, 140{ "Deselect all","Deselektiere Alle" },
141{ "Details","Details" }, 141{ "Details","Details" },
142{ "Dinner","Abendessen" }, 142{ "Dinner","Abendessen" },
143{ "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" }, 143{ "Do you really want\nto close KO/Pi?","Möchten Sie wirklich\nKO/PI verlassen?" },
144{ "Due Date","Fällig am" }, 144{ "Due Date","Fällig am" },
145{ "Due: ","Fällig: "}, 145{ "Due: ","Fällig: "},
146{ "Due Time","Fällig um" }, 146{ "Due Time","Fällig um" },
147{ "Due:","Fällig:"}, 147{ "Due:","Fällig:"},
148{ "Duration: ","Dauer: " }, 148{ "Duration: ","Dauer: " },
149{ "Edit...","Bearbeite..." }, 149{ "Edit...","Bearbeite..." },
150{ "Edit","Bearbeite" }, 150{ "Edit","Bearbeite" },
151{ "Edit Event...","Bearbeite Termin..." }, 151{ "Edit Event...","Bearbeite Termin..." },
152{ "Edit Event","Bearbeite Termin" }, 152{ "Edit Event","Bearbeite Termin" },
153{ "Edit exceptions","Bearbeite Ausnahmen" }, 153{ "Edit exceptions","Bearbeite Ausnahmen" },
154{ "EditorBox:","Editor Fenster:" }, 154{ "EditorBox:","Editor Fenster:" },
155{ "Edit Recurrence Range","Bearbeite Wiederholung" }, 155{ "Edit Recurrence Range","Bearbeite Wiederholung" },
156{ "Edit Todo...","Berabeite Todo..." }, 156{ "Edit Todo...","Berabeite Todo..." },
157{ "Edit To-Do","Todo bearbeiten" }, 157{ "Edit To-Do","Todo bearbeiten" },
158{ "E&mail address:","E&mail Adresse:" }, 158{ "E&mail address:","E&mail Adresse:" },
159{ "(EmptyEmail)","(KeineEmail)" }, 159{ "(EmptyEmail)","(KeineEmail)" },
160{ "(EmptyName)","(KeinName)" }, 160{ "(EmptyName)","(KeinName)" },
161{ "Enable Recurrence","Wiederholung anschalten" }, 161{ "Enable Recurrence","Wiederholung anschalten" },
162{ "End after","Endet nach"}, 162{ "End after","Endet nach"},
163{ "End by:","Endet am"}, 163{ "End by:","Endet am"},
164{ "End Date","End Datum" }, 164{ "End Date","End Datum" },
165{ "End:","Ende:" }, 165{ "End:","Ende:" },
166{ "End Time","End Zeit" }, 166{ "End Time","End Zeit" },
167{ "English","Englisch" }, 167{ "English","Englisch" },
168{ "Event","Termin" }, 168{ "Event","Termin" },
169{ "Event list","Termin Liste" }, 169{ "Event list","Termin Liste" },
170{ "Events","Termine" }, 170{ "Events","Termine" },
171{ "Event Viewer:","Termin Übersicht:" }, 171{ "Event Viewer:","Termin Übersicht:" },
172{ "every","jede" }, 172{ "every","jede" },
173{ "Exceptions...","Ausnahmen..." }, 173{ "Exceptions...","Ausnahmen..." },
174{ "Exceptions","Ausnahmen" }, 174{ "Exceptions","Ausnahmen" },
175{ "Exclude holidays","Ohne freie Tage" }, 175{ "Exclude holidays","Ohne freie Tage" },
176{ "Exclude Saturdays","Ohne Samstage" }, 176{ "Exclude Saturdays","Ohne Samstage" },
177{ "Feb","Feb" }, 177{ "Feb","Feb" },
178{ "February","Februar" }, 178{ "February","Februar" },
179{ "&Find","Suche!" }, 179{ "&Find","Suche!" },
180{ "Fonts","Schriftart" }, 180{ "Fonts","Schriftart" },
181{ "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" }, 181{ "Force take local entry always","Erzwinge:Nimm immer lokalen Eintrag" },
182{ "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"}, 182{ "Force take remote entry always","Erzwinge:Nimm immer fernen Eintrag"},
183{ "Free","Frei" }, 183{ "Free","Frei" },
184{ "Friday","Freitag" }, 184{ "Friday","Freitag" },
185{ "Fri","Fr" }, 185{ "Fri","Fr" },
186{ "From:","Vom:" }, 186{ "From:","Vom:" },
187{ "Full &name:","Vor- und &Nachname:" }, 187{ "Full &name:","Vor- und &Nachname:" },
188{ "General","Allgemein" }, 188{ "General","Allgemein" },
189{ "German","Deutsch" }, 189{ "German","Deutsch" },
190{ "Gifts","Geschenke" }, 190{ "Gifts","Geschenke" },
191{ "Go to Today","Heute anzeigen" }, 191{ "Go to Today","Heute anzeigen" },
192{ "Help","Hilfe" }, 192{ "Help","Hilfe" },
193{ "Hide Dates","Daten ausblenden" }, 193{ "Hide Dates","Daten ausblenden" },
194{ "Highlight color:","Markierungen:" }, 194{ "Highlight color:","Markierungen:" },
195{ "Holiday color:","Freie Tage:" }, 195{ "Holiday color:","Freie Tage:" },
196{ "hour(s)","Stunde(n)" }, 196{ "hour(s)","Stunde(n)" },
197{ "In %1 days: ","In %1 Tagen: " }, 197{ "In %1 days: ","In %1 Tagen: " },
198{ "Incomplete Todo:","Unerledigte Aufgaben:" }, 198{ "Incomplete Todo:","Unerledigte Aufgaben:" },
199{ "Information","Information" }, 199{ "Information","Information" },
200{ "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" }, 200{ "Invalid search expression,\ncannot perform ","Kann Suche nicht ausführen" },
201{ "Jan","Jan" }, 201{ "Jan","Jan" },
202{ "January","Januar" }, 202{ "January","Januar" },
203{ "JournalView:","Journal Ansicht:" }, 203{ "JournalView:","Journal Ansicht:" },
204{ "Journals","Journale" }, 204{ "Journals","Journale" },
205{ "Jul","Jul" }, 205{ "Jul","Jul" },
206{ "July","Juli" }, 206{ "July","Juli" },
207{ "Jump to date","Springe zum Datum" }, 207{ "Jump to date","Springe zum Datum" },
208{ "June","Juni" }, 208{ "June","Juni" },
209{ "Jun","Jun" }, 209{ "Jun","Jun" },
210{ "Key Bindings...","Tastenzuordnung..." }, 210{ "Key Bindings...","Tastenzuordnung..." },
211{ "Kids","Kinder" }, 211{ "Kids","Kinder" },
212{ "Known Problems...","Bekannte Probleme..." }, 212{ "Known Problems...","Bekannte Probleme..." },
213{ "KO/Pi Find ","KO/Pi Suchdialog " }, 213{ "KO/Pi Find ","KO/Pi Suchdialog " },
214{ "KO/Pi Find: ","KO/Pi Suchen: " }, 214{ "KO/Pi Find: ","KO/Pi Suchen: " },
215{ "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." }, 215{ "KO/Pi is starting ... "," KO/Pi startet ... \n... Zeit für eine Kaffeepause ..." },
216{ "Language:(needs restart)","Sprache (Neustart!)" }, 216{ "Language:(needs restart)","Sprache (Neustart!)" },
217{ "Language:","Sprache" }, 217{ "Language:","Sprache" },
218{ "Large","Etwas mehr" }, 218{ "Large","Etwas mehr" },
219{ "List View:","Listenansicht:" }, 219{ "List View:","Listenansicht:" },
220{ "List View","Listenansicht" }, 220{ "List View","Listenansicht" },
221{ "Load/Save","Laden/Speichern" }, 221{ "Load/Save","Laden/Speichern" },
222{ "Load Template","Lade Vorlage" }, 222{ "Load Template","Lade Vorlage" },
223{ "Locale","Localisation" }, 223{ "Locale","Localisation" },
224{ "Local temp file:","Lokale temp. Datei:" }, 224{ "Local temp file:","Lokale temp. Datei:" },
225{ "Location: ","Ort: " }, 225{ "Location: ","Ort: " },
226{ "Location:","Ort:" }, 226{ "Location:","Ort:" },
227{ "Mail client","Mail Programm" }, 227{ "Mail client","Mail Programm" },
228{ "Mail Client","Mail Programm" }, 228{ "Mail Client","Mail Programm" },
229{ "March","März" }, 229{ "March","März" },
230{ "Mar","Mär" }, 230{ "Mar","Mär" },
231{ "May","Mai" }, 231{ "May","Mai" },
232{ "M. Bains line:","M. Bains Linie:" }, 232{ "M. Bains line:","M. Bains Linie:" },
233{ "Medium","Medium" }, 233{ "Medium","Medium" },
234{ "Method","Methode" }, 234{ "Method","Methode" },
235{ "minute(s)","Minute(n)" }, 235{ "minute(s)","Minute(n)" },
236{ "Monday","Montag" }, 236{ "Monday","Montag" },
237{ "Mon","Mo" }, 237{ "Mon","Mo" },
238{ "Monthly","Monatlich" }, 238{ "Monthly","Monatlich" },
239{ "Month not long enough","Monat ist nicht lang genug" }, 239{ "Month not long enough","Monat ist nicht lang genug" },
240{ "month(s)","Monat(e)" }, 240{ "month(s)","Monat(e)" },
241{ "Month view:","Monatsansicht:" }, 241{ "Month view:","Monatsansicht:" },
242{ "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" }, 242{ "Month view uses category colors","Monatsansicht zeigt Kategorie Farben" },
243{ "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" }, 243{ "Todo view uses category colors","To-Do Ansicht zeigt Kategorie Farben" },
244{ "Move &Down","Nach unten verschieben" }, 244{ "Move &Down","Nach unten verschieben" },
245{ "Move &Up","Nach oben verschieben" }, 245{ "Move &Up","Nach oben verschieben" },
246{ "Name:","Name:" }, 246{ "Name:","Name:" },
247{ "Name","Name" }, 247{ "Name","Name" },
248{ "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" }, 248{ "\nAre you sure you want\nto delete this event?","\nSind Sie sicher, dass Sie\nden Termin löschen möchten?" },
249{ "%n Days","%n Tage" }, 249{ "%n Days","%n Tage" },
250{ "Never","Nie" }, 250{ "Never","Nie" },
251{ "New event...","Neuer Termin..." }, 251{ "New event...","Neuer Termin..." },
252{ "New event","Neuer Termin" }, 252{ "New event","Neuer Termin" },
253{ "New Event...","Neuer Termin..." }, 253{ "New Event...","Neuer Termin..." },
254{ "New Events/Todos should","Neue Termine/Todos sollten" }, 254{ "New Events/Todos should","Neue Termine/Todos sollten" },
255{ "&New","&Neu" }, 255{ "&New","&Neu" },
256{ "New","Neu", }, 256{ "New","Neu", },
257{ "New Sub-Todo...","Neues Sub-Todo..." }, 257{ "New Sub-Todo...","Neues Sub-Todo..." },
258{ "New Todo...","Neues Todo..." }, 258{ "New Todo...","Neues Todo..." },
259{ "Next Alarm: ","Nächster Alarm: ", }, 259{ "Next Alarm: ","Nächster Alarm: ", },
260{ "&Next Day","&Nächster Tag", }, 260{ "&Next Day","&Nächster Tag", },
261{ "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" }, 261{ "Next days view uses full window","Nächste-X-Tage nutzt Vollbild" },
262{ "Next month","Nächster Monat" }, 262{ "Next month","Nächster Monat" },
263{ "&Next Week","&Nächste Woche" }, 263{ "&Next Week","&Nächste Woche" },
264{ "Next year","Nächstes Jahr" }, 264{ "Next year","Nächstes Jahr" },
265{ "Next Year","Nächstes Jahr" }, 265{ "Next Year","Nächstes Jahr" },
266{ "%n h","%n Std" }, 266{ "%n h","%n Std" },
267{ "No ending date","Kein End-Datum", }, 267{ "No ending date","Kein End-Datum", },
268{ "No event, nothing to do.","Kein Termin, nichts zu tun.", }, 268{ "No event, nothing to do.","Kein Termin, nichts zu tun.", },
269{ "No event selected.","Kein Termin selektiert" }, 269{ "No event selected.","Kein Termin selektiert" },
270{ "No","Nein" }, 270{ "No","Nein" },
271{ "No program set","Kein Programm ausgewählt", }, 271{ "No program set","Kein Programm ausgewählt", },
272{ "Normal","Normal" }, 272{ "Normal","Normal" },
273{ "[No selection]","Keine Selektion", }, 273{ "[No selection]","Keine Selektion", },
274{ "No sound set","Kein Sound ausgewählt", }, 274{ "No sound set","Kein Sound ausgewählt", },
275{ "no time ","keine Zeit ", }, 275{ "no time ","keine Zeit ", },
276{ "no time","keine Zeit", }, 276{ "no time","keine Zeit", },
277{ "No Time","Keine Zeit" }, 277{ "No Time","Keine Zeit" },
278{ "November","November" }, 278{ "November","November" },
279{ "Nov","Nov", }, 279{ "Nov","Nov", },
280{ "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" }, 280{ "\nThis event recurs\nover multiple dates.\n","\nDieser Termin wiederholt sich an mehreren Tagen.\n" },
281{ "occurrence(s)","Vorkommen" }, 281{ "occurrence(s)","Vorkommen" },
282{ "October","Oktober" }, 282{ "October","Oktober" },
283{ "Oct","Okt", }, 283{ "Oct","Okt", },
284{ "O-due!","Ü-fällig! " }, 284{ "O-due!","Ü-fällig! " },
285{ "&OK","&OK" }, 285{ "&OK","&OK" },
286{ "Ok+Show!","Ok+Anzeigen" }, 286{ "Ok+Show!","Ok+Anzeigen" },
287{ "Organizer: %1","Organisator %1" }, 287{ "Organizer: %1","Organisator %1" },
288{ "Organizer","Organisator" }, 288{ "Organizer","Organisator" },
289{ "Owner: ","Besitzer: " }, 289{ "Owner: ","Besitzer: " },
290{ "Owner:","Besitzer:" }, 290{ "Owner:","Besitzer:" },
291{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, 291{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" },
292{ "Pick a date to display","Wähle einen Tag zum anzeigen aus" }, 292{ "Pick a date to display","Wähle einen Tag zum anzeigen aus" },
293{ "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."}, 293{ "Please specify a valid due date.","Bitte gültiges Fälligkeitsdatum angeben."},
294{ "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." }, 294{ "Please specify a valid end date,\nfor example '%1'.","Bitte gültiges Enddatum angeben,\nz.B.'%1'." },
295{ "Please specify a valid start date.","Bitte gültiges Startdatum angeben." }, 295{ "Please specify a valid start date.","Bitte gültiges Startdatum angeben." },
296{ "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." }, 296{ "Please specify a valid start date,\nfor example '%1'.","Bitte gültiges Startdatum angeben,\nz.B. '%1'." },
297{ "Please specify a valid start time.","Bitte gültige Startzeit angeben."}, 297{ "Please specify a valid start time.","Bitte gültige Startzeit angeben."},
298{ "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." }, 298{ "Please specify a valid start time,\nfor example '%1'.","Bitte gültige Startzeit angeben,\nz.B. '%1'." },
299{ "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" }, 299{ "Preferences - some settings need a restart (nr)","Einstellungen - teilweise Neustart erforderlich (bn)" },
300{ "&Previous Day","Vorheriger Tag" }, 300{ "&Previous Day","Vorheriger Tag" },
301{ "Previous month","Vorheriger Monat" }, 301{ "Previous month","Vorheriger Monat" },
302{ "Previous Month","Vorheriger Monat" }, 302{ "Previous Month","Vorheriger Monat" },
303{ "&Previous Week","Vorherige Woche" }, 303{ "&Previous Week","Vorherige Woche" },
304{ "Previous year","Vorheriges Jahr" }, 304{ "Previous year","Vorheriges Jahr" },
305{ "Previous Year","Vorheriges Jahr" }, 305{ "Previous Year","Vorheriges Jahr" },
306{ "Printing","Drucken" }, 306{ "Printing","Drucken" },
307{ "Priority:","Priorität:" }, 307{ "Priority:","Priorität:" },
308{ "Private","Privat" }, 308{ "Private","Privat" },
309{ "Proceed","Weiter" }, 309{ "Proceed","Weiter" },
310{ "Public","Öffentlich" }, 310{ "Public","Öffentlich" },
311{ "Purge","Entferne" }, 311{ "Purge","Entferne" },
312{ "Purge Completed","Entferne erledigte Todos" }, 312{ "Purge Completed","Entferne erledigte Todos" },
313{ "Purge Todos","Todos bereinigen" }, 313{ "Purge Todos","Todos bereinigen" },
314{ "read-only","schreibgeschützt" }, 314{ "read-only","schreibgeschützt" },
315{ "Recur every","Wiederh. alle" }, 315{ "Recur every","Wiederh. alle" },
316{ "Recur in the month of","Wiederh. im Monat" }, 316{ "Recur in the month of","Wiederh. im Monat" },
317{ "Recur on the","Wiederh. am" }, 317{ "Recur on the","Wiederh. am" },
318{ "Recur on this day","Wiederh. am diesen Tag" }, 318{ "Recur on this day","Wiederh. am diesen Tag" },
319{ "Recurrence Range...","Wiederholungs Zeitraum..." }, 319{ "Recurrence Range...","Wiederholungs Zeitraum..." },
320{ "Recurrence Range","Wiederholungs Zeitraum" }, 320{ "Recurrence Range","Wiederholungs Zeitraum" },
321{ "Recurrence Rule","Wiederholungs Regel" }, 321{ "Recurrence Rule","Wiederholungs Regel" },
322{ "Recurrence","Wiederholung" }, 322{ "Recurrence","Wiederholung" },
323{ "Recurs","Wiederholung" }, 323{ "Recurs","Wiederholung" },
324{"&Reject","Abweisen"}, 324{"&Reject","Abweisen"},
325{ "Reminder:","Alarm:" }, 325{ "Reminder:","Alarm:" },
326{ "Rem.:","Alarm:" }, 326{ "Rem.:","Alarm:" },
327{ "Rem.","Alarm:" }, 327{ "Rem.","Alarm:" },
328{ "Remote file:","Remote Datei:"}, 328{ "Remote file:","Remote Datei:"},
329{ "Remote IP:","Remote (ferne) IP:" }, 329{ "Remote IP:","Remote (ferne) IP:" },
330{ "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " }, 330{ "Remote syncing (via ssh/scp) network settings ","Remote Sync (via ssh/scp) Netzwerk Einstellungen " },
331{ "Remote user:","Remote Benutzer"}, 331{ "Remote user:","Remote Benutzer"},
332{ "&Remove","Entfe&rnen" }, 332{ "&Remove","Entfe&rnen" },
333{ "Remove","Entfernen" }, 333{ "Remove","Entfernen" },
334{ "Request response","Bemerkung anfordern" }, 334{ "Request response","Bemerkung anfordern" },
335{ "Role:","Rolle:" }, 335{ "Role:","Rolle:" },
336{ "Role","Rolle" }, 336{ "Role","Rolle" },
337{ "Sat","Sa" }, 337{ "Sat","Sa" },
338{ "Saturday","Samstag" }, 338{ "Saturday","Samstag" },
339{ "Search for:","Suche nach:" }, 339{ "Search for:","Suche nach:" },
340{ "Search In","Suche in" }, 340{ "Search In","Suche in" },
341{ "Search...","Suche..." }, 341{ "Search...","Suche..." },
342{ "Search","Suche" }, 342{ "Search","Suche" },
343{ "Select Addresses","Wähle Adressen" }, 343{ "Select Addresses","Wähle Adressen" },
344{ "Select all","Selektiere Alle" }, 344{ "Select all","Selektiere Alle" },
345{ "Select a month","Wähle Monat" }, 345{ "Select a month","Wähle Monat" },
346{ "Select a week","Wähle Woche" }, 346{ "Select a week","Wähle Woche" },
347{ "Select a year","Wähle Jahr" }, 347{ "Select a year","Wähle Jahr" },
348{ "Send directly","Sende direkt" }, 348{ "Send directly","Sende direkt" },
349{ "&Send Messages","&Sende Nachrichten", }, 349{ "&Send Messages","&Sende Nachrichten", },
350{ "Sep","Sep" }, 350{ "Sep","Sep" },
351{ "September","September" }, 351{ "September","September" },
352{ "Shopping","Einkaufen" }, 352{ "Shopping","Einkaufen" },
353{ "Show Dates","Zeige Daten" }, 353{ "Show Dates","Zeige Daten" },
354{ "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." }, 354{ "Show events that recur daily in date nav.","Zeige tägl.wiederh.Term.in Datums Nav." },
355{ "Show Event...","Zeige Termin..." }, 355{ "Show Event...","Zeige Termin..." },
356{ "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." }, 356{ "Show ev. that recur weekly in date nav.","Zeige wöch.wiederh.Term.in Datums Nav." },
357{ "Show Marcus Bains line","Zeige Marcus Bains Linie" }, 357{ "Show Marcus Bains line","Zeige Marcus Bains Linie" },
358{ "Show summary after syncing","Zeige Zusammenfassung nach Sync." }, 358{ "Show summary after syncing","Zeige Zusammenfassung nach Sync." },
359{ "Show time as:","Zeige Zeit als" }, 359{ "Show time as:","Zeige Zeit als" },
360{ "Show Todo...","Zeige To-Do" }, 360{ "Show Todo...","Zeige To-Do" },
361{ "Vertical screen layout(Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" }, 361{ "Vertical screen layout(Needs restart)","Vertikaler Bildschirm-Layout (Neustart!)" },
362{ "&Show","Zeige" }, 362{ "&Show","Zeige" },
363{ "Show...","Zeige..." }, 363{ "Show...","Zeige..." },
364{ "Show","Zeige" }, 364{ "Show","Zeige" },
365{ "Small","Klein" }, 365{ "Small","Klein" },
366{ "Sorry","Entschuldigung" }, 366{ "Sorry","Entschuldigung" },
367{"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"}, 367{"Sorry, the copy command failed!\nCommand was:\n","Der Kopierbefehl schlug fehl!\nBefehl war:\n"},
368{ "Start:","Start:" }, 368{ "Start:","Start:" },
369{ "Start Date","Start Datum" }, 369{ "Start Date","Start Datum" },
370{ "Start date: %1","Start Datum: %1" }, 370{ "Start date: %1","Start Datum: %1" },
371{ "Start Time","Start Zeit" }, 371{ "Start Time","Start Zeit" },
372{ "Status:","Status:" }, 372{ "Status:","Status:" },
373{ "Status","Status:" }, 373{ "Status","Status:" },
374{ "Summaries","Titel" }, 374{ "Summaries","Titel" },
375{ "Summary:","Titel:" }, 375{ "Summary:","Titel:" },
376{ "Summary","Titel" }, 376{ "Summary","Titel" },
377{ "Sunday","Sonntag" }, 377{ "Sunday","Sonntag" },
378{ "Sun","So" }, 378{ "Sun","So" },
379{ "Sync preferences:","Sync Einstellungen" }, 379{ "Sync preferences:","Sync Einstellungen" },
380{ "Sync Prefs","Sync Einstellungen" }, 380{ "Sync Prefs","Sync Einstellungen" },
381{ "Syncronize","Daten abgleich" }, 381{ "Syncronize","Daten abgleich" },
382{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" }, 382{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
383{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" }, 383{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
384{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" }, 384{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" },
385{ "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" }, 385{ "Template '%1' does not contain a valid Todo.","Template '%1' enthält kein gültiges To-Do" },
386{ "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" }, 386{ "Template does not contain a valid Event.","Template '%1' enthält keinen gültigen Termin" },
387{ "Template...","Vorlage..." }, 387{ "Template...","Vorlage..." },
388{ "This day","Dieser Tag" }, 388{ "This day","Dieser Tag" },
389{ "This is an experimental feature. ","Dieses Feature ist experimentel" }, 389{ "This is an experimental feature. ","Dieses Feature ist experimentel" },
390{ "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." }, 390{ "This item will be\npermanently deleted.","Dieser Eintrag wird\nkomplett gelöscht." },
391{ "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." }, 391{ "This item will be permanently deleted.", "Dieser Eintrag wird komplett gelöscht." },
392{ "Thu","Do" }, 392{ "Thu","Do" },
393{ "Thursday","Donnerstag" }, 393{ "Thursday","Donnerstag" },
394{ "Time associated","Mit Zeit" }, 394{ "Time associated","Mit Zeit" },
395{ "Time bar:","Uhrzeit Zeile:" }, 395{ "Time bar:","Uhrzeit Zeile:" },
396{ "Time && Date","Zeit und Datum" }, 396{ "Time && Date","Zeit und Datum" },
397{ "Time Format","Zeit Format" }, 397{ "Time Format","Zeit Format" },
398{ "Time Format(nr):","Zeit Format(Neustart!)" }, 398{ "Time Format(nr):","Zeit Format(Neustart!)" },
399{ "Date Labels:","Datumsleiste:" }, 399{ "Date Labels:","Datumsleiste:" },
400{ "Time: ","Zeit: " }, 400{ "Time: ","Zeit: " },
401{ "Timezone:","Zeitzone:" }, 401{ "Timezone:","Zeitzone:" },
402{ "To: ","Bis: " }, 402{ "To: ","Bis: " },
403{ "To:","Bis:" }, 403{ "To:","Bis:" },
404{ "Today: ","Heute: " }, 404{ "Today: ","Heute: " },
405{ "Todo due today color:","Heute fällige To-Do's" }, 405{ "Todo due today color:","Heute fällige To-Do's" },
406{ "To-do items:","To-Do items:" }, 406{ "To-do items:","To-Do items:" },
407{ "Todo overdue color:","Überfällige To-Do's" }, 407{ "Todo overdue color:","Überfällige To-Do's" },
408{ "Todo","Todo" }, 408{ "Todo","Todo" },
409{ "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" }, 409{ "To-do view shows completed Todos","To-do Ansicht zeigt erledigte To-dos" },
410{ "ToDoView:","Todo Ansicht:" }, 410{ "ToDoView:","Todo Ansicht:" },
411{ "Toggle Alarm","Wechsle Alarm" }, 411{ "Toggle Alarm","Wechsle Alarm" },
412{ "Toggle Allday","Umschalten Ganztag" }, 412{ "Toggle Allday","Umschalten Ganztag" },
413{ "Tomorrow: ","Morgen: " }, 413{ "Tomorrow: ","Morgen: " },
414{ "Tue","Di" }, 414{ "Tue","Di" },
415{ "Tuesday","Dienstag" }, 415{ "Tuesday","Dienstag" },
416{ "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" }, 416{ "Two entries are in conflict, if: ","Zwei Einträge haben einen Konflikt, wenn:" },
417{ "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." }, 417{ "Unable to find template '%1'.","Kann Vorlage '%1' nicht finden." },
418{ "Unknown","Unbekannt" }, 418{ "Unknown","Unbekannt" },
419{ "Up","Hinauf" }, 419{ "Up","Hinauf" },
420{ "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" }, 420{ "Use password (if not, ask when syncing)","Passwort: (sonst jedesmal anfragen)" },
421{ "User defined","Benutzerdefiniert" }, 421{ "User defined","Benutzerdefiniert" },
422{ "User long date:","Format langes Datum:" }, 422{ "User long date:","Format langes Datum:" },
423{ "User short date:","Forma kurzes Datum:" }, 423{ "User short date:","Forma kurzes Datum:" },
424{ "View","Ansicht" }, 424{ "View","Ansicht" },
425{ "View Fonts","Schriftarten Ansichten" }, 425{ "View Fonts","Schriftarten Ansichten" },
426{ "Views","Ansichten" }, 426{ "Views","Ansichten" },
427{ "Wed","Mi" }, 427{ "Wed","Mi" },
428{ "Wednesday","Mittwoch" }, 428{ "Wednesday","Mittwoch" },
429{ "Week %1","Woche %1" }, 429{ "Week %1","Woche %1" },
430{ "Weekly","Wöchentlich" }, 430{ "Weekly","Wöchentlich" },
431{ "Week starts on Sunday","Woche beginnt Sonntags" }, 431{ "Week starts on Sunday","Woche beginnt Sonntags" },
432{ "What's Next View:","What's Next Anz." }, 432{ "What's Next View:","What's Next Anz." },
433{ "What's next ?","Was kommt als nächstes?(What's Next)" }, 433{ "What's next ?","Was kommt als nächstes?(What's Next)" },
434{ "Working Hours","Tägliche Arbeitszeit" }, 434{ "Working Hours","Tägliche Arbeitszeit" },
435{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" }, 435{ "Working hours color:","Arbeitszeit in der Agenda Ansicht:" },
436{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" }, 436{ "Write back existing entries only","Nur exisitierende Einträge zurückschreiben" },
437{ "Write back synced file","Syncronisierte Datei zurückschreiben" }, 437{ "Write back synced file","Syncronisierte Datei zurückschreiben" },
438{ "Yearly","Jährlich" }, 438{ "Yearly","Jährlich" },
439{ "year(s)","Jahr(e)" }, 439{ "year(s)","Jahr(e)" },
440{ "Yes","Ja" }, 440{ "Yes","Ja" },
441{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" }, 441{ "You have %d item(s) selected.\n","Sie haben %d Einträge ausgewählt.\n" },
442{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." }, 442{ "You have to restart KOrganizer for this setting to take effect.","Sie müssem Korganizer neu starten, damit diese Einstellung aktiviert wird." },
443{ "week(s) on:","Woche(n) am: " }, 443{ "week(s) on:","Woche(n) am: " },
444{ "Full menu bar(nr)","Volle Menuleiste(bn)" }, 444{ "Full menu bar(nr)","Volle Menuleiste(bn)" },
445{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" }, 445{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
446{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" }, 446{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
447{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." }, 447{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
448{ "Daylight start:","Sommerzeit Start:" }, 448{ "Daylight start:","Sommerzeit Start:" },
449{ "Daylight end:","Sommerzeit Ende:" }, 449{ "Daylight end:","Sommerzeit Ende:" },
450{ "Time Zone","Zeitzone" }, 450{ "Time Zone","Zeitzone" },
451{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" }, 451{ "Monday 19 April 2004: %A %d %B %Y","Montag 19 April 2004: %A %d %B %Y" },
452{ "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" }, 452{ "%A: Monday --- %a: Mon","%A: Montag --- %a: Mon" },
453{ "minutely","minütlich" }, 453{ "minutely","minütlich" },
454{ "hourly","stündlich" }, 454{ "hourly","stündlich" },
455{ "daily","täglich" }, 455{ "daily","täglich" },
456{ "weekly","wöchentlich" }, 456{ "weekly","wöchentlich" },
457{ "monthly","monatlich" }, 457{ "monthly","monatlich" },
458{ "day-monthly","tag-monatlich" }, 458{ "day-monthly","tag-monatlich" },
459{ "month-yearly","monat-jährlich" }, 459{ "month-yearly","monat-jährlich" },
460{ "day-yearly","tag-jährlich" }, 460{ "day-yearly","tag-jährlich" },
461{ "position-yearly","pos-jährlich" }, 461{ "position-yearly","pos-jährlich" },
462{ "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" }, 462{ "Edit item on doubleclick (if not, show)","Editiere mit Doppelklick(wenn nicht, zeige)" },
463{ "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" }, 463{ "Highlight current day in agenda","Hebe >>heute<< in Agenda hervor" },
464{ "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" }, 464{ "Use light color for highlight current day","Helle Farbe für >>heute<< Hervorhebung" },
465{ "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" }, 465{ "Highlight selection in Time Edit","Hebe Auswahl in Zeit Edit hervor" },
466{ "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" }, 466{ "Hold fullscreen on view change","Behalte Vollbild bei Ansichswechsel" },
467{ "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." }, 467{ "Hold non-fullscreen on view change","Behalte Nicht-Vollbild bei Ansichtsw." },
468{ "Event list view uses full window","Listenansicht nutzt Vollbild" }, 468{ "Event list view uses full window","Listenansicht nutzt Vollbild" },
469{ "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" }, 469{ "Set agenda to DayBeginsAt on change","Setze Agenda auf TagBeginntUm bei Wechsel" },
470{ "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" }, 470{ "Set agenda to current time on change","Setze Agenda auf gegenw.Zeit bei Wechsel" },
471{ "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" }, 471{ "Listview uses monthly timespan","Listenansicht zeigt monatliche Zeitspanne" },
472{ "ViewChange","Ansichtswechsel" }, 472{ "ViewChange","Ansichtswechsel" },
473{ "Default alarm *.wav file:","Standard Alarm *.wav Datei:" }, 473{ "Default alarm *.wav file:","Standard Alarm *.wav Datei:" },
474{ "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" }, 474{ "This setting is useless for 5500 user!","Diese Einst. ist nutzlos für 5500 Nutzer" },
475{ "File","Datei" }, 475{ "File","Datei" },
476{ "Clone...","Dupliziere.." }, 476{ "Clone...","Dupliziere.." },
477{ "Move...","Bewege..." }, 477{ "Move...","Bewege..." },
478{ "Beam...","Sende via IR..." }, 478{ "Beam...","Sende via IR..." },
479{ "&Clone...","Dupliziere.." }, 479{ "&Clone...","Dupliziere.." },
480{ "&Move...","Bewege..." }, 480{ "&Move...","Bewege..." },
481{ "&Beam...","Sende via IR..." }, 481{ "&Beam...","Sende via IR..." },
482{ "Show Completed","Zeige erledigte Todos" }, 482{ "Show Completed","Zeige erledigte Todos" },
483{ "Show Quick Todo","Zeige Quick Todo" }, 483{ "Show Quick Todo","Zeige Quick Todo" },
484{ "Unparent Todo","Un-sub Todo" }, 484{ "Unparent Todo","Un-sub Todo" },
485{ "Save selected to file...","Speichere Selektierte..." }, 485{ "Save selected to file...","Speichere Selektierte..." },
486{ "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." }, 486{ "Add Categ. to selected...","Füge zu Selekt. Kateg. hinzu..." },
487{ "Set Categ. for selected...","Setze Kateg. für Selekt." }, 487{ "Set Categ. for selected...","Setze Kateg. für Selekt." },
488{ "Beam selected via IR","Sende Selekt. via IR..." }, 488{ "Beam selected via IR","Sende Selekt. via IR..." },
489{ "Search","Suchen" }, 489{ "Search","Suchen" },
490{ "Date Picker","Datum auswählen" }, 490{ "Date Picker","Datum auswählen" },
491{ "Day View","Tagesansicht" }, 491{ "Day View","Tagesansicht" },
492{ "Work Week","Arbeitswoche" }, 492{ "Work Week","Arbeitswoche" },
493{ "Week","Wochenansicht" }, 493{ "Week","Wochenansicht" },
494{ "Month","Monatsansicht" }, 494{ "Month","Monatsansicht" },
495{ "Todo View","Todo Liste" }, 495{ "Todo View","Todo Liste" },
496{ "Journal","Journal" }, 496{ "Journal","Journal" },
497{ "Next days","Nächste Tage" }, 497{ "Next days","Nächste Tage" },
498{ "Print agenda selection...","Drucke Agendaselektion..." }, 498{ "Print agenda selection...","Drucke Agendaselektion..." },
499{ "Toggle DateNavigator","Navigator umschalten" }, 499{ "Toggle DateNavigator","Navigator umschalten" },
500{ "Toggle FilterView","Filteransicht umschalten" }, 500{ "Toggle FilterView","Filteransicht umschalten" },
501{ "Prev. month","Vorheriger Monat" }, 501{ "Prev. month","Vorheriger Monat" },
502{ "Go backward","Gehe zurück" }, 502{ "Go backward","Gehe zurück" },
503{ "Go forward","Gehe weiter" }, 503{ "Go forward","Gehe weiter" },
504{ "Synchronize","Synchronisieren" }, 504{ "Synchronize","Synchronisieren" },
505{ "AgendaSize","Agendagröße" }, 505{ "AgendaSize","Agendagröße" },
506{ "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" }, 506{ "Import (*.ics/*.vcs) file","Importiere (*.ics/*.vcs) Datei" },
507{ "Import last file","Importiere letzte Datei" }, 507{ "Import last file","Importiere letzte Datei" },
508{ "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." }, 508{ "Import Opie/Qtopia Cal.","Importiere Opie/Qtopia Kal." },
509{ "Load Calendar Backup","Lade Kalender Backup" }, 509{ "Load Calendar Backup","Lade Kalender Backup" },
510{ "Save Calendar Backup","Speichere Kalender Backup" }, 510{ "Save Calendar Backup","Speichere Kalender Backup" },
511{ "Export VCalendar","Exportiere VCalendar" }, 511{ "Export VCalendar","Exportiere VCalendar" },
512{ "Manage new categories...","Verwalte neue Kategorien..." }, 512{ "Manage new categories...","Verwalte neue Kategorien..." },
513{ "Beam complete calendar...","Sende kompletten Kalender via IR" }, 513{ "Beam complete calendar...","Sende kompletten Kalender via IR" },
514{ "Beam filtered calendar...","Sende gefilterten Kalender via IR" }, 514{ "Beam filtered calendar...","Sende gefilterten Kalender via IR" },
515{ "Remote via ssh","Über Netzwerk via ssh" }, 515{ "Remote via ssh","Über Netzwerk via ssh" },
516{ "With local file","Mit lokaler Datei" }, 516{ "With local file","Mit lokaler Datei" },
517{ "With last file","Mit letzter Datei" }, 517{ "With last file","Mit letzter Datei" },
518{ "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" }, 518{ "KO/Pi: Ready for beaming","KO/Pi: Bereit zum Senden" },
519{ "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" }, 519{ "KO/Pi:Beaming done","KO/Pi: Senden erfolgt" },
520{ "Save filename","Speichern: Dateinamen wählen" }, 520{ "Save filename","Speichern: Dateinamen wählen" },
521{ "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" }, 521{ "File already exists!\nOld file from:\n%1\nOverwrite?\n","Dateiname existiert bereits!\nAlte Datei vom:\n%1\nÜberschreiben?\n" },
522{ "KO/Pi: Warning!","KO/Pi: Warnung!" }, 522{ "KO/Pi: Warning!","KO/Pi: Warnung!" },
523{ "Overwrite!","Überschreibe!" }, 523{ "Overwrite!","Überschreibe!" },
524{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 524{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
525{ "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" }, 525{ "All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n","Alle selektierten Einträge werden\nunwiederbringlich gelöscht.\n(Löschen kann auf dem\nPDA einige Zeit dauern)\n" },
526{ "KO/Pi Confirmation","KO/Pi Bestätigung" }, 526{ "KO/Pi Confirmation","KO/Pi Bestätigung" },
527{ "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" }, 527{ "Close dialog to abort deletion!","Schließe Dialog um das Löschen abzubrechen!" },
528{ "Deleting item %d ...","Lösche Eintrag %d ..." }, 528{ "Deleting item %d ...","Lösche Eintrag %d ..." },
529{ "%d items remaining in list.","%d Einträge sind in der Liste verblieben." }, 529{ "%d items remaining in list.","%d Einträge sind in der Liste verblieben." },
530{ "Size","Größe" }, 530{ "Size","Größe" },
531{ "Date","Datum" }, 531{ "Date","Datum" },
532{ "Mime Type","Datei Typ" }, 532{ "Mime Type","Datei Typ" },
533{ "All Files","Alle Dateien" }, 533{ "All Files","Alle Dateien" },
534{ "Files","Dateien" }, 534{ "Files","Dateien" },
535{ "Documents","DoKumente" }, 535{ "Documents","DoKumente" },
536{ "Select Categories","Selektiere Kategorien" }, 536{ "Select Categories","Selektiere Kategorien" },
537{ " &Deselect All "," Auswahl aufheben " }, 537{ " &Deselect All "," Auswahl aufheben " },
538{ "A&dd","Hinzu" }, 538{ "A&dd","Hinzu" },
539{ "&Modify","Ändern" }, 539{ "&Modify","Ändern" },
540{ "Edit Categories","Editiere Kategorien" }, 540{ "Edit Categories","Editiere Kategorien" },
541{ " &Edit Categories "," &Editiere Kategorien " }, 541{ " &Edit Categories "," &Editiere Kategorien " },
542{ "Beam Options","Beam Einstellungen" }, 542{ "Beam Options","Beam Einstellungen" },
543{ " With timezone "," Mit Zeitzone " }, 543{ " With timezone "," Mit Zeitzone " },
544{ " Local time ", " Lokale Zeit " }, 544{ " Local time ", " Lokale Zeit " },
545{ "Manage new Categories","Verwalte neue Kategorien" }, 545{ "Manage new Categories","Verwalte neue Kategorien" },
546{ "Add to category list","Füge zur Kategorieliste hinzu" }, 546{ "Add to category list","Füge zur Kategorieliste hinzu" },
547{ "Remove from Events/Todos","Entferne von Terminen/Todos" }, 547{ "Remove from Events/Todos","Entferne von Terminen/Todos" },
548{ "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " }, 548{ "After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n ","Nach dem Importieren/Laden/Syncen\nkann es neue Kategorien in den \nTerminen oder Todos geben, die nicht\nin der Kategorieliste enthalten sind.\nBitte wählen Sie, was passieren soll:\n " },
549{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" }, 549{ "New categories not in list:","Kategorien, die nicht in der Liste sind:" },
550{ "File format","Datei Format" }, 550{ "File format","Datei Format" },
551{ "Time format","Zeit Format" }, 551{ "Time format","Zeit Format" },
552{ "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." }, 552{ "KO/Pi:Saving Data to File ...","KO/Pi: Speichere Kalender in Datei ..." },
553{ "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" }, 553{ "KO/Pi:File Saved. Needed %d sec, %d ms","KO/Pi: Abgespeichert in %d sec, %d ms" },
554{ "h","Std" }, 554{ "h","Std" },
555{ "min","Min" }, 555{ "min","Min" },
556{ "hou","Std" }, 556{ "hou","Std" },
557{ "day","Tag" }, 557{ "day","Tag" },
558{ "French","Französich" }, 558{ "French","Französich" },
559{ "Time","Zeit" }, 559{ "Time","Zeit" },
560{ "Event Viewer","Termin Ansicht" }, 560{ "Event Viewer","Termin Ansicht" },
561{ "Cancel Sync","Sync Abbrechen" }, 561{ "Cancel Sync","Sync Abbrechen" },
562{ "Remote","Fern" }, 562{ "Remote","Fern" },
563{ "Local","Lokal" }, 563{ "Local","Lokal" },
564{ "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" }, 564{ "Conflict! Please choose entry","Konflikt! Bitte Eintrag wählen" },
565{ "Local: ","Lokal: " }, 565{ "Local: ","Lokal: " },
566{ "Remote: ","Fern: " }, 566{ "Remote: ","Fern: " },
567{ "Last modified: ","Zuletzt geändert: " }, 567{ "Last modified: ","Zuletzt geändert: " },
568{ "Location: ","Ort: " }, 568{ "Location: ","Ort: " },
569{ "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" }, 569{ "<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>","<p><b>Von:</b> %1 </p><p><b>Bis:</b> %2</p>" },
570{ "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" }, 570{ "<p><b>On:</b> %1</p>","<p><b>Am:</b> %1</p>" },
571{ "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " }, 571{ "<p><b>From:</b> %1</p> ","<p><b>Von:</b> %1</p> " },
572{ "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" }, 572{ "<p><b>To:</b> %1</p>","<p><b>Bis:</b> %1</p>" },
573{ "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " }, 573{ "<p><b>On:</b> %1</p> ","<p><b>Am:</b> %1</p> " },
574{ "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" }, 574{ "<p><b>From:</b> %1 <b>To:</b> %2</p>","<p><b>Von:</b> %1 <b>Bis:</b> %2</p>" },
575{ "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." }, 575{ "This is a %1 recurring event.","Das ist ein %1 wiederholender Termin." },
576{ "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" }, 576{ "<b>Next recurrence is on:</b>","<b>Nächste Wiederholung ist am:</b>" },
577{ "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" }, 577{ "<b>Last recurrence was on:</b>","<b>Letzte Wiederholung war am:</b>" },
578{ "( %1 min before )","( %1 min vorher )" }, 578{ "( %1 min before )","( %1 min vorher )" },
579{ "<b>Alarm on: ","<b>Alarm am: " }, 579{ "<b>Alarm on: ","<b>Alarm am: " },
580{ "<b>Details: </b>","<b>Details: </b>" }, 580{ "<b>Details: </b>","<b>Details: </b>" },
581{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" }, 581{ "<p><b>Priority:</b> %2</p>","<p><b>Priorität:</b> %2</p>" },
582{ "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" }, 582{ "<p><i>%1 % completed</i></p>","<p><i>%1 % erledigt</i></p>" },
583{ "Organizer","Organisator" }, 583{ "Organizer","Organisator" },
584{ "Save","Speichern" }, 584{ "Save","Speichern" },
585{ "Exit (+save)","Beenden (+ speichern)" }, 585{ "Exit (+save)","Beenden (+ speichern)" },
586{ "Home","Zuhause" }, 586{ "Home","Zuhause" },
587{ "Office","Büro" }, 587{ "Office","Büro" },
588{ "Library","Bibliothek" }, 588{ "Library","Bibliothek" },
589{ "Doctor","Arzt" }, 589{ "Doctor","Arzt" },
590{ "Beach","Strand" }, 590{ "Beach","Strand" },
591{ "Conference room","Konferenzraum" }, 591{ "Conference room","Konferenzraum" },
592{ "Drive Home","Heimfahrt" }, 592{ "Drive Home","Heimfahrt" },
593{ "Watch TV","Tv gucken" }, 593{ "Watch TV","Tv gucken" },
594{ "Phone call","Telefonanruf" }, 594{ "Phone call","Telefonanruf" },
595{ "Pay bill","Rechnung bezahlen" }, 595{ "Pay bill","Rechnung bezahlen" },
596{ "Read book","Buch lesen" }, 596{ "Read book","Buch lesen" },
597{ "Watering plants","Pflanzen giessen" }, 597{ "Watering plants","Pflanzen giessen" },
598{"Appointment","Verabredung" }, 598{"Appointment","Verabredung" },
599{"Birthday","Geburtstag" }, 599{"Birthday","Geburtstag" },
600{"Business","Geschäft" }, 600{"Business","Geschäft" },
601{"Business Travel","Geschäftsreise" }, 601{"Business Travel","Geschäftsreise" },
602{"Cinema","Kino" }, 602{"Cinema","Kino" },
603{"Customer","Kunde" }, 603{"Customer","Kunde" },
604{"Break","Pause" }, 604{"Break","Pause" },
605{"Breakfast","Frühstück" }, 605{"Breakfast","Frühstück" },
606{"Competition","Wettkampf" }, 606{"Competition","Wettkampf" },
607{"Dinner","Abendessen" }, 607{"Dinner","Abendessen" },
608{"Education","Erziehung" }, 608{"Education","Erziehung" },
609{"Family","Familie" }, 609{"Family","Familie" },
610{"Favorites","Favoriten" }, 610{"Favorites","Favoriten" },
611{"Festival","Festival" }, 611{"Festival","Festival" },
612{"Fishing","Angeln" }, 612{"Fishing","Angeln" },
613{"Flight","Flug" }, 613{"Flight","Flug" },
614{"Gifts","Geschenk" }, 614{"Gifts","Geschenk" },
615{"Holiday","Feiertag" }, 615{"Holiday","Feiertag" },
616{"Holiday Cards","Ansichtskarten" }, 616{"Holiday Cards","Ansichtskarten" },
617{"Hot Contacts","Heisse Kontakte" }, 617{"Hot Contacts","Heisse Kontakte" },
618{"Hiking","Wandern" }, 618{"Hiking","Wandern" },
619{"Hunting","Jagen" }, 619{"Hunting","Jagen" },
620{"Key Customer","Wichtiger Kunde" }, 620{"Key Customer","Wichtiger Kunde" },
621{"Kids","Kinder" }, 621{"Kids","Kinder" },
622{"Lunch","Mittagessen" }, 622{"Lunch","Mittagessen" },
623{"Meeting","Treffen" }, 623{"Meeting","Treffen" },
624{"Miscellaneous","Verschiedenes" }, 624{"Miscellaneous","Verschiedenes" },
625{"Partner","Partner" }, 625{"Partner","Partner" },
626{"Party","Partie" }, 626{"Party","Partie" },
627{"Personal","Privat" }, 627{"Personal","Privat" },
628{"Personal Travel","Privatreise"}, 628{"Personal Travel","Privatreise"},
629{"PHB","PHB" }, 629{"PHB","PHB" },
630{"Phone Calls","Telefonanruf" }, 630{"Phone Calls","Telefonanruf" },
631{"Projects","Projekt" }, 631{"Projects","Projekt" },
632{"Recurring","Wiederholend" }, 632{"Recurring","Wiederholend" },
633{"School","Schule" }, 633{"School","Schule" },
634{"Shopping","Einkaufen" }, 634{"Shopping","Einkaufen" },
635{"Speach","Rede" }, 635{"Speach","Rede" },
636{"Special Occasion","Spez.Gelegenheit" }, 636{"Special Occasion","Spez.Gelegenheit" },
637{"Sports","Sport" }, 637{"Sports","Sport" },
638{"Talk","Vortrag" }, 638{"Talk","Vortrag" },
639{"Travel","Reise" }, 639{"Travel","Reise" },
640{"TV","TV" }, 640{"TV","TV" },
641{"Germany","Deutschland" }, 641{"Germany","Deutschland" },
642{"Sweden","Schweden" }, 642{"Sweden","Schweden" },
643{"Forest","Wald" }, 643{"Forest","Wald" },
644{ "Desert","Wüste" }, 644{ "Desert","Wüste" },
645{ "Kitchen","Küche" }, 645{ "Kitchen","Küche" },
646{ "Lake","See" }, 646{ "Lake","See" },
647{"University","Universität"}, 647{"University","Universität"},
648{"Vacation","Urlaub" }, 648{"Vacation","Urlaub" },
649{"VIP","VIP" }, 649{"VIP","VIP" },
650{ "Import Sharp Calendar","Importiere Sharp Kalender" }, 650{ "Import Sharp Calendar","Importiere Sharp Kalender" },
651{ "This todo has been cancelled!","Dieses Todo wurde gecancelt!" }, 651{ "This todo has been cancelled!","Dieses Todo wurde gecancelt!" },
652{ "This event has been cancelled!","Dieser Termin wurde gecancelt!" }, 652{ "This event has been cancelled!","Dieser Termin wurde gecancelt!" },
653{ "Cancelled","Gecancelt" }, 653{ "Cancelled","Gecancelt" },
654{ "Multiple sync","Mehrfach Sync" }, 654{ "Multiple sync","Mehrfach Sync" },
655{ "Local file","Lokale Datei" }, 655{ "Local file","Lokale Datei" },
656{ "Last file","Letzte Datei" }, 656{ "Last file","Letzte Datei" },
657{ "Keys + Colors...","Tasten + Farben..." }, 657{ "Keys + Colors...","Tasten + Farben..." },
658{ "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" }, 658{ "Mini icons in toolbar(nr)","Mini Icons in ToolBar(bn)" },
659{ "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" }, 659{ "Quick load/save (w/o Unicode)","Schnelles Laden/Speichern (o Unicode)" },
660{ "Choose...","Wähle..." }, 660{ "Choose...","Wähle..." },
661{ "Use colors for application:","Setze Farben für Programm:" }, 661{ "Use colors for application:","Setze Farben für Programm:" },
662{ "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" }, 662{ "Buttons, menus, etc.:","Knöpfe, Menu, etc.:" },
663{ "Frames, labels, etc.:","Rahmen, Label, etc.:" }, 663{ "Frames, labels, etc.:","Rahmen, Label, etc.:" },
664{ "Show parent To-Do's","Zeige Ober-Todos" }, 664{ "Show parent To-Do's","Zeige Ober-Todos" },
665{ "Show location","Zeige Orte" }, 665{ "Show location","Zeige Orte" },
666{ "Show events that recur ","Zeige Termine, die sich wiederholen:" }, 666{ "Show events that recur ","Zeige Termine, die sich wiederholen:" },
667{ "Show in every cell ","Zeige in jeder Zelle " }, 667{ "Show in every cell ","Zeige in jeder Zelle " },
668{ "short month","kurzen Monat" }, 668{ "short month","kurzen Monat" },
669{ "icons","Icons" }, 669{ "icons","Icons" },
670{ "Show Sat/Sun together","Zeige Sam/Son zusammen" }, 670{ "Show Sat/Sun together","Zeige Sam/Son zusammen" },
671{ "Category colors are applied to text","Kategorie Farben färben Text" }, 671{ "Category colors are applied to text","Kategorie Farben färben Text" },
672{ "Month view uses day colors","Monatsansicht zeigt Tagesfarben" }, 672{ "Month view uses day colors","Monatsansicht zeigt Tagesfarben" },
673{ "Day color odd months","Tagesfarbe ungerade Monate" }, 673{ "Day color odd months","Tagesfarbe ungerade Monate" },
674{ "Day color even months","Tagesfarbe gerade Monate" }, 674{ "Day color even months","Tagesfarbe gerade Monate" },
675{ "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" }, 675{ "Color for Sundays + category \"Holiday\"","Farbe für Sonntag + Kateg.\" Feiertag\"" },
676{ "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" }, 676{ "To-do view shows complete as 'xx %'","Zeige Prozent erledigt als 'xx %'" },
677{ "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" }, 677{ "Small To-do view uses smaller font","Kleine To-do Ansicht nutzt kleineren Font" },
678{ "Colors are applied to text","Farben werden auf Text angewendet" }, 678{ "Colors are applied to text","Farben werden auf Text angewendet" },
679{ "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" }, 679{ "Use internal alarm notification","Nutze interne Alarm Benachrichtigung" },
680{ "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" }, 680{ "Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n","Achtung: KO/Pi muß ausgeführt werden damit die Benachrichtigung funktioniert. Empfehlung für Zaurus: Diese Option nicht wählen und KO/Pi Alarm Applet installieren.\n" },
681{ "Play beeps count:","Anzahl der Alarmpiepse: " }, 681{ "Play beeps count:","Anzahl der Alarmpiepse: " },
682{ "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " }, 682{ "Beeps interval in sec:","Zeitintervall der Alarmpiepse: " },
683{ "Default suspend time in min:","Standard Supendierungs Zeit: " }, 683{ "Default suspend time in min:","Standard Supendierungs Zeit: " },
684{ "Auto suspend count:","Anzahl der auto Suspendierungen" }, 684{ "Auto suspend count:","Anzahl der auto Suspendierungen" },
685{ "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" }, 685{ "Alarm *.wav file for newly created alarm:","Alarm *.wav Datei für neu angelegte Alarme:" },
686{ "New profile","Neues Profil" }, 686{ "New profile","Neues Profil" },
687{ "Clone profile","Klone Profil" }, 687{ "Clone profile","Klone Profil" },
688{ "Delete profile","Lösche Profil" }, 688{ "Delete profile","Lösche Profil" },
689{ "Profile:","Profil:" }, 689{ "Profile:","Profil:" },
690{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" }, 690{ "Include in multiple sync","Beziehe Profil in mehrfach Sync mit ein" },
691{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" }, 691{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
692{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" }, 692{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
693{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" }, 693{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
694{ "Write back file","Schreibe Datei zurück" }, 694{ "Write back file","Schreibe Datei zurück" },
695{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" }, 695{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
696{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" }, 696{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
697{ "Local device name:","Name dieses Gerätes:" }, 697{ "Local device name:","Name dieses Gerätes:" },
698{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" }, 698{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
699{ "Sync preferences","Synchronisations Einstellungen" }, 699{ "Sync preferences","Synchronisations Einstellungen" },
700{ "Profile kind","Profil Art" }, 700{ "Profile kind","Profil Art" },
701{ "Local file","Lokale Datei" }, 701{ "Local file","Lokale Datei" },
702{ "Local file:","Lokale Datei:" }, 702{ "Local file:","Lokale Datei:" },
703{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" }, 703{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
704{ "Fill in default values for:","Setze Beispiel Werte ein für:" }, 704{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
705{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" }, 705{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
706{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"}, 706{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile"},
707{ "Device","Gerät:" }, 707{ "Device","Gerät:" },
708{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" }, 708{ "Sync with file \n...%1\nfrom:\n%2\n","Sync mit Datei \n...%1\nvom:\n%2\n" },
709{ "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" }, 709{ "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" },
710{ "Synchronization successful","Synchronisation erfolgreich" }, 710{ "Synchronization successful","Synchronisation erfolgreich" },
711{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." }, 711{ "Sync cancelled or failed. Nothing synced.","Sync abgebrochen oder fehlgeschlagen. Nichts wurde gesynced." },
712{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" }, 712{ "Sync file \n...%1\ndoes not exist!\nNothing synced!\n","Sync Datei \n...%1\nexistiert nicht!\nNichts wurde gesynced!\n" },
713{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" }, 713{ "Sync filename(*.ics/*.vcs)","Sync Dateiname(*.ics/*.vcs)" },
714{ "Enter password","Passwort eingeben" }, 714{ "Enter password","Passwort eingeben" },
715{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" }, 715{ "Do you really want\nto remote sync\nwith profile \n","Wollen Sie wirklich\nmit dem entfernten\nProfil syncen: \n" },
716{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." }, 716{ "Copy remote file to local machine...","Kopiere entfernte Datei auf lokalen Rechner..." },
717{ "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" }, 717{ "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" },
718{ "Writing back file result: ","Resultat des Dateizurückschreibens: " }, 718{ "Writing back file result: ","Resultat des Dateizurückschreibens: " },
719{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" }, 719{ "Syncronization sucessfully completed","Synchronisation erfolgreich abgeschlossen" },
720{ "Edit Calendar Filters","Editiere Kalendar Filter" }, 720{ "Edit Calendar Filters","Editiere Kalendar Filter" },
721{ "Enter filter name:","Neuer Filter Name:" }, 721{ "Enter filter name:","Neuer Filter Name:" },
722{ "Add Filter","Filter hinzufügen" }, 722{ "Add Filter","Filter hinzufügen" },
723{ "Question","Frage" }, 723{ "Question","Frage" },
724{ "Filter position: ","Filter Position: " }, 724{ "Filter position: ","Filter Position: " },
725{ "Month View","Monatsansicht" }, 725{ "Month View","Monatsansicht" },
726{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" }, 726{ "This profil cannot be deleted!\n","Dieses Profil kann\nnicht gelöscht werden!" },
727{ "KO/Pi config error","KO/Pi Konfig. Fehler" }, 727{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
728{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" }, 728{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
729{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" }, 729{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile haben denselben Namen!\nBitte unterschiedliche Namen wählen!" },
730{ "Access: ","Zugriff: " }, 730{ "Access: ","Zugriff: " },
731{ "Needs Action","Aktion notwendig" }, 731{ "Needs Action","Aktion notwendig" },
732{ "Accepted","Akzeptiert" }, 732{ "Accepted","Akzeptiert" },
733{ "Declined","Abgelehnt" }, 733{ "Declined","Abgelehnt" },
734{ "Tentative","Vorläufig" }, 734{ "Tentative","Vorläufig" },
735{ "Delegated","Beauftragt" }, 735{ "Delegated","Beauftragt" },
736{ "Completed","Vollständig" }, 736{ "Completed","Vollständig" },
737{ "In Process","In Bearbeitung" }, 737{ "In Process","In Bearbeitung" },
738{ "Participant","Teilnehmer" }, 738{ "Participant","Teilnehmer" },
739{ "Optional Participant","Möglicher Teilnehmer" }, 739{ "Optional Participant","Möglicher Teilnehmer" },
740{ "Observer","Beobachter" }, 740{ "Observer","Beobachter" },
741{ "Chair","Vorsitzender" }, 741{ "Chair","Vorsitzender" },
742{ "Not supported \non desktop!\n","" }, 742{ "Not supported \non desktop!\n","" },
743{ "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " }, 743{ "Nothing selected!\n\nThis prints the full width of the Agenda view as you see it!\n\nTo determine the vertical range of the printing, please select\na vertical range (with the left mouse button down) in one column. ","Es ist nichts selektiert!\nDieses druckt die volle Breite der Agenda View, so wie man sie sieht.\nUm die vertikale Auswahl zum Drucken zu bestimmen,\nbitte einen vertikalen Zeitraum (mit gedrückter linker Maustaste)\nin einer Spalte auswählen.\n(Es wird danach direkt der Termin Dialog angezeigt\n - dort bitte auf Abbrechen klicken) " },
744{ "Date range: ","Datums Zeitspanne: " }, 744{ "Date range: ","Datums Zeitspanne: " },
745{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " }, 745{ "Not supported \non PDA!\n","Nicht verfügbar\nauf dem PDA. " },
746{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." }, 746{ "Syncing - close to abort!","Syncing-schließe um abzubrechen." },
747{ "Add / remove events","Add./entferne Termine" }, 747{ "Add / remove events","Add./entferne Termine" },
748{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." }, 748{ "File does not exist:\n '%1'.","Datei existiert nicht:\n '%1'." },
749{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." }, 749{ "Couldn't load calendar\n '%1'.","Kann Kalender nicht laden:\n '%1'." },
750{ "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" }, 750{ "\nThe file on disk has changed!\nFile size: %1 bytes.\nLast modified: %2\nDo you want to:\n\n - Save and overwrite file?\n - Sync with file, then save?\n - Cancel without saving? \n","\nDie gepeicherte Datei wurde verändert!\nDatei Grösse: %1 Bytes.\nZuletzt geändert: %2\nMöchten Sie:\n\n - Speichern und die Datei überschreiben?\n - Mit Datei Synchronisieren, dann speichern?\n - Abbrechen ohne zu speichern? \n" },
751{ "Overwrite","Überschreiben" }, 751{ "Overwrite","Überschreiben" },
752{ "Sync+save","Syncen+speichern" }, 752{ "Sync+save","Syncen+speichern" },
753{ "Default","Standard" }, 753{ "Default","Standard" },
754{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " }, 754{ " Categories added to list! "," Kategorien zur Liste hinzugefügt! " },
755{ " %d items?"," %d Einträge?" }, 755{ " %d items?"," %d Einträge?" },
756{ "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" }, 756{ "\nThis event recurs\nover multiple dates.\nAre you sure you want\nto delete this event\nand all its recurrences?","\nDieses ist ein\nwiederholender Termin!.\nSind Sie sicher, dass Sie\ndiesen Termin und alle\nWiederholungen löschen möchten?" },
757{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" }, 757{ " ?\n\nDelete:\n"," ?\n\nLösche:\n" },
758{ "Current","Aktuelle" }, 758{ "Current","Aktuelle" },
759{ "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" }, 759{ "\nThis event recurs\nover multiple dates.\nDo you want to delete\nall it's recurrences,\nor only the current one on:\n","\nDieses ist ein\nwiederholender Termin!\nMöchten sie alle Wiederholungen\nlöschen, oder nur die aktuelle am:\n" },
760{ "All","Alle" }, 760{ "All","Alle" },
761{ "Data Loss Warning","Datenverlust Warnung" }, 761{ "Data Loss Warning","Datenverlust Warnung" },
762{ "Proceed","Weitermachen" }, 762{ "Proceed","Weitermachen" },
763{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" }, 763{ "The journal entries can not be\nexported to a vCalendar file.","Die Journal Einträge können\nnicht in eine vCalendar\nDatei exportiert werden!" },
764{ "Filter disabled ","Filter abgeschaltet" }, 764{ "Filter disabled ","Filter abgeschaltet" },
765{ "Filter selected: ","Gewählter Filter: " }, 765{ "Filter selected: ","Gewählter Filter: " },
766{ "Toggle Cancel","Gecancelt ändern" }, 766{ "Toggle Cancel","Gecancelt ändern" },
767{ "&Toggle Cancel","Gecancel&t ändern" }, 767{ "&Toggle Cancel","Gecancel&t ändern" },
768{ "Configure Toolbar","Konfiguriere Toolbar" }, 768{ "Configure Toolbar","Konfiguriere Toolbar" },
769{ "Stretched TB","Gedehnte TB" }, 769{ "Stretched TB","Gedehnte TB" },
770{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" }, 770{ "Import file \n...%1\ndoes not exist!\nNothing imported!\n","Import Datei \n...%1\nexistiert nicht!\nNichts importiert!\n" },
771{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" }, 771{ "Import filename(*.ics/*.vcs)","Import Dateiname(*.ics/*.vcs)" },
772{ "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" }, 772{ "When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing","Wenn ein Kalender doppelt importiert\nwird, werden doppelte Einträge ignoriert!\nSie können eine Backup Datei anlegen unter\nDatei - Speichere Kalender Backup\num den Import rückgängig machen zu können.\n" },
773{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" }, 773{ "Not supported \non desktop!\n","Nur verfügbar auf PDA!" },
774{ "Imported file successfully","Datei erfolgreich importiert" }, 774{ "Imported file successfully","Datei erfolgreich importiert" },
775{ "Error importing file","Fehler beim Importieren der Datei" }, 775{ "Error importing file","Fehler beim Importieren der Datei" },
776{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" }, 776{ "Export vcal filename(*.vcs)","Export vcal Dateiname(*.vcs)" },
777{ "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" }, 777{ "Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n","Zu speichernde Datei\existiert bereits!\nExist. Datei vom:\n%1\nÜberschreiben?\n" },
778{ "Overwrite!","Überschreiben!" }, 778{ "Overwrite!","Überschreiben!" },
779{ "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" }, 779{ "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n","Import Datei \n...%1\nvom:\n%2\nDuplizierte Einträge\nwerden nicht importiert!\n" },
780{ "Load backup filename","Lade Backup Dateiname" }, 780{ "Load backup filename","Lade Backup Dateiname" },
781{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" }, 781{ "Backup file\ndoes not exist!\nNothing loaded!","Backup Datei\nexistiert nicht!\nNichts geladen!" },
782{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" }, 782{ "KO/Pi:Loaded %1","KO/Pi:Geladen %1" },
783{ "Save backup filename","Speichere Backup Dateiname" }, 783{ "Save backup filename","Speichere Backup Dateiname" },
784{ "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" }, 784{ "Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n","Backup Datei\nexistiert bereits!\nAlte Backup Datei vom:\n%1\nÜberschreiben?\n" },
785{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" }, 785{ "KO/Pi:Saved %1","KO/Pi:Gespeichert %1" },
786{ "Details of attendee","Teilnehmerdetails" }, 786{ "Details of attendee","Teilnehmerdetails" },
787{ "Work phone:\n","Telefon Arbeit:\n" }, 787{ "Work phone:\n","Telefon Arbeit:\n" },
788{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" }, 788{ "Work mobile phone:\n","Mobiltelefon Arbeit:\n" },
789{ "Home phone:\n","Telefon privat:\n" }, 789{ "Home phone:\n","Telefon privat:\n" },
790{ "Mobile home phone:\n","Mobiltelefon privat:\n" }, 790{ "Mobile home phone:\n","Mobiltelefon privat:\n" },
791{ "Email:\n","Email:\n" }, 791{ "Email:\n","Email:\n" },
792{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" }, 792{ "Alarm disabled for this item","Alarm deaktiviert für dieses Item" },
793{ "Audio Al.: ","Audio Al.: " }, 793{ "Audio Al.: ","Audio Al.: " },
794{ "Proc.Al.: ","Proz.Al.: " }, 794{ "Proc.Al.: ","Proz.Al.: " },
795{ "No sound set","Kein Sound definiert" }, 795{ "No sound set","Kein Sound definiert" },
796{ "*.wav|Wav Files","*.wav|Wav Dateien" }, 796{ "*.wav|Wav Files","*.wav|Wav Dateien" },
797{ "No program set","Kein Programm definiert" }, 797{ "No program set","Kein Programm definiert" },
798{ "Running '%1'","Ausführen '%1'" }, 798{ "Running '%1'","Ausführen '%1'" },
799{ "Playing '%1'","Abspielen '%1'" }, 799{ "Playing '%1'","Abspielen '%1'" },
800{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" }, 800{ "User defined (usertranslation.txt)","Benutzerdefiniert (usertranslation.txt)" },
801{ "Load!","Laden!" }, 801{ "Load!","Laden!" },
802{ "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" }, 802{ "Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n","Backup Datei vom:\n%1\nDas Laden der Backup Datei\nlöscht die aktuellen Daten!\n" },
803{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" }, 803{ "KO/Pi Features and hints","KO/Pi Eigenschaften und Tipps" },
804{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" }, 804{ "KO/Pi User translation HowTo","KO/Pi Benutzer-Übersetzung HowTo" },
805{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" }, 805{ "KO/Pi Synchronization HowTo","KO/Pi Synchronisation HowTo" },
806{ "Features + hints...","Eigenschaften + Tipps..." }, 806{ "Features + hints...","Eigenschaften + Tipps..." },
807{ "User translation...","Benutzer Übersetzung..." }, 807{ "User translation...","Benutzer Übersetzung..." },
808{ "Sync HowTo...","Synchronisation HowTo..." }, 808{ "Sync HowTo...","Synchronisation HowTo..." },
809{ "Print calendar...","Drucke Kalender..." }, 809{ "Print calendar...","Drucke Kalender..." },
810{ "Anniversary","Jahrestag" }, 810{ "Anniversary","Jahrestag" },
811{ "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" }, 811{ "When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n","Wenn Geburtstage mehrfach importiert\nwerden, werden doppelte Einträge ignoriert\nwenn sie nicht verändert wurden.\n" },
812{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" }, 812{ "Import Birthdays (KA/Pi)","Importiere Geburtstage (KA/Pi)" },
813{ "Next recurrence is on: ","Nächste Wiederholung ist am:" }, 813{ "Next recurrence is on: ","Nächste Wiederholung ist am:" },
814{ "<b>Alarm on: </b>","<b>Alarm am: </b>" }, 814{ "<b>Alarm on: </b>","<b>Alarm am: </b>" },
815{ "<b>Access: </b>","<b>Zugriff: </b>" }, 815{ "<b>Access: </b>","<b>Zugriff: </b>" },
816{ "(%1 min before)","(%1 min vorher)" }, 816{ "(%1 min before)","(%1 min vorher)" },
817{ "<b>Categories: </b>","<b>Kategorien: </b>" }, 817{ "<b>Categories: </b>","<b>Kategorien: </b>" },
818{ "Save Journal/Description...","Speichere Journal/Details..." }, 818{ "Save Journal/Description...","Speichere Journal/Details..." },
819{ "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." }, 819{ "This saves the text/details of selected\nJournals and Events/Todos\nto a text file.","Das speichert den Text bzw.\ndie Details von selektierten\nJournalen und Events/Todos\nin eine Textdatei." },
820{ "Continue","Weitermachen" }, 820{ "Continue","Weitermachen" },
821{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" }, 821{ " birthdays/anniversaries added!"," Geburts-/Jahrestage hinzugefügt" },
822{ "Attendee:","Teilnehmer:" }, 822{ "Attendee:","Teilnehmer:" },
823{ "Click OK to search ->","Klicke zum Suchen auf OK ->" }, 823{ "Click OK to search ->","Klicke zum Suchen auf OK ->" },
824{ "On day ","Am Tag " }, 824{ "On day ","Am Tag " },
825{ "%1 of ","%1 des Monats" }, 825{ "%1 of ","%1 des Monats" },
826{ "%1 of the year","%1 des Jahres" }, 826{ "%1 of the year","%1 des Jahres" },
827{ "Anonymous","Anonymo" }, 827{ "Anonymous","Anonymo" },
828{ "nobody@nowhere","niemand@nirgendwo" }, 828{ "nobody@nowhere","niemand@nirgendwo" },
829{ "calendar.html","calendar.html" }, 829{ "calendar.html","calendar.html" },
830{ " Local Time"," Locale Zeit" }, 830{ " Local Time"," Locale Zeit" },
831{ "Unknown Name","Unbekannter Name" }, 831{ "Unknown Name","Unbekannter Name" },
832{ "unknown@nowhere","unbekannt@nirgendwo" }, 832{ "unknown@nowhere","unbekannt@nirgendwo" },
833{ "Beam via IR!","Beam via IR!" }, 833{ "Beam via IR!","Beam via IR!" },
834{ "Next Month","Nächster Monat" }, 834{ "Next Month","Nächster Monat" },
835{ "Prio","Prio" }, 835{ "Prio","Prio" },
836{ "Reparent Todo","Mache Sub-Todo" }, 836{ "Reparent Todo","Mache Sub-Todo" },
837{ "tomorrow","morgen" }, 837{ "tomorrow","morgen" },
838{ "today","heute" }, 838{ "today","heute" },
839{ "yesterday","gestern" }, 839{ "yesterday","gestern" },
840{ "Ok","Ok" }, 840{ "Ok","Ok" },
841{ "Ok+Agenda","Ok+Agenda" }, 841{ "Ok+Agenda","Ok+Agenda" },
842{ "Email","Email" }, 842{ "Email","Email" },
843{ "RSVP","RSVP" }, 843{ "RSVP","RSVP" },
844{ "Email:","Email:" }, 844{ "Email:","Email:" },
845{ "Appointment Time ","Termin Zeit " }, 845{ "Appointment Time ","Termin Zeit " },
846{ "2","2" }, 846{ "2","2" },
847{ "3","3" }, 847{ "3","3" },
848{ "4","4" }, 848{ "4","4" },
849{ " 0 %"," 0 %" }, 849{ " 0 %"," 0 %" },
850{ " 20 %"," 20 %" }, 850{ " 20 %"," 20 %" },
851{ " 40 %"," 40 %" }, 851{ " 40 %"," 40 %" },
852{ " 60 %"," 60 %" }, 852{ " 60 %"," 60 %" },
853{ " 80 %"," 80 %" }, 853{ " 80 %"," 80 %" },
854{ "100 %","100 %" }, 854{ "100 %","100 %" },
855{ "Filter","Filter" }, 855{ "Filter","Filter" },
856{ "Configure","Konfiguriere" }, 856{ "Configure","Konfiguriere" },
857{ "What's Next","What's Next" }, 857{ "What's Next","What's Next" },
858{ "Complete calendar...","Kompletten Kalender..." }, 858{ "Complete calendar...","Kompletten Kalender..." },
859{ "Filtered calendar...","Gefilterten Kalender..." }, 859{ "Filtered calendar...","Gefilterten Kalender..." },
860{ "Export to phone","Exportiere zum Handy" }, 860{ "Export to phone","Exportiere zum Handy" },
861{ "Beam receive enabled","Beam Empfang an" }, 861{ "Beam receive enabled","Beam Empfang an" },
862{ "What's new?","Was ist neu?" }, 862{ "What's new?","Was ist neu?" },
863{ "FAQ...","FAQ..." }, 863{ "FAQ...","FAQ..." },
864{ "Licence...","Licence..." }, 864{ "Licence...","Licence..." },
865{ "What's This?","What's This?" }, 865{ "What's This?","What's This?" },
866{ "&Edit...","&Editiere..." }, 866{ "&Edit...","&Editiere..." },
867{ "Oktober","Oktober" }, 867{ "Oktober","Oktober" },
868{ "Title","Titel" }, 868{ "Title","Titel" },
869{ "%1 %","%1 %" }, 869{ "%1 %","%1 %" },
870{ "Enable Pi-Sync","Schalte Pi-Sync an" }, 870{ "Enable Pi-Sync","Schalte Pi-Sync an" },
871{ "Import!","Importiere!" }, 871{ "Import!","Importiere!" },
872{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" }, 872{ "inserting birthdays - close to abort!","Burzeltage werden eingefügt - schließe um abzubrechen!" },
873{ "Export to phone options","Export ans Handy Optionen" }, 873{ "Export to phone options","Export ans Handy Optionen" },
874{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." }, 874{ "Please read Help-Sync Howto\nto know what settings to use.","Bitte lese Hilfe-Sync Howto\num zu erfahren welche Einstellungen\ndie richtigen sind." },
875{ "I/O device: ","I/O device: " }, 875{ "I/O device: ","I/O device: " },
876{ "Connection: ","Connection: " }, 876{ "Connection: ","Connection: " },
877{ "Model(opt.): ","Model(opt.): " }, 877{ "Model(opt.): ","Model(opt.): " },
878{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" }, 878{ "Write back events in future only","Schreibe nur zukünftige Termine zurück" },
879{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " }, 879{ "Max. weeks in future: ","Max. Wochen in der Zukunft: " },
880{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" }, 880{ "NOTE: This will remove all old\ntodo/calendar data on phone!","ACHTUNG: Das löscht alle alten\nTodo/Kalender Daten auf dem Handy!" },
881{ "Export to mobile phone!","Exportiere auf das Handy!" }, 881{ "Export to mobile phone!","Exportiere auf das Handy!" },
882{ "Export complete calendar","Exportiere kompletten Kalender" }, 882{ "Export complete calendar","Exportiere kompletten Kalender" },
883{ "Writing to phone...","Sende Daten ans Handy..." }, 883{ "Writing to phone...","Sende Daten ans Handy..." },
884{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" }, 884{ " This may take 1-3 minutes!"," Das kann 1-3 Minuten dauern!" },
885{ "Retry","Nochmal versuchen" }, 885{ "Retry","Nochmal versuchen" },
886{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" }, 886{ "KDE/Pim phone access","KDE/Pim Handy Zugriff" },
887{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" }, 887{ "Error accessing device!\nPlease turn on connection\nand retry!","Fehler beim Zugriff auf das Gerät!\nBitte die Verbindung aktivieren\nund nochmal versuchen!" },
888{ "Error exporting to phone!","Fehler beim Export auf das Handy!" }, 888{ "Error exporting to phone!","Fehler beim Export auf das Handy!" },
889{ "Export filtered calendar","Exportiere gefilterten Kalender" }, 889{ "Export filtered calendar","Exportiere gefilterten Kalender" },
890{ "Preferences","Vorlieben" }, 890{ "Preferences","Vorlieben" },
891{ "Global","Global" }, 891{ "Global","Global" },
892{ "Phone","Phone" }, 892{ "Phone","Phone" },
893{ "SMS","SMS" }, 893{ "SMS","SMS" },
894{ "Fax","Fax" }, 894{ "Fax","Fax" },
895{ "Pager","Pager" }, 895{ "Pager","Pager" },
896{ "SIP","SIP" }, 896{ "SIP","SIP" },
897{ "Italian","Italienisch" }, 897{ "Italian","Italienisch" },
898{ "24:00","24:00" }, 898{ "24:00","24:00" },
899{ "12:00am","12:00am" }, 899{ "12:00am","12:00am" },
900{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" }, 900{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
901{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" }, 901{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
902{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" }, 902{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
903{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" }, 903{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
904{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" }, 904{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
905{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" }, 905{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
906{ "Used Mail Client","Benutzter Mail Client" }, 906{ "Used Mail Client","Benutzter Mail Client" },
907{ "Channel:","Channel:" }, 907{ "Channel:","Channel:" },
908{ "Message:","Message:" }, 908{ "Message:","Message:" },
909{ "Parameters:","Parameter:" }, 909{ "Parameters:","Parameter:" },
910{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 910{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
911{ "extra Message:","extra Message:" }, 911{ "extra Message:","extra Message:" },
912{ "extra Parameters:","extra Parameter:" }, 912{ "extra Parameters:","extra Parameter:" },
913{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 913{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
914{ "External Apps.","Externe Appl." }, 914{ "External Apps.","Externe Appl." },
915{ "24 hours","24 Std." }, 915{ "24 hours","24 Std." },
916{ "3 hours","3 Std." }, 916{ "3 hours","3 Std." },
917{ "1 hour","1 Std." }, 917{ "1 hour","1 Std." },
918{ "15 minutes","15 Min." }, 918{ "15 minutes","15 Min." },
919{ "5 minutes","5 Min." }, 919{ "5 minutes","5 Min." },
920{ "1 minute","1 Min." }, 920{ "1 minute","1 Min." },
921{ "23","23" }, 921{ "23","23" },
922{ "Mon 15","Mon 15" }, 922{ "Mon 15","Mon 15" },
923{ "Configure KO","Konfiguriere KO" }, 923{ "Configure KO","Konfiguriere KO" },
924{ "Event text","Termin Text" }, 924{ "Event text","Termin Text" },
925{ "ToDo","Todo" }, 925{ "ToDo","Todo" },
926{ "Today","Heute" }, 926{ "Today","Heute" },
927{ "What's Next View","What's Next Ansicht" }, 927{ "What's Next View","What's Next Ansicht" },
928{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" }, 928{ "Allday Agenda view shows todos","Ganztag Agenda zeigt Todos" },
929{ "Alarm","Alarm" }, 929{ "Alarm","Alarm" },
930{ "Used %1 Client","Benutzter %1 Client" }, 930{ "Used %1 Client","Benutzter %1 Client" },
931{ "No email client installed","Kein Email Klient installiert" }, 931{ "No email client installed","Kein Email Klient installiert" },
932{ "Userdefined email client","Benutzerdef. Email Klient" }, 932{ "Userdefined email client","Benutzerdef. Email Klient" },
933{ "OM/Pi email client","OM/Pi Email Klient" }, 933{ "OM/Pi email client","OM/Pi Email Klient" },
934{ "Include in multiple ","Beziehe in multiple " }, 934{ "Include in multiple ","Beziehe in multiple " },
935{ "calendar ","Kalender " }, 935{ "calendar ","Kalender " },
936{ "addressbook ","Adressbuch " }, 936{ "addressbook ","Adressbuch " },
937{ "pwmanager","PWmanager" }, 937{ "pwmanager","PWmanager" },
938{ " sync"," Sync ein" }, 938{ " sync"," Sync ein" },
939{ "Write back synced data","Schreibe gesyncte Daten zurück" }, 939{ "Write back synced data","Schreibe gesyncte Daten zurück" },
940{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" }, 940{ "-- Write back (on remote) existing entries only","-- Schreibe nur existierende (entfernte) Einträge zurück" },
941{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" }, 941{ "-- Write back (calendar) entries in future only","-- Schreibe nur zukünftige Kalender-Einträge zurück" },
942{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " }, 942{ "---- Max. weeks in future: ","---- Max. wochen in der Zukunft: " },
943{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" }, 943{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
944{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" }, 944{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
945{ "Help...","Hilfe..." }, 945{ "Help...","Hilfe..." },
946{ "Local file Cal:","Lokale Datei Kal:" }, 946{ "Local file Cal:","Lokale Datei Kal:" },
947{ "Local file ABook:","Lokale Datei ABuch:" }, 947{ "Local file ABook:","Lokale Datei ABuch:" },
948{ "Local file PWMgr:","Lokale Datei PWMgr:" }, 948{ "Local file PWMgr:","Lokale Datei PWMgr:" },
949{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" }, 949{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
950{ "Calendar:","Kalender:" }, 950{ "Calendar:","Kalender:" },
951{ "AddressBook:","AdressBuch:" }, 951{ "AddressBook:","AdressBuch:" },
952{ "PWManager:","PWManager:" }, 952{ "PWManager:","PWManager:" },
953{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" }, 953{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
954{ "ssh/scp","ssh/scp" }, 954{ "ssh/scp","ssh/scp" },
955{ "ftp","ftp" }, 955{ "ftp","ftp" },
956{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" }, 956{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
957{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" }, 957{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
958{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" }, 958{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
959{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" }, 959{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
960{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" }, 960{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
961{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" }, 961{ "Insert device where\nphone is connected. E.g.:\n","Füge Device ein, an dem\ndas Handy angeschlossen ist. Z.B.:\n" },
962{ "KDE-Pim sync config","KDE-Pim sync Konfig" }, 962{ "KDE-Pim sync config","KDE-Pim sync Konfig" },
963{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" }, 963{ "Insert kind of connection,e.g.:\n","Füge Art der Verbindung ein,z.B.:\n" },
964{ "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" }, 964{ "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" },
965{ "Port number (Default: %1)","Port Nummer (Default: %1)" }, 965{ "Port number (Default: %1)","Port Nummer (Default: %1)" },
966{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" }, 966{ "Password to enable\naccess from remote:","Passwort um entfernten\nZugriff zuzulassen:" },
967{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" }, 967{ "Automatically start\nat application startup","Starte automatisch\nbeim Programmstart" },
968{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" }, 968{ "Automatically sync\nwith KDE-Desktop","Automatischer Sync\nmit dem KDE-Desktop" },
969{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" }, 969{ "Enter port for Pi-Sync","Port Nummer für Pi-Sync" },
970{ "Disable Pi-Sync","Schalte Pi-Sync aus" }, 970{ "Disable Pi-Sync","Schalte Pi-Sync aus" },
971{ "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!" }, 971{ "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!" },
972{ "KDE-Pim Sync","KDE-Pim Sync" }, 972{ "KDE-Pim Sync","KDE-Pim Sync" },
973{ "Multiple profiles","Multi-Sync Profile" }, 973{ "Multiple profiles","Multi-Sync Profile" },
974{ "Device: ","Gerät: " }, 974{ "Device: ","Gerät: " },
975{ "Multiple sync started.","Multi-Sync gestartet." }, 975{ "Multiple sync started.","Multi-Sync gestartet." },
976{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" }, 976{ "Nothing synced! No profiles defined for multisync!","Nichts gesynct! Keine Profile\nselektiert für Multi-Sync" },
977{ "Turn filter on","Schalte Filter an" }, 977{ "Turn filter on","Schalte Filter an" },
978{ "Turn filter off","Schalte Filter aus" }, 978{ "Turn filter off","Schalte Filter aus" },
979{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" }, 979{ "Key bindings KOrganizer/Pi","Tastatur Belegung KOrganizer/Pi" },
980{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" }, 980{ "<p><b>White</b>: Item readonly</p>\n","<p><b>Weiss</b>: Eintrag schreibgeschützt</p>\n" },
981{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" }, 981{ "<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n","<p><b>Dunkelgelb</b>: Termin/Todo mit Teilnehmern.</p>\n" },
982{ "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" }, 982{ "<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n","<p><b>Schwarz</b>: Termin/Todo mit Teilnehmern. Sie sind der Organisator!</p>\n" },
983{ "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" }, 983{ "<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n","<p><b>Dunkelgrün</b>: Information(Beschreibung) verfügbar.([i] in WN Ansicht)</p>\n" },
984{ "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" }, 984{ "<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n","<p><b>Blau</b>: Wiederholender Termin.([r] in Whats'Next Ansicht)</p>\n" },
985{ "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" }, 985{ "<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n","<p><b>Rot</b>: Alarm gesetzt.([a] in Whats'Next Ansicht)</p>\n" },
986{ "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" }, 986{ "<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n","<p><b>Kreuz</b>: Eintrag gecancelt.([c] in Whats'Next Ansicht)</p>\n" },
987{ "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" }, 987{ "<p><b>(for square icons in agenda and month view)</b></p>\n","<p><b>(für quadratische Icons in Agenda und Monats Ansicht)</b></p>\n" },
988{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" }, 988{ "<p><h2>KO/Pi icon colors:</h2></p>\n","<p><h2>KO/Pi Icon Farben:</h2></p>\n" },
989{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" }, 989{ "<p><b>E</b>: Edit item</p>\n","<p><b>E</b>: Editiere Eintrag</p>\n" },
990{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" }, 990{ "<p><b>A</b>: Show agenda view.</p>\n","<p><b>A</b>: Zeige Agenda Ansicht.</p>\n" },
991{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" }, 991{ "<p><b>I,C</b>: Close dialog.</p>\n","<p><b>I,C</b>: Schließe Dialog.</p>\n" },
992{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" }, 992{ "<p><h3>In event/todo viewer:</h3></p>\n","<p><h3>In Termin/Todo Detail-Anzeige:</h3></p>\n" },
993{ "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" }, 993{ "<p><b>shift+up/down</b>: Goto first/last item</p>\n","<p><b>shift+up/down</b>: Gehe zum ersten/letzten Eintrag</p>\n" },
994{ "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" }, 994{ "<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n","<p><b>ctrl+up/down</b>: Gehe hoch/runter 20% aller Einträge</p>\n" },
995{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" }, 995{ "<p><b>up/down</b>: Next/prev item</p>\n","<p><b>up/down</b>: Nächster/vorheriger Eintrag</p>\n" },
996{ "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" }, 996{ "<p><b>return+shift</b>: Deselect item+one step down</p>\n","<p><b>return+shift</b>: Deselektiere Item+Cursor einen Eintrag runter</p>\n" },
997{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" }, 997{ "<p><b>return</b>: Select item+one step down</p>\n","<p><b>return</b>: Selektiere Item+Cursor einen Eintrag runter</p>\n" },
998{ "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" }, 998{ "<p><b>I</b>: Show info of current item+one step down.</p>\n","<p><b>I</b>: Zeige Detail-Ansicht vom sel.Eintrag+Cursor einen Eintrag runter.</p>\n" },
999{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" }, 999{ "<p><h3>In list view:</h3></p>\n","<p><h3>In Listen Ansicht:</h3></p>\n" },
1000{ "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" }, 1000{ "<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n","<p><b>return+shift</b>: Markiere Todo als nicht erledigt+Cursor einen Eintrag runter</p>\n" },
1001{ "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" }, 1001{ "<p><b>return</b>: Mark item as completed+one step down.</p>\n","<p><b>return</b>: Markiere Todo als erledigt+Cursor einen Eintrag runter.</p>\n" },
1002{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" }, 1002{ "<p><b>Q</b>: Toggle quick todo line edit.</p>\n","<p><b>Q</b>: Zeige/verstecke Quick Todo Eingabe Zeile.</p>\n" },
1003{ "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" }, 1003{ "<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n","<p><b>shift+P</b>: Mache Todo zum neuen <b>P</b>arent Todo für das Todo, welches mit shift+Sselektiert wurde.</p>\n" },
1004{ "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" }, 1004{ "<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n","<p><b>shift+S</b>: Mache Todo zum <b>S</b>ubtodo</p>\n" },
1005{ "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" }, 1005{ "<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n","<p><b>shift+U</b>: <b>U</b>nparent Todo (Mache Sub-Todo zum Toplevel Todo)</p>\n" },
1006{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" }, 1006{ "<p><h3>In todo view:</h3></p>\n","<p><h3>In Todo Anzige:</h3></p>\n" },
1007{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" }, 1007{ "<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n","<p><b>ctrl+up/down</b>: Scrolle kleine Todo Ansicht</p>\n" },
1008{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" }, 1008{ "<p><b>up/down</b>: Scroll agenda view</p>\n","<p><b>up/down</b>: Scrolle Agenda Ansicht</p>\n" },
1009{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" }, 1009{ "<p><h3>In agenda view:</h3></p>\n","<p><h3>In Agenda Ansicht:</h3></p>\n" },
1010{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" }, 1010{ "<p><b>del,backspace</b>: Delete selected item</p>\n","<p><b>del,backspace</b>: Lösche selektiertes Item</p>\n" },
1011{ "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" }, 1011{ "<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n","<p><b>left</b>: Vorh. Woche | <b>left+ctrl</b>: Vorh. Monat</p>\n" },
1012{ "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" }, 1012{ "<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n","<p><b>right</b>: Nächste Woche | <b>right+ctrl</b>: Nächste Woche</p>\n" },
1013{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" }, 1013{ "<p><b>B</b>: Edit description (details) of selected item</p>\n","<p><b>B</b>: Editiere Beschreibung (Details) des selektierten Items</p>\n" },
1014{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" }, 1014{ "<p><b>C</b>: Show current time in agenda view</p>\n","<p><b>C</b>: Zeige aktuelle Zeit in Agenda Ansicht</p>\n" },
1015{ "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" }, 1015{ "<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n","<p><b>+,-</b> : Zoom rein/raus Agenda | <b>A</b>: Wechsle Ganztag Agenda Höhe</p>\n" },
1016{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" }, 1016{ "<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n","<p><b>S+ctrl</b>: Füge Sub-Todo hinzu | <b>X+ctrl</b>: Zeige/verstecke Datumsnavigator</p>\n" },
1017{ "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" }, 1017{ "<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n","<p><b>T</b>: Gehe zu Heute | <b>T+ctrl</b>: Neues Todo</p>\n" },
1018{ "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" }, 1018{ "<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n","<p><b>E</b>: Editiere selektiertes Item |<b> E+ctrl</b>: Neuer Termin</p>\n" },
1019{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" }, 1019{ "<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n","<p><b>D</b>: Ein-Tages Ansicht | <b>M</b>: Monatsansicht</p>\n" },
1020{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" }, 1020{ "<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n","<p><b>Z,Y</b>: Arbeitswochenansicht | <b>U</b>: Wochenansicht</p>\n" },
1021{ "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" }, 1021{ "<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n","<p><b>V</b>: Todo Ansicht | <b>L</b>: Termin Listen Ansicht</p>\n" },
1022{ "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " }, 1022{ "<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ","<p><b>X</b>: Nächste-X-Tage Ansicht | <b>W</b>: What's Next Ansicht\n " },
1023{ "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" }, 1023{ "<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n","<p><b>1-0</b> (+<b>ctrl</b>): Selektiere Filter 1-10 (11-20)</p>\n" },
1024{ "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" }, 1024{ "<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n","<p><b>O</b>: Filter An/Aus | <b>J</b>: Journal Ansicht</p>\n" },
1025{ "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" }, 1025{ "<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n","<p><b>Space</b>: Zeige fullscreen | <b>P</b>: Datums Picker</p>\n" },
1026{ "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" }, 1026{ "<p><b>I</b>: Show info for selected event/todo</p>\n","<p><b>I</b>: Zeige Info (Details) für selektiertes Item</p>\n" },
1027{ "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" }, 1027{ "<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n","<p><b>H</b>: Dieser Hilfe Dialog | <b>S</b>: Such Dialog</p>\n" },
1028{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" }, 1028{ "<p><h2>KO/Pi key shortcuts:</h2></p>\n","<p><h2>KO/Pi Tastatur Kurzbefehle:</h2></p>\n" },
1029{ "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" }, 1029{ "After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n","Nachdem etwas geändert wurde, werden die\nDaten automatisch in die Datei abgespeichert\n~/kdepim/apps/korganizer/mycalendar.ics\nnach (konfigurierbar) drei Minuten.\nAus Sicherheitsgründen wird noch einmal\nnach 10 Min. abgespeichert, wenn keine\nÄnderungen vorgenommen wurden. Die \nDaten werden automatisch gespeichert,\nwenn KO/Pi beendet wird.\nSie können eine Backup-Datei erstellen im\nMenu: Datei - Speichere Kalender Backup\n" },
1030{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" }, 1030{ "Auto Saving in KOrganizer/Pi","Auto Speichern in KOrganizer/Pi" },
1031{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" }, 1031{ "\nhttp://sourceforge.net/projects/kdepimpi\n","\nhttp://sourceforge.net/projects/kdepimpi\n" },
1032{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" }, 1032{ "\nor report them in the bugtracker on\n","\noder trage sie in dem Bugtracker ein auf\n" },
1033{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" }, 1033{ "\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n","\nBitte melde fehlerhaftes Verhalten an\nlutz@pi-sync.info\n" },
1034{ "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" }, 1034{ "2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n","2) Ein Audio Alarm Daemon\nfür den Zaurus ist verfügbar\nals zusätzliche Anwendung\n" },
1035{ "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" }, 1035{ "1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n","1) Importieren von *.vcs oder *.ics Dateien von\nanderen Anwendungen kann möglicherweise\n nicht richtig funktionieren,\nwenn die Termine Eigenschaften haben,\ndie KO/Pi nicht unterstützt.\n" },
1036{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" }, 1036{ "Known Problems in KOrganizer/Pi","Bekannte Probleme in KOrganizer/Pi" },
1037{ "KO/Pi FAQ","KO/Pi FAQ" }, 1037{ "KO/Pi FAQ","KO/Pi FAQ" },
1038{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" }, 1038{ "PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n","PDA-Edition\nfür: Zaurus 5x00/7x0/860/3000/6000\n" },
1039{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" }, 1039{ "KOrganizer/Platform-independent\n","KOrganizer/Platform-independent\n" },
1040{ "About KOrganizer/Pi","Über KOrganizer/Pi" }, 1040{ "About KOrganizer/Pi","Über KOrganizer/Pi" },
1041{ "From: ","Von: " }, 1041{ "From: ","Von: " },
1042{ "Remove sync info","Entferne Sync Info" }, 1042{ "Remove sync info","Entferne Sync Info" },
1043{ "For all profiles","Für alle Profile" }, 1043{ "For all profiles","Für alle Profile" },
1044{ "Hide not Running","Verstecke nicht Laufende" }, 1044{ "Hide not Running","Verstecke nicht Laufende" },
1045{ "ME","ME" }, 1045{ "ME","ME" },
1046{ "Toolbar","Toolbar" }, 1046{ "Toolbar","Toolbar" },
1047{ "Undo Delete...","Löschen rückgängig machen..." }, 1047{ "Undo Delete...","Löschen rückgängig machen..." },
1048{ "Undo Delete","Löschen rückgängig machen" }, 1048{ "Undo Delete","Löschen rückgängig machen" },
1049{ "KDE Sync HowTo...","KDE Sync HowTo..." }, 1049{ "KDE Sync HowTo...","KDE Sync HowTo..." },
1050{ "Multi Sync HowTo...","Multi Sync HowTo..." }, 1050{ "Multi Sync HowTo...","Multi Sync HowTo..." },
1051{ "Januar","Januar" }, 1051{ "Januar","Januar" },
1052{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" }, 1052{ "KO/Pi Keys + Colors","KO/Pi Tasten + Farben" },
1053{ "No Filter","Kein Filter" }, 1053{ "No Filter","Kein Filter" },
1054{ "Multiple Sync options","Multi Sync Optionen" }, 1054{ "Multiple Sync options","Multi Sync Optionen" },
1055{ "Sync algo options","Sync Ablauf Optionen" }, 1055{ "Sync algo options","Sync Ablauf Optionen" },
1056{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" }, 1056{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
1057{ "Incoming calendar filter:","Eingehender Kalender Filter:" }, 1057{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
1058{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" }, 1058{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
1059{ "Write back options","Optionen zum Zurückschreiben" }, 1059{ "Write back options","Optionen zum Zurückschreiben" },
1060{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" }, 1060{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
1061{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" }, 1061{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
1062{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" }, 1062{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
1063{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" }, 1063{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
1064{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" }, 1064{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
1065{ "Time period","Zeitspanne" }, 1065{ "Time period","Zeitspanne" },
1066{ "From ","Von " }, 1066{ "From ","Von " },
1067{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " }, 1067{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
1068{ " weeks in the future "," Wochen in der Zukunft " }, 1068{ " weeks in the future "," Wochen in der Zukunft " },
1069{ "Profile kind specific settings","Profil Art abhängige Einstellungen" }, 1069{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
1070{ "Local temp file:","Lokale temp Datei:" }, 1070{ "Local temp file:","Lokale temp Datei:" },
1071{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" }, 1071{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
1072{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" }, 1072{ "Aborted! Nothing synced!","Abgebrochen! Nichts wurde gesynct!" },
1073{ "Language","Sprache" }, 1073{ "Language","Sprache" },
1074{ "Time Format","Zeit Format" }, 1074{ "Time Format","Zeit Format" },
1075{ "Time Zone","Zeit Zone" }, 1075{ "Time Zone","Zeit Zone" },
1076{ "%1 groups subscribed","%1 Guppen abboniert" }, 1076{ "%1 groups subscribed","%1 Guppen abboniert" },
1077{ "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" }, 1077{ "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" },
1078{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 1078{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
1079{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 1079{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
1080{ "Save settings","Speichere Einstellungen" }, 1080{ "Save settings","Speichere Einstellungen" },
1081{ "Save standard","Speichere Standard" }, 1081{ "Save standard","Speichere Standard" },
1082{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 1082{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
1083{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 1083{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
1084{ "Data storage path","Daten Speicherpfad" }, 1084{ "Data storage path","Daten Speicherpfad" },
1085{ "Language","Sprache" }, 1085{ "Language","Sprache" },
1086{ "Show time in agenda items","Zeige Zeit in Agenda Items" }, 1086{ "Show time in agenda items","Zeige Zeit in Agenda Items" },
1087{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" }, 1087{ "Color for Sundays + category "Holiday"","Farbe für Sonntags + Kategorie "Feiertag"" },
1088{ "Show events that are done","Zeige abgelaufene Termine" }, 1088{ "Show events that are done","Zeige abgelaufene Termine" },
1089{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" }, 1089{ "Hide not running Todos in To-do view","Verstecke nicht laufende Todos" },
1090{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 1090{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
1091{ "KO/Pi","KO/Pi" }, 1091{ "KO/Pi","KO/Pi" },
1092{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" }, 1092{ "There is nothing to undo!","Es gibt nichts zum\nRückgängigmachen!" },
1093{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." }, 1093{ "Recreating edit dialog. Please wait...","Recreating edit dialog. Please wait..." },
1094{ "Sound.Al.: ","Sound.Al.: " }, 1094{ "Sound.Al.: ","Sound.Al.: " },
1095{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" }, 1095{ "From: %1 To: %2 %3","Von: %1 Bis: %2 %3" },
1096{ "Restore","Wiederherstellen" }, 1096{ "Restore","Wiederherstellen" },
1097{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, 1097{ "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" },
1098{ "% completed","% erledigt" }, 1098{ "% completed","% erledigt" },
1099{ "%d item(s) found.","%d Item(s) gefunden." }, 1099{ "%d item(s) found.","%d Item(s) gefunden." },
1100{ "Set complete","Setze auf erledigt" }, 1100{ "Set complete","Setze auf erledigt" },
1101{ "(cancelled)","(gecancelt)" }, 1101{ "(cancelled)","(gecancelt)" },
1102{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" }, 1102{ "Click on the week number to\nshow week in agenda view","Klicke auf die Wochennummer\num die Woche in der Agenda anzuzeigen" },
1103{ " Local time "," Locale Zeit " }, 1103{ " Local time "," Locale Zeit " },
1104{ "Form2","Form2" }, 1104{ "Form2","Form2" },
1105{ "Filter enabled","Filter angeschaltet" }, 1105{ "Filter enabled","Filter angeschaltet" },
1106{ "Edit Filters","Ändere Filter" }, 1106{ "Edit Filters","Ändere Filter" },
1107{ "Print What's Next View...","Drucke What's Next Ansicht..." }, 1107{ "Print What's Next View...","Drucke What's Next Ansicht..." },
1108{ "Agenda","Agenda" }, 1108{ "Agenda","Agenda" },
1109{ " ("," (" }, 1109{ " ("," (" },
1110{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" }, 1110{ "<p><b>Due on:</b> %1</p>","<p><b>Fällig am:</b> %1</p>" },
1111{ "Print","Print" }, 1111{ "Print","Print" },
1112{ "&Setup Printer...","Drucker &Setup..." }, 1112{ "&Setup Printer...","Drucker &Setup..." },
1113{ "View Type","Zeige Typ" }, 1113{ "View Type","Zeige Typ" },
1114{ "Page &orientation:","Seiten Ausrichtung:" }, 1114{ "Page &orientation:","Seiten Ausrichtung:" },
1115{ "Use Default of Selected Style","Default des selektierten Stils" }, 1115{ "Use Default of Selected Style","Default des selektierten Stils" },
1116{ "Use Default Setting of Printer","Default Einstellung des Druckers" }, 1116{ "Use Default Setting of Printer","Default Einstellung des Druckers" },
1117{ "Portrait","Portrait" }, 1117{ "Portrait","Portrait" },
1118{ "Landscape","Landschaft" }, 1118{ "Landscape","Landschaft" },
1119{ "Print day","Drucke Tag" }, 1119{ "Print day","Drucke Tag" },
1120{ "CalPrintDay_Base","CalPrintDay_Base" }, 1120{ "CalPrintDay_Base","CalPrintDay_Base" },
1121{ "Date && Time Range","Datum && Zeitspanne" }, 1121{ "Date && Time Range","Datum && Zeitspanne" },
1122{ "&End date:","&Enddatum:" }, 1122{ "&End date:","&Enddatum:" },
1123{ "&Start date:","&Startdatum:" }, 1123{ "&Start date:","&Startdatum:" },
1124{ "Start &time:","Startzeit:" }, 1124{ "Start &time:","Startzeit:" },
1125{ "End ti&me:","Endzeit:" }, 1125{ "End ti&me:","Endzeit:" },
1126{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" }, 1126{ "E&xtend time range to include all events","Erweitere Zeitspanne um alle Termine einzuschliessen" },
1127{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" }, 1127{ "Include to&dos that are due on the printed day(s)","Inclusive To&dos, die an den selektierten Tagen fällig sind" },
1128{ "Alt+D","Alt+D" }, 1128{ "Alt+D","Alt+D" },
1129{ "&Use colors","Nutze Farben" }, 1129{ "&Use colors","Nutze Farben" },
1130{ "Alt+U","Alt+U" }, 1130{ "Alt+U","Alt+U" },
1131{ "Print week","Drucke Woche" }, 1131{ "Print week","Drucke Woche" },
1132{ "CalPrintWeek_Base","CalPrintWeek_Base" }, 1132{ "CalPrintWeek_Base","CalPrintWeek_Base" },
1133{ "Use &colors","Nutze Farben" }, 1133{ "Use &colors","Nutze Farben" },
1134{ "Type of View","Typ der Ansicht" }, 1134{ "Type of View","Typ der Ansicht" },
1135{ "Print as &Filofax page","Drucke als &Filofax Seite" }, 1135{ "Print as &Filofax page","Drucke als &Filofax Seite" },
1136{ "Alt+F","Alt+F" }, 1136{ "Alt+F","Alt+F" },
1137{ "Print as &timetable view:","Drucke als Zeittabelle:" }, 1137{ "Print as &timetable view:","Drucke als Zeittabelle:" },
1138{ "Alt+T","Alt+T" }, 1138{ "Alt+T","Alt+T" },
1139{ "Print as split week view","Drucke als gesplittete Wochenansicht" }, 1139{ "Print as split week view","Drucke als gesplittete Wochenansicht" },
1140{ "Print month","Drucke Monat" }, 1140{ "Print month","Drucke Monat" },
1141{ "CalPrintMonth_Base","CalPrintMonth_Base" }, 1141{ "CalPrintMonth_Base","CalPrintMonth_Base" },
1142{ "&Start month:","&Startmonat:" }, 1142{ "&Start month:","&Startmonat:" },
1143{ "&End month:","&Endmonat:" }, 1143{ "&End month:","&Endmonat:" },
1144{ "Print week &numbers","Drucke Wochen Nummer(n)" }, 1144{ "Print week &numbers","Drucke Wochen Nummer(n)" },
1145{ "Print todos","Drucke Todos" }, 1145{ "Print todos","Drucke Todos" },
1146{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" }, 1146{ "CalPrintTodoConfig_Base","CalPrintTodoConfig_Base" },
1147{ "Include &description of the item","Inclusive Itembeschreibung" }, 1147{ "Include &description of the item","Inclusive Itembeschreibung" },
1148{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" }, 1148{ "Include d&ue date of the item","Inclusive Fälligkeitsdatum des Items" },
1149{ "Include &priority of the item","Inclusive Priorität des Items" }, 1149{ "Include &priority of the item","Inclusive Priorität des Items" },
1150{ "Items to Print","Zu druckende Items" }, 1150{ "Items to Print","Zu druckende Items" },
1151{ "&From:","Von:" }, 1151{ "&From:","Von:" },
1152{ "&To:","Bis:" }, 1152{ "&To:","Bis:" },
1153{ "Print &all todo items","Drucke alle Todo Items" }, 1153{ "Print &all todo items","Drucke alle Todo Items" },
1154{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" }, 1154{ "Print only &uncompleted items","Drucke nur nicht erledigte Todos" },
1155{ "Only items due in the &range:","Nur Items in dem Zeitraum:" }, 1155{ "Only items due in the &range:","Nur Items in dem Zeitraum:" },
1156{ "Todo List","Todo Liste" }, 1156{ "Todo List","Todo Liste" },
1157{ "&Title:","&Titel:" }, 1157{ "&Title:","&Titel:" },
1158{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" }, 1158{ "Co&nnect subtodos with its parent","Verbinde Untertodos mit ihren Ober-Todos" },
1159{ "Todo list","Todo Liste" }, 1159{ "Todo list","Todo Liste" },
1160{ "&Print...","Drucke..." }, 1160{ "&Print...","Drucke..." },
1161{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, 1161{ "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" },
1162{ "[Unconfigured]","[Unkonfiguriert]" }, 1162{ "[Unconfigured]","[Unkonfiguriert]" },
1163{ "OK","OK" }, 1163{ "OK","OK" },
1164{ "FilterEditor","FilterEditor" }, 1164{ "FilterEditor","FilterEditor" },
1165{ "Include","Inclusive" }, 1165{ "Include","Inclusive" },
1166{ "Exclude","Exclusive" }, 1166{ "Exclude","Exclusive" },
1167{ "Edit Selection...","Editiere Auswahl" }, 1167{ "Edit Selection...","Editiere Auswahl" },
1168{ "recurring events","wiederholende Termine" }, 1168{ "recurring events","wiederholende Termine" },
1169{ "recurr. events","wiederh.Termine" }, 1169{ "recurr. events","wiederh.Termine" },
1170{ "completed to-dos","erledigte Todos" }, 1170{ "completed to-dos","erledigte Todos" },
1171{ "events","Termine" }, 1171{ "events","Termine" },
1172{ "todos","Todos" }, 1172{ "todos","Todos" },
1173{ "journals","Journale" }, 1173{ "journals","Journale" },
1174{ "public","öffentl." }, 1174{ "public","öffentl." },
1175{ "private","privat" }, 1175{ "private","privat" },
1176{ "confidential","vertraul." }, 1176{ "confidential","vertraul." },
1177{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" }, 1177{ "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Untertodos.\nAlle erledigten Untertodos\nwerden auch gelöscht!" },
1178{ "Yesterday","Gestern" }, 1178{ "Yesterday","Gestern" },
1179{ "Day after tomorrow","Übermorgen" }, 1179{ "Day after tomorrow","Übermorgen" },
1180{ "Tomorrow","Morgen" }, 1180{ "Tomorrow","Morgen" },
1181{ "Day before yesterday","Vorgestern" }, 1181{ "Day before yesterday","Vorgestern" },
1182{ "Size %1","Größe %1" }, 1182{ "Size %1","Größe %1" },
1183{ "New Agendasize: %1","Neue Agendagröße: %1" }, 1183{ "New Agendasize: %1","Neue Agendagröße: %1" },
1184{ " (%1 y.)"," (%1 J.)" }, 1184{ " (%1 y.)"," (%1 J.)" },
1185{ "Allday:","Ganztägig:" }, 1185{ "Allday:","Ganztägig:" },
1186{ "compl.todos","erled.Todos" }, 1186{ "compl.todos","erled.Todos" },
1187{ "Day view","Tagesansicht" }, 1187{ "Day view","Tagesansicht" },
1188{ "Next days","Nächste Tage" }, 1188{ "Next days","Nächste Tage" },
1189{ "Next week","Nächste Woche" }, 1189{ "Next week","Nächste Woche" },
1190{ "Next two weeks","Nächste zwei Wochen" }, 1190{ "Next two weeks","Nächste zwei Wochen" },
1191{ "This month","Dieser Monat" }, 1191{ "This month","Dieser Monat" },
1192{ "Journal view","Journal" }, 1192{ "Journal view","Journal" },
1193{ "Display all opened","Zeige alle geöffnet" }, 1193{ "Display all opened","Zeige alle geöffnet" },
1194{ "Display all closed","Zeige alle geschlossen" }, 1194{ "Display all closed","Zeige alle geschlossen" },
1195{ "Display all flat","Zeige alle flach" }, 1195{ "Display all flat","Zeige alle flach" },
1196{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" }, 1196{ "<p><i>Completed on %1</i></p>","<p><i>Erledigt am %1</i></p>" },
1197{ "Default todo done color:","Standard Todo erledigt Farbe" }, 1197{ "Default todo done color:","Standard Todo erledigt Farbe" },
1198{ "Select week %1-%2","Wähle Woche %1-%2" }, 1198{ "Select week %1-%2","Wähle Woche %1-%2" },
1199{ "Select Week","Wähle Woche" }, 1199{ "Select Week","Wähle Woche" },
1200{ "Set alarm for selected...","Setze Alarm für Selekt..." }, 1200{ "Set alarm for selected...","Setze Alarm für Selekt..." },
1201{ "Set Alarm!","Setze Alarm!" }, 1201{ "Set Alarm!","Setze Alarm!" },
1202{ "Changed alarm for %1 items","Alarm für %1 Items geändert" }, 1202{ "Changed alarm for %1 items","Alarm für %1 Items geändert" },
1203{ " and "," und " }, 1203{ " and "," und " },
1204{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" }, 1204{ "<IMG src="%1"> only )","nur <IMG src="%1"> )" },
1205{ "Mail to selected","Mail an Ausgewählte" }, 1205{ "Mail to selected","Mail an Ausgewählte" },
1206{ "Mail to all","Mail an Alle" }, 1206{ "Mail to all","Mail an Alle" },
1207{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, 1207{ "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" },
1208{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, 1208{ "Set reminder ON with offset to:","Alarm AN mit Offset auf:" },
1209{ " on"," am" }, 1209{ " on"," am" },
1210{ " completed on "," erledigt am " }, 1210{ " completed on "," erledigt am " },
1211{ "Save as Event template","Speichere als Vorlage" }, 1211{ "Save as Event template","Speichere als Vorlage" },
1212{ "Load Event template","Lade Termin Vorlage" }, 1212{ "Load Event template","Lade Termin Vorlage" },
1213{ "Save as Journal template","Speichere als Journal Vorlage" }, 1213{ "Save as Journal template","Speichere als Journal Vorlage" },
1214{ "Insert Journal template","Füge Journal Vorlage ein" }, 1214{ "Insert Journal template","Füge Journal Vorlage ein" },
1215{ "Sub todos:<br>","Unter Todos:<br>" }, 1215{ "Sub todos:<br>","Unter Todos:<br>" },
1216{ "Parent todo:<br>","Über Todo:<br>" }, 1216{ "Parent todo:<br>","Über Todo:<br>" },
1217{ "Set current as color category","Setze Gewählte als Farbkategorie" }, 1217{ "Set current as color category","Setze Gewählte als Farbkategorie" },
1218{ " completed"," erledigt" }, 1218{ " completed"," erledigt" },
1219{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, 1219{ "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" },
1220{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, 1220{ "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." },
1221{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, 1221{ "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." },
1222{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, 1222{ "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." },
1223{ "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?" }, 1223{ "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?" },
1224{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, 1224{ "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." },
1225{ "Error","Fehler" }, 1225{ "Error","Fehler" },
1226{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." }, 1226{ ""You entered an invalid date!\n Date changed to current date.","Ungültiges Datum eingegeben.\nSetze heutiges Datum." },
1227{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." }, 1227{ "You entered an invalid date!\n Will use current date instead.","Ungültiges Datum eingegeben.\nSetze stattdessen heutiges Datum." },
1228{ "Warning","Warnung" }, 1228{ "Warning","Warnung" },
1229{ "Select week number","Wähle Wochen Nummer" }, 1229{ "Select week number","Wähle Wochen Nummer" },
1230{ "Februar","Februar" }, 1230{ "Februar","Februar" },
1231{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" }, 1231{ "Click on the week number to\nshow week zoomed","Klicke auf die Wochennummer\num die Woche groß zu zeigen" },
1232{ "W","W" }, 1232{ "W","W" },
1233{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" }, 1233{ "Click on this to\nselect week number","Klicke hierauf um\ndie Woche auszuwählen" },
1234{ "T: %1","T: %1" }, 1234{ "T: %1","T: %1" },
1235{ "Start: ","Start: " }, 1235{ "Start: ","Start: " },
1236{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " }, 1236{ "Pi-Sync options for device: ","Pi-Sync Einstellungen für Gerät: " },
1237{ "Password for remote access:","Passwort für fernen Zugriff:" }, 1237{ "Password for remote access:","Passwort für fernen Zugriff:" },
1238{ "Remote IP address:","Ferne IP Adresse:" }, 1238{ "Remote IP address:","Ferne IP Adresse:" },
1239{ "Remote port number:","Ferne Port Nummer:" }, 1239{ "Remote port number:","Ferne Port Nummer:" },
1240{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." }, 1240{ "Remote file saved to temp file.","Ferne Daten in temp Datei gespeichert." },
1241{ "Remote from: ","Fern von: " }, 1241{ "Remote from: ","Fern von: " },
1242{ "Local from: ","Lokal von: " }, 1242{ "Local from: ","Lokal von: " },
1243{ "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" }, 1243{ "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" },
1244{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 1244{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
1245{ "Write back","Schreibe zurück" }, 1245{ "Write back","Schreibe zurück" },
1246{ "KO/Pi Synchronization","KO/Pi Synchronisation" }, 1246{ "KO/Pi Synchronization","KO/Pi Synchronisation" },
1247{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 1247{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
1248{ "Received sync request","Sync Anfrage erhalten" }, 1248{ "Received sync request","Sync Anfrage erhalten" },
1249{ "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." }, 1249{ "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." },
1250{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 1250{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
1251{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 1251{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
1252{ "Sending file...","Sende Datei..." }, 1252{ "Sending file...","Sende Datei..." },
1253{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1253{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1254{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1254{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1255{ "Received %1 bytes","%1 Bytes erhalten" }, 1255{ "Received %1 bytes","%1 Bytes erhalten" },
1256{ "Writing file to disk...","Speichere Datei..." }, 1256{ "Writing file to disk...","Speichere Datei..." },
1257{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1257{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1258{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1258{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1259{ "Synchronize!","Synchronisiere!" }, 1259{ "Synchronize!","Synchronisiere!" },
1260{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1260{ "High clock skew!","Großer Uhrzeitunterschied!" },
1261{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1261{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1262{ "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!" }, 1262{ "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!" },
1263{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1263{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1264{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1264{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1265{ "List week view","Listenwochenansicht" }, 1265{ "List week view","Listenwochenansicht" },
1266{ "List week","Listenwochenansicht" }, 1266{ "List week","Listenwochenansicht" },
1267{ "Next Week","Nächste Woche" }, 1267{ "Next Week","Nächste Woche" },
1268{ "Previous Week","Vorherige Woche" }, 1268{ "Previous Week","Vorherige Woche" },
1269{ "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." }, 1269{ "No items were found matching\nyour search expression.\nUse the wildcard characters\n'*' and '?' where needed.","Keine Einträge gefunden die\ndem Suchausdruck entsprechen.\nBenutze Platzhalter Zeichen\n'*' und '?' wo benötigt." },
1270{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, 1270{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
1271{ "Details","Details" }, 1271{ "Details","Details" },
1272{ "Created time","Erstellt Zeit" }, 1272{ "Created time","Erstellt Zeit" },
1273{ "Last modified time","Geändert Zeit" }, 1273{ "Last modified time","Geändert Zeit" },
1274{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, 1274{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
1275{ "View Options","Anzeige Optionen" }, 1275{ "View Options","Anzeige Optionen" },
1276{ "<b>Created: ","<b>Erstellt am: " }, 1276{ "<b>Created: ","<b>Erstellt am: " },
1277{ "<b>Last modified: ","<b>Zuletzt geändert am: " }, 1277{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
1278{ "Journal: ","Journal: " }, 1278{ "Journal: ","Journal: " },
1279{ "yearly","jährlich" }, 1279{ "yearly","jährlich" },
1280{ "(%1) ","%1-" }, 1280{ "(%1) ","%1-" },
1281{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, 1281{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
1282{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, 1282{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
1283{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, 1283{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
1284{ "Summary/Loc.","Titel/Ort" }, 1284{ "Summary/Loc.","Titel/Ort" },
1285{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1285{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1286{ "Week Number","Wochennummer" }, 1286{ "Week Number","Wochennummer" },
1287{ "Import","Importiere" }, 1287{ "Import","Importiere" },
1288{ "Export","Exportiere" }, 1288{ "Export","Exportiere" },
1289{ "Beam","Beame" }, 1289{ "Beam","Beame" },
1290{ "Export selected","Exportiere Selektierte" }, 1290{ "Export selected","Exportiere Selektierte" },
1291{ "As iCal (ics) file...","Als iCal (ics) Datei..." }, 1291{ "As iCal (ics) file...","Als iCal (ics) Datei..." },
1292{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." }, 1292{ "As vCal (vcs) file...","Als vCal (vcs) Datei..." },
1293{ "Journal/Details...","Journale/Details..." }, 1293{ "Journal/Details...","Journale/Details..." },
1294{ "Agenda View","Agenda Ansicht" }, 1294{ "Agenda View","Agenda Ansicht" },
1295{ "Show current time","Zeige aktuelle Zeit" }, 1295{ "Show current time","Zeige aktuelle Zeit" },
1296{ "Edit new item","Bearbeite neuen Eintrag" }, 1296{ "Edit new item","Bearbeite neuen Eintrag" },
1297{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" }, 1297{ "Please select at least one\nof the types to search for:\n\nEvents\nTodos\nJournals","Bitte wählen Sie mindestens\neinen dieser Typen\num darin zu suchen:\n\nTermine\nTodos\nJournale" },
1298{ "There is no next alarm.","Es gibt keinen nächsten Alarm." }, 1298{ "There is no next alarm.","Es gibt keinen nächsten Alarm." },
1299{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" }, 1299{ "%1 %2 - %3 (next event/todo with alarm)","%1 %2 - %3 (nächster Termin/Todo mit Alarm)" },
1300{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" }, 1300{ "The next alarm is in:\n","Der nächste Alarm ist in:\n" },
1301{ "%1 days\n","%1 Tagen\n" }, 1301{ "%1 days\n","%1 Tagen\n" },
1302{ "1 day\n","1 Tag\n" }, 1302{ "1 day\n","1 Tag\n" },
1303{ "%1 hours\n","%1 Stunden\n" }, 1303{ "%1 hours\n","%1 Stunden\n" },
1304{ "1 hour\n","1 Stunde\n" }, 1304{ "1 hour\n","1 Stunde\n" },
1305{ "%1 minutes\n","%1 Minuten\n" }, 1305{ "%1 minutes\n","%1 Minuten\n" },
1306{ "1 minute\n","1 Minute\n" }, 1306{ "1 minute\n","1 Minute\n" },
1307{ "Only one toolbar","Nur eine Toolbar" }, 1307{ "Only one toolbar","Nur eine Toolbar" },
1308{ "Print","Drucke" }, 1308{ "Print","Drucke" },
1309{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." }, 1309{ "Print selected event / todo...","Drucke ausgewählten Termin / Todo..." },
1310{ "There is nothing selected!","Es ist nichts ausgewählt!" }, 1310{ "There is nothing selected!","Es ist nichts ausgewählt!" },
1311{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " }, 1311{ "\n\nDo you really want to print this item?","\n\nMöchten Sie wirklich diesen Eintrag ausdrucken? " },
1312{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" }, 1312{ "KO/Pi Print Confirmation","KO/Pi Druckbestätigung" },
1313{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" }, 1313{ "This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n","Dies druckt die Ansicht wie man sie sieht.\n(Mit dem kompletten Inhalt natürlich.)\nMan kann das Layout ändern durch ändern der Fenstergröße.\nDrucke unskaliert druckt ggf. mehrere Seiten\nabhängig von der Menge der Daten.\nDrucke runterskaliert um auf eine Seite zu passen\ndruckt alles auf eine Seite.\nDrucke hoch/runterskaliert um genau auf eine Seite zu passen\nvergrößert den Text gegebenenfalls.\nDas Seitenlayout kann im nächsten Dialog gewählt werden.\n" },
1314{ "KO/Pi Printout","KO/Pi Ausdruck" }, 1314{ "KO/Pi Printout","KO/Pi Ausdruck" },
1315{ "Print unscaled","Drucke unskaliert" }, 1315{ "Print unscaled","Drucke unskaliert" },
1316{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." }, 1316{ "Print scaled down to fit one page","Drucke runterskaliert um auf eine Seite zu passen." },
1317{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." }, 1317{ "Print scaled up/down to fit one page","Drucke hoch/runterskaliert um genau auf eine Seite zu passen." },
1318{ "Printout Mode","Druck Modus" }, 1318{ "Printout Mode","Druck Modus" },
1319{ "Filter menu icon","Filtermenu Icon" }, 1319{ "Filter menu icon","Filtermenu Icon" },
1320{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" }, 1320{ "<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n","<p><b>A+(shift oder ctrl)</b>: Zeige Zeit bis zum nächsten Alarm</p>\n" },
1321{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" }, 1321{ "<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n","<p><b>N</b>: Wechsle zur nächsten Ansicht, die ein Icon in der Toolbar hat</p>\n" },
1322{ "%1d","%1t" }, 1322{ "%1d","%1t" },
1323{ "%1h","%1std" }, 1323{ "%1h","%1std" },
1324{ "%1min","%1min" }, 1324{ "%1min","%1min" },
1325{ "( %1 before )","( %1 vorher )" }, 1325{ "( %1 before )","( %1 vorher )" },
1326{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" }, 1326{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
1327{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" }, 1327{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
1328{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." }, 1328{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
1329{ "Show Sync Events","Zeige Sync-Ereignisse" }, 1329{ "Show Sync Events","Zeige Sync-Ereignisse" },
1330{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" }, 1330{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
1331{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" }, 1331{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
1332{ " on "," am " }, 1332{ " on "," am " },
1333{ "On: ","Am: " }, 1333{ "On: ","Am: " },
1334{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" }, 1334{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
1335{ "Start/Stop todo...","Starte/Stoppe Todo..." }, 1335{ "Start/Stop todo...","Starte/Stoppe Todo..." },
1336{ "Color for running todos:","Farbe für laufende Todos:" }, 1336{ "Color for running todos:","Farbe für laufende Todos:" },
1337{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" }, 1337{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" },
1338{ "Todo is started","Todo ist gestartet" }, 1338{ "Todo is started","Todo ist gestartet" },
1339{ "Stop todo","Stoppe Todo" }, 1339{ "Stop todo","Stoppe Todo" },
1340{ "Todo is stopped","Todo ist gestoppt" }, 1340{ "Todo is stopped","Todo ist gestoppt" },
1341{ "Start todo","Starte Todo" }, 1341{ "Start todo","Starte Todo" },
1342{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" }, 1342{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" },
1343{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" }, 1343{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" },
1344{ "Todo has subtodos","Todo hat Untertodos" }, 1344{ "Todo has subtodos","Todo hat Untertodos" },
1345{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" }, 1345{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" },
1346{ "Colors","Farben" }, 1346{ "Colors","Farben" },
1347{ "Click on new parent item","Klicke auf neues Übertodo" }, 1347{ "Click on new parent item","Klicke auf neues Übertodo" },
1348{ "Reparenting aborted!","Übertodo setzen abgebrochen" }, 1348{ "Reparenting aborted!","Übertodo setzen abgebrochen" },
1349{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" }, 1349{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" },
1350{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, 1350{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" },
1351{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, 1351{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" },
1352{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 1352{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
1353{ "times","Zeiten" }, 1353{ "times","Zeiten" },
1354{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, 1354{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" },
1355{ "Backup enabled","Backup angeschaltet" }, 1355{ "Backup enabled","Backup angeschaltet" },
1356{ "Use standard backup dir","Standard Backupverzeichnis" }, 1356{ "Use standard backup dir","Standard Backupverzeichnis" },
1357{ "Number of Backups:","Anzahl der Backups" }, 1357{ "Number of Backups:","Anzahl der Backups" },
1358{ "Make backup every ","Mache ein Backup alle " }, 1358{ "Make backup every ","Mache ein Backup alle " },
1359{ " days"," Tage" }, 1359{ " days"," Tage" },
1360{ "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." }, 1360{ "Creating backup ... please wait ...","Erstelle Backup ... bitte warten ..." },
1361{ "Backup Failed!","Backup Problem!" }, 1361{ "Backup Failed!","Backup Problem!" },
1362{ "Try again now","Versuche jetzt nochmal" }, 1362{ "Try again now","Versuche jetzt nochmal" },
1363{ "Try again later","Versuche später nochmal" }, 1363{ "Try again later","Versuche später nochmal" },
1364{ "Try again tomorrow","Versuche morgen nochmal" }, 1364{ "Try again tomorrow","Versuche morgen nochmal" },
1365{ "Disable backup","Schalte Backup ab" }, 1365{ "Disable backup","Schalte Backup ab" },
1366{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 1366{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
1367{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 1367{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
1368{ "Choose action","Wähle Aktion" }, 1368{ "Choose action","Wähle Aktion" },
1369{ "Comment for todo:","Kommentar zum Todo:" }, 1369{ "Comment for todo:","Kommentar zum Todo:" },
1370{ "Stop+note","Stop+Notiz" }, 1370{ "Stop+note","Stop+Notiz" },
1371{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, 1371{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" },
1372{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, 1372{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" },
1373{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, 1373{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" },
1374{ "Print complete list","Drucke komplette Liste" }, 1374{ "Print complete list","Drucke komplette Liste" },
1375{ "Hide all selected","Verstecke Selektierte" }, 1375{ "Hide all selected","Verstecke Selektierte" },
1376{ "Add items","hinzufügen" }, 1376{ "Add items","hinzufügen" },
1377{ "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" }, 1377{ "One (or more) selected\ntodo has subtodos!\nDo you want to select\nall subtodos of all\nselected todos as well?","Ein (oder mehrere) ausgewähltes\nTodo hat Untertodos!\nMöchten Sie der Auswahlliste\nalle Untertodos von allen\nausgewählten Todos hinzufügen?" },
1378{ "Print List View...","Drucke Listenansicht..." }, 1378{ "Print List View...","Drucke Listenansicht..." },
1379{ "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." }, 1379{ "You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.","Sie können die <b>Listenansicht</b> und die Listenansicht im <b>Suchdialog</b> ausdrucken! Um das zu machen gehen Sie bitte zur <b>Listenansicht</b> oder zum <b>Suchdialog</b>. Rechtsklicken Sie auf die Liste. Wählen Sie im Popupmenu den Eintrag <b>Drucke komplette Liste</b>. Das druckt die Liste so, wie man sie sieht. Sie können Listeneinträge entfernen ohne die korrespondierenden Ereignisse/Todos zu löschen! Selektieren sie einfach alle Einträge, die sie nicht ausdrucken möchten. Dann Rechtsklicken Sie auf einen Eintrag und wählen <b>Verstecke Selektierte</b>. Danach können Sie die Liste ohne diese Einträge ausdrucken." },
1380{ "Configure KO/Pi...","Konfiguriere KO/Pi..." }, 1380{ "Configure KO/Pi...","Konfiguriere KO/Pi..." },
1381{ "Global Settings...","Globale Einstellungen..." }, 1381{ "Global Settings...","Globale Einstellungen..." },
1382{ "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" }, 1382{ "<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n","<p><b>R</b>: Zeige Resource Ansicht | <b>F</b>: Editiere Filter </p>\n" },
1383{ "(disabled)","(abgeschaltet)" }, 1383{ "(disabled)","(abgeschaltet)" },
1384{ "New Calendar","Neuer Kalender" }, 1384{ "New Calendar","Neuer Kalender" },
1385{ "Calendar","Kalender" }, 1385{ "Calendar","Kalender" },
1386{ "Filter selector","Filterauswahl" }, 1386{ "Filter selector","Filterauswahl" },
1387{ "Filtermenu","Filtermenu" }, 1387{ "Filtermenu","Filtermenu" },
1388{ "Toggle Fullscreen","Vollbild umschalten" }, 1388{ "Toggle Fullscreen","Vollbild umschalten" },
1389{ "Toggle Resource View","Resourcenansicht umschalten" }, 1389{ "Toggle Resource View","Resourcenansicht umschalten" },
1390{ "Storage HowTo...","Speicherort HowTo..." }, 1390{ "Storage HowTo...","Speicherort HowTo..." },
1391{ "Timetracking HowTo...","Timetracking HowTo..." }, 1391{ "Timetracking HowTo...","Timetracking HowTo..." },
1392{ "Juni","Juni" }, 1392{ "Juni","Juni" },
1393{ "Juli","Juli" }, 1393{ "Juli","Juli" },
1394{ "ToDo:","ToDo:" }, 1394{ "ToDo:","ToDo:" },
1395{ "Set Calendar","Setze Kalender" }, 1395{ "Set Calendar","Setze Kalender" },
1396{ "Todo: %1","Todo: %1" }, 1396{ "Todo: %1","Todo: %1" },
1397{ ": (Prio ",": (Prio " }, 1397{ ": (Prio ",": (Prio " },
1398{ "Todos","Todos" }, 1398{ "Todos","Todos" },
1399{ "Todo Viewer","Todo Viewer" }, 1399{ "Todo Viewer","Todo Viewer" },
1400{ "Todo ","Todo " }, 1400{ "Todo ","Todo " },
1401{ " Calendar \n Resource "," Kalender \n Resource " }, 1401{ " Calendar \n Resource "," Kalender \n Resource " },
1402{ " Color "," Farbe " }, 1402{ " Color "," Farbe " },
1403{ "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" }, 1403{ "The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>. Möchten Sie diesen Kalender aus KO/Pi entfernen? (Die Datei wird dabei nicht gelöscht!)" },
1404{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" }, 1404{ "The calendar <b>%1</b> is displaying file <b>%2</b>","Der Kalender <b>%1</b> zeigt die Datei <b>%2</b>" },
1405{ "Add new Calendar","Füge Kalender hinzu" }, 1405{ "Add new Calendar","Füge Kalender hinzu" },
1406{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" }, 1406{ "<b>Name of new calendar:</b>","<b>Name des Kalenders:</b>" },
1407{ "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" }, 1407{ "<b>Local ical (*.ics) file:</b>","<b>Lokale ical (*.ics) Datei:</b>" },
1408{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" }, 1408{ "Sorry, the calendar name is empty!","Sorry, der Kalendername ist leer!" },
1409{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" }, 1409{ "Sorry, the file name is empty!","Sorry, der Dateiname ist leer!" },
1410{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." }, 1410{ "Error loading calendar file\n%1.","Fehler beim Laden der Kalenderdatei\n%1." },
1411{ "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" }, 1411{ "The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>","Der Kalender <b>%1</b> ist nicht geladen! Das Laden der Datei <b>%2</b> schlug fehl! <b>Soll erneut versucht werden den Kalender zu laden?</b>" },
1412{ "Global application font for all apps:","Globale Schriftart:" }, 1412{ "Global application font for all apps:","Globale Schriftart:" },
1413{ "Application Font","Applikationsschriftart" }, 1413{ "Application Font","Applikationsschriftart" },
1414{ "Kx/Pi","Kx/Pi" }, 1414{ "Kx/Pi","Kx/Pi" },
1415{ "Backup","Backup" }, 1415{ "Backup","Backup" },
1416{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" }, 1416{ "KDE-Pim Global Settings","KDE-Pim Globale Einstellungen" },
1417{ "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" }, 1417{ "Sorry, the calendar name \n%1\nalready exists!\nPlease choose another name!","Sorry, der Kalendername \n%1\nist schon in Benutzung!\nBitte wählen Sie einen anderen!" },
1418{ "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" }, 1418{ "Sorry, the file \n%1\nis already loaded!\nPlease choose another file!","Sorry, die Datei \n%1\nist schon geladen!\nBitte wählen Sie eine andere!" },
1419{ "Choose Color","Wähle Farbe" }, 1419{ "Choose Color","Wähle Farbe" },
1420{ " OK "," OK " }, 1420{ " OK "," OK " },
1421{ " Cancel "," Abbrechen " }, 1421{ " Cancel "," Abbrechen " },
1422{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" }, 1422{ "Matching items will be added to list","Passende werden zur Liste hinzugefügt" },
1423{ "Matching items will be removed from list","Passende werden von der Liste entfernt" }, 1423{ "Matching items will be removed from list","Passende werden von der Liste entfernt" },
1424{ "Search on displayed list only","Suche auf der dargestellten Liste" }, 1424{ "Search on displayed list only","Suche auf der dargestellten Liste" },
1425{ "List will be cleared before search","Liste wird vor der Suche gelöscht" }, 1425{ "List will be cleared before search","Liste wird vor der Suche gelöscht" },
1426{ "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" }, 1426{ "<center>%1</center> <center>is not running. Do you want to set\nthe state to running?</center>","<center>%1</center> <center>ist nicht am Laufen. Möchten Sie den Zustand auf "laufend" setzen?</center>" },
1427{ "%1\nis running!","%1\nist am Laufen!" }, 1427{ "%1\nis running!","%1\nist am Laufen!" },
1428{ "Additional Comment:","Zusätzlicher Kommentar:" }, 1428{ "Additional Comment:","Zusätzlicher Kommentar:" },
1429{ "Stop and save","Stopp und Speichern" }, 1429{ "Stop and save","Stopp und Speichern" },
1430{ "Continue running","Weiter laufen lassen" }, 1430{ "Continue running","Weiter laufen lassen" },
1431{ "Stop - do not save","Stopp - nicht Speichern" }, 1431{ "Stop - do not save","Stopp - nicht Speichern" },
1432{ "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" }, 1432{ "Do you really want to set\nthe state to stopped\nwithout saving the data?","Möchten sie den Zustand\nwirklich auf gestoppt setzen\nohne die Daten abzuspeichern?" },
1433{ "Time mismatch!","Zeiten stimmen nicht!" }, 1433{ "Time mismatch!","Zeiten stimmen nicht!" },
1434{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" }, 1434{ "The start time is\nafter the end time!","Die Startzeit ist\nhinter der Endzeit!" },
1435{ "Yes, stop todo","Ja, stoppe Todo" }, 1435{ "Yes, stop todo","Ja, stoppe Todo" },
1436{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" }, 1436{ "Todo stopped - no data saved because runtime was < 15 sec!","Todo gestoppt - nichts gespeichert da Laufzeit < 15 sec!" },
1437{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" }, 1437{ "Todo started! Double click again to stop!","Todo gestartet! Doppelklicke um es zu stoppen!" },
1438{ "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." }, 1438{ "Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.","Bitte wählen Sie den <b>Default-Kalender</b> in dieser Spalte. Neu angelegte oder importierte Einträge werden dem Default-Kalender hinzugefügt." },
1439{ "Spouse","Ehegatte" }, 1439{ "Spouse","Ehegatte" },
1440{ "Notes","Notizen" }, 1440{ "Notes","Notizen" },
1441{ "Messanger","Messanger" }, 1441{ "Messanger","Messanger" },
1442{ "Assistant","Assistent" }, 1442{ "Assistant","Assistent" },
1443{ "Manager","Manager" }, 1443{ "Manager","Manager" },
1444{ "Secrecy","Sichtbar" }, 1444{ "Secrecy","Sichtbar" },
1445{ "male","männlich" }, 1445{ "male","männlich" },
1446{ "female","weiblich" }, 1446{ "female","weiblich" },
1447{ "Hide!","Verbergen!" }, 1447{ "Hide!","Verbergen!" },
1448{ "Show!","Anzeigen!" }, 1448{ "Show!","Anzeigen!" },
1449{ "Details","Details" }, 1449{ "Details","Details" },
1450{ "Profession","Beruf" }, 1450{ "Profession","Beruf" },
1451{ "Children","Kinder" }, 1451{ "Children","Kinder" },
1452{ "Department","Abteilung" }, 1452{ "Department","Abteilung" },
1453{ "Backup cancelled","Backup abgebrochen" }, 1453{ "Backup cancelled","Backup abgebrochen" },
1454{ "Backup globally disabled","Backup global abgeschaltet" }, 1454{ "Backup globally disabled","Backup global abgeschaltet" },
1455{ "Backup succesfully finished","Backup erfolgreich beendet" }, 1455{ "Backup succesfully finished","Backup erfolgreich beendet" },
1456{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" }, 1456{ "(Hint: You can enable automatic backup in the global settings!)","(Hinweis: Sie können ein automatisches Backup in den globalen Einstellungen konfigurieren!)" },
1457{ "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" }, 1457{ "This will <b>backup all calendar files</b> to the directory %1 %2","Das schreibt ein <b>Backup aller Kalenderdateien</b> in das Verzeichnis %1 %2" },
1458{ "Birthdays","Geburtstage" }, 1458{ "Birthdays","Geburtstage" },
1459{ "KO/Pi import information!","KO/Pi Import Information!" }, 1459{ "KO/Pi import information!","KO/Pi Import Information!" },
1460{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" }, 1460{ "Start this todo\nand stop all running","Starte dieses Todo\nund stoppe alle Laufenden" },
1461{ "Cancel - do not start"," Abbrechen - Todo nicht starten" }, 1461{ "Cancel - do not start"," Abbrechen - Todo nicht starten" },
1462{ "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" }, 1462{ "The timezone has changed!\nShould the calendar be reloaded\nto shift the time of the events?\nPlease read Menu: Help->FAQ:\n"How do I change the timezone?"\nas well!","Die Zeitzone wurde geändert!\nSollen die Kalender neu geladen\nwerden num die Zeiten\nder Termine zu ändern?\nBitte lesen Sie auch\nMenu: Help->FAQ:\n"How do I change the timezone?"" },
1463{ "Reload","Neu laden" }, 1463{ "Reload","Neu laden" },
1464{ "Timezone settings","Zeitzoneneinstellung" }, 1464{ "Timezone settings","Zeitzoneneinstellung" },
1465{ " Title: "," Titel: " }, 1465{ " Title: "," Titel: " },
1466{ "","" }, 1466{ "","" },
1467{ "","" }, 1467{ "","" },
1468{ "","" }, 1468{ "","" },
1469{ "","" }, 1469{ "","" },
1470{ "","" }, 1470{ "","" },
1471{ "","" }, 1471{ "","" },
1472{ "","" }, \ No newline at end of file 1472{ "","" }, \ No newline at end of file
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp
index bd32859..5334a0e 100644
--- a/kaddressbook/addresseeeditorwidget.cpp
+++ b/kaddressbook/addresseeeditorwidget.cpp
@@ -1,1358 +1,1356 @@
1/* 1/*
2 This file is part of KAddressBook. 2 This file is part of KAddressBook.
3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com> 3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qcheckbox.h> 24#include <qcheckbox.h>
25#include <qhbox.h> 25#include <qhbox.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qlistbox.h> 28#include <qlistbox.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qtabwidget.h> 30#include <qtabwidget.h>
31#include <qapplication.h> 31#include <qapplication.h>
32 32
33#ifndef KAB_EMBEDDED 33#ifndef KAB_EMBEDDED
34#include <qtextedit.h> 34#include <qtextedit.h>
35 35
36#include <kaccelmanager.h> 36#include <kaccelmanager.h>
37#include "keywidget.h" 37#include "keywidget.h"
38#include "soundwidget.h" 38#include "soundwidget.h"
39 39
40#else //KAB_EMBEDDED 40#else //KAB_EMBEDDED
41#include <qmultilineedit.h> 41#include <qmultilineedit.h>
42#endif //KAB_EMBEDDED 42#endif //KAB_EMBEDDED
43 43
44 44
45#include "keywidget.h" 45#include "keywidget.h"
46#include "geowidget.h" 46#include "geowidget.h"
47#include "imagewidget.h" 47#include "imagewidget.h"
48#include "nameeditdialog.h" 48#include "nameeditdialog.h"
49#include "phoneeditwidget.h" 49#include "phoneeditwidget.h"
50#include "secrecywidget.h" 50#include "secrecywidget.h"
51 51
52 52
53#include <qtoolbutton.h> 53#include <qtoolbutton.h>
54#include <qtooltip.h> 54#include <qtooltip.h>
55 55
56#include <kapplication.h> 56#include <kapplication.h>
57#include <kconfig.h> 57#include <kconfig.h>
58#include <kcombobox.h> 58#include <kcombobox.h>
59#include <kdebug.h> 59#include <kdebug.h>
60#include <kdialogbase.h> 60#include <kdialogbase.h>
61#include <kglobal.h> 61#include <kglobal.h>
62#include <kiconloader.h> 62#include <kiconloader.h>
63#include <klineedit.h> 63#include <klineedit.h>
64#include <klocale.h> 64#include <klocale.h>
65#include <kmessagebox.h> 65#include <kmessagebox.h>
66#include <kseparator.h> 66#include <kseparator.h>
67#include <ksqueezedtextlabel.h> 67#include <ksqueezedtextlabel.h>
68 68
69#include <libkdepim/categoryeditdialog.h> 69#include <libkdepim/categoryeditdialog.h>
70#include <libkdepim/categoryselectdialog.h> 70#include <libkdepim/categoryselectdialog.h>
71 71
72#include <libkdepim/kdateedit.h> 72#include <libkdepim/kdateedit.h>
73 73
74#include "addresseditwidget.h" 74#include "addresseditwidget.h"
75#include "emaileditwidget.h" 75#include "emaileditwidget.h"
76#include "kabcore.h" 76#include "kabcore.h"
77#include "kabprefs.h" 77#include "kabprefs.h"
78 78
79#include "addresseeeditorwidget.h" 79#include "addresseeeditorwidget.h"
80 80
81 81
82 82
83AddresseeEditorWidget::AddresseeEditorWidget( KABCore *core, bool isExtension, 83AddresseeEditorWidget::AddresseeEditorWidget( KABCore *core, bool isExtension,
84 QWidget *parent, const char *name ) 84 QWidget *parent, const char *name )
85 : ExtensionWidget( core, parent, name ), mIsExtension( isExtension ), 85 : ExtensionWidget( core, parent, name ), mIsExtension( isExtension ),
86 mBlockSignals( false ) 86 mBlockSignals( false )
87{ 87{
88 88
89 mAConfig = AddresseeConfig::instance(); 89 mAConfig = AddresseeConfig::instance();
90 90
91 mFormattedNameType = NameEditDialog::CustomName; 91 mFormattedNameType = NameEditDialog::CustomName;
92 initGUI(); 92 initGUI();
93 mCategoryDialog = 0; 93 mCategoryDialog = 0;
94 mCategoryEditDialog = 0; 94 mCategoryEditDialog = 0;
95 95
96 // Load the empty addressee as defaults 96 // Load the empty addressee as defaults
97 load(); 97 load();
98 98
99 mDirty = false; 99 mDirty = false;
100} 100}
101 101
102AddresseeEditorWidget::~AddresseeEditorWidget() 102AddresseeEditorWidget::~AddresseeEditorWidget()
103{ 103{
104 kdDebug(5720) << "~AddresseeEditorWidget()" << endl; 104 kdDebug(5720) << "~AddresseeEditorWidget()" << endl;
105} 105}
106 106
107void AddresseeEditorWidget::contactsSelectionChanged() 107void AddresseeEditorWidget::contactsSelectionChanged()
108{ 108{
109 KABC::Addressee::List list = selectedContacts(); 109 KABC::Addressee::List list = selectedContacts();
110 110
111 mAddressee = list[ 0 ]; 111 mAddressee = list[ 0 ];
112 load(); 112 load();
113} 113}
114 114
115void AddresseeEditorWidget::setAddressee( const KABC::Addressee &addr ) 115void AddresseeEditorWidget::setAddressee( const KABC::Addressee &addr )
116{ 116{
117 mAddressee = addr; 117 mAddressee = addr;
118 load(); 118 load();
119} 119}
120 120
121const KABC::Addressee &AddresseeEditorWidget::addressee() 121const KABC::Addressee &AddresseeEditorWidget::addressee()
122{ 122{
123 return mAddressee; 123 return mAddressee;
124} 124}
125 125
126void AddresseeEditorWidget::textChanged( const QString& ) 126void AddresseeEditorWidget::textChanged( const QString& )
127{ 127{
128 emitModified(); 128 emitModified();
129} 129}
130 130
131void AddresseeEditorWidget::initGUI() 131void AddresseeEditorWidget::initGUI()
132{ 132{
133 QVBoxLayout *layout = new QVBoxLayout( this ); 133 QVBoxLayout *layout = new QVBoxLayout( this );
134 134
135 mTabWidget = new QTabWidget( this ); 135 mTabWidget = new QTabWidget( this );
136 layout->addWidget( mTabWidget ); 136 layout->addWidget( mTabWidget );
137 137
138 setupTab1(); 138 setupTab1();
139 setupTab1_1(); 139 setupTab1_1();
140 setupTab2(); 140 setupTab2();
141 setupTab2_1(); 141 setupTab2_1();
142 setupTab3(); 142 setupTab3();
143 setupTab3_1(); 143 setupTab3_1();
144 144
145 mNameEdit->setFocus(); 145 mNameEdit->setFocus();
146 146
147 connect( mTabWidget, SIGNAL( currentChanged(QWidget*) ), 147 connect( mTabWidget, SIGNAL( currentChanged(QWidget*) ),
148 SLOT( pageChanged(QWidget*) ) ); 148 SLOT( pageChanged(QWidget*) ) );
149} 149}
150 150
151void AddresseeEditorWidget::setupTab1() 151void AddresseeEditorWidget::setupTab1()
152{ 152{
153 // This is the General tab 153 // This is the General tab
154 QWidget *tab1 = new QWidget( mTabWidget ); 154 QWidget *tab1 = new QWidget( mTabWidget );
155 155
156//US QGridLayout *layout = new QGridLayout( tab1, 11, 7 ); 156//US QGridLayout *layout = new QGridLayout( tab1, 11, 7 );
157 QGridLayout *layout = new QGridLayout( tab1, 7, 1 ); 157 QGridLayout *layout = new QGridLayout( tab1, 7, 1 );
158 layout->setMargin( KDialogBase::marginHintSmall() ); 158 layout->setMargin( KDialogBase::marginHintSmall() );
159 layout->setSpacing( KDialogBase::spacingHintSmall() ); 159 layout->setSpacing( KDialogBase::spacingHintSmall() );
160 160
161 QLabel *label; 161 QLabel *label;
162 KSeparator* bar; 162 KSeparator* bar;
163 QPushButton *button; 163 QPushButton *button;
164 164
165 ////////////////////////////////// 165 //////////////////////////////////
166 // Upper left group (person info) 166 // Upper left group (person info)
167 167
168 // Person icon 168 // Person icon
169 /* LR 169 /* LR
170 label = new QLabel( tab1 ); 170 label = new QLabel( tab1 );
171//US ambiguous call. Add one more parameter 171//US ambiguous call. Add one more parameter
172//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) ); 172//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) );
173 label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 0 ) ); 173 label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 0 ) );
174 layout->addMultiCellWidget( label, 0, 1, 0, 0 ); 174 layout->addMultiCellWidget( label, 0, 1, 0, 0 );
175 */ 175 */
176 // First name 176 // First name
177 button = new QPushButton( i18n( "Name..." ), tab1 ); 177 button = new QPushButton( i18n( "Name..." ), tab1 );
178//US QToolTip::add( button, i18n( "Edit the contact's name" ) ); 178//US QToolTip::add( button, i18n( "Edit the contact's name" ) );
179 mNameEdit = new KLineEdit( tab1, "mNameEdit" ); 179 mNameEdit = new KLineEdit( tab1, "mNameEdit" );
180 connect( mNameEdit, SIGNAL( textChanged( const QString& ) ), 180 connect( mNameEdit, SIGNAL( textChanged( const QString& ) ),
181 SLOT( nameTextChanged( const QString& ) ) ); 181 SLOT( nameTextChanged( const QString& ) ) );
182 connect( button, SIGNAL( clicked() ), SLOT( nameButtonClicked() ) ); 182 connect( button, SIGNAL( clicked() ), SLOT( nameButtonClicked() ) );
183 183
184 mNameLabel = new KSqueezedTextLabel( tab1 ); 184 mNameLabel = new KSqueezedTextLabel( tab1 );
185 mNameLabel->hide(); 185 mNameLabel->hide();
186 186
187 layout->addWidget( button, 0, 0 ); 187 layout->addWidget( button, 0, 0 );
188 layout->addWidget( mNameEdit, 0, 1 ); 188 layout->addWidget( mNameEdit, 0, 1 );
189 layout->addWidget( mNameLabel, 0, 1 ); 189 layout->addWidget( mNameLabel, 0, 1 );
190 190
191 label = new QLabel( i18n( "Role:" ), tab1 ); 191 label = new QLabel( i18n( "Role:" ), tab1 );
192 mRoleEdit = new KLineEdit( tab1 ); 192 mRoleEdit = new KLineEdit( tab1 );
193 connect( mRoleEdit, SIGNAL( textChanged( const QString& ) ), 193 connect( mRoleEdit, SIGNAL( textChanged( const QString& ) ),
194 SLOT( textChanged( const QString& ) ) ); 194 SLOT( textChanged( const QString& ) ) );
195 label->setBuddy( mRoleEdit ); 195 label->setBuddy( mRoleEdit );
196 layout->addWidget( label, 1, 0 ); 196 layout->addWidget( label, 1, 0 );
197 layout->addWidget( mRoleEdit, 1, 1 ); 197 layout->addWidget( mRoleEdit, 1, 1 );
198 198
199 // Organization 199 // Organization
200 label = new QLabel( i18n( "Organization:" ), tab1 ); 200 label = new QLabel( i18n( "Organization:" ), tab1 );
201 mOrgEdit = new KLineEdit( tab1 ); 201 mOrgEdit = new KLineEdit( tab1 );
202 label->setBuddy( mOrgEdit ); 202 label->setBuddy( mOrgEdit );
203 connect( mOrgEdit, SIGNAL( textChanged( const QString& ) ), 203 connect( mOrgEdit, SIGNAL( textChanged( const QString& ) ),
204 SLOT( textChanged( const QString& ) ) ); 204 SLOT( textChanged( const QString& ) ) );
205 layout->addWidget( label, 2, 0 ); 205 layout->addWidget( label, 2, 0 );
206 layout->addWidget( mOrgEdit, 2, 1 ); 206 layout->addWidget( mOrgEdit, 2, 1 );
207 207
208 // File as (formatted name) 208 // File as (formatted name)
209 label = new QLabel( i18n( "Formatted name:" ), tab1 ); 209 label = new QLabel( i18n( "Formatted name:" ), tab1 );
210 mFormattedNameLabel = new KSqueezedTextLabel( tab1 ); 210 mFormattedNameLabel = new KSqueezedTextLabel( tab1 );
211 layout->addWidget( label, 3, 0 ); 211 layout->addWidget( label, 3, 0 );
212 layout->addWidget( mFormattedNameLabel, 3, 1 ); 212 layout->addWidget( mFormattedNameLabel, 3, 1 );
213 /* LR 213 /* LR
214 // Left hand separator. This separator doesn't go all the way 214 // Left hand separator. This separator doesn't go all the way
215 // across so the dialog still flows from top to bottom 215 // across so the dialog still flows from top to bottom
216 bar = new KSeparator( KSeparator::HLine, tab1 ); 216 bar = new KSeparator( KSeparator::HLine, tab1 );
217 layout->addMultiCellWidget( bar, 4, 4, 0, 2 ); 217 layout->addMultiCellWidget( bar, 4, 4, 0, 2 );
218 */ 218 */
219 ////////////////////////////////////// 219 //////////////////////////////////////
220 220
221 /* LR 221 /* LR
222 // Phone numbers (upper right) 222 // Phone numbers (upper right)
223 label = new QLabel( tab1 ); 223 label = new QLabel( tab1 );
224//US loadIcon call is ambiguous. Add one more parameter 224//US loadIcon call is ambiguous. Add one more parameter
225//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop ) ); 225//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop ) );
226 label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); 226 label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) );
227//US layout->addMultiCellWidget( label, 0, 1, 3, 3 ); 227//US layout->addMultiCellWidget( label, 0, 1, 3, 3 );
228 layout->addMultiCellWidget( label, 5, 6, 0, 0 ); 228 layout->addMultiCellWidget( label, 5, 6, 0, 0 );
229 */ 229 */
230 mPhoneEditWidget = new PhoneEditWidget( tab1 ); 230 mPhoneEditWidget = new PhoneEditWidget( tab1 );
231 connect( mPhoneEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); 231 connect( mPhoneEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) );
232//US layout->addMultiCellWidget( mPhoneEditWidget, 0, 3, 4, 6 ); 232//US layout->addMultiCellWidget( mPhoneEditWidget, 0, 3, 4, 6 );
233 int iii; 233 int iii;
234#ifndef DESKTOP_VERSION 234#ifndef DESKTOP_VERSION
235 iii = 7; 235 iii = 7;
236#else 236#else
237 iii = 8; 237 iii = 8;
238#endif 238#endif
239 layout->addMultiCellWidget( mPhoneEditWidget, 4, iii, 0, 1 ); 239 layout->addMultiCellWidget( mPhoneEditWidget, 4, iii, 0, 1 );
240 ++iii; 240 ++iii;
241 /* LR 241 /* LR
242 bar = new KSeparator( KSeparator::HLine, tab1 ); 242 bar = new KSeparator( KSeparator::HLine, tab1 );
243//US layout->addMultiCellWidget( bar, 4, 4, 3, 6 ); 243//US layout->addMultiCellWidget( bar, 4, 4, 3, 6 );
244 layout->addMultiCellWidget( bar, 9, 9, 0, 2 ); 244 layout->addMultiCellWidget( bar, 9, 9, 0, 2 );
245 */ 245 */
246/*US 246/*US
247 ////////////////////////////////////// 247 //////////////////////////////////////
248 // Addresses (lower left) 248 // Addresses (lower left)
249 label = new QLabel( tab1 ); 249 label = new QLabel( tab1 );
250//US loadIcon call is ambiguous. Add one more parameter 250//US loadIcon call is ambiguous. Add one more parameter
251//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop ) ); 251//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop ) );
252 label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) ); 252 label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) );
253 layout->addMultiCellWidget( label, 5, 6, 0, 0 ); 253 layout->addMultiCellWidget( label, 5, 6, 0, 0 );
254 254
255 mAddressEditWidget = new AddressEditWidget( tab1 ); 255 mAddressEditWidget = new AddressEditWidget( tab1 );
256 connect( mAddressEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); 256 connect( mAddressEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) );
257 layout->addMultiCellWidget( mAddressEditWidget, 5, 9, 1, 2 ); 257 layout->addMultiCellWidget( mAddressEditWidget, 5, 9, 1, 2 );
258 258
259 ////////////////////////////////////// 259 //////////////////////////////////////
260 // Email / Web (lower right) 260 // Email / Web (lower right)
261 label = new QLabel( tab1 ); 261 label = new QLabel( tab1 );
262//US loadIcon call is ambiguous. Add one more parameter 262//US loadIcon call is ambiguous. Add one more parameter
263//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop) ); 263//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop) );
264 label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop, 0) ); 264 label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop, 0) );
265 layout->addMultiCellWidget( label, 5, 6, 3, 3 ); 265 layout->addMultiCellWidget( label, 5, 6, 3, 3 );
266 266
267 mEmailWidget = new EmailEditWidget( tab1 ); 267 mEmailWidget = new EmailEditWidget( tab1 );
268 connect( mEmailWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); 268 connect( mEmailWidget, SIGNAL( modified() ), SLOT( emitModified() ) );
269 layout->addMultiCellWidget( mEmailWidget, 5, 6, 4, 6 ); 269 layout->addMultiCellWidget( mEmailWidget, 5, 6, 4, 6 );
270 270
271 // add the separator 271 // add the separator
272 bar = new KSeparator( KSeparator::HLine, tab1 ); 272 bar = new KSeparator( KSeparator::HLine, tab1 );
273 layout->addMultiCellWidget( bar, 7, 7, 3, 6 ); 273 layout->addMultiCellWidget( bar, 7, 7, 3, 6 );
274 274
275 label = new QLabel( tab1 ); 275 label = new QLabel( tab1 );
276//US loadIcon call is ambiguous. Add one more parameter 276//US loadIcon call is ambiguous. Add one more parameter
277//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "homepage", KIcon::Desktop) ); 277//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "homepage", KIcon::Desktop) );
278 label->setPixmap( KGlobal::iconLoader()->loadIcon( "homepage", KIcon::Desktop, 0) ); 278 label->setPixmap( KGlobal::iconLoader()->loadIcon( "homepage", KIcon::Desktop, 0) );
279 layout->addMultiCellWidget( label, 8, 9, 3, 3 ); 279 layout->addMultiCellWidget( label, 8, 9, 3, 3 );
280 280
281 label = new QLabel( i18n( "URL:" ), tab1 ); 281 label = new QLabel( i18n( "URL:" ), tab1 );
282 mURLEdit = new KLineEdit( tab1 ); 282 mURLEdit = new KLineEdit( tab1 );
283 connect( mURLEdit, SIGNAL( textChanged( const QString& ) ), 283 connect( mURLEdit, SIGNAL( textChanged( const QString& ) ),
284 SLOT( textChanged( const QString& ) ) ); 284 SLOT( textChanged( const QString& ) ) );
285 label->setBuddy( mURLEdit ); 285 label->setBuddy( mURLEdit );
286 layout->addWidget( label, 8, 4 ); 286 layout->addWidget( label, 8, 4 );
287 layout->addMultiCellWidget( mURLEdit, 8, 8, 5, 6 ); 287 layout->addMultiCellWidget( mURLEdit, 8, 8, 5, 6 );
288 288
289 label = new QLabel( i18n( "&IM address:" ), tab1 ); 289 label = new QLabel( i18n( "&IM address:" ), tab1 );
290 mIMAddressEdit = new KLineEdit( tab1 ); 290 mIMAddressEdit = new KLineEdit( tab1 );
291 connect( mIMAddressEdit, SIGNAL( textChanged( const QString& ) ), 291 connect( mIMAddressEdit, SIGNAL( textChanged( const QString& ) ),
292 SLOT( textChanged( const QString& ) ) ); 292 SLOT( textChanged( const QString& ) ) );
293 label->setBuddy( mIMAddressEdit ); 293 label->setBuddy( mIMAddressEdit );
294 layout->addWidget( label, 9, 4 ); 294 layout->addWidget( label, 9, 4 );
295 layout->addMultiCellWidget( mIMAddressEdit, 9, 9, 5, 6 ); 295 layout->addMultiCellWidget( mIMAddressEdit, 9, 9, 5, 6 );
296 296
297 layout->addColSpacing( 6, 50 ); 297 layout->addColSpacing( 6, 50 );
298 298
299 bar = new KSeparator( KSeparator::HLine, tab1 ); 299 bar = new KSeparator( KSeparator::HLine, tab1 );
300 layout->addMultiCellWidget( bar, 10, 10, 0, 6 ); 300 layout->addMultiCellWidget( bar, 10, 10, 0, 6 );
301*/ 301*/
302 /////////////////////////////////////// 302 ///////////////////////////////////////
303 QHBox *categoryBox = new QHBox( tab1 ,"cato"); 303 QHBox *categoryBox = new QHBox( tab1 ,"cato");
304 categoryBox->setSpacing( KDialogBase::spacingHint() ); 304 categoryBox->setSpacing( KDialogBase::spacingHint() );
305 categoryBox->setMargin( KDialogBase::marginHintSmall() ); 305 categoryBox->setMargin( KDialogBase::marginHintSmall() );
306 306
307 // Categories 307 // Categories
308 button = new QPushButton( i18n( "Categories" ), categoryBox ); 308 button = new QPushButton( i18n( "Categories" ), categoryBox );
309 connect( button, SIGNAL( clicked() ), SLOT( categoryButtonClicked() ) ); 309 connect( button, SIGNAL( clicked() ), SLOT( categoryButtonClicked() ) );
310 310
311 mCategoryEdit = new KLineEdit( categoryBox ); 311 mCategoryEdit = new KLineEdit( categoryBox );
312 mCategoryEdit->setReadOnly( true ); 312 mCategoryEdit->setReadOnly( true );
313 connect( mCategoryEdit, SIGNAL( textChanged( const QString& ) ), 313 connect( mCategoryEdit, SIGNAL( textChanged( const QString& ) ),
314 SLOT( textChanged( const QString& ) ) ); 314 SLOT( textChanged( const QString& ) ) );
315 315
316 mSecrecyWidget = new SecrecyWidget( categoryBox ); 316 mSecrecyWidget = new SecrecyWidget( categoryBox );
317 connect( mSecrecyWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); 317 connect( mSecrecyWidget, SIGNAL( changed() ), SLOT( emitModified() ) );
318 318
319//US layout->addMultiCellWidget( categoryBox, 11, 11, 0, 6 ); 319//US layout->addMultiCellWidget( categoryBox, 11, 11, 0, 6 );
320 layout->addMultiCellWidget( categoryBox, iii, iii, 0, 1 ); 320 layout->addMultiCellWidget( categoryBox, iii, iii, 0, 1 );
321 321
322 // Build the layout and add to the tab widget 322 // Build the layout and add to the tab widget
323 layout->activate(); // required 323 layout->activate(); // required
324 324
325 mTabWidget->addTab( tab1, i18n( "&General" ) ); 325 mTabWidget->addTab( tab1, i18n( "&General" ) );
326} 326}
327 327
328 328
329void AddresseeEditorWidget::setupTab1_1() 329void AddresseeEditorWidget::setupTab1_1()
330{ 330{
331 // This is the Address tab 331 // This is the Address tab
332 QWidget *tab1_1 = new QWidget( mTabWidget ); 332 QWidget *tab1_1 = new QWidget( mTabWidget );
333 333
334//US QGridLayout *layout = new QGridLayout( tab1_1, 11, 7 ); 334//US QGridLayout *layout = new QGridLayout( tab1_1, 11, 7 );
335 QGridLayout *layout = new QGridLayout( tab1_1, 7, 2 ); 335 QGridLayout *layout = new QGridLayout( tab1_1, 7, 2 );
336 layout->setMargin( KDialogBase::marginHintSmall() ); 336 layout->setMargin( KDialogBase::marginHintSmall() );
337 layout->setSpacing( KDialogBase::spacingHintSmall() ); 337 layout->setSpacing( KDialogBase::spacingHintSmall() );
338 338
339 QLabel *label; 339 QLabel *label;
340 KSeparator* bar; 340 KSeparator* bar;
341 QPushButton *button; 341 QPushButton *button;
342 342
343/*US 343/*US
344 ////////////////////////////////// 344 //////////////////////////////////
345 // Upper left group (person info) 345 // Upper left group (person info)
346 346
347 // Person icon 347 // Person icon
348 label = new QLabel( tab1 ); 348 label = new QLabel( tab1 );
349//US ambiguous call. Add one more parameter 349//US ambiguous call. Add one more parameter
350//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) ); 350//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) );
351 label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 0 ) ); 351 label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 0 ) );
352 layout->addMultiCellWidget( label, 0, 1, 0, 0 ); 352 layout->addMultiCellWidget( label, 0, 1, 0, 0 );
353 353
354 // First name 354 // First name
355 button = new QPushButton( i18n( "Name..." ), tab1 ); 355 button = new QPushButton( i18n( "Name..." ), tab1 );
356 QToolTip::add( button, i18n( "Edit the contact's name" ) ); 356 QToolTip::add( button, i18n( "Edit the contact's name" ) );
357 mNameEdit = new KLineEdit( tab1, "mNameEdit" ); 357 mNameEdit = new KLineEdit( tab1, "mNameEdit" );
358 connect( mNameEdit, SIGNAL( textChanged( const QString& ) ), 358 connect( mNameEdit, SIGNAL( textChanged( const QString& ) ),
359 SLOT( nameTextChanged( const QString& ) ) ); 359 SLOT( nameTextChanged( const QString& ) ) );
360 connect( button, SIGNAL( clicked() ), SLOT( nameButtonClicked() ) ); 360 connect( button, SIGNAL( clicked() ), SLOT( nameButtonClicked() ) );
361 361
362#ifndef KAB_EMBEDDED 362#ifndef KAB_EMBEDDED
363 mNameLabel = new KSqueezedTextLabel( tab1 ); 363 mNameLabel = new KSqueezedTextLabel( tab1 );
364 mNameLabel->hide(); 364 mNameLabel->hide();
365#else //KAB_EMBEDDED 365#else //KAB_EMBEDDED
366qDebug("AddresseeEditorWidget::setupTab1 has to be changed"); 366qDebug("AddresseeEditorWidget::setupTab1 has to be changed");
367#endif //KAB_EMBEDDED 367#endif //KAB_EMBEDDED
368 368
369 layout->addWidget( button, 0, 1 ); 369 layout->addWidget( button, 0, 1 );
370 layout->addWidget( mNameEdit, 0, 2 ); 370 layout->addWidget( mNameEdit, 0, 2 );
371 371
372#ifndef KAB_EMBEDDED 372#ifndef KAB_EMBEDDED
373 layout->addWidget( mNameLabel, 0, 2 ); 373 layout->addWidget( mNameLabel, 0, 2 );
374#else //KAB_EMBEDDED 374#else //KAB_EMBEDDED
375qDebug("AddresseeEditorWidget::setupTab1 has to be changed"); 375qDebug("AddresseeEditorWidget::setupTab1 has to be changed");
376#endif //KAB_EMBEDDED 376#endif //KAB_EMBEDDED
377 377
378 label = new QLabel( i18n( "Role:" ), tab1 ); 378 label = new QLabel( i18n( "Role:" ), tab1 );
379 mRoleEdit = new KLineEdit( tab1 ); 379 mRoleEdit = new KLineEdit( tab1 );
380 connect( mRoleEdit, SIGNAL( textChanged( const QString& ) ), 380 connect( mRoleEdit, SIGNAL( textChanged( const QString& ) ),
381 SLOT( textChanged( const QString& ) ) ); 381 SLOT( textChanged( const QString& ) ) );
382 label->setBuddy( mRoleEdit ); 382 label->setBuddy( mRoleEdit );
383 layout->addWidget( label, 1, 1 ); 383 layout->addWidget( label, 1, 1 );
384 layout->addWidget( mRoleEdit, 1, 2 ); 384 layout->addWidget( mRoleEdit, 1, 2 );
385 385
386 // Organization 386 // Organization
387 label = new QLabel( i18n( "Organization:" ), tab1 ); 387 label = new QLabel( i18n( "Organization:" ), tab1 );
388 mOrgEdit = new KLineEdit( tab1 ); 388 mOrgEdit = new KLineEdit( tab1 );
389 label->setBuddy( mOrgEdit ); 389 label->setBuddy( mOrgEdit );
390 connect( mOrgEdit, SIGNAL( textChanged( const QString& ) ), 390 connect( mOrgEdit, SIGNAL( textChanged( const QString& ) ),
391 SLOT( textChanged( const QString& ) ) ); 391 SLOT( textChanged( const QString& ) ) );
392 layout->addWidget( label, 2, 1 ); 392 layout->addWidget( label, 2, 1 );
393 layout->addWidget( mOrgEdit, 2, 2 ); 393 layout->addWidget( mOrgEdit, 2, 2 );
394 394
395 // File as (formatted name) 395 // File as (formatted name)
396 label = new QLabel( i18n( "Formatted name:" ), tab1 ); 396 label = new QLabel( i18n( "Formatted name:" ), tab1 );
397#ifndef KAB_EMBEDDED 397#ifndef KAB_EMBEDDED
398 mFormattedNameLabel = new KSqueezedTextLabel( tab1 ); 398 mFormattedNameLabel = new KSqueezedTextLabel( tab1 );
399#else //KAB_EMBEDDED 399#else //KAB_EMBEDDED
400qDebug("AddresseeEditorWidget::setupTab1 has to be changed"); 400qDebug("AddresseeEditorWidget::setupTab1 has to be changed");
401#endif //KAB_EMBEDDED 401#endif //KAB_EMBEDDED
402 layout->addWidget( label, 3, 1 ); 402 layout->addWidget( label, 3, 1 );
403#ifndef KAB_EMBEDDED 403#ifndef KAB_EMBEDDED
404 layout->addWidget( mFormattedNameLabel, 3, 2 ); 404 layout->addWidget( mFormattedNameLabel, 3, 2 );
405#else //KAB_EMBEDDED 405#else //KAB_EMBEDDED
406qDebug("AddresseeEditorWidget::setupTab1 has to be changed"); 406qDebug("AddresseeEditorWidget::setupTab1 has to be changed");
407#endif //KAB_EMBEDDED 407#endif //KAB_EMBEDDED
408 408
409 // Left hand separator. This separator doesn't go all the way 409 // Left hand separator. This separator doesn't go all the way
410 // across so the dialog still flows from top to bottom 410 // across so the dialog still flows from top to bottom
411 bar = new KSeparator( KSeparator::HLine, tab1 ); 411 bar = new KSeparator( KSeparator::HLine, tab1 );
412 layout->addMultiCellWidget( bar, 4, 4, 0, 2 ); 412 layout->addMultiCellWidget( bar, 4, 4, 0, 2 );
413 413
414 ////////////////////////////////////// 414 //////////////////////////////////////
415 // Phone numbers (upper right) 415 // Phone numbers (upper right)
416 label = new QLabel( tab1 ); 416 label = new QLabel( tab1 );
417//US loadIcon call is ambiguous. Add one more parameter 417//US loadIcon call is ambiguous. Add one more parameter
418//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop ) ); 418//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop ) );
419 label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); 419 label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) );
420 layout->addMultiCellWidget( label, 0, 1, 3, 3 ); 420 layout->addMultiCellWidget( label, 0, 1, 3, 3 );
421 421
422 mPhoneEditWidget = new PhoneEditWidget( tab1 ); 422 mPhoneEditWidget = new PhoneEditWidget( tab1 );
423 connect( mPhoneEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); 423 connect( mPhoneEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) );
424 layout->addMultiCellWidget( mPhoneEditWidget, 0, 3, 4, 6 ); 424 layout->addMultiCellWidget( mPhoneEditWidget, 0, 3, 4, 6 );
425 425
426 bar = new KSeparator( KSeparator::HLine, tab1 ); 426 bar = new KSeparator( KSeparator::HLine, tab1 );
427 layout->addMultiCellWidget( bar, 4, 4, 3, 6 ); 427 layout->addMultiCellWidget( bar, 4, 4, 3, 6 );
428*/ 428*/
429 ////////////////////////////////////// 429 //////////////////////////////////////
430 // Addresses (lower left) 430 // Addresses (lower left)
431 /* LR 431 /* LR
432 label = new QLabel( tab1_1 ); 432 label = new QLabel( tab1_1 );
433//US loadIcon call is ambiguous. Add one more parameter 433//US loadIcon call is ambiguous. Add one more parameter
434//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop ) ); 434//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop ) );
435 label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) ); 435 label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) );
436//US layout->addMultiCellWidget( label, 5, 6, 0, 0 ); 436//US layout->addMultiCellWidget( label, 5, 6, 0, 0 );
437 layout->addMultiCellWidget( label, 0, 1, 0, 0 ); 437 layout->addMultiCellWidget( label, 0, 1, 0, 0 );
438 */ 438 */
439 439
440 mAddressEditWidget = new AddressEditWidget( tab1_1 ); 440 mAddressEditWidget = new AddressEditWidget( tab1_1 );
441 connect( mAddressEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); 441 connect( mAddressEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) );
442//US layout->addMultiCellWidget( mAddressEditWidget, 5, 9, 1, 2 ); 442//US layout->addMultiCellWidget( mAddressEditWidget, 5, 9, 1, 2 );
443 layout->addMultiCellWidget( mAddressEditWidget, 0, 4, 0, 1 ); 443 layout->addMultiCellWidget( mAddressEditWidget, 0, 4, 0, 1 );
444 444
445//US 445//US
446/* LR 446/* LR
447 bar = new KSeparator( KSeparator::HLine, tab1_1 ); 447 bar = new KSeparator( KSeparator::HLine, tab1_1 );
448 layout->addMultiCellWidget( bar, 5, 5, 0, 3 ); 448 layout->addMultiCellWidget( bar, 5, 5, 0, 3 );
449*/ 449*/
450 450
451 ////////////////////////////////////// 451 //////////////////////////////////////
452 // Email / Web (lower right) 452 // Email / Web (lower right)
453 /* LR 453 /* LR
454 label = new QLabel( tab1_1 ); 454 label = new QLabel( tab1_1 );
455//US loadIcon call is ambiguous. Add one more parameter 455//US loadIcon call is ambiguous. Add one more parameter
456//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop) ); 456//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop) );
457 label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop, 0) ); 457 label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop, 0) );
458//US layout->addMultiCellWidget( label, 5, 6, 3, 3 ); 458//US layout->addMultiCellWidget( label, 5, 6, 3, 3 );
459 layout->addMultiCellWidget( label, 6, 7, 0, 0 ); 459 layout->addMultiCellWidget( label, 6, 7, 0, 0 );
460 */ 460 */
461 mEmailWidget = new EmailEditWidget( tab1_1 ); 461 mEmailWidget = new EmailEditWidget( tab1_1 );
462 connect( mEmailWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); 462 connect( mEmailWidget, SIGNAL( modified() ), SLOT( emitModified() ) );
463//US layout->addMultiCellWidget( mEmailWidget, 5, 6, 4, 6 ); 463//US layout->addMultiCellWidget( mEmailWidget, 5, 6, 4, 6 );
464 layout->addMultiCellWidget( mEmailWidget, 5, 6, 0, 1 ); 464 layout->addMultiCellWidget( mEmailWidget, 5, 6, 0, 1 );
465 465
466 /* LR 466 /* LR
467 // add the separator 467 // add the separator
468 bar = new KSeparator( KSeparator::HLine, tab1_1 ); 468 bar = new KSeparator( KSeparator::HLine, tab1_1 );
469//US layout->addMultiCellWidget( bar, 7, 7, 3, 6 ); 469//US layout->addMultiCellWidget( bar, 7, 7, 3, 6 );
470 layout->addMultiCellWidget( bar, 8, 8, 0, 3 ); 470 layout->addMultiCellWidget( bar, 8, 8, 0, 3 );
471 471
472 label = new QLabel( tab1_1 ); 472 label = new QLabel( tab1_1 );
473//US loadIcon call is ambiguous. Add one more parameter 473//US loadIcon call is ambiguous. Add one more parameter
474//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "homepage", KIcon::Desktop) ); 474//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "homepage", KIcon::Desktop) );
475 label->setPixmap( KGlobal::iconLoader()->loadIcon( "homepage", KIcon::Desktop, 0) ); 475 label->setPixmap( KGlobal::iconLoader()->loadIcon( "homepage", KIcon::Desktop, 0) );
476//US layout->addMultiCellWidget( label, 8, 9, 3, 3 ); 476//US layout->addMultiCellWidget( label, 8, 9, 3, 3 );
477 layout->addMultiCellWidget( label, 9, 10, 0, 0 ); 477 layout->addMultiCellWidget( label, 9, 10, 0, 0 );
478 */ 478 */
479 label = new QLabel( i18n( "URL:" ), tab1_1 ); 479 label = new QLabel( i18n( "URL:" ), tab1_1 );
480 mURLEdit = new KLineEdit( tab1_1 ); 480 mURLEdit = new KLineEdit( tab1_1 );
481 connect( mURLEdit, SIGNAL( textChanged( const QString& ) ), 481 connect( mURLEdit, SIGNAL( textChanged( const QString& ) ),
482 SLOT( textChanged( const QString& ) ) ); 482 SLOT( textChanged( const QString& ) ) );
483 label->setBuddy( mURLEdit ); 483 label->setBuddy( mURLEdit );
484//US layout->addWidget( label, 8, 4 ); 484//US layout->addWidget( label, 8, 4 );
485 layout->addWidget( label, 7,0 ); 485 layout->addWidget( label, 7,0 );
486//US layout->addMultiCellWidget( mURLEdit, 8, 8, 5, 6 ); 486//US layout->addMultiCellWidget( mURLEdit, 8, 8, 5, 6 );
487 layout->addWidget( mURLEdit, 7, 1); 487 layout->addWidget( mURLEdit, 7, 1);
488 488
489 label = new QLabel( i18n( "&IM address:" ), tab1_1 ); 489 label = new QLabel( i18n( "&IM address:" ), tab1_1 );
490 mIMAddressEdit = new KLineEdit( tab1_1 ); 490 mIMAddressEdit = new KLineEdit( tab1_1 );
491 connect( mIMAddressEdit, SIGNAL( textChanged( const QString& ) ), 491 connect( mIMAddressEdit, SIGNAL( textChanged( const QString& ) ),
492 SLOT( textChanged( const QString& ) ) ); 492 SLOT( textChanged( const QString& ) ) );
493 label->setBuddy( mIMAddressEdit ); 493 label->setBuddy( mIMAddressEdit );
494//US layout->addWidget( label, 9, 4 ); 494//US layout->addWidget( label, 9, 4 );
495 layout->addWidget( label, 8, 0 ); 495 layout->addWidget( label, 8, 0 );
496//US layout->addMultiCellWidget( mIMAddressEdit, 9, 9, 5, 6 ); 496//US layout->addMultiCellWidget( mIMAddressEdit, 9, 9, 5, 6 );
497 layout->addWidget( mIMAddressEdit, 8,1 ); 497 layout->addWidget( mIMAddressEdit, 8,1 );
498 498
499//US layout->addColSpacing( 6, 50 ); 499//US layout->addColSpacing( 6, 50 );
500 500
501//US bar = new KSeparator( KSeparator::HLine, tab1_1 ); 501//US bar = new KSeparator( KSeparator::HLine, tab1_1 );
502//US layout->addMultiCellWidget( bar, 10, 10, 0, 6 ); 502//US layout->addMultiCellWidget( bar, 10, 10, 0, 6 );
503 503
504/*US 504/*US
505 /////////////////////////////////////// 505 ///////////////////////////////////////
506 QHBox *categoryBox = new QHBox( tab1 ); 506 QHBox *categoryBox = new QHBox( tab1 );
507 categoryBox->setSpacing( KDialogBase::spacingHintSmall() ); 507 categoryBox->setSpacing( KDialogBase::spacingHintSmall() );
508 508
509 // Categories 509 // Categories
510 button = new QPushButton( i18n( "Categories" ), categoryBox ); 510 button = new QPushButton( i18n( "Categories" ), categoryBox );
511 connect( button, SIGNAL( clicked() ), SLOT( categoryButtonClicked() ) ); 511 connect( button, SIGNAL( clicked() ), SLOT( categoryButtonClicked() ) );
512 512
513 mCategoryEdit = new KLineEdit( categoryBox ); 513 mCategoryEdit = new KLineEdit( categoryBox );
514 mCategoryEdit->setReadOnly( true ); 514 mCategoryEdit->setReadOnly( true );
515 connect( mCategoryEdit, SIGNAL( textChanged( const QString& ) ), 515 connect( mCategoryEdit, SIGNAL( textChanged( const QString& ) ),
516 SLOT( textChanged( const QString& ) ) ); 516 SLOT( textChanged( const QString& ) ) );
517 517
518 mSecrecyWidget = new SecrecyWidget( categoryBox ); 518 mSecrecyWidget = new SecrecyWidget( categoryBox );
519 connect( mSecrecyWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); 519 connect( mSecrecyWidget, SIGNAL( changed() ), SLOT( emitModified() ) );
520 520
521 layout->addMultiCellWidget( categoryBox, 11, 11, 0, 6 ); 521 layout->addMultiCellWidget( categoryBox, 11, 11, 0, 6 );
522*/ 522*/
523 // Build the layout and add to the tab widget 523 // Build the layout and add to the tab widget
524 layout->activate(); // required 524 layout->activate(); // required
525 525
526 mTabWidget->addTab( tab1_1, i18n( "&Address" ) ); 526 mTabWidget->addTab( tab1_1, i18n( "&Address" ) );
527} 527}
528 528
529 529
530 530
531void AddresseeEditorWidget::setupTab2() 531void AddresseeEditorWidget::setupTab2()
532{ 532{
533 // This is the Details tab 533 // This is the Details tab
534 QWidget *tab2 = new QWidget( mTabWidget ); 534 QWidget *tab2 = new QWidget( mTabWidget );
535 535
536 QGridLayout *layout = new QGridLayout( tab2, 8, 3 ); 536 QGridLayout *layout = new QGridLayout( tab2, 8, 3 );
537 layout->setMargin( KDialogBase::marginHintSmall() ); 537 layout->setMargin( KDialogBase::marginHintSmall() );
538 layout->setSpacing( KDialogBase::spacingHintSmall() ); 538 layout->setSpacing( KDialogBase::spacingHintSmall() );
539 539
540 QLabel *label; 540 QLabel *label;
541 KSeparator* bar; 541 KSeparator* bar;
542 542
543 /////////////////////// 543 ///////////////////////
544 // Office info 544 // Office info
545 545
546 // Department 546 // Department
547 label = new QLabel( tab2 ); 547 label = new QLabel( tab2 );
548//US loadIcon call is ambiguous. Add one more parameter 548//US loadIcon call is ambiguous. Add one more parameter
549//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop ) ); 549//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop ) );
550 label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop, 0 ) ); 550 label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop, 0 ) );
551 layout->addMultiCellWidget( label, 0, 1, 0, 0 ); 551 layout->addMultiCellWidget( label, 0, 1, 0, 0 );
552 552
553 label = new QLabel( i18n( "Department:" ), tab2 ); 553 label = new QLabel( i18n( "Department:" ), tab2 );
554 layout->addWidget( label, 0, 1 ); 554 layout->addWidget( label, 0, 1 );
555 mDepartmentEdit = new KLineEdit( tab2 ); 555 mDepartmentEdit = new KLineEdit( tab2 );
556 connect( mDepartmentEdit, SIGNAL( textChanged( const QString& ) ), 556 connect( mDepartmentEdit, SIGNAL( textChanged( const QString& ) ),
557 SLOT( textChanged( const QString& ) ) ); 557 SLOT( textChanged( const QString& ) ) );
558 label->setBuddy( mDepartmentEdit ); 558 label->setBuddy( mDepartmentEdit );
559 layout->addWidget( mDepartmentEdit, 0, 2 ); 559 layout->addWidget( mDepartmentEdit, 0, 2 );
560 560
561 label = new QLabel( i18n( "Office:" ), tab2 ); 561 label = new QLabel( i18n( "Office:" ), tab2 );
562 layout->addWidget( label, 1, 1 ); 562 layout->addWidget( label, 1, 1 );
563 mOfficeEdit = new KLineEdit( tab2 ); 563 mOfficeEdit = new KLineEdit( tab2 );
564 connect( mOfficeEdit, SIGNAL( textChanged( const QString& ) ), 564 connect( mOfficeEdit, SIGNAL( textChanged( const QString& ) ),
565 SLOT( textChanged( const QString& ) ) ); 565 SLOT( textChanged( const QString& ) ) );
566 label->setBuddy( mOfficeEdit ); 566 label->setBuddy( mOfficeEdit );
567 layout->addWidget( mOfficeEdit, 1, 2 ); 567 layout->addWidget( mOfficeEdit, 1, 2 );
568 568
569 label = new QLabel( i18n( "Profession:" ), tab2 ); 569 label = new QLabel( i18n( "Profession:" ), tab2 );
570 layout->addWidget( label, 2, 1 ); 570 layout->addWidget( label, 2, 1 );
571 mProfessionEdit = new KLineEdit( tab2 ); 571 mProfessionEdit = new KLineEdit( tab2 );
572 connect( mProfessionEdit, SIGNAL( textChanged( const QString& ) ), 572 connect( mProfessionEdit, SIGNAL( textChanged( const QString& ) ),
573 SLOT( textChanged( const QString& ) ) ); 573 SLOT( textChanged( const QString& ) ) );
574 label->setBuddy( mProfessionEdit ); 574 label->setBuddy( mProfessionEdit );
575 layout->addWidget( mProfessionEdit, 2, 2 ); 575 layout->addWidget( mProfessionEdit, 2, 2 );
576 576
577 label = new QLabel( i18n( "Manager\'s name:" ), tab2 ); 577 label = new QLabel( i18n( "Manager\'s name:" ), tab2 );
578//US layout->addWidget( label, 0, 3 ); 578//US layout->addWidget( label, 0, 3 );
579 layout->addWidget( label, 3, 1 ); 579 layout->addWidget( label, 3, 1 );
580 mManagerEdit = new KLineEdit( tab2 ); 580 mManagerEdit = new KLineEdit( tab2 );
581 connect( mManagerEdit, SIGNAL( textChanged( const QString& ) ), 581 connect( mManagerEdit, SIGNAL( textChanged( const QString& ) ),
582 SLOT( textChanged( const QString& ) ) ); 582 SLOT( textChanged( const QString& ) ) );
583 label->setBuddy( mManagerEdit ); 583 label->setBuddy( mManagerEdit );
584//US layout->addMultiCellWidget( mManagerEdit, 0, 0, 4, 5 ); 584//US layout->addMultiCellWidget( mManagerEdit, 0, 0, 4, 5 );
585 layout->addWidget( mManagerEdit, 3, 2 ); 585 layout->addWidget( mManagerEdit, 3, 2 );
586 586
587 label = new QLabel( i18n( "Assistant's name:" ), tab2 ); 587 label = new QLabel( i18n( "Assistant's name:" ), tab2 );
588//US layout->addWidget( label, 1, 3 ); 588//US layout->addWidget( label, 1, 3 );
589 layout->addWidget( label, 4, 1 ); 589 layout->addWidget( label, 4, 1 );
590 mAssistantEdit = new KLineEdit( tab2 ); 590 mAssistantEdit = new KLineEdit( tab2 );
591 connect( mAssistantEdit, SIGNAL( textChanged( const QString& ) ), 591 connect( mAssistantEdit, SIGNAL( textChanged( const QString& ) ),
592 SLOT( textChanged( const QString& ) ) ); 592 SLOT( textChanged( const QString& ) ) );
593 label->setBuddy( mAssistantEdit ); 593 label->setBuddy( mAssistantEdit );
594//US layout->addMultiCellWidget( mAssistantEdit, 1, 1, 4, 5 ); 594//US layout->addMultiCellWidget( mAssistantEdit, 1, 1, 4, 5 );
595 layout->addWidget( mAssistantEdit, 4, 2 ); 595 layout->addWidget( mAssistantEdit, 4, 2 );
596 596
597 bar = new KSeparator( KSeparator::HLine, tab2 ); 597 bar = new KSeparator( KSeparator::HLine, tab2 );
598//US layout->addMultiCellWidget( bar, 3, 3, 0, 5 ); 598//US layout->addMultiCellWidget( bar, 3, 3, 0, 5 );
599 layout->addMultiCellWidget( bar, 5, 5, 0, 2 ); 599 layout->addMultiCellWidget( bar, 5, 5, 0, 2 );
600 600
601 ///////////////////////////////////////////////// 601 /////////////////////////////////////////////////
602 // Personal info 602 // Personal info
603 603
604 //label = new QLabel( tab2 ); 604 //label = new QLabel( tab2 );
605//US loadIcon call is ambiguous. Add one more parameter 605//US loadIcon call is ambiguous. Add one more parameter
606//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) ); 606//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) );
607 //label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 0 ) ); 607 //label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 0 ) );
608//US layout->addMultiCellWidget( label, 4, 5, 0, 0 ); 608//US layout->addMultiCellWidget( label, 4, 5, 0, 0 );
609 //layout->addMultiCellWidget( label, 6, 7, 0, 0 ); 609 //layout->addMultiCellWidget( label, 6, 7, 0, 0 );
610 610
611 611
612 int iii = 6; 612 int iii = 6;
613 613
614 if ( QApplication::desktop()->width() == 640 ) { 614 if ( QApplication::desktop()->width() == 640 ) {
615 QHBox * nbox = new QHBox ( tab2 ); 615 QHBox * nbox = new QHBox ( tab2 );
616 label = new QLabel( i18n( "Nick name:" )+" ", nbox ); 616 label = new QLabel( i18n( "Nick name:" )+" ", nbox );
617 mNicknameEdit = new KLineEdit( nbox ); 617 mNicknameEdit = new KLineEdit( nbox );
618 connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), 618 connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ),
619 SLOT( textChanged( const QString& ) ) ); 619 SLOT( textChanged( const QString& ) ) );
620 label->setBuddy( mNicknameEdit ); 620 label->setBuddy( mNicknameEdit );
621 621
622 label = new QLabel( " "+i18n( "Spouse's name:" )+" ", nbox ); 622 label = new QLabel( " "+i18n( "Spouse's name:" )+" ", nbox );
623 mSpouseEdit = new KLineEdit( nbox ); 623 mSpouseEdit = new KLineEdit( nbox );
624 connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ), 624 connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ),
625 SLOT( textChanged( const QString& ) ) ); 625 SLOT( textChanged( const QString& ) ) );
626 label->setBuddy( mSpouseEdit ); 626 label->setBuddy( mSpouseEdit );
627 layout->addMultiCellWidget( nbox, iii, iii, 1, 2 ); 627 layout->addMultiCellWidget( nbox, iii, iii, 1, 2 );
628 ++iii; 628 ++iii;
629 629
630 } else { 630 } else {
631 label = new QLabel( i18n( "Nick name:" ), tab2 ); 631 label = new QLabel( i18n( "Nick name:" ), tab2 );
632 layout->addWidget( label, iii, 1 ); 632 layout->addWidget( label, iii, 1 );
633 mNicknameEdit = new KLineEdit( tab2 ); 633 mNicknameEdit = new KLineEdit( tab2 );
634 connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), 634 connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ),
635 SLOT( textChanged( const QString& ) ) ); 635 SLOT( textChanged( const QString& ) ) );
636 label->setBuddy( mNicknameEdit ); 636 label->setBuddy( mNicknameEdit );
637 layout->addWidget( mNicknameEdit, iii, 2 ); 637 layout->addWidget( mNicknameEdit, iii, 2 );
638 ++iii; 638 ++iii;
639 639
640 label = new QLabel( i18n( "Spouse's name:" ), tab2 ); 640 label = new QLabel( i18n( "Spouse's name:" ), tab2 );
641 layout->addWidget( label, iii, 1 ); 641 layout->addWidget( label, iii, 1 );
642 mSpouseEdit = new KLineEdit( tab2 ); 642 mSpouseEdit = new KLineEdit( tab2 );
643 connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ), 643 connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ),
644 SLOT( textChanged( const QString& ) ) ); 644 SLOT( textChanged( const QString& ) ) );
645 label->setBuddy( mSpouseEdit ); 645 label->setBuddy( mSpouseEdit );
646 layout->addWidget( mSpouseEdit, iii, 2 ); 646 layout->addWidget( mSpouseEdit, iii, 2 );
647 ++iii; 647 ++iii;
648 } 648 }
649 649
650 label = new QLabel( i18n( "Children's names:" ), tab2 ); 650 label = new QLabel( i18n( "Children's names:" ), tab2 );
651 layout->addWidget( label, iii, 1 ); 651 layout->addWidget( label, iii, 1 );
652 mChildEdit = new KLineEdit( tab2 ); 652 mChildEdit = new KLineEdit( tab2 );
653 connect( mChildEdit, SIGNAL( textChanged( const QString& ) ), 653 connect( mChildEdit, SIGNAL( textChanged( const QString& ) ),
654 SLOT( textChanged( const QString& ) ) ); 654 SLOT( textChanged( const QString& ) ) );
655 label->setBuddy( mChildEdit ); 655 label->setBuddy( mChildEdit );
656 layout->addWidget( mChildEdit, iii, 2 ); 656 layout->addWidget( mChildEdit, iii, 2 );
657 ++iii; 657 ++iii;
658 if ( QApplication::desktop()->width() == 640 ) { 658 if ( QApplication::desktop()->width() == 640 ) {
659 QHBox * nbox = new QHBox ( tab2 ); 659 QHBox * nbox = new QHBox ( tab2 );
660 label = new QLabel( i18n( "Birthday:" )+" ", nbox ); 660 label = new QLabel( i18n( "Birthday:" )+" ", nbox );
661 mBirthdayPicker = new KDateEdit( nbox ); 661 mBirthdayPicker = new KDateEdit( nbox );
662 mBirthdayPicker->toggleDateFormat(); 662 //mBirthdayPicker->toggleDateFormat();
663 mBirthdayPicker->setHandleInvalid( true ); 663 mBirthdayPicker->setHandleInvalid( true );
664 connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ), 664 connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ),
665 SLOT( dateChanged( QDate ) ) ); 665 SLOT( dateChanged( QDate ) ) );
666 666
667 label->setBuddy( mBirthdayPicker ); 667 label->setBuddy( mBirthdayPicker );
668 668
669 label = new QLabel( " "+i18n( "Anniversary:" )+" ", nbox ); 669 label = new QLabel( " "+i18n( "Anniversary:" )+" ", nbox );
670 mAnniversaryPicker = new KDateEdit( nbox ); 670 mAnniversaryPicker = new KDateEdit( nbox );
671 mAnniversaryPicker->setHandleInvalid( true ); 671 mAnniversaryPicker->setHandleInvalid( true );
672 connect( mAnniversaryPicker, SIGNAL( dateChanged( QDate ) ), 672 connect( mAnniversaryPicker, SIGNAL( dateChanged( QDate ) ),
673 SLOT( dateChanged( QDate ) ) ); 673 SLOT( dateChanged( QDate ) ) );
674 674
675 label->setBuddy( mAnniversaryPicker ); 675 label->setBuddy( mAnniversaryPicker );
676 layout->addMultiCellWidget( nbox, iii, iii, 1, 2 ); 676 layout->addMultiCellWidget( nbox, iii, iii, 1, 2 );
677 ++iii; 677 ++iii;
678 678
679 } else { 679 } else {
680 680
681 label = new QLabel( i18n( "Birthday:" ), tab2 ); 681 label = new QLabel( i18n( "Birthday:" ), tab2 );
682 layout->addWidget( label, iii, 1 ); 682 layout->addWidget( label, iii, 1 );
683 mBirthdayPicker = new KDateEdit( tab2 ); 683 mBirthdayPicker = new KDateEdit( tab2 );
684 mBirthdayPicker->toggleDateFormat(); 684 //mBirthdayPicker->toggleDateFormat();
685 mBirthdayPicker->setHandleInvalid( true ); 685 mBirthdayPicker->setHandleInvalid( true );
686 connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ), 686 connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ),
687 SLOT( dateChanged( QDate ) ) ); 687 SLOT( dateChanged( QDate ) ) );
688 688
689 label->setBuddy( mBirthdayPicker ); 689 label->setBuddy( mBirthdayPicker );
690 layout->addWidget( mBirthdayPicker, iii, 2 ); 690 layout->addWidget( mBirthdayPicker, iii, 2 );
691 ++iii; 691 ++iii;
692 692
693 label = new QLabel( i18n( "Anniversary:" ), tab2 ); 693 label = new QLabel( i18n( "Anniversary:" ), tab2 );
694 layout->addWidget( label, iii, 1 ); 694 layout->addWidget( label, iii, 1 );
695 mAnniversaryPicker = new KDateEdit( tab2 ); 695 mAnniversaryPicker = new KDateEdit( tab2 );
696 mAnniversaryPicker->setHandleInvalid( true ); 696 mAnniversaryPicker->setHandleInvalid( true );
697 connect( mAnniversaryPicker, SIGNAL( dateChanged( QDate ) ), 697 connect( mAnniversaryPicker, SIGNAL( dateChanged( QDate ) ),
698 SLOT( dateChanged( QDate ) ) ); 698 SLOT( dateChanged( QDate ) ) );
699 699
700 label->setBuddy( mAnniversaryPicker ); 700 label->setBuddy( mAnniversaryPicker );
701 layout->addWidget( mAnniversaryPicker, iii, 2 ); 701 layout->addWidget( mAnniversaryPicker, iii, 2 );
702 ++iii; 702 ++iii;
703 703
704 } 704 }
705 705
706 label = new QLabel( i18n( "Gender:" ), tab2 ); 706 label = new QLabel( i18n( "Gender:" ), tab2 );
707 layout->addWidget( label, iii, 1 ); 707 layout->addWidget( label, iii, 1 );
708 mGenderBox = new QComboBox ( tab2 ); 708 mGenderBox = new QComboBox ( tab2 );
709 mGenderBox->insertItem ( i18n( "ALIEN (gender undefined)" )); 709 mGenderBox->insertItem ( i18n( "ALIEN (gender undefined)" ));
710 mGenderBox->insertItem ( i18n( "female" )); 710 mGenderBox->insertItem ( i18n( "female" ));
711 mGenderBox->insertItem ( i18n( "male" )); 711 mGenderBox->insertItem ( i18n( "male" ));
712 connect( mGenderBox, SIGNAL( activated ( const QString & ) ), 712 connect( mGenderBox, SIGNAL( activated ( const QString & ) ),
713 SLOT( textChanged( const QString& ) ) ); 713 SLOT( textChanged( const QString& ) ) );
714 label->setBuddy( mGenderBox ); 714 label->setBuddy( mGenderBox );
715 layout->addWidget( mGenderBox, iii, 2 ); 715 layout->addWidget( mGenderBox, iii, 2 );
716 ++iii; 716 ++iii;
717 // Build the layout and add to the tab widget 717 // Build the layout and add to the tab widget
718 layout->activate(); // required 718 layout->activate(); // required
719 719
720 mTabWidget->addTab( tab2, i18n( "&Details" ) ); 720 mTabWidget->addTab( tab2, i18n( "&Details" ) );
721} 721}
722 722
723void AddresseeEditorWidget::setupTab2_1() 723void AddresseeEditorWidget::setupTab2_1()
724{ 724{
725 // This is the Details tab 725 // This is the Details tab
726 QWidget *tab2_2 = new QWidget( mTabWidget ); 726 QWidget *tab2_2 = new QWidget( mTabWidget );
727 727
728 QGridLayout *layout = new QGridLayout( tab2_2, 1, 2 ); 728 QGridLayout *layout = new QGridLayout( tab2_2, 1, 2 );
729 layout->setMargin( KDialogBase::marginHintSmall() ); 729 layout->setMargin( KDialogBase::marginHintSmall() );
730 layout->setSpacing( KDialogBase::spacingHintSmall() ); 730 layout->setSpacing( KDialogBase::spacingHintSmall() );
731 731
732 QLabel *label; 732 QLabel *label;
733 KSeparator* bar; 733 KSeparator* bar;
734 734
735/*US 735/*US
736 /////////////////////// 736 ///////////////////////
737 // Office info 737 // Office info
738 738
739 // Department 739 // Department
740 label = new QLabel( tab2 ); 740 label = new QLabel( tab2 );
741//US loadIcon call is ambiguous. Add one more parameter 741//US loadIcon call is ambiguous. Add one more parameter
742//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop ) ); 742//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop ) );
743 label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop, 0 ) ); 743 label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop, 0 ) );
744 layout->addMultiCellWidget( label, 0, 1, 0, 0 ); 744 layout->addMultiCellWidget( label, 0, 1, 0, 0 );
745 745
746 label = new QLabel( i18n( "Department:" ), tab2 ); 746 label = new QLabel( i18n( "Department:" ), tab2 );
747 layout->addWidget( label, 0, 1 ); 747 layout->addWidget( label, 0, 1 );
748 mDepartmentEdit = new KLineEdit( tab2 ); 748 mDepartmentEdit = new KLineEdit( tab2 );
749 connect( mDepartmentEdit, SIGNAL( textChanged( const QString& ) ), 749 connect( mDepartmentEdit, SIGNAL( textChanged( const QString& ) ),
750 SLOT( textChanged( const QString& ) ) ); 750 SLOT( textChanged( const QString& ) ) );
751 label->setBuddy( mDepartmentEdit ); 751 label->setBuddy( mDepartmentEdit );
752 layout->addWidget( mDepartmentEdit, 0, 2 ); 752 layout->addWidget( mDepartmentEdit, 0, 2 );
753 753
754 label = new QLabel( i18n( "Office:" ), tab2 ); 754 label = new QLabel( i18n( "Office:" ), tab2 );
755 layout->addWidget( label, 1, 1 ); 755 layout->addWidget( label, 1, 1 );
756 mOfficeEdit = new KLineEdit( tab2 ); 756 mOfficeEdit = new KLineEdit( tab2 );
757 connect( mOfficeEdit, SIGNAL( textChanged( const QString& ) ), 757 connect( mOfficeEdit, SIGNAL( textChanged( const QString& ) ),
758 SLOT( textChanged( const QString& ) ) ); 758 SLOT( textChanged( const QString& ) ) );
759 label->setBuddy( mOfficeEdit ); 759 label->setBuddy( mOfficeEdit );
760 layout->addWidget( mOfficeEdit, 1, 2 ); 760 layout->addWidget( mOfficeEdit, 1, 2 );
761 761
762 label = new QLabel( i18n( "Profession:" ), tab2 ); 762 label = new QLabel( i18n( "Profession:" ), tab2 );
763 layout->addWidget( label, 2, 1 ); 763 layout->addWidget( label, 2, 1 );
764 mProfessionEdit = new KLineEdit( tab2 ); 764 mProfessionEdit = new KLineEdit( tab2 );
765 connect( mProfessionEdit, SIGNAL( textChanged( const QString& ) ), 765 connect( mProfessionEdit, SIGNAL( textChanged( const QString& ) ),
766 SLOT( textChanged( const QString& ) ) ); 766 SLOT( textChanged( const QString& ) ) );
767 label->setBuddy( mProfessionEdit ); 767 label->setBuddy( mProfessionEdit );
768 layout->addWidget( mProfessionEdit, 2, 2 ); 768 layout->addWidget( mProfessionEdit, 2, 2 );
769 769
770 label = new QLabel( i18n( "Manager\'s name:" ), tab2 ); 770 label = new QLabel( i18n( "Manager\'s name:" ), tab2 );
771 layout->addWidget( label, 0, 3 ); 771 layout->addWidget( label, 0, 3 );
772 mManagerEdit = new KLineEdit( tab2 ); 772 mManagerEdit = new KLineEdit( tab2 );
773 connect( mManagerEdit, SIGNAL( textChanged( const QString& ) ), 773 connect( mManagerEdit, SIGNAL( textChanged( const QString& ) ),
774 SLOT( textChanged( const QString& ) ) ); 774 SLOT( textChanged( const QString& ) ) );
775 label->setBuddy( mManagerEdit ); 775 label->setBuddy( mManagerEdit );
776 layout->addMultiCellWidget( mManagerEdit, 0, 0, 4, 5 ); 776 layout->addMultiCellWidget( mManagerEdit, 0, 0, 4, 5 );
777 777
778 label = new QLabel( i18n( "Assistant's name:" ), tab2 ); 778 label = new QLabel( i18n( "Assistant's name:" ), tab2 );
779 layout->addWidget( label, 1, 3 ); 779 layout->addWidget( label, 1, 3 );
780 mAssistantEdit = new KLineEdit( tab2 ); 780 mAssistantEdit = new KLineEdit( tab2 );
781 connect( mAssistantEdit, SIGNAL( textChanged( const QString& ) ), 781 connect( mAssistantEdit, SIGNAL( textChanged( const QString& ) ),
782 SLOT( textChanged( const QString& ) ) ); 782 SLOT( textChanged( const QString& ) ) );
783 label->setBuddy( mAssistantEdit ); 783 label->setBuddy( mAssistantEdit );
784 layout->addMultiCellWidget( mAssistantEdit, 1, 1, 4, 5 ); 784 layout->addMultiCellWidget( mAssistantEdit, 1, 1, 4, 5 );
785 785
786 bar = new KSeparator( KSeparator::HLine, tab2 ); 786 bar = new KSeparator( KSeparator::HLine, tab2 );
787 layout->addMultiCellWidget( bar, 3, 3, 0, 5 ); 787 layout->addMultiCellWidget( bar, 3, 3, 0, 5 );
788 788
789 ///////////////////////////////////////////////// 789 /////////////////////////////////////////////////
790 // Personal info 790 // Personal info
791 791
792 label = new QLabel( tab2 ); 792 label = new QLabel( tab2 );
793//US loadIcon call is ambiguous. Add one more parameter 793//US loadIcon call is ambiguous. Add one more parameter
794//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) ); 794//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) );
795 label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 0 ) ); 795 label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 0 ) );
796 layout->addMultiCellWidget( label, 4, 5, 0, 0 ); 796 layout->addMultiCellWidget( label, 4, 5, 0, 0 );
797 797
798 label = new QLabel( i18n( "Nick name:" ), tab2 ); 798 label = new QLabel( i18n( "Nick name:" ), tab2 );
799 layout->addWidget( label, 4, 1 ); 799 layout->addWidget( label, 4, 1 );
800 mNicknameEdit = new KLineEdit( tab2 ); 800 mNicknameEdit = new KLineEdit( tab2 );
801 connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), 801 connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ),
802 SLOT( textChanged( const QString& ) ) ); 802 SLOT( textChanged( const QString& ) ) );
803 label->setBuddy( mNicknameEdit ); 803 label->setBuddy( mNicknameEdit );
804 layout->addWidget( mNicknameEdit, 4, 2 ); 804 layout->addWidget( mNicknameEdit, 4, 2 );
805 805
806 label = new QLabel( i18n( "Spouse's name:" ), tab2 ); 806 label = new QLabel( i18n( "Spouse's name:" ), tab2 );
807 layout->addWidget( label, 5, 1 ); 807 layout->addWidget( label, 5, 1 );
808 mSpouseEdit = new KLineEdit( tab2 ); 808 mSpouseEdit = new KLineEdit( tab2 );
809 connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ), 809 connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ),
810 SLOT( textChanged( const QString& ) ) ); 810 SLOT( textChanged( const QString& ) ) );
811 label->setBuddy( mSpouseEdit ); 811 label->setBuddy( mSpouseEdit );
812 layout->addWidget( mSpouseEdit, 5, 2 ); 812 layout->addWidget( mSpouseEdit, 5, 2 );
813 813
814 label = new QLabel( i18n( "Birthday:" ), tab2 ); 814 label = new QLabel( i18n( "Birthday:" ), tab2 );
815 layout->addWidget( label, 4, 3 ); 815 layout->addWidget( label, 4, 3 );
816 mBirthdayPicker = new KDateEdit( tab2 ); 816 mBirthdayPicker = new KDateEdit( tab2 );
817 mBirthdayPicker->setHandleInvalid( true ); 817 mBirthdayPicker->setHandleInvalid( true );
818 connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ), 818 connect( mBirthdayPicker, SIGNAL( dateChanged( QDate ) ),
819 SLOT( dateChanged( QDate ) ) ); 819 SLOT( dateChanged( QDate ) ) );
820 connect( mBirthdayPicker, SIGNAL( invalidDateEntered() ), 820 connect( mBirthdayPicker, SIGNAL( invalidDateEntered() ),
821 SLOT( invalidDate() ) ); 821 SLOT( invalidDate() ) );
822 connect( mBirthdayPicker, SIGNAL( textChanged( const QString& ) ), 822 connect( mBirthdayPicker, SIGNAL( textChanged( const QString& ) ),
823 SLOT( emitModified() ) ); 823 SLOT( emitModified() ) );
824 label->setBuddy( mBirthdayPicker ); 824 label->setBuddy( mBirthdayPicker );
825 layout->addWidget( mBirthdayPicker, 4, 4 ); 825 layout->addWidget( mBirthdayPicker, 4, 4 );
826 826
827 label = new QLabel( i18n( "Anniversary:" ), tab2 ); 827 label = new QLabel( i18n( "Anniversary:" ), tab2 );
828 layout->addWidget( label, 5, 3 ); 828 layout->addWidget( label, 5, 3 );
829 mAnniversaryPicker = new KDateEdit( tab2 ); 829 mAnniversaryPicker = new KDateEdit( tab2 );
830 mAnniversaryPicker->setHandleInvalid( true ); 830 mAnniversaryPicker->setHandleInvalid( true );
831 connect( mAnniversaryPicker, SIGNAL( dateChanged( QDate ) ), 831 connect( mAnniversaryPicker, SIGNAL( dateChanged( QDate ) ),
832 SLOT( dateChanged( QDate ) ) ); 832 SLOT( dateChanged( QDate ) ) );
833 connect( mAnniversaryPicker, SIGNAL( invalidDateEntered() ), 833 connect( mAnniversaryPicker, SIGNAL( invalidDateEntered() ),
834 SLOT( invalidDate() ) ); 834 SLOT( invalidDate() ) );
835 connect( mAnniversaryPicker, SIGNAL( textChanged( const QString& ) ), 835 connect( mAnniversaryPicker, SIGNAL( textChanged( const QString& ) ),
836 SLOT( emitModified() ) ); 836 SLOT( emitModified() ) );
837 label->setBuddy( mAnniversaryPicker ); 837 label->setBuddy( mAnniversaryPicker );
838 layout->addWidget( mAnniversaryPicker, 5, 4 ); 838 layout->addWidget( mAnniversaryPicker, 5, 4 );
839 839
840 bar = new KSeparator( KSeparator::HLine, tab2 ); 840 bar = new KSeparator( KSeparator::HLine, tab2 );
841 layout->addMultiCellWidget( bar, 6, 6, 0, 5 ); 841 layout->addMultiCellWidget( bar, 6, 6, 0, 5 );
842*/ 842*/
843 ////////////////////////////////////// 843 //////////////////////////////////////
844 // Notes 844 // Notes
845 label = new QLabel( i18n( "Note:" ), tab2_2 ); 845 label = new QLabel( i18n( "Note:" ), tab2_2 );
846 label->setAlignment( Qt::AlignTop | Qt::AlignLeft ); 846 label->setAlignment( Qt::AlignTop | Qt::AlignLeft );
847//US layout->addWidget( label, 7, 0 ); 847//US layout->addWidget( label, 7, 0 );
848 layout->addWidget( label, 0, 0 ); 848 layout->addWidget( label, 0, 0 );
849#ifndef KAB_EMBEDDED 849#ifndef KAB_EMBEDDED
850 mNoteEdit = new QTextEdit( tab2_2 ); 850 mNoteEdit = new QTextEdit( tab2_2 );
851 mNoteEdit->setWordWrap( QTextEdit::WidgetWidth ); 851 mNoteEdit->setWordWrap( QTextEdit::WidgetWidth );
852 mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); 852 mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() );
853#else //KAB_EMBEDDED 853#else //KAB_EMBEDDED
854 mNoteEdit = new QMultiLineEdit( tab2_2 ); 854 mNoteEdit = new QMultiLineEdit( tab2_2 );
855 mNoteEdit->setWordWrap( QMultiLineEdit::WidgetWidth ); 855 mNoteEdit->setWordWrap( QMultiLineEdit::WidgetWidth );
856 mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); 856 mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() );
857#endif //KAB_EMBEDDED 857#endif //KAB_EMBEDDED
858 858
859 connect( mNoteEdit, SIGNAL( textChanged() ), SLOT( emitModified() ) ); 859 connect( mNoteEdit, SIGNAL( textChanged() ), SLOT( emitModified() ) );
860 label->setBuddy( mNoteEdit ); 860 label->setBuddy( mNoteEdit );
861//US layout->addMultiCellWidget( mNoteEdit, 7, 7, 1, 5 ); 861//US layout->addMultiCellWidget( mNoteEdit, 7, 7, 1, 5 );
862 layout->addWidget( mNoteEdit, 1, 0); 862 layout->addWidget( mNoteEdit, 1, 0);
863 863
864 // Build the layout and add to the tab widget 864 // Build the layout and add to the tab widget
865 layout->activate(); // required 865 layout->activate(); // required
866 866
867 mTabWidget->addTab( tab2_2, i18n( "&Notes" ) ); 867 mTabWidget->addTab( tab2_2, i18n( "&Notes" ) );
868} 868}
869 869
870 870
871 871
872void AddresseeEditorWidget::setupTab3() 872void AddresseeEditorWidget::setupTab3()
873{ 873{
874 // This is the Misc tab 874 // This is the Misc tab
875 QWidget *tab3 = new QWidget( mTabWidget ); 875 QWidget *tab3 = new QWidget( mTabWidget );
876 876
877 QGridLayout *layout = new QGridLayout( tab3, 1, 1 ); 877 QGridLayout *layout = new QGridLayout( tab3, 1, 1 );
878 layout->setMargin( KDialogBase::marginHintSmall() ); 878 layout->setMargin( KDialogBase::marginHintSmall() );
879 layout->setSpacing( KDialogBase::spacingHintSmall() ); 879 layout->setSpacing( KDialogBase::spacingHintSmall() );
880//US layout->setColStretch( 2, 1 ); 880//US layout->setColStretch( 2, 1 );
881 881
882 ////////////////////////////////////// 882 //////////////////////////////////////
883 // Geo 883 // Geo
884 mGeoWidget = new GeoWidget( tab3 ); 884 mGeoWidget = new GeoWidget( tab3 );
885 // mGeoWidget->setMinimumSize( mGeoWidget->sizeHint() ); 885 // mGeoWidget->setMinimumSize( mGeoWidget->sizeHint() );
886 connect( mGeoWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); 886 connect( mGeoWidget, SIGNAL( changed() ), SLOT( emitModified() ) );
887 layout->addWidget( mGeoWidget, 0, 0 ); 887 layout->addWidget( mGeoWidget, 0, 0 );
888/*US 888/*US
889 ////////////////////////////////////// 889 //////////////////////////////////////
890 // Sound 890 // Sound
891#ifndef KAB_EMBEDDED 891#ifndef KAB_EMBEDDED
892 mSoundWidget = new SoundWidget( tab3 ); 892 mSoundWidget = new SoundWidget( tab3 );
893 mSoundWidget->setMinimumSize( mSoundWidget->sizeHint() ); 893 mSoundWidget->setMinimumSize( mSoundWidget->sizeHint() );
894 connect( mSoundWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); 894 connect( mSoundWidget, SIGNAL( changed() ), SLOT( emitModified() ) );
895 layout->addWidget( mSoundWidget, 0, 1, Qt::AlignTop ); 895 layout->addWidget( mSoundWidget, 0, 1, Qt::AlignTop );
896#else //KAB_EMBEDDED 896#else //KAB_EMBEDDED
897qDebug("AddresseeEditorWidget::setupTab2 sound part is not supported = has to be changed"); 897qDebug("AddresseeEditorWidget::setupTab2 sound part is not supported = has to be changed");
898#endif //KAB_EMBEDDED 898#endif //KAB_EMBEDDED
899 899
900 ////////////////////////////////////// 900 //////////////////////////////////////
901 // Images 901 // Images
902 mImageWidget = new ImageWidget( tab3 ); 902 mImageWidget = new ImageWidget( tab3 );
903 mImageWidget->setMinimumSize( mImageWidget->sizeHint() ); 903 mImageWidget->setMinimumSize( mImageWidget->sizeHint() );
904 connect( mImageWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); 904 connect( mImageWidget, SIGNAL( changed() ), SLOT( emitModified() ) );
905 layout->addWidget( mImageWidget, 1, 0, Qt::AlignTop ); 905 layout->addWidget( mImageWidget, 1, 0, Qt::AlignTop );
906*/ 906*/
907//US 907//US
908/* 908/*
909 KSeparator* bar = new KSeparator( KSeparator::HLine, tab3 ); 909 KSeparator* bar = new KSeparator( KSeparator::HLine, tab3 );
910 layout->addMultiCellWidget( bar, 1, 1, 0, 0 ); 910 layout->addMultiCellWidget( bar, 1, 1, 0, 0 );
911*/ 911*/
912 ////////////////////////////////////// 912 //////////////////////////////////////
913 // Keys 913 // Keys
914 mKeyWidget = new KeyWidget( tab3 ); 914 mKeyWidget = new KeyWidget( tab3 );
915 //mKeyWidget->setMinimumSize( mKeyWidget->sizeHint() ); 915 //mKeyWidget->setMinimumSize( mKeyWidget->sizeHint() );
916 connect( mKeyWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); 916 connect( mKeyWidget, SIGNAL( changed() ), SLOT( emitModified() ) );
917//US layout->addWidget( mKeyWidget, 1, 1, Qt::AlignTop ); 917//US layout->addWidget( mKeyWidget, 1, 1, Qt::AlignTop );
918 layout->addWidget( mKeyWidget, 1, 0 ); 918 layout->addWidget( mKeyWidget, 1, 0 );
919 919
920 mTabWidget->addTab( tab3, i18n( "&Misc" ) ); 920 mTabWidget->addTab( tab3, i18n( "&Misc" ) );
921} 921}
922 922
923void AddresseeEditorWidget::setupTab3_1() 923void AddresseeEditorWidget::setupTab3_1()
924{ 924{
925 // This is the Misc tab 925 // This is the Misc tab
926 QWidget *tab3 = new QWidget( mTabWidget ); 926 QWidget *tab3 = new QWidget( mTabWidget );
927 927
928//US QGridLayout *layout = new QGridLayout( tab3, 2, 3 ); 928//US QGridLayout *layout = new QGridLayout( tab3, 2, 3 );
929 QGridLayout *layout = new QGridLayout( tab3, 1, 1 ); 929 QGridLayout *layout = new QGridLayout( tab3, 1, 1 );
930 layout->setMargin( KDialogBase::marginHint() ); 930 layout->setMargin( KDialogBase::marginHint() );
931 layout->setSpacing( KDialogBase::spacingHint() ); 931 layout->setSpacing( KDialogBase::spacingHint() );
932//US layout->setColStretch( 2, 1 ); 932//US layout->setColStretch( 2, 1 );
933 933
934/*US 934/*US
935 ////////////////////////////////////// 935 //////////////////////////////////////
936 // Geo 936 // Geo
937 mGeoWidget = new GeoWidget( tab3 ); 937 mGeoWidget = new GeoWidget( tab3 );
938 mGeoWidget->setMinimumSize( mGeoWidget->sizeHint() ); 938 mGeoWidget->setMinimumSize( mGeoWidget->sizeHint() );
939 connect( mGeoWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); 939 connect( mGeoWidget, SIGNAL( changed() ), SLOT( emitModified() ) );
940 layout->addWidget( mGeoWidget, 0, 0, Qt::AlignTop ); 940 layout->addWidget( mGeoWidget, 0, 0, Qt::AlignTop );
941*/ 941*/
942 ////////////////////////////////////// 942 //////////////////////////////////////
943 // Sound 943 // Sound
944#ifndef KAB_EMBEDDED 944#ifndef KAB_EMBEDDED
945 mSoundWidget = new SoundWidget( tab3 ); 945 mSoundWidget = new SoundWidget( tab3 );
946 mSoundWidget->setMinimumSize( mSoundWidget->sizeHint() ); 946 mSoundWidget->setMinimumSize( mSoundWidget->sizeHint() );
947 connect( mSoundWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); 947 connect( mSoundWidget, SIGNAL( changed() ), SLOT( emitModified() ) );
948 layout->addWidget( mSoundWidget, 0, 1, Qt::AlignTop ); 948 layout->addWidget( mSoundWidget, 0, 1, Qt::AlignTop );
949#else //KAB_EMBEDDED 949#else //KAB_EMBEDDED
950//US qDebug("AddresseeEditorWidget::setupTab2 sound part is not supported = has to be changed"); 950//US qDebug("AddresseeEditorWidget::setupTab2 sound part is not supported = has to be changed");
951#endif //KAB_EMBEDDED 951#endif //KAB_EMBEDDED
952 952
953 ////////////////////////////////////// 953 //////////////////////////////////////
954 // Images 954 // Images
955 mImageWidget = new ImageWidget( tab3 ); 955 mImageWidget = new ImageWidget( tab3 );
956 mImageWidget->setMinimumSize( mImageWidget->sizeHint() ); 956 mImageWidget->setMinimumSize( mImageWidget->sizeHint() );
957 connect( mImageWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); 957 connect( mImageWidget, SIGNAL( changed() ), SLOT( emitModified() ) );
958 layout->addWidget( mImageWidget, 0, 0, Qt::AlignTop ); 958 layout->addWidget( mImageWidget, 0, 0, Qt::AlignTop );
959/*US 959/*US
960 ////////////////////////////////////// 960 //////////////////////////////////////
961 // Keys 961 // Keys
962 mKeyWidget = new KeyWidget( tab3 ); 962 mKeyWidget = new KeyWidget( tab3 );
963 mKeyWidget->setMinimumSize( mKeyWidget->sizeHint() ); 963 mKeyWidget->setMinimumSize( mKeyWidget->sizeHint() );
964 connect( mKeyWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); 964 connect( mKeyWidget, SIGNAL( changed() ), SLOT( emitModified() ) );
965 layout->addWidget( mKeyWidget, 1, 1, Qt::AlignTop ); 965 layout->addWidget( mKeyWidget, 1, 1, Qt::AlignTop );
966*/ 966*/
967 mTabWidget->addTab( tab3, i18n( "&Images" ) ); 967 mTabWidget->addTab( tab3, i18n( "&Images" ) );
968} 968}
969 969
970 970
971void AddresseeEditorWidget::load() 971void AddresseeEditorWidget::load()
972{ 972{
973 973
974 // Block signals in case anything tries to emit modified 974 // Block signals in case anything tries to emit modified
975 // CS: This doesn't seem to work. 975 // CS: This doesn't seem to work.
976 bool block = signalsBlocked(); 976 bool block = signalsBlocked();
977 blockSignals( true ); 977 blockSignals( true );
978 mBlockSignals = true; // used for internal signal blocking 978 mBlockSignals = true; // used for internal signal blocking
979 979
980 mNameEdit->setText( mAddressee.assembledName() ); 980 mNameEdit->setText( mAddressee.assembledName() );
981 981
982 if ( mAddressee.formattedName().isEmpty() ) { 982 if ( mAddressee.formattedName().isEmpty() ) {
983//US KConfig config( "kaddressbookrc" ); 983//US KConfig config( "kaddressbookrc" );
984 KConfig config( locateLocal("config", "kabcrc") ); 984 KConfig config( locateLocal("config", "kabcrc") );
985 config.setGroup( "General" ); 985 config.setGroup( "General" );
986 mFormattedNameType = config.readNumEntry( "FormattedNameType", 1 ); 986 mFormattedNameType = config.readNumEntry( "FormattedNameType", 1 );
987 mAddressee.setFormattedName( NameEditDialog::formattedName( mAddressee, mFormattedNameType ) ); 987 mAddressee.setFormattedName( NameEditDialog::formattedName( mAddressee, mFormattedNameType ) );
988 } else {; 988 } else {;
989 if ( mAddressee.formattedName() == NameEditDialog::formattedName( mAddressee, NameEditDialog::SimpleName ) ) 989 if ( mAddressee.formattedName() == NameEditDialog::formattedName( mAddressee, NameEditDialog::SimpleName ) )
990 mFormattedNameType = NameEditDialog::SimpleName; 990 mFormattedNameType = NameEditDialog::SimpleName;
991 else if ( mAddressee.formattedName() == NameEditDialog::formattedName( mAddressee, NameEditDialog::FullName ) ) 991 else if ( mAddressee.formattedName() == NameEditDialog::formattedName( mAddressee, NameEditDialog::FullName ) )
992 mFormattedNameType = NameEditDialog::FullName; 992 mFormattedNameType = NameEditDialog::FullName;
993 else if ( mAddressee.formattedName() == NameEditDialog::formattedName( mAddressee, NameEditDialog::ReverseName ) ) 993 else if ( mAddressee.formattedName() == NameEditDialog::formattedName( mAddressee, NameEditDialog::ReverseName ) )
994 mFormattedNameType = NameEditDialog::ReverseName; 994 mFormattedNameType = NameEditDialog::ReverseName;
995 else 995 else
996 mFormattedNameType = NameEditDialog::CustomName; 996 mFormattedNameType = NameEditDialog::CustomName;
997 } 997 }
998 998
999 mFormattedNameLabel->setText( mAddressee.formattedName() ); 999 mFormattedNameLabel->setText( mAddressee.formattedName() );
1000 1000
1001 mAConfig->setUid( mAddressee.uid() ); 1001 mAConfig->setUid( mAddressee.uid() );
1002 if ( mAConfig->automaticNameParsing() ) { 1002 if ( mAConfig->automaticNameParsing() ) {
1003 mNameLabel->hide(); 1003 mNameLabel->hide();
1004 mNameEdit->show(); 1004 mNameEdit->show();
1005 } else { 1005 } else {
1006 mNameEdit->hide(); 1006 mNameEdit->hide();
1007 mNameLabel->setText( mNameEdit->text() ); 1007 mNameLabel->setText( mNameEdit->text() );
1008 mNameLabel->show(); 1008 mNameLabel->show();
1009 } 1009 }
1010 1010
1011 mRoleEdit->setText( mAddressee.role() ); 1011 mRoleEdit->setText( mAddressee.role() );
1012 mOrgEdit->setText( mAddressee.organization() ); 1012 mOrgEdit->setText( mAddressee.organization() );
1013 1013
1014//US mURLEdit->setURL( mAddressee.url().url() ); 1014//US mURLEdit->setURL( mAddressee.url().url() );
1015 mURLEdit->setText( mAddressee.url().prettyURL() ); 1015 mURLEdit->setText( mAddressee.url().prettyURL() );
1016//US?? mURLEdit->home( false ); 1016//US?? mURLEdit->home( false );
1017 1017
1018 // mNoteEdit->setText( mAddressee.note() ); 1018 // mNoteEdit->setText( mAddressee.note() );
1019 mNoteEdit->setText( mAddressee.note() ); 1019 mNoteEdit->setText( mAddressee.note() );
1020 mEmailWidget->setEmails( mAddressee.emails() ); 1020 mEmailWidget->setEmails( mAddressee.emails() );
1021 mPhoneEditWidget->setPhoneNumbers( mAddressee.phoneNumbers() ); 1021 mPhoneEditWidget->setPhoneNumbers( mAddressee.phoneNumbers() );
1022 mAddressEditWidget->setAddresses( mAddressee, mAddressee.addresses() ); 1022 mAddressEditWidget->setAddresses( mAddressee, mAddressee.addresses() );
1023 mBirthdayPicker->setDate( mAddressee.birthday().date() ); 1023 mBirthdayPicker->setDate( mAddressee.birthday().date() );
1024 1024
1025//US mAnniversaryPicker->setDate( QDate::fromString( mAddressee.custom( 1025//US mAnniversaryPicker->setDate( QDate::fromString( mAddressee.custom(
1026//US "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate) ); 1026//US "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate) );
1027 QDate dt = KGlobal::locale()->readDate( mAddressee.custom("KADDRESSBOOK", "X-Anniversary" ), 1027 QDate dt = KGlobal::locale()->readDate( mAddressee.custom("KADDRESSBOOK", "X-Anniversary" ),
1028 "%Y-%m-%d"); // = Qt::ISODate 1028 "%Y-%m-%d"); // = Qt::ISODate
1029 mAnniversaryPicker->setDate( dt ); 1029 mAnniversaryPicker->setDate( dt );
1030 1030
1031 1031
1032 mNicknameEdit->setText( mAddressee.nickName() ); 1032 mNicknameEdit->setText( mAddressee.nickName() );
1033 mCategoryEdit->setText( mAddressee.categories().join( "," ) ); 1033 mCategoryEdit->setText( mAddressee.categories().join( "," ) );
1034 1034
1035 mGeoWidget->setGeo( mAddressee.geo() ); 1035 mGeoWidget->setGeo( mAddressee.geo() );
1036 mImageWidget->setPhoto( mAddressee.photo() ); 1036 mImageWidget->setPhoto( mAddressee.photo() );
1037 mImageWidget->setLogo( mAddressee.logo() ); 1037 mImageWidget->setLogo( mAddressee.logo() );
1038 mKeyWidget->setKeys( mAddressee.keys() ); 1038 mKeyWidget->setKeys( mAddressee.keys() );
1039 mSecrecyWidget->setSecrecy( mAddressee.secrecy() ); 1039 mSecrecyWidget->setSecrecy( mAddressee.secrecy() );
1040#ifndef KAB_EMBEDDED 1040#ifndef KAB_EMBEDDED
1041 mSoundWidget->setSound( mAddressee.sound() ); 1041 mSoundWidget->setSound( mAddressee.sound() );
1042#else //KAB_EMBEDDED 1042#else //KAB_EMBEDDED
1043//US qDebug("AddresseeEditorWidget::load has to be changed 2"); 1043//US qDebug("AddresseeEditorWidget::load has to be changed 2");
1044#endif //KAB_EMBEDDED 1044#endif //KAB_EMBEDDED
1045 1045
1046 // Load customs 1046 // Load customs
1047 mIMAddressEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-IMAddress" ) ); 1047 mIMAddressEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-IMAddress" ) );
1048 mSpouseEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-SpousesName" ) ); 1048 mSpouseEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-SpousesName" ) );
1049 mChildEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Children" ) ); 1049 mChildEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Children" ) );
1050 mManagerEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-ManagersName" ) ); 1050 mManagerEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-ManagersName" ) );
1051 mAssistantEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-AssistantsName" ) ); 1051 mAssistantEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-AssistantsName" ) );
1052 mDepartmentEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Department" ) ); 1052 mDepartmentEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Department" ) );
1053 mOfficeEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Office" ) ); 1053 mOfficeEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Office" ) );
1054 mProfessionEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Profession" ) ); 1054 mProfessionEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Profession" ) );
1055 QString gen = mAddressee.custom( "KADDRESSBOOK", "X-Gender" ); 1055 QString gen = mAddressee.custom( "KADDRESSBOOK", "X-Gender" );
1056 if ( gen == "female" ) 1056 if ( gen == "female" )
1057 mGenderBox->setCurrentItem ( 1 ); 1057 mGenderBox->setCurrentItem ( 1 );
1058 else if ( gen == "male" ) 1058 else if ( gen == "male" )
1059 mGenderBox->setCurrentItem ( 2 ); 1059 mGenderBox->setCurrentItem ( 2 );
1060 else 1060 else
1061 mGenderBox->setCurrentItem ( 0 ); 1061 mGenderBox->setCurrentItem ( 0 );
1062 blockSignals( block ); 1062 blockSignals( block );
1063 mBlockSignals = false; 1063 mBlockSignals = false;
1064 1064
1065 mDirty = false; 1065 mDirty = false;
1066} 1066}
1067 1067
1068void AddresseeEditorWidget::save() 1068void AddresseeEditorWidget::save()
1069{ 1069{
1070 if ( !dirty() ) { 1070 if ( !dirty() ) {
1071 return; 1071 return;
1072 } 1072 }
1073 1073
1074 mAddressee.setRevision( QDateTime::currentDateTime() ); 1074 mAddressee.setRevision( QDateTime::currentDateTime() );
1075 1075
1076 mAddressee.setRole( mRoleEdit->text() ); 1076 mAddressee.setRole( mRoleEdit->text() );
1077 mAddressee.setOrganization( mOrgEdit->text() ); 1077 mAddressee.setOrganization( mOrgEdit->text() );
1078 mAddressee.setUrl( KURL( mURLEdit->text() ) ); 1078 mAddressee.setUrl( KURL( mURLEdit->text() ) );
1079 mAddressee.setNote( mNoteEdit->text() ); 1079 mAddressee.setNote( mNoteEdit->text() );
1080 if ( mBirthdayPicker->inputIsValid() ) { 1080 if ( mBirthdayPicker->inputIsValid() ) {
1081 QDate da = mBirthdayPicker->date(); 1081 QDate da = mBirthdayPicker->date();
1082 if ( da > QDate::currentDate() )
1083 da.setYMD(da.year()-100, da.month(), da.day() );
1084 mAddressee.setBirthday( QDateTime( da ) ); 1082 mAddressee.setBirthday( QDateTime( da ) );
1085 //qDebug("bday %s ",da.toString().latin1()); 1083 //qDebug("bday %s ",da.toString().latin1());
1086 } 1084 }
1087 else { 1085 else {
1088 mAddressee.setBirthday( QDateTime() ); 1086 mAddressee.setBirthday( QDateTime() );
1089 mBirthdayPicker->clear(); 1087 mBirthdayPicker->clear();
1090 } 1088 }
1091 mAddressee.setNickName( mNicknameEdit->text() ); 1089 mAddressee.setNickName( mNicknameEdit->text() );
1092 mAddressee.setCategories( QStringList::split( ",", mCategoryEdit->text() ) ); 1090 mAddressee.setCategories( QStringList::split( ",", mCategoryEdit->text() ) );
1093 1091
1094 mAddressee.setGeo( mGeoWidget->geo() ); 1092 mAddressee.setGeo( mGeoWidget->geo() );
1095 mAddressee.setPhoto( mImageWidget->photo() ); 1093 mAddressee.setPhoto( mImageWidget->photo() );
1096 mAddressee.setLogo( mImageWidget->logo() ); 1094 mAddressee.setLogo( mImageWidget->logo() );
1097 mAddressee.setKeys( mKeyWidget->keys() ); 1095 mAddressee.setKeys( mKeyWidget->keys() );
1098#ifndef KAB_EMBEDDED 1096#ifndef KAB_EMBEDDED
1099 mAddressee.setSound( mSoundWidget->sound() ); 1097 mAddressee.setSound( mSoundWidget->sound() );
1100#else //KAB_EMBEDDED 1098#else //KAB_EMBEDDED
1101//US qDebug("AddresseeEditorWidget::save sound not supported"); 1099//US qDebug("AddresseeEditorWidget::save sound not supported");
1102#endif //KAB_EMBEDDED 1100#endif //KAB_EMBEDDED
1103 mAddressee.setSecrecy( mSecrecyWidget->secrecy() ); 1101 mAddressee.setSecrecy( mSecrecyWidget->secrecy() );
1104 1102
1105 // save custom fields 1103 // save custom fields
1106 mAddressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", mIMAddressEdit->text() ); 1104 mAddressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", mIMAddressEdit->text() );
1107 mAddressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", mSpouseEdit->text() ); 1105 mAddressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", mSpouseEdit->text() );
1108 mAddressee.insertCustom( "KADDRESSBOOK", "X-Children", mChildEdit->text() ); 1106 mAddressee.insertCustom( "KADDRESSBOOK", "X-Children", mChildEdit->text() );
1109 mAddressee.insertCustom( "KADDRESSBOOK", "X-ManagersName", mManagerEdit->text() ); 1107 mAddressee.insertCustom( "KADDRESSBOOK", "X-ManagersName", mManagerEdit->text() );
1110 mAddressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName", mAssistantEdit->text() ); 1108 mAddressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName", mAssistantEdit->text() );
1111 mAddressee.insertCustom( "KADDRESSBOOK", "X-Department", mDepartmentEdit->text() ); 1109 mAddressee.insertCustom( "KADDRESSBOOK", "X-Department", mDepartmentEdit->text() );
1112 mAddressee.insertCustom( "KADDRESSBOOK", "X-Office", mOfficeEdit->text() ); 1110 mAddressee.insertCustom( "KADDRESSBOOK", "X-Office", mOfficeEdit->text() );
1113 mAddressee.insertCustom( "KADDRESSBOOK", "X-Profession", mProfessionEdit->text() ); 1111 mAddressee.insertCustom( "KADDRESSBOOK", "X-Profession", mProfessionEdit->text() );
1114 if ( mAnniversaryPicker->inputIsValid() ) { 1112 if ( mAnniversaryPicker->inputIsValid() ) {
1115 QString dt = KGlobal::locale()->formatDate(mAnniversaryPicker->date(), true, KLocale::ISODate); 1113 QString dt = KGlobal::locale()->formatDate(mAnniversaryPicker->date(), true, KLocale::ISODate);
1116 mAddressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt); 1114 mAddressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt);
1117 } 1115 }
1118 else { 1116 else {
1119 mAddressee.removeCustom( "KADDRESSBOOK", "X-Anniversary" ); 1117 mAddressee.removeCustom( "KADDRESSBOOK", "X-Anniversary" );
1120 mAnniversaryPicker->clear(); 1118 mAnniversaryPicker->clear();
1121 } 1119 }
1122 int gen = mGenderBox->currentItem (); 1120 int gen = mGenderBox->currentItem ();
1123 if ( gen == 1 ) 1121 if ( gen == 1 )
1124 mAddressee.insertCustom( "KADDRESSBOOK", "X-Gender", "female"); 1122 mAddressee.insertCustom( "KADDRESSBOOK", "X-Gender", "female");
1125 else if ( gen == 2 ) 1123 else if ( gen == 2 )
1126 mAddressee.insertCustom( "KADDRESSBOOK", "X-Gender", "male"); 1124 mAddressee.insertCustom( "KADDRESSBOOK", "X-Gender", "male");
1127 else 1125 else
1128 mAddressee.removeCustom( "KADDRESSBOOK", "X-Gender" ); 1126 mAddressee.removeCustom( "KADDRESSBOOK", "X-Gender" );
1129 1127
1130 // Save the email addresses 1128 // Save the email addresses
1131 QStringList emails = mAddressee.emails(); 1129 QStringList emails = mAddressee.emails();
1132 QStringList::Iterator iter; 1130 QStringList::Iterator iter;
1133 for ( iter = emails.begin(); iter != emails.end(); ++iter ) 1131 for ( iter = emails.begin(); iter != emails.end(); ++iter )
1134 mAddressee.removeEmail( *iter ); 1132 mAddressee.removeEmail( *iter );
1135 1133
1136 emails = mEmailWidget->emails(); 1134 emails = mEmailWidget->emails();
1137 bool first = true; 1135 bool first = true;
1138 for ( iter = emails.begin(); iter != emails.end(); ++iter ) { 1136 for ( iter = emails.begin(); iter != emails.end(); ++iter ) {
1139 mAddressee.insertEmail( *iter, first ); 1137 mAddressee.insertEmail( *iter, first );
1140 first = false; 1138 first = false;
1141 } 1139 }
1142 1140
1143 // Save the phone numbers 1141 // Save the phone numbers
1144 KABC::PhoneNumber::List phoneNumbers; 1142 KABC::PhoneNumber::List phoneNumbers;
1145 KABC::PhoneNumber::List::Iterator phoneIter; 1143 KABC::PhoneNumber::List::Iterator phoneIter;
1146 phoneNumbers = mAddressee.phoneNumbers(); 1144 phoneNumbers = mAddressee.phoneNumbers();
1147 for ( phoneIter = phoneNumbers.begin(); phoneIter != phoneNumbers.end(); 1145 for ( phoneIter = phoneNumbers.begin(); phoneIter != phoneNumbers.end();
1148 ++phoneIter ) 1146 ++phoneIter )
1149 mAddressee.removePhoneNumber( *phoneIter ); 1147 mAddressee.removePhoneNumber( *phoneIter );
1150 1148
1151 phoneNumbers = mPhoneEditWidget->phoneNumbers(); 1149 phoneNumbers = mPhoneEditWidget->phoneNumbers();
1152 for ( phoneIter = phoneNumbers.begin(); phoneIter != phoneNumbers.end(); 1150 for ( phoneIter = phoneNumbers.begin(); phoneIter != phoneNumbers.end();
1153 ++phoneIter ) 1151 ++phoneIter )
1154 mAddressee.insertPhoneNumber( *phoneIter ); 1152 mAddressee.insertPhoneNumber( *phoneIter );
1155 1153
1156 // Save the addresses 1154 // Save the addresses
1157 KABC::Address::List addresses; 1155 KABC::Address::List addresses;
1158 KABC::Address::List::Iterator addressIter; 1156 KABC::Address::List::Iterator addressIter;
1159 addresses = mAddressee.addresses(); 1157 addresses = mAddressee.addresses();
1160 for ( addressIter = addresses.begin(); addressIter != addresses.end(); 1158 for ( addressIter = addresses.begin(); addressIter != addresses.end();
1161 ++addressIter ) 1159 ++addressIter )
1162 mAddressee.removeAddress( *addressIter ); 1160 mAddressee.removeAddress( *addressIter );
1163 1161
1164 addresses = mAddressEditWidget->addresses(); 1162 addresses = mAddressEditWidget->addresses();
1165 for ( addressIter = addresses.begin(); addressIter != addresses.end(); 1163 for ( addressIter = addresses.begin(); addressIter != addresses.end();
1166 ++addressIter ) 1164 ++addressIter )
1167 mAddressee.insertAddress( *addressIter ); 1165 mAddressee.insertAddress( *addressIter );
1168 mDirty = false; 1166 mDirty = false;
1169} 1167}
1170 1168
1171bool AddresseeEditorWidget::dirty() 1169bool AddresseeEditorWidget::dirty()
1172{ 1170{
1173 1171
1174 if ( ! mDirty ) { 1172 if ( ! mDirty ) {
1175 if ( mBirthdayPicker->inputIsValid() ) { 1173 if ( mBirthdayPicker->inputIsValid() ) {
1176 QDate da = mBirthdayPicker->date(); 1174 QDate da = mBirthdayPicker->date();
1177 if ( !(da == mAddressee.birthday().date())) 1175 if ( !(da == mAddressee.birthday().date()))
1178 mDirty = true; 1176 mDirty = true;
1179 } 1177 }
1180 else { 1178 else {
1181 mBirthdayPicker->clear(); 1179 mBirthdayPicker->clear();
1182 } 1180 }
1183 if ( mAnniversaryPicker->inputIsValid() ) { 1181 if ( mAnniversaryPicker->inputIsValid() ) {
1184 QDate da = mAnniversaryPicker->date(); 1182 QDate da = mAnniversaryPicker->date();
1185 if ( da != KGlobal::locale()->readDate( mAddressee.custom("KADDRESSBOOK", "X-Anniversary" ), 1183 if ( da != KGlobal::locale()->readDate( mAddressee.custom("KADDRESSBOOK", "X-Anniversary" ),
1186 "%Y-%m-%d")) 1184 "%Y-%m-%d"))
1187 mDirty = true; 1185 mDirty = true;
1188 } 1186 }
1189 else { 1187 else {
1190 mAnniversaryPicker->clear(); 1188 mAnniversaryPicker->clear();
1191 } 1189 }
1192 } 1190 }
1193 return mDirty; 1191 return mDirty;
1194} 1192}
1195 1193
1196void AddresseeEditorWidget::nameTextChanged( const QString &text ) 1194void AddresseeEditorWidget::nameTextChanged( const QString &text )
1197{ 1195{
1198 if ( mBlockSignals ) 1196 if ( mBlockSignals )
1199 return; 1197 return;
1200 // use the addressee class to parse the name for us 1198 // use the addressee class to parse the name for us
1201 mAConfig->setUid( mAddressee.uid() ); 1199 mAConfig->setUid( mAddressee.uid() );
1202 if ( mAConfig->automaticNameParsing() ) { 1200 if ( mAConfig->automaticNameParsing() ) {
1203 if ( !mAddressee.formattedName().isEmpty() ) { 1201 if ( !mAddressee.formattedName().isEmpty() ) {
1204 QString fn = mAddressee.formattedName(); 1202 QString fn = mAddressee.formattedName();
1205 mAddressee.setNameFromString( text ); 1203 mAddressee.setNameFromString( text );
1206 mAddressee.setFormattedName( fn ); 1204 mAddressee.setFormattedName( fn );
1207 } else { 1205 } else {
1208 // use extra addressee to avoid a formatted name assignment 1206 // use extra addressee to avoid a formatted name assignment
1209 Addressee addr; 1207 Addressee addr;
1210 addr.setNameFromString( text ); 1208 addr.setNameFromString( text );
1211 mAddressee.setPrefix( addr.prefix() ); 1209 mAddressee.setPrefix( addr.prefix() );
1212 mAddressee.setGivenName( addr.givenName() ); 1210 mAddressee.setGivenName( addr.givenName() );
1213 mAddressee.setAdditionalName( addr.additionalName() ); 1211 mAddressee.setAdditionalName( addr.additionalName() );
1214 mAddressee.setFamilyName( addr.familyName() ); 1212 mAddressee.setFamilyName( addr.familyName() );
1215 mAddressee.setSuffix( addr.suffix() ); 1213 mAddressee.setSuffix( addr.suffix() );
1216 } 1214 }
1217 } 1215 }
1218 nameBoxChanged(); 1216 nameBoxChanged();
1219 1217
1220 1218
1221 emitModified(); 1219 emitModified();
1222} 1220}
1223 1221
1224void AddresseeEditorWidget::nameBoxChanged() 1222void AddresseeEditorWidget::nameBoxChanged()
1225{ 1223{
1226 KABC::Addressee addr; 1224 KABC::Addressee addr;
1227 mAConfig->setUid( mAddressee.uid() ); 1225 mAConfig->setUid( mAddressee.uid() );
1228 if ( mAConfig->automaticNameParsing() ) { 1226 if ( mAConfig->automaticNameParsing() ) {
1229 addr.setNameFromString( mNameEdit->text() ); 1227 addr.setNameFromString( mNameEdit->text() );
1230 mNameLabel->hide(); 1228 mNameLabel->hide();
1231 mNameEdit->show(); 1229 mNameEdit->show();
1232 } else { 1230 } else {
1233 addr = mAddressee; 1231 addr = mAddressee;
1234 mNameEdit->hide(); 1232 mNameEdit->hide();
1235 mNameLabel->setText( mNameEdit->text() ); 1233 mNameLabel->setText( mNameEdit->text() );
1236 mNameLabel->show(); 1234 mNameLabel->show();
1237 } 1235 }
1238 1236
1239 if ( mFormattedNameType != NameEditDialog::CustomName ) { 1237 if ( mFormattedNameType != NameEditDialog::CustomName ) {
1240 mFormattedNameLabel->setText( NameEditDialog::formattedName( mAddressee, mFormattedNameType ) ); 1238 mFormattedNameLabel->setText( NameEditDialog::formattedName( mAddressee, mFormattedNameType ) );
1241 mAddressee.setFormattedName( NameEditDialog::formattedName( mAddressee, mFormattedNameType ) ); 1239 mAddressee.setFormattedName( NameEditDialog::formattedName( mAddressee, mFormattedNameType ) );
1242 } 1240 }
1243} 1241}
1244 1242
1245void AddresseeEditorWidget::nameButtonClicked() 1243void AddresseeEditorWidget::nameButtonClicked()
1246{ 1244{
1247 // show the name dialog. 1245 // show the name dialog.
1248 NameEditDialog dialog( mAddressee, mFormattedNameType, this ); 1246 NameEditDialog dialog( mAddressee, mFormattedNameType, this );
1249 1247
1250 if ( KApplication::execDialog( &dialog) ) { 1248 if ( KApplication::execDialog( &dialog) ) {
1251 if ( dialog.changed() ) { 1249 if ( dialog.changed() ) {
1252 mAddressee.setFamilyName( dialog.familyName() ); 1250 mAddressee.setFamilyName( dialog.familyName() );
1253 mAddressee.setGivenName( dialog.givenName() ); 1251 mAddressee.setGivenName( dialog.givenName() );
1254 mAddressee.setPrefix( dialog.prefix() ); 1252 mAddressee.setPrefix( dialog.prefix() );
1255 mAddressee.setSuffix( dialog.suffix() ); 1253 mAddressee.setSuffix( dialog.suffix() );
1256 mAddressee.setAdditionalName( dialog.additionalName() ); 1254 mAddressee.setAdditionalName( dialog.additionalName() );
1257 mFormattedNameType = dialog.formattedNameType(); 1255 mFormattedNameType = dialog.formattedNameType();
1258 if ( mFormattedNameType == NameEditDialog::CustomName ) { 1256 if ( mFormattedNameType == NameEditDialog::CustomName ) {
1259 mFormattedNameLabel->setText( dialog.customFormattedName() ); 1257 mFormattedNameLabel->setText( dialog.customFormattedName() );
1260 mAddressee.setFormattedName( dialog.customFormattedName() ); 1258 mAddressee.setFormattedName( dialog.customFormattedName() );
1261 } 1259 }
1262 // Update the name edit. 1260 // Update the name edit.
1263 bool block = mNameEdit->signalsBlocked(); 1261 bool block = mNameEdit->signalsBlocked();
1264 mNameEdit->blockSignals( true ); 1262 mNameEdit->blockSignals( true );
1265 mNameEdit->setText( mAddressee.assembledName() ); 1263 mNameEdit->setText( mAddressee.assembledName() );
1266 mNameEdit->blockSignals( block ); 1264 mNameEdit->blockSignals( block );
1267 1265
1268 // Update the combo box. 1266 // Update the combo box.
1269 nameBoxChanged(); 1267 nameBoxChanged();
1270 1268
1271 emitModified(); 1269 emitModified();
1272 } 1270 }
1273 } 1271 }
1274} 1272}
1275 1273
1276void AddresseeEditorWidget::categoryButtonClicked() 1274void AddresseeEditorWidget::categoryButtonClicked()
1277{ 1275{
1278 // Show the category dialog 1276 // Show the category dialog
1279 if ( mCategoryDialog == 0 ) { 1277 if ( mCategoryDialog == 0 ) {
1280 mCategoryDialog = new KPIM::CategorySelectDialog( KABPrefs::instance(), this ); 1278 mCategoryDialog = new KPIM::CategorySelectDialog( KABPrefs::instance(), this );
1281 connect( mCategoryDialog, SIGNAL( categoriesSelected( const QStringList& ) ), 1279 connect( mCategoryDialog, SIGNAL( categoriesSelected( const QStringList& ) ),
1282 SLOT(categoriesSelected( const QStringList& ) ) ); 1280 SLOT(categoriesSelected( const QStringList& ) ) );
1283 connect( mCategoryDialog, SIGNAL( editCategories() ), SLOT( editCategories() ) ); 1281 connect( mCategoryDialog, SIGNAL( editCategories() ), SLOT( editCategories() ) );
1284 } 1282 }
1285 1283
1286 mCategoryDialog->setCategories(); 1284 mCategoryDialog->setCategories();
1287 mCategoryDialog->setSelected( QStringList::split( ",", mCategoryEdit->text() ) ); 1285 mCategoryDialog->setSelected( QStringList::split( ",", mCategoryEdit->text() ) );
1288 mCategoryDialog->show(); 1286 mCategoryDialog->show();
1289 mCategoryDialog->raise(); 1287 mCategoryDialog->raise();
1290} 1288}
1291 1289
1292void AddresseeEditorWidget::categoriesSelected( const QStringList &list ) 1290void AddresseeEditorWidget::categoriesSelected( const QStringList &list )
1293{ 1291{
1294 mCategoryEdit->setText( list.join( "," ) ); 1292 mCategoryEdit->setText( list.join( "," ) );
1295} 1293}
1296 1294
1297void AddresseeEditorWidget::editCategories() 1295void AddresseeEditorWidget::editCategories()
1298{ 1296{
1299 if ( mCategoryEditDialog == 0 ) { 1297 if ( mCategoryEditDialog == 0 ) {
1300 mCategoryEditDialog = new KPIM::CategoryEditDialog( KABPrefs::instance(), this ); 1298 mCategoryEditDialog = new KPIM::CategoryEditDialog( KABPrefs::instance(), this );
1301 connect( mCategoryEditDialog, SIGNAL( categoryConfigChanged() ), 1299 connect( mCategoryEditDialog, SIGNAL( categoryConfigChanged() ),
1302 SLOT( categoryButtonClicked() ) ); 1300 SLOT( categoryButtonClicked() ) );
1303 } 1301 }
1304 1302
1305 mCategoryEditDialog->show(); 1303 mCategoryEditDialog->show();
1306 mCategoryEditDialog->raise(); 1304 mCategoryEditDialog->raise();
1307} 1305}
1308 1306
1309void AddresseeEditorWidget::emitModified() 1307void AddresseeEditorWidget::emitModified()
1310{ 1308{
1311 mDirty = true; 1309 mDirty = true;
1312 1310
1313 KABC::Addressee::List list; 1311 KABC::Addressee::List list;
1314 1312
1315 if ( mIsExtension && !mBlockSignals ) { 1313 if ( mIsExtension && !mBlockSignals ) {
1316 save(); 1314 save();
1317 list.append( mAddressee ); 1315 list.append( mAddressee );
1318 } 1316 }
1319 1317
1320 emit modified( list ); 1318 emit modified( list );
1321} 1319}
1322 1320
1323void AddresseeEditorWidget::dateChanged( QDate ) 1321void AddresseeEditorWidget::dateChanged( QDate )
1324{ 1322{
1325 emitModified(); 1323 emitModified();
1326} 1324}
1327 1325
1328//US invalid dates are handdled by the KDateEdit widget itself 1326//US invalid dates are handdled by the KDateEdit widget itself
1329void AddresseeEditorWidget::invalidDate() 1327void AddresseeEditorWidget::invalidDate()
1330{ 1328{
1331 KMessageBox::sorry( this, i18n( "You must specify a valid date" ) ); 1329 KMessageBox::sorry( this, i18n( "You must specify a valid date" ) );
1332} 1330}
1333 1331
1334 1332
1335void AddresseeEditorWidget::pageChanged( QWidget *wdg ) 1333void AddresseeEditorWidget::pageChanged( QWidget *wdg )
1336{ 1334{
1337#ifndef KAB_EMBEDDED 1335#ifndef KAB_EMBEDDED
1338 if ( wdg ) 1336 if ( wdg )
1339 KAcceleratorManager::manage( wdg ); 1337 KAcceleratorManager::manage( wdg );
1340#else //KAB_EMBEDDED 1338#else //KAB_EMBEDDED
1341//US 1339//US
1342#endif //KAB_EMBEDDED 1340#endif //KAB_EMBEDDED
1343 1341
1344} 1342}
1345 1343
1346QString AddresseeEditorWidget::title() const 1344QString AddresseeEditorWidget::title() const
1347{ 1345{
1348 return i18n( "Contact Editor" ); 1346 return i18n( "Contact Editor" );
1349} 1347}
1350 1348
1351QString AddresseeEditorWidget::identifier() const 1349QString AddresseeEditorWidget::identifier() const
1352{ 1350{
1353 return i18n( "contact_editor" ); 1351 return i18n( "contact_editor" );
1354} 1352}
1355 1353
1356#ifndef KAB_EMBEDDED 1354#ifndef KAB_EMBEDDED
1357#include "addresseeeditorwidget.moc" 1355#include "addresseeeditorwidget.moc"
1358#endif //KAB_EMBEDDED 1356#endif //KAB_EMBEDDED
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 3715786..046cb63 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1,3438 +1,3443 @@
1/* 1/*
2 This file is part of KAddressbook. 2 This file is part of KAddressbook.
3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 Async a special exception, permission is given to link this program 19 Async a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24/*s 24/*s
25Enhanced Version of the file for platform independent KDE tools. 25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk 26Copyright (c) 2004 Ulf Schenk
27 27
28$Id$ 28$Id$
29*/ 29*/
30 30
31#include "kabcore.h" 31#include "kabcore.h"
32 32
33#include <stdaddressbook.h> 33#include <stdaddressbook.h>
34#include <klocale.h> 34#include <klocale.h>
35#include <kfiledialog.h> 35#include <kfiledialog.h>
36#include <qtimer.h> 36#include <qtimer.h>
37#include <qlabel.h> 37#include <qlabel.h>
38#include <qregexp.h> 38#include <qregexp.h>
39#include <qlineedit.h> 39#include <qlineedit.h>
40#include <qcheckbox.h> 40#include <qcheckbox.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qprogressbar.h> 42#include <qprogressbar.h>
43#include <libkdepim/phoneaccess.h> 43#include <libkdepim/phoneaccess.h>
44 44
45#ifndef KAB_EMBEDDED 45#ifndef KAB_EMBEDDED
46#include <qclipboard.h> 46#include <qclipboard.h>
47#include <qdir.h> 47#include <qdir.h>
48#include <qfile.h> 48#include <qfile.h>
49#include <qapplicaton.h> 49#include <qapplicaton.h>
50#include <qprogressbar.h> 50#include <qprogressbar.h>
51#include <qlayout.h> 51#include <qlayout.h>
52#include <qregexp.h> 52#include <qregexp.h>
53#include <qvbox.h> 53#include <qvbox.h>
54#include <kabc/addresseelist.h> 54#include <kabc/addresseelist.h>
55#include <kabc/errorhandler.h> 55#include <kabc/errorhandler.h>
56#include <kabc/resource.h> 56#include <kabc/resource.h>
57#include <kabc/vcardconverter.h> 57#include <kabc/vcardconverter.h>
58#include <kapplication.h> 58#include <kapplication.h>
59#include <kactionclasses.h> 59#include <kactionclasses.h>
60#include <kcmultidialog.h> 60#include <kcmultidialog.h>
61#include <kdebug.h> 61#include <kdebug.h>
62#include <kdeversion.h> 62#include <kdeversion.h>
63#include <kkeydialog.h> 63#include <kkeydialog.h>
64#include <kmessagebox.h> 64#include <kmessagebox.h>
65#include <kprinter.h> 65#include <kprinter.h>
66#include <kprotocolinfo.h> 66#include <kprotocolinfo.h>
67#include <kresources/selectdialog.h> 67#include <kresources/selectdialog.h>
68#include <kstandarddirs.h> 68#include <kstandarddirs.h>
69#include <ktempfile.h> 69#include <ktempfile.h>
70#include <kxmlguiclient.h> 70#include <kxmlguiclient.h>
71#include <kaboutdata.h> 71#include <kaboutdata.h>
72#include <libkdepim/categoryselectdialog.h> 72#include <libkdepim/categoryselectdialog.h>
73 73
74#include "addresseeutil.h" 74#include "addresseeutil.h"
75#include "addresseeeditordialog.h" 75#include "addresseeeditordialog.h"
76#include "extensionmanager.h" 76#include "extensionmanager.h"
77#include "kstdaction.h" 77#include "kstdaction.h"
78#include "kaddressbookservice.h" 78#include "kaddressbookservice.h"
79#include "ldapsearchdialog.h" 79#include "ldapsearchdialog.h"
80#include "printing/printingwizard.h" 80#include "printing/printingwizard.h"
81#else // KAB_EMBEDDED 81#else // KAB_EMBEDDED
82 82
83#include <kapplication.h> 83#include <kapplication.h>
84#include "KDGanttMinimizeSplitter.h" 84#include "KDGanttMinimizeSplitter.h"
85#include "kaddressbookmain.h" 85#include "kaddressbookmain.h"
86#include "kactioncollection.h" 86#include "kactioncollection.h"
87#include "addresseedialog.h" 87#include "addresseedialog.h"
88//US 88//US
89#include <addresseeview.h> 89#include <addresseeview.h>
90 90
91#include <qapp.h> 91#include <qapp.h>
92#include <qmenubar.h> 92#include <qmenubar.h>
93//#include <qtoolbar.h> 93//#include <qtoolbar.h>
94#include <qmessagebox.h> 94#include <qmessagebox.h>
95#include <kdebug.h> 95#include <kdebug.h>
96#include <kiconloader.h> // needed for SmallIcon 96#include <kiconloader.h> // needed for SmallIcon
97#include <kresources/kcmkresources.h> 97#include <kresources/kcmkresources.h>
98#include <ktoolbar.h> 98#include <ktoolbar.h>
99#include <kprefsdialog.h> 99#include <kprefsdialog.h>
100 100
101 101
102//#include <qlabel.h> 102//#include <qlabel.h>
103 103
104 104
105#ifndef DESKTOP_VERSION 105#ifndef DESKTOP_VERSION
106#include <qpe/ir.h> 106#include <qpe/ir.h>
107#include <qpe/qpemenubar.h> 107#include <qpe/qpemenubar.h>
108#include <qtopia/qcopenvelope_qws.h> 108#include <qtopia/qcopenvelope_qws.h>
109#else 109#else
110 110
111#include <qmenubar.h> 111#include <qmenubar.h>
112#endif 112#endif
113 113
114#endif // KAB_EMBEDDED 114#endif // KAB_EMBEDDED
115#include "kcmconfigs/kcmkabconfig.h" 115#include "kcmconfigs/kcmkabconfig.h"
116#include "kcmconfigs/kcmkdepimconfig.h" 116#include "kcmconfigs/kcmkdepimconfig.h"
117#include "kpimglobalprefs.h" 117#include "kpimglobalprefs.h"
118#include "externalapphandler.h" 118#include "externalapphandler.h"
119#include "xxportselectdialog.h" 119#include "xxportselectdialog.h"
120 120
121 121
122#include <kresources/selectdialog.h> 122#include <kresources/selectdialog.h>
123#include <kmessagebox.h> 123#include <kmessagebox.h>
124 124
125#include <picture.h> 125#include <picture.h>
126#include <resource.h> 126#include <resource.h>
127 127
128//US#include <qsplitter.h> 128//US#include <qsplitter.h>
129#include <qmap.h> 129#include <qmap.h>
130#include <qdir.h> 130#include <qdir.h>
131#include <qfile.h> 131#include <qfile.h>
132#include <qvbox.h> 132#include <qvbox.h>
133#include <qlayout.h> 133#include <qlayout.h>
134#include <qclipboard.h> 134#include <qclipboard.h>
135#include <qtextstream.h> 135#include <qtextstream.h>
136#include <qradiobutton.h> 136#include <qradiobutton.h>
137#include <qbuttongroup.h> 137#include <qbuttongroup.h>
138 138
139#include <libkdepim/categoryselectdialog.h> 139#include <libkdepim/categoryselectdialog.h>
140#include <libkdepim/categoryeditdialog.h> 140#include <libkdepim/categoryeditdialog.h>
141#include <kabc/vcardconverter.h> 141#include <kabc/vcardconverter.h>
142 142
143 143
144#include "addresseeutil.h" 144#include "addresseeutil.h"
145#include "undocmds.h" 145#include "undocmds.h"
146#include "addresseeeditordialog.h" 146#include "addresseeeditordialog.h"
147#include "viewmanager.h" 147#include "viewmanager.h"
148#include "details/detailsviewcontainer.h" 148#include "details/detailsviewcontainer.h"
149#include "kabprefs.h" 149#include "kabprefs.h"
150#include "xxportmanager.h" 150#include "xxportmanager.h"
151#include "incsearchwidget.h" 151#include "incsearchwidget.h"
152#include "jumpbuttonbar.h" 152#include "jumpbuttonbar.h"
153#include "extensionmanager.h" 153#include "extensionmanager.h"
154#include "addresseeconfig.h" 154#include "addresseeconfig.h"
155#include "nameeditdialog.h" 155#include "nameeditdialog.h"
156#include <kcmultidialog.h> 156#include <kcmultidialog.h>
157 157
158#ifdef _WIN32_ 158#ifdef _WIN32_
159#ifdef _OL_IMPORT_ 159#ifdef _OL_IMPORT_
160#include "kaimportoldialog.h" 160#include "kaimportoldialog.h"
161#endif 161#endif
162#else 162#else
163#include <unistd.h> 163#include <unistd.h>
164#endif 164#endif
165// sync includes 165// sync includes
166#include <libkdepim/ksyncprofile.h> 166#include <libkdepim/ksyncprofile.h>
167#include <libkdepim/ksyncprefsdialog.h> 167#include <libkdepim/ksyncprefsdialog.h>
168 168
169 169
170class KABCatPrefs : public QDialog 170class KABCatPrefs : public QDialog
171{ 171{
172 public: 172 public:
173 KABCatPrefs( QWidget *parent=0, const char *name=0 ) : 173 KABCatPrefs( QWidget *parent=0, const char *name=0 ) :
174 QDialog( parent, name, true ) 174 QDialog( parent, name, true )
175 { 175 {
176 setCaption( i18n("Manage new Categories") ); 176 setCaption( i18n("Manage new Categories") );
177 QVBoxLayout* lay = new QVBoxLayout( this ); 177 QVBoxLayout* lay = new QVBoxLayout( this );
178 lay->setSpacing( 3 ); 178 lay->setSpacing( 3 );
179 lay->setMargin( 3 ); 179 lay->setMargin( 3 );
180 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); 180 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
181 lay->addWidget( lab ); 181 lay->addWidget( lab );
182 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 182 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
183 lay->addWidget( format ); 183 lay->addWidget( format );
184 format->setExclusive ( true ) ; 184 format->setExclusive ( true ) ;
185 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 185 addCatBut = new QRadioButton(i18n("Add to category list"), format );
186 new QRadioButton(i18n("Remove from addressees"), format ); 186 new QRadioButton(i18n("Remove from addressees"), format );
187 addCatBut->setChecked( true ); 187 addCatBut->setChecked( true );
188 QPushButton * ok = new QPushButton( i18n("OK"), this ); 188 QPushButton * ok = new QPushButton( i18n("OK"), this );
189 lay->addWidget( ok ); 189 lay->addWidget( ok );
190 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 190 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
191 lay->addWidget( cancel ); 191 lay->addWidget( cancel );
192 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 192 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
193 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 193 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
194 resize( 200, 200 ); 194 resize( 200, 200 );
195 } 195 }
196 196
197 bool addCat() { return addCatBut->isChecked(); } 197 bool addCat() { return addCatBut->isChecked(); }
198private: 198private:
199 QRadioButton* addCatBut; 199 QRadioButton* addCatBut;
200}; 200};
201 201
202class KABFormatPrefs : public QDialog 202class KABFormatPrefs : public QDialog
203{ 203{
204 public: 204 public:
205 KABFormatPrefs( QWidget *parent=0, const char *name=0 ) : 205 KABFormatPrefs( QWidget *parent=0, const char *name=0 ) :
206 QDialog( parent, name, true ) 206 QDialog( parent, name, true )
207 { 207 {
208 setCaption( i18n("Set formatted name") ); 208 setCaption( i18n("Set formatted name") );
209 QVBoxLayout* lay = new QVBoxLayout( this ); 209 QVBoxLayout* lay = new QVBoxLayout( this );
210 lay->setSpacing( 3 ); 210 lay->setSpacing( 3 );
211 lay->setMargin( 3 ); 211 lay->setMargin( 3 );
212 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this ); 212 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this );
213 lay->addWidget( lab ); 213 lay->addWidget( lab );
214 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this ); 214 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this );
215 lay->addWidget( format ); 215 lay->addWidget( format );
216 format->setExclusive ( true ) ; 216 format->setExclusive ( true ) ;
217 simple = new QRadioButton(i18n("Simple: James Bond"), format ); 217 simple = new QRadioButton(i18n("Simple: James Bond"), format );
218 full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format ); 218 full = new QRadioButton(i18n("Full: Mr. James 007 Bond I"), format );
219 reverse = new QRadioButton(i18n("Reverse: Bond, James"), format ); 219 reverse = new QRadioButton(i18n("Reverse: Bond, James"), format );
220 company = new QRadioButton(i18n("Organization: MI6"), format ); 220 company = new QRadioButton(i18n("Organization: MI6"), format );
221 simple->setChecked( true ); 221 simple->setChecked( true );
222 setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this); 222 setCompany = new QCheckBox(i18n("Set formatted name to\norganization, if name empty"), this);
223 lay->addWidget( setCompany ); 223 lay->addWidget( setCompany );
224 QPushButton * ok = new QPushButton( i18n("Select contact list"), this ); 224 QPushButton * ok = new QPushButton( i18n("Select contact list"), this );
225 lay->addWidget( ok ); 225 lay->addWidget( ok );
226 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 226 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
227 lay->addWidget( cancel ); 227 lay->addWidget( cancel );
228 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 228 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
229 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 229 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
230 //resize( 200, 200 ); 230 //resize( 200, 200 );
231 231
232 } 232 }
233public: 233public:
234 QRadioButton* simple, *full, *reverse, *company; 234 QRadioButton* simple, *full, *reverse, *company;
235 QCheckBox* setCompany; 235 QCheckBox* setCompany;
236}; 236};
237 237
238 238
239 239
240class KAex2phonePrefs : public QDialog 240class KAex2phonePrefs : public QDialog
241{ 241{
242 public: 242 public:
243 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) : 243 KAex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
244 QDialog( parent, name, true ) 244 QDialog( parent, name, true )
245 { 245 {
246 setCaption( i18n("Export to phone options") ); 246 setCaption( i18n("Export to phone options") );
247 QVBoxLayout* lay = new QVBoxLayout( this ); 247 QVBoxLayout* lay = new QVBoxLayout( this );
248 lay->setSpacing( 3 ); 248 lay->setSpacing( 3 );
249 lay->setMargin( 3 ); 249 lay->setMargin( 3 );
250 QLabel *lab; 250 QLabel *lab;
251 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 251 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
252 lab->setAlignment (AlignHCenter ); 252 lab->setAlignment (AlignHCenter );
253 QHBox* temphb; 253 QHBox* temphb;
254 temphb = new QHBox( this ); 254 temphb = new QHBox( this );
255 new QLabel( i18n("I/O device: "), temphb ); 255 new QLabel( i18n("I/O device: "), temphb );
256 mPhoneDevice = new QLineEdit( temphb); 256 mPhoneDevice = new QLineEdit( temphb);
257 lay->addWidget( temphb ); 257 lay->addWidget( temphb );
258 temphb = new QHBox( this ); 258 temphb = new QHBox( this );
259 new QLabel( i18n("Connection: "), temphb ); 259 new QLabel( i18n("Connection: "), temphb );
260 mPhoneConnection = new QLineEdit( temphb); 260 mPhoneConnection = new QLineEdit( temphb);
261 lay->addWidget( temphb ); 261 lay->addWidget( temphb );
262 temphb = new QHBox( this ); 262 temphb = new QHBox( this );
263 new QLabel( i18n("Model(opt.): "), temphb ); 263 new QLabel( i18n("Model(opt.): "), temphb );
264 mPhoneModel = new QLineEdit( temphb); 264 mPhoneModel = new QLineEdit( temphb);
265 lay->addWidget( temphb ); 265 lay->addWidget( temphb );
266 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); 266 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this );
267 // lay->addWidget( mWriteToSim ); 267 // lay->addWidget( mWriteToSim );
268 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); 268 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) );
269 lab->setAlignment (AlignHCenter); 269 lab->setAlignment (AlignHCenter);
270 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 270 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
271 lay->addWidget( ok ); 271 lay->addWidget( ok );
272 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 272 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
273 lay->addWidget( cancel ); 273 lay->addWidget( cancel );
274 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 274 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
275 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 275 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
276 resize( 220, 240 ); 276 resize( 220, 240 );
277 277
278 } 278 }
279 279
280public: 280public:
281 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 281 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
282 QCheckBox* mWriteToSim; 282 QCheckBox* mWriteToSim;
283}; 283};
284 284
285 285
286bool pasteWithNewUid = true; 286bool pasteWithNewUid = true;
287 287
288#ifdef KAB_EMBEDDED 288#ifdef KAB_EMBEDDED
289KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name ) 289KABCore::KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name )
290 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 290 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
291 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/ 291 mExtensionManager( 0 ),mConfigureDialog( 0 ),/*US mLdapSearchDialog( 0 ),*/
292 mReadWrite( readWrite ), mModified( false ), mMainWindow(client) 292 mReadWrite( readWrite ), mModified( false ), mMainWindow(client)
293#else //KAB_EMBEDDED 293#else //KAB_EMBEDDED
294KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name ) 294KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const char *name )
295 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ), 295 : QWidget( parent, name ), KSyncInterface(), mGUIClient( client ), mViewManager( 0 ),
296 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ), 296 mExtensionManager( 0 ), mConfigureDialog( 0 ), mLdapSearchDialog( 0 ),
297 mReadWrite( readWrite ), mModified( false ) 297 mReadWrite( readWrite ), mModified( false )
298#endif //KAB_EMBEDDED 298#endif //KAB_EMBEDDED
299{ 299{
300 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 300 // syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
301 // syncManager->setBlockSave(false); 301 // syncManager->setBlockSave(false);
302 mIncSearchWidget = 0; 302 mIncSearchWidget = 0;
303 mMiniSplitter = 0; 303 mMiniSplitter = 0;
304 mExtensionBarSplitter = 0; 304 mExtensionBarSplitter = 0;
305 mIsPart = !parent->inherits( "KAddressBookMain" ); 305 mIsPart = !parent->inherits( "KAddressBookMain" );
306 mAddressBook = KABC::StdAddressBook::self(); 306 mAddressBook = KABC::StdAddressBook::self();
307 KABC::StdAddressBook::setAutomaticSave( false ); 307 KABC::StdAddressBook::setAutomaticSave( false );
308 308
309#ifndef KAB_EMBEDDED 309#ifndef KAB_EMBEDDED
310 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler ); 310 mAddressBook->setErrorHandler( new KABC::GUIErrorHandler );
311#endif //KAB_EMBEDDED 311#endif //KAB_EMBEDDED
312 312
313 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ), 313 connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook * ) ),
314 SLOT( addressBookChanged() ) ); 314 SLOT( addressBookChanged() ) );
315 315
316#if 0 316#if 0
317 // LR moved to addressbook init method 317 // LR moved to addressbook init method
318 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization, 318 mAddressBook->addCustomField( i18n( "Department" ), KABC::Field::Organization,
319 "X-Department", "KADDRESSBOOK" ); 319 "X-Department", "KADDRESSBOOK" );
320 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization, 320 mAddressBook->addCustomField( i18n( "Profession" ), KABC::Field::Organization,
321 "X-Profession", "KADDRESSBOOK" ); 321 "X-Profession", "KADDRESSBOOK" );
322 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization, 322 mAddressBook->addCustomField( i18n( "Assistant's Name" ), KABC::Field::Organization,
323 "X-AssistantsName", "KADDRESSBOOK" ); 323 "X-AssistantsName", "KADDRESSBOOK" );
324 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization, 324 mAddressBook->addCustomField( i18n( "Manager's Name" ), KABC::Field::Organization,
325 "X-ManagersName", "KADDRESSBOOK" ); 325 "X-ManagersName", "KADDRESSBOOK" );
326 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal, 326 mAddressBook->addCustomField( i18n( "Spouse's Name" ), KABC::Field::Personal,
327 "X-SpousesName", "KADDRESSBOOK" ); 327 "X-SpousesName", "KADDRESSBOOK" );
328 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal, 328 mAddressBook->addCustomField( i18n( "Office" ), KABC::Field::Personal,
329 "X-Office", "KADDRESSBOOK" ); 329 "X-Office", "KADDRESSBOOK" );
330 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal, 330 mAddressBook->addCustomField( i18n( "IM Address" ), KABC::Field::Personal,
331 "X-IMAddress", "KADDRESSBOOK" ); 331 "X-IMAddress", "KADDRESSBOOK" );
332 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal, 332 mAddressBook->addCustomField( i18n( "Anniversary" ), KABC::Field::Personal,
333 "X-Anniversary", "KADDRESSBOOK" ); 333 "X-Anniversary", "KADDRESSBOOK" );
334 334
335 //US added this field to become compatible with Opie/qtopia addressbook 335 //US added this field to become compatible with Opie/qtopia addressbook
336 // values can be "female" or "male" or "". An empty field represents undefined. 336 // values can be "female" or "male" or "". An empty field represents undefined.
337 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal, 337 mAddressBook->addCustomField( i18n( "Gender" ), KABC::Field::Personal,
338 "X-Gender", "KADDRESSBOOK" ); 338 "X-Gender", "KADDRESSBOOK" );
339 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal, 339 mAddressBook->addCustomField( i18n( "Children" ), KABC::Field::Personal,
340 "X-Children", "KADDRESSBOOK" ); 340 "X-Children", "KADDRESSBOOK" );
341 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal, 341 mAddressBook->addCustomField( i18n( "FreeBusyUrl" ), KABC::Field::Personal,
342 "X-FreeBusyUrl", "KADDRESSBOOK" ); 342 "X-FreeBusyUrl", "KADDRESSBOOK" );
343#endif 343#endif
344 initGUI(); 344 initGUI();
345 345
346 mIncSearchWidget->setFocus(); 346 mIncSearchWidget->setFocus();
347 347
348 348
349 connect( mViewManager, SIGNAL( selected( const QString& ) ), 349 connect( mViewManager, SIGNAL( selected( const QString& ) ),
350 SLOT( setContactSelected( const QString& ) ) ); 350 SLOT( setContactSelected( const QString& ) ) );
351 connect( mViewManager, SIGNAL( executed( const QString& ) ), 351 connect( mViewManager, SIGNAL( executed( const QString& ) ),
352 SLOT( executeContact( const QString& ) ) ); 352 SLOT( executeContact( const QString& ) ) );
353 353
354 connect( mViewManager, SIGNAL( deleteRequest( ) ), 354 connect( mViewManager, SIGNAL( deleteRequest( ) ),
355 SLOT( deleteContacts( ) ) ); 355 SLOT( deleteContacts( ) ) );
356 connect( mViewManager, SIGNAL( modified() ), 356 connect( mViewManager, SIGNAL( modified() ),
357 SLOT( setModified() ) ); 357 SLOT( setModified() ) );
358 358
359 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); 359 connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), this, SLOT( extensionModified( const KABC::Addressee::List& ) ) );
360 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) ); 360 connect( mExtensionManager, SIGNAL( changedActiveExtension( int ) ), this, SLOT( extensionChanged( int ) ) );
361 361
362 connect( mXXPortManager, SIGNAL( modified() ), 362 connect( mXXPortManager, SIGNAL( modified() ),
363 SLOT( setModified() ) ); 363 SLOT( setModified() ) );
364 364
365 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), 365 connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ),
366 SLOT( incrementalSearchJump( const QString& ) ) ); 366 SLOT( incrementalSearchJump( const QString& ) ) );
367 connect( mIncSearchWidget, SIGNAL( fieldChanged() ), 367 connect( mIncSearchWidget, SIGNAL( fieldChanged() ),
368 mJumpButtonBar, SLOT( recreateButtons() ) ); 368 mJumpButtonBar, SLOT( recreateButtons() ) );
369 369
370 connect( mDetails, SIGNAL( sendEmail( const QString& ) ), 370 connect( mDetails, SIGNAL( sendEmail( const QString& ) ),
371 SLOT( sendMail( const QString& ) ) ); 371 SLOT( sendMail( const QString& ) ) );
372 372
373 373
374 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&))); 374 connect( ExternalAppHandler::instance(), SIGNAL (requestForNameEmailUidList(const QString&, const QString&)),this, SLOT(requestForNameEmailUidList(const QString&, const QString&)));
375 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); 375 connect( ExternalAppHandler::instance(), SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)),this, SLOT(requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)));
376 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&))); 376 connect( ExternalAppHandler::instance(), SIGNAL (requestForBirthdayList(const QString&, const QString&)),this, SLOT(requestForBirthdayList(const QString&, const QString&)));
377 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle())); 377 connect( ExternalAppHandler::instance(), SIGNAL (nextView()),this, SLOT(setDetailsToggle()));
378 connect( ExternalAppHandler::instance(), SIGNAL (doRingSync()),this, SLOT( doRingSync()));
378 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog())); 379 connect( ExternalAppHandler::instance(), SIGNAL (callContactdialog()),this, SLOT(callContactdialog()));
379 380
380 381
381#ifndef KAB_EMBEDDED 382#ifndef KAB_EMBEDDED
382 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), 383 connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ),
383 mXXPortManager, SLOT( importVCard( const KURL& ) ) ); 384 mXXPortManager, SLOT( importVCard( const KURL& ) ) );
384 385
385 connect( mDetails, SIGNAL( browse( const QString& ) ), 386 connect( mDetails, SIGNAL( browse( const QString& ) ),
386 SLOT( browse( const QString& ) ) ); 387 SLOT( browse( const QString& ) ) );
387 388
388 389
389 mAddressBookService = new KAddressBookService( this ); 390 mAddressBookService = new KAddressBookService( this );
390 391
391#endif //KAB_EMBEDDED 392#endif //KAB_EMBEDDED
392 393
393 mMessageTimer = new QTimer( this ); 394 mMessageTimer = new QTimer( this );
394 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); 395 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
395 mEditorDialog = 0; 396 mEditorDialog = 0;
396 createAddresseeEditorDialog( this ); 397 createAddresseeEditorDialog( this );
397 setModified( false ); 398 setModified( false );
398 mBRdisabled = false; 399 mBRdisabled = false;
399#ifndef DESKTOP_VERSION 400#ifndef DESKTOP_VERSION
400 infrared = 0; 401 infrared = 0;
401#endif 402#endif
402 //toggleBeamReceive( ); 403 //toggleBeamReceive( );
403 mMainWindow->toolBar()->show(); 404 mMainWindow->toolBar()->show();
404 // we have a toolbar repainting error on the Zaurus when starting KA/Pi 405 // we have a toolbar repainting error on the Zaurus when starting KA/Pi
405 QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 406 QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
406} 407}
407 408
408void KABCore::updateToolBar() 409void KABCore::updateToolBar()
409{ 410{
410 static int iii = 0; 411 static int iii = 0;
411 ++iii; 412 ++iii;
412 mMainWindow->toolBar()->repaintMe(); 413 mMainWindow->toolBar()->repaintMe();
413 if ( iii < 4 ) 414 if ( iii < 4 )
414 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); 415 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar()));
415} 416}
416KABCore::~KABCore() 417KABCore::~KABCore()
417{ 418{
418 // save(); 419 // save();
419 //saveSettings(); 420 //saveSettings();
420 //KABPrefs::instance()->writeConfig(); 421 //KABPrefs::instance()->writeConfig();
421 delete AddresseeConfig::instance(); 422 delete AddresseeConfig::instance();
422 mAddressBook = 0; 423 mAddressBook = 0;
423 KABC::StdAddressBook::close(); 424 KABC::StdAddressBook::close();
424 425
425 delete syncManager; 426 delete syncManager;
426#ifndef DESKTOP_VERSION 427#ifndef DESKTOP_VERSION
427 if ( infrared ) 428 if ( infrared )
428 delete infrared; 429 delete infrared;
429#endif 430#endif
430} 431}
431void KABCore::receive( const QCString& cmsg, const QByteArray& data ) 432void KABCore::receive( const QCString& cmsg, const QByteArray& data )
432{ 433{
433 //qDebug("KA: QCOP message received: %s ", cmsg.data() ); 434 //qDebug("KA: QCOP message received: %s ", cmsg.data() );
434 if ( cmsg == "setDocument(QString)" ) { 435 if ( cmsg == "setDocument(QString)" ) {
435 QDataStream stream( data, IO_ReadOnly ); 436 QDataStream stream( data, IO_ReadOnly );
436 QString fileName; 437 QString fileName;
437 stream >> fileName; 438 stream >> fileName;
438 recieve( fileName ); 439 recieve( fileName );
439 return; 440 return;
440 } 441 }
441} 442}
442void KABCore::toggleBeamReceive( ) 443void KABCore::toggleBeamReceive( )
443{ 444{
444 if ( mBRdisabled ) 445 if ( mBRdisabled )
445 return; 446 return;
446#ifndef DESKTOP_VERSION 447#ifndef DESKTOP_VERSION
447 if ( infrared ) { 448 if ( infrared ) {
448 qDebug("KA: AB disable BeamReceive "); 449 qDebug("KA: AB disable BeamReceive ");
449 delete infrared; 450 delete infrared;
450 infrared = 0; 451 infrared = 0;
451 mActionBR->setChecked(false); 452 mActionBR->setChecked(false);
452 return; 453 return;
453 } 454 }
454 qDebug("KA: AB enable BeamReceive "); 455 qDebug("KA: AB enable BeamReceive ");
455 mActionBR->setChecked(true); 456 mActionBR->setChecked(true);
456 457
457 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; 458 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& ))); 459 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& )));
459#endif 460#endif
460} 461}
461 462
462 463
463void KABCore::disableBR(bool b) 464void KABCore::disableBR(bool b)
464{ 465{
465#ifndef DESKTOP_VERSION 466#ifndef DESKTOP_VERSION
466 if ( b ) { 467 if ( b ) {
467 if ( infrared ) { 468 if ( infrared ) {
468 toggleBeamReceive( ); 469 toggleBeamReceive( );
469 } 470 }
470 mBRdisabled = true; 471 mBRdisabled = true;
471 } else { 472 } else {
472 if ( mBRdisabled ) { 473 if ( mBRdisabled ) {
473 mBRdisabled = false; 474 mBRdisabled = false;
474 //toggleBeamReceive( ); 475 //toggleBeamReceive( );
475 } 476 }
476 } 477 }
477#endif 478#endif
478 479
479} 480}
480void KABCore::recieve( QString fn ) 481void KABCore::recieve( QString fn )
481{ 482{
482 //qDebug("KABCore::recieve "); 483 //qDebug("KABCore::recieve ");
483 int count = mAddressBook->importFromFile( fn, true ); 484 int count = mAddressBook->importFromFile( fn, true );
484 if ( count ) 485 if ( count )
485 setModified( true ); 486 setModified( true );
486 mViewManager->refreshView(); 487 mViewManager->refreshView();
487 message(i18n("%1 contact(s) received!").arg( count )); 488 message(i18n("%1 contact(s) received!").arg( count ));
488 topLevelWidget()->showMaximized(); 489 topLevelWidget()->showMaximized();
489 topLevelWidget()->raise(); 490 topLevelWidget()->raise();
490} 491}
491void KABCore::restoreSettings() 492void KABCore::restoreSettings()
492{ 493{
493 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; 494 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce;
494 495
495 bool state; 496 bool state;
496 497
497 if (mMultipleViewsAtOnce) 498 if (mMultipleViewsAtOnce)
498 state = KABPrefs::instance()->mDetailsPageVisible; 499 state = KABPrefs::instance()->mDetailsPageVisible;
499 else 500 else
500 state = false; 501 state = false;
501 502
502 mActionDetails->setChecked( state ); 503 mActionDetails->setChecked( state );
503 setDetailsVisible( state ); 504 setDetailsVisible( state );
504 505
505 state = KABPrefs::instance()->mJumpButtonBarVisible; 506 state = KABPrefs::instance()->mJumpButtonBarVisible;
506 507
507 mActionJumpBar->setChecked( state ); 508 mActionJumpBar->setChecked( state );
508 setJumpButtonBarVisible( state ); 509 setJumpButtonBarVisible( state );
509/*US 510/*US
510 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter; 511 QValueList<int> splitterSize = KABPrefs::instance()->mDetailsSplitter;
511 if ( splitterSize.count() == 0 ) { 512 if ( splitterSize.count() == 0 ) {
512 splitterSize.append( width() / 2 ); 513 splitterSize.append( width() / 2 );
513 splitterSize.append( width() / 2 ); 514 splitterSize.append( width() / 2 );
514 } 515 }
515 mMiniSplitter->setSizes( splitterSize ); 516 mMiniSplitter->setSizes( splitterSize );
516 if ( mExtensionBarSplitter ) { 517 if ( mExtensionBarSplitter ) {
517 splitterSize = KABPrefs::instance()->mExtensionsSplitter; 518 splitterSize = KABPrefs::instance()->mExtensionsSplitter;
518 if ( splitterSize.count() == 0 ) { 519 if ( splitterSize.count() == 0 ) {
519 splitterSize.append( width() / 2 ); 520 splitterSize.append( width() / 2 );
520 splitterSize.append( width() / 2 ); 521 splitterSize.append( width() / 2 );
521 } 522 }
522 mExtensionBarSplitter->setSizes( splitterSize ); 523 mExtensionBarSplitter->setSizes( splitterSize );
523 524
524 } 525 }
525*/ 526*/
526 mViewManager->restoreSettings(); 527 mViewManager->restoreSettings();
527 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField ); 528 mIncSearchWidget->setCurrentItem( KABPrefs::instance()->mCurrentIncSearchField );
528 mExtensionManager->restoreSettings(); 529 mExtensionManager->restoreSettings();
529#ifdef DESKTOP_VERSION 530#ifdef DESKTOP_VERSION
530 int wid = width(); 531 int wid = width();
531 if ( wid < 10 ) 532 if ( wid < 10 )
532 wid = 400; 533 wid = 400;
533#else 534#else
534 int wid = QApplication::desktop()->width(); 535 int wid = QApplication::desktop()->width();
535 if ( wid < 640 ) 536 if ( wid < 640 )
536 wid = QApplication::desktop()->height(); 537 wid = QApplication::desktop()->height();
537#endif 538#endif
538 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; 539 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
539 if ( true /*splitterSize.count() == 0*/ ) { 540 if ( true /*splitterSize.count() == 0*/ ) {
540 splitterSize.append( wid / 2 ); 541 splitterSize.append( wid / 2 );
541 splitterSize.append( wid / 2 ); 542 splitterSize.append( wid / 2 );
542 } 543 }
543 mMiniSplitter->setSizes( splitterSize ); 544 mMiniSplitter->setSizes( splitterSize );
544 if ( mExtensionBarSplitter ) { 545 if ( mExtensionBarSplitter ) {
545 //splitterSize = KABPrefs::instance()->mExtensionsSplitter; 546 //splitterSize = KABPrefs::instance()->mExtensionsSplitter;
546 if ( true /*splitterSize.count() == 0*/ ) { 547 if ( true /*splitterSize.count() == 0*/ ) {
547 splitterSize.append( wid / 2 ); 548 splitterSize.append( wid / 2 );
548 splitterSize.append( wid / 2 ); 549 splitterSize.append( wid / 2 );
549 } 550 }
550 mExtensionBarSplitter->setSizes( splitterSize ); 551 mExtensionBarSplitter->setSizes( splitterSize );
551 552
552 } 553 }
553#ifdef DESKTOP_VERSION 554#ifdef DESKTOP_VERSION
554 KConfig *config = KABPrefs::instance()->getConfig(); 555 KConfig *config = KABPrefs::instance()->getConfig();
555 config->setGroup("WidgetLayout"); 556 config->setGroup("WidgetLayout");
556 QStringList list; 557 QStringList list;
557 list = config->readListEntry("MainLayout"); 558 list = config->readListEntry("MainLayout");
558 int x,y,w,h; 559 int x,y,w,h;
559 if ( ! list.isEmpty() ) { 560 if ( ! list.isEmpty() ) {
560 x = list[0].toInt(); 561 x = list[0].toInt();
561 y = list[1].toInt(); 562 y = list[1].toInt();
562 w = list[2].toInt(); 563 w = list[2].toInt();
563 h = list[3].toInt(); 564 h = list[3].toInt();
564 KApplication::testCoords( &x,&y,&w,&h ); 565 KApplication::testCoords( &x,&y,&w,&h );
565 topLevelWidget()->setGeometry(x,y,w,h); 566 topLevelWidget()->setGeometry(x,y,w,h);
566 567
567 } else { 568 } else {
568 topLevelWidget()->setGeometry( 40 ,40 , 640, 440); 569 topLevelWidget()->setGeometry( 40 ,40 , 640, 440);
569 } 570 }
570#endif 571#endif
571} 572}
572 573
573void KABCore::saveSettings() 574void KABCore::saveSettings()
574{ 575{
575 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked(); 576 KABPrefs::instance()->mJumpButtonBarVisible = mActionJumpBar->isChecked();
576 if ( mExtensionBarSplitter ) 577 if ( mExtensionBarSplitter )
577 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 578 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
578 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked(); 579 KABPrefs::instance()->mDetailsPageVisible = mActionDetails->isChecked();
579 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes(); 580 KABPrefs::instance()->mDetailsSplitter = mMiniSplitter->sizes();
580#ifndef KAB_EMBEDDED 581#ifndef KAB_EMBEDDED
581 582
582 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes(); 583 KABPrefs::instance()->mExtensionsSplitter = mExtensionBarSplitter->sizes();
583 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes(); 584 KABPrefs::instance()->mDetailsSplitter = mDetailsSplitter->sizes();
584#endif //KAB_EMBEDDED 585#endif //KAB_EMBEDDED
585 mExtensionManager->saveSettings(); 586 mExtensionManager->saveSettings();
586 mViewManager->saveSettings(); 587 mViewManager->saveSettings();
587 588
588 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); 589 KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem();
589 590
590 KABPrefs::instance()->writeConfig(); 591 KABPrefs::instance()->writeConfig();
591 qDebug("KA: KABCore::saveSettings() "); 592 qDebug("KA: KABCore::saveSettings() ");
592} 593}
593 594
594KABC::AddressBook *KABCore::addressBook() const 595KABC::AddressBook *KABCore::addressBook() const
595{ 596{
596 return mAddressBook; 597 return mAddressBook;
597} 598}
598 599
599KConfig *KABCore::config() 600KConfig *KABCore::config()
600{ 601{
601#ifndef KAB_EMBEDDED 602#ifndef KAB_EMBEDDED
602 return KABPrefs::instance()->config(); 603 return KABPrefs::instance()->config();
603#else //KAB_EMBEDDED 604#else //KAB_EMBEDDED
604 return KABPrefs::instance()->getConfig(); 605 return KABPrefs::instance()->getConfig();
605#endif //KAB_EMBEDDED 606#endif //KAB_EMBEDDED
606} 607}
607 608
608KActionCollection *KABCore::actionCollection() const 609KActionCollection *KABCore::actionCollection() const
609{ 610{
610 return mGUIClient->actionCollection(); 611 return mGUIClient->actionCollection();
611} 612}
612 613
613KABC::Field *KABCore::currentSearchField() const 614KABC::Field *KABCore::currentSearchField() const
614{ 615{
615 if (mIncSearchWidget) 616 if (mIncSearchWidget)
616 return mIncSearchWidget->currentField(); 617 return mIncSearchWidget->currentField();
617 else 618 else
618 return 0; 619 return 0;
619} 620}
620 621
621QStringList KABCore::selectedUIDs() const 622QStringList KABCore::selectedUIDs() const
622{ 623{
623 return mViewManager->selectedUids(); 624 return mViewManager->selectedUids();
624} 625}
625 626
626KABC::Resource *KABCore::requestResource( QWidget *parent ) 627KABC::Resource *KABCore::requestResource( QWidget *parent )
627{ 628{
628 QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); 629 QPtrList<KABC::Resource> kabcResources = addressBook()->resources();
629 630
630 QPtrList<KRES::Resource> kresResources; 631 QPtrList<KRES::Resource> kresResources;
631 QPtrListIterator<KABC::Resource> resIt( kabcResources ); 632 QPtrListIterator<KABC::Resource> resIt( kabcResources );
632 KABC::Resource *resource; 633 KABC::Resource *resource;
633 while ( ( resource = resIt.current() ) != 0 ) { 634 while ( ( resource = resIt.current() ) != 0 ) {
634 ++resIt; 635 ++resIt;
635 if ( !resource->readOnly() ) { 636 if ( !resource->readOnly() ) {
636 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 637 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
637 if ( res ) 638 if ( res )
638 kresResources.append( res ); 639 kresResources.append( res );
639 } 640 }
640 } 641 }
641 642
642 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent ); 643 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, parent );
643 return static_cast<KABC::Resource*>( res ); 644 return static_cast<KABC::Resource*>( res );
644} 645}
645 646
646#ifndef KAB_EMBEDDED 647#ifndef KAB_EMBEDDED
647KAboutData *KABCore::createAboutData() 648KAboutData *KABCore::createAboutData()
648#else //KAB_EMBEDDED 649#else //KAB_EMBEDDED
649void KABCore::createAboutData() 650void KABCore::createAboutData()
650#endif //KAB_EMBEDDED 651#endif //KAB_EMBEDDED
651{ 652{
652 653
653 654
654 QString version; 655 QString version;
655#include <../version> 656#include <../version>
656 QMessageBox::about( this, "About KAddressbook/Pi", 657 QMessageBox::about( this, "About KAddressbook/Pi",
657 "KAddressbook/Platform-independent\n" 658 "KAddressbook/Platform-independent\n"
658 "(KA/Pi) " +version + " - " + 659 "(KA/Pi) " +version + " - " +
659#ifdef DESKTOP_VERSION 660#ifdef DESKTOP_VERSION
660 "Desktop Edition\n" 661 "Desktop Edition\n"
661#else 662#else
662 "PDA-Edition\n" 663 "PDA-Edition\n"
663 "for: Zaurus 5500 / 7x0 / 8x0\n" 664 "for: Zaurus 5500 / 7x0 / 8x0\n"
664#endif 665#endif
665 666
666 "(c) 2004 Ulf Schenk\n" 667 "(c) 2004 Ulf Schenk\n"
667 "(c) 2004-2005 Lutz Rogowski\nrogowski@kde.org\n" 668 "(c) 2004-2005 Lutz Rogowski\nrogowski@kde.org\n"
668 "(c) 1997-2003, The KDE PIM Team\n" 669 "(c) 1997-2003, The KDE PIM Team\n"
669 "Tobias Koenig Maintainer\n" 670 "Tobias Koenig Maintainer\n"
670 "Don Sanders Original author\n" 671 "Don Sanders Original author\n"
671 "Cornelius Schumacher Co-maintainer\n" 672 "Cornelius Schumacher Co-maintainer\n"
672 "Mike Pilone GUI and framework redesign\n" 673 "Mike Pilone GUI and framework redesign\n"
673 "Greg Stern DCOP interface\n" 674 "Greg Stern DCOP interface\n"
674 "Mark Westcot Contact pinning\n" 675 "Mark Westcot Contact pinning\n"
675 "Michel Boyer de la Giroday LDAP Lookup\n" 676 "Michel Boyer de la Giroday LDAP Lookup\n"
676 "Steffen Hansen LDAP Lookup" 677 "Steffen Hansen LDAP Lookup"
677#ifdef _WIN32_ 678#ifdef _WIN32_
678 "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n" 679 "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n"
679#endif 680#endif
680 ); 681 );
681} 682}
682 683
683void KABCore::setContactSelected( const QString &uid ) 684void KABCore::setContactSelected( const QString &uid )
684{ 685{
685 KABC::Addressee addr = mAddressBook->findByUid( uid ); 686 KABC::Addressee addr = mAddressBook->findByUid( uid );
686 if ( !mDetails->isHidden() ) 687 if ( !mDetails->isHidden() )
687 mDetails->setAddressee( addr ); 688 mDetails->setAddressee( addr );
688 689
689 if ( !addr.isEmpty() ) { 690 if ( !addr.isEmpty() ) {
690 emit contactSelected( addr.formattedName() ); 691 emit contactSelected( addr.formattedName() );
691 KABC::Picture pic = addr.photo(); 692 KABC::Picture pic = addr.photo();
692 if ( pic.isIntern() ) { 693 if ( pic.isIntern() ) {
693//US emit contactSelected( pic.data() ); 694//US emit contactSelected( pic.data() );
694//US instead use: 695//US instead use:
695 QPixmap px; 696 QPixmap px;
696 if (pic.data().isNull() != true) 697 if (pic.data().isNull() != true)
697 { 698 {
698 px.convertFromImage(pic.data()); 699 px.convertFromImage(pic.data());
699 } 700 }
700 701
701 emit contactSelected( px ); 702 emit contactSelected( px );
702 } 703 }
703 } 704 }
704 705
705 706
706 mExtensionManager->setSelectionChanged(); 707 mExtensionManager->setSelectionChanged();
707 708
708 // update the actions 709 // update the actions
709 bool selected = !uid.isEmpty(); 710 bool selected = !uid.isEmpty();
710 711
711 if ( mReadWrite ) { 712 if ( mReadWrite ) {
712 mActionCut->setEnabled( selected ); 713 mActionCut->setEnabled( selected );
713 mActionPaste->setEnabled( selected ); 714 mActionPaste->setEnabled( selected );
714 } 715 }
715 716
716 mActionCopy->setEnabled( selected ); 717 mActionCopy->setEnabled( selected );
717 mActionDelete->setEnabled( selected ); 718 mActionDelete->setEnabled( selected );
718 mActionEditAddressee->setEnabled( selected ); 719 mActionEditAddressee->setEnabled( selected );
719 mActionMail->setEnabled( selected ); 720 mActionMail->setEnabled( selected );
720 mActionMailVCard->setEnabled( selected ); 721 mActionMailVCard->setEnabled( selected );
721 //if (mActionBeam) 722 //if (mActionBeam)
722 //mActionBeam->setEnabled( selected ); 723 //mActionBeam->setEnabled( selected );
723 mActionWhoAmI->setEnabled( selected ); 724 mActionWhoAmI->setEnabled( selected );
724} 725}
725 726
726void KABCore::sendMail() 727void KABCore::sendMail()
727{ 728{
728 sendMail( mViewManager->selectedEmails().join( ", " ) ); 729 sendMail( mViewManager->selectedEmails().join( ", " ) );
729} 730}
730 731
731void KABCore::sendMail( const QString& emaillist ) 732void KABCore::sendMail( const QString& emaillist )
732{ 733{
733 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... " 734 // the parameter has the form "name1 <abc@aol.com>,name2 <abc@aol.com>;... "
734 if (emaillist.contains(",") > 0) 735 if (emaillist.contains(",") > 0)
735 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null ); 736 ExternalAppHandler::instance()->mailToMultipleContacts( emaillist, QString::null );
736 else 737 else
737 ExternalAppHandler::instance()->mailToOneContact( emaillist ); 738 ExternalAppHandler::instance()->mailToOneContact( emaillist );
738} 739}
739 740
740 741
741 742
742void KABCore::mailVCard() 743void KABCore::mailVCard()
743{ 744{
744 QStringList uids = mViewManager->selectedUids(); 745 QStringList uids = mViewManager->selectedUids();
745 if ( !uids.isEmpty() ) 746 if ( !uids.isEmpty() )
746 mailVCard( uids ); 747 mailVCard( uids );
747} 748}
748 749
749void KABCore::mailVCard( const QStringList& uids ) 750void KABCore::mailVCard( const QStringList& uids )
750{ 751{
751 QStringList urls; 752 QStringList urls;
752 753
753// QString tmpdir = locateLocal("tmp", KGlobal::getAppName()); 754// QString tmpdir = locateLocal("tmp", KGlobal::getAppName());
754 755
755 QString dirName = "/tmp/" + KApplication::randomString( 8 ); 756 QString dirName = "/tmp/" + KApplication::randomString( 8 );
756 757
757 758
758 759
759 QDir().mkdir( dirName, true ); 760 QDir().mkdir( dirName, true );
760 761
761 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 762 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
762 KABC::Addressee a = mAddressBook->findByUid( *it ); 763 KABC::Addressee a = mAddressBook->findByUid( *it );
763 764
764 if ( a.isEmpty() ) 765 if ( a.isEmpty() )
765 continue; 766 continue;
766 767
767 QString name = a.givenName() + "_" + a.familyName() + ".vcf"; 768 QString name = a.givenName() + "_" + a.familyName() + ".vcf";
768 769
769 QString fileName = dirName + "/" + name; 770 QString fileName = dirName + "/" + name;
770 771
771 QFile outFile(fileName); 772 QFile outFile(fileName);
772 773
773 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully 774 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully
774 KABC::VCardConverter converter; 775 KABC::VCardConverter converter;
775 QString vcard; 776 QString vcard;
776 777
777 converter.addresseeToVCard( a, vcard ); 778 converter.addresseeToVCard( a, vcard );
778 779
779 QTextStream t( &outFile ); // use a text stream 780 QTextStream t( &outFile ); // use a text stream
780 t.setEncoding( QTextStream::UnicodeUTF8 ); 781 t.setEncoding( QTextStream::UnicodeUTF8 );
781 t << vcard; 782 t << vcard;
782 783
783 outFile.close(); 784 outFile.close();
784 785
785 urls.append( fileName ); 786 urls.append( fileName );
786 } 787 }
787 } 788 }
788 789
789 bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") ); 790 bool result = ExternalAppHandler::instance()->mailToMultipleContacts( QString::null, urls.join(", ") );
790 791
791 792
792/*US 793/*US
793 kapp->invokeMailer( QString::null, QString::null, QString::null, 794 kapp->invokeMailer( QString::null, QString::null, QString::null,
794 QString::null, // subject 795 QString::null, // subject
795 QString::null, // body 796 QString::null, // body
796 QString::null, 797 QString::null,
797 urls ); // attachments 798 urls ); // attachments
798*/ 799*/
799 800
800} 801}
801 802
802/** 803/**
803 Beams the "WhoAmI contact. 804 Beams the "WhoAmI contact.
804*/ 805*/
805void KABCore::beamMySelf() 806void KABCore::beamMySelf()
806{ 807{
807 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); 808 KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI();
808 if (!a.isEmpty()) 809 if (!a.isEmpty())
809 { 810 {
810 QStringList uids; 811 QStringList uids;
811 uids << a.uid(); 812 uids << a.uid();
812 813
813 beamVCard(uids); 814 beamVCard(uids);
814 } else { 815 } 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" ) ); 816 KMessageBox::information( this, i18n( "Your personal contact is\nnot set! Please select it\nand set it with menu:\nSettings - Set Who Am I\n" ) );
816 817
817 818
818 } 819 }
819} 820}
820void KABCore::updateMainWindow() 821void KABCore::updateMainWindow()
821{ 822{
822 mMainWindow->showMaximized(); 823 mMainWindow->showMaximized();
823 mMainWindow->update(); 824 mMainWindow->update();
824} 825}
825void KABCore::resizeEvent(QResizeEvent* e ) 826void KABCore::resizeEvent(QResizeEvent* e )
826{ 827{
827 if ( !mMiniSplitter ) 828 if ( !mMiniSplitter )
828 return; 829 return;
829 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) "); 830 //qDebug("KABCore::resizeEvent(QResizeEvent* e ) ");
830 if ( QApplication::desktop()->width() >= 480 ) { 831 if ( QApplication::desktop()->width() >= 480 ) {
831 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480 832 if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480
832 if ( mMiniSplitter->orientation() == Qt::Vertical ) { 833 if ( mMiniSplitter->orientation() == Qt::Vertical ) {
833 mMiniSplitter->setOrientation( Qt::Horizontal); 834 mMiniSplitter->setOrientation( Qt::Horizontal);
834 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 835 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
835 } 836 }
836 if ( QApplication::desktop()->width() <= 640 ) { 837 if ( QApplication::desktop()->width() <= 640 ) {
837 mMainWindow->showMinimized(); 838 mMainWindow->showMinimized();
838 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 839 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
839 mViewManager->getFilterAction()->setComboWidth( 150 ); 840 mViewManager->getFilterAction()->setComboWidth( 150 );
840 if ( mIncSearchWidget ) 841 if ( mIncSearchWidget )
841 mIncSearchWidget->setSize(); 842 mIncSearchWidget->setSize();
842 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 843 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
843 } 844 }
844 845
845 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640 846 } else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640
846 if ( mMiniSplitter->orientation() == Qt::Horizontal ) { 847 if ( mMiniSplitter->orientation() == Qt::Horizontal ) {
847 mMiniSplitter->setOrientation( Qt::Vertical ); 848 mMiniSplitter->setOrientation( Qt::Vertical );
848 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 849 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
849 } 850 }
850 if ( QApplication::desktop()->width() <= 640 ) { 851 if ( QApplication::desktop()->width() <= 640 ) {
851 //mMainWindow->setMaximumSize( QApplication::desktop()->size() ); 852 //mMainWindow->setMaximumSize( QApplication::desktop()->size() );
852 mMainWindow->showMinimized(); 853 mMainWindow->showMinimized();
853 if ( KABPrefs::instance()->mHideSearchOnSwitch ) { 854 if ( KABPrefs::instance()->mHideSearchOnSwitch ) {
854 if ( mIncSearchWidget ) { 855 if ( mIncSearchWidget ) {
855 mIncSearchWidget->setSize(); 856 mIncSearchWidget->setSize();
856 } 857 }
857 } else { 858 } else {
858 mViewManager->getFilterAction()->setComboWidth( 0 ); 859 mViewManager->getFilterAction()->setComboWidth( 0 );
859 } 860 }
860 QTimer::singleShot( 1, this , SLOT ( updateMainWindow())); 861 QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
861 } 862 }
862 } 863 }
863 } 864 }
864 QWidget::resizeEvent( e ); 865 QWidget::resizeEvent( e );
865 866
866} 867}
867void KABCore::export2phone() 868void KABCore::export2phone()
868{ 869{
869 870
870 QStringList uids; 871 QStringList uids;
871 XXPortSelectDialog dlg( this, false, this ); 872 XXPortSelectDialog dlg( this, false, this );
872 if ( dlg.exec() ) 873 if ( dlg.exec() )
873 uids = dlg.uids(); 874 uids = dlg.uids();
874 else 875 else
875 return; 876 return;
876 if ( uids.isEmpty() ) 877 if ( uids.isEmpty() )
877 return; 878 return;
878 // qDebug("count %d ", uids.count()); 879 // qDebug("count %d ", uids.count());
879 880
880 KAex2phonePrefs ex2phone; 881 KAex2phonePrefs ex2phone;
881 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 882 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
882 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 883 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
883 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 884 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
884 885
885 if ( !ex2phone.exec() ) { 886 if ( !ex2phone.exec() ) {
886 return; 887 return;
887 } 888 }
888 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 889 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
889 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 890 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
890 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 891 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
891 892
892 893
893 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 894 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
894 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 895 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
895 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 896 KPimGlobalPrefs::instance()->mEx2PhoneModel );
896 897
897 QString fileName = getPhoneFile(); 898 QString fileName = getPhoneFile();
898 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) ) 899 if ( ! mAddressBook->export2PhoneFormat( uids ,fileName ) )
899 return; 900 return;
900 901
901 message(i18n("Exporting to phone...")); 902 message(i18n("Exporting to phone..."));
902 QTimer::singleShot( 1, this , SLOT ( writeToPhone())); 903 QTimer::singleShot( 1, this , SLOT ( writeToPhone()));
903 904
904} 905}
905QString KABCore::getPhoneFile() 906QString KABCore::getPhoneFile()
906{ 907{
907#ifdef DESKTOP_VERSION 908#ifdef DESKTOP_VERSION
908 return locateLocal("tmp", "phonefile.vcf"); 909 return locateLocal("tmp", "phonefile.vcf");
909#else 910#else
910 return "/tmp/phonefile.vcf"; 911 return "/tmp/phonefile.vcf";
911#endif 912#endif
912 913
913} 914}
914void KABCore::writeToPhone( ) 915void KABCore::writeToPhone( )
915{ 916{
916 if ( PhoneAccess::writeToPhone( getPhoneFile() ) ) 917 if ( PhoneAccess::writeToPhone( getPhoneFile() ) )
917 message(i18n("Export to phone finished!")); 918 message(i18n("Export to phone finished!"));
918 else 919 else
919 qDebug(i18n("KA: Error exporting to phone")); 920 qDebug(i18n("KA: Error exporting to phone"));
920} 921}
921void KABCore::beamVCard() 922void KABCore::beamVCard()
922{ 923{
923 QStringList uids; 924 QStringList uids;
924 XXPortSelectDialog dlg( this, false, this ); 925 XXPortSelectDialog dlg( this, false, this );
925 if ( dlg.exec() ) 926 if ( dlg.exec() )
926 uids = dlg.uids(); 927 uids = dlg.uids();
927 else 928 else
928 return; 929 return;
929 if ( uids.isEmpty() ) 930 if ( uids.isEmpty() )
930 return; 931 return;
931 beamVCard( uids ); 932 beamVCard( uids );
932} 933}
933 934
934 935
935void KABCore::beamVCard(const QStringList& uids) 936void KABCore::beamVCard(const QStringList& uids)
936{ 937{
937 938
938 // LR: we should use the /tmp dir on the Zaurus, 939 // LR: we should use the /tmp dir on the Zaurus,
939 // because: /tmp = RAM, (HOME)/kdepim = flash memory 940 // because: /tmp = RAM, (HOME)/kdepim = flash memory
940 941
941#ifdef DESKTOP_VERSION 942#ifdef DESKTOP_VERSION
942 QString fileName = locateLocal("tmp", "kapibeamfile.vcf"); 943 QString fileName = locateLocal("tmp", "kapibeamfile.vcf");
943#else 944#else
944 QString fileName = "/tmp/kapibeamfile.vcf"; 945 QString fileName = "/tmp/kapibeamfile.vcf";
945#endif 946#endif
946 947
947 KABC::VCardConverter converter; 948 KABC::VCardConverter converter;
948 QString description; 949 QString description;
949 QString datastream; 950 QString datastream;
950 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { 951 for( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) {
951 KABC::Addressee a = mAddressBook->findByUid( *it ); 952 KABC::Addressee a = mAddressBook->findByUid( *it );
952 953
953 if ( a.isEmpty() ) 954 if ( a.isEmpty() )
954 continue; 955 continue;
955 956
956 if (description.isEmpty()) 957 if (description.isEmpty())
957 description = a.formattedName(); 958 description = a.formattedName();
958 959
959 QString vcard; 960 QString vcard;
960 converter.addresseeToVCard( a, vcard ); 961 converter.addresseeToVCard( a, vcard );
961 int start = 0; 962 int start = 0;
962 int next; 963 int next;
963 while ( (next = vcard.find("TYPE=", start) )>= 0 ) { 964 while ( (next = vcard.find("TYPE=", start) )>= 0 ) {
964 int semi = vcard.find(";", next); 965 int semi = vcard.find(";", next);
965 int dopp = vcard.find(":", next); 966 int dopp = vcard.find(":", next);
966 int sep; 967 int sep;
967 if ( semi < dopp && semi >= 0 ) 968 if ( semi < dopp && semi >= 0 )
968 sep = semi ; 969 sep = semi ;
969 else 970 else
970 sep = dopp; 971 sep = dopp;
971 datastream +=vcard.mid( start, next - start); 972 datastream +=vcard.mid( start, next - start);
972 datastream +=vcard.mid( next+5,sep -next -5 ).upper(); 973 datastream +=vcard.mid( next+5,sep -next -5 ).upper();
973 start = sep; 974 start = sep;
974 } 975 }
975 datastream += vcard.mid( start,vcard.length() ); 976 datastream += vcard.mid( start,vcard.length() );
976 } 977 }
977#ifndef DESKTOP_VERSION 978#ifndef DESKTOP_VERSION
978 QFile outFile(fileName); 979 QFile outFile(fileName);
979 if ( outFile.open(IO_WriteOnly) ) { 980 if ( outFile.open(IO_WriteOnly) ) {
980 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 981 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
981 QTextStream t( &outFile ); // use a text stream 982 QTextStream t( &outFile ); // use a text stream
982 //t.setEncoding( QTextStream::UnicodeUTF8 ); 983 //t.setEncoding( QTextStream::UnicodeUTF8 );
983 t.setEncoding( QTextStream::Latin1 ); 984 t.setEncoding( QTextStream::Latin1 );
984 t <<datastream.latin1(); 985 t <<datastream.latin1();
985 outFile.close(); 986 outFile.close();
986 Ir *ir = new Ir( this ); 987 Ir *ir = new Ir( this );
987 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); 988 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
988 ir->send( fileName, description, "text/x-vCard" ); 989 ir->send( fileName, description, "text/x-vCard" );
989 } else { 990 } else {
990 qDebug("KA: Error open temp beam file "); 991 qDebug("KA: Error open temp beam file ");
991 return; 992 return;
992 } 993 }
993#endif 994#endif
994 995
995} 996}
996 997
997void KABCore::beamDone( Ir *ir ) 998void KABCore::beamDone( Ir *ir )
998{ 999{
999#ifndef DESKTOP_VERSION 1000#ifndef DESKTOP_VERSION
1000 delete ir; 1001 delete ir;
1001#endif 1002#endif
1002 topLevelWidget()->raise(); 1003 topLevelWidget()->raise();
1003 message( i18n("Beaming finished!") ); 1004 message( i18n("Beaming finished!") );
1004} 1005}
1005 1006
1006 1007
1007void KABCore::browse( const QString& url ) 1008void KABCore::browse( const QString& url )
1008{ 1009{
1009#ifndef KAB_EMBEDDED 1010#ifndef KAB_EMBEDDED
1010 kapp->invokeBrowser( url ); 1011 kapp->invokeBrowser( url );
1011#else //KAB_EMBEDDED 1012#else //KAB_EMBEDDED
1012 qDebug("KABCore::browse must be fixed"); 1013 qDebug("KABCore::browse must be fixed");
1013#endif //KAB_EMBEDDED 1014#endif //KAB_EMBEDDED
1014} 1015}
1015 1016
1016void KABCore::selectAllContacts() 1017void KABCore::selectAllContacts()
1017{ 1018{
1018 mViewManager->setSelected( QString::null, true ); 1019 mViewManager->setSelected( QString::null, true );
1019} 1020}
1020 1021
1021void KABCore::deleteContacts() 1022void KABCore::deleteContacts()
1022{ 1023{
1023 QStringList uidList = mViewManager->selectedUids(); 1024 QStringList uidList = mViewManager->selectedUids();
1024 deleteContacts( uidList ); 1025 deleteContacts( uidList );
1025} 1026}
1026 1027
1027void KABCore::deleteContacts( const QStringList &uids ) 1028void KABCore::deleteContacts( const QStringList &uids )
1028{ 1029{
1029 if ( uids.count() > 0 ) { 1030 if ( uids.count() > 0 ) {
1030 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids ); 1031 PwDeleteCommand *command = new PwDeleteCommand( mAddressBook, uids );
1031 UndoStack::instance()->push( command ); 1032 UndoStack::instance()->push( command );
1032 RedoStack::instance()->clear(); 1033 RedoStack::instance()->clear();
1033 1034
1034 // now if we deleted anything, refresh 1035 // now if we deleted anything, refresh
1035 setContactSelected( QString::null ); 1036 setContactSelected( QString::null );
1036 setModified( true ); 1037 setModified( true );
1037 } 1038 }
1038} 1039}
1039 1040
1040void KABCore::copyContacts() 1041void KABCore::copyContacts()
1041{ 1042{
1042 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1043 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1043 1044
1044 QString clipText = AddresseeUtil::addresseesToClipboard( addrList ); 1045 QString clipText = AddresseeUtil::addresseesToClipboard( addrList );
1045 1046
1046 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl; 1047 kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl;
1047 1048
1048 QClipboard *cb = QApplication::clipboard(); 1049 QClipboard *cb = QApplication::clipboard();
1049 cb->setText( clipText ); 1050 cb->setText( clipText );
1050} 1051}
1051 1052
1052void KABCore::cutContacts() 1053void KABCore::cutContacts()
1053{ 1054{
1054 QStringList uidList = mViewManager->selectedUids(); 1055 QStringList uidList = mViewManager->selectedUids();
1055 1056
1056//US if ( uidList.size() > 0 ) { 1057//US if ( uidList.size() > 0 ) {
1057 if ( uidList.count() > 0 ) { 1058 if ( uidList.count() > 0 ) {
1058 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList ); 1059 PwCutCommand *command = new PwCutCommand( mAddressBook, uidList );
1059 UndoStack::instance()->push( command ); 1060 UndoStack::instance()->push( command );
1060 RedoStack::instance()->clear(); 1061 RedoStack::instance()->clear();
1061 1062
1062 setModified( true ); 1063 setModified( true );
1063 } 1064 }
1064} 1065}
1065 1066
1066void KABCore::pasteContacts() 1067void KABCore::pasteContacts()
1067{ 1068{
1068 QClipboard *cb = QApplication::clipboard(); 1069 QClipboard *cb = QApplication::clipboard();
1069 1070
1070 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); 1071 KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() );
1071 1072
1072 pasteContacts( list ); 1073 pasteContacts( list );
1073} 1074}
1074 1075
1075void KABCore::pasteContacts( KABC::Addressee::List &list ) 1076void KABCore::pasteContacts( KABC::Addressee::List &list )
1076{ 1077{
1077 KABC::Resource *resource = requestResource( this ); 1078 KABC::Resource *resource = requestResource( this );
1078 KABC::Addressee::List::Iterator it; 1079 KABC::Addressee::List::Iterator it;
1079 for ( it = list.begin(); it != list.end(); ++it ) 1080 for ( it = list.begin(); it != list.end(); ++it )
1080 (*it).setResource( resource ); 1081 (*it).setResource( resource );
1081 1082
1082 PwPasteCommand *command = new PwPasteCommand( this, list ); 1083 PwPasteCommand *command = new PwPasteCommand( this, list );
1083 UndoStack::instance()->push( command ); 1084 UndoStack::instance()->push( command );
1084 RedoStack::instance()->clear(); 1085 RedoStack::instance()->clear();
1085 1086
1086 setModified( true ); 1087 setModified( true );
1087} 1088}
1088 1089
1089void KABCore::setWhoAmI() 1090void KABCore::setWhoAmI()
1090{ 1091{
1091 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1092 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1092 1093
1093 if ( addrList.count() > 1 ) { 1094 if ( addrList.count() > 1 ) {
1094 KMessageBox::sorry( this, i18n( "Please select only one contact." ) ); 1095 KMessageBox::sorry( this, i18n( "Please select only one contact." ) );
1095 return; 1096 return;
1096 } 1097 }
1097 1098
1098 QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); 1099 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 ) 1100 if ( KMessageBox::questionYesNo( this, text.arg( addrList[ 0 ].assembledName() ) ) == KMessageBox::Yes )
1100 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] ); 1101 static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self() )->setWhoAmI( addrList[ 0 ] );
1101} 1102}
1102void KABCore::editCategories() 1103void KABCore::editCategories()
1103{ 1104{
1104 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true ); 1105 KPIM::CategoryEditDialog dlg ( KABPrefs::instance(), this, "", true );
1105 dlg.exec(); 1106 dlg.exec();
1106} 1107}
1107void KABCore::setCategories() 1108void KABCore::setCategories()
1108{ 1109{
1109 1110
1110 QStringList uids; 1111 QStringList uids;
1111 XXPortSelectDialog dlgx( this, false, this ); 1112 XXPortSelectDialog dlgx( this, false, this );
1112 if ( dlgx.exec() ) 1113 if ( dlgx.exec() )
1113 uids = dlgx.uids(); 1114 uids = dlgx.uids();
1114 else 1115 else
1115 return; 1116 return;
1116 if ( uids.isEmpty() ) 1117 if ( uids.isEmpty() )
1117 return; 1118 return;
1118 // qDebug("count %d ", uids.count()); 1119 // qDebug("count %d ", uids.count());
1119 1120
1120 1121
1121 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true ); 1122 KPIM::CategorySelectDialog dlg( KABPrefs::instance(), this, "", true );
1122 if ( !dlg.exec() ) { 1123 if ( !dlg.exec() ) {
1123 message( i18n("Setting categories cancelled") ); 1124 message( i18n("Setting categories cancelled") );
1124 return; 1125 return;
1125 } 1126 }
1126 bool merge = false; 1127 bool merge = false;
1127 QString msg = i18n( "Merge with existing categories?" ); 1128 QString msg = i18n( "Merge with existing categories?" );
1128 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes ) 1129 if ( KMessageBox::questionYesNo( this, msg ) == KMessageBox::Yes )
1129 merge = true; 1130 merge = true;
1130 1131
1131 message( i18n("Setting categories ... please wait!") ); 1132 message( i18n("Setting categories ... please wait!") );
1132 QStringList categories = dlg.selectedCategories(); 1133 QStringList categories = dlg.selectedCategories();
1133 1134
1134 //QStringList uids = mViewManager->selectedUids(); 1135 //QStringList uids = mViewManager->selectedUids();
1135 QStringList::Iterator it; 1136 QStringList::Iterator it;
1136 for ( it = uids.begin(); it != uids.end(); ++it ) { 1137 for ( it = uids.begin(); it != uids.end(); ++it ) {
1137 KABC::Addressee addr = mAddressBook->findByUid( *it ); 1138 KABC::Addressee addr = mAddressBook->findByUid( *it );
1138 if ( !addr.isEmpty() ) { 1139 if ( !addr.isEmpty() ) {
1139 if ( !merge ) 1140 if ( !merge )
1140 addr.setCategories( categories ); 1141 addr.setCategories( categories );
1141 else { 1142 else {
1142 QStringList addrCategories = addr.categories(); 1143 QStringList addrCategories = addr.categories();
1143 QStringList::Iterator catIt; 1144 QStringList::Iterator catIt;
1144 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) { 1145 for ( catIt = categories.begin(); catIt != categories.end(); ++catIt ) {
1145 if ( !addrCategories.contains( *catIt ) ) 1146 if ( !addrCategories.contains( *catIt ) )
1146 addrCategories.append( *catIt ); 1147 addrCategories.append( *catIt );
1147 } 1148 }
1148 addr.setCategories( addrCategories ); 1149 addr.setCategories( addrCategories );
1149 } 1150 }
1150 mAddressBook->insertAddressee( addr ); 1151 mAddressBook->insertAddressee( addr );
1151 } 1152 }
1152 } 1153 }
1153 1154
1154 if ( uids.count() > 0 ) 1155 if ( uids.count() > 0 )
1155 setModified( true ); 1156 setModified( true );
1156 message( i18n("Setting categories completed!") ); 1157 message( i18n("Setting categories completed!") );
1157} 1158}
1158 1159
1159void KABCore::setSearchFields( const KABC::Field::List &fields ) 1160void KABCore::setSearchFields( const KABC::Field::List &fields )
1160{ 1161{
1161 mIncSearchWidget->setFields( fields ); 1162 mIncSearchWidget->setFields( fields );
1162} 1163}
1163 1164
1164void KABCore::incrementalSearch( const QString& text ) 1165void KABCore::incrementalSearch( const QString& text )
1165{ 1166{
1166 QString stext; 1167 QString stext;
1167 if ( KABPrefs::instance()->mAutoSearchWithWildcard ) { 1168 if ( KABPrefs::instance()->mAutoSearchWithWildcard ) {
1168 stext = "*" + text; 1169 stext = "*" + text;
1169 } else { 1170 } else {
1170 stext = text; 1171 stext = text;
1171 } 1172 }
1172 mViewManager->doSearch( stext, mIncSearchWidget->currentField() ); 1173 mViewManager->doSearch( stext, mIncSearchWidget->currentField() );
1173} 1174}
1174void KABCore::incrementalSearchJump( const QString& text ) 1175void KABCore::incrementalSearchJump( const QString& text )
1175{ 1176{
1176 mViewManager->doSearch( text, mIncSearchWidget->currentField() ); 1177 mViewManager->doSearch( text, mIncSearchWidget->currentField() );
1177} 1178}
1178 1179
1179void KABCore::setModified() 1180void KABCore::setModified()
1180{ 1181{
1181 setModified( true ); 1182 setModified( true );
1182} 1183}
1183 1184
1184void KABCore::setModifiedWOrefresh() 1185void KABCore::setModifiedWOrefresh()
1185{ 1186{
1186 // qDebug("KABCore::setModifiedWOrefresh() "); 1187 // qDebug("KABCore::setModifiedWOrefresh() ");
1187 mModified = true; 1188 mModified = true;
1188 mActionSave->setEnabled( mModified ); 1189 mActionSave->setEnabled( mModified );
1189 1190
1190 1191
1191} 1192}
1192void KABCore::setModified( bool modified ) 1193void KABCore::setModified( bool modified )
1193{ 1194{
1194 mModified = modified; 1195 mModified = modified;
1195 mActionSave->setEnabled( mModified ); 1196 mActionSave->setEnabled( mModified );
1196 1197
1197 if ( modified ) 1198 if ( modified )
1198 mJumpButtonBar->recreateButtons(); 1199 mJumpButtonBar->recreateButtons();
1199 1200
1200 mViewManager->refreshView(); 1201 mViewManager->refreshView();
1201 1202
1202} 1203}
1203 1204
1204bool KABCore::modified() const 1205bool KABCore::modified() const
1205{ 1206{
1206 return mModified; 1207 return mModified;
1207} 1208}
1208 1209
1209void KABCore::contactModified( const KABC::Addressee &addr ) 1210void KABCore::contactModified( const KABC::Addressee &addr )
1210{ 1211{
1211 addrModified( addr ); 1212 addrModified( addr );
1212#if 0 // debug only 1213#if 0 // debug only
1213 KABC::Addressee ad = addr; 1214 KABC::Addressee ad = addr;
1214 ad.computeCsum( "123"); 1215 ad.computeCsum( "123");
1215#endif 1216#endif
1216} 1217}
1217 1218
1218void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails ) 1219void KABCore::addrModified( const KABC::Addressee &addr ,bool updateDetails )
1219{ 1220{
1220 1221
1221 Command *command = 0; 1222 Command *command = 0;
1222 QString uid; 1223 QString uid;
1223 1224
1224 // check if it exists already 1225 // check if it exists already
1225 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() ); 1226 KABC::Addressee origAddr = mAddressBook->findByUid( addr.uid() );
1226 if ( origAddr.isEmpty() ) 1227 if ( origAddr.isEmpty() )
1227 command = new PwNewCommand( mAddressBook, addr ); 1228 command = new PwNewCommand( mAddressBook, addr );
1228 else { 1229 else {
1229 command = new PwEditCommand( mAddressBook, origAddr, addr ); 1230 command = new PwEditCommand( mAddressBook, origAddr, addr );
1230 uid = addr.uid(); 1231 uid = addr.uid();
1231 } 1232 }
1232 1233
1233 UndoStack::instance()->push( command ); 1234 UndoStack::instance()->push( command );
1234 RedoStack::instance()->clear(); 1235 RedoStack::instance()->clear();
1235 if ( updateDetails ) 1236 if ( updateDetails )
1236 mDetails->setAddressee( addr ); 1237 mDetails->setAddressee( addr );
1237 setModified( true ); 1238 setModified( true );
1238} 1239}
1239 1240
1240void KABCore::newContact() 1241void KABCore::newContact()
1241{ 1242{
1242 1243
1243 1244
1244 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); 1245 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources();
1245 1246
1246 QPtrList<KRES::Resource> kresResources; 1247 QPtrList<KRES::Resource> kresResources;
1247 QPtrListIterator<KABC::Resource> it( kabcResources ); 1248 QPtrListIterator<KABC::Resource> it( kabcResources );
1248 KABC::Resource *resource; 1249 KABC::Resource *resource;
1249 while ( ( resource = it.current() ) != 0 ) { 1250 while ( ( resource = it.current() ) != 0 ) {
1250 ++it; 1251 ++it;
1251 if ( !resource->readOnly() ) { 1252 if ( !resource->readOnly() ) {
1252 KRES::Resource *res = static_cast<KRES::Resource*>( resource ); 1253 KRES::Resource *res = static_cast<KRES::Resource*>( resource );
1253 if ( res ) 1254 if ( res )
1254 kresResources.append( res ); 1255 kresResources.append( res );
1255 } 1256 }
1256 } 1257 }
1257 1258
1258 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this ); 1259 KRES::Resource *res = KRES::SelectDialog::getResource( kresResources, this );
1259 resource = static_cast<KABC::Resource*>( res ); 1260 resource = static_cast<KABC::Resource*>( res );
1260 1261
1261 if ( resource ) { 1262 if ( resource ) {
1262 KABC::Addressee addr; 1263 KABC::Addressee addr;
1263 addr.setResource( resource ); 1264 addr.setResource( resource );
1264 mEditorDialog->setAddressee( addr ); 1265 mEditorDialog->setAddressee( addr );
1265 mEditorDialog->setCaption( i18n("Edit new contact")); 1266 mEditorDialog->setCaption( i18n("Edit new contact"));
1266 KApplication::execDialog ( mEditorDialog ); 1267 KApplication::execDialog ( mEditorDialog );
1267 1268
1268 } else 1269 } else
1269 return; 1270 return;
1270 1271
1271 // mEditorDict.insert( dialog->addressee().uid(), dialog ); 1272 // mEditorDict.insert( dialog->addressee().uid(), dialog );
1272 1273
1273 1274
1274} 1275}
1275 1276
1276void KABCore::addEmail( QString aStr ) 1277void KABCore::addEmail( QString aStr )
1277{ 1278{
1278#ifndef KAB_EMBEDDED 1279#ifndef KAB_EMBEDDED
1279 QString fullName, email; 1280 QString fullName, email;
1280 1281
1281 KABC::Addressee::parseEmailAddress( aStr, fullName, email ); 1282 KABC::Addressee::parseEmailAddress( aStr, fullName, email );
1282 1283
1283 // Try to lookup the addressee matching the email address 1284 // Try to lookup the addressee matching the email address
1284 bool found = false; 1285 bool found = false;
1285 QStringList emailList; 1286 QStringList emailList;
1286 KABC::AddressBook::Iterator it; 1287 KABC::AddressBook::Iterator it;
1287 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) { 1288 for ( it = mAddressBook->begin(); !found && (it != mAddressBook->end()); ++it ) {
1288 emailList = (*it).emails(); 1289 emailList = (*it).emails();
1289 if ( emailList.contains( email ) > 0 ) { 1290 if ( emailList.contains( email ) > 0 ) {
1290 found = true; 1291 found = true;
1291 (*it).setNameFromString( fullName ); 1292 (*it).setNameFromString( fullName );
1292 editContact( (*it).uid() ); 1293 editContact( (*it).uid() );
1293 } 1294 }
1294 } 1295 }
1295 1296
1296 if ( !found ) { 1297 if ( !found ) {
1297 KABC::Addressee addr; 1298 KABC::Addressee addr;
1298 addr.setNameFromString( fullName ); 1299 addr.setNameFromString( fullName );
1299 addr.insertEmail( email, true ); 1300 addr.insertEmail( email, true );
1300 1301
1301 mAddressBook->insertAddressee( addr ); 1302 mAddressBook->insertAddressee( addr );
1302 mViewManager->refreshView( addr.uid() ); 1303 mViewManager->refreshView( addr.uid() );
1303 editContact( addr.uid() ); 1304 editContact( addr.uid() );
1304 } 1305 }
1305#else //KAB_EMBEDDED 1306#else //KAB_EMBEDDED
1306 qDebug("KABCore::addEmail finsih method"); 1307 qDebug("KABCore::addEmail finsih method");
1307#endif //KAB_EMBEDDED 1308#endif //KAB_EMBEDDED
1308} 1309}
1309 1310
1310void KABCore::importVCard( const KURL &url, bool showPreview ) 1311void KABCore::importVCard( const KURL &url, bool showPreview )
1311{ 1312{
1312 mXXPortManager->importVCard( url, showPreview ); 1313 mXXPortManager->importVCard( url, showPreview );
1313} 1314}
1314void KABCore::importFromOL() 1315void KABCore::importFromOL()
1315{ 1316{
1316#ifdef _OL_IMPORT_ 1317#ifdef _OL_IMPORT_
1317 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this ); 1318 KAImportOLdialog* idgl = new KAImportOLdialog( i18n("Import Contacts from OL"), mAddressBook, this );
1318 idgl->exec(); 1319 idgl->exec();
1319 KABC::Addressee::List list = idgl->getAddressList(); 1320 KABC::Addressee::List list = idgl->getAddressList();
1320 if ( list.count() > 0 ) { 1321 if ( list.count() > 0 ) {
1321 KABC::Addressee::List listNew; 1322 KABC::Addressee::List listNew;
1322 KABC::Addressee::List listExisting; 1323 KABC::Addressee::List listExisting;
1323 KABC::Addressee::List::Iterator it; 1324 KABC::Addressee::List::Iterator it;
1324 KABC::AddressBook::Iterator iter; 1325 KABC::AddressBook::Iterator iter;
1325 for ( it = list.begin(); it != list.end(); ++it ) { 1326 for ( it = list.begin(); it != list.end(); ++it ) {
1326 if ( mAddressBook->findByUid((*it).uid() ).isEmpty()) 1327 if ( mAddressBook->findByUid((*it).uid() ).isEmpty())
1327 listNew.append( (*it) ); 1328 listNew.append( (*it) );
1328 else 1329 else
1329 listExisting.append( (*it) ); 1330 listExisting.append( (*it) );
1330 } 1331 }
1331 if ( listExisting.count() > 0 ) 1332 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() )); 1333 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 ) { 1334 if ( listNew.count() > 0 ) {
1334 pasteWithNewUid = false; 1335 pasteWithNewUid = false;
1335 pasteContacts( listNew ); 1336 pasteContacts( listNew );
1336 pasteWithNewUid = true; 1337 pasteWithNewUid = true;
1337 } 1338 }
1338 } 1339 }
1339 delete idgl; 1340 delete idgl;
1340#endif 1341#endif
1341} 1342}
1342 1343
1343void KABCore::importVCard( const QString &vCard, bool showPreview ) 1344void KABCore::importVCard( const QString &vCard, bool showPreview )
1344{ 1345{
1345 mXXPortManager->importVCard( vCard, showPreview ); 1346 mXXPortManager->importVCard( vCard, showPreview );
1346} 1347}
1347 1348
1348//US added a second method without defaultparameter 1349//US added a second method without defaultparameter
1349void KABCore::editContact2() { 1350void KABCore::editContact2() {
1350 editContact( QString::null ); 1351 editContact( QString::null );
1351} 1352}
1352 1353
1353void KABCore::editContact( const QString &uid ) 1354void KABCore::editContact( const QString &uid )
1354{ 1355{
1355 1356
1356 if ( mExtensionManager->isQuickEditVisible() ) 1357 if ( mExtensionManager->isQuickEditVisible() )
1357 return; 1358 return;
1358 1359
1359 // First, locate the contact entry 1360 // First, locate the contact entry
1360 QString localUID = uid; 1361 QString localUID = uid;
1361 if ( localUID.isNull() ) { 1362 if ( localUID.isNull() ) {
1362 QStringList uidList = mViewManager->selectedUids(); 1363 QStringList uidList = mViewManager->selectedUids();
1363 if ( uidList.count() > 0 ) 1364 if ( uidList.count() > 0 )
1364 localUID = *( uidList.at( 0 ) ); 1365 localUID = *( uidList.at( 0 ) );
1365 } 1366 }
1366 1367
1367 KABC::Addressee addr = mAddressBook->findByUid( localUID ); 1368 KABC::Addressee addr = mAddressBook->findByUid( localUID );
1368 if ( !addr.isEmpty() ) { 1369 if ( !addr.isEmpty() ) {
1369 mEditorDialog->setAddressee( addr ); 1370 mEditorDialog->setAddressee( addr );
1370 KApplication::execDialog ( mEditorDialog ); 1371 KApplication::execDialog ( mEditorDialog );
1371 } 1372 }
1372} 1373}
1373 1374
1374/** 1375/**
1375 Shows or edits the detail view for the given uid. If the uid is QString::null, 1376 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. 1377 the method will try to find a selected addressee in the view.
1377 */ 1378 */
1378void KABCore::executeContact( const QString &uid /*US = QString::null*/ ) 1379void KABCore::executeContact( const QString &uid /*US = QString::null*/ )
1379{ 1380{
1380 if ( mMultipleViewsAtOnce ) 1381 if ( mMultipleViewsAtOnce )
1381 { 1382 {
1382 editContact( uid ); 1383 editContact( uid );
1383 } 1384 }
1384 else 1385 else
1385 { 1386 {
1386 setDetailsVisible( true ); 1387 setDetailsVisible( true );
1387 mActionDetails->setChecked(true); 1388 mActionDetails->setChecked(true);
1388 } 1389 }
1389 1390
1390} 1391}
1391 1392
1392void KABCore::save() 1393void KABCore::save()
1393{ 1394{
1394 if (syncManager->blockSave()) 1395 if (syncManager->blockSave())
1395 return; 1396 return;
1396 if ( !mModified ) 1397 if ( !mModified )
1397 return; 1398 return;
1398 1399
1399 syncManager->setBlockSave(true); 1400 syncManager->setBlockSave(true);
1400 QString text = i18n( "There was an error while attempting to save\n the " 1401 QString text = i18n( "There was an error while attempting to save\n the "
1401 "address book. Please check that some \nother application is " 1402 "address book. Please check that some \nother application is "
1402 "not using it. " ); 1403 "not using it. " );
1403 message(i18n("Saving ... please wait! "), false); 1404 message(i18n("Saving ... please wait! "), false);
1404 //qApp->processEvents(); 1405 //qApp->processEvents();
1405#ifndef KAB_EMBEDDED 1406#ifndef KAB_EMBEDDED
1406 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook ); 1407 KABC::StdAddressBook *b = dynamic_cast<KABC::StdAddressBook*>( mAddressBook );
1407 if ( !b || !b->save() ) { 1408 if ( !b || !b->save() ) {
1408 KMessageBox::error( this, text, i18n( "Unable to Save" ) ); 1409 KMessageBox::error( this, text, i18n( "Unable to Save" ) );
1409 } 1410 }
1410#else //KAB_EMBEDDED 1411#else //KAB_EMBEDDED
1411 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook ); 1412 KABC::StdAddressBook *b = (KABC::StdAddressBook*)( mAddressBook );
1412 if ( !b || !b->save() ) { 1413 if ( !b || !b->save() ) {
1413 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok")); 1414 QMessageBox::critical( this, i18n( "Unable to Save" ), text, i18n("Ok"));
1414 } 1415 }
1415#endif //KAB_EMBEDDED 1416#endif //KAB_EMBEDDED
1416 1417
1417 message(i18n("Addressbook saved!")); 1418 message(i18n("Addressbook saved!"));
1418 setModified( false ); 1419 setModified( false );
1419 syncManager->setBlockSave(false); 1420 syncManager->setBlockSave(false);
1420} 1421}
1421 1422
1422 1423
1423void KABCore::undo() 1424void KABCore::undo()
1424{ 1425{
1425 UndoStack::instance()->undo(); 1426 UndoStack::instance()->undo();
1426 1427
1427 // Refresh the view 1428 // Refresh the view
1428 mViewManager->refreshView(); 1429 mViewManager->refreshView();
1429} 1430}
1430 1431
1431void KABCore::redo() 1432void KABCore::redo()
1432{ 1433{
1433 RedoStack::instance()->redo(); 1434 RedoStack::instance()->redo();
1434 1435
1435 // Refresh the view 1436 // Refresh the view
1436 mViewManager->refreshView(); 1437 mViewManager->refreshView();
1437} 1438}
1438void KABCore::setJumpButtonBar( bool visible ) 1439void KABCore::setJumpButtonBar( bool visible )
1439{ 1440{
1440 setJumpButtonBarVisible(visible ); 1441 setJumpButtonBarVisible(visible );
1441 saveSettings(); 1442 saveSettings();
1442} 1443}
1443void KABCore::setJumpButtonBarVisible( bool visible ) 1444void KABCore::setJumpButtonBarVisible( bool visible )
1444{ 1445{
1445 if (mMultipleViewsAtOnce) 1446 if (mMultipleViewsAtOnce)
1446 { 1447 {
1447 if ( visible ) 1448 if ( visible )
1448 mJumpButtonBar->show(); 1449 mJumpButtonBar->show();
1449 else 1450 else
1450 mJumpButtonBar->hide(); 1451 mJumpButtonBar->hide();
1451 } 1452 }
1452 else 1453 else
1453 { 1454 {
1454 // show the jumpbar only if "the details are hidden" == "viewmanager are shown" 1455 // show the jumpbar only if "the details are hidden" == "viewmanager are shown"
1455 if (mViewManager->isVisible()) 1456 if (mViewManager->isVisible())
1456 { 1457 {
1457 if ( visible ) 1458 if ( visible )
1458 mJumpButtonBar->show(); 1459 mJumpButtonBar->show();
1459 else 1460 else
1460 mJumpButtonBar->hide(); 1461 mJumpButtonBar->hide();
1461 } 1462 }
1462 else 1463 else
1463 { 1464 {
1464 mJumpButtonBar->hide(); 1465 mJumpButtonBar->hide();
1465 } 1466 }
1466 } 1467 }
1467 if ( visible ) { 1468 if ( visible ) {
1468 if ( mIncSearchWidget->currentItem() == 0 ) { 1469 if ( mIncSearchWidget->currentItem() == 0 ) {
1469 message( i18n("Change search field enable jump bar") ); 1470 message( i18n("Change search field enable jump bar") );
1470 } 1471 }
1471 } 1472 }
1472} 1473}
1473 1474
1474 1475
1475void KABCore::setDetailsToState() 1476void KABCore::setDetailsToState()
1476{ 1477{
1477 setDetailsVisible( mActionDetails->isChecked() ); 1478 setDetailsVisible( mActionDetails->isChecked() );
1478} 1479}
1479void KABCore::setDetailsToggle() 1480void KABCore::setDetailsToggle()
1480{ 1481{
1481 mActionDetails->setChecked( !mActionDetails->isChecked() ); 1482 mActionDetails->setChecked( !mActionDetails->isChecked() );
1482 setDetailsToState(); 1483 setDetailsToState();
1483} 1484}
1484 1485
1485 1486
1486 1487
1487void KABCore::setDetailsVisible( bool visible ) 1488void KABCore::setDetailsVisible( bool visible )
1488{ 1489{
1489 if (visible && mDetails->isHidden()) 1490 if (visible && mDetails->isHidden())
1490 { 1491 {
1491 KABC::Addressee::List addrList = mViewManager->selectedAddressees(); 1492 KABC::Addressee::List addrList = mViewManager->selectedAddressees();
1492 if ( addrList.count() > 0 ) 1493 if ( addrList.count() > 0 )
1493 mDetails->setAddressee( addrList[ 0 ] ); 1494 mDetails->setAddressee( addrList[ 0 ] );
1494 } 1495 }
1495 1496
1496 // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between 1497 // mMultipleViewsAtOnce=false: mDetails is always visible. But we switch between
1497 // the listview and the detailview. We do that by changing the splitbar size. 1498 // the listview and the detailview. We do that by changing the splitbar size.
1498 if (mMultipleViewsAtOnce) 1499 if (mMultipleViewsAtOnce)
1499 { 1500 {
1500 if ( visible ) 1501 if ( visible )
1501 mDetails->show(); 1502 mDetails->show();
1502 else 1503 else
1503 mDetails->hide(); 1504 mDetails->hide();
1504 } 1505 }
1505 else 1506 else
1506 { 1507 {
1507 if ( visible ) { 1508 if ( visible ) {
1508 mViewManager->hide(); 1509 mViewManager->hide();
1509 mDetails->show(); 1510 mDetails->show();
1510 mIncSearchWidget->setFocus(); 1511 mIncSearchWidget->setFocus();
1511 } 1512 }
1512 else { 1513 else {
1513 mViewManager->show(); 1514 mViewManager->show();
1514 mDetails->hide(); 1515 mDetails->hide();
1515 mViewManager->setFocusAV(); 1516 mViewManager->setFocusAV();
1516 } 1517 }
1517 setJumpButtonBarVisible( !visible ); 1518 setJumpButtonBarVisible( !visible );
1518 } 1519 }
1519 1520
1520} 1521}
1521 1522
1522void KABCore::extensionChanged( int id ) 1523void KABCore::extensionChanged( int id )
1523{ 1524{
1524 //change the details view only for non desktop systems 1525 //change the details view only for non desktop systems
1525#ifndef DESKTOP_VERSION 1526#ifndef DESKTOP_VERSION
1526 1527
1527 if (id == 0) 1528 if (id == 0)
1528 { 1529 {
1529 //the user disabled the extension. 1530 //the user disabled the extension.
1530 1531
1531 if (mMultipleViewsAtOnce) 1532 if (mMultipleViewsAtOnce)
1532 { // enable detailsview again 1533 { // enable detailsview again
1533 setDetailsVisible( true ); 1534 setDetailsVisible( true );
1534 mActionDetails->setChecked( true ); 1535 mActionDetails->setChecked( true );
1535 } 1536 }
1536 else 1537 else
1537 { //go back to the listview 1538 { //go back to the listview
1538 setDetailsVisible( false ); 1539 setDetailsVisible( false );
1539 mActionDetails->setChecked( false ); 1540 mActionDetails->setChecked( false );
1540 mActionDetails->setEnabled(true); 1541 mActionDetails->setEnabled(true);
1541 } 1542 }
1542 1543
1543 } 1544 }
1544 else 1545 else
1545 { 1546 {
1546 //the user enabled the extension. 1547 //the user enabled the extension.
1547 setDetailsVisible( false ); 1548 setDetailsVisible( false );
1548 mActionDetails->setChecked( false ); 1549 mActionDetails->setChecked( false );
1549 1550
1550 if (!mMultipleViewsAtOnce) 1551 if (!mMultipleViewsAtOnce)
1551 { 1552 {
1552 mActionDetails->setEnabled(false); 1553 mActionDetails->setEnabled(false);
1553 } 1554 }
1554 1555
1555 mExtensionManager->setSelectionChanged(); 1556 mExtensionManager->setSelectionChanged();
1556 1557
1557 } 1558 }
1558 1559
1559#endif// DESKTOP_VERSION 1560#endif// DESKTOP_VERSION
1560 1561
1561} 1562}
1562 1563
1563 1564
1564void KABCore::extensionModified( const KABC::Addressee::List &list ) 1565void KABCore::extensionModified( const KABC::Addressee::List &list )
1565{ 1566{
1566 1567
1567 if ( list.count() != 0 ) { 1568 if ( list.count() != 0 ) {
1568 KABC::Addressee::List::ConstIterator it; 1569 KABC::Addressee::List::ConstIterator it;
1569 for ( it = list.begin(); it != list.end(); ++it ) 1570 for ( it = list.begin(); it != list.end(); ++it )
1570 mAddressBook->insertAddressee( *it ); 1571 mAddressBook->insertAddressee( *it );
1571 if ( list.count() > 1 ) 1572 if ( list.count() > 1 )
1572 setModified(); 1573 setModified();
1573 else 1574 else
1574 setModifiedWOrefresh(); 1575 setModifiedWOrefresh();
1575 } 1576 }
1576 if ( list.count() == 0 ) 1577 if ( list.count() == 0 )
1577 mViewManager->refreshView(); 1578 mViewManager->refreshView();
1578 else 1579 else
1579 mViewManager->refreshView( list[ 0 ].uid() ); 1580 mViewManager->refreshView( list[ 0 ].uid() );
1580 1581
1581 1582
1582 1583
1583} 1584}
1584 1585
1585QString KABCore::getNameByPhone( const QString &phone ) 1586QString KABCore::getNameByPhone( const QString &phone )
1586{ 1587{
1587#ifndef KAB_EMBEDDED 1588#ifndef KAB_EMBEDDED
1588 QRegExp r( "[/*/-/ ]" ); 1589 QRegExp r( "[/*/-/ ]" );
1589 QString localPhone( phone ); 1590 QString localPhone( phone );
1590 1591
1591 bool found = false; 1592 bool found = false;
1592 QString ownerName = ""; 1593 QString ownerName = "";
1593 KABC::AddressBook::Iterator iter; 1594 KABC::AddressBook::Iterator iter;
1594 KABC::PhoneNumber::List::Iterator phoneIter; 1595 KABC::PhoneNumber::List::Iterator phoneIter;
1595 KABC::PhoneNumber::List phoneList; 1596 KABC::PhoneNumber::List phoneList;
1596 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) { 1597 for ( iter = mAddressBook->begin(); !found && ( iter != mAddressBook->end() ); ++iter ) {
1597 phoneList = (*iter).phoneNumbers(); 1598 phoneList = (*iter).phoneNumbers();
1598 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() ); 1599 for ( phoneIter = phoneList.begin(); !found && ( phoneIter != phoneList.end() );
1599 ++phoneIter) { 1600 ++phoneIter) {
1600 // Get rid of separator chars so just the numbers are compared. 1601 // Get rid of separator chars so just the numbers are compared.
1601 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) { 1602 if ( (*phoneIter).number().replace( r, "" ) == localPhone.replace( r, "" ) ) {
1602 ownerName = (*iter).formattedName(); 1603 ownerName = (*iter).formattedName();
1603 found = true; 1604 found = true;
1604 } 1605 }
1605 } 1606 }
1606 } 1607 }
1607 1608
1608 return ownerName; 1609 return ownerName;
1609#else //KAB_EMBEDDED 1610#else //KAB_EMBEDDED
1610 qDebug("KABCore::getNameByPhone finsih method"); 1611 qDebug("KABCore::getNameByPhone finsih method");
1611 return ""; 1612 return "";
1612#endif //KAB_EMBEDDED 1613#endif //KAB_EMBEDDED
1613 1614
1614} 1615}
1615void KABCore::openConfigGlobalDialog() 1616void KABCore::openConfigGlobalDialog()
1616{ 1617{
1617 KPimPrefsGlobalDialog gc ( this ); 1618 KPimPrefsGlobalDialog gc ( this );
1618 gc.exec(); 1619 gc.exec();
1619} 1620}
1620void KABCore::openConfigDialog() 1621void KABCore::openConfigDialog()
1621{ 1622{
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 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 1624
1624 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog , "KCMKabConfig" ); 1625 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog , "KCMKabConfig" );
1625 ConfigureDialog->setMainWidget( kabcfg ); 1626 ConfigureDialog->setMainWidget( kabcfg );
1626 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1627 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1627 this, SLOT( configurationChanged() ) ); 1628 this, SLOT( configurationChanged() ) );
1628 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1629 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1629 kabcfg, SLOT( save() ) ); 1630 kabcfg, SLOT( save() ) );
1630 connect( ConfigureDialog, SIGNAL( acceptClicked() ), 1631 connect( ConfigureDialog, SIGNAL( acceptClicked() ),
1631 this, SLOT( configurationChanged() ) ); 1632 this, SLOT( configurationChanged() ) );
1632 connect( ConfigureDialog, SIGNAL( acceptClicked() ), 1633 connect( ConfigureDialog, SIGNAL( acceptClicked() ),
1633 kabcfg, SLOT( save() ) ); 1634 kabcfg, SLOT( save() ) );
1634 connect( ConfigureDialog, SIGNAL( defaultClicked() ), 1635 connect( ConfigureDialog, SIGNAL( defaultClicked() ),
1635 kabcfg, SLOT( defaults() ) ); 1636 kabcfg, SLOT( defaults() ) );
1636 saveSettings(); 1637 saveSettings();
1637 kabcfg->load(); 1638 kabcfg->load();
1638#ifndef DESKTOP_VERSION 1639#ifndef DESKTOP_VERSION
1639 if ( QApplication::desktop()->height() <= 480 ) 1640 if ( QApplication::desktop()->height() <= 480 )
1640 ConfigureDialog->hideButtons(); 1641 ConfigureDialog->hideButtons();
1641 ConfigureDialog->showMaximized(); 1642 ConfigureDialog->showMaximized();
1642#endif 1643#endif
1643 if ( ConfigureDialog->exec() ) 1644 if ( ConfigureDialog->exec() )
1644 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") ); 1645 KMessageBox::information( this, i18n("Some changes are only\neffective after a restart!\n") );
1645 delete ConfigureDialog; 1646 delete ConfigureDialog;
1646} 1647}
1647 1648
1648void KABCore::openLDAPDialog() 1649void KABCore::openLDAPDialog()
1649{ 1650{
1650#ifndef KAB_EMBEDDED 1651#ifndef KAB_EMBEDDED
1651 if ( !mLdapSearchDialog ) { 1652 if ( !mLdapSearchDialog ) {
1652 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); 1653 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this );
1653 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, 1654 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager,
1654 SLOT( refreshView() ) ); 1655 SLOT( refreshView() ) );
1655 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, 1656 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this,
1656 SLOT( setModified() ) ); 1657 SLOT( setModified() ) );
1657 } else 1658 } else
1658 mLdapSearchDialog->restoreSettings(); 1659 mLdapSearchDialog->restoreSettings();
1659 1660
1660 if ( mLdapSearchDialog->isOK() ) 1661 if ( mLdapSearchDialog->isOK() )
1661 mLdapSearchDialog->exec(); 1662 mLdapSearchDialog->exec();
1662#else //KAB_EMBEDDED 1663#else //KAB_EMBEDDED
1663 qDebug("KABCore::openLDAPDialog() finsih method"); 1664 qDebug("KABCore::openLDAPDialog() finsih method");
1664#endif //KAB_EMBEDDED 1665#endif //KAB_EMBEDDED
1665} 1666}
1666 1667
1667void KABCore::print() 1668void KABCore::print()
1668{ 1669{
1669#ifndef KAB_EMBEDDED 1670#ifndef KAB_EMBEDDED
1670 KPrinter printer; 1671 KPrinter printer;
1671 if ( !printer.setup( this ) ) 1672 if ( !printer.setup( this ) )
1672 return; 1673 return;
1673 1674
1674 KABPrinting::PrintingWizard wizard( &printer, mAddressBook, 1675 KABPrinting::PrintingWizard wizard( &printer, mAddressBook,
1675 mViewManager->selectedUids(), this ); 1676 mViewManager->selectedUids(), this );
1676 1677
1677 wizard.exec(); 1678 wizard.exec();
1678#else //KAB_EMBEDDED 1679#else //KAB_EMBEDDED
1679 qDebug("KABCore::print() finsih method"); 1680 qDebug("KABCore::print() finsih method");
1680#endif //KAB_EMBEDDED 1681#endif //KAB_EMBEDDED
1681 1682
1682} 1683}
1683 1684
1684 1685
1685void KABCore::addGUIClient( KXMLGUIClient *client ) 1686void KABCore::addGUIClient( KXMLGUIClient *client )
1686{ 1687{
1687 if ( mGUIClient ) 1688 if ( mGUIClient )
1688 mGUIClient->insertChildClient( client ); 1689 mGUIClient->insertChildClient( client );
1689 else 1690 else
1690 KMessageBox::error( this, "no KXMLGUICLient"); 1691 KMessageBox::error( this, "no KXMLGUICLient");
1691} 1692}
1692 1693
1693 1694
1694void KABCore::configurationChanged() 1695void KABCore::configurationChanged()
1695{ 1696{
1696 mExtensionManager->reconfigure(); 1697 mExtensionManager->reconfigure();
1697} 1698}
1698 1699
1699void KABCore::addressBookChanged() 1700void KABCore::addressBookChanged()
1700{ 1701{
1701/*US 1702/*US
1702 QDictIterator<AddresseeEditorDialog> it( mEditorDict ); 1703 QDictIterator<AddresseeEditorDialog> it( mEditorDict );
1703 while ( it.current() ) { 1704 while ( it.current() ) {
1704 if ( it.current()->dirty() ) { 1705 if ( it.current()->dirty() ) {
1705 QString text = i18n( "Data has been changed externally. Unsaved " 1706 QString text = i18n( "Data has been changed externally. Unsaved "
1706 "changes will be lost." ); 1707 "changes will be lost." );
1707 KMessageBox::information( this, text ); 1708 KMessageBox::information( this, text );
1708 } 1709 }
1709 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); 1710 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) );
1710 ++it; 1711 ++it;
1711 } 1712 }
1712*/ 1713*/
1713 if (mEditorDialog) 1714 if (mEditorDialog)
1714 { 1715 {
1715 if (mEditorDialog->dirty()) 1716 if (mEditorDialog->dirty())
1716 { 1717 {
1717 QString text = i18n( "Data has been changed externally. Unsaved " 1718 QString text = i18n( "Data has been changed externally. Unsaved "
1718 "changes will be lost." ); 1719 "changes will be lost." );
1719 KMessageBox::information( this, text ); 1720 KMessageBox::information( this, text );
1720 } 1721 }
1721 QString currentuid = mEditorDialog->addressee().uid(); 1722 QString currentuid = mEditorDialog->addressee().uid();
1722 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) ); 1723 mEditorDialog->setAddressee( mAddressBook->findByUid( currentuid ) );
1723 } 1724 }
1724 mViewManager->refreshView(); 1725 mViewManager->refreshView();
1725 1726
1726 1727
1727} 1728}
1728 1729
1729AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, 1730AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
1730 const char *name ) 1731 const char *name )
1731{ 1732{
1732 1733
1733 if ( mEditorDialog == 0 ) { 1734 if ( mEditorDialog == 0 ) {
1734 mEditorDialog = new AddresseeEditorDialog( this, parent, 1735 mEditorDialog = new AddresseeEditorDialog( this, parent,
1735 name ? name : "editorDialog" ); 1736 name ? name : "editorDialog" );
1736 1737
1737 1738
1738 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ), 1739 connect( mEditorDialog, SIGNAL( contactModified( const KABC::Addressee& ) ),
1739 SLOT( contactModified( const KABC::Addressee& ) ) ); 1740 SLOT( contactModified( const KABC::Addressee& ) ) );
1740 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ), 1741 //connect( mEditorDialog, SIGNAL( editorDestroyed( const QString& ) ),
1741 // SLOT( slotEditorDestroyed( const QString& ) ) ; 1742 // SLOT( slotEditorDestroyed( const QString& ) ) ;
1742 } 1743 }
1743 1744
1744 return mEditorDialog; 1745 return mEditorDialog;
1745} 1746}
1746 1747
1747void KABCore::slotEditorDestroyed( const QString &uid ) 1748void KABCore::slotEditorDestroyed( const QString &uid )
1748{ 1749{
1749 //mEditorDict.remove( uid ); 1750 //mEditorDict.remove( uid );
1750} 1751}
1751 1752
1752void KABCore::initGUI() 1753void KABCore::initGUI()
1753{ 1754{
1754#ifndef KAB_EMBEDDED 1755#ifndef KAB_EMBEDDED
1755 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1756 QHBoxLayout *topLayout = new QHBoxLayout( this );
1756 topLayout->setSpacing( KDialogBase::spacingHint() ); 1757 topLayout->setSpacing( KDialogBase::spacingHint() );
1757 1758
1758 mExtensionBarSplitter = new QSplitter( this ); 1759 mExtensionBarSplitter = new QSplitter( this );
1759 mExtensionBarSplitter->setOrientation( Qt::Vertical ); 1760 mExtensionBarSplitter->setOrientation( Qt::Vertical );
1760 1761
1761 mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); 1762 mDetailsSplitter = new QSplitter( mExtensionBarSplitter );
1762 1763
1763 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1764 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1764 mIncSearchWidget = new IncSearchWidget( viewSpace ); 1765 mIncSearchWidget = new IncSearchWidget( viewSpace );
1765 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1766 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1766 SLOT( incrementalSearch( const QString& ) ) ); 1767 SLOT( incrementalSearch( const QString& ) ) );
1767 1768
1768 mViewManager = new ViewManager( this, viewSpace ); 1769 mViewManager = new ViewManager( this, viewSpace );
1769 viewSpace->setStretchFactor( mViewManager, 1 ); 1770 viewSpace->setStretchFactor( mViewManager, 1 );
1770 1771
1771 mDetails = new ViewContainer( mDetailsSplitter ); 1772 mDetails = new ViewContainer( mDetailsSplitter );
1772 1773
1773 mJumpButtonBar = new JumpButtonBar( this, this ); 1774 mJumpButtonBar = new JumpButtonBar( this, this );
1774 1775
1775 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1776 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1776 1777
1777 topLayout->addWidget( mExtensionBarSplitter ); 1778 topLayout->addWidget( mExtensionBarSplitter );
1778 topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); 1779 topLayout->setStretchFactor( mExtensionBarSplitter, 100 );
1779 topLayout->addWidget( mJumpButtonBar ); 1780 topLayout->addWidget( mJumpButtonBar );
1780 //topLayout->setStretchFactor( mJumpButtonBar, 1 ); 1781 //topLayout->setStretchFactor( mJumpButtonBar, 1 );
1781 1782
1782 mXXPortManager = new XXPortManager( this, this ); 1783 mXXPortManager = new XXPortManager( this, this );
1783 1784
1784#else //KAB_EMBEDDED 1785#else //KAB_EMBEDDED
1785 //US initialize viewMenu before settingup viewmanager. 1786 //US initialize viewMenu before settingup viewmanager.
1786 // Viewmanager needs this menu to plugin submenues. 1787 // Viewmanager needs this menu to plugin submenues.
1787 viewMenu = new QPopupMenu( this ); 1788 viewMenu = new QPopupMenu( this );
1788 settingsMenu = new QPopupMenu( this ); 1789 settingsMenu = new QPopupMenu( this );
1789 //filterMenu = new QPopupMenu( this ); 1790 //filterMenu = new QPopupMenu( this );
1790 ImportMenu = new QPopupMenu( this ); 1791 ImportMenu = new QPopupMenu( this );
1791 ExportMenu = new QPopupMenu( this ); 1792 ExportMenu = new QPopupMenu( this );
1792 syncMenu = new QPopupMenu( this ); 1793 syncMenu = new QPopupMenu( this );
1793 changeMenu= new QPopupMenu( this ); 1794 changeMenu= new QPopupMenu( this );
1794 beamMenu= new QPopupMenu( this ); 1795 beamMenu= new QPopupMenu( this );
1795 1796
1796//US since we have no splitter for the embedded system, setup 1797//US since we have no splitter for the embedded system, setup
1797// a layout with two frames. One left and one right. 1798// a layout with two frames. One left and one right.
1798 1799
1799 QBoxLayout *topLayout; 1800 QBoxLayout *topLayout;
1800 1801
1801 // = new QHBoxLayout( this ); 1802 // = new QHBoxLayout( this );
1802// QBoxLayout *topLayout = (QBoxLayout*)layout(); 1803// QBoxLayout *topLayout = (QBoxLayout*)layout();
1803 1804
1804// QWidget *mainBox = new QWidget( this ); 1805// QWidget *mainBox = new QWidget( this );
1805// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); 1806// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox);
1806 1807
1807#ifdef DESKTOP_VERSION 1808#ifdef DESKTOP_VERSION
1808 topLayout = new QHBoxLayout( this ); 1809 topLayout = new QHBoxLayout( this );
1809 1810
1810 1811
1811 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1812 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1812 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1813 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1813 1814
1814 topLayout->addWidget(mMiniSplitter ); 1815 topLayout->addWidget(mMiniSplitter );
1815 1816
1816 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); 1817 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter );
1817 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1818 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1818 mViewManager = new ViewManager( this, mExtensionBarSplitter ); 1819 mViewManager = new ViewManager( this, mExtensionBarSplitter );
1819 mDetails = new ViewContainer( mMiniSplitter ); 1820 mDetails = new ViewContainer( mMiniSplitter );
1820 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1821 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1821#else 1822#else
1822 if ( QApplication::desktop()->width() > 480 ) { 1823 if ( QApplication::desktop()->width() > 480 ) {
1823 topLayout = new QHBoxLayout( this ); 1824 topLayout = new QHBoxLayout( this );
1824 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1825 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1825 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1826 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1826 } else { 1827 } else {
1827 1828
1828 topLayout = new QHBoxLayout( this ); 1829 topLayout = new QHBoxLayout( this );
1829 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); 1830 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
1830 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1831 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1831 } 1832 }
1832 1833
1833 topLayout->addWidget(mMiniSplitter ); 1834 topLayout->addWidget(mMiniSplitter );
1834 mViewManager = new ViewManager( this, mMiniSplitter ); 1835 mViewManager = new ViewManager( this, mMiniSplitter );
1835 mDetails = new ViewContainer( mMiniSplitter ); 1836 mDetails = new ViewContainer( mMiniSplitter );
1836 1837
1837 1838
1838 mExtensionManager = new ExtensionManager( this, mMiniSplitter ); 1839 mExtensionManager = new ExtensionManager( this, mMiniSplitter );
1839#endif 1840#endif
1840 //eh->hide(); 1841 //eh->hide();
1841 // topLayout->addWidget(mExtensionManager ); 1842 // topLayout->addWidget(mExtensionManager );
1842 1843
1843 1844
1844/*US 1845/*US
1845#ifndef KAB_NOSPLITTER 1846#ifndef KAB_NOSPLITTER
1846 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1847 QHBoxLayout *topLayout = new QHBoxLayout( this );
1847//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1848//US topLayout->setSpacing( KDialogBase::spacingHint() );
1848 topLayout->setSpacing( 10 ); 1849 topLayout->setSpacing( 10 );
1849 1850
1850 mDetailsSplitter = new QSplitter( this ); 1851 mDetailsSplitter = new QSplitter( this );
1851 1852
1852 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1853 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1853 1854
1854 mViewManager = new ViewManager( this, viewSpace ); 1855 mViewManager = new ViewManager( this, viewSpace );
1855 viewSpace->setStretchFactor( mViewManager, 1 ); 1856 viewSpace->setStretchFactor( mViewManager, 1 );
1856 1857
1857 mDetails = new ViewContainer( mDetailsSplitter ); 1858 mDetails = new ViewContainer( mDetailsSplitter );
1858 1859
1859 topLayout->addWidget( mDetailsSplitter ); 1860 topLayout->addWidget( mDetailsSplitter );
1860 topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1861 topLayout->setStretchFactor( mDetailsSplitter, 100 );
1861#else //KAB_NOSPLITTER 1862#else //KAB_NOSPLITTER
1862 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1863 QHBoxLayout *topLayout = new QHBoxLayout( this );
1863//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1864//US topLayout->setSpacing( KDialogBase::spacingHint() );
1864 topLayout->setSpacing( 10 ); 1865 topLayout->setSpacing( 10 );
1865 1866
1866// mDetailsSplitter = new QSplitter( this ); 1867// mDetailsSplitter = new QSplitter( this );
1867 1868
1868 QVBox *viewSpace = new QVBox( this ); 1869 QVBox *viewSpace = new QVBox( this );
1869 1870
1870 mViewManager = new ViewManager( this, viewSpace ); 1871 mViewManager = new ViewManager( this, viewSpace );
1871 viewSpace->setStretchFactor( mViewManager, 1 ); 1872 viewSpace->setStretchFactor( mViewManager, 1 );
1872 1873
1873 mDetails = new ViewContainer( this ); 1874 mDetails = new ViewContainer( this );
1874 1875
1875 topLayout->addWidget( viewSpace ); 1876 topLayout->addWidget( viewSpace );
1876// topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1877// topLayout->setStretchFactor( mDetailsSplitter, 100 );
1877 topLayout->addWidget( mDetails ); 1878 topLayout->addWidget( mDetails );
1878#endif //KAB_NOSPLITTER 1879#endif //KAB_NOSPLITTER
1879*/ 1880*/
1880 1881
1881 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); 1882 syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
1882 syncManager->setBlockSave(false); 1883 syncManager->setBlockSave(false);
1883 1884
1884 connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 1885 connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
1885 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 1886 connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
1886 QString sync_file = sentSyncFile(); 1887 QString sync_file = sentSyncFile();
1887 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1()); 1888 //qDebug("KABCore::initGUI()::setting tmp sync file to:%s ",sync_file.latin1());
1888 syncManager->setDefaultFileName( sync_file ); 1889 syncManager->setDefaultFileName( sync_file );
1889 //connect(syncManager , SIGNAL( ), this, SLOT( ) ); 1890 //connect(syncManager , SIGNAL( ), this, SLOT( ) );
1890 1891
1891#endif //KAB_EMBEDDED 1892#endif //KAB_EMBEDDED
1892 initActions(); 1893 initActions();
1893 1894
1894#ifdef KAB_EMBEDDED 1895#ifdef KAB_EMBEDDED
1895 addActionsManually(); 1896 addActionsManually();
1896 //US make sure the export and import menues are initialized before creating the xxPortManager. 1897 //US make sure the export and import menues are initialized before creating the xxPortManager.
1897 mXXPortManager = new XXPortManager( this, this ); 1898 mXXPortManager = new XXPortManager( this, this );
1898 1899
1899 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); 1900 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() );
1900 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); 1901 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget);
1901 // mActionQuit->plug ( mMainWindow->toolBar()); 1902 // mActionQuit->plug ( mMainWindow->toolBar());
1902 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); 1903 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() );
1903 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); 1904 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget);
1904 // mIncSearchWidget->hide(); 1905 // mIncSearchWidget->hide();
1905 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1906 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1906 SLOT( incrementalSearch( const QString& ) ) ); 1907 SLOT( incrementalSearch( const QString& ) ) );
1907 connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) ); 1908 connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) );
1908 connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) ); 1909 connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) );
1909 1910
1910 mJumpButtonBar = new JumpButtonBar( this, this ); 1911 mJumpButtonBar = new JumpButtonBar( this, this );
1911 1912
1912 topLayout->addWidget( mJumpButtonBar ); 1913 topLayout->addWidget( mJumpButtonBar );
1913//US topLayout->setStretchFactor( mJumpButtonBar, 10 ); 1914//US topLayout->setStretchFactor( mJumpButtonBar, 10 );
1914 1915
1915// mMainWindow->getIconToolBar()->raise(); 1916// mMainWindow->getIconToolBar()->raise();
1916 1917
1917#endif //KAB_EMBEDDED 1918#endif //KAB_EMBEDDED
1918 1919
1919} 1920}
1920void KABCore::initActions() 1921void KABCore::initActions()
1921{ 1922{
1922//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 1923//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
1923 1924
1924#ifndef KAB_EMBEDDED 1925#ifndef KAB_EMBEDDED
1925 connect( QApplication::clipboard(), SIGNAL( dataChanged() ), 1926 connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
1926 SLOT( clipboardDataChanged() ) ); 1927 SLOT( clipboardDataChanged() ) );
1927#endif //KAB_EMBEDDED 1928#endif //KAB_EMBEDDED
1928 1929
1929 // file menu 1930 // file menu
1930 1931
1931 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); 1932 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() );
1932 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); 1933 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() );
1933 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager, 1934 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager,
1934 SLOT( printView() ), actionCollection(), "kaddressbook_print" ); 1935 SLOT( printView() ), actionCollection(), "kaddressbook_print" );
1935 1936
1936 1937
1937 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails, 1938 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails,
1938 SLOT( printView() ), actionCollection(), "kaddressbook_print2" ); 1939 SLOT( printView() ), actionCollection(), "kaddressbook_print2" );
1939 1940
1940 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, 1941 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this,
1941 SLOT( save() ), actionCollection(), "file_sync" ); 1942 SLOT( save() ), actionCollection(), "file_sync" );
1942 1943
1943 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, 1944 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this,
1944 SLOT( newContact() ), actionCollection(), "file_new_contact" ); 1945 SLOT( newContact() ), actionCollection(), "file_new_contact" );
1945 1946
1946 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, 1947 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0,
1947 this, SLOT( mailVCard() ), 1948 this, SLOT( mailVCard() ),
1948 actionCollection(), "file_mail_vcard"); 1949 actionCollection(), "file_mail_vcard");
1949 1950
1950 mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this, 1951 mActionExport2phone = new KAction( i18n( "Export to phone" ), "ex2phone", 0, this,
1951 SLOT( export2phone() ), actionCollection(), 1952 SLOT( export2phone() ), actionCollection(),
1952 "kaddressbook_ex2phone" ); 1953 "kaddressbook_ex2phone" );
1953 1954
1954 mActionBeamVCard = 0; 1955 mActionBeamVCard = 0;
1955 mActionBeam = 0; 1956 mActionBeam = 0;
1956 1957
1957#ifndef DESKTOP_VERSION 1958#ifndef DESKTOP_VERSION
1958 if ( Ir::supported() ) { 1959 if ( Ir::supported() ) {
1959 mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this, 1960 mActionBeamVCard = new KAction( i18n( "Beam v&Card(s)..." ), "beam", 0, this,
1960 SLOT( beamVCard() ), actionCollection(), 1961 SLOT( beamVCard() ), actionCollection(),
1961 "kaddressbook_beam_vcard" ); 1962 "kaddressbook_beam_vcard" );
1962 1963
1963 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, 1964 mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this,
1964 SLOT( beamMySelf() ), actionCollection(), 1965 SLOT( beamMySelf() ), actionCollection(),
1965 "kaddressbook_beam_myself" ); 1966 "kaddressbook_beam_myself" );
1966 } 1967 }
1967#endif 1968#endif
1968 1969
1969 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, 1970 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0,
1970 this, SLOT( editContact2() ), 1971 this, SLOT( editContact2() ),
1971 actionCollection(), "file_properties" ); 1972 actionCollection(), "file_properties" );
1972 1973
1973#ifdef KAB_EMBEDDED 1974#ifdef KAB_EMBEDDED
1974 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); 1975 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() );
1975 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, 1976 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0,
1976 mMainWindow, SLOT( exit() ), 1977 mMainWindow, SLOT( exit() ),
1977 actionCollection(), "quit" ); 1978 actionCollection(), "quit" );
1978#endif //KAB_EMBEDDED 1979#endif //KAB_EMBEDDED
1979 1980
1980 // edit menu 1981 // edit menu
1981 if ( mIsPart ) { 1982 if ( mIsPart ) {
1982 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, 1983 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this,
1983 SLOT( copyContacts() ), actionCollection(), 1984 SLOT( copyContacts() ), actionCollection(),
1984 "kaddressbook_copy" ); 1985 "kaddressbook_copy" );
1985 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, 1986 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this,
1986 SLOT( cutContacts() ), actionCollection(), 1987 SLOT( cutContacts() ), actionCollection(),
1987 "kaddressbook_cut" ); 1988 "kaddressbook_cut" );
1988 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, 1989 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this,
1989 SLOT( pasteContacts() ), actionCollection(), 1990 SLOT( pasteContacts() ), actionCollection(),
1990 "kaddressbook_paste" ); 1991 "kaddressbook_paste" );
1991 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, 1992 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this,
1992 SLOT( selectAllContacts() ), actionCollection(), 1993 SLOT( selectAllContacts() ), actionCollection(),
1993 "kaddressbook_select_all" ); 1994 "kaddressbook_select_all" );
1994 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, 1995 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this,
1995 SLOT( undo() ), actionCollection(), 1996 SLOT( undo() ), actionCollection(),
1996 "kaddressbook_undo" ); 1997 "kaddressbook_undo" );
1997 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, 1998 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z,
1998 this, SLOT( redo() ), actionCollection(), 1999 this, SLOT( redo() ), actionCollection(),
1999 "kaddressbook_redo" ); 2000 "kaddressbook_redo" );
2000 } else { 2001 } else {
2001 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); 2002 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() );
2002 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); 2003 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() );
2003 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); 2004 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() );
2004 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); 2005 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() );
2005 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); 2006 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() );
2006 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); 2007 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() );
2007 } 2008 }
2008 2009
2009 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", 2010 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
2010 Key_Delete, this, SLOT( deleteContacts() ), 2011 Key_Delete, this, SLOT( deleteContacts() ),
2011 actionCollection(), "edit_delete" ); 2012 actionCollection(), "edit_delete" );
2012 2013
2013 mActionUndo->setEnabled( false ); 2014 mActionUndo->setEnabled( false );
2014 mActionRedo->setEnabled( false ); 2015 mActionRedo->setEnabled( false );
2015 2016
2016 // settings menu 2017 // settings menu
2017#ifdef KAB_EMBEDDED 2018#ifdef KAB_EMBEDDED
2018//US special menuentry to configure the addressbook resources. On KDE 2019//US special menuentry to configure the addressbook resources. On KDE
2019// you do that through the control center !!! 2020// you do that through the control center !!!
2020 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, 2021 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this,
2021 SLOT( configureResources() ), actionCollection(), 2022 SLOT( configureResources() ), actionCollection(),
2022 "kaddressbook_configure_resources" ); 2023 "kaddressbook_configure_resources" );
2023#endif //KAB_EMBEDDED 2024#endif //KAB_EMBEDDED
2024 2025
2025 if ( mIsPart ) { 2026 if ( mIsPart ) {
2026 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, 2027 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this,
2027 SLOT( openConfigDialog() ), actionCollection(), 2028 SLOT( openConfigDialog() ), actionCollection(),
2028 "kaddressbook_configure" ); 2029 "kaddressbook_configure" );
2029 2030
2030 //US not implemented yet 2031 //US not implemented yet
2031 //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, 2032 //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0,
2032 // this, SLOT( configureKeyBindings() ), actionCollection(), 2033 // this, SLOT( configureKeyBindings() ), actionCollection(),
2033 // "kaddressbook_configure_shortcuts" ); 2034 // "kaddressbook_configure_shortcuts" );
2034#ifdef KAB_EMBEDDED 2035#ifdef KAB_EMBEDDED
2035 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); 2036 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() );
2036 mActionConfigureToolbars->setEnabled( false ); 2037 mActionConfigureToolbars->setEnabled( false );
2037#endif //KAB_EMBEDDED 2038#endif //KAB_EMBEDDED
2038 2039
2039 } else { 2040 } else {
2040 mActionConfigKAddressbook = new KAction( i18n( "&Configure KA/Pi..." ), "configure", 0, this, 2041 mActionConfigKAddressbook = new KAction( i18n( "&Configure KA/Pi..." ), "configure", 0, this,
2041 SLOT( openConfigDialog() ), actionCollection(), 2042 SLOT( openConfigDialog() ), actionCollection(),
2042 "kaddressbook_configure" ); 2043 "kaddressbook_configure" );
2043 mActionConfigGlobal = new KAction( i18n( "Global Settings..." ), "configure", 0, this, 2044 mActionConfigGlobal = new KAction( i18n( "Global Settings..." ), "configure", 0, this,
2044 SLOT( openConfigGlobalDialog() ), actionCollection(), 2045 SLOT( openConfigGlobalDialog() ), actionCollection(),
2045 "kaddressbook_configure" ); 2046 "kaddressbook_configure" );
2046 } 2047 }
2047 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, 2048 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0,
2048 actionCollection(), "options_show_jump_bar" ); 2049 actionCollection(), "options_show_jump_bar" );
2049 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) ); 2050 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBar( bool ) ) );
2050 2051
2051 mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0, 2052 mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0,
2052 actionCollection(), "options_show_details" ); 2053 actionCollection(), "options_show_details" );
2053 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); 2054 connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) );
2054 2055
2055 2056
2056 mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this, 2057 mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this,
2057 SLOT( toggleBeamReceive() ), actionCollection(), 2058 SLOT( toggleBeamReceive() ), actionCollection(),
2058 "kaddressbook_beam_rec" ); 2059 "kaddressbook_beam_rec" );
2059 2060
2060 2061
2061 // misc 2062 // misc
2062 // only enable LDAP lookup if we can handle the protocol 2063 // only enable LDAP lookup if we can handle the protocol
2063#ifndef KAB_EMBEDDED 2064#ifndef KAB_EMBEDDED
2064 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { 2065 if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) {
2065 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, 2066 new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0,
2066 this, SLOT( openLDAPDialog() ), actionCollection(), 2067 this, SLOT( openLDAPDialog() ), actionCollection(),
2067 "ldap_lookup" ); 2068 "ldap_lookup" );
2068 } 2069 }
2069#else //KAB_EMBEDDED 2070#else //KAB_EMBEDDED
2070 //qDebug("KABCore::initActions() LDAP has to be implemented"); 2071 //qDebug("KABCore::initActions() LDAP has to be implemented");
2071#endif //KAB_EMBEDDED 2072#endif //KAB_EMBEDDED
2072 2073
2073 2074
2074 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, 2075 mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this,
2075 SLOT( setWhoAmI() ), actionCollection(), 2076 SLOT( setWhoAmI() ), actionCollection(),
2076 "set_personal" ); 2077 "set_personal" );
2077 2078
2078 2079
2079 mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this, 2080 mActionCategories = new KAction( i18n( "Set Categories for Contacts..." ), 0, this,
2080 SLOT( setCategories() ), actionCollection(), 2081 SLOT( setCategories() ), actionCollection(),
2081 "edit_set_categories" ); 2082 "edit_set_categories" );
2082 mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this, 2083 mActionEditCategories = new KAction( i18n( "Edit Category List..." ), 0, this,
2083 SLOT( editCategories() ), actionCollection(), 2084 SLOT( editCategories() ), actionCollection(),
2084 "edit__categories" ); 2085 "edit__categories" );
2085 2086
2086 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, 2087 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this,
2087 SLOT( removeVoice() ), actionCollection(), 2088 SLOT( removeVoice() ), actionCollection(),
2088 "remove_voice" ); 2089 "remove_voice" );
2089 mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this, 2090 mActionSetFormattedName = new KAction( i18n( "Set formatted name..." ), 0, this,
2090 SLOT( setFormattedName() ), actionCollection(), 2091 SLOT( setFormattedName() ), actionCollection(),
2091 "set_formatted" ); 2092 "set_formatted" );
2092 2093
2093 mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, 2094 mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this,
2094 SLOT( manageCategories() ), actionCollection(), 2095 SLOT( manageCategories() ), actionCollection(),
2095 "remove_voice" ); 2096 "remove_voice" );
2096 2097
2097 2098
2098 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, 2099 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this,
2099 SLOT( importFromOL() ), actionCollection(), 2100 SLOT( importFromOL() ), actionCollection(),
2100 "import_OL" ); 2101 "import_OL" );
2101#ifdef KAB_EMBEDDED 2102#ifdef KAB_EMBEDDED
2102 mActionLicence = new KAction( i18n( "Licence" ), 0, 2103 mActionLicence = new KAction( i18n( "Licence" ), 0,
2103 this, SLOT( showLicence() ), actionCollection(), 2104 this, SLOT( showLicence() ), actionCollection(),
2104 "licence_about_data" ); 2105 "licence_about_data" );
2105 mActionFaq = new KAction( i18n( "Faq" ), 0, 2106 mActionFaq = new KAction( i18n( "Faq" ), 0,
2106 this, SLOT( faq() ), actionCollection(), 2107 this, SLOT( faq() ), actionCollection(),
2107 "faq_about_data" ); 2108 "faq_about_data" );
2108 mActionWN = new KAction( i18n( "What's New?" ), 0, 2109 mActionWN = new KAction( i18n( "What's New?" ), 0,
2109 this, SLOT( whatsnew() ), actionCollection(), 2110 this, SLOT( whatsnew() ), actionCollection(),
2110 "wn" ); 2111 "wn" );
2111 2112
2112 2113
2113 2114
2114 mActionStorageHowto = new KAction( i18n( "Storage HowTo" ), 0, 2115 mActionStorageHowto = new KAction( i18n( "Storage HowTo" ), 0,
2115 this, SLOT( storagehowto() ), actionCollection(), 2116 this, SLOT( storagehowto() ), actionCollection(),
2116 "storage" ); 2117 "storage" );
2117 2118
2118 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, 2119 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0,
2119 this, SLOT( synchowto() ), actionCollection(), 2120 this, SLOT( synchowto() ), actionCollection(),
2120 "sync" ); 2121 "sync" );
2121 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, 2122 mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0,
2122 this, SLOT( kdesynchowto() ), actionCollection(), 2123 this, SLOT( kdesynchowto() ), actionCollection(),
2123 "kdesync" ); 2124 "kdesync" );
2124 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, 2125 mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0,
2125 this, SLOT( multisynchowto() ), actionCollection(), 2126 this, SLOT( multisynchowto() ), actionCollection(),
2126 "multisync" ); 2127 "multisync" );
2127 2128
2128 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, 2129 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
2129 this, SLOT( createAboutData() ), actionCollection(), 2130 this, SLOT( createAboutData() ), actionCollection(),
2130 "kaddressbook_about_data" ); 2131 "kaddressbook_about_data" );
2131#endif //KAB_EMBEDDED 2132#endif //KAB_EMBEDDED
2132 2133
2133 clipboardDataChanged(); 2134 clipboardDataChanged();
2134 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2135 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2135 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 2136 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
2136} 2137}
2137 2138
2138//US we need this function, to plug all actions into the correct menues. 2139//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. 2140// KDE uses a XML format to plug the actions, but we work her without this overhead.
2140void KABCore::addActionsManually() 2141void KABCore::addActionsManually()
2141{ 2142{
2142//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 2143//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
2143 2144
2144#ifdef KAB_EMBEDDED 2145#ifdef KAB_EMBEDDED
2145 QPopupMenu *fileMenu = new QPopupMenu( this ); 2146 QPopupMenu *fileMenu = new QPopupMenu( this );
2146 QPopupMenu *editMenu = new QPopupMenu( this ); 2147 QPopupMenu *editMenu = new QPopupMenu( this );
2147 QPopupMenu *helpMenu = new QPopupMenu( this ); 2148 QPopupMenu *helpMenu = new QPopupMenu( this );
2148 2149
2149 KToolBar* tb = mMainWindow->toolBar(); 2150 KToolBar* tb = mMainWindow->toolBar();
2150 mMainWindow->setToolBarsMovable (false ); 2151 mMainWindow->setToolBarsMovable (false );
2151#ifndef DESKTOP_VERSION 2152#ifndef DESKTOP_VERSION
2152 if ( KABPrefs::instance()->mFullMenuBarVisible ) { 2153 if ( KABPrefs::instance()->mFullMenuBarVisible ) {
2153#endif 2154#endif
2154 QMenuBar* mb = mMainWindow->menuBar(); 2155 QMenuBar* mb = mMainWindow->menuBar();
2155 2156
2156 //US setup menubar. 2157 //US setup menubar.
2157 //Disable the following block if you do not want to have a menubar. 2158 //Disable the following block if you do not want to have a menubar.
2158 mb->insertItem( i18n("&File"), fileMenu ); 2159 mb->insertItem( i18n("&File"), fileMenu );
2159 mb->insertItem( i18n("&Edit"), editMenu ); 2160 mb->insertItem( i18n("&Edit"), editMenu );
2160 mb->insertItem( i18n("&View"), viewMenu ); 2161 mb->insertItem( i18n("&View"), viewMenu );
2161 mb->insertItem( i18n("&Settings"), settingsMenu ); 2162 mb->insertItem( i18n("&Settings"), settingsMenu );
2162#ifdef DESKTOP_VERSION 2163#ifdef DESKTOP_VERSION
2163 mb->insertItem( i18n("Synchronize"), syncMenu ); 2164 mb->insertItem( i18n("Synchronize"), syncMenu );
2164#else 2165#else
2165 mb->insertItem( i18n("Sync"), syncMenu ); 2166 mb->insertItem( i18n("Sync"), syncMenu );
2166#endif 2167#endif
2167 //mb->insertItem( i18n("&Change"), changeMenu ); 2168 //mb->insertItem( i18n("&Change"), changeMenu );
2168 mb->insertItem( i18n("&Help"), helpMenu ); 2169 mb->insertItem( i18n("&Help"), helpMenu );
2169 mIncSearchWidget = new IncSearchWidget( tb ); 2170 mIncSearchWidget = new IncSearchWidget( tb );
2170 // tb->insertWidget(-1, 0, mIncSearchWidget); 2171 // tb->insertWidget(-1, 0, mIncSearchWidget);
2171#ifndef DESKTOP_VERSION 2172#ifndef DESKTOP_VERSION
2172 } else { 2173 } else {
2173 //US setup toolbar 2174 //US setup toolbar
2174 QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); 2175 QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
2175 QPopupMenu *popupBarTB = new QPopupMenu( this ); 2176 QPopupMenu *popupBarTB = new QPopupMenu( this );
2176 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); 2177 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB);
2177 tb->insertWidget(-1, 0, menuBarTB); 2178 tb->insertWidget(-1, 0, menuBarTB);
2178 mIncSearchWidget = new IncSearchWidget( tb ); 2179 mIncSearchWidget = new IncSearchWidget( tb );
2179 tb->enableMoving(false); 2180 tb->enableMoving(false);
2180 popupBarTB->insertItem( i18n("&File"), fileMenu ); 2181 popupBarTB->insertItem( i18n("&File"), fileMenu );
2181 popupBarTB->insertItem( i18n("&Edit"), editMenu ); 2182 popupBarTB->insertItem( i18n("&Edit"), editMenu );
2182 popupBarTB->insertItem( i18n("&View"), viewMenu ); 2183 popupBarTB->insertItem( i18n("&View"), viewMenu );
2183 popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); 2184 popupBarTB->insertItem( i18n("&Settings"), settingsMenu );
2184 popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); 2185 popupBarTB->insertItem( i18n("Synchronize"), syncMenu );
2185 mViewManager->getFilterAction()->plug ( popupBarTB); 2186 mViewManager->getFilterAction()->plug ( popupBarTB);
2186 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); 2187 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu );
2187 popupBarTB->insertItem( i18n("&Help"), helpMenu ); 2188 popupBarTB->insertItem( i18n("&Help"), helpMenu );
2188 if (QApplication::desktop()->width() > 320 ) { 2189 if (QApplication::desktop()->width() > 320 ) {
2189 // mViewManager->getFilterAction()->plug ( tb); 2190 // mViewManager->getFilterAction()->plug ( tb);
2190 } 2191 }
2191 } 2192 }
2192#endif 2193#endif
2193 mIncSearchWidget->setSize(); 2194 mIncSearchWidget->setSize();
2194 // mActionQuit->plug ( mMainWindow->toolBar()); 2195 // mActionQuit->plug ( mMainWindow->toolBar());
2195 2196
2196 2197
2197 2198
2198 //US Now connect the actions with the menue entries. 2199 //US Now connect the actions with the menue entries.
2199#ifdef DESKTOP_VERSION 2200#ifdef DESKTOP_VERSION
2200 mActionPrint->plug( fileMenu ); 2201 mActionPrint->plug( fileMenu );
2201 mActionPrintDetails->plug( fileMenu ); 2202 mActionPrintDetails->plug( fileMenu );
2202 fileMenu->insertSeparator(); 2203 fileMenu->insertSeparator();
2203#endif 2204#endif
2204 mActionMail->plug( fileMenu ); 2205 mActionMail->plug( fileMenu );
2205 fileMenu->insertSeparator(); 2206 fileMenu->insertSeparator();
2206 2207
2207 mActionNewContact->plug( editMenu ); 2208 mActionNewContact->plug( editMenu );
2208 mActionNewContact->plug( tb ); 2209 mActionNewContact->plug( tb );
2209 2210
2210 mActionEditAddressee->plug( editMenu ); 2211 mActionEditAddressee->plug( editMenu );
2211 editMenu->insertSeparator(); 2212 editMenu->insertSeparator();
2212 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || 2213 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) ||
2213 // (!KABPrefs::instance()->mMultipleViewsAtOnce )) 2214 // (!KABPrefs::instance()->mMultipleViewsAtOnce ))
2214 mActionEditAddressee->plug( tb ); 2215 mActionEditAddressee->plug( tb );
2215 2216
2216 // fileMenu->insertSeparator(); 2217 // fileMenu->insertSeparator();
2217 mActionSave->plug( fileMenu ); 2218 mActionSave->plug( fileMenu );
2218 fileMenu->insertItem( "&Import", ImportMenu ); 2219 fileMenu->insertItem( "&Import", ImportMenu );
2219 fileMenu->insertItem( "&Export", ExportMenu ); 2220 fileMenu->insertItem( "&Export", ExportMenu );
2220 editMenu->insertItem( i18n("&Change"), changeMenu ); 2221 editMenu->insertItem( i18n("&Change"), changeMenu );
2221 editMenu->insertSeparator(); 2222 editMenu->insertSeparator();
2222#ifndef DESKTOP_VERSION 2223#ifndef DESKTOP_VERSION
2223 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu ); 2224 if ( Ir::supported() ) fileMenu->insertItem( i18n("&Beam"), beamMenu );
2224#endif 2225#endif
2225#if 0 2226#if 0
2226 // PENDING fix MailVCard 2227 // PENDING fix MailVCard
2227 fileMenu->insertSeparator(); 2228 fileMenu->insertSeparator();
2228 mActionMailVCard->plug( fileMenu ); 2229 mActionMailVCard->plug( fileMenu );
2229#endif 2230#endif
2230#ifndef DESKTOP_VERSION 2231#ifndef DESKTOP_VERSION
2231 if ( Ir::supported() ) mActionBR->plug( beamMenu ); 2232 if ( Ir::supported() ) mActionBR->plug( beamMenu );
2232 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu ); 2233 if ( Ir::supported() ) mActionBeamVCard->plug( beamMenu );
2233 if ( Ir::supported() ) mActionBeam->plug( beamMenu ); 2234 if ( Ir::supported() ) mActionBeam->plug( beamMenu );
2234#endif 2235#endif
2235 fileMenu->insertSeparator(); 2236 fileMenu->insertSeparator();
2236 mActionQuit->plug( fileMenu ); 2237 mActionQuit->plug( fileMenu );
2237#ifdef _OL_IMPORT_ 2238#ifdef _OL_IMPORT_
2238 mActionImportOL->plug( ImportMenu ); 2239 mActionImportOL->plug( ImportMenu );
2239#endif 2240#endif
2240 // edit menu 2241 // edit menu
2241 mActionUndo->plug( editMenu ); 2242 mActionUndo->plug( editMenu );
2242 mActionRedo->plug( editMenu ); 2243 mActionRedo->plug( editMenu );
2243 editMenu->insertSeparator(); 2244 editMenu->insertSeparator();
2244 mActionCut->plug( editMenu ); 2245 mActionCut->plug( editMenu );
2245 mActionCopy->plug( editMenu ); 2246 mActionCopy->plug( editMenu );
2246 mActionPaste->plug( editMenu ); 2247 mActionPaste->plug( editMenu );
2247 mActionDelete->plug( editMenu ); 2248 mActionDelete->plug( editMenu );
2248 editMenu->insertSeparator(); 2249 editMenu->insertSeparator();
2249 mActionSelectAll->plug( editMenu ); 2250 mActionSelectAll->plug( editMenu );
2250 2251
2251 mActionSetFormattedName->plug( changeMenu ); 2252 mActionSetFormattedName->plug( changeMenu );
2252 mActionRemoveVoice->plug( changeMenu ); 2253 mActionRemoveVoice->plug( changeMenu );
2253 // settingsmings menu 2254 // settingsmings menu
2254//US special menuentry to configure the addressbook resources. On KDE 2255//US special menuentry to configure the addressbook resources. On KDE
2255// you do that through the control center !!! 2256// you do that through the control center !!!
2256 // settingsMenu->insertSeparator(); 2257 // settingsMenu->insertSeparator();
2257 2258
2258 mActionConfigKAddressbook->plug( settingsMenu, 0 ); 2259 mActionConfigKAddressbook->plug( settingsMenu, 0 );
2259 mActionConfigGlobal->plug( settingsMenu, 1 ); 2260 mActionConfigGlobal->plug( settingsMenu, 1 );
2260 mActionConfigResources->plug( settingsMenu,2 ); 2261 mActionConfigResources->plug( settingsMenu,2 );
2261 settingsMenu->insertSeparator(3); 2262 settingsMenu->insertSeparator(3);
2262 2263
2263 if ( mIsPart ) { 2264 if ( mIsPart ) {
2264 //US not implemented yet 2265 //US not implemented yet
2265 //mActionConfigShortcuts->plug( settingsMenu ); 2266 //mActionConfigShortcuts->plug( settingsMenu );
2266 //mActionConfigureToolbars->plug( settingsMenu ); 2267 //mActionConfigureToolbars->plug( settingsMenu );
2267 2268
2268 } else { 2269 } else {
2269 //US not implemented yet 2270 //US not implemented yet
2270 //mActionKeyBindings->plug( settingsMenu ); 2271 //mActionKeyBindings->plug( settingsMenu );
2271 } 2272 }
2272 2273
2273 mActionEditCategories->plug( settingsMenu ); 2274 mActionEditCategories->plug( settingsMenu );
2274 mActionManageCategories->plug( settingsMenu ); 2275 mActionManageCategories->plug( settingsMenu );
2275 mActionJumpBar->plug( viewMenu,0 ); 2276 mActionJumpBar->plug( viewMenu,0 );
2276 mActionDetails->plug( viewMenu,0 ); 2277 mActionDetails->plug( viewMenu,0 );
2277 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) 2278 //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
2278 mActionDetails->plug( tb ); 2279 mActionDetails->plug( tb );
2279 settingsMenu->insertSeparator(); 2280 settingsMenu->insertSeparator();
2280#ifndef DESKTOP_VERSION 2281#ifndef DESKTOP_VERSION
2281 if ( Ir::supported() ) mActionBR->plug(settingsMenu ); 2282 if ( Ir::supported() ) mActionBR->plug(settingsMenu );
2282 settingsMenu->insertSeparator(); 2283 settingsMenu->insertSeparator();
2283#endif 2284#endif
2284 2285
2285 mActionWhoAmI->plug( settingsMenu ); 2286 mActionWhoAmI->plug( settingsMenu );
2286 //mActionEditCategories->plug( changeMenu ); 2287 //mActionEditCategories->plug( changeMenu );
2287 mActionCategories->plug( changeMenu ); 2288 mActionCategories->plug( changeMenu );
2288 //mActionManageCategories->plug( changeMenu ); 2289 //mActionManageCategories->plug( changeMenu );
2289 2290
2290 //mActionCategories->plug( settingsMenu ); 2291 //mActionCategories->plug( settingsMenu );
2291 2292
2292 2293
2293 mActionWN->plug( helpMenu ); 2294 mActionWN->plug( helpMenu );
2294 mActionStorageHowto->plug( helpMenu ); 2295 mActionStorageHowto->plug( helpMenu );
2295 mActionSyncHowto->plug( helpMenu ); 2296 mActionSyncHowto->plug( helpMenu );
2296 mActionKdeSyncHowto->plug( helpMenu ); 2297 mActionKdeSyncHowto->plug( helpMenu );
2297 mActionMultiSyncHowto->plug( helpMenu ); 2298 mActionMultiSyncHowto->plug( helpMenu );
2298 mActionFaq->plug( helpMenu ); 2299 mActionFaq->plug( helpMenu );
2299 mActionLicence->plug( helpMenu ); 2300 mActionLicence->plug( helpMenu );
2300 mActionAboutKAddressbook->plug( helpMenu ); 2301 mActionAboutKAddressbook->plug( helpMenu );
2301 2302
2302 if (KGlobal::getDesktopSize() > KGlobal::Small ) { 2303 if (KGlobal::getDesktopSize() > KGlobal::Small ) {
2303 2304
2304 mActionSave->plug( tb ); 2305 mActionSave->plug( tb );
2305 mViewManager->getFilterAction()->plug ( tb); 2306 mViewManager->getFilterAction()->plug ( tb);
2306 //LR hide filteraction on started in 480x640 2307 //LR hide filteraction on started in 480x640
2307 if (QApplication::desktop()->width() == 480 ) { 2308 if (QApplication::desktop()->width() == 480 ) {
2308 mViewManager->getFilterAction()->setComboWidth( 0 ); 2309 mViewManager->getFilterAction()->setComboWidth( 0 );
2309 } 2310 }
2310 mActionUndo->plug( tb ); 2311 mActionUndo->plug( tb );
2311 mActionDelete->plug( tb ); 2312 mActionDelete->plug( tb );
2312 mActionRedo->plug( tb ); 2313 mActionRedo->plug( tb );
2313 } else { 2314 } else {
2314 mActionSave->plug( tb ); 2315 mActionSave->plug( tb );
2315 tb->enableMoving(false); 2316 tb->enableMoving(false);
2316 } 2317 }
2317 //mActionQuit->plug ( tb ); 2318 //mActionQuit->plug ( tb );
2318 //tb->insertWidget(-1, 0, mIncSearchWidget, 6); 2319 //tb->insertWidget(-1, 0, mIncSearchWidget, 6);
2319 2320
2320 //US link the searchwidget first to this. 2321 //US link the searchwidget first to this.
2321 // The real linkage to the toolbar happens later. 2322 // The real linkage to the toolbar happens later.
2322//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); 2323//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
2323//US tb->insertItem( mIncSearchWidget ); 2324//US tb->insertItem( mIncSearchWidget );
2324/*US 2325/*US
2325 mIncSearchWidget = new IncSearchWidget( tb ); 2326 mIncSearchWidget = new IncSearchWidget( tb );
2326 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 2327 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
2327 SLOT( incrementalSearch( const QString& ) ) ); 2328 SLOT( incrementalSearch( const QString& ) ) );
2328 2329
2329 mJumpButtonBar = new JumpButtonBar( this, this ); 2330 mJumpButtonBar = new JumpButtonBar( this, this );
2330 2331
2331//US topLayout->addWidget( mJumpButtonBar ); 2332//US topLayout->addWidget( mJumpButtonBar );
2332 this->layout()->add( mJumpButtonBar ); 2333 this->layout()->add( mJumpButtonBar );
2333*/ 2334*/
2334 2335
2335#endif //KAB_EMBEDDED 2336#endif //KAB_EMBEDDED
2336 2337
2337 mActionExport2phone->plug( ExportMenu ); 2338 mActionExport2phone->plug( ExportMenu );
2338 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); 2339 connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) );
2339 syncManager->fillSyncMenu(); 2340 syncManager->fillSyncMenu();
2340 2341
2341} 2342}
2342void KABCore::showLicence() 2343void KABCore::showLicence()
2343{ 2344{
2344 KApplication::showLicence(); 2345 KApplication::showLicence();
2345} 2346}
2346 2347
2347void KABCore::manageCategories( ) 2348void KABCore::manageCategories( )
2348{ 2349{
2349 KABCatPrefs* cp = new KABCatPrefs(); 2350 KABCatPrefs* cp = new KABCatPrefs();
2350 cp->show(); 2351 cp->show();
2351 int w =cp->sizeHint().width() ; 2352 int w =cp->sizeHint().width() ;
2352 int h = cp->sizeHint().height() ; 2353 int h = cp->sizeHint().height() ;
2353 int dw = QApplication::desktop()->width(); 2354 int dw = QApplication::desktop()->width();
2354 int dh = QApplication::desktop()->height(); 2355 int dh = QApplication::desktop()->height();
2355 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2356 cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2356 if ( !cp->exec() ) { 2357 if ( !cp->exec() ) {
2357 delete cp; 2358 delete cp;
2358 return; 2359 return;
2359 } 2360 }
2360 int count = 0; 2361 int count = 0;
2361 int cc = 0; 2362 int cc = 0;
2362 message( i18n("Please wait, processing categories...")); 2363 message( i18n("Please wait, processing categories..."));
2363 if ( cp->addCat() ) { 2364 if ( cp->addCat() ) {
2364 KABC::AddressBook::Iterator it; 2365 KABC::AddressBook::Iterator it;
2365 QStringList catList = KABPrefs::instance()->mCustomCategories; 2366 QStringList catList = KABPrefs::instance()->mCustomCategories;
2366 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2367 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2367 ++cc; 2368 ++cc;
2368 if ( cc %10 == 0) 2369 if ( cc %10 == 0)
2369 message(i18n("Processing contact #%1").arg(cc)); 2370 message(i18n("Processing contact #%1").arg(cc));
2370 QStringList catIncList = (*it).categories(); 2371 QStringList catIncList = (*it).categories();
2371 int i; 2372 int i;
2372 for( i = 0; i< catIncList.count(); ++i ) { 2373 for( i = 0; i< catIncList.count(); ++i ) {
2373 if ( !catList.contains (catIncList[i])) { 2374 if ( !catList.contains (catIncList[i])) {
2374 catList.append( catIncList[i] ); 2375 catList.append( catIncList[i] );
2375 //qDebug("add cat %s ", catIncList[i].latin1()); 2376 //qDebug("add cat %s ", catIncList[i].latin1());
2376 ++count; 2377 ++count;
2377 } 2378 }
2378 } 2379 }
2379 } 2380 }
2380 catList.sort(); 2381 catList.sort();
2381 KABPrefs::instance()->mCustomCategories = catList; 2382 KABPrefs::instance()->mCustomCategories = catList;
2382 KABPrefs::instance()->writeConfig(); 2383 KABPrefs::instance()->writeConfig();
2383 message(QString::number( count )+ i18n(" categories added to list! ")); 2384 message(QString::number( count )+ i18n(" categories added to list! "));
2384 } else { 2385 } else {
2385 QStringList catList = KABPrefs::instance()->mCustomCategories; 2386 QStringList catList = KABPrefs::instance()->mCustomCategories;
2386 QStringList catIncList; 2387 QStringList catIncList;
2387 QStringList newCatList; 2388 QStringList newCatList;
2388 KABC::AddressBook::Iterator it; 2389 KABC::AddressBook::Iterator it;
2389 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2390 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2390 ++cc; 2391 ++cc;
2391 if ( cc %10 == 0) 2392 if ( cc %10 == 0)
2392 message(i18n("Processing contact #%1").arg(cc)); 2393 message(i18n("Processing contact #%1").arg(cc));
2393 QStringList catIncList = (*it).categories(); 2394 QStringList catIncList = (*it).categories();
2394 int i; 2395 int i;
2395 if ( catIncList.count() ) { 2396 if ( catIncList.count() ) {
2396 newCatList.clear(); 2397 newCatList.clear();
2397 for( i = 0; i< catIncList.count(); ++i ) { 2398 for( i = 0; i< catIncList.count(); ++i ) {
2398 if ( catList.contains (catIncList[i])) { 2399 if ( catList.contains (catIncList[i])) {
2399 newCatList.append( catIncList[i] ); 2400 newCatList.append( catIncList[i] );
2400 } 2401 }
2401 } 2402 }
2402 newCatList.sort(); 2403 newCatList.sort();
2403 (*it).setCategories( newCatList ); 2404 (*it).setCategories( newCatList );
2404 mAddressBook->insertAddressee( (*it) ); 2405 mAddressBook->insertAddressee( (*it) );
2405 } 2406 }
2406 } 2407 }
2407 setModified( true ); 2408 setModified( true );
2408 mViewManager->refreshView(); 2409 mViewManager->refreshView();
2409 message( i18n("Removing categories done!")); 2410 message( i18n("Removing categories done!"));
2410 } 2411 }
2411 delete cp; 2412 delete cp;
2412} 2413}
2413void KABCore::removeVoice() 2414void KABCore::removeVoice()
2414{ 2415{
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 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; 2417 return;
2417 XXPortSelectDialog dlg( this, false, this ); 2418 XXPortSelectDialog dlg( this, false, this );
2418 if ( !dlg.exec() ) 2419 if ( !dlg.exec() )
2419 return; 2420 return;
2420 mAddressBook->setUntagged(); 2421 mAddressBook->setUntagged();
2421 dlg.tagSelected(); 2422 dlg.tagSelected();
2422 message(i18n("Removing voice..."), false ); 2423 message(i18n("Removing voice..."), false );
2423 KABC::AddressBook::Iterator it; 2424 KABC::AddressBook::Iterator it;
2424 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2425 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2425 if ( (*it).tagged() ) { 2426 if ( (*it).tagged() ) {
2426 (*it).removeVoice(); 2427 (*it).removeVoice();
2427 } 2428 }
2428 } 2429 }
2429 message(i18n("Refreshing view...") ); 2430 message(i18n("Refreshing view...") );
2430 qApp->processEvents(); 2431 qApp->processEvents();
2431 mViewManager->refreshView( "" ); 2432 mViewManager->refreshView( "" );
2432 Addressee add; 2433 Addressee add;
2433 mDetails->setAddressee( add ); 2434 mDetails->setAddressee( add );
2434 message(i18n("Remove voice completed!") ); 2435 message(i18n("Remove voice completed!") );
2435 2436
2436 2437
2437 2438
2438} 2439}
2439 2440
2440void KABCore::setFormattedName() 2441void KABCore::setFormattedName()
2441{ 2442{
2442 KABFormatPrefs setpref; 2443 KABFormatPrefs setpref;
2443 if ( !setpref.exec() ) { 2444 if ( !setpref.exec() ) {
2444 return; 2445 return;
2445 } 2446 }
2446 XXPortSelectDialog dlg( this, false, this ); 2447 XXPortSelectDialog dlg( this, false, this );
2447 if ( !dlg.exec() ) 2448 if ( !dlg.exec() )
2448 return; 2449 return;
2449 mAddressBook->setUntagged(); 2450 mAddressBook->setUntagged();
2450 dlg.tagSelected(); 2451 dlg.tagSelected();
2451 int count = 0; 2452 int count = 0;
2452 KABC::AddressBook::Iterator it; 2453 KABC::AddressBook::Iterator it;
2453 bool modified = false; 2454 bool modified = false;
2454 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2455 for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2455 if ( (*it).tagged() ) { 2456 if ( (*it).tagged() ) {
2456 if ( (*it).uid().left( 2 ) == "la" ) 2457 if ( (*it).uid().left( 2 ) == "la" )
2457 if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) 2458 if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") )
2458 continue; 2459 continue;
2459 ++count; 2460 ++count;
2460 if ( count %10 == 0 ) 2461 if ( count %10 == 0 )
2461 message(i18n("Changing contact #%1").arg( count ) ); 2462 message(i18n("Changing contact #%1").arg( count ) );
2462 qApp->processEvents(); 2463 qApp->processEvents();
2463 QString fName; 2464 QString fName;
2464 if ( setpref.simple->isChecked() ) 2465 if ( setpref.simple->isChecked() )
2465 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName ); 2466 fName = NameEditDialog::formattedName( (*it), NameEditDialog::SimpleName );
2466 else if ( setpref.full->isChecked() ) 2467 else if ( setpref.full->isChecked() )
2467 fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName ); 2468 fName = NameEditDialog::formattedName( (*it), NameEditDialog::FullName );
2468 else if ( setpref.reverse->isChecked() ) 2469 else if ( setpref.reverse->isChecked() )
2469 fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName ); 2470 fName = NameEditDialog::formattedName( (*it), NameEditDialog::ReverseName );
2470 else 2471 else
2471 fName = (*it).organization(); 2472 fName = (*it).organization();
2472 if ( setpref.setCompany->isChecked() ) 2473 if ( setpref.setCompany->isChecked() )
2473 if ( fName.isEmpty() || fName =="," ) 2474 if ( fName.isEmpty() || fName =="," )
2474 fName = (*it).organization(); 2475 fName = (*it).organization();
2475 (*it).setFormattedName( fName ); 2476 (*it).setFormattedName( fName );
2476 (*it).setChanged( true ); 2477 (*it).setChanged( true );
2477 modified = true; 2478 modified = true;
2478 (*it).setRevision( QDateTime::currentDateTime() ); 2479 (*it).setRevision( QDateTime::currentDateTime() );
2479 } 2480 }
2480 } 2481 }
2481 message(i18n("Refreshing view...") ); 2482 message(i18n("Refreshing view...") );
2482 qApp->processEvents(); 2483 qApp->processEvents();
2483 if ( modified ) 2484 if ( modified )
2484 setModified( true ); 2485 setModified( true );
2485 Addressee add; 2486 Addressee add;
2486 mDetails->setAddressee( add ); 2487 mDetails->setAddressee( add );
2487 if ( count == 0 ) 2488 if ( count == 0 )
2488 message(i18n("No contact changed!") ); 2489 message(i18n("No contact changed!") );
2489 else 2490 else
2490 message(i18n("%1 contacts changed!").arg( count ) ); 2491 message(i18n("%1 contacts changed!").arg( count ) );
2491} 2492}
2492 2493
2493void KABCore::clipboardDataChanged() 2494void KABCore::clipboardDataChanged()
2494{ 2495{
2495 2496
2496 if ( mReadWrite ) 2497 if ( mReadWrite )
2497 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); 2498 mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() );
2498 2499
2499} 2500}
2500 2501
2501void KABCore::updateActionMenu() 2502void KABCore::updateActionMenu()
2502{ 2503{
2503 UndoStack *undo = UndoStack::instance(); 2504 UndoStack *undo = UndoStack::instance();
2504 RedoStack *redo = RedoStack::instance(); 2505 RedoStack *redo = RedoStack::instance();
2505 2506
2506 if ( undo->isEmpty() ) 2507 if ( undo->isEmpty() )
2507 mActionUndo->setText( i18n( "Undo" ) ); 2508 mActionUndo->setText( i18n( "Undo" ) );
2508 else 2509 else
2509 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) ); 2510 mActionUndo->setText( i18n( "Undo %1" ).arg( undo->top()->name() ) );
2510 2511
2511 mActionUndo->setEnabled( !undo->isEmpty() ); 2512 mActionUndo->setEnabled( !undo->isEmpty() );
2512 2513
2513 if ( !redo->top() ) 2514 if ( !redo->top() )
2514 mActionRedo->setText( i18n( "Redo" ) ); 2515 mActionRedo->setText( i18n( "Redo" ) );
2515 else 2516 else
2516 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) ); 2517 mActionRedo->setText( i18n( "Redo %1" ).arg( redo->top()->name() ) );
2517 2518
2518 mActionRedo->setEnabled( !redo->isEmpty() ); 2519 mActionRedo->setEnabled( !redo->isEmpty() );
2519} 2520}
2520 2521
2521void KABCore::configureKeyBindings() 2522void KABCore::configureKeyBindings()
2522{ 2523{
2523#ifndef KAB_EMBEDDED 2524#ifndef KAB_EMBEDDED
2524 KKeyDialog::configure( actionCollection(), true ); 2525 KKeyDialog::configure( actionCollection(), true );
2525#else //KAB_EMBEDDED 2526#else //KAB_EMBEDDED
2526 qDebug("KABCore::configureKeyBindings() not implemented"); 2527 qDebug("KABCore::configureKeyBindings() not implemented");
2527#endif //KAB_EMBEDDED 2528#endif //KAB_EMBEDDED
2528} 2529}
2529 2530
2530#ifdef KAB_EMBEDDED 2531#ifdef KAB_EMBEDDED
2531void KABCore::configureResources() 2532void KABCore::configureResources()
2532{ 2533{
2533 KRES::KCMKResources dlg( this, "" , 0 ); 2534 KRES::KCMKResources dlg( this, "" , 0 );
2534 2535
2535 if ( !dlg.exec() ) 2536 if ( !dlg.exec() )
2536 return; 2537 return;
2537 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") ); 2538 KMessageBox::information( this, i18n("Please restart to get the \nchanged resources (re)loaded!\n") );
2538} 2539}
2539#endif //KAB_EMBEDDED 2540#endif //KAB_EMBEDDED
2540 2541
2541 2542
2542/* this method will be called through the QCop interface from Ko/Pi to select addresses 2543/* this method will be called through the QCop interface from Ko/Pi to select addresses
2543 * for the attendees list of an event. 2544 * for the attendees list of an event.
2544 */ 2545 */
2545void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid) 2546void KABCore::requestForNameEmailUidList(const QString& sourceChannel, const QString& uid)
2546{ 2547{
2547 qDebug("KABCore::requestForNameEmailUidList "); 2548 qDebug("KABCore::requestForNameEmailUidList ");
2548 bool ok = false; 2549 bool ok = false;
2549 mEmailSourceChannel = sourceChannel; 2550 mEmailSourceChannel = sourceChannel;
2550 mEmailSourceUID = uid; 2551 mEmailSourceUID = uid;
2551 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) ); 2552 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) );
2552 //callContactdialog(); 2553 //callContactdialog();
2553#if 0 2554#if 0
2554 int wid = uid.toInt( &ok ); 2555 int wid = uid.toInt( &ok );
2555 qDebug("UID %s ", uid.latin1()); 2556 qDebug("UID %s ", uid.latin1());
2556 if ( ok ) { 2557 if ( ok ) {
2557 if ( wid != QApplication::desktop()->width() ) { 2558 if ( wid != QApplication::desktop()->width() ) {
2558 qDebug("KA/Pi: Request from different desktop geometry. Resizing ..."); 2559 qDebug("KA/Pi: Request from different desktop geometry. Resizing ...");
2559 message( i18n("Resizing, please wait...") ); 2560 message( i18n("Resizing, please wait...") );
2560 mMainWindow->showMinimized(); 2561 mMainWindow->showMinimized();
2561 /* 2562 /*
2562 { 2563 {
2563 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); 2564 QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2564 } 2565 }
2565 */ 2566 */
2566 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) ); 2567 QTimer::singleShot( 1,this, SLOT ( resizeAndCallContactdialog() ) );
2567 return; 2568 return;
2568 } 2569 }
2569 2570
2570 } else { 2571 } else {
2571 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid "); 2572 qDebug("KABCore::requestForNameEmailUidList:: Got invalid uid ");
2572 } 2573 }
2573 callContactdialog(); 2574 callContactdialog();
2574 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()"); 2575 //QCopEnvelope e("QPE/Application/kapi", "callContactdialog()");
2575#endif 2576#endif
2576} 2577}
2577void KABCore::resizeAndCallContactdialog() 2578void KABCore::resizeAndCallContactdialog()
2578{ 2579{
2579 updateMainWindow(); 2580 updateMainWindow();
2580 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) ); 2581 QTimer::singleShot( 10,this, SLOT ( callContactdialog() ) );
2581} 2582}
2582 2583
2584void KABCore::doRingSync()
2585{
2586 syncManager->multiSync( false );
2587}
2583void KABCore::callContactdialog() 2588void KABCore::callContactdialog()
2584{ 2589{
2585 static bool running = false; 2590 static bool running = false;
2586 if (running) return; 2591 if (running) return;
2587 running = true; 2592 running = true;
2588 QStringList nameList; 2593 QStringList nameList;
2589 QStringList emailList; 2594 QStringList emailList;
2590 QStringList uidList; 2595 QStringList uidList;
2591 qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() ); 2596 qDebug(" KABCore::callContactdialog:DESKTOP WIDTH %d ", QApplication::desktop()->width() );
2592 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 2597 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
2593 uint i=0; 2598 uint i=0;
2594 for (i=0; i < list.count(); i++) 2599 for (i=0; i < list.count(); i++)
2595 { 2600 {
2596 nameList.append(list[i].realName()); 2601 nameList.append(list[i].realName());
2597 emailList.append(list[i].preferredEmail()); 2602 emailList.append(list[i].preferredEmail());
2598 uidList.append(list[i].uid()); 2603 uidList.append(list[i].uid());
2599 } 2604 }
2600 QString uid = mEmailSourceUID; 2605 QString uid = mEmailSourceUID;
2601 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1()); 2606 //qDebug("%s %s ", sourceChannel.latin1(), uid.latin1());
2602 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList); 2607 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI(mEmailSourceChannel, uid, nameList, emailList, uidList);
2603 running = false; 2608 running = false;
2604} 2609}
2605/* this method will be called through the QCop interface from Ko/Pi to select birthdays 2610/* this method will be called through the QCop interface from Ko/Pi to select birthdays
2606 * to put them into the calendar. 2611 * to put them into the calendar.
2607 */ 2612 */
2608void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid) 2613void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString& uid)
2609{ 2614{
2610 // qDebug("KABCore::requestForBirthdayList"); 2615 // qDebug("KABCore::requestForBirthdayList");
2611 QStringList birthdayList; 2616 QStringList birthdayList;
2612 QStringList anniversaryList; 2617 QStringList anniversaryList;
2613 QStringList realNameList; 2618 QStringList realNameList;
2614 QStringList preferredEmailList; 2619 QStringList preferredEmailList;
2615 QStringList assembledNameList; 2620 QStringList assembledNameList;
2616 QStringList uidList; 2621 QStringList uidList;
2617 2622
2618 KABC::AddressBook::Iterator it; 2623 KABC::AddressBook::Iterator it;
2619 2624
2620 int count = 0; 2625 int count = 0;
2621 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2626 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2622 ++count; 2627 ++count;
2623 } 2628 }
2624 QProgressBar bar(count,0 ); 2629 QProgressBar bar(count,0 );
2625 int w = 300; 2630 int w = 300;
2626 if ( QApplication::desktop()->width() < 320 ) 2631 if ( QApplication::desktop()->width() < 320 )
2627 w = 220; 2632 w = 220;
2628 int h = bar.sizeHint().height() ; 2633 int h = bar.sizeHint().height() ;
2629 int dw = QApplication::desktop()->width(); 2634 int dw = QApplication::desktop()->width();
2630 int dh = QApplication::desktop()->height(); 2635 int dh = QApplication::desktop()->height();
2631 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2636 bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2632 bar.show(); 2637 bar.show();
2633 bar.setCaption (i18n("Collecting birthdays - close to abort!") ); 2638 bar.setCaption (i18n("Collecting birthdays - close to abort!") );
2634 qApp->processEvents(); 2639 qApp->processEvents();
2635 2640
2636 QDate bday; 2641 QDate bday;
2637 QString anni; 2642 QString anni;
2638 QString formattedbday; 2643 QString formattedbday;
2639 2644
2640 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) 2645 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it )
2641 { 2646 {
2642 if ( ! bar.isVisible() ) 2647 if ( ! bar.isVisible() )
2643 return; 2648 return;
2644 bar.setProgress( count++ ); 2649 bar.setProgress( count++ );
2645 qApp->processEvents(); 2650 qApp->processEvents();
2646 bday = (*it).birthday().date(); 2651 bday = (*it).birthday().date();
2647 anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" ); 2652 anni = (*it).custom("KADDRESSBOOK", "X-Anniversary" );
2648 2653
2649 if ( bday.isValid() || !anni.isEmpty()) 2654 if ( bday.isValid() || !anni.isEmpty())
2650 { 2655 {
2651 if (bday.isValid()) 2656 if (bday.isValid())
2652 formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate); 2657 formattedbday = KGlobal::locale()->formatDate(bday, true, KLocale::ISODate);
2653 else 2658 else
2654 formattedbday = "NOTVALID"; 2659 formattedbday = "NOTVALID";
2655 if (anni.isEmpty()) 2660 if (anni.isEmpty())
2656 anni = "INVALID"; 2661 anni = "INVALID";
2657 2662
2658 birthdayList.append(formattedbday); 2663 birthdayList.append(formattedbday);
2659 anniversaryList.append(anni); //should be ISODate 2664 anniversaryList.append(anni); //should be ISODate
2660 realNameList.append((*it).realName()); 2665 realNameList.append((*it).realName());
2661 preferredEmailList.append((*it).preferredEmail()); 2666 preferredEmailList.append((*it).preferredEmail());
2662 assembledNameList.append((*it).assembledName()); 2667 assembledNameList.append((*it).assembledName());
2663 uidList.append((*it).uid()); 2668 uidList.append((*it).uid());
2664 2669
2665 //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() ); 2670 //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() );
2666 } 2671 }
2667 } 2672 }
2668 2673
2669 bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList); 2674 bool res = ExternalAppHandler::instance()->returnBirthdayListFromKAPI(sourceChannel, uid, birthdayList, anniversaryList, realNameList, preferredEmailList, assembledNameList, uidList);
2670 2675
2671} 2676}
2672 2677
2673/* this method will be called through the QCop interface from other apps to show details of a contact. 2678/* this method will be called through the QCop interface from other apps to show details of a contact.
2674 */ 2679 */
2675void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid) 2680void KABCore::requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid)
2676{ 2681{
2677 //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1()); 2682 //qDebug("KABCore::requestForDetails %s %s %s %s %s", sourceChannel.latin1(), sessionuid.latin1(), name.latin1(), email.latin1(), uid.latin1());
2678 2683
2679 QString foundUid = QString::null; 2684 QString foundUid = QString::null;
2680 if ( ! uid.isEmpty() ) { 2685 if ( ! uid.isEmpty() ) {
2681 Addressee adrr = mAddressBook->findByUid( uid ); 2686 Addressee adrr = mAddressBook->findByUid( uid );
2682 if ( !adrr.isEmpty() ) { 2687 if ( !adrr.isEmpty() ) {
2683 foundUid = uid; 2688 foundUid = uid;
2684 } 2689 }
2685 if ( email == "sendbacklist" ) { 2690 if ( email == "sendbacklist" ) {
2686 //qDebug("ssssssssssssssssssssssend "); 2691 //qDebug("ssssssssssssssssssssssend ");
2687 QStringList nameList; 2692 QStringList nameList;
2688 QStringList emailList; 2693 QStringList emailList;
2689 QStringList uidList; 2694 QStringList uidList;
2690 nameList.append(adrr.realName()); 2695 nameList.append(adrr.realName());
2691 emailList = adrr.emails(); 2696 emailList = adrr.emails();
2692 uidList.append( adrr.preferredEmail()); 2697 uidList.append( adrr.preferredEmail());
2693 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); 2698 bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList);
2694 return; 2699 return;
2695 } 2700 }
2696 2701
2697 } 2702 }
2698 2703
2699 if ( email == "sendbacklist" ) 2704 if ( email == "sendbacklist" )
2700 return; 2705 return;
2701 if (foundUid.isEmpty()) 2706 if (foundUid.isEmpty())
2702 { 2707 {
2703 //find the uid of the person first 2708 //find the uid of the person first
2704 Addressee::List namelist; 2709 Addressee::List namelist;
2705 Addressee::List emaillist; 2710 Addressee::List emaillist;
2706 2711
2707 if (!name.isEmpty()) 2712 if (!name.isEmpty())
2708 namelist = mAddressBook->findByName( name ); 2713 namelist = mAddressBook->findByName( name );
2709 2714
2710 if (!email.isEmpty()) 2715 if (!email.isEmpty())
2711 emaillist = mAddressBook->findByEmail( email ); 2716 emaillist = mAddressBook->findByEmail( email );
2712 //qDebug("count %d %d ", namelist.count(),emaillist.count() ); 2717 //qDebug("count %d %d ", namelist.count(),emaillist.count() );
2713 //check if we have a match in Namelist and Emaillist 2718 //check if we have a match in Namelist and Emaillist
2714 if ((namelist.count() == 0) && (emaillist.count() > 0)) { 2719 if ((namelist.count() == 0) && (emaillist.count() > 0)) {
2715 foundUid = emaillist[0].uid(); 2720 foundUid = emaillist[0].uid();
2716 } 2721 }
2717 else if ((namelist.count() > 0) && (emaillist.count() == 0)) 2722 else if ((namelist.count() > 0) && (emaillist.count() == 0))
2718 foundUid = namelist[0].uid(); 2723 foundUid = namelist[0].uid();
2719 else 2724 else
2720 { 2725 {
2721 for (int i = 0; i < namelist.count(); i++) 2726 for (int i = 0; i < namelist.count(); i++)
2722 { 2727 {
2723 for (int j = 0; j < emaillist.count(); j++) 2728 for (int j = 0; j < emaillist.count(); j++)
2724 { 2729 {
2725 if (namelist[i] == emaillist[j]) 2730 if (namelist[i] == emaillist[j])
2726 { 2731 {
2727 foundUid = namelist[i].uid(); 2732 foundUid = namelist[i].uid();
2728 } 2733 }
2729 } 2734 }
2730 } 2735 }
2731 } 2736 }
2732 } 2737 }
2733 else 2738 else
2734 { 2739 {
2735 foundUid = uid; 2740 foundUid = uid;
2736 } 2741 }
2737 2742
2738 if (!foundUid.isEmpty()) 2743 if (!foundUid.isEmpty())
2739 { 2744 {
2740 2745
2741 // raise Ka/Pi if it is in the background 2746 // raise Ka/Pi if it is in the background
2742#ifndef DESKTOP_VERSION 2747#ifndef DESKTOP_VERSION
2743#ifndef KORG_NODCOP 2748#ifndef KORG_NODCOP
2744 //QCopEnvelope e("QPE/Application/kapi", "raise()"); 2749 //QCopEnvelope e("QPE/Application/kapi", "raise()");
2745#endif 2750#endif
2746#endif 2751#endif
2747 2752
2748 mMainWindow->showMaximized(); 2753 mMainWindow->showMaximized();
2749 mMainWindow-> raise(); 2754 mMainWindow-> raise();
2750 2755
2751 mViewManager->setSelected( "", false); 2756 mViewManager->setSelected( "", false);
2752 mViewManager->refreshView( "" ); 2757 mViewManager->refreshView( "" );
2753 mViewManager->setSelected( foundUid, true ); 2758 mViewManager->setSelected( foundUid, true );
2754 mViewManager->refreshView( foundUid ); 2759 mViewManager->refreshView( foundUid );
2755 2760
2756 if ( !mMultipleViewsAtOnce ) 2761 if ( !mMultipleViewsAtOnce )
2757 { 2762 {
2758 setDetailsVisible( true ); 2763 setDetailsVisible( true );
2759 mActionDetails->setChecked(true); 2764 mActionDetails->setChecked(true);
2760 } 2765 }
2761 } 2766 }
2762} 2767}
2763void KABCore::storagehowto() 2768void KABCore::storagehowto()
2764{ 2769{
2765 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); 2770 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" );
2766} 2771}
2767void KABCore::whatsnew() 2772void KABCore::whatsnew()
2768{ 2773{
2769 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 2774 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
2770} 2775}
2771void KABCore::synchowto() 2776void KABCore::synchowto()
2772{ 2777{
2773 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 2778 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
2774} 2779}
2775void KABCore::kdesynchowto() 2780void KABCore::kdesynchowto()
2776{ 2781{
2777 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 2782 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
2778} 2783}
2779void KABCore::multisynchowto() 2784void KABCore::multisynchowto()
2780{ 2785{
2781 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 2786 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
2782} 2787}
2783void KABCore::faq() 2788void KABCore::faq()
2784{ 2789{
2785 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); 2790 KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" );
2786} 2791}
2787 2792
2788#include <libkcal/syncdefines.h> 2793#include <libkcal/syncdefines.h>
2789 2794
2790KABC::Addressee KABCore::getLastSyncAddressee() 2795KABC::Addressee KABCore::getLastSyncAddressee()
2791{ 2796{
2792 Addressee lse; 2797 Addressee lse;
2793 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2798 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2794 2799
2795 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() ); 2800 //qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() );
2796 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2801 lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice );
2797 if (lse.isEmpty()) { 2802 if (lse.isEmpty()) {
2798 qDebug("KA: Creating new last-syncAddressee "); 2803 qDebug("KA: Creating new last-syncAddressee ");
2799 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice ); 2804 lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice );
2800 QString sum = ""; 2805 QString sum = "";
2801 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) 2806 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
2802 sum = "E: "; 2807 sum = "E: ";
2803 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); 2808 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event"));
2804 lse.setRevision( mLastAddressbookSync ); 2809 lse.setRevision( mLastAddressbookSync );
2805 lse.setCategories( i18n("SyncEvent") ); 2810 lse.setCategories( i18n("SyncEvent") );
2806 mAddressBook->insertAddressee( lse ); 2811 mAddressBook->insertAddressee( lse );
2807 } 2812 }
2808 return lse; 2813 return lse;
2809} 2814}
2810int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ) 2815int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full )
2811{ 2816{
2812 2817
2813 //void setZaurusId(int id); 2818 //void setZaurusId(int id);
2814 // int zaurusId() const; 2819 // int zaurusId() const;
2815 // void setZaurusUid(int id); 2820 // void setZaurusUid(int id);
2816 // int zaurusUid() const; 2821 // int zaurusUid() const;
2817 // void setZaurusStat(int id); 2822 // void setZaurusStat(int id);
2818 // int zaurusStat() const; 2823 // int zaurusStat() const;
2819 // 0 equal 2824 // 0 equal
2820 // 1 take local 2825 // 1 take local
2821 // 2 take remote 2826 // 2 take remote
2822 // 3 cancel 2827 // 3 cancel
2823 QDateTime lastSync = mLastAddressbookSync; 2828 QDateTime lastSync = mLastAddressbookSync;
2824 QDateTime localMod = local->revision(); 2829 QDateTime localMod = local->revision();
2825 QDateTime remoteMod = remote->revision(); 2830 QDateTime remoteMod = remote->revision();
2826 2831
2827 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2832 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2828 2833
2829 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2834 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2830 bool remCh, locCh; 2835 bool remCh, locCh;
2831 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) ); 2836 remCh = ( remote->getCsum(mCurrentSyncDevice) != local->getCsum(mCurrentSyncDevice) );
2832 //if ( remCh ) 2837 //if ( remCh )
2833 // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() ); 2838 // qDebug("loc %s rem %s", local->getCsum(mCurrentSyncDevice).latin1(), remote->getCsum(mCurrentSyncDevice).latin1() );
2834 locCh = ( localMod > mLastAddressbookSync ); 2839 locCh = ( localMod > mLastAddressbookSync );
2835 //qDebug("cahnged rem %d loc %d",remCh, locCh ); 2840 //qDebug("cahnged rem %d loc %d",remCh, locCh );
2836 if ( !remCh && ! locCh ) { 2841 if ( !remCh && ! locCh ) {
2837 //qDebug("both not changed "); 2842 //qDebug("both not changed ");
2838 lastSync = localMod.addDays(1); 2843 lastSync = localMod.addDays(1);
2839 if ( mode <= SYNC_PREF_ASK ) 2844 if ( mode <= SYNC_PREF_ASK )
2840 return 0; 2845 return 0;
2841 } else { 2846 } else {
2842 if ( locCh ) { 2847 if ( locCh ) {
2843 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1()); 2848 //qDebug("loc changed %s %s", localMod.toString().latin1(), mLastAddressbookSync.toString().latin1());
2844 lastSync = localMod.addDays( -1 ); 2849 lastSync = localMod.addDays( -1 );
2845 if ( !remCh ) 2850 if ( !remCh )
2846 remoteMod =( lastSync.addDays( -1 ) ); 2851 remoteMod =( lastSync.addDays( -1 ) );
2847 } else { 2852 } else {
2848 //qDebug(" not loc changed "); 2853 //qDebug(" not loc changed ");
2849 lastSync = localMod.addDays( 1 ); 2854 lastSync = localMod.addDays( 1 );
2850 if ( remCh ) { 2855 if ( remCh ) {
2851 //qDebug("rem changed "); 2856 //qDebug("rem changed ");
2852 remoteMod =( lastSync.addDays( 1 ) ); 2857 remoteMod =( lastSync.addDays( 1 ) );
2853 } 2858 }
2854 2859
2855 } 2860 }
2856 } 2861 }
2857 full = true; 2862 full = true;
2858 if ( mode < SYNC_PREF_ASK ) 2863 if ( mode < SYNC_PREF_ASK )
2859 mode = SYNC_PREF_ASK; 2864 mode = SYNC_PREF_ASK;
2860 } else { 2865 } else {
2861 if ( localMod == remoteMod ) 2866 if ( localMod == remoteMod )
2862 return 0; 2867 return 0;
2863 2868
2864 } 2869 }
2865 //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec()); 2870 //qDebug("%s %s --- %d %d", localMod.toString().latin1() , remoteMod.toString().latin1(), localMod.time().msec(), remoteMod.time().msec());
2866 //qDebug("lastsync %s ", lastSync.toString().latin1() ); 2871 //qDebug("lastsync %s ", lastSync.toString().latin1() );
2867 //full = true; //debug only 2872 //full = true; //debug only
2868 if ( full ) { 2873 if ( full ) {
2869 bool equ = ( (*local) == (*remote) ); 2874 bool equ = ( (*local) == (*remote) );
2870 if ( equ ) { 2875 if ( equ ) {
2871 //qDebug("equal "); 2876 //qDebug("equal ");
2872 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2877 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2873 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) ); 2878 local->setCsum( mCurrentSyncDevice, remote->getCsum(mCurrentSyncDevice) );
2874 } 2879 }
2875 if ( mode < SYNC_PREF_FORCE_LOCAL ) 2880 if ( mode < SYNC_PREF_FORCE_LOCAL )
2876 return 0; 2881 return 0;
2877 2882
2878 }//else //debug only 2883 }//else //debug only
2879 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1()); 2884 //qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1());
2880 } 2885 }
2881 int result; 2886 int result;
2882 bool localIsNew; 2887 bool localIsNew;
2883 //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() ); 2888 //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() );
2884 2889
2885 if ( full && mode < SYNC_PREF_NEWEST ) 2890 if ( full && mode < SYNC_PREF_NEWEST )
2886 mode = SYNC_PREF_ASK; 2891 mode = SYNC_PREF_ASK;
2887 2892
2888 switch( mode ) { 2893 switch( mode ) {
2889 case SYNC_PREF_LOCAL: 2894 case SYNC_PREF_LOCAL:
2890 if ( lastSync > remoteMod ) 2895 if ( lastSync > remoteMod )
2891 return 1; 2896 return 1;
2892 if ( lastSync > localMod ) 2897 if ( lastSync > localMod )
2893 return 2; 2898 return 2;
2894 return 1; 2899 return 1;
2895 break; 2900 break;
2896 case SYNC_PREF_REMOTE: 2901 case SYNC_PREF_REMOTE:
2897 if ( lastSync > localMod ) 2902 if ( lastSync > localMod )
2898 return 2; 2903 return 2;
2899 if ( lastSync > remoteMod ) 2904 if ( lastSync > remoteMod )
2900 return 1; 2905 return 1;
2901 return 2; 2906 return 2;
2902 break; 2907 break;
2903 case SYNC_PREF_NEWEST: 2908 case SYNC_PREF_NEWEST:
2904 if ( localMod > remoteMod ) 2909 if ( localMod > remoteMod )
2905 return 1; 2910 return 1;
2906 else 2911 else
2907 return 2; 2912 return 2;
2908 break; 2913 break;
2909 case SYNC_PREF_ASK: 2914 case SYNC_PREF_ASK:
2910 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); 2915 //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
2911 if ( lastSync > remoteMod && lastSync > localMod) 2916 if ( lastSync > remoteMod && lastSync > localMod)
2912 return 0; 2917 return 0;
2913 if ( lastSync > remoteMod ) 2918 if ( lastSync > remoteMod )
2914 return 1; 2919 return 1;
2915 if ( lastSync > localMod ) { 2920 if ( lastSync > localMod ) {
2916 return 2; 2921 return 2;
2917 } 2922 }
2918 localIsNew = localMod >= remoteMod; 2923 localIsNew = localMod >= remoteMod;
2919 //qDebug("conflict! ************************************** "); 2924 //qDebug("conflict! ************************************** ");
2920 { 2925 {
2921 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this ); 2926 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this );
2922 result = acd.executeD(localIsNew); 2927 result = acd.executeD(localIsNew);
2923 return result; 2928 return result;
2924 } 2929 }
2925 break; 2930 break;
2926 case SYNC_PREF_FORCE_LOCAL: 2931 case SYNC_PREF_FORCE_LOCAL:
2927 return 1; 2932 return 1;
2928 break; 2933 break;
2929 case SYNC_PREF_FORCE_REMOTE: 2934 case SYNC_PREF_FORCE_REMOTE:
2930 return 2; 2935 return 2;
2931 break; 2936 break;
2932 2937
2933 default: 2938 default:
2934 // SYNC_PREF_TAKE_BOTH not implemented 2939 // SYNC_PREF_TAKE_BOTH not implemented
2935 break; 2940 break;
2936 } 2941 }
2937 return 0; 2942 return 0;
2938} 2943}
2939 2944
2940 2945
2941bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode) 2946bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode)
2942{ 2947{
2943 bool syncOK = true; 2948 bool syncOK = true;
2944 int addedAddressee = 0; 2949 int addedAddressee = 0;
2945 int addedAddresseeR = 0; 2950 int addedAddresseeR = 0;
2946 int deletedAddresseeR = 0; 2951 int deletedAddresseeR = 0;
2947 int deletedAddresseeL = 0; 2952 int deletedAddresseeL = 0;
2948 int changedLocal = 0; 2953 int changedLocal = 0;
2949 int changedRemote = 0; 2954 int changedRemote = 0;
2950 int filteredIN = 0; 2955 int filteredIN = 0;
2951 int filteredOUT = 0; 2956 int filteredOUT = 0;
2952 2957
2953 QString mCurrentSyncName = syncManager->getCurrentSyncName(); 2958 QString mCurrentSyncName = syncManager->getCurrentSyncName();
2954 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 2959 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
2955 2960
2956 //QPtrList<Addressee> el = local->rawAddressees(); 2961 //QPtrList<Addressee> el = local->rawAddressees();
2957 Addressee addresseeR; 2962 Addressee addresseeR;
2958 QString uid; 2963 QString uid;
2959 int take; 2964 int take;
2960 Addressee addresseeL; 2965 Addressee addresseeL;
2961 Addressee addresseeRSync; 2966 Addressee addresseeRSync;
2962 Addressee addresseeLSync; 2967 Addressee addresseeLSync;
2963 // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees(); 2968 // KABC::Addressee::List addresseeRSyncSharp = remote->getExternLastSyncAddressees();
2964 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); 2969 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees();
2965 bool fullDateRange = false; 2970 bool fullDateRange = false;
2966 local->resetTempSyncStat(); 2971 local->resetTempSyncStat();
2967 mLastAddressbookSync = QDateTime::currentDateTime(); 2972 mLastAddressbookSync = QDateTime::currentDateTime();
2968 if ( syncManager->syncWithDesktop() ) { 2973 if ( syncManager->syncWithDesktop() ) {
2969 // remote->removeSyncInfo( QString());//remove all info 2974 // remote->removeSyncInfo( QString());//remove all info
2970 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 2975 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
2971 mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; 2976 mLastAddressbookSync = KSyncManager::mRequestedSyncEvent;
2972 qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); 2977 qDebug("KA: using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() );
2973 } else { 2978 } else {
2974 qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime "); 2979 qDebug("KA: KSyncManager::mRequestedSyncEvent has invalid datatime ");
2975 } 2980 }
2976 } 2981 }
2977 QDateTime modifiedCalendar = mLastAddressbookSync; 2982 QDateTime modifiedCalendar = mLastAddressbookSync;
2978 addresseeLSync = getLastSyncAddressee(); 2983 addresseeLSync = getLastSyncAddressee();
2979 qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1()); 2984 qDebug("KA: Last Sync %s ", addresseeLSync.revision().toString().latin1());
2980 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); 2985 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName );
2981 if ( !addresseeR.isEmpty() ) { 2986 if ( !addresseeR.isEmpty() ) {
2982 addresseeRSync = addresseeR; 2987 addresseeRSync = addresseeR;
2983 remote->removeAddressee(addresseeR ); 2988 remote->removeAddressee(addresseeR );
2984 2989
2985 } else { 2990 } else {
2986 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2991 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2987 addresseeRSync = addresseeLSync ; 2992 addresseeRSync = addresseeLSync ;
2988 } else { 2993 } else {
2989 //qDebug("FULLDATE 1"); 2994 //qDebug("FULLDATE 1");
2990 fullDateRange = true; 2995 fullDateRange = true;
2991 Addressee newAdd; 2996 Addressee newAdd;
2992 addresseeRSync = newAdd; 2997 addresseeRSync = newAdd;
2993 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); 2998 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee"));
2994 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); 2999 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName );
2995 addresseeRSync.setRevision( mLastAddressbookSync ); 3000 addresseeRSync.setRevision( mLastAddressbookSync );
2996 addresseeRSync.setCategories( i18n("SyncAddressee") ); 3001 addresseeRSync.setCategories( i18n("SyncAddressee") );
2997 } 3002 }
2998 } 3003 }
2999 if ( addresseeLSync.revision() == mLastAddressbookSync ) { 3004 if ( addresseeLSync.revision() == mLastAddressbookSync ) {
3000 // qDebug("FULLDATE 2"); 3005 // qDebug("FULLDATE 2");
3001 fullDateRange = true; 3006 fullDateRange = true;
3002 } 3007 }
3003 if ( ! fullDateRange ) { 3008 if ( ! fullDateRange ) {
3004 if ( addresseeLSync.revision() != addresseeRSync.revision() ) { 3009 if ( addresseeLSync.revision() != addresseeRSync.revision() ) {
3005 3010
3006 // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() ); 3011 // qDebug("set fulldate to true %s %s" ,addresseeLSync->dtStart().toString().latin1(), addresseeRSync->dtStart().toString().latin1() );
3007 //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec()); 3012 //qDebug("%d %d %d %d ", addresseeLSync->dtStart().time().second(), addresseeLSync->dtStart().time().msec() , addresseeRSync->dtStart().time().second(), addresseeRSync->dtStart().time().msec());
3008 fullDateRange = true; 3013 fullDateRange = true;
3009 //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() ); 3014 //qDebug("FULLDATE 3 %s %s", addresseeLSync.revision().toString().latin1() , addresseeRSync.revision().toString().latin1() );
3010 } 3015 }
3011 } 3016 }
3012 // fullDateRange = true; // debug only! 3017 // fullDateRange = true; // debug only!
3013 if ( fullDateRange ) 3018 if ( fullDateRange )
3014 mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365); 3019 mLastAddressbookSync = QDateTime::currentDateTime().addDays( -100*365);
3015 else 3020 else
3016 mLastAddressbookSync = addresseeLSync.revision(); 3021 mLastAddressbookSync = addresseeLSync.revision();
3017 // for resyncing if own file has changed 3022 // for resyncing if own file has changed
3018 // PENDING fixme later when implemented 3023 // PENDING fixme later when implemented
3019#if 0 3024#if 0
3020 if ( mCurrentSyncDevice == "deleteaftersync" ) { 3025 if ( mCurrentSyncDevice == "deleteaftersync" ) {
3021 mLastAddressbookSync = loadedFileVersion; 3026 mLastAddressbookSync = loadedFileVersion;
3022 qDebug("setting mLastAddressbookSync "); 3027 qDebug("setting mLastAddressbookSync ");
3023 } 3028 }
3024#endif 3029#endif
3025 3030
3026 3031
3027 // ********** setting filters **************** 3032 // ********** setting filters ****************
3028 Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB ); 3033 Filter filterIN = mViewManager->getFilterByName( syncManager->mFilterInAB );
3029 Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB ); 3034 Filter filterOUT = mViewManager->getFilterByName( syncManager->mFilterOutAB );
3030 3035
3031 //qDebug("*************************** "); 3036 //qDebug("*************************** ");
3032 // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() ); 3037 // qDebug("mLastAddressbookSync %s ",mLastAddressbookSync.toString().latin1() );
3033 QStringList er = remote->uidList(); 3038 QStringList er = remote->uidList();
3034 Addressee inR ;//= er.first(); 3039 Addressee inR ;//= er.first();
3035 Addressee inL; 3040 Addressee inL;
3036 3041
3037 syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count()); 3042 syncManager->showProgressBar(0, i18n("Syncing - close to abort!"), er.count());
3038 3043
3039 int modulo = (er.count()/10)+1; 3044 int modulo = (er.count()/10)+1;
3040 int incCounter = 0; 3045 int incCounter = 0;
3041 while ( incCounter < er.count()) { 3046 while ( incCounter < er.count()) {
3042 if (syncManager->isProgressBarCanceled()) 3047 if (syncManager->isProgressBarCanceled())
3043 return false; 3048 return false;
3044 if ( incCounter % modulo == 0 ) 3049 if ( incCounter % modulo == 0 )
3045 syncManager->showProgressBar(incCounter); 3050 syncManager->showProgressBar(incCounter);
3046 3051
3047 uid = er[ incCounter ]; 3052 uid = er[ incCounter ];
3048 bool skipIncidence = false; 3053 bool skipIncidence = false;
3049 if ( uid.left(19) == QString("last-syncAddressee-") ) 3054 if ( uid.left(19) == QString("last-syncAddressee-") )
3050 skipIncidence = true; 3055 skipIncidence = true;
3051 QString idS,OidS; 3056 QString idS,OidS;
3052 qApp->processEvents(); 3057 qApp->processEvents();
3053 if ( !skipIncidence ) { 3058 if ( !skipIncidence ) {
3054 inL = local->findByUid( uid ); 3059 inL = local->findByUid( uid );
3055 inR = remote->findByUid( uid ); 3060 inR = remote->findByUid( uid );
3056 //inL.setResource( 0 ); 3061 //inL.setResource( 0 );
3057 //inR.setResource( 0 ); 3062 //inR.setResource( 0 );
3058 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars 3063 if ( !inL.isEmpty() ) { // maybe conflict - same uid in both calendars
3059 if ( !inL.resource() || inL.resource()->includeInSync() ) { 3064 if ( !inL.resource() || inL.resource()->includeInSync() ) {
3060 if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) { 3065 if ( (take = takeAddressee( &inL, &inR, mode, fullDateRange )) ) {
3061 //qDebug("take %d %s ", take, inL.summary().latin1()); 3066 //qDebug("take %d %s ", take, inL.summary().latin1());
3062 if ( take == 3 ) 3067 if ( take == 3 )
3063 return false; 3068 return false;
3064 if ( take == 1 ) {// take local ********************** 3069 if ( take == 1 ) {// take local **********************
3065 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3070 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3066 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3071 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
3067 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3072 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
3068 local->insertAddressee( inL, false ); 3073 local->insertAddressee( inL, false );
3069 idS = inR.externalUID(); 3074 idS = inR.externalUID();
3070 OidS = inR.originalExternalUID(); 3075 OidS = inR.originalExternalUID();
3071 } 3076 }
3072 else 3077 else
3073 idS = inR.IDStr(); 3078 idS = inR.IDStr();
3074 remote->removeAddressee( inR ); 3079 remote->removeAddressee( inR );
3075 inR = inL; 3080 inR = inL;
3076 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 3081 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
3077 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3082 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3078 inR.setOriginalExternalUID( OidS ); 3083 inR.setOriginalExternalUID( OidS );
3079 inR.setExternalUID( idS ); 3084 inR.setExternalUID( idS );
3080 if ( syncManager->syncWithDesktop() ) { 3085 if ( syncManager->syncWithDesktop() ) {
3081 inR.setIDStr("changed" ); 3086 inR.setIDStr("changed" );
3082 } 3087 }
3083 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); 3088 //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" );
3084 } else { 3089 } else {
3085 inR.setIDStr( idS ); 3090 inR.setIDStr( idS );
3086 } 3091 }
3087 inR.setResource( 0 ); 3092 inR.setResource( 0 );
3088 remote->insertAddressee( inR , false); 3093 remote->insertAddressee( inR , false);
3089 ++changedRemote; 3094 ++changedRemote;
3090 } else { // take == 2 take remote ********************** 3095 } else { // take == 2 take remote **********************
3091 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3096 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3092 if ( inR.revision().date().year() < 2004 ) 3097 if ( inR.revision().date().year() < 2004 )
3093 inR.setRevision( modifiedCalendar ); 3098 inR.setRevision( modifiedCalendar );
3094 } 3099 }
3095 idS = inL.IDStr(); 3100 idS = inL.IDStr();
3096 local->removeAddressee( inL ); 3101 local->removeAddressee( inL );
3097 inL = inR; 3102 inL = inR;
3098 inL.setIDStr( idS ); 3103 inL.setIDStr( idS );
3099 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3104 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3100 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3105 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
3101 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3106 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
3102 } 3107 }
3103 inL.setResource( 0 ); 3108 inL.setResource( 0 );
3104 local->insertAddressee( inL , false ); 3109 local->insertAddressee( inL , false );
3105 ++changedLocal; 3110 ++changedLocal;
3106 } 3111 }
3107 } 3112 }
3108 } 3113 }
3109 } else { // no conflict ********** add or delete remote 3114 } else { // no conflict ********** add or delete remote
3110 if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) { 3115 if ( filterIN.name().isEmpty() || filterIN.filterAddressee( inR ) ) {
3111 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3116 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3112 QString des = addresseeLSync.note(); 3117 QString des = addresseeLSync.note();
3113 if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it 3118 if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it
3114 inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); 3119 inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE );
3115 remote->insertAddressee( inR, false ); 3120 remote->insertAddressee( inR, false );
3116 ++deletedAddresseeR; 3121 ++deletedAddresseeR;
3117 } else { 3122 } else {
3118 inR.setRevision( modifiedCalendar ); 3123 inR.setRevision( modifiedCalendar );
3119 remote->insertAddressee( inR, false ); 3124 remote->insertAddressee( inR, false );
3120 inL = inR; 3125 inL = inR;
3121 inL.setIDStr( ":" ); 3126 inL.setIDStr( ":" );
3122 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); 3127 inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) );
3123 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); 3128 inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) );
3124 inL.setResource( 0 ); 3129 inL.setResource( 0 );
3125 local->insertAddressee( inL , false); 3130 local->insertAddressee( inL , false);
3126 ++addedAddressee; 3131 ++addedAddressee;
3127 } 3132 }
3128 } else { 3133 } else {
3129 if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { 3134 if ( inR.revision() > mLastAddressbookSync || mode == 5 ) {
3130 inR.setRevision( modifiedCalendar ); 3135 inR.setRevision( modifiedCalendar );
3131 remote->insertAddressee( inR, false ); 3136 remote->insertAddressee( inR, false );
3132 inR.setResource( 0 ); 3137 inR.setResource( 0 );
3133 local->insertAddressee( inR, false ); 3138 local->insertAddressee( inR, false );
3134 ++addedAddressee; 3139 ++addedAddressee;
3135 } else { 3140 } else {
3136 // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); 3141 // pending checkExternSyncAddressee(addresseeRSyncSharp, inR);
3137 remote->removeAddressee( inR ); 3142 remote->removeAddressee( inR );
3138 ++deletedAddresseeR; 3143 ++deletedAddresseeR;
3139 } 3144 }
3140 } 3145 }
3141 } else { 3146 } else {
3142 ++filteredIN; 3147 ++filteredIN;
3143 } 3148 }
3144 } 3149 }
3145 } 3150 }
3146 ++incCounter; 3151 ++incCounter;
3147 } 3152 }
3148 er.clear(); 3153 er.clear();
3149 QStringList el = local->uidList(); 3154 QStringList el = local->uidList();
3150 modulo = (el.count()/10)+1; 3155 modulo = (el.count()/10)+1;
3151 3156
3152 syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); 3157 syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count());
3153 incCounter = 0; 3158 incCounter = 0;
3154 while ( incCounter < el.count()) { 3159 while ( incCounter < el.count()) {
3155 qApp->processEvents(); 3160 qApp->processEvents();
3156 if (syncManager->isProgressBarCanceled()) 3161 if (syncManager->isProgressBarCanceled())
3157 return false; 3162 return false;
3158 if ( incCounter % modulo == 0 ) 3163 if ( incCounter % modulo == 0 )
3159 syncManager->showProgressBar(incCounter); 3164 syncManager->showProgressBar(incCounter);
3160 uid = el[ incCounter ]; 3165 uid = el[ incCounter ];
3161 bool skipIncidence = false; 3166 bool skipIncidence = false;
3162 if ( uid.left(19) == QString("last-syncAddressee-") ) 3167 if ( uid.left(19) == QString("last-syncAddressee-") )
3163 skipIncidence = true; 3168 skipIncidence = true;
3164 if ( !skipIncidence ) { 3169 if ( !skipIncidence ) {
3165 inL = local->findByUid( uid ); 3170 inL = local->findByUid( uid );
3166 if ( !inL.resource() || inL.resource()->includeInSync() ) { 3171 if ( !inL.resource() || inL.resource()->includeInSync() ) {
3167 inR = remote->findByUid( uid ); 3172 inR = remote->findByUid( uid );
3168 if ( inR.isEmpty() ){ 3173 if ( inR.isEmpty() ){
3169 if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) { 3174 if ( filterOUT.name().isEmpty() || filterOUT.filterAddressee( inL ) ) {
3170 // no conflict ********** add or delete local 3175 // no conflict ********** add or delete local
3171 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 3176 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
3172 if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { 3177 if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) {
3173 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); 3178 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
3174 local->removeAddressee( inL ); 3179 local->removeAddressee( inL );
3175 ++deletedAddresseeL; 3180 ++deletedAddresseeL;
3176 } else { 3181 } else {
3177 if ( ! syncManager->mWriteBackExistingOnly ) { 3182 if ( ! syncManager->mWriteBackExistingOnly ) {
3178 inL.removeID(mCurrentSyncDevice ); 3183 inL.removeID(mCurrentSyncDevice );
3179 ++addedAddresseeR; 3184 ++addedAddresseeR;
3180 inL.setRevision( modifiedCalendar ); 3185 inL.setRevision( modifiedCalendar );
3181 local->insertAddressee( inL, false ); 3186 local->insertAddressee( inL, false );
3182 inR = inL; 3187 inR = inL;
3183 inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); 3188 inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL );
3184 inR.setResource( 0 ); 3189 inR.setResource( 0 );
3185 remote->insertAddressee( inR, false ); 3190 remote->insertAddressee( inR, false );
3186 } 3191 }
3187 } 3192 }
3188 } else { 3193 } else {
3189 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { 3194 if ( inL.revision() < mLastAddressbookSync && mode != 4 ) {
3190 //qDebug("data %s ", inL.revision().toString().latin1()); 3195 //qDebug("data %s ", inL.revision().toString().latin1());
3191 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); 3196 // pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
3192 local->removeAddressee( inL ); 3197 local->removeAddressee( inL );
3193 ++deletedAddresseeL; 3198 ++deletedAddresseeL;
3194 } else { 3199 } else {
3195 if ( ! syncManager->mWriteBackExistingOnly ) { 3200 if ( ! syncManager->mWriteBackExistingOnly ) {
3196 ++addedAddresseeR; 3201 ++addedAddresseeR;
3197 inL.setRevision( modifiedCalendar ); 3202 inL.setRevision( modifiedCalendar );
3198 local->insertAddressee( inL, false ); 3203 local->insertAddressee( inL, false );
3199 inR = inL; 3204 inR = inL;
3200 inR.setIDStr( ":" ); 3205 inR.setIDStr( ":" );
3201 inR.setResource( 0 ); 3206 inR.setResource( 0 );
3202 remote->insertAddressee( inR, false ); 3207 remote->insertAddressee( inR, false );
3203 } 3208 }
3204 } 3209 }
3205 } 3210 }
3206 } else { 3211 } else {
3207 ++filteredOUT; 3212 ++filteredOUT;
3208 } 3213 }
3209 } 3214 }
3210 } 3215 }
3211 } 3216 }
3212 ++incCounter; 3217 ++incCounter;
3213 } 3218 }
3214 el.clear(); 3219 el.clear();
3215 syncManager->hideProgressBar(); 3220 syncManager->hideProgressBar();
3216 mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); 3221 mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 );
3217 // get rid of micro seconds 3222 // get rid of micro seconds
3218 QTime t = mLastAddressbookSync.time(); 3223 QTime t = mLastAddressbookSync.time();
3219 mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); 3224 mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) );
3220 addresseeLSync.setRevision( mLastAddressbookSync ); 3225 addresseeLSync.setRevision( mLastAddressbookSync );
3221 addresseeRSync.setRevision( mLastAddressbookSync ); 3226 addresseeRSync.setRevision( mLastAddressbookSync );
3222 addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; 3227 addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ;
3223 addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); 3228 addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName );
3224 addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; 3229 addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ;
3225 addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); 3230 addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") );
3226 addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; 3231 addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ;
3227 addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); 3232 addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() );
3228 addresseeRSync.setNote( "" ) ; 3233 addresseeRSync.setNote( "" ) ;
3229 addresseeLSync.setNote( "" ); 3234 addresseeLSync.setNote( "" );
3230 3235
3231 if ( mGlobalSyncMode == SYNC_MODE_NORMAL) 3236 if ( mGlobalSyncMode == SYNC_MODE_NORMAL)
3232 remote->insertAddressee( addresseeRSync, false ); 3237 remote->insertAddressee( addresseeRSync, false );
3233 local->insertAddressee( addresseeLSync, false ); 3238 local->insertAddressee( addresseeLSync, false );
3234 QString mes; 3239 QString mes;
3235 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 ); 3240 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 );
3236 qDebug( mes ); 3241 qDebug( mes );
3237 mes = i18n("Local addressbook changed!\n") +mes; 3242 mes = i18n("Local addressbook changed!\n") +mes;
3238 if ( syncManager->mShowSyncSummary ) { 3243 if ( syncManager->mShowSyncSummary ) {
3239 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, 3244 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
3240 i18n("KA/Pi Synchronization"),i18n("Write back"))) { 3245 i18n("KA/Pi Synchronization"),i18n("Write back"))) {
3241 qDebug("KA: WB cancelled "); 3246 qDebug("KA: WB cancelled ");
3242 syncManager->mWriteBackFile = false; 3247 syncManager->mWriteBackFile = false;
3243 return syncOK; 3248 return syncOK;
3244 } 3249 }
3245 } 3250 }
3246 return syncOK; 3251 return syncOK;
3247} 3252}
3248 3253
3249 3254
3250//this is a overwritten callbackmethods from the syncinterface 3255//this is a overwritten callbackmethods from the syncinterface
3251bool KABCore::sync(KSyncManager* manager, QString filename, int mode) 3256bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
3252{ 3257{
3253 3258
3254 //pending prepare addresseeview for output 3259 //pending prepare addresseeview for output
3255 //pending detect, if remote file has REV field. if not switch to external sync 3260 //pending detect, if remote file has REV field. if not switch to external sync
3256 mGlobalSyncMode = SYNC_MODE_NORMAL; 3261 mGlobalSyncMode = SYNC_MODE_NORMAL;
3257 if ( manager != syncManager ) 3262 if ( manager != syncManager )
3258 qDebug("KABCore::sync:: ERROR! :: manager != syncManager "); 3263 qDebug("KABCore::sync:: ERROR! :: manager != syncManager ");
3259 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 3264 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
3260 3265
3261 AddressBook abLocal(filename,"syncContact"); 3266 AddressBook abLocal(filename,"syncContact");
3262 bool syncOK = false; 3267 bool syncOK = false;
3263 if ( abLocal.load() ) { 3268 if ( abLocal.load() ) {
3264 qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode ); 3269 qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode );
3265 bool external = false; 3270 bool external = false;
3266 bool isXML = false; 3271 bool isXML = false;
3267 if ( filename.right(4) == ".xml") { 3272 if ( filename.right(4) == ".xml") {
3268 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3273 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3269 isXML = true; 3274 isXML = true;
3270 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); 3275 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
3271 } else { 3276 } else {
3272 external = !manager->mIsKapiFile; 3277 external = !manager->mIsKapiFile;
3273 if ( external ) { 3278 if ( external ) {
3274 qDebug("KA: Sync::Setting vcf mode to external "); 3279 qDebug("KA: Sync::Setting vcf mode to external ");
3275 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3280 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3276 AddressBook::Iterator it; 3281 AddressBook::Iterator it;
3277 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 3282 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
3278 (*it).setID( mCurrentSyncDevice, (*it).uid() ); 3283 (*it).setID( mCurrentSyncDevice, (*it).uid() );
3279 (*it).computeCsum( mCurrentSyncDevice ); 3284 (*it).computeCsum( mCurrentSyncDevice );
3280 } 3285 }
3281 } 3286 }
3282 } 3287 }
3283 //AddressBook::Iterator it; 3288 //AddressBook::Iterator it;
3284 //QStringList vcards; 3289 //QStringList vcards;
3285 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 3290 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
3286 // qDebug("Name %s ", (*it).familyName().latin1()); 3291 // qDebug("Name %s ", (*it).familyName().latin1());
3287 //} 3292 //}
3288 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); 3293 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode );
3289 syncManager->hideProgressBar(); 3294 syncManager->hideProgressBar();
3290 if ( syncOK ) { 3295 if ( syncOK ) {
3291 if ( syncManager->mWriteBackFile ) 3296 if ( syncManager->mWriteBackFile )
3292 { 3297 {
3293 if ( external ) 3298 if ( external )
3294 abLocal.removeSyncAddressees( !isXML); 3299 abLocal.removeSyncAddressees( !isXML);
3295 qDebug("KA: Sync::Saving remote AB "); 3300 qDebug("KA: Sync::Saving remote AB ");
3296 if ( ! abLocal.saveAB()) 3301 if ( ! abLocal.saveAB())
3297 qDebug("KA: sync::Error writing back AB to file "); 3302 qDebug("KA: sync::Error writing back AB to file ");
3298 if ( external ) { 3303 if ( external ) {
3299 // afterwrite processing 3304 // afterwrite processing
3300 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); 3305 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML);
3301 } 3306 }
3302 } 3307 }
3303 } 3308 }
3304 setModified(); 3309 setModified();
3305 3310
3306 } 3311 }
3307 abLocal.removeResources(); 3312 abLocal.removeResources();
3308 if ( syncOK ) 3313 if ( syncOK )
3309 mViewManager->refreshView(); 3314 mViewManager->refreshView();
3310 return syncOK; 3315 return syncOK;
3311 3316
3312} 3317}
3313void KABCore::removeSyncInfo( QString syncProfile) 3318void KABCore::removeSyncInfo( QString syncProfile)
3314{ 3319{
3315 qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1()); 3320 qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1());
3316 mAddressBook->removeSyncInfo( syncProfile ); 3321 mAddressBook->removeSyncInfo( syncProfile );
3317 setModified(); 3322 setModified();
3318} 3323}
3319 3324
3320 3325
3321//this is a overwritten callbackmethods from the syncinterface 3326//this is a overwritten callbackmethods from the syncinterface
3322bool KABCore::syncExternal(KSyncManager* manager, QString resource) 3327bool KABCore::syncExternal(KSyncManager* manager, QString resource)
3323{ 3328{
3324 if ( resource == "phone" ) 3329 if ( resource == "phone" )
3325 return syncPhone(); 3330 return syncPhone();
3326 disableBR( true ); 3331 disableBR( true );
3327 if ( manager != syncManager ) 3332 if ( manager != syncManager )
3328 qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); 3333 qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager ");
3329 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 3334 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
3330 3335
3331 AddressBook abLocal( resource,"syncContact"); 3336 AddressBook abLocal( resource,"syncContact");
3332 bool syncOK = false; 3337 bool syncOK = false;
3333 message(i18n("Loading DTM address data..."), false); 3338 message(i18n("Loading DTM address data..."), false);
3334 if ( abLocal.load() ) { 3339 if ( abLocal.load() ) {
3335 qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); 3340 qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1());
3336 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3341 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3337 message(i18n("Sync preprocessing..."),false); 3342 message(i18n("Sync preprocessing..."),false);
3338 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); 3343 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false );
3339 message(i18n("Synchronizing..."),false); 3344 message(i18n("Synchronizing..."),false);
3340 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 3345 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
3341 syncManager->hideProgressBar(); 3346 syncManager->hideProgressBar();
3342 if ( syncOK ) { 3347 if ( syncOK ) {
3343 if ( syncManager->mWriteBackFile ) { 3348 if ( syncManager->mWriteBackFile ) {
3344 abLocal.removeSyncAddressees( false ); 3349 abLocal.removeSyncAddressees( false );
3345 message(i18n("Saving DTM address data..."),false); 3350 message(i18n("Saving DTM address data..."),false);
3346 abLocal.saveAB(); 3351 abLocal.saveAB();
3347 message(i18n("Sync postprocessing..."),false); 3352 message(i18n("Sync postprocessing..."),false);
3348 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3353 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3349 } 3354 }
3350 } else 3355 } else
3351 message( i18n("Sync cancelled or failed.") ); 3356 message( i18n("Sync cancelled or failed.") );
3352 setModified(); 3357 setModified();
3353 } 3358 }
3354 abLocal.removeResources(); 3359 abLocal.removeResources();
3355 if ( syncOK ) { 3360 if ( syncOK ) {
3356 mViewManager->refreshView(); 3361 mViewManager->refreshView();
3357 message(i18n("DTM syncing finished.")); 3362 message(i18n("DTM syncing finished."));
3358 } 3363 }
3359 disableBR( false ); 3364 disableBR( false );
3360 return syncOK; 3365 return syncOK;
3361 3366
3362} 3367}
3363void KABCore::message( QString m, bool startTimer) 3368void KABCore::message( QString m, bool startTimer)
3364{ 3369{
3365 topLevelWidget()->setCaption( m ); 3370 topLevelWidget()->setCaption( m );
3366 qApp->processEvents(); 3371 qApp->processEvents();
3367 if ( startTimer ) 3372 if ( startTimer )
3368 mMessageTimer->start( 15000, true ); 3373 mMessageTimer->start( 15000, true );
3369 else 3374 else
3370 mMessageTimer->stop(); 3375 mMessageTimer->stop();
3371} 3376}
3372bool KABCore::syncPhone() 3377bool KABCore::syncPhone()
3373{ 3378{
3374 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 3379 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
3375 QString fileName = getPhoneFile(); 3380 QString fileName = getPhoneFile();
3376 if ( !PhoneAccess::readFromPhone( fileName) ) { 3381 if ( !PhoneAccess::readFromPhone( fileName) ) {
3377 message(i18n("Phone access failed!")); 3382 message(i18n("Phone access failed!"));
3378 return false; 3383 return false;
3379 } 3384 }
3380 AddressBook abLocal( fileName,"syncContact"); 3385 AddressBook abLocal( fileName,"syncContact");
3381 bool syncOK = false; 3386 bool syncOK = false;
3382 { 3387 {
3383 abLocal.importFromFile( fileName ); 3388 abLocal.importFromFile( fileName );
3384 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); 3389 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1());
3385 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3390 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3386 abLocal.preparePhoneSync( mCurrentSyncDevice, true ); 3391 abLocal.preparePhoneSync( mCurrentSyncDevice, true );
3387 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); 3392 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
3388 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 3393 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
3389 syncManager->hideProgressBar(); 3394 syncManager->hideProgressBar();
3390 if ( syncOK ) { 3395 if ( syncOK ) {
3391 if ( syncManager->mWriteBackFile ) { 3396 if ( syncManager->mWriteBackFile ) {
3392 abLocal.removeSyncAddressees( true ); 3397 abLocal.removeSyncAddressees( true );
3393 abLocal.saveABphone( fileName ); 3398 abLocal.saveABphone( fileName );
3394 abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); 3399 abLocal.findNewExtIds( fileName, mCurrentSyncDevice );
3395 //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); 3400 //abLocal.preparePhoneSync( mCurrentSyncDevice, false );
3396 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3401 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3397 } 3402 }
3398 } 3403 }
3399 setModified(); 3404 setModified();
3400 } 3405 }
3401 abLocal.removeResources(); 3406 abLocal.removeResources();
3402 if ( syncOK ) 3407 if ( syncOK )
3403 mViewManager->refreshView(); 3408 mViewManager->refreshView();
3404 return syncOK; 3409 return syncOK;
3405} 3410}
3406void KABCore::getFile( bool success ) 3411void KABCore::getFile( bool success )
3407{ 3412{
3408 if ( ! success ) { 3413 if ( ! success ) {
3409 message( i18n("Error receiving file. Nothing changed!") ); 3414 message( i18n("Error receiving file. Nothing changed!") );
3410 return; 3415 return;
3411 } 3416 }
3412 int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); 3417 int count = mAddressBook->importFromFile( sentSyncFile() , false, true );
3413 if ( count ) 3418 if ( count )
3414 setModified( true ); 3419 setModified( true );
3415 message( i18n("Pi-Sync successful!") ); 3420 message( i18n("Pi-Sync successful!") );
3416 mViewManager->refreshView(); 3421 mViewManager->refreshView();
3417} 3422}
3418void KABCore::syncFileRequest() 3423void KABCore::syncFileRequest()
3419{ 3424{
3420 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { 3425 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) {
3421 syncManager->slotSyncMenu( 999 ); 3426 syncManager->slotSyncMenu( 999 );
3422 } 3427 }
3423 mAddressBook->export2File( sentSyncFile() ); 3428 mAddressBook->export2File( sentSyncFile() );
3424} 3429}
3425QString KABCore::sentSyncFile() 3430QString KABCore::sentSyncFile()
3426{ 3431{
3427#ifdef DESKTOP_VERSION 3432#ifdef DESKTOP_VERSION
3428 return locateLocal( "tmp", "copysyncab.vcf" ); 3433 return locateLocal( "tmp", "copysyncab.vcf" );
3429#else 3434#else
3430 return QString( "/tmp/copysyncab.vcf" ); 3435 return QString( "/tmp/copysyncab.vcf" );
3431#endif 3436#endif
3432} 3437}
3433 3438
3434void KABCore::setCaptionBack() 3439void KABCore::setCaptionBack()
3435{ 3440{
3436 mMessageTimer->stop(); 3441 mMessageTimer->stop();
3437 topLevelWidget()->setCaption( i18n("KA/Pi") ); 3442 topLevelWidget()->setCaption( i18n("KA/Pi") );
3438} 3443}
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index 6479a58..ceeeda7 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -1,530 +1,531 @@
1/* 1/*
2 This file is part of KAddressbook. 2 This file is part of KAddressbook.
3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#ifndef KABCORE_H 24#ifndef KABCORE_H
25#define KABCORE_H 25#define KABCORE_H
26 26
27#include <kabc/field.h> 27#include <kabc/field.h>
28 28
29#ifndef KAB_EMBEDDED 29#ifndef KAB_EMBEDDED
30#endif //KAB_EMBEDDED 30#endif //KAB_EMBEDDED
31#include <qdict.h> 31#include <qdict.h>
32#include <qtimer.h> 32#include <qtimer.h>
33 33
34#include <qwidget.h> 34#include <qwidget.h>
35#include <qpopupmenu.h> 35#include <qpopupmenu.h>
36#include <ksyncmanager.h> 36#include <ksyncmanager.h>
37#ifndef DESKTOP_VERSION 37#ifndef DESKTOP_VERSION
38#include <qcopchannel_qws.h> 38#include <qcopchannel_qws.h>
39#endif 39#endif
40 40
41namespace KABC { 41namespace KABC {
42class AddressBook; 42class AddressBook;
43} 43}
44 44
45#ifndef KAB_EMBEDDED 45#ifndef KAB_EMBEDDED
46class KAboutData; 46class KAboutData;
47class KConfig; 47class KConfig;
48 48
49class KAddressBookService; 49class KAddressBookService;
50class LDAPSearchDialog; 50class LDAPSearchDialog;
51#else //KAB_EMBEDDED 51#else //KAB_EMBEDDED
52class KAddressBookMain; 52class KAddressBookMain;
53//US class QAction; 53//US class QAction;
54#endif //KAB_EMBEDDED 54#endif //KAB_EMBEDDED
55class KCMultiDialog; 55class KCMultiDialog;
56class KXMLGUIClient; 56class KXMLGUIClient;
57class ExtensionManager; 57class ExtensionManager;
58class XXPortManager; 58class XXPortManager;
59class JumpButtonBar; 59class JumpButtonBar;
60class IncSearchWidget; 60class IncSearchWidget;
61class KDGanttMinimizeSplitter; 61class KDGanttMinimizeSplitter;
62class KAction; 62class KAction;
63class KActionCollection; 63class KActionCollection;
64class KToggleAction; 64class KToggleAction;
65class KSyncProfile; 65class KSyncProfile;
66 66
67class QAction; 67class QAction;
68class QMenuBar; 68class QMenuBar;
69class QSplitter; 69class QSplitter;
70class ViewContainer; 70class ViewContainer;
71class ViewManager; 71class ViewManager;
72class AddresseeEditorDialog; 72class AddresseeEditorDialog;
73class Ir; 73class Ir;
74 74
75class KABCore : public QWidget, public KSyncInterface 75class KABCore : public QWidget, public KSyncInterface
76{ 76{
77 Q_OBJECT 77 Q_OBJECT
78 78
79 public: 79 public:
80 KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name = 0 ); 80 KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name = 0 );
81 81
82 82
83 ~KABCore(); 83 ~KABCore();
84 84
85 85
86#ifdef KAB_EMBEDDED 86#ifdef KAB_EMBEDDED
87 //US added functionality 87 //US added functionality
88 QPopupMenu* getViewMenu() {return viewMenu;} 88 QPopupMenu* getViewMenu() {return viewMenu;}
89 QPopupMenu* getFilterMenu() {return filterMenu;} 89 QPopupMenu* getFilterMenu() {return filterMenu;}
90 QPopupMenu* getSettingsMenu() {return settingsMenu;} 90 QPopupMenu* getSettingsMenu() {return settingsMenu;}
91 void addActionsManually(); 91 void addActionsManually();
92#endif //KAB_EMBEDDED 92#endif //KAB_EMBEDDED
93 /** 93 /**
94 Restores the global settings. 94 Restores the global settings.
95 */ 95 */
96 void restoreSettings(); 96 void restoreSettings();
97 97
98 98
99 99
100 /** 100 /**
101 Returns a pointer to the StdAddressBook of the application. 101 Returns a pointer to the StdAddressBook of the application.
102 */ 102 */
103 KABC::AddressBook *addressBook() const; 103 KABC::AddressBook *addressBook() const;
104 104
105 /** 105 /**
106 Returns a pointer to the KConfig object of the application. 106 Returns a pointer to the KConfig object of the application.
107 */ 107 */
108 static KConfig *config(); 108 static KConfig *config();
109 109
110 /** 110 /**
111 Returns a pointer to the global KActionCollection object. So 111 Returns a pointer to the global KActionCollection object. So
112 other classes can register their actions easily. 112 other classes can register their actions easily.
113 */ 113 */
114 KActionCollection *actionCollection() const; 114 KActionCollection *actionCollection() const;
115 115
116 /** 116 /**
117 Returns the current search field of the Incremental Search Widget. 117 Returns the current search field of the Incremental Search Widget.
118 */ 118 */
119 KABC::Field *currentSearchField() const; 119 KABC::Field *currentSearchField() const;
120 120
121 /** 121 /**
122 Returns the uid list of the currently selected contacts. 122 Returns the uid list of the currently selected contacts.
123 */ 123 */
124 QStringList selectedUIDs() const; 124 QStringList selectedUIDs() const;
125 125
126 /** 126 /**
127 Displays the ResourceSelectDialog and returns the selected 127 Displays the ResourceSelectDialog and returns the selected
128 resource or a null pointer if no resource was selected by 128 resource or a null pointer if no resource was selected by
129 the user. 129 the user.
130 */ 130 */
131 KABC::Resource *requestResource( QWidget *parent ); 131 KABC::Resource *requestResource( QWidget *parent );
132 132
133#ifndef KAB_EMBEDDED 133#ifndef KAB_EMBEDDED
134 static KAboutData *createAboutData(); 134 static KAboutData *createAboutData();
135#endif //KAB_EMBEDDED 135#endif //KAB_EMBEDDED
136 136
137#ifdef KAB_EMBEDDED 137#ifdef KAB_EMBEDDED
138 inline QPopupMenu* getImportMenu() { return ImportMenu;} 138 inline QPopupMenu* getImportMenu() { return ImportMenu;}
139 inline QPopupMenu* getExportMenu() { return ExportMenu;} 139 inline QPopupMenu* getExportMenu() { return ExportMenu;}
140#endif //KAB_EMBEDDED 140#endif //KAB_EMBEDDED
141 141
142 public slots: 142 public slots:
143#ifdef KAB_EMBEDDED 143#ifdef KAB_EMBEDDED
144 void createAboutData(); 144 void createAboutData();
145#endif //KAB_EMBEDDED 145#endif //KAB_EMBEDDED
146 void setDetailsToggle(); 146 void setDetailsToggle();
147 147
148 void showLicence(); 148 void showLicence();
149 void faq(); 149 void faq();
150 void whatsnew() ; 150 void whatsnew() ;
151 void synchowto() ; 151 void synchowto() ;
152 void storagehowto() ; 152 void storagehowto() ;
153 void multisynchowto() ; 153 void multisynchowto() ;
154 void kdesynchowto() ; 154 void kdesynchowto() ;
155 void writeToPhone(); 155 void writeToPhone();
156 156
157 /** 157 /**
158 Is called whenever a contact is selected in the view. 158 Is called whenever a contact is selected in the view.
159 */ 159 */
160 void setContactSelected( const QString &uid ); 160 void setContactSelected( const QString &uid );
161 161
162 /** 162 /**
163 Opens the preferred mail composer with all selected contacts as 163 Opens the preferred mail composer with all selected contacts as
164 arguments. 164 arguments.
165 */ 165 */
166 void sendMail(); 166 void sendMail();
167 167
168 /** 168 /**
169 Opens the preferred mail composer with the given contacts as 169 Opens the preferred mail composer with the given contacts as
170 arguments. 170 arguments.
171 */ 171 */
172 void sendMail( const QString& email ); 172 void sendMail( const QString& email );
173 173
174 174
175 void mailVCard(); 175 void mailVCard();
176 void mailVCard(const QStringList& uids); 176 void mailVCard(const QStringList& uids);
177 177
178 /** 178 /**
179 Beams the "WhoAmI contact. 179 Beams the "WhoAmI contact.
180 */ 180 */
181 void beamMySelf(); 181 void beamMySelf();
182 182
183 void beamVCard(); 183 void beamVCard();
184 void export2phone(); 184 void export2phone();
185 void beamVCard(const QStringList& uids); 185 void beamVCard(const QStringList& uids);
186 void beamDone( Ir *ir ); 186 void beamDone( Ir *ir );
187 187
188 188
189 /** 189 /**
190 Starts the preferred web browser with the given URL as argument. 190 Starts the preferred web browser with the given URL as argument.
191 */ 191 */
192 void browse( const QString& url ); 192 void browse( const QString& url );
193 193
194 /** 194 /**
195 Select all contacts in the view. 195 Select all contacts in the view.
196 */ 196 */
197 void selectAllContacts(); 197 void selectAllContacts();
198 198
199 /** 199 /**
200 Deletes all selected contacts from the address book. 200 Deletes all selected contacts from the address book.
201 */ 201 */
202 void deleteContacts(); 202 void deleteContacts();
203 203
204 /** 204 /**
205 Deletes given contacts from the address book. 205 Deletes given contacts from the address book.
206 206
207 @param uids The uids of the contacts, which shall be deleted. 207 @param uids The uids of the contacts, which shall be deleted.
208 */ 208 */
209 void deleteContacts( const QStringList &uids ); 209 void deleteContacts( const QStringList &uids );
210 210
211 /** 211 /**
212 Copys the selected contacts into clipboard for later pasting. 212 Copys the selected contacts into clipboard for later pasting.
213 */ 213 */
214 void copyContacts(); 214 void copyContacts();
215 215
216 /** 216 /**
217 Cuts the selected contacts and stores them for later pasting. 217 Cuts the selected contacts and stores them for later pasting.
218 */ 218 */
219 void cutContacts(); 219 void cutContacts();
220 220
221 /** 221 /**
222 Paste contacts from clipboard into the address book. 222 Paste contacts from clipboard into the address book.
223 */ 223 */
224 void pasteContacts(); 224 void pasteContacts();
225 225
226 /** 226 /**
227 Paste given contacts into the address book. 227 Paste given contacts into the address book.
228 228
229 @param list The list of addressee, which shall be pasted. 229 @param list The list of addressee, which shall be pasted.
230 */ 230 */
231 void pasteContacts( KABC::Addressee::List &list ); 231 void pasteContacts( KABC::Addressee::List &list );
232 232
233 /** 233 /**
234 Sets the whoAmI contact, that is used by many other programs to 234 Sets the whoAmI contact, that is used by many other programs to
235 get personal information about the current user. 235 get personal information about the current user.
236 */ 236 */
237 void setWhoAmI(); 237 void setWhoAmI();
238 238
239 /** 239 /**
240 Displays the category dialog and applies the result to all 240 Displays the category dialog and applies the result to all
241 selected contacts. 241 selected contacts.
242 */ 242 */
243 void setCategories(); 243 void setCategories();
244 void manageCategories(); 244 void manageCategories();
245 void editCategories(); 245 void editCategories();
246 246
247 /** 247 /**
248 Sets the field list of the Incremental Search Widget. 248 Sets the field list of the Incremental Search Widget.
249 */ 249 */
250 void setSearchFields( const KABC::Field::List &fields ); 250 void setSearchFields( const KABC::Field::List &fields );
251 251
252 /** 252 /**
253 Search with the current search field for a contact, that matches 253 Search with the current search field for a contact, that matches
254 the given text, and selects it in the view. 254 the given text, and selects it in the view.
255 */ 255 */
256 void incrementalSearch( const QString& text ); 256 void incrementalSearch( const QString& text );
257 void incrementalSearchJump( const QString& text ); 257 void incrementalSearchJump( const QString& text );
258 258
259 /** 259 /**
260 Marks the address book as modified. 260 Marks the address book as modified.
261 */ 261 */
262 void setModified(); 262 void setModified();
263 /** 263 /**
264 Marks the address book as modified without refreshing the view. 264 Marks the address book as modified without refreshing the view.
265 */ 265 */
266 void setModifiedWOrefresh(); 266 void setModifiedWOrefresh();
267 267
268 /** 268 /**
269 Marks the address book as modified concerning the argument. 269 Marks the address book as modified concerning the argument.
270 */ 270 */
271 void setModified( bool modified ); 271 void setModified( bool modified );
272 272
273 /** 273 /**
274 Returns whether the address book is modified. 274 Returns whether the address book is modified.
275 */ 275 */
276 bool modified() const; 276 bool modified() const;
277 277
278 /** 278 /**
279 Called whenever an contact is modified in the contact editor 279 Called whenever an contact is modified in the contact editor
280 dialog or the quick edit. 280 dialog or the quick edit.
281 */ 281 */
282 void contactModified( const KABC::Addressee &addr ); 282 void contactModified( const KABC::Addressee &addr );
283 void addrModified( const KABC::Addressee &addr, bool updateDetails = true ); 283 void addrModified( const KABC::Addressee &addr, bool updateDetails = true );
284 284
285 /** 285 /**
286 DCOP METHODS. 286 DCOP METHODS.
287 */ 287 */
288 void addEmail( QString addr ); 288 void addEmail( QString addr );
289 void importVCard( const KURL& url, bool showPreview ); 289 void importVCard( const KURL& url, bool showPreview );
290 void importVCard( const QString& vCard, bool showPreview ); 290 void importVCard( const QString& vCard, bool showPreview );
291 void newContact(); 291 void newContact();
292 QString getNameByPhone( const QString& phone ); 292 QString getNameByPhone( const QString& phone );
293 /** 293 /**
294 END DCOP METHODS 294 END DCOP METHODS
295 */ 295 */
296 296
297 /** 297 /**
298 Saves the contents of the AddressBook back to disk. 298 Saves the contents of the AddressBook back to disk.
299 */ 299 */
300 void save(); 300 void save();
301 301
302 /** 302 /**
303 Undos the last command using the undo stack. 303 Undos the last command using the undo stack.
304 */ 304 */
305 void undo(); 305 void undo();
306 306
307 /** 307 /**
308 Redos the last command that was undone, using the redo stack. 308 Redos the last command that was undone, using the redo stack.
309 */ 309 */
310 void redo(); 310 void redo();
311 311
312 /** 312 /**
313 Shows the edit dialog for the given uid. If the uid is QString::null, 313 Shows the edit dialog for the given uid. If the uid is QString::null,
314 the method will try to find a selected addressee in the view. 314 the method will try to find a selected addressee in the view.
315 */ 315 */
316 void editContact( const QString &uid /*US = QString::null*/ ); 316 void editContact( const QString &uid /*US = QString::null*/ );
317//US added a second method without defaultparameter 317//US added a second method without defaultparameter
318 void editContact2(); 318 void editContact2();
319 319
320 /** 320 /**
321 Shows or edits the detail view for the given uid. If the uid is QString::null, 321 Shows or edits the detail view for the given uid. If the uid is QString::null,
322 the method will try to find a selected addressee in the view. 322 the method will try to find a selected addressee in the view.
323 */ 323 */
324 void executeContact( const QString &uid /*US = QString::null*/ ); 324 void executeContact( const QString &uid /*US = QString::null*/ );
325 325
326 /** 326 /**
327 Launches the configuration dialog. 327 Launches the configuration dialog.
328 */ 328 */
329 void openConfigDialog(); 329 void openConfigDialog();
330 void openConfigGlobalDialog(); 330 void openConfigGlobalDialog();
331 331
332 /** 332 /**
333 Launches the ldap search dialog. 333 Launches the ldap search dialog.
334 */ 334 */
335 void openLDAPDialog(); 335 void openLDAPDialog();
336 336
337 /** 337 /**
338 Creates a KAddressBookPrinter, which will display the print 338 Creates a KAddressBookPrinter, which will display the print
339 dialog and do the printing. 339 dialog and do the printing.
340 */ 340 */
341 void print(); 341 void print();
342 342
343 /** 343 /**
344 Registers a new GUI client, so plugins can register its actions. 344 Registers a new GUI client, so plugins can register its actions.
345 */ 345 */
346 void addGUIClient( KXMLGUIClient *client ); 346 void addGUIClient( KXMLGUIClient *client );
347 347
348 void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); 348 void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid);
349 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); 349 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid);
350 void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); 350 void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid);
351 351
352 352
353 signals: 353 signals:
354 void contactSelected( const QString &name ); 354 void contactSelected( const QString &name );
355 void contactSelected( const QPixmap &pixmap ); 355 void contactSelected( const QPixmap &pixmap );
356 public slots: 356 public slots:
357 void recieve(QString cmsg ); 357 void recieve(QString cmsg );
358 void getFile( bool success ); 358 void getFile( bool success );
359 void syncFileRequest(); 359 void syncFileRequest();
360 void setDetailsVisible( bool visible ); 360 void setDetailsVisible( bool visible );
361 void setDetailsToState(); 361 void setDetailsToState();
362 362
363 void saveSettings(); 363 void saveSettings();
364 364
365 private slots: 365 private slots:
366 void updateToolBar(); 366 void updateToolBar();
367 void updateMainWindow(); 367 void updateMainWindow();
368 void receive( const QCString& cmsg, const QByteArray& data ); 368 void receive( const QCString& cmsg, const QByteArray& data );
369 void toggleBeamReceive( ); 369 void toggleBeamReceive( );
370 void disableBR(bool); 370 void disableBR(bool);
371 void setJumpButtonBarVisible( bool visible ); 371 void setJumpButtonBarVisible( bool visible );
372 void setJumpButtonBar( bool visible ); 372 void setJumpButtonBar( bool visible );
373 void setCaptionBack(); 373 void setCaptionBack();
374 void resizeAndCallContactdialog(); 374 void resizeAndCallContactdialog();
375 void callContactdialog(); 375 void callContactdialog();
376 void doRingSync();
376 377
377 void importFromOL(); 378 void importFromOL();
378 void extensionModified( const KABC::Addressee::List &list ); 379 void extensionModified( const KABC::Addressee::List &list );
379 void extensionChanged( int id ); 380 void extensionChanged( int id );
380 void clipboardDataChanged(); 381 void clipboardDataChanged();
381 void updateActionMenu(); 382 void updateActionMenu();
382 void configureKeyBindings(); 383 void configureKeyBindings();
383 void removeVoice(); 384 void removeVoice();
384 void setFormattedName(); 385 void setFormattedName();
385#ifdef KAB_EMBEDDED 386#ifdef KAB_EMBEDDED
386 void configureResources(); 387 void configureResources();
387#endif //KAB_EMBEDDED 388#endif //KAB_EMBEDDED
388 389
389 void slotEditorDestroyed( const QString &uid ); 390 void slotEditorDestroyed( const QString &uid );
390 void configurationChanged(); 391 void configurationChanged();
391 void addressBookChanged(); 392 void addressBookChanged();
392 393
393 private: 394 private:
394 QString mEmailSourceChannel; 395 QString mEmailSourceChannel;
395 QString mEmailSourceUID; 396 QString mEmailSourceUID;
396 void resizeEvent(QResizeEvent* e ); 397 void resizeEvent(QResizeEvent* e );
397 bool mBRdisabled; 398 bool mBRdisabled;
398#ifndef DESKTOP_VERSION 399#ifndef DESKTOP_VERSION
399 QCopChannel* infrared; 400 QCopChannel* infrared;
400#endif 401#endif
401 QTimer *mMessageTimer; 402 QTimer *mMessageTimer;
402 void initGUI(); 403 void initGUI();
403 void initActions(); 404 void initActions();
404 QString getPhoneFile(); 405 QString getPhoneFile();
405 406
406 AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, 407 AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent,
407 const char *name = 0 ); 408 const char *name = 0 );
408 409
409 KXMLGUIClient *mGUIClient; 410 KXMLGUIClient *mGUIClient;
410 411
411 KABC::AddressBook *mAddressBook; 412 KABC::AddressBook *mAddressBook;
412 413
413 ViewManager *mViewManager; 414 ViewManager *mViewManager;
414 // QSplitter *mDetailsSplitter; 415 // QSplitter *mDetailsSplitter;
415 KDGanttMinimizeSplitter *mExtensionBarSplitter; 416 KDGanttMinimizeSplitter *mExtensionBarSplitter;
416 ViewContainer *mDetails; 417 ViewContainer *mDetails;
417 KDGanttMinimizeSplitter* mMiniSplitter; 418 KDGanttMinimizeSplitter* mMiniSplitter;
418 XXPortManager *mXXPortManager; 419 XXPortManager *mXXPortManager;
419 JumpButtonBar *mJumpButtonBar; 420 JumpButtonBar *mJumpButtonBar;
420 IncSearchWidget *mIncSearchWidget; 421 IncSearchWidget *mIncSearchWidget;
421 ExtensionManager *mExtensionManager; 422 ExtensionManager *mExtensionManager;
422 423
423 KCMultiDialog *mConfigureDialog; 424 KCMultiDialog *mConfigureDialog;
424 425
425#ifndef KAB_EMBEDDED 426#ifndef KAB_EMBEDDED
426 LDAPSearchDialog *mLdapSearchDialog; 427 LDAPSearchDialog *mLdapSearchDialog;
427#endif //KAB_EMBEDDED 428#endif //KAB_EMBEDDED
428 // QDict<AddresseeEditorDialog> mEditorDict; 429 // QDict<AddresseeEditorDialog> mEditorDict;
429 AddresseeEditorDialog *mEditorDialog; 430 AddresseeEditorDialog *mEditorDialog;
430 bool mReadWrite; 431 bool mReadWrite;
431 bool mModified; 432 bool mModified;
432 bool mIsPart; 433 bool mIsPart;
433 bool mMultipleViewsAtOnce; 434 bool mMultipleViewsAtOnce;
434 435
435 436
436 //US file menu 437 //US file menu
437 KAction *mActionMail; 438 KAction *mActionMail;
438 KAction *mActionBeam; 439 KAction *mActionBeam;
439 KToggleAction *mActionBR; 440 KToggleAction *mActionBR;
440 KAction *mActionExport2phone; 441 KAction *mActionExport2phone;
441 KAction* mActionPrint; 442 KAction* mActionPrint;
442 KAction* mActionPrintDetails; 443 KAction* mActionPrintDetails;
443 KAction* mActionNewContact; 444 KAction* mActionNewContact;
444 KAction *mActionSave; 445 KAction *mActionSave;
445 KAction *mActionEditAddressee; 446 KAction *mActionEditAddressee;
446 KAction *mActionMailVCard; 447 KAction *mActionMailVCard;
447 KAction *mActionBeamVCard; 448 KAction *mActionBeamVCard;
448 449
449 KAction *mActionQuit; 450 KAction *mActionQuit;
450 451
451 //US edit menu 452 //US edit menu
452 KAction *mActionCopy; 453 KAction *mActionCopy;
453 KAction *mActionCut; 454 KAction *mActionCut;
454 KAction *mActionPaste; 455 KAction *mActionPaste;
455 KAction *mActionSelectAll; 456 KAction *mActionSelectAll;
456 KAction *mActionUndo; 457 KAction *mActionUndo;
457 KAction *mActionRedo; 458 KAction *mActionRedo;
458 KAction *mActionDelete; 459 KAction *mActionDelete;
459 460
460 //US settings menu 461 //US settings menu
461 KAction *mActionConfigResources; 462 KAction *mActionConfigResources;
462 KAction *mActionConfigGlobal; 463 KAction *mActionConfigGlobal;
463 KAction *mActionConfigKAddressbook; 464 KAction *mActionConfigKAddressbook;
464 KAction *mActionConfigShortcuts; 465 KAction *mActionConfigShortcuts;
465 KAction *mActionConfigureToolbars; 466 KAction *mActionConfigureToolbars;
466 KAction *mActionKeyBindings; 467 KAction *mActionKeyBindings;
467 KToggleAction *mActionJumpBar; 468 KToggleAction *mActionJumpBar;
468 KToggleAction *mActionDetails; 469 KToggleAction *mActionDetails;
469 KAction *mActionWhoAmI; 470 KAction *mActionWhoAmI;
470 KAction *mActionCategories; 471 KAction *mActionCategories;
471 KAction *mActionEditCategories; 472 KAction *mActionEditCategories;
472 KAction *mActionManageCategories; 473 KAction *mActionManageCategories;
473 KAction *mActionAboutKAddressbook; 474 KAction *mActionAboutKAddressbook;
474 KAction *mActionLicence; 475 KAction *mActionLicence;
475 KAction *mActionFaq; 476 KAction *mActionFaq;
476 KAction *mActionWN; 477 KAction *mActionWN;
477 KAction *mActionSyncHowto; 478 KAction *mActionSyncHowto;
478 KAction *mActionStorageHowto; 479 KAction *mActionStorageHowto;
479 KAction *mActionKdeSyncHowto; 480 KAction *mActionKdeSyncHowto;
480 KAction *mActionMultiSyncHowto; 481 KAction *mActionMultiSyncHowto;
481 482
482 KAction *mActionDeleteView; 483 KAction *mActionDeleteView;
483 484
484 QPopupMenu *viewMenu; 485 QPopupMenu *viewMenu;
485 QPopupMenu *filterMenu; 486 QPopupMenu *filterMenu;
486 QPopupMenu *settingsMenu; 487 QPopupMenu *settingsMenu;
487 QPopupMenu *changeMenu; 488 QPopupMenu *changeMenu;
488 QPopupMenu *beamMenu; 489 QPopupMenu *beamMenu;
489//US QAction *mActionSave; 490//US QAction *mActionSave;
490 QPopupMenu *ImportMenu; 491 QPopupMenu *ImportMenu;
491 QPopupMenu *ExportMenu; 492 QPopupMenu *ExportMenu;
492 //LR additional methods 493 //LR additional methods
493 KAction *mActionRemoveVoice; 494 KAction *mActionRemoveVoice;
494 KAction *mActionSetFormattedName; 495 KAction *mActionSetFormattedName;
495 KAction * mActionImportOL; 496 KAction * mActionImportOL;
496 497
497#ifndef KAB_EMBEDDED 498#ifndef KAB_EMBEDDED
498 KAddressBookService *mAddressBookService; 499 KAddressBookService *mAddressBookService;
499#endif //KAB_EMBEDDED 500#endif //KAB_EMBEDDED
500 501
501 class KABCorePrivate; 502 class KABCorePrivate;
502 KABCorePrivate *d; 503 KABCorePrivate *d;
503 //US bool mBlockSaveFlag; 504 //US bool mBlockSaveFlag;
504 505
505#ifdef KAB_EMBEDDED 506#ifdef KAB_EMBEDDED
506 KAddressBookMain *mMainWindow; // should be the same like mGUIClient 507 KAddressBookMain *mMainWindow; // should be the same like mGUIClient
507#endif //KAB_EMBEDDED 508#endif //KAB_EMBEDDED
508 509
509 //this are the overwritten callbackmethods from the syncinterface 510 //this are the overwritten callbackmethods from the syncinterface
510 virtual bool sync(KSyncManager* manager, QString filename, int mode); 511 virtual bool sync(KSyncManager* manager, QString filename, int mode);
511 virtual bool syncExternal(KSyncManager* manager, QString resource); 512 virtual bool syncExternal(KSyncManager* manager, QString resource);
512 virtual void removeSyncInfo( QString syncProfile); 513 virtual void removeSyncInfo( QString syncProfile);
513 bool syncPhone(); 514 bool syncPhone();
514 void message( QString m , bool startTimer = true); 515 void message( QString m , bool startTimer = true);
515 516
516 // LR ******************************* 517 // LR *******************************
517 // sync stuff! 518 // sync stuff!
518 QString sentSyncFile(); 519 QString sentSyncFile();
519 QPopupMenu *syncMenu; 520 QPopupMenu *syncMenu;
520 KSyncManager* syncManager; 521 KSyncManager* syncManager;
521 int mGlobalSyncMode; 522 int mGlobalSyncMode;
522 bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); 523 bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode);
523 KABC::Addressee getLastSyncAddressee(); 524 KABC::Addressee getLastSyncAddressee();
524 QDateTime mLastAddressbookSync; 525 QDateTime mLastAddressbookSync;
525 int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); 526 int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full );
526 // ********************* 527 // *********************
527 528
528}; 529};
529 530
530#endif 531#endif
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 68233e8..d8373a6 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1,2158 +1,2171 @@
1#include <stdlib.h> 1#include <stdlib.h>
2 2
3#include <qaction.h> 3#include <qaction.h>
4#include <qpopupmenu.h> 4#include <qpopupmenu.h>
5#include <qpainter.h> 5#include <qpainter.h>
6#include <qwhatsthis.h> 6#include <qwhatsthis.h>
7#include <qpushbutton.h> 7#include <qpushbutton.h>
8#include <qmessagebox.h> 8#include <qmessagebox.h>
9#include <qlineedit.h> 9#include <qlineedit.h>
10#include <qtextcodec.h> 10#include <qtextcodec.h>
11#include <qfile.h> 11#include <qfile.h>
12#include <qdir.h> 12#include <qdir.h>
13#include <qapp.h> 13#include <qapp.h>
14#include <qfileinfo.h> 14#include <qfileinfo.h>
15#include <qlabel.h> 15#include <qlabel.h>
16#include <qspinbox.h> 16#include <qspinbox.h>
17#include <qcheckbox.h> 17#include <qcheckbox.h>
18#include <qmap.h> 18#include <qmap.h>
19#include <qwmatrix.h> 19#include <qwmatrix.h>
20#include <qtextbrowser.h> 20#include <qtextbrowser.h>
21#include <qtextstream.h> 21#include <qtextstream.h>
22#ifndef DESKTOP_VERSION 22#ifndef DESKTOP_VERSION
23#include <qpe/global.h> 23#include <qpe/global.h>
24#include <qpe/qpemenubar.h> 24#include <qpe/qpemenubar.h>
25#include <qpe/qpetoolbar.h> 25#include <qpe/qpetoolbar.h>
26#include <qpe/resource.h> 26#include <qpe/resource.h>
27#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
28#include <qtopia/alarmserver.h> 28#include <qtopia/alarmserver.h>
29#include <qtopia/qcopenvelope_qws.h> 29#include <qtopia/qcopenvelope_qws.h>
30#include <unistd.h> // for sleep 30#include <unistd.h> // for sleep
31#else 31#else
32#include <qmenubar.h> 32#include <qmenubar.h>
33#include <qtoolbar.h> 33#include <qtoolbar.h>
34#include <qapplication.h> 34#include <qapplication.h>
35//#include <resource.h> 35//#include <resource.h>
36 36
37#endif 37#endif
38#include <libkcal/calendarlocal.h> 38#include <libkcal/calendarlocal.h>
39#include <libkcal/todo.h> 39#include <libkcal/todo.h>
40#include <libkcal/phoneformat.h> 40#include <libkcal/phoneformat.h>
41#include <libkdepim/ksyncprofile.h> 41#include <libkdepim/ksyncprofile.h>
42#include <libkdepim/phoneaccess.h> 42#include <libkdepim/phoneaccess.h>
43#include <libkcal/kincidenceformatter.h> 43#include <libkcal/kincidenceformatter.h>
44#include <libkdepim/kpimglobalprefs.h> 44#include <libkdepim/kpimglobalprefs.h>
45 45
46#include "calendarview.h" 46#include "calendarview.h"
47#include "koviewmanager.h" 47#include "koviewmanager.h"
48#include "datenavigator.h" 48#include "datenavigator.h"
49#include "koagendaview.h" 49#include "koagendaview.h"
50#include "koagenda.h" 50#include "koagenda.h"
51#include "kodialogmanager.h" 51#include "kodialogmanager.h"
52#include "kdialogbase.h" 52#include "kdialogbase.h"
53#include "kapplication.h" 53#include "kapplication.h"
54#include "kofilterview.h" 54#include "kofilterview.h"
55#include "kstandarddirs.h" 55#include "kstandarddirs.h"
56#include "koprefs.h" 56#include "koprefs.h"
57#include "kfiledialog.h" 57#include "kfiledialog.h"
58#include "koglobals.h" 58#include "koglobals.h"
59#include "kglobal.h" 59#include "kglobal.h"
60#include "ktoolbar.h" 60#include "ktoolbar.h"
61#include "klocale.h" 61#include "klocale.h"
62#include "kconfig.h" 62#include "kconfig.h"
63#include "externalapphandler.h" 63#include "externalapphandler.h"
64#include <kglobalsettings.h> 64#include <kglobalsettings.h>
65 65
66using namespace KCal; 66using namespace KCal;
67#ifndef _WIN32_ 67#ifndef _WIN32_
68#include <unistd.h> 68#include <unistd.h>
69#else 69#else
70#ifdef _OL_IMPORT_ 70#ifdef _OL_IMPORT_
71#include "koimportoldialog.h" 71#include "koimportoldialog.h"
72#endif 72#endif
73#endif 73#endif
74#include "mainwindow.h" 74#include "mainwindow.h"
75 75
76 76
77class KOex2phonePrefs : public QDialog 77class KOex2phonePrefs : public QDialog
78{ 78{
79 public: 79 public:
80 KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : 80 KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) :
81 QDialog( parent, name, true ) 81 QDialog( parent, name, true )
82 { 82 {
83 setCaption( i18n("Export to phone options") ); 83 setCaption( i18n("Export to phone options") );
84 QVBoxLayout* lay = new QVBoxLayout( this ); 84 QVBoxLayout* lay = new QVBoxLayout( this );
85 lay->setSpacing( 3 ); 85 lay->setSpacing( 3 );
86 lay->setMargin( 3 ); 86 lay->setMargin( 3 );
87 QLabel *lab; 87 QLabel *lab;
88 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 88 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
89 lab->setAlignment (AlignHCenter ); 89 lab->setAlignment (AlignHCenter );
90 QHBox* temphb; 90 QHBox* temphb;
91 temphb = new QHBox( this ); 91 temphb = new QHBox( this );
92 new QLabel( i18n("I/O device: "), temphb ); 92 new QLabel( i18n("I/O device: "), temphb );
93 mPhoneDevice = new QLineEdit( temphb); 93 mPhoneDevice = new QLineEdit( temphb);
94 lay->addWidget( temphb ); 94 lay->addWidget( temphb );
95 temphb = new QHBox( this ); 95 temphb = new QHBox( this );
96 new QLabel( i18n("Connection: "), temphb ); 96 new QLabel( i18n("Connection: "), temphb );
97 mPhoneConnection = new QLineEdit( temphb); 97 mPhoneConnection = new QLineEdit( temphb);
98 lay->addWidget( temphb ); 98 lay->addWidget( temphb );
99 temphb = new QHBox( this ); 99 temphb = new QHBox( this );
100 new QLabel( i18n("Model(opt.): "), temphb ); 100 new QLabel( i18n("Model(opt.): "), temphb );
101 mPhoneModel = new QLineEdit( temphb); 101 mPhoneModel = new QLineEdit( temphb);
102 lay->addWidget( temphb ); 102 lay->addWidget( temphb );
103 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); 103 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this );
104 mWriteBackFuture->setChecked( true ); 104 mWriteBackFuture->setChecked( true );
105 lay->addWidget( mWriteBackFuture ); 105 lay->addWidget( mWriteBackFuture );
106 temphb = new QHBox( this ); 106 temphb = new QHBox( this );
107 new QLabel( i18n("Max. weeks in future: ") , temphb ); 107 new QLabel( i18n("Max. weeks in future: ") , temphb );
108 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); 108 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb);
109 mWriteBackFutureWeeks->setValue( 8 ); 109 mWriteBackFutureWeeks->setValue( 8 );
110 lay->addWidget( temphb ); 110 lay->addWidget( temphb );
111 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); 111 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) );
112 lab->setAlignment (AlignHCenter ); 112 lab->setAlignment (AlignHCenter );
113 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 113 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
114 lay->addWidget( ok ); 114 lay->addWidget( ok );
115 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 115 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
116 lay->addWidget( cancel ); 116 lay->addWidget( cancel );
117 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 117 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
118 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 118 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
119 resize( 220, 240 ); 119 resize( 220, 240 );
120 qApp->processEvents(); 120 qApp->processEvents();
121 int dw = QApplication::desktop()->width(); 121 int dw = QApplication::desktop()->width();
122 int dh = QApplication::desktop()->height(); 122 int dh = QApplication::desktop()->height();
123 move( (dw-width())/2, (dh - height() )/2 ); 123 move( (dw-width())/2, (dh - height() )/2 );
124 } 124 }
125 125
126public: 126public:
127 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 127 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
128 QCheckBox* mWriteBackFuture; 128 QCheckBox* mWriteBackFuture;
129 QSpinBox* mWriteBackFutureWeeks; 129 QSpinBox* mWriteBackFutureWeeks;
130}; 130};
131 131
132QPixmap* sgListViewCompletedPix[6]; 132QPixmap* sgListViewCompletedPix[6];
133 133
134 134
135int globalFlagBlockStartup; 135int globalFlagBlockStartup;
136MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : 136MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
137 QMainWindow( parent, name ) 137 QMainWindow( parent, name )
138{ 138{
139 sgListViewCompletedPix[5] = &listviewPix; 139 sgListViewCompletedPix[5] = &listviewPix;
140 sgListViewCompletedPix[0] = &listviewPix0; 140 sgListViewCompletedPix[0] = &listviewPix0;
141 sgListViewCompletedPix[1] = &listviewPix20; 141 sgListViewCompletedPix[1] = &listviewPix20;
142 sgListViewCompletedPix[2] = &listviewPix40; 142 sgListViewCompletedPix[2] = &listviewPix40;
143 sgListViewCompletedPix[3] = &listviewPix60; 143 sgListViewCompletedPix[3] = &listviewPix60;
144 sgListViewCompletedPix[4] = &listviewPix80; 144 sgListViewCompletedPix[4] = &listviewPix80;
145 if ( sgListViewCompletedPix[5]->height() < 5 ) { 145 if ( sgListViewCompletedPix[5]->height() < 5 ) {
146 int size = 12; 146 int size = 12;
147 sgListViewCompletedPix[5]->resize( 11, 11 ); 147 sgListViewCompletedPix[5]->resize( 11, 11 );
148 sgListViewCompletedPix[5]->fill( Qt::white ); 148 sgListViewCompletedPix[5]->fill( Qt::white );
149 QPainter p ( sgListViewCompletedPix[5] ); 149 QPainter p ( sgListViewCompletedPix[5] );
150 p.drawRect( 0,0,11,11); 150 p.drawRect( 0,0,11,11);
151 int half = size/2; 151 int half = size/2;
152 int heihei = size/2; 152 int heihei = size/2;
153 int x = 1; 153 int x = 1;
154 p.drawLine ( 2, 5, 4 , 7 ) ; 154 p.drawLine ( 2, 5, 4 , 7 ) ;
155 p.drawLine ( 4 , 7 , 8, 3) ; 155 p.drawLine ( 4 , 7 , 8, 3) ;
156 int iii = 0; 156 int iii = 0;
157 for ( iii = 0; iii < 5; ++iii ) { 157 for ( iii = 0; iii < 5; ++iii ) {
158 sgListViewCompletedPix[iii]->resize( 11, 11 ); 158 sgListViewCompletedPix[iii]->resize( 11, 11 );
159 sgListViewCompletedPix[iii]->fill( Qt::white ); 159 sgListViewCompletedPix[iii]->fill( Qt::white );
160 QPainter p ( sgListViewCompletedPix[iii] ); 160 QPainter p ( sgListViewCompletedPix[iii] );
161 p.drawRect( 0,0,11,11); 161 p.drawRect( 0,0,11,11);
162 if ( iii ) 162 if ( iii )
163 p.fillRect( 1,1,iii*2,9,Qt::gray ); 163 p.fillRect( 1,1,iii*2,9,Qt::gray );
164 } 164 }
165 } 165 }
166 mClosed = false; 166 mClosed = false;
167 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 167 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
168 QString confFile = locateLocal("config","korganizerrc"); 168 QString confFile = locateLocal("config","korganizerrc");
169 QFileInfo finf ( confFile ); 169 QFileInfo finf ( confFile );
170 bool showWarning = !finf.exists(); 170 bool showWarning = !finf.exists();
171 setIcon(SmallIcon( "ko24" ) ); 171 setIcon(SmallIcon( "ko24" ) );
172 mBlockAtStartup = true; 172 mBlockAtStartup = true;
173 mFlagKeyPressed = false; 173 mFlagKeyPressed = false;
174 setCaption("KO/Pi"); 174 setCaption("KO/Pi");
175 KOPrefs *p = KOPrefs::instance(); 175 KOPrefs *p = KOPrefs::instance();
176 //KPimGlobalPrefs::instance()->setGlobalConfig(); 176 //KPimGlobalPrefs::instance()->setGlobalConfig();
177 p->mCurrentDisplayedView = 0; 177 p->mCurrentDisplayedView = 0;
178 if ( p->mHourSize > 22 ) 178 if ( p->mHourSize > 22 )
179 p->mHourSize = 22; 179 p->mHourSize = 22;
180 QMainWindow::ToolBarDock tbd; 180 QMainWindow::ToolBarDock tbd;
181 if ( p->mToolBarHor ) { 181 if ( p->mToolBarHor ) {
182 if ( p->mToolBarUp ) 182 if ( p->mToolBarUp )
183 tbd = Bottom; 183 tbd = Bottom;
184 else 184 else
185 tbd = Top; 185 tbd = Top;
186 } 186 }
187 else { 187 else {
188 if ( p->mToolBarUp ) 188 if ( p->mToolBarUp )
189 tbd = Right; 189 tbd = Right;
190 else 190 else
191 tbd = Left; 191 tbd = Left;
192 } 192 }
193 if ( KOPrefs::instance()->mUseAppColors ) 193 if ( KOPrefs::instance()->mUseAppColors )
194 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 194 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
195 globalFlagBlockStartup = 1; 195 globalFlagBlockStartup = 1;
196 iconToolBar = new QPEToolBar( this ); 196 iconToolBar = new QPEToolBar( this );
197 addToolBar (iconToolBar , tbd ); 197 addToolBar (iconToolBar , tbd );
198 198
199#ifdef DESKTOP_VERSION 199#ifdef DESKTOP_VERSION
200 if ( KOPrefs::instance()->mShowIconFilter ) 200 if ( KOPrefs::instance()->mShowIconFilter )
201#else 201#else
202 if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar ) 202 if ( KOPrefs::instance()->mShowIconFilter || !p->mShowIconOnetoolbar )
203#endif 203#endif
204 204
205{ 205{
206 if ( p->mToolBarHorF ) { 206 if ( p->mToolBarHorF ) {
207 if ( p->mToolBarUpF ) 207 if ( p->mToolBarUpF )
208 tbd = Bottom; 208 tbd = Bottom;
209 else 209 else
210 tbd = Top; 210 tbd = Top;
211 } 211 }
212 else { 212 else {
213 if ( p->mToolBarUpF ) 213 if ( p->mToolBarUpF )
214 tbd = Right; 214 tbd = Right;
215 else 215 else
216 tbd = Left; 216 tbd = Left;
217 } 217 }
218 filterToolBar = new QPEToolBar ( this ); 218 filterToolBar = new QPEToolBar ( this );
219 filterMenubar = new QMenuBar( 0 ); 219 filterMenubar = new QMenuBar( 0 );
220 QFontMetrics fm ( filterMenubar->font() ); 220 QFontMetrics fm ( filterMenubar->font() );
221 221
222 filterPopupMenu = new QPopupMenu( this ); 222 filterPopupMenu = new QPopupMenu( this );
223 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); 223 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 );
224 QString addTest = "A"; 224 QString addTest = "A";
225 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); 225 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) );
226#ifdef DESKTOP_VERSION 226#ifdef DESKTOP_VERSION
227 addTest = "AAABBBCCCx"; 227 addTest = "AAABBBCCCx";
228#else 228#else
229 addTest = "AAx"; 229 addTest = "AAx";
230#endif 230#endif
231 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) ); 231 filterMenubar->setMaximumWidth( fm.width( i18n("No Filter")+addTest ) );
232 addToolBar (filterToolBar , tbd ); 232 addToolBar (filterToolBar , tbd );
233 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) ); 233 connect ( filterPopupMenu , SIGNAL( activated ( int ) ), this, SLOT (selectFilterPopup( int ) ) );
234 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) ); 234 connect ( filterPopupMenu , SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenuPopup() ) );
235 if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar ) 235 if ( !KOPrefs::instance()->mShowIconFilter && !p->mShowIconOnetoolbar )
236 filterToolBar->hide(); 236 filterToolBar->hide();
237 } else { 237 } else {
238 filterToolBar = 0; 238 filterToolBar = 0;
239 filterMenubar = 0; 239 filterMenubar = 0;
240 filterPopupMenu = 0; 240 filterPopupMenu = 0;
241 } 241 }
242 if ( p->mShowIconOnetoolbar ) { 242 if ( p->mShowIconOnetoolbar ) {
243 viewToolBar = iconToolBar ; 243 viewToolBar = iconToolBar ;
244 navigatorToolBar = iconToolBar ; 244 navigatorToolBar = iconToolBar ;
245 } else { 245 } else {
246#ifndef DESKTOP_VERSION 246#ifndef DESKTOP_VERSION
247 setToolBarsMovable( false ); 247 setToolBarsMovable( false );
248#endif 248#endif
249 if ( p->mToolBarHorV ) { 249 if ( p->mToolBarHorV ) {
250 if ( p->mToolBarUpV ) 250 if ( p->mToolBarUpV )
251 tbd = Bottom; 251 tbd = Bottom;
252 else 252 else
253 tbd = Top; 253 tbd = Top;
254 } 254 }
255 else { 255 else {
256 if ( p->mToolBarUpV ) 256 if ( p->mToolBarUpV )
257 tbd = Right; 257 tbd = Right;
258 else 258 else
259 tbd = Left; 259 tbd = Left;
260 } 260 }
261 viewToolBar = new QPEToolBar( this ); 261 viewToolBar = new QPEToolBar( this );
262 addToolBar (viewToolBar , tbd ); 262 addToolBar (viewToolBar , tbd );
263 if ( p->mToolBarHorN ) { 263 if ( p->mToolBarHorN ) {
264 if ( p->mToolBarUpN ) 264 if ( p->mToolBarUpN )
265 tbd = Bottom; 265 tbd = Bottom;
266 else 266 else
267 tbd = Top; 267 tbd = Top;
268 } 268 }
269 else { 269 else {
270 if ( p->mToolBarUpN ) 270 if ( p->mToolBarUpN )
271 tbd = Right; 271 tbd = Right;
272 else 272 else
273 tbd = Left; 273 tbd = Left;
274 } 274 }
275 navigatorToolBar = new QPEToolBar( this ); 275 navigatorToolBar = new QPEToolBar( this );
276 addToolBar (navigatorToolBar , tbd ); 276 addToolBar (navigatorToolBar , tbd );
277 } 277 }
278 278
279 279
280 280
281 mCalendarModifiedFlag = false; 281 mCalendarModifiedFlag = false;
282 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); 282 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this );
283 splash->setAlignment ( AlignCenter ); 283 splash->setAlignment ( AlignCenter );
284 setCentralWidget( splash ); 284 setCentralWidget( splash );
285#ifndef DESKTOP_VERSION 285#ifndef DESKTOP_VERSION
286 showMaximized(); 286 showMaximized();
287#endif 287#endif
288 288
289 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); 289 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ());
290 setDefaultPreferences(); 290 setDefaultPreferences();
291 mCalendar = new CalendarLocal(); 291 mCalendar = new CalendarLocal();
292 mView = new CalendarView( mCalendar, this,"mCalendar " ); 292 mView = new CalendarView( mCalendar, this,"mCalendar " );
293 mView->hide(); 293 mView->hide();
294 //mView->resize(splash->size() ); 294 //mView->resize(splash->size() );
295 initActions(); 295 initActions();
296 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); 296 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu);
297 mSyncManager->setBlockSave(false); 297 mSyncManager->setBlockSave(false);
298 mView->setSyncManager(mSyncManager); 298 mView->setSyncManager(mSyncManager);
299#ifndef DESKTOP_VERSION 299#ifndef DESKTOP_VERSION
300 iconToolBar->show(); 300 iconToolBar->show();
301 qApp->processEvents(); 301 qApp->processEvents();
302#endif 302#endif
303 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); 303 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ());
304 int vh = height() ; 304 int vh = height() ;
305 int vw = width(); 305 int vw = width();
306 //qDebug("Toolbar hei %d ",iconToolBar->height() ); 306 //qDebug("Toolbar hei %d ",iconToolBar->height() );
307 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 307 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
308 vh -= iconToolBar->height(); 308 vh -= iconToolBar->height();
309 } else { 309 } else {
310 vw -= iconToolBar->height(); 310 vw -= iconToolBar->height();
311 } 311 }
312 //mView->setMaximumSize( splash->size() ); 312 //mView->setMaximumSize( splash->size() );
313 //mView->resize( splash->size() ); 313 //mView->resize( splash->size() );
314 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 314 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
315 mView->readSettings(); 315 mView->readSettings();
316 bool newFile = false; 316 bool newFile = false;
317 if( !QFile::exists( defaultFileName() ) ) { 317 if( !QFile::exists( defaultFileName() ) ) {
318 QFileInfo finfo ( defaultFileName() ); 318 QFileInfo finfo ( defaultFileName() );
319 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); 319 QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics");
320 QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; 320 QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n";
321 finfo.setFile( oldFile ); 321 finfo.setFile( oldFile );
322 if (finfo.exists() ) { 322 if (finfo.exists() ) {
323 KMessageBox::information( this, message); 323 KMessageBox::information( this, message);
324 mView->openCalendar( oldFile ); 324 mView->openCalendar( oldFile );
325 qApp->processEvents(); 325 qApp->processEvents();
326 } else { 326 } else {
327 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); 327 oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics");
328 finfo.setFile( oldFile ); 328 finfo.setFile( oldFile );
329 if (finfo.exists() ) { 329 if (finfo.exists() ) {
330 KMessageBox::information( this, message); 330 KMessageBox::information( this, message);
331 mView->openCalendar( oldFile ); 331 mView->openCalendar( oldFile );
332 qApp->processEvents(); 332 qApp->processEvents();
333 } 333 }
334 } 334 }
335 mView->saveCalendar( defaultFileName() ); 335 mView->saveCalendar( defaultFileName() );
336 newFile = true; 336 newFile = true;
337 } 337 }
338 338
339 QTime neededSaveTime = QDateTime::currentDateTime().time(); 339 QTime neededSaveTime = QDateTime::currentDateTime().time();
340 mView->loadCalendars(); 340 mView->loadCalendars();
341 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 341 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
342 qDebug("KO: Calendar loading time: %d ms",msNeeded ); 342 qDebug("KO: Calendar loading time: %d ms",msNeeded );
343 343
344 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { 344 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) {
345 KOPrefs::instance()->setAllDefaults(); 345 KOPrefs::instance()->setAllDefaults();
346 int count = mView->addCategories(); 346 int count = mView->addCategories();
347 } 347 }
348 processIncidenceSelection( 0 ); 348 processIncidenceSelection( 0 );
349 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), 349 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
350 SLOT( processIncidenceSelection( Incidence * ) ) ); 350 SLOT( processIncidenceSelection( Incidence * ) ) );
351 connect( mView, SIGNAL( modifiedChanged( bool ) ), 351 connect( mView, SIGNAL( modifiedChanged( bool ) ),
352 SLOT( slotModifiedChanged( bool ) ) ); 352 SLOT( slotModifiedChanged( bool ) ) );
353 353
354 354
355 connect( mView, SIGNAL( tempDisableBR(bool) ), 355 connect( mView, SIGNAL( tempDisableBR(bool) ),
356 SLOT( disableBR(bool) ) ); 356 SLOT( disableBR(bool) ) );
357 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); 357 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
358 mView->setModified( false ); 358 mView->setModified( false );
359 mBlockAtStartup = false; 359 mBlockAtStartup = false;
360 mView->setModified( false ); 360 mView->setModified( false );
361 setCentralWidget( mView ); 361 setCentralWidget( mView );
362 globalFlagBlockStartup = 0; 362 globalFlagBlockStartup = 0;
363 mView->show(); 363 mView->show();
364 delete splash; 364 delete splash;
365 if ( newFile ) 365 if ( newFile )
366 mView->updateConfig(); 366 mView->updateConfig();
367 // qApp->processEvents(); 367 // qApp->processEvents();
368 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); 368 //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
369 //fillSyncMenu(); 369 //fillSyncMenu();
370 370
371 371
372 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); 372 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
373 connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); 373 connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
374 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); 374 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
375 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 375 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
376 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 376 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
377 mSyncManager->setDefaultFileName( sentSyncFile()); 377 mSyncManager->setDefaultFileName( sentSyncFile());
378 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); 378 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
379 mSyncManager->fillSyncMenu(); 379 mSyncManager->fillSyncMenu();
380 380
381 381
382 382
383 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); 383 mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
384 if ( showWarning ) { 384 if ( showWarning ) {
385 KMessageBox::information( this, 385 KMessageBox::information( this,
386 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); 386 "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information");
387 qApp->processEvents(); 387 qApp->processEvents();
388 mView->dialogManager()->showSyncOptions(); 388 mView->dialogManager()->showSyncOptions();
389 } 389 }
390 390
391 //US listen for result adressed from Ka/Pi 391 //US listen for result adressed from Ka/Pi
392#ifndef DESKTOP_VERSION 392#ifndef DESKTOP_VERSION
393 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 393 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
394#endif 394#endif
395#ifndef DESKTOP_VERSION 395#ifndef DESKTOP_VERSION
396 infrared = 0; 396 infrared = 0;
397#endif 397#endif
398 updateFilterToolbar(); 398 updateFilterToolbar();
399 updateWeek( mView->startDate() ); 399 updateWeek( mView->startDate() );
400 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 400 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
401 SLOT( updateWeekNum( const KCal::DateList & ) ) ); 401 SLOT( updateWeekNum( const KCal::DateList & ) ) );
402 mBRdisabled = false; 402 mBRdisabled = false;
403 //toggleBeamReceive(); 403 //toggleBeamReceive();
404 int tiint= 3000; 404 int tiint= 3000;
405#ifndef DESKTOP_VERSION 405#ifndef DESKTOP_VERSION
406 tiint = 5000; 406 tiint = 5000;
407#endif 407#endif
408 QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() )); 408 QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() ));
409} 409}
410MainWindow::~MainWindow() 410MainWindow::~MainWindow()
411{ 411{
412 //qDebug("MainWindow::~MainWindow() "); 412 //qDebug("MainWindow::~MainWindow() ");
413 //save toolbar location 413 //save toolbar location
414 delete mCalendar; 414 delete mCalendar;
415 delete mSyncManager; 415 delete mSyncManager;
416#ifndef DESKTOP_VERSION 416#ifndef DESKTOP_VERSION
417 if ( infrared ) 417 if ( infrared )
418 delete infrared; 418 delete infrared;
419#endif 419#endif
420 420
421 421
422} 422}
423 423
424void MainWindow::disableBR(bool b) 424void MainWindow::disableBR(bool b)
425{ 425{
426#ifndef DESKTOP_VERSION 426#ifndef DESKTOP_VERSION
427 if ( b ) { 427 if ( b ) {
428 if ( infrared ) { 428 if ( infrared ) {
429 toggleBeamReceive(); 429 toggleBeamReceive();
430 mBRdisabled = true; 430 mBRdisabled = true;
431 } 431 }
432 mBRdisabled = true; 432 mBRdisabled = true;
433 } else { 433 } else {
434 if ( mBRdisabled ) { 434 if ( mBRdisabled ) {
435 mBRdisabled = false; 435 mBRdisabled = false;
436 //makes no sense,because other cal ap is probably running 436 //makes no sense,because other cal ap is probably running
437 // toggleBeamReceive(); 437 // toggleBeamReceive();
438 } 438 }
439 } 439 }
440#endif 440#endif
441 441
442} 442}
443bool MainWindow::beamReceiveEnabled() 443bool MainWindow::beamReceiveEnabled()
444{ 444{
445#ifndef DESKTOP_VERSION 445#ifndef DESKTOP_VERSION
446 return ( infrared != 0 ); 446 return ( infrared != 0 );
447#endif 447#endif
448 return false; 448 return false;
449} 449}
450 450
451void MainWindow::toggleBeamReceive() 451void MainWindow::toggleBeamReceive()
452{ 452{
453 if ( mBRdisabled ) 453 if ( mBRdisabled )
454 return; 454 return;
455#ifndef DESKTOP_VERSION 455#ifndef DESKTOP_VERSION
456 if ( infrared ) { 456 if ( infrared ) {
457 qDebug("KO: Disable BeamReceive "); 457 qDebug("KO: Disable BeamReceive ");
458 delete infrared; 458 delete infrared;
459 infrared = 0; 459 infrared = 0;
460 brAction->setOn(false); 460 brAction->setOn(false);
461 return; 461 return;
462 } 462 }
463 qDebug("KO: Enable BeamReceive "); 463 qDebug("KO: Enable BeamReceive ");
464 brAction->setOn(true); 464 brAction->setOn(true);
465 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; 465 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
466 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); 466 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& )));
467#endif 467#endif
468} 468}
469void MainWindow::showMaximized () 469void MainWindow::showMaximized ()
470{ 470{
471#ifndef DESKTOP_VERSION 471#ifndef DESKTOP_VERSION
472 if ( ! globalFlagBlockStartup ) 472 if ( ! globalFlagBlockStartup )
473 if ( mClosed ) 473 if ( mClosed )
474 mView->goToday(); 474 mView->goToday();
475#endif 475#endif
476 QWidget::showMaximized () ; 476 QWidget::showMaximized () ;
477 mClosed = false; 477 mClosed = false;
478} 478}
479void MainWindow::closeEvent( QCloseEvent* ce ) 479void MainWindow::closeEvent( QCloseEvent* ce )
480{ 480{
481 481
482 482
483 483
484 if ( ! KOPrefs::instance()->mAskForQuit ) { 484 if ( ! KOPrefs::instance()->mAskForQuit ) {
485 saveOnClose(); 485 saveOnClose();
486 mClosed = true; 486 mClosed = true;
487 ce->accept(); 487 ce->accept();
488 return; 488 return;
489 489
490 } 490 }
491 491
492 switch( QMessageBox::information( this, "KO/Pi", 492 switch( QMessageBox::information( this, "KO/Pi",
493 i18n("Do you really want\nto close KO/Pi?"), 493 i18n("Do you really want\nto close KO/Pi?"),
494 i18n("Close"), i18n("No"), 494 i18n("Close"), i18n("No"),
495 0, 0 ) ) { 495 0, 0 ) ) {
496 case 0: 496 case 0:
497 saveOnClose(); 497 saveOnClose();
498 mClosed = true; 498 mClosed = true;
499 ce->accept(); 499 ce->accept();
500 break; 500 break;
501 case 1: 501 case 1:
502 ce->ignore(); 502 ce->ignore();
503 break; 503 break;
504 case 2: 504 case 2:
505 505
506 default: 506 default:
507 break; 507 break;
508 } 508 }
509 509
510 510
511} 511}
512 512
513void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) 513void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
514{ 514{
515 QDataStream stream( data, IO_ReadOnly ); 515 QDataStream stream( data, IO_ReadOnly );
516 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); 516 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" );
517 //QString datamess; 517 //QString datamess;
518 //qDebug("message "); 518 //qDebug("message ");
519 qDebug("KO: QCOP message received: %s ", cmsg.data() ); 519 qDebug("KO: QCOP message received: %s ", cmsg.data() );
520 520
521 if ( cmsg == "setDocument(QString)" ) { 521 if ( cmsg == "setDocument(QString)" ) {
522 QDataStream stream( data, IO_ReadOnly ); 522 QDataStream stream( data, IO_ReadOnly );
523 QString fileName; 523 QString fileName;
524 stream >> fileName; 524 stream >> fileName;
525 //qDebug("filename %s ", fileName.latin1()); 525 //qDebug("filename %s ", fileName.latin1());
526 showMaximized(); 526 showMaximized();
527 raise(); 527 raise();
528 KOPrefs::instance()->mLastSyncedLocalFile = fileName ; 528 KOPrefs::instance()->mLastSyncedLocalFile = fileName ;
529 mSyncManager->slotSyncMenu( 1002 ); 529 mSyncManager->slotSyncMenu( 1002 );
530 return; 530 return;
531 } 531 }
532 532
533 if ( cmsg == "-writeFile" ) { 533 if ( cmsg == "-writeFile" ) {
534 // I made from the "-writeFile" an "-writeAlarm" 534 // I made from the "-writeFile" an "-writeAlarm"
535 mView->viewManager()->showWhatsNextView(); 535 mView->viewManager()->showWhatsNextView();
536 mCalendar->checkAlarmForIncidence( 0, true); 536 mCalendar->checkAlarmForIncidence( 0, true);
537 showMaximized(); 537 showMaximized();
538 raise(); 538 raise();
539 return; 539 return;
540 540
541 } 541 }
542 if ( cmsg == "-writeFileSilent" ) { 542 if ( cmsg == "-writeFileSilent" ) {
543 // I made from the "-writeFile" an "-writeAlarm" 543 // I made from the "-writeFile" an "-writeAlarm"
544 // mView->viewManager()->showWhatsNextView(); 544 // mView->viewManager()->showWhatsNextView();
545 mCalendar->checkAlarmForIncidence( 0, true); 545 mCalendar->checkAlarmForIncidence( 0, true);
546 //showMaximized(); 546 //showMaximized();
547 //raise(); 547 //raise();
548 hide(); 548 hide();
549 return; 549 return;
550 } 550 }
551 if ( cmsg == "-newCountdown" ) { 551 if ( cmsg == "-newCountdown" ) {
552 qDebug("newCountdown "); 552 qDebug("newCountdown ");
553 553
554 } 554 }
555 QString msg ; 555 QString msg ;
556 QString allmsg = cmsg; 556 QString allmsg = cmsg;
557 while ( allmsg.length() > 0 ) { 557 while ( allmsg.length() > 0 ) {
558 int nextC = allmsg.find( "-", 1 ); 558 int nextC = allmsg.find( "-", 1 );
559 if ( nextC == -1 ) { 559 if ( nextC == -1 ) {
560 msg = allmsg; 560 msg = allmsg;
561 allmsg = ""; 561 allmsg = "";
562 } else{ 562 } else{
563 msg = allmsg.left( nextC ); 563 msg = allmsg.left( nextC );
564 allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); 564 allmsg = allmsg.mid( nextC, allmsg.length()-nextC );
565 } 565 }
566 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); 566 //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() );
567 if ( msg == "-newEvent" ) { 567 if ( msg == "-newEvent" ) {
568 mView->newEvent(); 568 QTimer::singleShot( 0, mView, SLOT ( newEvent()));
569 } 569 }
570 if ( msg == "-newTodo" ) { 570 if ( msg == "-newTodo" ) {
571 mView->newTodo(); 571 QTimer::singleShot( 0, mView, SLOT ( newTodo()));
572
573 } 572 }
574 if ( msg == "-showWN" ) { 573 if ( msg == "-showWN" ) {
575 mView->viewManager()->showWhatsNextView(); 574 mView->viewManager()->showWhatsNextView();
576 } 575 }
577 if ( msg == "-showTodo" ) { 576 if ( msg == "-showTodo" ) {
578 mView->viewManager()->showTodoView(); 577 mView->viewManager()->showTodoView();
579 } 578 }
580 if ( msg == "-showList" ) { 579 if ( msg == "-showList" ) {
581 mView->viewManager()->showListView(); 580 mView->viewManager()->showListView();
582 } 581 }
583 else if ( msg == "-showDay" ) { 582 else if ( msg == "-showDay" ) {
584 mView->viewManager()->showDayView(); 583 mView->viewManager()->showDayView();
585 } 584 }
586 else if ( msg == "-showWWeek" ) { 585 else if ( msg == "-showWWeek" ) {
587 mView->viewManager()->showWorkWeekView(); 586 mView->viewManager()->showWorkWeekView();
588 } 587 }
589 else if ( msg == "-ringSync" ) { 588 else if ( msg == "-ringSync" ) {
590 mSyncManager->multiSync( false ); 589 QTimer::singleShot( 0, this, SLOT (startMultiSync()));
591 } 590 }
592 else if ( msg == "-showWeek" ) { 591 else if ( msg == "-showWeek" ) {
593 mView->viewManager()->showWeekView(); 592 mView->viewManager()->showWeekView();
594 } 593 }
595 else if ( msg == "-showTodo" ) { 594 else if ( msg == "-showTodo" ) {
596 mView->viewManager()->showTodoView(); 595 mView->viewManager()->showTodoView();
597 } 596 }
598 else if ( msg == "-showJournal" ) { 597 else if ( msg == "-showJournal" ) {
599 mView->dateNavigator()->selectDates( 1 ); 598 mView->dateNavigator()->selectDates( 1 );
600 mView->dateNavigator()->selectToday(); 599 mView->dateNavigator()->selectToday();
601 mView->viewManager()->showJournalView(); 600 mView->viewManager()->showJournalView();
602 } 601 }
603 else if ( msg == "-showKO" ) { 602 else if ( msg == "-showKO" ) {
604 mView->viewManager()->showNextXView(); 603 mView->viewManager()->showNextXView();
605 } 604 }
606 else if ( msg == "-showWNext" ) { 605 else if ( msg == "-showWNext" ) {
607 mView->viewManager()->showWhatsNextView(); 606 mView->viewManager()->showWhatsNextView();
608 } 607 }
609 else if ( msg == "nextView()" ) { 608 else if ( msg == "nextView()" ) {
610 mView->viewManager()->showNextView(); 609 mView->viewManager()->showNextView();
611 } 610 }
612 else if ( msg == "-showNextXView" ) { 611 else if ( msg == "-showNextXView" ) {
613 mView->viewManager()->showNextXView(); 612 mView->viewManager()->showNextXView();
614 } 613 }
615 614
616 615
617 } 616 }
618 617
619 showMaximized(); 618 showMaximized();
620 raise(); 619 raise();
621} 620}
622 621void MainWindow::startMultiSync()
622{
623 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
624 if ( QMessageBox::information( this, i18n("KDE-Pim Sync"),
625 question,
626 i18n("Yes"), i18n("No"),
627 0, 0 ) != 0 ) {
628 setCaption(i18n("Aborted! Nothing synced!"));
629 return;
630 }
631 mSyncManager->multiSync( false );
632#ifndef DESKTOP_VERSION
633 QCopEnvelope e("QPE/Application/kapi", "doRingSync");
634#endif
635}
623QPixmap MainWindow::loadPixmap( QString name ) 636QPixmap MainWindow::loadPixmap( QString name )
624{ 637{
625 return SmallIcon( name ); 638 return SmallIcon( name );
626 639
627} 640}
628void MainWindow::setUsesBigPixmaps ( bool b ) 641void MainWindow::setUsesBigPixmaps ( bool b )
629{ 642{
630 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); 643 qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b);
631 if ( b ) 644 if ( b )
632 qDebug("KO: BigPixmaps are not supported "); 645 qDebug("KO: BigPixmaps are not supported ");
633} 646}
634void MainWindow::initActions() 647void MainWindow::initActions()
635{ 648{
636 //KOPrefs::instance()->mShowFullMenu 649 //KOPrefs::instance()->mShowFullMenu
637 iconToolBar->clear(); 650 iconToolBar->clear();
638 KOPrefs *p = KOPrefs::instance(); 651 KOPrefs *p = KOPrefs::instance();
639 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 652 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
640 653
641 QPopupMenu *viewMenu = new QPopupMenu( this ); 654 QPopupMenu *viewMenu = new QPopupMenu( this );
642 QPopupMenu *actionMenu = new QPopupMenu( this ); 655 QPopupMenu *actionMenu = new QPopupMenu( this );
643 QPopupMenu *importMenu = new QPopupMenu( this ); 656 QPopupMenu *importMenu = new QPopupMenu( this );
644 QPopupMenu *importMenu_X = new QPopupMenu( this ); 657 QPopupMenu *importMenu_X = new QPopupMenu( this );
645 QPopupMenu *exportMenu_X = new QPopupMenu( this ); 658 QPopupMenu *exportMenu_X = new QPopupMenu( this );
646 QPopupMenu *beamMenu_X = new QPopupMenu( this ); 659 QPopupMenu *beamMenu_X = new QPopupMenu( this );
647 selectFilterMenu = new QPopupMenu( this ); 660 selectFilterMenu = new QPopupMenu( this );
648 selectFilterMenu->setCheckable( true ); 661 selectFilterMenu->setCheckable( true );
649 syncMenu = new QPopupMenu( this ); 662 syncMenu = new QPopupMenu( this );
650 configureAgendaMenu = new QPopupMenu( this ); 663 configureAgendaMenu = new QPopupMenu( this );
651 configureToolBarMenu = new QPopupMenu( this ); 664 configureToolBarMenu = new QPopupMenu( this );
652 QPopupMenu *helpMenu = new QPopupMenu( this ); 665 QPopupMenu *helpMenu = new QPopupMenu( this );
653 QIconSet icon; 666 QIconSet icon;
654 int pixWid = 22, pixHei = 22; 667 int pixWid = 22, pixHei = 22;
655 QString pathString = ""; 668 QString pathString = "";
656 if ( !p->mToolBarMiniIcons ) { 669 if ( !p->mToolBarMiniIcons ) {
657 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { 670 if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) {
658 pathString += "icons16/"; 671 pathString += "icons16/";
659 pixWid = 18; pixHei = 16; 672 pixWid = 18; pixHei = 16;
660 } 673 }
661 } else { 674 } else {
662 pathString += "iconsmini/"; 675 pathString += "iconsmini/";
663 pixWid = 18; pixHei = 16; 676 pixWid = 18; pixHei = 16;
664 } 677 }
665 if ( KOPrefs::instance()->mShowFullMenu ) { 678 if ( KOPrefs::instance()->mShowFullMenu ) {
666 QMenuBar *menuBar1; 679 QMenuBar *menuBar1;
667 menuBar1 = menuBar(); 680 menuBar1 = menuBar();
668 menuBar1->insertItem( i18n("File"), importMenu ); 681 menuBar1->insertItem( i18n("File"), importMenu );
669 menuBar1->insertItem( i18n("View"), viewMenu ); 682 menuBar1->insertItem( i18n("View"), viewMenu );
670 menuBar1->insertItem( i18n("Actions"), actionMenu ); 683 menuBar1->insertItem( i18n("Actions"), actionMenu );
671#ifdef DESKTOP_VERSION 684#ifdef DESKTOP_VERSION
672 menuBar1->insertItem( i18n("Synchronize"), syncMenu ); 685 menuBar1->insertItem( i18n("Synchronize"), syncMenu );
673 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 686 menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
674#else 687#else
675 menuBar1->insertItem( i18n("Sync"), syncMenu ); 688 menuBar1->insertItem( i18n("Sync"), syncMenu );
676 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); 689 menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu );
677#endif 690#endif
678 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); 691 //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
679 menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); 692 menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
680 menuBar1->insertItem( i18n("Help"), helpMenu ); 693 menuBar1->insertItem( i18n("Help"), helpMenu );
681 } else { 694 } else {
682 QPEMenuBar *menuBar1; 695 QPEMenuBar *menuBar1;
683 menuBar1 = new QPEMenuBar( iconToolBar ); 696 menuBar1 = new QPEMenuBar( iconToolBar );
684 QPopupMenu *menuBar = new QPopupMenu( this ); 697 QPopupMenu *menuBar = new QPopupMenu( this );
685 icon = loadPixmap( pathString + "z_menu" ); 698 icon = loadPixmap( pathString + "z_menu" );
686 menuBar1->insertItem( icon.pixmap(), menuBar); 699 menuBar1->insertItem( icon.pixmap(), menuBar);
687 //menuBar1->insertItem( i18n("ME"), menuBar); 700 //menuBar1->insertItem( i18n("ME"), menuBar);
688 menuBar->insertItem( i18n("File"), importMenu ); 701 menuBar->insertItem( i18n("File"), importMenu );
689 menuBar->insertItem( i18n("View"), viewMenu ); 702 menuBar->insertItem( i18n("View"), viewMenu );
690 menuBar->insertItem( i18n("Actions"), actionMenu ); 703 menuBar->insertItem( i18n("Actions"), actionMenu );
691 menuBar->insertItem( i18n("Synchronize"), syncMenu ); 704 menuBar->insertItem( i18n("Synchronize"), syncMenu );
692 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); 705 menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
693 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); 706 menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
694 menuBar->insertItem( i18n("Filter"),selectFilterMenu ); 707 menuBar->insertItem( i18n("Filter"),selectFilterMenu );
695 menuBar->insertItem( i18n("Help"), helpMenu ); 708 menuBar->insertItem( i18n("Help"), helpMenu );
696 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 709 //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
697 menuBar1->setMaximumSize( menuBar1->sizeHint( )); 710 menuBar1->setMaximumSize( menuBar1->sizeHint( ));
698 } 711 }
699 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 712 connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
700 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); 713 connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) );
701 714
702 715
703 mWeekBgColor = iconToolBar->backgroundColor(); 716 mWeekBgColor = iconToolBar->backgroundColor();
704 mWeekPixmap.resize( pixWid , pixHei ); 717 mWeekPixmap.resize( pixWid , pixHei );
705 mWeekPixmap.fill( mWeekBgColor ); 718 mWeekPixmap.fill( mWeekBgColor );
706 icon = mWeekPixmap; 719 icon = mWeekPixmap;
707 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 720 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
708 if ( p-> mShowIconWeekNum ) 721 if ( p-> mShowIconWeekNum )
709 mWeekAction->addTo( iconToolBar ); 722 mWeekAction->addTo( iconToolBar );
710 mWeekFont = font(); 723 mWeekFont = font();
711 724
712 int fontPoint = mWeekFont.pointSize(); 725 int fontPoint = mWeekFont.pointSize();
713 QFontMetrics f( mWeekFont ); 726 QFontMetrics f( mWeekFont );
714 int fontWid = f.width( "30" ); 727 int fontWid = f.width( "30" );
715 while ( fontWid > pixWid ) { 728 while ( fontWid > pixWid ) {
716 --fontPoint; 729 --fontPoint;
717 mWeekFont.setPointSize( fontPoint ); 730 mWeekFont.setPointSize( fontPoint );
718 QFontMetrics f( mWeekFont ); 731 QFontMetrics f( mWeekFont );
719 fontWid = f.width( "30" ); 732 fontWid = f.width( "30" );
720 //qDebug("dec-- "); 733 //qDebug("dec-- ");
721 } 734 }
722 735
723 connect( mWeekAction, SIGNAL( activated() ), 736 connect( mWeekAction, SIGNAL( activated() ),
724 this, SLOT( weekAction() ) ); 737 this, SLOT( weekAction() ) );
725 738
726 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 739 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
727 if ( p->mShowIconFilterview ) { 740 if ( p->mShowIconFilterview ) {
728 icon = loadPixmap( pathString + "filter" ); 741 icon = loadPixmap( pathString + "filter" );
729 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); 742 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
730 connect( actionFilterMenuTB, SIGNAL( activated() ), 743 connect( actionFilterMenuTB, SIGNAL( activated() ),
731 this, SLOT( fillFilterMenuTB() ) ); 744 this, SLOT( fillFilterMenuTB() ) );
732 actionFilterMenuTB->addTo( iconToolBar ); 745 actionFilterMenuTB->addTo( iconToolBar );
733 selectFilterMenuTB = new QPopupMenu( this ); 746 selectFilterMenuTB = new QPopupMenu( this );
734 selectFilterMenuTB->setCheckable( true ); 747 selectFilterMenuTB->setCheckable( true );
735 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 748 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
736 } 749 }
737 750
738 //#endif 751 //#endif
739 // ****************** 752 // ******************
740 QAction *action; 753 QAction *action;
741 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 754 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
742 configureToolBarMenu->setCheckable( true ); 755 configureToolBarMenu->setCheckable( true );
743 756
744 757
745 configureAgendaMenu->setCheckable( true ); 758 configureAgendaMenu->setCheckable( true );
746 int iii ; 759 int iii ;
747 for ( iii = 1;iii<= 10 ;++iii ){ 760 for ( iii = 1;iii<= 10 ;++iii ){
748 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); 761 configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 );
749 } 762 }
750 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); 763 //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
751 764
752 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 765 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
753 this, SLOT( showConfigureAgenda( ) ) ); 766 this, SLOT( showConfigureAgenda( ) ) );
754 767
755 icon = loadPixmap( pathString + "configure" ); 768 icon = loadPixmap( pathString + "configure" );
756 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); 769 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this );
757 action->addTo( actionMenu ); 770 action->addTo( actionMenu );
758 connect( action, SIGNAL( activated() ), 771 connect( action, SIGNAL( activated() ),
759 mView, SLOT( edit_options() ) ); 772 mView, SLOT( edit_options() ) );
760 icon = loadPixmap( pathString + "configure" ); 773 icon = loadPixmap( pathString + "configure" );
761 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); 774 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this );
762 action->addTo( actionMenu ); 775 action->addTo( actionMenu );
763 connect( action, SIGNAL( activated() ), 776 connect( action, SIGNAL( activated() ),
764 mView, SLOT( edit_global_options() ) ); 777 mView, SLOT( edit_global_options() ) );
765 actionMenu->insertSeparator(); 778 actionMenu->insertSeparator();
766 779
767 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 780 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
768 action->addTo( actionMenu ); 781 action->addTo( actionMenu );
769 connect( action, SIGNAL( activated() ), 782 connect( action, SIGNAL( activated() ),
770 mView, SLOT( undo_delete() ) ); 783 mView, SLOT( undo_delete() ) );
771 actionMenu->insertSeparator(); 784 actionMenu->insertSeparator();
772 785
773 icon = loadPixmap( pathString + "newevent" ); 786 icon = loadPixmap( pathString + "newevent" );
774 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 787 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
775 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); 788 configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 );
776 configureToolBarMenu->insertSeparator(); 789 configureToolBarMenu->insertSeparator();
777 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); 790 configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 );
778 configureToolBarMenu->insertSeparator(); 791 configureToolBarMenu->insertSeparator();
779 configureToolBarMenu->insertItem(i18n("Week Number"), 400); 792 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
780 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 793 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
781 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 794 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
782 ne_action->addTo( actionMenu ); 795 ne_action->addTo( actionMenu );
783 connect( ne_action, SIGNAL( activated() ), 796 connect( ne_action, SIGNAL( activated() ),
784 mView, SLOT( newEvent() ) ); 797 mView, SLOT( newEvent() ) );
785 icon = loadPixmap( pathString + "newtodo" ); 798 icon = loadPixmap( pathString + "newtodo" );
786 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 799 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
787 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 800 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
788 nt_action->addTo( actionMenu ); 801 nt_action->addTo( actionMenu );
789 connect( nt_action, SIGNAL( activated() ), 802 connect( nt_action, SIGNAL( activated() ),
790 mView, SLOT( newTodo() ) ); 803 mView, SLOT( newTodo() ) );
791 804
792 icon = loadPixmap( pathString + "today" ); 805 icon = loadPixmap( pathString + "today" );
793 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 806 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
794 today_action->addTo( viewMenu ); 807 today_action->addTo( viewMenu );
795 connect( today_action, SIGNAL( activated() ), 808 connect( today_action, SIGNAL( activated() ),
796 mView, SLOT( goToday() ) ); 809 mView, SLOT( goToday() ) );
797 viewMenu->insertSeparator(); 810 viewMenu->insertSeparator();
798 811
799 // *********************** 812 // ***********************
800 if ( KOPrefs::instance()->mVerticalScreen ) { 813 if ( KOPrefs::instance()->mVerticalScreen ) {
801 icon = SmallIcon( "1updownarrow" ); 814 icon = SmallIcon( "1updownarrow" );
802 } else { 815 } else {
803 icon = SmallIcon("1leftrightarrow" ); 816 icon = SmallIcon("1leftrightarrow" );
804 } 817 }
805 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); 818 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
806 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); 819 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
807 FSaction->addTo( viewMenu ); 820 FSaction->addTo( viewMenu );
808 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); 821 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
809 822
810 823
811 icon = loadPixmap( pathString + "filter" ); 824 icon = loadPixmap( pathString + "filter" );
812 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); 825 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 );
813 icon = loadPixmap( pathString + "configure" ); 826 icon = loadPixmap( pathString + "configure" );
814 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); 827 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this );
815 action->addTo( viewMenu ); 828 action->addTo( viewMenu );
816 connect( action, SIGNAL( activated() ), 829 connect( action, SIGNAL( activated() ),
817 mView, SLOT( toggleFilter() ) ); 830 mView, SLOT( toggleFilter() ) );
818 mToggleFilter = action; 831 mToggleFilter = action;
819 icon = loadPixmap( pathString + "navi" ); 832 icon = loadPixmap( pathString + "navi" );
820 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); 833 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
821 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 834 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
822 action->addTo( viewMenu ); 835 action->addTo( viewMenu );
823 connect( action, SIGNAL( activated() ), 836 connect( action, SIGNAL( activated() ),
824 mView, SLOT( toggleDateNavigatorWidget() ) ); 837 mView, SLOT( toggleDateNavigatorWidget() ) );
825 mToggleNav = action ; 838 mToggleNav = action ;
826 icon = loadPixmap( pathString + "allday" ); 839 icon = loadPixmap( pathString + "allday" );
827 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); 840 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
828 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 841 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
829 action->addTo( viewMenu ); 842 action->addTo( viewMenu );
830 connect( action, SIGNAL( activated() ), 843 connect( action, SIGNAL( activated() ),
831 mView, SLOT( toggleAllDaySize() ) ); 844 mView, SLOT( toggleAllDaySize() ) );
832 mToggleAllday = action; 845 mToggleAllday = action;
833 846
834 847
835 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 848 connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
836 mToggleNav, SLOT( setEnabled ( bool ) ) ); 849 mToggleNav, SLOT( setEnabled ( bool ) ) );
837 //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), 850 //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ),
838 // mToggleFilter, SLOT( setEnabled ( bool ) ) ); 851 // mToggleFilter, SLOT( setEnabled ( bool ) ) );
839 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 852 connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
840 mToggleAllday, SLOT( setEnabled ( bool ) ) ); 853 mToggleAllday, SLOT( setEnabled ( bool ) ) );
841 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), 854 // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ),
842 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); 855 // configureAgendaMenu, SLOT( setEnabled ( bool ) ) );
843 856
844 viewMenu->insertSeparator(); 857 viewMenu->insertSeparator();
845 icon = loadPixmap( pathString + "picker" ); 858 icon = loadPixmap( pathString + "picker" );
846 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); 859 action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this );
847 action->addTo( viewMenu ); 860 action->addTo( viewMenu );
848 connect( action, SIGNAL( activated() ), 861 connect( action, SIGNAL( activated() ),
849 mView, SLOT( showDatePicker() ) ); 862 mView, SLOT( showDatePicker() ) );
850 action->addTo( iconToolBar ); 863 action->addTo( iconToolBar );
851 viewMenu->insertSeparator(); 864 viewMenu->insertSeparator();
852 865
853 if ( p-> mShowIconToggleFull ) 866 if ( p-> mShowIconToggleFull )
854 FSaction->addTo( iconToolBar ); 867 FSaction->addTo( iconToolBar );
855 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); 868 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar );
856 869
857 //******************** 870 //********************
858 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); 871 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar );
859 872
860 873
861 icon = loadPixmap( pathString + "whatsnext" ); 874 icon = loadPixmap( pathString + "whatsnext" );
862 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); 875 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 );
863 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 876 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
864 whatsnext_action->addTo( viewMenu ); 877 whatsnext_action->addTo( viewMenu );
865 connect( whatsnext_action, SIGNAL( activated() ), 878 connect( whatsnext_action, SIGNAL( activated() ),
866 mView->viewManager(), SLOT( showWhatsNextView() ) ); 879 mView->viewManager(), SLOT( showWhatsNextView() ) );
867 880
868 icon = loadPixmap( pathString + "xdays" ); 881 icon = loadPixmap( pathString + "xdays" );
869 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); 882 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 );
870 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 883 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
871 xdays_action->addTo( viewMenu ); 884 xdays_action->addTo( viewMenu );
872 connect( xdays_action, SIGNAL( activated() ), 885 connect( xdays_action, SIGNAL( activated() ),
873 mView->viewManager(), SLOT( showNextXView() ) ); 886 mView->viewManager(), SLOT( showNextXView() ) );
874 887
875 888
876 icon = loadPixmap( pathString + "journal" ); 889 icon = loadPixmap( pathString + "journal" );
877 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 890 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
878 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 891 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
879 viewjournal_action->addTo( viewMenu ); 892 viewjournal_action->addTo( viewMenu );
880 connect( viewjournal_action, SIGNAL( activated() ), 893 connect( viewjournal_action, SIGNAL( activated() ),
881 mView->viewManager(), SLOT( showJournalView() ) ); 894 mView->viewManager(), SLOT( showJournalView() ) );
882 895
883 896
884 icon = loadPixmap( pathString + "day" ); 897 icon = loadPixmap( pathString + "day" );
885 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 898 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
886 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 899 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
887 day1_action->addTo( viewMenu ); 900 day1_action->addTo( viewMenu );
888 // action->addTo( toolBar ); 901 // action->addTo( toolBar );
889 connect( day1_action, SIGNAL( activated() ), 902 connect( day1_action, SIGNAL( activated() ),
890 mView->viewManager(), SLOT( showDayView() ) ); 903 mView->viewManager(), SLOT( showDayView() ) );
891 904
892 icon = loadPixmap( pathString + "workweek" ); 905 icon = loadPixmap( pathString + "workweek" );
893 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 906 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
894 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 907 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
895 day5_action->addTo( viewMenu ); 908 day5_action->addTo( viewMenu );
896 connect( day5_action, SIGNAL( activated() ), 909 connect( day5_action, SIGNAL( activated() ),
897 mView->viewManager(), SLOT( showWorkWeekView() ) ); 910 mView->viewManager(), SLOT( showWorkWeekView() ) );
898 911
899 icon = loadPixmap( pathString + "week" ); 912 icon = loadPixmap( pathString + "week" );
900 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 913 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
901 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 914 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
902 day7_action->addTo( viewMenu ); 915 day7_action->addTo( viewMenu );
903 connect( day7_action, SIGNAL( activated() ), 916 connect( day7_action, SIGNAL( activated() ),
904 mView->viewManager(), SLOT( showWeekView() ) ); 917 mView->viewManager(), SLOT( showWeekView() ) );
905 918
906 icon = loadPixmap( pathString + "workweek2" ); 919 icon = loadPixmap( pathString + "workweek2" );
907 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); 920 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
908 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); 921 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
909 day6_action->addTo( viewMenu ); 922 day6_action->addTo( viewMenu );
910 connect( day6_action, SIGNAL( activated() ), 923 connect( day6_action, SIGNAL( activated() ),
911 mView->viewManager(), SLOT( showMonthViewWeek() ) ); 924 mView->viewManager(), SLOT( showMonthViewWeek() ) );
912 925
913 icon = loadPixmap( pathString + "month" ); 926 icon = loadPixmap( pathString + "month" );
914 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 927 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
915 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 928 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
916 month_action->addTo( viewMenu ); 929 month_action->addTo( viewMenu );
917 connect( month_action, SIGNAL( activated() ), 930 connect( month_action, SIGNAL( activated() ),
918 mView->viewManager(), SLOT( showMonthView() ) ); 931 mView->viewManager(), SLOT( showMonthView() ) );
919 932
920 icon = loadPixmap( pathString + "list" ); 933 icon = loadPixmap( pathString + "list" );
921 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 934 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
922 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 935 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
923 showlist_action->addTo( viewMenu ); 936 showlist_action->addTo( viewMenu );
924 connect( showlist_action, SIGNAL( activated() ), 937 connect( showlist_action, SIGNAL( activated() ),
925 mView->viewManager(), SLOT( showListView() ) ); 938 mView->viewManager(), SLOT( showListView() ) );
926 939
927 icon = loadPixmap( pathString + "todo" ); 940 icon = loadPixmap( pathString + "todo" );
928 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 941 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
929 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 942 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
930 todoview_action->addTo( viewMenu ); 943 todoview_action->addTo( viewMenu );
931 connect( todoview_action, SIGNAL( activated() ), 944 connect( todoview_action, SIGNAL( activated() ),
932 mView->viewManager(), SLOT( showTodoView() ) ); 945 mView->viewManager(), SLOT( showTodoView() ) );
933 946
934 947
935 948
936#if 0 949#if 0
937 action = new QAction( "view_timespan", "Time Span", 0, this ); 950 action = new QAction( "view_timespan", "Time Span", 0, this );
938 action->addTo( viewMenu ); 951 action->addTo( viewMenu );
939 connect( action, SIGNAL( activated() ), 952 connect( action, SIGNAL( activated() ),
940 mView->viewManager(), SLOT( showTimeSpanView() ) ); 953 mView->viewManager(), SLOT( showTimeSpanView() ) );
941#endif 954#endif
942 955
943 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 956 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
944 this ); 957 this );
945 mNewSubTodoAction->addTo( actionMenu ); 958 mNewSubTodoAction->addTo( actionMenu );
946 connect( mNewSubTodoAction, SIGNAL( activated() ), 959 connect( mNewSubTodoAction, SIGNAL( activated() ),
947 mView, SLOT( newSubTodo() ) ); 960 mView, SLOT( newSubTodo() ) );
948 961
949 actionMenu->insertSeparator(); 962 actionMenu->insertSeparator();
950 963
951 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); 964 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this );
952 mShowAction->addTo( actionMenu ); 965 mShowAction->addTo( actionMenu );
953 connect( mShowAction, SIGNAL( activated() ), 966 connect( mShowAction, SIGNAL( activated() ),
954 mView, SLOT( showIncidence() ) ); 967 mView, SLOT( showIncidence() ) );
955 968
956 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 969 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
957 mEditAction->addTo( actionMenu ); 970 mEditAction->addTo( actionMenu );
958 connect( mEditAction, SIGNAL( activated() ), 971 connect( mEditAction, SIGNAL( activated() ),
959 mView, SLOT( editIncidence() ) ); 972 mView, SLOT( editIncidence() ) );
960 973
961 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 974 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
962 mDeleteAction->addTo( actionMenu ); 975 mDeleteAction->addTo( actionMenu );
963 connect( mDeleteAction, SIGNAL( activated() ), 976 connect( mDeleteAction, SIGNAL( activated() ),
964 mView, SLOT( deleteIncidence() ) ); 977 mView, SLOT( deleteIncidence() ) );
965 978
966 979
967 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 980 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
968 mCloneAction->addTo( actionMenu ); 981 mCloneAction->addTo( actionMenu );
969 connect( mCloneAction, SIGNAL( activated() ), 982 connect( mCloneAction, SIGNAL( activated() ),
970 mView, SLOT( cloneIncidence() ) ); 983 mView, SLOT( cloneIncidence() ) );
971 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 984 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
972 mMoveAction->addTo( actionMenu ); 985 mMoveAction->addTo( actionMenu );
973 connect( mMoveAction, SIGNAL( activated() ), 986 connect( mMoveAction, SIGNAL( activated() ),
974 mView, SLOT( moveIncidence() ) ); 987 mView, SLOT( moveIncidence() ) );
975 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 988 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
976 mBeamAction->addTo( actionMenu ); 989 mBeamAction->addTo( actionMenu );
977 connect( mBeamAction, SIGNAL( activated() ), 990 connect( mBeamAction, SIGNAL( activated() ),
978 mView, SLOT( beamIncidence() ) ); 991 mView, SLOT( beamIncidence() ) );
979 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 992 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
980 mCancelAction->addTo( actionMenu ); 993 mCancelAction->addTo( actionMenu );
981 connect( mCancelAction, SIGNAL( activated() ), 994 connect( mCancelAction, SIGNAL( activated() ),
982 mView, SLOT( toggleCancelIncidence() ) ); 995 mView, SLOT( toggleCancelIncidence() ) );
983 996
984 actionMenu->insertSeparator(); 997 actionMenu->insertSeparator();
985 998
986 action = new QAction( "purge_completed", i18n("Purge Completed"), 0, 999 action = new QAction( "purge_completed", i18n("Purge Completed"), 0,
987 this ); 1000 this );
988 action->addTo( actionMenu ); 1001 action->addTo( actionMenu );
989 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 1002 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
990 1003
991 icon = loadPixmap( pathString + "search" ); 1004 icon = loadPixmap( pathString + "search" );
992 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 1005 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
993 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); 1006 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
994 search_action->addTo( actionMenu ); 1007 search_action->addTo( actionMenu );
995 connect( search_action, SIGNAL( activated() ), 1008 connect( search_action, SIGNAL( activated() ),
996 mView->dialogManager(), SLOT( showSearchDialog() ) ); 1009 mView->dialogManager(), SLOT( showSearchDialog() ) );
997 1010
998 1011
999 1012
1000 if ( KOPrefs::instance()->mShowFullMenu ) { 1013 if ( KOPrefs::instance()->mShowFullMenu ) {
1001 actionMenu->insertSeparator(); 1014 actionMenu->insertSeparator();
1002 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); 1015 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
1003 1016
1004 } 1017 }
1005 // actionMenu->insertSeparator(); 1018 // actionMenu->insertSeparator();
1006 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 1019 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
1007 this ); 1020 this );
1008 action->addTo( importMenu_X ); 1021 action->addTo( importMenu_X );
1009 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); 1022 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
1010 action = new QAction( "import_quick", i18n("Import last file"), 0, 1023 action = new QAction( "import_quick", i18n("Import last file"), 0,
1011 this ); 1024 this );
1012 action->addTo( importMenu_X ); 1025 action->addTo( importMenu_X );
1013 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); 1026 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
1014 importMenu_X->insertSeparator(); 1027 importMenu_X->insertSeparator();
1015 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, 1028 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
1016 this ); 1029 this );
1017 action->addTo( importMenu_X ); 1030 action->addTo( importMenu_X );
1018 connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); 1031 connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
1019 //#ifndef DESKTOP_VERSION 1032 //#ifndef DESKTOP_VERSION
1020 importMenu_X->insertSeparator(); 1033 importMenu_X->insertSeparator();
1021 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, 1034 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
1022 this ); 1035 this );
1023 action->addTo( importMenu_X ); 1036 action->addTo( importMenu_X );
1024 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); 1037 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
1025 //#else 1038 //#else
1026#ifdef _OL_IMPORT_ 1039#ifdef _OL_IMPORT_
1027 importMenu_X->insertSeparator(); 1040 importMenu_X->insertSeparator();
1028 action = new QAction( "import_ol", i18n("Import from OL"), 0, 1041 action = new QAction( "import_ol", i18n("Import from OL"), 0,
1029 this ); 1042 this );
1030 action->addTo( importMenu_X ); 1043 action->addTo( importMenu_X );
1031 connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); 1044 connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
1032#endif 1045#endif
1033 //#endif 1046 //#endif
1034 1047
1035 //importMenu->insertSeparator(); 1048 //importMenu->insertSeparator();
1036#if 0 1049#if 0
1037 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, 1050 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
1038 this ); 1051 this );
1039 action->addTo( importMenu ); 1052 action->addTo( importMenu );
1040 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); 1053 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
1041#endif 1054#endif
1042 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, 1055 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0,
1043 this ); 1056 this );
1044 action->addTo( importMenu ); 1057 action->addTo( importMenu );
1045 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); 1058 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) );
1046 importMenu->insertSeparator(); 1059 importMenu->insertSeparator();
1047 importMenu->insertItem( i18n("Import"), importMenu_X ); 1060 importMenu->insertItem( i18n("Import"), importMenu_X );
1048 //importMenu->insertSeparator(); 1061 //importMenu->insertSeparator();
1049 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, 1062 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0,
1050 this ); 1063 this );
1051 action->addTo( exportMenu_X ); 1064 action->addTo( exportMenu_X );
1052 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); 1065 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) );
1053 1066
1054 1067
1055 //LR 1068 //LR
1056 QPopupMenu *ex2phone = new QPopupMenu( this ); 1069 QPopupMenu *ex2phone = new QPopupMenu( this );
1057 ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1070 ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1058 ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1071 ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1059 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); 1072 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) );
1060 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); 1073 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone );
1061 1074
1062 importMenu->insertItem( i18n("Export"), exportMenu_X ); 1075 importMenu->insertItem( i18n("Export"), exportMenu_X );
1063#ifndef DESKTOP_VERSION 1076#ifndef DESKTOP_VERSION
1064 //importMenu->insertSeparator(); 1077 //importMenu->insertSeparator();
1065 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, 1078 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0,
1066 this ); 1079 this );
1067 brAction->addTo( beamMenu_X ); 1080 brAction->addTo( beamMenu_X );
1068 brAction->setToggleAction (true ) ; 1081 brAction->setToggleAction (true ) ;
1069 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); 1082 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) );
1070 1083
1071 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, 1084 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0,
1072 this ); 1085 this );
1073 action->addTo( beamMenu_X ); 1086 action->addTo( beamMenu_X );
1074 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); 1087 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
1075 1088
1076 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, 1089 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0,
1077 this ); 1090 this );
1078 action->addTo( beamMenu_X ); 1091 action->addTo( beamMenu_X );
1079 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); 1092 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
1080 importMenu->insertItem( i18n("Beam"), beamMenu_X ); 1093 importMenu->insertItem( i18n("Beam"), beamMenu_X );
1081#else 1094#else
1082 //importMenu->insertSeparator(); 1095 //importMenu->insertSeparator();
1083 icon = loadPixmap( pathString + "print" ); 1096 icon = loadPixmap( pathString + "print" );
1084 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); 1097 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
1085 action->addTo( beamMenu_X ); 1098 action->addTo( beamMenu_X );
1086 connect( action, SIGNAL( activated() ), 1099 connect( action, SIGNAL( activated() ),
1087 this, SLOT( printCal() ) ); 1100 this, SLOT( printCal() ) );
1088 1101
1089 icon = loadPixmap( pathString + "print" ); 1102 icon = loadPixmap( pathString + "print" );
1090 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 1103 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
1091 action->addTo( beamMenu_X ); 1104 action->addTo( beamMenu_X );
1092 connect( action, SIGNAL( activated() ), 1105 connect( action, SIGNAL( activated() ),
1093 this, SLOT( printSel() ) ); 1106 this, SLOT( printSel() ) );
1094 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 1107 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
1095 action->addTo( beamMenu_X ); 1108 action->addTo( beamMenu_X );
1096 connect( action, SIGNAL( activated() ), 1109 connect( action, SIGNAL( activated() ),
1097 mView->viewManager(), SLOT( slotprintWNV() ) ); 1110 mView->viewManager(), SLOT( slotprintWNV() ) );
1098 1111
1099 1112
1100 icon = loadPixmap( pathString + "print" ); 1113 icon = loadPixmap( pathString + "print" );
1101 action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); 1114 action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this );
1102 action->addTo( beamMenu_X ); 1115 action->addTo( beamMenu_X );
1103 connect( action, SIGNAL( activated() ), 1116 connect( action, SIGNAL( activated() ),
1104 this, SLOT( printListView() ) ); 1117 this, SLOT( printListView() ) );
1105 1118
1106 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); 1119 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
1107 action->addTo( beamMenu_X ); 1120 action->addTo( beamMenu_X );
1108 connect( action, SIGNAL( activated() ), 1121 connect( action, SIGNAL( activated() ),
1109 mView, SLOT( slotprintSelInc() ) ); 1122 mView, SLOT( slotprintSelInc() ) );
1110 1123
1111 importMenu->insertItem( i18n("Print"), beamMenu_X ); 1124 importMenu->insertItem( i18n("Print"), beamMenu_X );
1112#endif 1125#endif
1113 importMenu->insertSeparator(); 1126 importMenu->insertSeparator();
1114 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 1127 action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
1115 this ); 1128 this );
1116 action->addTo( importMenu ); 1129 action->addTo( importMenu );
1117 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 1130 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
1118 importMenu->insertSeparator(); 1131 importMenu->insertSeparator();
1119 action = new QAction( "beam all", i18n("Save"), 0, 1132 action = new QAction( "beam all", i18n("Save"), 0,
1120 this ); 1133 this );
1121 action->addTo( importMenu ); 1134 action->addTo( importMenu );
1122 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 1135 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
1123 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 1136 action = new QAction( "beam all", i18n("Exit (+save)"), 0,
1124 this ); 1137 this );
1125 action->addTo( importMenu ); 1138 action->addTo( importMenu );
1126 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 1139 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
1127 1140
1128 //menuBar->insertItem( "Configure",configureMenu ); 1141 //menuBar->insertItem( "Configure",configureMenu );
1129 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 1142 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
1130 icon = loadPixmap( "korganizer/korganizer" ); 1143 icon = loadPixmap( "korganizer/korganizer" );
1131 1144
1132 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 1145 action = new QAction( "Whats New", i18n("What's new?"), 0,this );
1133 action->addTo( helpMenu ); 1146 action->addTo( helpMenu );
1134 connect( action, SIGNAL( activated() ), 1147 connect( action, SIGNAL( activated() ),
1135 SLOT( whatsNew() ) ); 1148 SLOT( whatsNew() ) );
1136 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 1149 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
1137 action->addTo( helpMenu ); 1150 action->addTo( helpMenu );
1138 connect( action, SIGNAL( activated() ), 1151 connect( action, SIGNAL( activated() ),
1139 SLOT( features() ) ); 1152 SLOT( features() ) );
1140 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 1153 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
1141 action->addTo( helpMenu ); 1154 action->addTo( helpMenu );
1142 connect( action, SIGNAL( activated() ), 1155 connect( action, SIGNAL( activated() ),
1143 SLOT( keyBindings() ) ); 1156 SLOT( keyBindings() ) );
1144 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); 1157 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this );
1145 action->addTo( helpMenu ); 1158 action->addTo( helpMenu );
1146 connect( action, SIGNAL( activated() ), 1159 connect( action, SIGNAL( activated() ),
1147 SLOT( storagehowto() ) ); 1160 SLOT( storagehowto() ) );
1148 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); 1161 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this );
1149 action->addTo( helpMenu ); 1162 action->addTo( helpMenu );
1150 connect( action, SIGNAL( activated() ), 1163 connect( action, SIGNAL( activated() ),
1151 SLOT( timetrackinghowto() ) ); 1164 SLOT( timetrackinghowto() ) );
1152 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 1165 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
1153 action->addTo( helpMenu ); 1166 action->addTo( helpMenu );
1154 connect( action, SIGNAL( activated() ), 1167 connect( action, SIGNAL( activated() ),
1155 SLOT( synchowto() ) ); 1168 SLOT( synchowto() ) );
1156 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); 1169 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
1157 action->addTo( helpMenu ); 1170 action->addTo( helpMenu );
1158 connect( action, SIGNAL( activated() ), 1171 connect( action, SIGNAL( activated() ),
1159 SLOT( kdesynchowto() ) ); 1172 SLOT( kdesynchowto() ) );
1160 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); 1173 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
1161 action->addTo( helpMenu ); 1174 action->addTo( helpMenu );
1162 connect( action, SIGNAL( activated() ), 1175 connect( action, SIGNAL( activated() ),
1163 SLOT( multisynchowto() ) ); 1176 SLOT( multisynchowto() ) );
1164 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 1177 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
1165 action->addTo( helpMenu ); 1178 action->addTo( helpMenu );
1166 connect( action, SIGNAL( activated() ), 1179 connect( action, SIGNAL( activated() ),
1167 SLOT( aboutAutoSaving() ) ); 1180 SLOT( aboutAutoSaving() ) );
1168 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 1181 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
1169 action->addTo( helpMenu ); 1182 action->addTo( helpMenu );
1170 connect( action, SIGNAL( activated() ), 1183 connect( action, SIGNAL( activated() ),
1171 SLOT( aboutKnownBugs() ) ); 1184 SLOT( aboutKnownBugs() ) );
1172 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 1185 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
1173 action->addTo( helpMenu ); 1186 action->addTo( helpMenu );
1174 connect( action, SIGNAL( activated() ), 1187 connect( action, SIGNAL( activated() ),
1175 SLOT( usertrans() ) ); 1188 SLOT( usertrans() ) );
1176 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 1189 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
1177 action->addTo( helpMenu ); 1190 action->addTo( helpMenu );
1178 connect( action, SIGNAL( activated() ), 1191 connect( action, SIGNAL( activated() ),
1179 SLOT( faq() ) ); 1192 SLOT( faq() ) );
1180 action = new QAction( "licence", i18n("Licence..."), 0, this ); 1193 action = new QAction( "licence", i18n("Licence..."), 0, this );
1181 action->addTo( helpMenu ); 1194 action->addTo( helpMenu );
1182 connect( action, SIGNAL( activated() ), 1195 connect( action, SIGNAL( activated() ),
1183 SLOT( licence() ) ); 1196 SLOT( licence() ) );
1184 action = new QAction( "about", i18n("About..."), 0, this ); 1197 action = new QAction( "about", i18n("About..."), 0, this );
1185 action->addTo( helpMenu ); 1198 action->addTo( helpMenu );
1186 connect( action, SIGNAL( activated() ), 1199 connect( action, SIGNAL( activated() ),
1187 SLOT( about() ) ); 1200 SLOT( about() ) );
1188 //menuBar->insertSeparator(); 1201 //menuBar->insertSeparator();
1189 1202
1190 // ****************************************************** 1203 // ******************************************************
1191 // menubar icons 1204 // menubar icons
1192 1205
1193 1206
1194 1207
1195 //menuBar->insertItem( iconToolBar ); 1208 //menuBar->insertItem( iconToolBar );
1196 //xdays_action 1209 //xdays_action
1197 if (p-> mShowIconNewEvent) 1210 if (p-> mShowIconNewEvent)
1198 ne_action->addTo( iconToolBar ); 1211 ne_action->addTo( iconToolBar );
1199 if (p->mShowIconNewTodo ) 1212 if (p->mShowIconNewTodo )
1200 nt_action->addTo( iconToolBar ); 1213 nt_action->addTo( iconToolBar );
1201 if (p-> mShowIconSearch) 1214 if (p-> mShowIconSearch)
1202 search_action->addTo( iconToolBar ); 1215 search_action->addTo( iconToolBar );
1203 if (p-> mShowIconWhatsThis) 1216 if (p-> mShowIconWhatsThis)
1204 QWhatsThis::whatsThisButton ( iconToolBar ); 1217 QWhatsThis::whatsThisButton ( iconToolBar );
1205 if (p-> mShowIconNext) 1218 if (p-> mShowIconNext)
1206 whatsnext_action->addTo( viewToolBar ); 1219 whatsnext_action->addTo( viewToolBar );
1207 if (p-> mShowIconNextDays) 1220 if (p-> mShowIconNextDays)
1208 xdays_action->addTo( viewToolBar ); 1221 xdays_action->addTo( viewToolBar );
1209 if (p-> mShowIconJournal) 1222 if (p-> mShowIconJournal)
1210 viewjournal_action->addTo( viewToolBar ); 1223 viewjournal_action->addTo( viewToolBar );
1211 if (p-> mShowIconDay1) 1224 if (p-> mShowIconDay1)
1212 day1_action->addTo( viewToolBar ); 1225 day1_action->addTo( viewToolBar );
1213 if (p-> mShowIconDay5) 1226 if (p-> mShowIconDay5)
1214 day5_action->addTo( viewToolBar ); 1227 day5_action->addTo( viewToolBar );
1215 if (p-> mShowIconDay7) 1228 if (p-> mShowIconDay7)
1216 day7_action->addTo( viewToolBar ); 1229 day7_action->addTo( viewToolBar );
1217 if (p-> mShowIconDay6) 1230 if (p-> mShowIconDay6)
1218 day6_action->addTo( viewToolBar ); 1231 day6_action->addTo( viewToolBar );
1219 if (p-> mShowIconMonth) 1232 if (p-> mShowIconMonth)
1220 month_action->addTo( viewToolBar ); 1233 month_action->addTo( viewToolBar );
1221 if (p-> mShowIconList) 1234 if (p-> mShowIconList)
1222 showlist_action->addTo( viewToolBar ); 1235 showlist_action->addTo( viewToolBar );
1223 if (p-> mShowIconTodoview) 1236 if (p-> mShowIconTodoview)
1224 todoview_action->addTo( viewToolBar ); 1237 todoview_action->addTo( viewToolBar );
1225 1238
1226 icon = loadPixmap( pathString + "2leftarrowB" ); 1239 icon = loadPixmap( pathString + "2leftarrowB" );
1227 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); 1240 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200);
1228 if (p-> mShowIconBackFast) { 1241 if (p-> mShowIconBackFast) {
1229 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1242 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1230 connect( action, SIGNAL( activated() ), 1243 connect( action, SIGNAL( activated() ),
1231 mView, SLOT( goPreviousMonth() ) ); 1244 mView, SLOT( goPreviousMonth() ) );
1232 action->addTo( navigatorToolBar ); 1245 action->addTo( navigatorToolBar );
1233 } 1246 }
1234 icon = loadPixmap( pathString + "1leftarrowB" ); 1247 icon = loadPixmap( pathString + "1leftarrowB" );
1235 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); 1248 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210);
1236 if (p-> mShowIconBack) { 1249 if (p-> mShowIconBack) {
1237 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1250 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
1238 connect( action, SIGNAL( activated() ), 1251 connect( action, SIGNAL( activated() ),
1239 mView, SLOT( goPrevious() ) ); 1252 mView, SLOT( goPrevious() ) );
1240 action->addTo( navigatorToolBar ); 1253 action->addTo( navigatorToolBar );
1241 } 1254 }
1242 icon = loadPixmap( pathString + "today" ); 1255 icon = loadPixmap( pathString + "today" );
1243 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); 1256 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
1244 if (p-> mShowIconToday) 1257 if (p-> mShowIconToday)
1245 today_action->addTo( navigatorToolBar ); 1258 today_action->addTo( navigatorToolBar );
1246 icon = loadPixmap( pathString + "1rightarrowB" ); 1259 icon = loadPixmap( pathString + "1rightarrowB" );
1247 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 1260 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
1248 if (p-> mShowIconForward) { 1261 if (p-> mShowIconForward) {
1249 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 1262 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
1250 connect( action, SIGNAL( activated() ), 1263 connect( action, SIGNAL( activated() ),
1251 mView, SLOT( goNext() ) ); 1264 mView, SLOT( goNext() ) );
1252 action->addTo( navigatorToolBar ); 1265 action->addTo( navigatorToolBar );
1253 } 1266 }
1254 icon = loadPixmap( pathString + "2rightarrowB" ); 1267 icon = loadPixmap( pathString + "2rightarrowB" );
1255 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 1268 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
1256 if (p-> mShowIconForwardFast) { 1269 if (p-> mShowIconForwardFast) {
1257 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 1270 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
1258 connect( action, SIGNAL( activated() ), 1271 connect( action, SIGNAL( activated() ),
1259 mView, SLOT( goNextMonth() ) ); 1272 mView, SLOT( goNextMonth() ) );
1260 action->addTo( navigatorToolBar ); 1273 action->addTo( navigatorToolBar );
1261 } 1274 }
1262 1275
1263 1276
1264 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); 1277 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6);
1265 1278
1266 1279
1267 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); 1280 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true);
1268 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); 1281 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true);
1269 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); 1282 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true);
1270 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); 1283 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true);
1271 1284
1272 if (p-> mShowIconNewEvent) 1285 if (p-> mShowIconNewEvent)
1273 configureToolBarMenu->setItemChecked( 10, true ); 1286 configureToolBarMenu->setItemChecked( 10, true );
1274 if (p->mShowIconNewTodo ) 1287 if (p->mShowIconNewTodo )
1275 configureToolBarMenu->setItemChecked( 20, true ); 1288 configureToolBarMenu->setItemChecked( 20, true );
1276 if (p-> mShowIconSearch) 1289 if (p-> mShowIconSearch)
1277 configureToolBarMenu->setItemChecked( 120, true ); 1290 configureToolBarMenu->setItemChecked( 120, true );
1278 if (p-> mShowIconList) 1291 if (p-> mShowIconList)
1279 configureToolBarMenu->setItemChecked( 30, true ); 1292 configureToolBarMenu->setItemChecked( 30, true );
1280 if (p-> mShowIconDay1) 1293 if (p-> mShowIconDay1)
1281 configureToolBarMenu->setItemChecked( 40, true ); 1294 configureToolBarMenu->setItemChecked( 40, true );
1282 if (p-> mShowIconDay5) 1295 if (p-> mShowIconDay5)
1283 configureToolBarMenu->setItemChecked( 50, true ); 1296 configureToolBarMenu->setItemChecked( 50, true );
1284 if (p-> mShowIconDay6) 1297 if (p-> mShowIconDay6)
1285 configureToolBarMenu->setItemChecked( 75, true ); 1298 configureToolBarMenu->setItemChecked( 75, true );
1286 if (p-> mShowIconDay7) 1299 if (p-> mShowIconDay7)
1287 configureToolBarMenu->setItemChecked( 60, true ); 1300 configureToolBarMenu->setItemChecked( 60, true );
1288 if (p-> mShowIconMonth) 1301 if (p-> mShowIconMonth)
1289 configureToolBarMenu->setItemChecked( 70, true ); 1302 configureToolBarMenu->setItemChecked( 70, true );
1290 if (p-> mShowIconTodoview) 1303 if (p-> mShowIconTodoview)
1291 configureToolBarMenu->setItemChecked( 80, true ); 1304 configureToolBarMenu->setItemChecked( 80, true );
1292 if (p-> mShowIconBackFast) 1305 if (p-> mShowIconBackFast)
1293 configureToolBarMenu->setItemChecked( 200, true ); 1306 configureToolBarMenu->setItemChecked( 200, true );
1294 if (p-> mShowIconBack) 1307 if (p-> mShowIconBack)
1295 configureToolBarMenu->setItemChecked( 210, true ); 1308 configureToolBarMenu->setItemChecked( 210, true );
1296 if (p-> mShowIconToday) 1309 if (p-> mShowIconToday)
1297 configureToolBarMenu->setItemChecked( 130, true ); 1310 configureToolBarMenu->setItemChecked( 130, true );
1298 if (p-> mShowIconForward) 1311 if (p-> mShowIconForward)
1299 configureToolBarMenu->setItemChecked( 220, true ); 1312 configureToolBarMenu->setItemChecked( 220, true );
1300 if (p-> mShowIconForwardFast) 1313 if (p-> mShowIconForwardFast)
1301 configureToolBarMenu->setItemChecked( 230, true ); 1314 configureToolBarMenu->setItemChecked( 230, true );
1302 if (p-> mShowIconNextDays) 1315 if (p-> mShowIconNextDays)
1303 configureToolBarMenu->setItemChecked( 100, true ); 1316 configureToolBarMenu->setItemChecked( 100, true );
1304 if (p-> mShowIconNext) 1317 if (p-> mShowIconNext)
1305 configureToolBarMenu->setItemChecked( 110, true ); 1318 configureToolBarMenu->setItemChecked( 110, true );
1306 if (p-> mShowIconJournal) 1319 if (p-> mShowIconJournal)
1307 configureToolBarMenu->setItemChecked( 90, true ); 1320 configureToolBarMenu->setItemChecked( 90, true );
1308 if (p-> mShowIconWhatsThis) 1321 if (p-> mShowIconWhatsThis)
1309 configureToolBarMenu->setItemChecked( 300, true ); 1322 configureToolBarMenu->setItemChecked( 300, true );
1310 if (p-> mShowIconWeekNum) 1323 if (p-> mShowIconWeekNum)
1311 configureToolBarMenu->setItemChecked( 400, true ); 1324 configureToolBarMenu->setItemChecked( 400, true );
1312 if (!p-> mShowIconStretch) { 1325 if (!p-> mShowIconStretch) {
1313 QLabel* dummy = new QLabel( iconToolBar ); 1326 QLabel* dummy = new QLabel( iconToolBar );
1314 dummy->setBackgroundColor( iconToolBar->backgroundColor() ); 1327 dummy->setBackgroundColor( iconToolBar->backgroundColor() );
1315 dummy->setMinimumWidth( 0 ); 1328 dummy->setMinimumWidth( 0 );
1316 iconToolBar->setStretchableWidget ( dummy ) ; 1329 iconToolBar->setStretchableWidget ( dummy ) ;
1317 } 1330 }
1318 else { 1331 else {
1319 iconToolBar->setHorizontalStretchable (true ); 1332 iconToolBar->setHorizontalStretchable (true );
1320 viewToolBar->setHorizontalStretchable (true ); 1333 viewToolBar->setHorizontalStretchable (true );
1321 navigatorToolBar->setHorizontalStretchable (true ); 1334 navigatorToolBar->setHorizontalStretchable (true );
1322 iconToolBar->setVerticalStretchable (true ); 1335 iconToolBar->setVerticalStretchable (true );
1323 viewToolBar->setVerticalStretchable (true ); 1336 viewToolBar->setVerticalStretchable (true );
1324 navigatorToolBar->setVerticalStretchable (true ); 1337 navigatorToolBar->setVerticalStretchable (true );
1325 configureToolBarMenu->setItemChecked( 5, true ); 1338 configureToolBarMenu->setItemChecked( 5, true );
1326 } 1339 }
1327 if (p-> mShowIconFilter) 1340 if (p-> mShowIconFilter)
1328 configureToolBarMenu->setItemChecked( 7, true ); 1341 configureToolBarMenu->setItemChecked( 7, true );
1329 if (p-> mShowIconOnetoolbar) 1342 if (p-> mShowIconOnetoolbar)
1330 configureToolBarMenu->setItemChecked( 6, true ); 1343 configureToolBarMenu->setItemChecked( 6, true );
1331 1344
1332 1345
1333 if ( filterMenubar ) { 1346 if ( filterMenubar ) {
1334 filterMenubar->reparent(filterToolBar,0,QPoint(0,0) ); 1347 filterMenubar->reparent(filterToolBar,0,QPoint(0,0) );
1335 connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) ); 1348 connect( mView, SIGNAL( filtersUpdated() ), SLOT( updateFilterToolbar() ) );
1336 } 1349 }
1337 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 1350 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
1338 configureAgenda( p->mHourSize ); 1351 configureAgenda( p->mHourSize );
1339 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 1352 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
1340} 1353}
1341 1354
1342void MainWindow::exportToPhone( int mode ) 1355void MainWindow::exportToPhone( int mode )
1343{ 1356{
1344 1357
1345 //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1358 //ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1346 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1359 //ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1347 KOex2phonePrefs ex2phone; 1360 KOex2phonePrefs ex2phone;
1348 1361
1349 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); 1362 ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection );
1350 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); 1363 ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice );
1351 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1364 ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel );
1352 if ( mode == 1 ) 1365 if ( mode == 1 )
1353 ex2phone.setCaption(i18n("Export complete calendar")); 1366 ex2phone.setCaption(i18n("Export complete calendar"));
1354 if ( mode == 2 ) 1367 if ( mode == 2 )
1355 ex2phone.setCaption(i18n("Export filtered calendar")); 1368 ex2phone.setCaption(i18n("Export filtered calendar"));
1356 1369
1357 if ( !ex2phone.exec() ) { 1370 if ( !ex2phone.exec() ) {
1358 return; 1371 return;
1359 } 1372 }
1360 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); 1373 KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text();
1361 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); 1374 KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text();
1362 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); 1375 KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text();
1363 1376
1364 int inFuture = 0; 1377 int inFuture = 0;
1365 if ( ex2phone.mWriteBackFuture->isChecked() ) 1378 if ( ex2phone.mWriteBackFuture->isChecked() )
1366 inFuture = ex2phone.mWriteBackFutureWeeks->value(); 1379 inFuture = ex2phone.mWriteBackFutureWeeks->value();
1367 QPtrList<Incidence> delSel; 1380 QPtrList<Incidence> delSel;
1368 if ( mode == 1 ) 1381 if ( mode == 1 )
1369 delSel = mCalendar->rawIncidences(); 1382 delSel = mCalendar->rawIncidences();
1370 if ( mode == 2 ) 1383 if ( mode == 2 )
1371 delSel = mCalendar->incidences(); 1384 delSel = mCalendar->incidences();
1372 CalendarLocal* cal = new CalendarLocal(); 1385 CalendarLocal* cal = new CalendarLocal();
1373 cal->setLocalTime(); 1386 cal->setLocalTime();
1374 Incidence *incidence = delSel.first(); 1387 Incidence *incidence = delSel.first();
1375 QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); 1388 QDateTime cur = QDateTime::currentDateTime().addDays( -7 );
1376 QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); 1389 QDateTime end = cur.addDays( ( inFuture +1 ) *7 );
1377 while ( incidence ) { 1390 while ( incidence ) {
1378 if ( incidence->typeID() != journalID ) { 1391 if ( incidence->typeID() != journalID ) {
1379 bool add = true; 1392 bool add = true;
1380 if ( inFuture ) { 1393 if ( inFuture ) {
1381 QDateTime dt; 1394 QDateTime dt;
1382 if ( incidence->typeID() == todoID ) { 1395 if ( incidence->typeID() == todoID ) {
1383 Todo * t = (Todo*)incidence; 1396 Todo * t = (Todo*)incidence;
1384 if ( t->hasDueDate() ) 1397 if ( t->hasDueDate() )
1385 dt = t->dtDue(); 1398 dt = t->dtDue();
1386 else 1399 else
1387 dt = cur.addSecs( 62 ); 1400 dt = cur.addSecs( 62 );
1388 } 1401 }
1389 else { 1402 else {
1390 bool ok; 1403 bool ok;
1391 dt = incidence->getNextOccurence( cur, &ok ); 1404 dt = incidence->getNextOccurence( cur, &ok );
1392 if ( !ok ) 1405 if ( !ok )
1393 dt = cur.addSecs( -62 ); 1406 dt = cur.addSecs( -62 );
1394 } 1407 }
1395 if ( dt < cur || dt > end ) { 1408 if ( dt < cur || dt > end ) {
1396 add = false; 1409 add = false;
1397 } 1410 }
1398 } 1411 }
1399 if ( add ) { 1412 if ( add ) {
1400 Incidence *in = incidence->clone(); 1413 Incidence *in = incidence->clone();
1401 cal->addIncidence( in ); 1414 cal->addIncidence( in );
1402 } 1415 }
1403 } 1416 }
1404 incidence = delSel.next(); 1417 incidence = delSel.next();
1405 } 1418 }
1406 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, 1419 PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice,
1407 KPimGlobalPrefs::instance()->mEx2PhoneConnection, 1420 KPimGlobalPrefs::instance()->mEx2PhoneConnection,
1408 KPimGlobalPrefs::instance()->mEx2PhoneModel ); 1421 KPimGlobalPrefs::instance()->mEx2PhoneModel );
1409 1422
1410 setCaption( i18n("Writing to phone...")); 1423 setCaption( i18n("Writing to phone..."));
1411 if ( PhoneFormat::writeToPhone( cal ) ) 1424 if ( PhoneFormat::writeToPhone( cal ) )
1412 setCaption( i18n("Export to phone successful!")); 1425 setCaption( i18n("Export to phone successful!"));
1413 else 1426 else
1414 setCaption( i18n("Error exporting to phone!")); 1427 setCaption( i18n("Error exporting to phone!"));
1415 delete cal; 1428 delete cal;
1416} 1429}
1417 1430
1418 1431
1419void MainWindow::setDefaultPreferences() 1432void MainWindow::setDefaultPreferences()
1420{ 1433{
1421 KOPrefs *p = KOPrefs::instance(); 1434 KOPrefs *p = KOPrefs::instance();
1422 1435
1423 p->mCompactDialogs = true; 1436 p->mCompactDialogs = true;
1424 p->mConfirm = true; 1437 p->mConfirm = true;
1425 // p->mEnableQuickTodo = false; 1438 // p->mEnableQuickTodo = false;
1426 1439
1427} 1440}
1428 1441
1429QString MainWindow::resourcePath() 1442QString MainWindow::resourcePath()
1430{ 1443{
1431 return KGlobal::iconLoader()->iconPath(); 1444 return KGlobal::iconLoader()->iconPath();
1432} 1445}
1433 1446
1434void MainWindow::displayText( QString text ,QString cap ) 1447void MainWindow::displayText( QString text ,QString cap )
1435{ 1448{
1436 QDialog dia( this, "name", true ); ; 1449 QDialog dia( this, "name", true ); ;
1437 dia.setCaption( cap ); 1450 dia.setCaption( cap );
1438 QVBoxLayout* lay = new QVBoxLayout( &dia ); 1451 QVBoxLayout* lay = new QVBoxLayout( &dia );
1439 lay->setSpacing( 3 ); 1452 lay->setSpacing( 3 );
1440 lay->setMargin( 3 ); 1453 lay->setMargin( 3 );
1441 QTextBrowser tb ( &dia ); 1454 QTextBrowser tb ( &dia );
1442 lay->addWidget( &tb ); 1455 lay->addWidget( &tb );
1443 tb.setText( text ); 1456 tb.setText( text );
1444#ifdef DESKTOP_VERSION 1457#ifdef DESKTOP_VERSION
1445 dia.resize( 640, 480); 1458 dia.resize( 640, 480);
1446#else 1459#else
1447 dia.showMaximized(); 1460 dia.showMaximized();
1448#endif 1461#endif
1449 dia.exec(); 1462 dia.exec();
1450} 1463}
1451 1464
1452void MainWindow::features() 1465void MainWindow::features()
1453{ 1466{
1454 1467
1455 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); 1468 KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" );
1456} 1469}
1457 1470
1458void MainWindow::usertrans() 1471void MainWindow::usertrans()
1459{ 1472{
1460 1473
1461 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); 1474 KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" );
1462} 1475}
1463 1476
1464void MainWindow::storagehowto() 1477void MainWindow::storagehowto()
1465{ 1478{
1466 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); 1479 KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" );
1467} 1480}
1468void MainWindow::timetrackinghowto() 1481void MainWindow::timetrackinghowto()
1469{ 1482{
1470 KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" ); 1483 KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" );
1471} 1484}
1472void MainWindow::kdesynchowto() 1485void MainWindow::kdesynchowto()
1473{ 1486{
1474 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 1487 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
1475} 1488}
1476void MainWindow::multisynchowto() 1489void MainWindow::multisynchowto()
1477{ 1490{
1478 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 1491 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
1479} 1492}
1480void MainWindow::synchowto() 1493void MainWindow::synchowto()
1481{ 1494{
1482 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 1495 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
1483} 1496}
1484void MainWindow::faq() 1497void MainWindow::faq()
1485{ 1498{
1486 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); 1499 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" );
1487 1500
1488} 1501}
1489void MainWindow::whatsNew() 1502void MainWindow::whatsNew()
1490{ 1503{
1491 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 1504 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
1492 1505
1493} 1506}
1494void MainWindow::licence() 1507void MainWindow::licence()
1495{ 1508{
1496 KApplication::showLicence(); 1509 KApplication::showLicence();
1497 1510
1498} 1511}
1499void MainWindow::about() 1512void MainWindow::about()
1500{ 1513{
1501 QString version; 1514 QString version;
1502#include <../version> 1515#include <../version>
1503 QMessageBox::about( this, i18n("About KOrganizer/Pi"), 1516 QMessageBox::about( this, i18n("About KOrganizer/Pi"),
1504 i18n("KOrganizer/Platform-independent\n") + 1517 i18n("KOrganizer/Platform-independent\n") +
1505 "(KO/Pi) " + version + " - " + 1518 "(KO/Pi) " + version + " - " +
1506 1519
1507#ifdef DESKTOP_VERSION 1520#ifdef DESKTOP_VERSION
1508 i18n("Desktop Edition\n") + 1521 i18n("Desktop Edition\n") +
1509#else 1522#else
1510 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + 1523 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") +
1511#endif 1524#endif
1512 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); 1525 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") );
1513} 1526}
1514void MainWindow::keyBindings() 1527void MainWindow::keyBindings()
1515{ 1528{
1516 QString cap = i18n("KO/Pi Keys + Colors"); 1529 QString cap = i18n("KO/Pi Keys + Colors");
1517 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + 1530 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
1518 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ 1531 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
1519 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + 1532 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") +
1520 i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + 1533 i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") +
1521 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + 1534 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") +
1522 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ 1535 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+
1523 i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ 1536 i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+
1524 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ 1537 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+
1525 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ 1538 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+
1526 i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ 1539 i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+
1527 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ 1540 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+
1528 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ 1541 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+
1529 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ 1542 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+
1530 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ 1543 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+
1531 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ 1544 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+
1532 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ 1545 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+
1533 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ 1546 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+
1534 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ 1547 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+
1535 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ 1548 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+
1536 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ 1549 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+
1537 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ 1550 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+
1538 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ 1551 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+
1539 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ 1552 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+
1540 i18n("<p><h3>In agenda view:</h3></p>\n") + 1553 i18n("<p><h3>In agenda view:</h3></p>\n") +
1541 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ 1554 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+
1542 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ 1555 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+
1543 i18n("<p><h3>In todo view:</h3></p>\n") + 1556 i18n("<p><h3>In todo view:</h3></p>\n") +
1544 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ 1557 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+
1545 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ 1558 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+
1546 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ 1559 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+
1547 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ 1560 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+
1548 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1561 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1549 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ 1562 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+
1550 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ 1563 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+
1551 i18n("<p><h3>In list view:</h3></p>\n") + 1564 i18n("<p><h3>In list view:</h3></p>\n") +
1552 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1565 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1553 i18n("<p><b>return</b>: Select item+one step down</p>\n")+ 1566 i18n("<p><b>return</b>: Select item+one step down</p>\n")+
1554 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ 1567 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+
1555 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ 1568 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+
1556 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ 1569 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+
1557 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ 1570 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+
1558 i18n("<p><h3>In event/todo viewer:</h3></p>\n") + 1571 i18n("<p><h3>In event/todo viewer:</h3></p>\n") +
1559 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ 1572 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+
1560 i18n("<p><b>A</b>: Show agenda view.</p>\n")+ 1573 i18n("<p><b>A</b>: Show agenda view.</p>\n")+
1561 i18n("<p><b>E</b>: Edit item</p>\n") + 1574 i18n("<p><b>E</b>: Edit item</p>\n") +
1562 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + 1575 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") +
1563 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + 1576 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") +
1564 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ 1577 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+
1565 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ 1578 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+
1566 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ 1579 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+
1567 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ 1580 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+
1568 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ 1581 i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+
1569 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + 1582 i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") +
1570 i18n("<p><b>White</b>: Item readonly</p>\n"); 1583 i18n("<p><b>White</b>: Item readonly</p>\n");
1571 displayText( text, cap); 1584 displayText( text, cap);
1572} 1585}
1573void MainWindow::aboutAutoSaving() 1586void MainWindow::aboutAutoSaving()
1574{ 1587{
1575 QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); 1588 QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n");
1576 1589
1577 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); 1590 KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text);
1578 1591
1579} 1592}
1580void MainWindow::aboutKnownBugs() 1593void MainWindow::aboutKnownBugs()
1581{ 1594{
1582 QMessageBox* msg; 1595 QMessageBox* msg;
1583 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), 1596 msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"),
1584 i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ 1597 i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+
1585 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ 1598 i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+
1586 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + 1599 i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") +
1587 i18n("\nor report them in the bugtracker on\n") + 1600 i18n("\nor report them in the bugtracker on\n") +
1588 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), 1601 i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"),
1589 QMessageBox::NoIcon, 1602 QMessageBox::NoIcon,
1590 QMessageBox::Ok, 1603 QMessageBox::Ok,
1591 QMessageBox::NoButton, 1604 QMessageBox::NoButton,
1592 QMessageBox::NoButton); 1605 QMessageBox::NoButton);
1593 msg->exec(); 1606 msg->exec();
1594 delete msg; 1607 delete msg;
1595 1608
1596} 1609}
1597 1610
1598QString MainWindow::defaultFileName() 1611QString MainWindow::defaultFileName()
1599{ 1612{
1600 return locateLocal( "data", "korganizer/mycalendar.ics" ); 1613 return locateLocal( "data", "korganizer/mycalendar.ics" );
1601} 1614}
1602QString MainWindow::syncFileName() 1615QString MainWindow::syncFileName()
1603{ 1616{
1604#ifdef DESKTOP_VERSION 1617#ifdef DESKTOP_VERSION
1605 return locateLocal( "tmp", "synccalendar.ics" ); 1618 return locateLocal( "tmp", "synccalendar.ics" );
1606#else 1619#else
1607 return QString( "/tmp/synccalendar.ics" ); 1620 return QString( "/tmp/synccalendar.ics" );
1608#endif 1621#endif
1609} 1622}
1610#include "koglobals.h" 1623#include "koglobals.h"
1611#include <kcalendarsystem.h> 1624#include <kcalendarsystem.h>
1612void MainWindow::updateWeek(QDate seda) 1625void MainWindow::updateWeek(QDate seda)
1613{ 1626{
1614 int weekNum = KGlobal::locale()->weekNum ( seda ); 1627 int weekNum = KGlobal::locale()->weekNum ( seda );
1615 mWeekPixmap.fill( mWeekBgColor ); 1628 mWeekPixmap.fill( mWeekBgColor );
1616 QPainter p ( &mWeekPixmap ); 1629 QPainter p ( &mWeekPixmap );
1617 p.setFont( mWeekFont ); 1630 p.setFont( mWeekFont );
1618 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); 1631 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) );
1619 p.end(); 1632 p.end();
1620 QIconSet icon3 ( mWeekPixmap ); 1633 QIconSet icon3 ( mWeekPixmap );
1621 mWeekAction->setIconSet ( icon3 ); 1634 mWeekAction->setIconSet ( icon3 );
1622 1635
1623} 1636}
1624void MainWindow::updateWeekNum(const DateList &selectedDates) 1637void MainWindow::updateWeekNum(const DateList &selectedDates)
1625{ 1638{
1626 updateWeek( selectedDates.first() ); 1639 updateWeek( selectedDates.first() );
1627} 1640}
1628void MainWindow::processIncidenceSelection( Incidence *incidence ) 1641void MainWindow::processIncidenceSelection( Incidence *incidence )
1629{ 1642{
1630 1643
1631 if ( !incidence ) { 1644 if ( !incidence ) {
1632 enableIncidenceActions( false ); 1645 enableIncidenceActions( false );
1633 1646
1634 mNewSubTodoAction->setEnabled( false ); 1647 mNewSubTodoAction->setEnabled( false );
1635 setCaptionToDates(); 1648 setCaptionToDates();
1636 return; 1649 return;
1637 1650
1638 } 1651 }
1639 1652
1640 //KGlobal::locale()->formatDateTime(nextA, true); 1653 //KGlobal::locale()->formatDateTime(nextA, true);
1641 QString startString = ""; 1654 QString startString = "";
1642 if ( incidence->typeID() != todoID ) { 1655 if ( incidence->typeID() != todoID ) {
1643 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { 1656 if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
1644 if ( incidence->doesFloat() ) { 1657 if ( incidence->doesFloat() ) {
1645 startString += ": "+incidence->dtStartDateStr( true ); 1658 startString += ": "+incidence->dtStartDateStr( true );
1646 startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); 1659 startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
1647 1660
1648 } else { 1661 } else {
1649 startString = ": "+incidence->dtStartStr(true); 1662 startString = ": "+incidence->dtStartStr(true);
1650 startString += " --- "+((Event*)incidence)->dtEndStr(true); 1663 startString += " --- "+((Event*)incidence)->dtEndStr(true);
1651 1664
1652 } 1665 }
1653 1666
1654 } else { 1667 } else {
1655 if ( incidence->dtStart().time() != incidence->dtEnd().time() ) 1668 if ( incidence->dtStart().time() != incidence->dtEnd().time() )
1656 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ 1669 startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
1657 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); 1670 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
1658 1671
1659 if ( incidence->isBirthday() || incidence->isAnniversary() ) { 1672 if ( incidence->isBirthday() || incidence->isAnniversary() ) {
1660 bool ok; 1673 bool ok;
1661 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); 1674 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
1662 if ( ok ) { 1675 if ( ok ) {
1663 int years = noc.date().year() - incidence->dtStart().date().year(); 1676 int years = noc.date().year() - incidence->dtStart().date().year();
1664 startString += i18n(" (%1 y.)"). arg( years ); 1677 startString += i18n(" (%1 y.)"). arg( years );
1665 } 1678 }
1666 } 1679 }
1667 else 1680 else
1668 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); 1681 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
1669 } 1682 }
1670 1683
1671 } 1684 }
1672 else 1685 else
1673 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); 1686 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
1674 if ( !incidence->location().isEmpty() ) 1687 if ( !incidence->location().isEmpty() )
1675 startString += " (" +incidence->location()+")"; 1688 startString += " (" +incidence->location()+")";
1676 setCaption( incidence->summary()+startString); 1689 setCaption( incidence->summary()+startString);
1677 1690
1678 enableIncidenceActions( true ); 1691 enableIncidenceActions( true );
1679 1692
1680 if ( incidence->typeID() == eventID ) { 1693 if ( incidence->typeID() == eventID ) {
1681 mShowAction->setText( i18n("Show Event...") ); 1694 mShowAction->setText( i18n("Show Event...") );
1682 mEditAction->setText( i18n("Edit Event...") ); 1695 mEditAction->setText( i18n("Edit Event...") );
1683 mDeleteAction->setText( i18n("Delete Event...") ); 1696 mDeleteAction->setText( i18n("Delete Event...") );
1684 1697
1685 mNewSubTodoAction->setEnabled( false ); 1698 mNewSubTodoAction->setEnabled( false );
1686 } else if ( incidence->typeID() == todoID ) { 1699 } else if ( incidence->typeID() == todoID ) {
1687 mShowAction->setText( i18n("Show Todo...") ); 1700 mShowAction->setText( i18n("Show Todo...") );
1688 mEditAction->setText( i18n("Edit Todo...") ); 1701 mEditAction->setText( i18n("Edit Todo...") );
1689 mDeleteAction->setText( i18n("Delete Todo...") ); 1702 mDeleteAction->setText( i18n("Delete Todo...") );
1690 1703
1691 mNewSubTodoAction->setEnabled( true ); 1704 mNewSubTodoAction->setEnabled( true );
1692 } else { 1705 } else {
1693 mShowAction->setText( i18n("Show...") ); 1706 mShowAction->setText( i18n("Show...") );
1694 mShowAction->setText( i18n("Edit...") ); 1707 mShowAction->setText( i18n("Edit...") );
1695 mShowAction->setText( i18n("Delete...") ); 1708 mShowAction->setText( i18n("Delete...") );
1696 1709
1697 mNewSubTodoAction->setEnabled( false ); 1710 mNewSubTodoAction->setEnabled( false );
1698 } 1711 }
1699} 1712}
1700 1713
1701void MainWindow::enableIncidenceActions( bool enabled ) 1714void MainWindow::enableIncidenceActions( bool enabled )
1702{ 1715{
1703 mShowAction->setEnabled( enabled ); 1716 mShowAction->setEnabled( enabled );
1704 mEditAction->setEnabled( enabled ); 1717 mEditAction->setEnabled( enabled );
1705 mDeleteAction->setEnabled( enabled ); 1718 mDeleteAction->setEnabled( enabled );
1706 1719
1707 mCloneAction->setEnabled( enabled ); 1720 mCloneAction->setEnabled( enabled );
1708 mMoveAction->setEnabled( enabled ); 1721 mMoveAction->setEnabled( enabled );
1709 mBeamAction->setEnabled( enabled ); 1722 mBeamAction->setEnabled( enabled );
1710 mCancelAction->setEnabled( enabled ); 1723 mCancelAction->setEnabled( enabled );
1711} 1724}
1712 1725
1713void MainWindow::importOL() 1726void MainWindow::importOL()
1714{ 1727{
1715#ifdef _OL_IMPORT_ 1728#ifdef _OL_IMPORT_
1716 mView->clearAllViews(); 1729 mView->clearAllViews();
1717 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); 1730 KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this );
1718 id->exec(); 1731 id->exec();
1719 delete id; 1732 delete id;
1720 mView->calendar()->checkAlarmForIncidence( 0, true ); 1733 mView->calendar()->checkAlarmForIncidence( 0, true );
1721 mView->updateView(); 1734 mView->updateView();
1722#endif 1735#endif
1723} 1736}
1724void MainWindow::importBday() 1737void MainWindow::importBday()
1725{ 1738{
1726 int result = QMessageBox::warning( this, i18n("KO/Pi import information!"), 1739 int result = QMessageBox::warning( this, i18n("KO/Pi import information!"),
1727 i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), 1740 i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"),
1728 i18n("Import!"), i18n("Cancel"), 0, 1741 i18n("Import!"), i18n("Cancel"), 0,
1729 0, 1 ); 1742 0, 1 );
1730 if ( result == 0 ) { 1743 if ( result == 0 ) {
1731 mView->importBday(); 1744 mView->importBday();
1732 1745
1733 } 1746 }
1734 1747
1735 1748
1736} 1749}
1737void MainWindow::importQtopia() 1750void MainWindow::importQtopia()
1738{ 1751{
1739 //#ifndef DESKTOP_VERSION 1752 //#ifndef DESKTOP_VERSION
1740 QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"); 1753 QString mess = i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing");
1741#ifdef DESKTOP_VERSION 1754#ifdef DESKTOP_VERSION
1742 mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml"); 1755 mess += i18n("The content of the following files will be\nimported (located in your home directory (hd)):\n(hd)/Applications/datebook/datebook.xml\n(hd)/Applications/todolist/todolist.xml\nThe following category file will be used:\n(hd)/Settings/Categories.xml");
1743#endif 1756#endif
1744 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess, 1757 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mess,
1745 i18n("Import!"), i18n("Cancel"), 0, 1758 i18n("Import!"), i18n("Cancel"), 0,
1746 0, 1 ); 1759 0, 1 );
1747 if ( result == 0 ) { 1760 if ( result == 0 ) {
1748#ifndef DESKTOP_VERSION 1761#ifndef DESKTOP_VERSION
1749 QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); 1762 QString datebook = Global::applicationFileName( "datebook", "datebook.xml");
1750 QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); 1763 QString todolist = Global::applicationFileName( "todolist", "todolist.xml");
1751 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; 1764 QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml";
1752#else 1765#else
1753 QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml"; 1766 QString datebook = QDir::homeDirPath()+ "/Applications/datebook/datebook.xml";
1754 QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml"; 1767 QString todolist = QDir::homeDirPath()+ "/Applications/todolist/todolist.xml";
1755 QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml"; 1768 QString categories = QDir::homeDirPath()+ "/Settings/Categories.xml";
1756#endif 1769#endif
1757 mView->importQtopia( categories, datebook, todolist ); 1770 mView->importQtopia( categories, datebook, todolist );
1758 } 1771 }
1759 mView->calendar()->reInitAlarmSettings(); 1772 mView->calendar()->reInitAlarmSettings();
1760#if 0 1773#if 0
1761 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 1774 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
1762 i18n("Not supported \non desktop!\n"), 1775 i18n("Not supported \non desktop!\n"),
1763 i18n("Ok"), i18n("Cancel"), 0, 1776 i18n("Ok"), i18n("Cancel"), 0,
1764 0, 1 ); 1777 0, 1 );
1765 1778
1766#endif 1779#endif
1767} 1780}
1768 1781
1769void MainWindow::saveOnClose() 1782void MainWindow::saveOnClose()
1770{ 1783{
1771 KOPrefs *p = KOPrefs::instance(); 1784 KOPrefs *p = KOPrefs::instance();
1772 p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); 1785 p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal );
1773 p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal ); 1786 p->mToolBarHorV = ( viewToolBar->orientation () == Qt:: Horizontal );
1774 p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal ); 1787 p->mToolBarHorN = ( navigatorToolBar->orientation () == Qt:: Horizontal );
1775 if ( filterToolBar ) { 1788 if ( filterToolBar ) {
1776 p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal ); 1789 p->mToolBarHorF = ( filterToolBar->orientation () == Qt:: Horizontal );
1777 } 1790 }
1778#ifdef DESKTOP_VERSION 1791#ifdef DESKTOP_VERSION
1779 1792
1780 QPoint myP; 1793 QPoint myP;
1781 myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) ); 1794 myP = mapFromGlobal( iconToolBar->mapToGlobal( QPoint( 0,0) ) );
1782 if ( p->mToolBarHor ) 1795 if ( p->mToolBarHor )
1783 p->mToolBarUp = myP.y() > height()/2; 1796 p->mToolBarUp = myP.y() > height()/2;
1784 else 1797 else
1785 p->mToolBarUp = myP.x() > width()/2; 1798 p->mToolBarUp = myP.x() > width()/2;
1786 myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); 1799 myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) );
1787 if ( p->mToolBarHorV ) 1800 if ( p->mToolBarHorV )
1788 p->mToolBarUpV = myP.y() > height()/2; 1801 p->mToolBarUpV = myP.y() > height()/2;
1789 else 1802 else
1790 p->mToolBarUpV = myP.x() > width()/2 ; 1803 p->mToolBarUpV = myP.x() > width()/2 ;
1791 myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); 1804 myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) );
1792 if ( p->mToolBarHorN ) 1805 if ( p->mToolBarHorN )
1793 p->mToolBarUpN = myP.y() > height()/2; 1806 p->mToolBarUpN = myP.y() > height()/2;
1794 else 1807 else
1795 p->mToolBarUpN = myP.x() > width()/2 ; 1808 p->mToolBarUpN = myP.x() > width()/2 ;
1796 if ( filterToolBar ) { 1809 if ( filterToolBar ) {
1797 myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); 1810 myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) );
1798 if ( p->mToolBarHorF ) 1811 if ( p->mToolBarHorF )
1799 p->mToolBarUpF = myP.y() > height()/2; 1812 p->mToolBarUpF = myP.y() > height()/2;
1800 else 1813 else
1801 p->mToolBarUpF = myP.x() > width()/2 ; 1814 p->mToolBarUpF = myP.x() > width()/2 ;
1802 } 1815 }
1803#else 1816#else
1804 if ( p->mToolBarHor ) 1817 if ( p->mToolBarHor )
1805 p->mToolBarUp = iconToolBar->y() > height()/2; 1818 p->mToolBarUp = iconToolBar->y() > height()/2;
1806 else 1819 else
1807 p->mToolBarUp = iconToolBar->x() > width()/2; 1820 p->mToolBarUp = iconToolBar->x() > width()/2;
1808 if ( p->mToolBarHorV ) 1821 if ( p->mToolBarHorV )
1809 p->mToolBarUpV = viewToolBar->y() > height()/2; 1822 p->mToolBarUpV = viewToolBar->y() > height()/2;
1810 else 1823 else
1811 p->mToolBarUpV = viewToolBar->x() > width()/2 ; 1824 p->mToolBarUpV = viewToolBar->x() > width()/2 ;
1812 1825
1813 if ( p->mToolBarHorN ) 1826 if ( p->mToolBarHorN )
1814 p->mToolBarUpN = navigatorToolBar->y() > height()/2; 1827 p->mToolBarUpN = navigatorToolBar->y() > height()/2;
1815 else 1828 else
1816 p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; 1829 p->mToolBarUpN = navigatorToolBar->x() > width()/2 ;
1817 if ( filterToolBar ) { 1830 if ( filterToolBar ) {
1818 if ( p->mToolBarHorF ) 1831 if ( p->mToolBarHorF )
1819 p->mToolBarUpF = filterToolBar->y() > height()/2; 1832 p->mToolBarUpF = filterToolBar->y() > height()/2;
1820 else 1833 else
1821 p->mToolBarUpF = filterToolBar->x() > width()/2 ; 1834 p->mToolBarUpF = filterToolBar->x() > width()/2 ;
1822 } 1835 }
1823#endif 1836#endif
1824 1837
1825 if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) 1838 if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName()))
1826 save(); 1839 save();
1827 mView->writeSettings(); 1840 mView->writeSettings();
1828} 1841}
1829void MainWindow::slotModifiedChanged( bool changed ) 1842void MainWindow::slotModifiedChanged( bool changed )
1830{ 1843{
1831 if ( mBlockAtStartup ) 1844 if ( mBlockAtStartup )
1832 return; 1845 return;
1833 1846
1834 int msec; 1847 int msec;
1835 // we store the changes after 1 minute, 1848 // we store the changes after 1 minute,
1836 // and for safety reasons after 10 minutes again 1849 // and for safety reasons after 10 minutes again
1837 if ( !mSyncManager->blockSave() ) 1850 if ( !mSyncManager->blockSave() )
1838 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; 1851 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000;
1839 else 1852 else
1840 msec = 1000 * 600; 1853 msec = 1000 * 600;
1841 mSaveTimer.start( msec, true ); // 1 minute 1854 mSaveTimer.start( msec, true ); // 1 minute
1842 qDebug("KO: Saving File in %d secs!", msec/1000); 1855 qDebug("KO: Saving File in %d secs!", msec/1000);
1843 mCalendarModifiedFlag = true; 1856 mCalendarModifiedFlag = true;
1844} 1857}
1845void MainWindow::saveStopTimer() 1858void MainWindow::saveStopTimer()
1846{ 1859{
1847 mSaveTimer.stop(); 1860 mSaveTimer.stop();
1848} 1861}
1849void MainWindow::backupAllFiles() 1862void MainWindow::backupAllFiles()
1850{ 1863{
1851 QDate reference ( 2000,1,1); 1864 QDate reference ( 2000,1,1);
1852 int daysTo = reference.daysTo ( QDate::currentDate() ); 1865 int daysTo = reference.daysTo ( QDate::currentDate() );
1853 setCaption(i18n("Creating backup ... please wait ..." )); 1866 setCaption(i18n("Creating backup ... please wait ..." ));
1854 qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); 1867 qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate);
1855 // we need the file path, the backup dir and the number of bups as param 1868 // we need the file path, the backup dir and the number of bups as param
1856 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; 1869 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir;
1857 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) 1870 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir)
1858 bupDir = KGlobalSettings::backupDataDir(); 1871 bupDir = KGlobalSettings::backupDataDir();
1859 int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); 1872 int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
1860 if ( retval == 0 ) { 1873 if ( retval == 0 ) {
1861 setCaption(i18n("Backup cancelled" )); 1874 setCaption(i18n("Backup cancelled" ));
1862 qDebug("KO: Backup cancelled. Will try again tomorrow "); 1875 qDebug("KO: Backup cancelled. Will try again tomorrow ");
1863 // retval == 0 : backup skipped for today, try again tomorrow 1876 // retval == 0 : backup skipped for today, try again tomorrow
1864 KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; 1877 KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1;
1865 } else if ( retval == 1 ){ 1878 } else if ( retval == 1 ){
1866 qDebug("KO: Backup created."); 1879 qDebug("KO: Backup created.");
1867 // backup ok 1880 // backup ok
1868 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 1881 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
1869 KopiCalendarFile * cal = calendars.first(); 1882 KopiCalendarFile * cal = calendars.first();
1870 cal = calendars.next(); 1883 cal = calendars.next();
1871 while ( cal ) { 1884 while ( cal ) {
1872 if ( !cal->mErrorOnLoad ) { 1885 if ( !cal->mErrorOnLoad ) {
1873 int retval = KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); 1886 int retval = KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
1874 } 1887 }
1875 cal = calendars.next(); 1888 cal = calendars.next();
1876 } 1889 }
1877 KOPrefs::instance()->mLastBackupDate = daysTo; 1890 KOPrefs::instance()->mLastBackupDate = daysTo;
1878 setCaption(i18n("Backup succesfully finished" )); 1891 setCaption(i18n("Backup succesfully finished" ));
1879 } else if ( retval == 2 ){ 1892 } else if ( retval == 2 ){
1880 setCaption(i18n("Backup globally disabled" )); 1893 setCaption(i18n("Backup globally disabled" ));
1881 qDebug("KO: Backup globally cancelled."); 1894 qDebug("KO: Backup globally cancelled.");
1882 // backup globally cancelled 1895 // backup globally cancelled
1883 KPimGlobalPrefs::instance()->mBackupEnabled = false; 1896 KPimGlobalPrefs::instance()->mBackupEnabled = false;
1884 } 1897 }
1885 // retval == 3: do nothing, try again later 1898 // retval == 3: do nothing, try again later
1886} 1899}
1887void MainWindow::save() 1900void MainWindow::save()
1888{ 1901{
1889 if ( !mCalendarModifiedFlag ) { 1902 if ( !mCalendarModifiedFlag ) {
1890 qDebug("KO: Calendar not modified. Nothing saved."); 1903 qDebug("KO: Calendar not modified. Nothing saved.");
1891 return; 1904 return;
1892 } 1905 }
1893 if ( mSyncManager->blockSave() ) 1906 if ( mSyncManager->blockSave() )
1894 return; 1907 return;
1895 mSyncManager->setBlockSave(true); 1908 mSyncManager->setBlockSave(true);
1896 if ( mView->checkAllFileVersions() ) { 1909 if ( mView->checkAllFileVersions() ) {
1897 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ 1910 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){
1898 QDate reference ( 2000,1,1); 1911 QDate reference ( 2000,1,1);
1899 int daysTo = reference.daysTo ( QDate::currentDate() ); 1912 int daysTo = reference.daysTo ( QDate::currentDate() );
1900 if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { 1913 if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) {
1901 backupAllFiles(); 1914 backupAllFiles();
1902 } 1915 }
1903 ; // KPimGlobalPrefs::instance()->mLastBackupDate 1916 ; // KPimGlobalPrefs::instance()->mLastBackupDate
1904 } 1917 }
1905 QTime neededSaveTime = QDateTime::currentDateTime().time(); 1918 QTime neededSaveTime = QDateTime::currentDateTime().time();
1906 setCaption(i18n("KO/Pi:Saving Data to File ..." )); 1919 setCaption(i18n("KO/Pi:Saving Data to File ..." ));
1907 qDebug("KO: Start saving data to file!"); 1920 qDebug("KO: Start saving data to file!");
1908 mView->saveCalendars(); 1921 mView->saveCalendars();
1909 mCalendarModifiedFlag = false; 1922 mCalendarModifiedFlag = false;
1910 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 1923 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
1911 qDebug("KO: Needed %d ms for saving.",msNeeded ); 1924 qDebug("KO: Needed %d ms for saving.",msNeeded );
1912 QString savemes; 1925 QString savemes;
1913 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); 1926 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 );
1914 setCaption(savemes); 1927 setCaption(savemes);
1915 } else 1928 } else
1916 setCaption(i18n("Saving cancelled!")); 1929 setCaption(i18n("Saving cancelled!"));
1917 mSyncManager->setBlockSave( false ); 1930 mSyncManager->setBlockSave( false );
1918} 1931}
1919 1932
1920void MainWindow::keyReleaseEvent ( QKeyEvent * e) 1933void MainWindow::keyReleaseEvent ( QKeyEvent * e)
1921{ 1934{
1922 if ( !e->isAutoRepeat() ) { 1935 if ( !e->isAutoRepeat() ) {
1923 mFlagKeyPressed = false; 1936 mFlagKeyPressed = false;
1924 } 1937 }
1925} 1938}
1926void MainWindow::keyPressEvent ( QKeyEvent * e ) 1939void MainWindow::keyPressEvent ( QKeyEvent * e )
1927{ 1940{
1928 qApp->processEvents(); 1941 qApp->processEvents();
1929 if ( e->isAutoRepeat() && !mFlagKeyPressed ) { 1942 if ( e->isAutoRepeat() && !mFlagKeyPressed ) {
1930 e->ignore(); 1943 e->ignore();
1931 // qDebug(" ignore %d",e->isAutoRepeat() ); 1944 // qDebug(" ignore %d",e->isAutoRepeat() );
1932 return; 1945 return;
1933 } 1946 }
1934 if (! e->isAutoRepeat() ) 1947 if (! e->isAutoRepeat() )
1935 mFlagKeyPressed = true; 1948 mFlagKeyPressed = true;
1936 KOPrefs *p = KOPrefs::instance(); 1949 KOPrefs *p = KOPrefs::instance();
1937 bool showSelectedDates = false; 1950 bool showSelectedDates = false;
1938 int size; 1951 int size;
1939 int pro = 0; 1952 int pro = 0;
1940 //qDebug("MainWindow::keyPressEvent "); 1953 //qDebug("MainWindow::keyPressEvent ");
1941 switch ( e->key() ) { 1954 switch ( e->key() ) {
1942 case Qt::Key_Right: 1955 case Qt::Key_Right:
1943 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) 1956 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
1944 mView->goNextMonth(); 1957 mView->goNextMonth();
1945 else 1958 else
1946 mView->goNext(); 1959 mView->goNext();
1947 showSelectedDates = true; 1960 showSelectedDates = true;
1948 break; 1961 break;
1949 case Qt::Key_Left: 1962 case Qt::Key_Left:
1950 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 1963 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
1951 mView->goPreviousMonth(); 1964 mView->goPreviousMonth();
1952 else 1965 else
1953 mView->goPrevious(); 1966 mView->goPrevious();
1954 showSelectedDates = true; 1967 showSelectedDates = true;
1955 break; 1968 break;
1956 case Qt::Key_Down: 1969 case Qt::Key_Down:
1957 mView->viewManager()->agendaView()->scrollOneHourDown(); 1970 mView->viewManager()->agendaView()->scrollOneHourDown();
1958 break; 1971 break;
1959 case Qt::Key_Up: 1972 case Qt::Key_Up:
1960 mView->viewManager()->agendaView()->scrollOneHourUp(); 1973 mView->viewManager()->agendaView()->scrollOneHourUp();
1961 break; 1974 break;
1962 case Qt::Key_K: 1975 case Qt::Key_K:
1963 mView->viewManager()->showMonthViewWeek(); 1976 mView->viewManager()->showMonthViewWeek();
1964 break; 1977 break;
1965 case Qt::Key_I: 1978 case Qt::Key_I:
1966 mView->showIncidence(); 1979 mView->showIncidence();
1967 break; 1980 break;
1968 case Qt::Key_Delete: 1981 case Qt::Key_Delete:
1969 case Qt::Key_Backspace: 1982 case Qt::Key_Backspace:
1970 mView->deleteIncidence(); 1983 mView->deleteIncidence();
1971 break; 1984 break;
1972 case Qt::Key_D: 1985 case Qt::Key_D:
1973 mView->viewManager()->showDayView(); 1986 mView->viewManager()->showDayView();
1974 showSelectedDates = true; 1987 showSelectedDates = true;
1975 break; 1988 break;
1976 case Qt::Key_O: 1989 case Qt::Key_O:
1977 mView->toggleFilerEnabled( ); 1990 mView->toggleFilerEnabled( );
1978 break; 1991 break;
1979 case Qt::Key_0: 1992 case Qt::Key_0:
1980 case Qt::Key_1: 1993 case Qt::Key_1:
1981 case Qt::Key_2: 1994 case Qt::Key_2:
1982 case Qt::Key_3: 1995 case Qt::Key_3:
1983 case Qt::Key_4: 1996 case Qt::Key_4:
1984 case Qt::Key_5: 1997 case Qt::Key_5:
1985 case Qt::Key_6: 1998 case Qt::Key_6:
1986 case Qt::Key_7: 1999 case Qt::Key_7:
1987 case Qt::Key_8: 2000 case Qt::Key_8:
1988 case Qt::Key_9: 2001 case Qt::Key_9:
1989 pro = e->key()-48; 2002 pro = e->key()-48;
1990 if ( pro == 0 ) 2003 if ( pro == 0 )
1991 pro = 10; 2004 pro = 10;
1992 if ( e->state() == Qt::ControlButton) 2005 if ( e->state() == Qt::ControlButton)
1993 pro += 10; 2006 pro += 10;
1994 break; 2007 break;
1995 case Qt::Key_M: 2008 case Qt::Key_M:
1996 mView->viewManager()->showMonthView(); 2009 mView->viewManager()->showMonthView();
1997 showSelectedDates = true; 2010 showSelectedDates = true;
1998 break; 2011 break;
1999 case Qt::Key_Insert: 2012 case Qt::Key_Insert:
2000 mView->newEvent(); 2013 mView->newEvent();
2001 break; 2014 break;
2002 case Qt::Key_S : 2015 case Qt::Key_S :
2003 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) 2016 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
2004 mView->newSubTodo(); 2017 mView->newSubTodo();
2005 else 2018 else
2006 mView->dialogManager()->showSearchDialog(); 2019 mView->dialogManager()->showSearchDialog();
2007 break; 2020 break;
2008 case Qt::Key_Y : 2021 case Qt::Key_Y :
2009 case Qt::Key_Z : 2022 case Qt::Key_Z :
2010 mView->viewManager()->showWorkWeekView(); 2023 mView->viewManager()->showWorkWeekView();
2011 showSelectedDates = true; 2024 showSelectedDates = true;
2012 break; 2025 break;
2013 case Qt::Key_U : 2026 case Qt::Key_U :
2014 mView->viewManager()->showWeekView(); 2027 mView->viewManager()->showWeekView();
2015 showSelectedDates = true; 2028 showSelectedDates = true;
2016 break; 2029 break;
2017 case Qt::Key_H : 2030 case Qt::Key_H :
2018 keyBindings(); 2031 keyBindings();
2019 break; 2032 break;
2020 case Qt::Key_W: 2033 case Qt::Key_W:
2021 mView->viewManager()->showWhatsNextView(); 2034 mView->viewManager()->showWhatsNextView();
2022 break; 2035 break;
2023 case Qt::Key_L: 2036 case Qt::Key_L:
2024 mView->viewManager()->showListView(); 2037 mView->viewManager()->showListView();
2025 break; 2038 break;
2026 case Qt::Key_N: 2039 case Qt::Key_N:
2027 mView->viewManager()->showNextView(); 2040 mView->viewManager()->showNextView();
2028 break; 2041 break;
2029 case Qt::Key_V: 2042 case Qt::Key_V:
2030 mView->viewManager()->showTodoView(); 2043 mView->viewManager()->showTodoView();
2031 break; 2044 break;
2032 case Qt::Key_C: 2045 case Qt::Key_C:
2033 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); 2046 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() );
2034 break; 2047 break;
2035 case Qt::Key_P: 2048 case Qt::Key_P:
2036 mView->showDatePicker( ); 2049 mView->showDatePicker( );
2037 break; 2050 break;
2038 case Qt::Key_F: 2051 case Qt::Key_F:
2039 mView->editFilters(); 2052 mView->editFilters();
2040 break; 2053 break;
2041 case Qt::Key_R: 2054 case Qt::Key_R:
2042 mView->toggleFilter(); 2055 mView->toggleFilter();
2043 break; 2056 break;
2044 case Qt::Key_X: 2057 case Qt::Key_X:
2045 if ( e->state() == Qt::ControlButton ) 2058 if ( e->state() == Qt::ControlButton )
2046 mView->toggleDateNavigatorWidget(); 2059 mView->toggleDateNavigatorWidget();
2047 else { 2060 else {
2048 mView->viewManager()->showNextXView(); 2061 mView->viewManager()->showNextXView();
2049 showSelectedDates = true; 2062 showSelectedDates = true;
2050 } 2063 }
2051 break; 2064 break;
2052 case Qt::Key_Space: 2065 case Qt::Key_Space:
2053 mView->toggleExpand(); 2066 mView->toggleExpand();
2054 break; 2067 break;
2055 case Qt::Key_A: 2068 case Qt::Key_A:
2056 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) 2069 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton )
2057 mView->showNextAlarms(); 2070 mView->showNextAlarms();
2058 else 2071 else
2059 mView->toggleAllDaySize(); 2072 mView->toggleAllDaySize();
2060 break; 2073 break;
2061 case Qt::Key_T: 2074 case Qt::Key_T:
2062 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2075 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2063 mView->newTodo(); 2076 mView->newTodo();
2064 else { 2077 else {
2065 mView->goToday(); 2078 mView->goToday();
2066 showSelectedDates = true; 2079 showSelectedDates = true;
2067 } 2080 }
2068 break; 2081 break;
2069 case Qt::Key_J: 2082 case Qt::Key_J:
2070 mView->viewManager()->showJournalView(); 2083 mView->viewManager()->showJournalView();
2071 break; 2084 break;
2072 case Qt::Key_B: 2085 case Qt::Key_B:
2073 mView->editIncidenceDescription();; 2086 mView->editIncidenceDescription();;
2074 break; 2087 break;
2075 // case Qt::Key_Return: 2088 // case Qt::Key_Return:
2076 case Qt::Key_E: 2089 case Qt::Key_E:
2077 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2090 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2078 mView->newEvent(); 2091 mView->newEvent();
2079 else 2092 else
2080 mView->editIncidence(); 2093 mView->editIncidence();
2081 break; 2094 break;
2082 case Qt::Key_Plus: 2095 case Qt::Key_Plus:
2083 size = p->mHourSize +2; 2096 size = p->mHourSize +2;
2084 if ( size <= 22 ) 2097 if ( size <= 22 )
2085 configureAgenda( size ); 2098 configureAgenda( size );
2086 break; 2099 break;
2087 case Qt::Key_Minus: 2100 case Qt::Key_Minus:
2088 size = p->mHourSize - 2; 2101 size = p->mHourSize - 2;
2089 if ( size >= 4 ) 2102 if ( size >= 4 )
2090 configureAgenda( size ); 2103 configureAgenda( size );
2091 break; 2104 break;
2092 2105
2093 2106
2094 default: 2107 default:
2095 e->ignore(); 2108 e->ignore();
2096 } 2109 }
2097 if ( pro > 0 ) { 2110 if ( pro > 0 ) {
2098 selectFilter( pro+1 ); 2111 selectFilter( pro+1 );
2099 } 2112 }
2100 if ( showSelectedDates ) { 2113 if ( showSelectedDates ) {
2101 ;// setCaptionToDates(); 2114 ;// setCaptionToDates();
2102 } 2115 }
2103 2116
2104} 2117}
2105void MainWindow::fillFilterMenuTB() 2118void MainWindow::fillFilterMenuTB()
2106{ 2119{
2107 selectFilterMenuTB->clear(); 2120 selectFilterMenuTB->clear();
2108 selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 ); 2121 selectFilterMenuTB->insertItem(i18n ( "Edit Filters" ), 0 );
2109 selectFilterMenuTB->insertSeparator(); 2122 selectFilterMenuTB->insertSeparator();
2110 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); 2123 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 );
2111 2124
2112 selectFilterMenuTB->insertSeparator(); 2125 selectFilterMenuTB->insertSeparator();
2113 QPtrList<CalFilter> fili = mView->filters(); 2126 QPtrList<CalFilter> fili = mView->filters();
2114 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2127 CalFilter *curfilter = mView->filterView()->selectedFilter();
2115 CalFilter *filter = fili.first(); 2128 CalFilter *filter = fili.first();
2116 int iii = 2; 2129 int iii = 2;
2117 bool checkitem = mView->filterView()->filtersEnabled(); 2130 bool checkitem = mView->filterView()->filtersEnabled();
2118 while(filter) { 2131 while(filter) {
2119 selectFilterMenuTB->insertItem( filter->name(), iii ); 2132 selectFilterMenuTB->insertItem( filter->name(), iii );
2120 if ( filter == curfilter) 2133 if ( filter == curfilter)
2121 selectFilterMenuTB->setItemChecked( iii, checkitem ); 2134 selectFilterMenuTB->setItemChecked( iii, checkitem );
2122 filter = fili.next(); 2135 filter = fili.next();
2123 ++iii; 2136 ++iii;
2124 } 2137 }
2125 if ( !checkitem ) 2138 if ( !checkitem )
2126 selectFilterMenuTB->setItemChecked( 1, true ); 2139 selectFilterMenuTB->setItemChecked( 1, true );
2127 2140
2128 int x = 0; 2141 int x = 0;
2129 int y = iconToolBar->height(); 2142 int y = iconToolBar->height();
2130 int dX = 0; 2143 int dX = 0;
2131 int dY = 0; 2144 int dY = 0;
2132 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 2145 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2133 if ( iconToolBar->y() > height()/2 ) { 2146 if ( iconToolBar->y() > height()/2 ) {
2134 dY = selectFilterMenuTB->sizeHint().height()+8; 2147 dY = selectFilterMenuTB->sizeHint().height()+8;
2135 y = 0; 2148 y = 0;
2136 } 2149 }
2137 } else { 2150 } else {
2138 if ( iconToolBar->x() > width()/2 ) { // right side 2151 if ( iconToolBar->x() > width()/2 ) { // right side
2139 x=0; 2152 x=0;
2140 dX= selectFilterMenuTB->sizeHint().width()+8; 2153 dX= selectFilterMenuTB->sizeHint().width()+8;
2141 y = 0; 2154 y = 0;
2142 } else { 2155 } else {
2143 x= iconToolBar->width(); 2156 x= iconToolBar->width();
2144 y = 0; 2157 y = 0;
2145 } 2158 }
2146 } 2159 }
2147 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); 2160 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2148 selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))); 2161 selectFilterMenuTB->popup(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)));
2149} 2162}
2150void MainWindow::fillFilterMenu() 2163void MainWindow::fillFilterMenu()
2151{ 2164{
2152 selectFilterMenu->clear(); 2165 selectFilterMenu->clear();
2153 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 ); 2166 selectFilterMenu->insertItem(i18n ( "Edit Filters" ), 0 );
2154 selectFilterMenu->insertSeparator(); 2167 selectFilterMenu->insertSeparator();
2155 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); 2168 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 );
2156 2169
2157 selectFilterMenu->insertSeparator(); 2170 selectFilterMenu->insertSeparator();
2158 QPtrList<CalFilter> fili = mView->filters(); 2171 QPtrList<CalFilter> fili = mView->filters();
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index c9817c3..a4d0523 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -1,170 +1,171 @@
1#ifndef KORGE_MAINWINDOW_H 1#ifndef KORGE_MAINWINDOW_H
2#define KORGE_MAINWINDOW_H 2#define KORGE_MAINWINDOW_H
3 3
4#include <qmainwindow.h> 4#include <qmainwindow.h>
5#include <qtimer.h> 5#include <qtimer.h>
6#include <qdict.h> 6#include <qdict.h>
7#include <qfile.h> 7#include <qfile.h>
8#include <qmenubar.h> 8#include <qmenubar.h>
9#include <qtextstream.h> 9#include <qtextstream.h>
10#include <qregexp.h> 10#include <qregexp.h>
11 11
12#include <libkcal/incidence.h> 12#include <libkcal/incidence.h>
13#include <ksyncmanager.h> 13#include <ksyncmanager.h>
14#ifndef DESKTOP_VERSION 14#ifndef DESKTOP_VERSION
15#include <qcopchannel_qws.h> 15#include <qcopchannel_qws.h>
16#endif 16#endif
17class QAction; 17class QAction;
18class CalendarView; 18class CalendarView;
19class KSyncProfile; 19class KSyncProfile;
20#ifdef DESKTOP_VERSION 20#ifdef DESKTOP_VERSION
21 21
22#define QPEToolBar QToolBar 22#define QPEToolBar QToolBar
23#define QPEMenuBar QMenuBar 23#define QPEMenuBar QMenuBar
24#endif 24#endif
25class QPEToolBar; 25class QPEToolBar;
26class QPEMenuBar; 26class QPEMenuBar;
27 27
28 28
29namespace KCal { 29namespace KCal {
30class CalendarLocal; 30class CalendarLocal;
31} 31}
32 32
33using namespace KCal; 33using namespace KCal;
34 34
35class MainWindow : public QMainWindow 35class MainWindow : public QMainWindow
36{ 36{
37 Q_OBJECT 37 Q_OBJECT
38 public: 38 public:
39 MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); 39 MainWindow( QWidget *parent = 0, const char *name = 0, QString command = "");
40 ~MainWindow(); 40 ~MainWindow();
41 bool beamReceiveEnabled(); 41 bool beamReceiveEnabled();
42 static QString defaultFileName(); 42 static QString defaultFileName();
43 static QString syncFileName(); 43 static QString syncFileName();
44 static QString resourcePath(); 44 static QString resourcePath();
45 public slots: 45 public slots:
46 void setUsesBigPixmaps ( bool ); 46 void setUsesBigPixmaps ( bool );
47 void setCaption ( const QString & ); 47 void setCaption ( const QString & );
48 void updateWeekNum(const KCal::DateList &); 48 void updateWeekNum(const KCal::DateList &);
49 void updateWeek(QDate); 49 void updateWeek(QDate);
50 void updateFilterToolbar(); 50 void updateFilterToolbar();
51 virtual void showMaximized (); 51 virtual void showMaximized ();
52 void configureAgenda( int ); 52 void configureAgenda( int );
53 void recieve( const QCString& msg, const QByteArray& data ); 53 void recieve( const QCString& msg, const QByteArray& data );
54 protected slots: 54 protected slots:
55 void startMultiSync();
55 void setCaptionToDates(); 56 void setCaptionToDates();
56 void weekAction(); 57 void weekAction();
57 void about(); 58 void about();
58 void licence(); 59 void licence();
59 void faq(); 60 void faq();
60 void usertrans(); 61 void usertrans();
61 void features(); 62 void features();
62 void synchowto(); 63 void synchowto();
63 void storagehowto(); 64 void storagehowto();
64 void timetrackinghowto(); 65 void timetrackinghowto();
65 void kdesynchowto(); 66 void kdesynchowto();
66 void multisynchowto(); 67 void multisynchowto();
67 void whatsNew(); 68 void whatsNew();
68 void keyBindings(); 69 void keyBindings();
69 void aboutAutoSaving();; 70 void aboutAutoSaving();;
70 void aboutKnownBugs(); 71 void aboutKnownBugs();
71 72
72 void processIncidenceSelection( Incidence * ); 73 void processIncidenceSelection( Incidence * );
73 74
74 void importQtopia(); 75 void importQtopia();
75 void importBday(); 76 void importBday();
76 void importOL(); 77 void importOL();
77 void importIcal(); 78 void importIcal();
78 void importFile( QString, bool ); 79 void importFile( QString, bool );
79 void quickImportIcal(); 80 void quickImportIcal();
80 81
81 void slotModifiedChanged( bool ); 82 void slotModifiedChanged( bool );
82 83
83 void save(); 84 void save();
84 void backupAllFiles(); 85 void backupAllFiles();
85 void saveStopTimer(); 86 void saveStopTimer();
86 void configureToolBar( int ); 87 void configureToolBar( int );
87 void printSel(); 88 void printSel();
88 void printCal(); 89 void printCal();
89 void printListView(); 90 void printListView();
90 void saveCalendar(); 91 void saveCalendar();
91 void loadCalendar(); 92 void loadCalendar();
92 void exportVCalendar(); 93 void exportVCalendar();
93 void fillFilterMenu(); 94 void fillFilterMenu();
94 void fillFilterMenuTB(); 95 void fillFilterMenuTB();
95 void selectFilter( int ); 96 void selectFilter( int );
96 void fillFilterMenuPopup(); 97 void fillFilterMenuPopup();
97 void selectFilterPopup( int ); 98 void selectFilterPopup( int );
98 void exportToPhone( int ); 99 void exportToPhone( int );
99 void toggleBeamReceive(); 100 void toggleBeamReceive();
100 void disableBR(bool); 101 void disableBR(bool);
101 signals: 102 signals:
102 void selectWeek ( int ); 103 void selectWeek ( int );
103 private slots: 104 private slots:
104 void showConfigureAgenda(); 105 void showConfigureAgenda();
105 void getFile( bool ); 106 void getFile( bool );
106 void syncFileRequest(); 107 void syncFileRequest();
107 108
108 protected: 109 protected:
109 void hideEvent ( QHideEvent * ); 110 void hideEvent ( QHideEvent * );
110 QString sentSyncFile(); 111 QString sentSyncFile();
111 void displayText( QString, QString); 112 void displayText( QString, QString);
112 void enableIncidenceActions( bool ); 113 void enableIncidenceActions( bool );
113 114
114 private: 115 private:
115 bool mBRdisabled; 116 bool mBRdisabled;
116#ifndef DESKTOP_VERSION 117#ifndef DESKTOP_VERSION
117 QCopChannel* infrared; 118 QCopChannel* infrared;
118#endif 119#endif
119 QAction* brAction; 120 QAction* brAction;
120 KSyncManager* mSyncManager; 121 KSyncManager* mSyncManager;
121 bool mClosed; 122 bool mClosed;
122 void saveOnClose(); 123 void saveOnClose();
123 bool mFlagKeyPressed; 124 bool mFlagKeyPressed;
124 bool mBlockAtStartup; 125 bool mBlockAtStartup;
125 QPEToolBar *iconToolBar; 126 QPEToolBar *iconToolBar;
126 QPEToolBar *viewToolBar; 127 QPEToolBar *viewToolBar;
127 QPEToolBar *navigatorToolBar; 128 QPEToolBar *navigatorToolBar;
128 QPEToolBar *filterToolBar; 129 QPEToolBar *filterToolBar;
129 QMenuBar *filterMenubar; 130 QMenuBar *filterMenubar;
130 QPopupMenu * filterPopupMenu; 131 QPopupMenu * filterPopupMenu;
131 void initActions(); 132 void initActions();
132 void setDefaultPreferences(); 133 void setDefaultPreferences();
133 void resizeEvent( QResizeEvent* e); 134 void resizeEvent( QResizeEvent* e);
134 void keyPressEvent ( QKeyEvent * ) ; 135 void keyPressEvent ( QKeyEvent * ) ;
135 void keyReleaseEvent ( QKeyEvent * ) ; 136 void keyReleaseEvent ( QKeyEvent * ) ;
136 QPopupMenu *configureToolBarMenu; 137 QPopupMenu *configureToolBarMenu;
137 QPopupMenu *selectFilterMenu; 138 QPopupMenu *selectFilterMenu;
138 QPopupMenu *selectFilterMenuTB; 139 QPopupMenu *selectFilterMenuTB;
139 QPopupMenu *configureAgendaMenu, *syncMenu; 140 QPopupMenu *configureAgendaMenu, *syncMenu;
140 CalendarLocal *mCalendar; 141 CalendarLocal *mCalendar;
141 CalendarView *mView; 142 CalendarView *mView;
142 QAction *mNewSubTodoAction; 143 QAction *mNewSubTodoAction;
143 QAction *mWeekAction; 144 QAction *mWeekAction;
144 QFont mWeekFont; 145 QFont mWeekFont;
145 QPixmap mWeekPixmap; 146 QPixmap mWeekPixmap;
146 QColor mWeekBgColor; 147 QColor mWeekBgColor;
147 148
148 QAction *mShowAction; 149 QAction *mShowAction;
149 QAction *mEditAction; 150 QAction *mEditAction;
150 QAction *mDeleteAction; 151 QAction *mDeleteAction;
151 QAction *mCloneAction; 152 QAction *mCloneAction;
152 QAction *mMoveAction; 153 QAction *mMoveAction;
153 QAction *mBeamAction; 154 QAction *mBeamAction;
154 QAction *mCancelAction; 155 QAction *mCancelAction;
155 156
156 QAction *mToggleNav; 157 QAction *mToggleNav;
157 QAction *mToggleFilter; 158 QAction *mToggleFilter;
158 QAction *mToggleAllday; 159 QAction *mToggleAllday;
159 QAction *actionFilterMenuTB; 160 QAction *actionFilterMenuTB;
160 161
161 void closeEvent( QCloseEvent* ce ); 162 void closeEvent( QCloseEvent* ce );
162 QTimer mSaveTimer; 163 QTimer mSaveTimer;
163 //bool mBlockSaveFlag; 164 //bool mBlockSaveFlag;
164 bool mCalendarModifiedFlag; 165 bool mCalendarModifiedFlag;
165 QPixmap loadPixmap( QString ); 166 QPixmap loadPixmap( QString );
166 QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80; 167 QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80;
167}; 168};
168 169
169 170
170#endif 171#endif
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index 0e9c5e5..2ce6926 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -1,1211 +1,1217 @@
1/* 1/*
2 This file is part of libkdepim. 2 This file is part of libkdepim.
3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24/* 24/*
25Enhanced Version of the file for platform independent KDE tools. 25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk 26Copyright (c) 2004 Ulf Schenk
27 27
28$Id$ 28$Id$
29*/ 29*/
30#include <stdlib.h> 30#include <stdlib.h>
31 31
32#include <qfile.h> 32#include <qfile.h>
33#include <qtimer.h>
33#include <qmap.h> 34#include <qmap.h>
34#include <qregexp.h> 35#include <qregexp.h>
35 36
36#ifndef DESKTOP_VERSION 37#ifndef DESKTOP_VERSION
37#include <qpe/qpeapplication.h> 38#include <qpe/qpeapplication.h>
38#include <qtopia/qcopenvelope_qws.h> 39#include <qtopia/qcopenvelope_qws.h>
39#else 40#else
40#include <qapplication.h> 41#include <qapplication.h>
41#endif 42#endif
42 43
43#include <kstaticdeleter.h> 44#include <kstaticdeleter.h>
44#include <kmessagebox.h> 45#include <kmessagebox.h>
45 46
46 47
47#include "externalapphandler.h" 48#include "externalapphandler.h"
48 49
49#include "kpimglobalprefs.h" 50#include "kpimglobalprefs.h"
50 51
51//uncomment line to get debug output 52//uncomment line to get debug output
52//#define DEBUG_EXT_APP_HANDLER 53//#define DEBUG_EXT_APP_HANDLER
53 54
54/********************************************************************************* 55/*********************************************************************************
55 * 56 *
56 ********************************************************************************/ 57 ********************************************************************************/
57 58
58 59
59QCopTransferItem::QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) 60QCopTransferItem::QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage)
60 : _usedSourceParameters(usedSourceParameters), _sourceMessage(sourceMessage), _targetChannel(targetChannel), _targetMessage(targetMessage) 61 : _usedSourceParameters(usedSourceParameters), _sourceMessage(sourceMessage), _targetChannel(targetChannel), _targetMessage(targetMessage)
61{ 62{
62 //sourceMessage passes later three parameters: sourceChannel, uid, param1 63 //sourceMessage passes later three parameters: sourceChannel, uid, param1
63 if (_usedSourceParameters == 0) 64 if (_usedSourceParameters == 0)
64 _sourceMessageParameters = "QString,QString)"; 65 _sourceMessageParameters = "QString,QString)";
65 else if (_usedSourceParameters == 1) 66 else if (_usedSourceParameters == 1)
66 _sourceMessageParameters = "(QString,QString,QString)"; 67 _sourceMessageParameters = "(QString,QString,QString)";
67 else if (_usedSourceParameters == 2) 68 else if (_usedSourceParameters == 2)
68 _sourceMessageParameters = "(QString,QString,QString,QString)"; 69 _sourceMessageParameters = "(QString,QString,QString,QString)";
69 else if (_usedSourceParameters == 3) 70 else if (_usedSourceParameters == 3)
70 _sourceMessageParameters = "(QString,QString,QString,QString,QString)"; 71 _sourceMessageParameters = "(QString,QString,QString,QString,QString)";
71} 72}
72 73
73/*********************************************************************************/ 74/*********************************************************************************/
74 75
75QCopTransferItem::QCopTransferItem() 76QCopTransferItem::QCopTransferItem()
76{ 77{
77} 78}
78 79
79/*********************************************************************************/ 80/*********************************************************************************/
80bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& param1, const QString& param2, const QString& param3) 81bool QCopTransferItem::sendMessageToTarget(const QString& uid, const QString& param1, const QString& param2, const QString& param3)
81{ 82{
82 83
83#ifndef DESKTOP_VERSION 84#ifndef DESKTOP_VERSION
84 //sourceMessage passes two parameters: sourceChannel, uid 85 //sourceMessage passes two parameters: sourceChannel, uid
85 QString sourceMessage = _sourceMessage + _sourceMessageParameters; 86 QString sourceMessage = _sourceMessage + _sourceMessageParameters;
86#ifdef DEBUG_EXT_APP_HANDLER 87#ifdef DEBUG_EXT_APP_HANDLER
87 qDebug("1Using QCopEnvelope e(\"%s\",\"%s\")", _targetChannel.latin1(), sourceMessage.latin1()); 88 qDebug("1Using QCopEnvelope e(\"%s\",\"%s\")", _targetChannel.latin1(), sourceMessage.latin1());
88 qDebug("passing sourcechannel(%s), uid(%s), param1(%s), param2(%s), param3(%s) as parameter to QCopEnvelope", _sourceChannel.latin1(), uid.latin1(), param1.latin1(), param2.latin1(), param3.latin1()); 89 qDebug("passing sourcechannel(%s), uid(%s), param1(%s), param2(%s), param3(%s) as parameter to QCopEnvelope", _sourceChannel.latin1(), uid.latin1(), param1.latin1(), param2.latin1(), param3.latin1());
89#endif 90#endif
90 91
91 QCopEnvelope e(_targetChannel.latin1(), sourceMessage.latin1()); 92 QCopEnvelope e(_targetChannel.latin1(), sourceMessage.latin1());
92 93
93 e << _sourceChannel << uid; 94 e << _sourceChannel << uid;
94 95
95 if (_usedSourceParameters == 1) 96 if (_usedSourceParameters == 1)
96 e << param1; 97 e << param1;
97 else if (_usedSourceParameters == 2) 98 else if (_usedSourceParameters == 2)
98 e << param1 << param2; 99 e << param1 << param2;
99 else if (_usedSourceParameters == 3) 100 else if (_usedSourceParameters == 3)
100 e << param1 << param2 << param3; 101 e << param1 << param2 << param3;
101 102
102 qApp->processEvents(); 103 qApp->processEvents();
103 104
104 return true; 105 return true;
105 106
106#else 107#else
107 KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); 108 KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) );
108 return false; 109 return false;
109#endif 110#endif
110 111
111} 112}
112 113
113 114
114/*********************************************************************************/ 115/*********************************************************************************/
115void QCopTransferItem::setSourceChannel(const QString& sourceChannel) 116void QCopTransferItem::setSourceChannel(const QString& sourceChannel)
116{ 117{
117 118
118 if ( !sourceChannel.isEmpty()) 119 if ( !sourceChannel.isEmpty())
119 _sourceChannel = sourceChannel; 120 _sourceChannel = sourceChannel;
120} 121}
121 122
122 123
123/*********************************************************************************/ 124/*********************************************************************************/
124bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) 125bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
125{ 126{
126 127
127 // copied from old mail2 128 // copied from old mail2
128/* 129/*
129 static int ii = 0; 130 static int ii = 0;
130 131
131 // block second call 132 // block second call
132 if ( ii < 2 ) { 133 if ( ii < 2 ) {
133 ++ii; 134 ++ii;
134 if ( ii > 1 ) { 135 if ( ii > 1 ) {
135 qDebug("qcop call blocked "); 136 qDebug("qcop call blocked ");
136 return true; 137 return true;
137 } 138 }
138 } 139 }
139*/ 140*/
140 141
141// qDebug("QCopTransferItem- QCOP message received: %s ", cmsg.data() ); 142// qDebug("QCopTransferItem- QCOP message received: %s ", cmsg.data() );
142 143
143 //we are in the target and get a request from the source 144 //we are in the target and get a request from the source
144 if ( (_sourceMessage + _sourceMessageParameters) == cmsg.data()) 145 if ( (_sourceMessage + _sourceMessageParameters) == cmsg.data())
145 { 146 {
146 147
147 QDataStream stream( data, IO_ReadOnly ); 148 QDataStream stream( data, IO_ReadOnly );
148 149
149 150
150 QString sourceChannel; 151 QString sourceChannel;
151 QString uid; 152 QString uid;
152 QString param1; 153 QString param1;
153 QString param2; 154 QString param2;
154 QString param3; 155 QString param3;
155 156
156 stream >> sourceChannel >> uid; 157 stream >> sourceChannel >> uid;
157 158
158 if (_usedSourceParameters == 0) 159 if (_usedSourceParameters == 0)
159 { 160 {
160 emit receivedMessageFromSource(sourceChannel, uid); 161 emit receivedMessageFromSource(sourceChannel, uid);
161 } 162 }
162 else if (_usedSourceParameters == 1) 163 else if (_usedSourceParameters == 1)
163 { 164 {
164 stream >> param1; 165 stream >> param1;
165 emit receivedMessageFromSource(sourceChannel, uid, param1); 166 emit receivedMessageFromSource(sourceChannel, uid, param1);
166 } 167 }
167 else if (_usedSourceParameters == 2) 168 else if (_usedSourceParameters == 2)
168 { 169 {
169 stream >> param1 >> param2; 170 stream >> param1 >> param2;
170 emit receivedMessageFromSource(sourceChannel, uid, param1, param2); 171 emit receivedMessageFromSource(sourceChannel, uid, param1, param2);
171 } 172 }
172 else if (_usedSourceParameters == 3) 173 else if (_usedSourceParameters == 3)
173 { 174 {
174 stream >> param1 >> param2 >> param3; 175 stream >> param1 >> param2 >> param3;
175 emit receivedMessageFromSource(sourceChannel, uid, param1, param2, param3); 176 emit receivedMessageFromSource(sourceChannel, uid, param1, param2, param3);
176 } 177 }
177 178
178 return true; 179 return true;
179 } 180 }
180 181
181 return false; 182 return false;
182} 183}
183 184
184 185
185/********************************************************************************* 186/*********************************************************************************
186 * 187 *
187 ********************************************************************************/ 188 ********************************************************************************/
188 189
189 190
190QCopMapTransferItem::QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) 191QCopMapTransferItem::QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage)
191 : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage) 192 : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage)
192{ 193{
193 //targetMessage returns later two parameters: uid, and map<qstring,qstring> 194 //targetMessage returns later two parameters: uid, and map<qstring,qstring>
194 _targetMessageParameters = "(QString,QMAP<QString,QString>)"; 195 _targetMessageParameters = "(QString,QMAP<QString,QString>)";
195} 196}
196 197
197/*********************************************************************************/ 198/*********************************************************************************/
198bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap) 199bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap)
199{ 200{
200#ifndef DESKTOP_VERSION 201#ifndef DESKTOP_VERSION
201 //targetMessage passes two parameters: uid, map 202 //targetMessage passes two parameters: uid, map
202 QString targetMessage = _targetMessage + _targetMessageParameters; 203 QString targetMessage = _targetMessage + _targetMessageParameters;
203 204
204#ifdef DEBUG_EXT_APP_HANDLER 205#ifdef DEBUG_EXT_APP_HANDLER
205 qDebug("2Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1()); 206 qDebug("2Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1());
206 qDebug("passing uid(%s) and map as parameter to QCopEnvelope", uid.latin1()); 207 qDebug("passing uid(%s) and map as parameter to QCopEnvelope", uid.latin1());
207#endif 208#endif
208 209
209 QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1()); 210 QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1());
210 //US we need no names in the To field. The emailadresses are enough 211 //US we need no names in the To field. The emailadresses are enough
211 212
212 e << uid << nameEmailMap; 213 e << uid << nameEmailMap;
213 214
214 qApp->processEvents(); 215 qApp->processEvents();
215 216
216 return true; 217 return true;
217 218
218#else 219#else
219 KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); 220 KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) );
220 return false; 221 return false;
221#endif 222#endif
222 223
223} 224}
224 225
225 226
226/*********************************************************************************/ 227/*********************************************************************************/
227bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) 228bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
228{ 229{
229 bool res = QCopTransferItem::appMessage( cmsg, data ); 230 bool res = QCopTransferItem::appMessage( cmsg, data );
230 231
231 if (res == false) 232 if (res == false)
232 { 233 {
233 QDataStream stream( data, IO_ReadOnly ); 234 QDataStream stream( data, IO_ReadOnly );
234 235
235// qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() ); 236// qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() );
236 237
237 //we are in the source and get an answer from the target 238 //we are in the source and get an answer from the target
238 if ((_targetMessage + _targetMessageParameters) == cmsg.data()) 239 if ((_targetMessage + _targetMessageParameters) == cmsg.data())
239 { 240 {
240 QMap<QString,QString> adrMap; 241 QMap<QString,QString> adrMap;
241 QString uid; 242 QString uid;
242 243
243 stream >> uid >> adrMap; 244 stream >> uid >> adrMap;
244 245
245 emit receivedMessageFromTarget(uid, adrMap); 246 emit receivedMessageFromTarget(uid, adrMap);
246 247
247 248
248 return true; 249 return true;
249 } 250 }
250 } 251 }
251 252
252 return false; 253 return false;
253} 254}
254 255
255 256
256/********************************************************************************* 257/*********************************************************************************
257 * 258 *
258 ********************************************************************************/ 259 ********************************************************************************/
259 260
260QCopListTransferItem::~QCopListTransferItem() 261QCopListTransferItem::~QCopListTransferItem()
261{ 262{
262 263
263} 264}
264 265
265QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage) 266QCopListTransferItem::QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage)
266 : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage) 267 : QCopTransferItem(usedSourceParameters, sourceMessage, targetChannel,targetMessage)
267{ 268{
268 //targetMessage returns later two parameters: uid, and three lists 269 //targetMessage returns later two parameters: uid, and three lists
269 _targetMessageParameters = "(QString,QStringList,QStringList,QStringList,QStringList,QStringList,QStringList)"; 270 _targetMessageParameters = "(QString,QStringList,QStringList,QStringList,QStringList,QStringList,QStringList)";
270} 271}
271 272
272/*********************************************************************************/ 273/*********************************************************************************/
273bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6) 274bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6)
274{ 275{
275#ifndef DESKTOP_VERSION 276#ifndef DESKTOP_VERSION
276 //targetMessage passes two parameters: uid, map 277 //targetMessage passes two parameters: uid, map
277 QString targetMessage = _targetMessage + _targetMessageParameters; 278 QString targetMessage = _targetMessage + _targetMessageParameters;
278 279
279#ifdef DEBUG_EXT_APP_HANDLER 280#ifdef DEBUG_EXT_APP_HANDLER
280 qDebug("3Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1()); 281 qDebug("3Using QCopEnvelope e(\"%s\",\"%s\")", _sourceChannel.latin1(), targetMessage.latin1());
281 qDebug("passing uid(%s) and list1, list2, list3, list4, list5, list6 as parameter to QCopEnvelope", uid.latin1()); 282 qDebug("passing uid(%s) and list1, list2, list3, list4, list5, list6 as parameter to QCopEnvelope", uid.latin1());
282 283
283 284
284 for ( int i = 0; i < list3.count(); i++) 285 for ( int i = 0; i < list3.count(); i++)
285 qDebug("listentry list3: %s",list3[i].latin1()); 286 qDebug("listentry list3: %s",list3[i].latin1());
286#endif 287#endif
287 288
288 QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1()); 289 QCopEnvelope e(_sourceChannel.latin1(), targetMessage.latin1());
289 //US we need no names in the To field. The emailadresses are enough 290 //US we need no names in the To field. The emailadresses are enough
290 291
291 e << uid << list1 << list2 << list3 << list4 << list5 << list6; 292 e << uid << list1 << list2 << list3 << list4 << list5 << list6;
292 293
293 qApp->processEvents(); 294 qApp->processEvents();
294 295
295 return true; 296 return true;
296 297
297#else 298#else
298 KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) ); 299 KMessageBox::sorry( 0, i18n( "This version does not support QCop." ) );
299 return false; 300 return false;
300#endif 301#endif
301 302
302} 303}
303 304
304 305
305/*********************************************************************************/ 306/*********************************************************************************/
306bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) 307bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data )
307{ 308{
308 bool res = QCopTransferItem::appMessage( cmsg, data ); 309 bool res = QCopTransferItem::appMessage( cmsg, data );
309#ifdef DEBUG_EXT_APP_HANDLER 310#ifdef DEBUG_EXT_APP_HANDLER
310 qDebug("1QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); 311 qDebug("1QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
311#endif 312#endif
312 313
313 if (res == false) 314 if (res == false)
314 { 315 {
315 QDataStream stream( data, IO_ReadOnly ); 316 QDataStream stream( data, IO_ReadOnly );
316 317
317#ifdef DEBUG_EXT_APP_HANDLER 318#ifdef DEBUG_EXT_APP_HANDLER
318 qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); 319 qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
319#endif 320#endif
320 321
321 //we are in the source and get an answer from the target 322 //we are in the source and get an answer from the target
322 if ((_targetMessage + _targetMessageParameters) == cmsg.data()) 323 if ((_targetMessage + _targetMessageParameters) == cmsg.data())
323 { 324 {
324 QStringList list1; 325 QStringList list1;
325 QStringList list2; 326 QStringList list2;
326 QStringList list3; 327 QStringList list3;
327 QStringList list4; 328 QStringList list4;
328 QStringList list5; 329 QStringList list5;
329 QStringList list6; 330 QStringList list6;
330 QString uid; 331 QString uid;
331 332
332#ifdef DEBUG_EXT_APP_HANDLER 333#ifdef DEBUG_EXT_APP_HANDLER
333 qDebug("3QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); 334 qDebug("3QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
334#endif 335#endif
335 336
336 stream >> uid >> list1 >> list2 >> list3 >> list4 >> list5 >> list6; 337 stream >> uid >> list1 >> list2 >> list3 >> list4 >> list5 >> list6;
337 emit receivedMessageFromTarget(uid, list1, list2, list3, list4, list5, list6); 338 emit receivedMessageFromTarget(uid, list1, list2, list3, list4, list5, list6);
338 339
339 340
340 return true; 341 return true;
341 } 342 }
342 } 343 }
343 344
344 return false; 345 return false;
345} 346}
346 347
347 348
348 349
349/********************************************************************************* 350/*********************************************************************************
350 * 351 *
351 ********************************************************************************/ 352 ********************************************************************************/
352 353
353 354
354ExternalAppHandler *ExternalAppHandler::sInstance = 0; 355ExternalAppHandler *ExternalAppHandler::sInstance = 0;
355static KStaticDeleter<ExternalAppHandler> staticDeleter; 356static KStaticDeleter<ExternalAppHandler> staticDeleter;
356 357
357ExternalAppHandler::ExternalAppHandler() 358ExternalAppHandler::ExternalAppHandler()
358{ 359{
359 mDefaultItems.setAutoDelete(true); 360 mDefaultItems.setAutoDelete(true);
360 361
361 mNameEmailUidListFromKAPITransfer = new QCopListTransferItem(0, "requestNameEmailUIDListFromKAPI", "QPE/Application/kapi", "receiveNameEmailUIDList"); 362 mNameEmailUidListFromKAPITransfer = new QCopListTransferItem(0, "requestNameEmailUIDListFromKAPI", "QPE/Application/kapi", "receiveNameEmailUIDList");
362 connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForNameEmailUidList(const QString&, const QString&))); 363 connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForNameEmailUidList(const QString&, const QString&)));
363 connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SLOT (receivedNameEmailUidList_Slot(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); 364 connect(mNameEmailUidListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SLOT (receivedNameEmailUidList_Slot(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
364 365
365//US mFindByEmailFromKAPITransfer = new QCopListTransferItem(1, "requestFindByEmailFromKAPI", "QPE/Application/kapi", "receiveFindByEmailNameEmailUIDList"); 366//US mFindByEmailFromKAPITransfer = new QCopListTransferItem(1, "requestFindByEmailFromKAPI", "QPE/Application/kapi", "receiveFindByEmailNameEmailUIDList");
366//US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&)), this, SIGNAL (requestForFindByEmail(const QString&, const QString&, const QString&))); 367//US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&)), this, SIGNAL (requestForFindByEmail(const QString&, const QString&, const QString&)));
367//US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedFindByEmailEvent(const QString&, const QStringList&, const QStringList&, const QStringList&))); 368//US connect(mFindByEmailFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedFindByEmailEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)));
368 369
369 mDisplayDetails = new QCopListTransferItem(3, "requestDisplayDetailsFromKAPI", "QPE/Application/kapi", ""); 370 mDisplayDetails = new QCopListTransferItem(3, "requestDisplayDetailsFromKAPI", "QPE/Application/kapi", "");
370 connect(mDisplayDetails, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&, const QString&, const QString&)), this, SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&))); 371 connect(mDisplayDetails, SIGNAL (receivedMessageFromSource(const QString&, const QString&, const QString&, const QString&, const QString&)), this, SIGNAL (requestForDetails(const QString&, const QString&, const QString&, const QString&, const QString&)));
371 372
372 373
373 374
374 mBirthdayListFromKAPITransfer = new QCopListTransferItem(0, "requestBirthdayListFromKAPI", "QPE/Application/kapi", "receiveBirthdayList"); 375 mBirthdayListFromKAPITransfer = new QCopListTransferItem(0, "requestBirthdayListFromKAPI", "QPE/Application/kapi", "receiveBirthdayList");
375 connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForBirthdayList(const QString&, const QString&))); 376 connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromSource(const QString&, const QString&)), this, SIGNAL (requestForBirthdayList(const QString&, const QString&)));
376 connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); 377 connect(mBirthdayListFromKAPITransfer, SIGNAL (receivedMessageFromTarget(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), this, SIGNAL (receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
377 378
378 379
379} 380}
380 381
381ExternalAppHandler::~ExternalAppHandler() 382ExternalAppHandler::~ExternalAppHandler()
382{ 383{
383 delete mNameEmailUidListFromKAPITransfer; 384 delete mNameEmailUidListFromKAPITransfer;
384 //delete mFindByEmailFromKAPITransfer; 385 //delete mFindByEmailFromKAPITransfer;
385 delete mDisplayDetails; 386 delete mDisplayDetails;
386 delete mBirthdayListFromKAPITransfer; 387 delete mBirthdayListFromKAPITransfer;
387} 388}
388 389
389void ExternalAppHandler::receivedNameEmailUidList_Slot(const QString& uid, 390void ExternalAppHandler::receivedNameEmailUidList_Slot(const QString& uid,
390 const QStringList& nameList, 391 const QStringList& nameList,
391 const QStringList& emailList, 392 const QStringList& emailList,
392 const QStringList& uidList, 393 const QStringList& uidList,
393 const QStringList&, 394 const QStringList&,
394 const QStringList&, 395 const QStringList&,
395 const QStringList& ) 396 const QStringList& )
396{ 397{
397 // this method is a conevnient way to reduce the number of parameters I have to pass 398 // this method is a conevnient way to reduce the number of parameters I have to pass
398 emit receivedNameEmailUidListEvent(uid, nameList, emailList, uidList); 399 emit receivedNameEmailUidListEvent(uid, nameList, emailList, uidList);
399} 400}
400 401
401 402
402void ExternalAppHandler::loadConfig() 403void ExternalAppHandler::loadConfig()
403{ 404{
404 405
405 mDefaultItems.clear(); 406 mDefaultItems.clear();
406 mEmailAppAvailable = UNDEFINED; 407 mEmailAppAvailable = UNDEFINED;
407 mPhoneAppAvailable = UNDEFINED; 408 mPhoneAppAvailable = UNDEFINED;
408 mFaxAppAvailable = UNDEFINED; 409 mFaxAppAvailable = UNDEFINED;
409 mSMSAppAvailable = UNDEFINED; 410 mSMSAppAvailable = UNDEFINED;
410 mPagerAppAvailable = UNDEFINED; 411 mPagerAppAvailable = UNDEFINED;
411 mSIPAppAvailable = UNDEFINED; 412 mSIPAppAvailable = UNDEFINED;
412 413
413 QString opiepath = QString::fromLatin1( getenv("OPIEDIR") ); 414 QString opiepath = QString::fromLatin1( getenv("OPIEDIR") );
414 QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") ); 415 QString qtopiapath = QString::fromLatin1( getenv("QPEDIR") );
415 QString qtpath = QString::fromLatin1( getenv("QTDIR") ); 416 QString qtpath = QString::fromLatin1( getenv("QTDIR") );
416 417
417 //if qtopiapath is not set, fallback to qt 418 //if qtopiapath is not set, fallback to qt
418 if (qtopiapath.isEmpty()) 419 if (qtopiapath.isEmpty())
419 qtopiapath = qtpath; 420 qtopiapath = qtpath;
420 421
421 //if opiepath is not set, fallback to qtopia 422 //if opiepath is not set, fallback to qtopia
422 if (opiepath.isEmpty()) 423 if (opiepath.isEmpty())
423 opiepath = qtopiapath; 424 opiepath = qtopiapath;
424 425
425 426
426 427
427 //mailclients 428 //mailclients
428 QString mailmsg1 = "writeMail(QString,QString)"; 429 QString mailmsg1 = "writeMail(QString,QString)";
429 QString mailmsg2 = "writeMail(QMap(QString,QString))"; 430 QString mailmsg2 = "writeMail(QMap(QString,QString))";
430 431
431 QString undefined = ""; 432 QString undefined = "";
432 433
433 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::NONE_EMC, "No email client installed", undefined, undefined, undefined, undefined, undefined); 434 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::NONE_EMC, "No email client installed", undefined, undefined, undefined, undefined, undefined);
434 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OTHER_EMC, "Userdefined email client", undefined, undefined, undefined, undefined, undefined); 435 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OTHER_EMC, "Userdefined email client", undefined, undefined, undefined, undefined, undefined);
435 436
436 if (( QFile::exists( qtopiapath + "/bin/ompi" )) || 437 if (( QFile::exists( qtopiapath + "/bin/ompi" )) ||
437 ( QFile::exists( opiepath + "/bin/ompi" )) || 438 ( QFile::exists( opiepath + "/bin/ompi" )) ||
438 ( QFile::exists( qtpath + "/bin/ompi" ))) 439 ( QFile::exists( qtpath + "/bin/ompi" )))
439 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OMPI_EMC, "OM/Pi email client", "QPE/Application/ompi", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); 440 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OMPI_EMC, "OM/Pi email client", "QPE/Application/ompi", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2");
440 441
441 if (( QFile::exists( qtopiapath + "/bin/qtmail" )) || 442 if (( QFile::exists( qtopiapath + "/bin/qtmail" )) ||
442 ( QFile::exists( qtpath + "/bin/qtmail" ))) 443 ( QFile::exists( qtpath + "/bin/qtmail" )))
443 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::QTOPIA_EMC, "Qtopia email client", "QPE/Application/qtmail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); 444 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::QTOPIA_EMC, "Qtopia email client", "QPE/Application/qtmail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2");
444 445
445 if ( QFile::exists( opiepath + "/bin/opiemail" )) 446 if ( QFile::exists( opiepath + "/bin/opiemail" ))
446 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_EMC, "Opie email client", "QPE/Application/opiemail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); 447 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_EMC, "Opie email client", "QPE/Application/opiemail", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2");
447 448
448 if ( QFile::exists( opiepath + "/bin/mailit" )) 449 if ( QFile::exists( opiepath + "/bin/mailit" ))
449 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_MAILIT_EMC, "Opie mailit email client", "QPE/Application/mailit", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2"); 450 addDefaultAppItem(ExternalAppHandler::EMAIL, KPimGlobalPrefs::OPIE_MAILIT_EMC, "Opie mailit email client", "QPE/Application/mailit", mailmsg1, "%1;%2", mailmsg2, "TO=%1;ATTACHMENT=%2");
450 451
451 452
452 453
453 //phoneclients 454 //phoneclients
454 455
455 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::NONE_PHC, "No phone client installed", undefined, undefined, undefined, undefined, undefined); 456 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::NONE_PHC, "No phone client installed", undefined, undefined, undefined, undefined, undefined);
456 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::OTHER_PHC, "Other phone client", undefined, undefined, undefined, undefined, undefined); 457 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::OTHER_PHC, "Other phone client", undefined, undefined, undefined, undefined, undefined);
457 if (( QFile::exists( qtopiapath + "/bin/kppi" )) || 458 if (( QFile::exists( qtopiapath + "/bin/kppi" )) ||
458 ( QFile::exists( opiepath + "/bin/kppi" ))) 459 ( QFile::exists( opiepath + "/bin/kppi" )))
459 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::KPPI_PHC, "KP/Pi phone client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined); 460 addDefaultAppItem(ExternalAppHandler::PHONE, KPimGlobalPrefs::KPPI_PHC, "KP/Pi phone client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined);
460 461
461 //faxclients 462 //faxclients
462 addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::NONE_FAC, "No fax client installed", undefined, undefined, undefined, undefined, undefined); 463 addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::NONE_FAC, "No fax client installed", undefined, undefined, undefined, undefined, undefined);
463 addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::OTHER_FAC, "Other fax client", undefined, undefined, undefined, undefined, undefined); 464 addDefaultAppItem(ExternalAppHandler::FAX, KPimGlobalPrefs::OTHER_FAC, "Other fax client", undefined, undefined, undefined, undefined, undefined);
464 465
465 //smsclients 466 //smsclients
466 addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::NONE_SMC, "No sms client installed", undefined, undefined, undefined, undefined, undefined); 467 addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::NONE_SMC, "No sms client installed", undefined, undefined, undefined, undefined, undefined);
467 addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::OTHER_SMC, "Other sms client", undefined, undefined, undefined, undefined, undefined); 468 addDefaultAppItem(ExternalAppHandler::SMS, KPimGlobalPrefs::OTHER_SMC, "Other sms client", undefined, undefined, undefined, undefined, undefined);
468 469
469 //pagerclients 470 //pagerclients
470 addDefaultAppItem(ExternalAppHandler::PAGER, KPimGlobalPrefs::NONE_PAC, "No pager client installed", undefined, undefined, undefined, undefined, undefined); 471 addDefaultAppItem(ExternalAppHandler::PAGER, KPimGlobalPrefs::NONE_PAC, "No pager client installed", undefined, undefined, undefined, undefined, undefined);
471 addDefaultAppItem(ExternalAppHandler::PAGER, KPimGlobalPrefs::OTHER_PAC, "Other pager client", undefined, undefined, undefined, undefined, undefined); 472 addDefaultAppItem(ExternalAppHandler::PAGER, KPimGlobalPrefs::OTHER_PAC, "Other pager client", undefined, undefined, undefined, undefined, undefined);
472 473
473 //sipclients 474 //sipclients
474 addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::NONE_SIC, "No SIP client installed", undefined, undefined, undefined, undefined, undefined); 475 addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::NONE_SIC, "No SIP client installed", undefined, undefined, undefined, undefined, undefined);
475 addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::OTHER_SIC, "Other SIP client", undefined, undefined, undefined, undefined, undefined); 476 addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::OTHER_SIC, "Other SIP client", undefined, undefined, undefined, undefined, undefined);
476 if (( QFile::exists( qtopiapath + "/bin/kppi" )) || 477 if (( QFile::exists( qtopiapath + "/bin/kppi" )) ||
477 ( QFile::exists( opiepath + "/bin/kppi" ))) 478 ( QFile::exists( opiepath + "/bin/kppi" )))
478 addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::KPPI_SIC, "KP/Pi SIP client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined); 479 addDefaultAppItem(ExternalAppHandler::SIP, KPimGlobalPrefs::KPPI_SIC, "KP/Pi SIP client", "QPE/Application/kppi", "-ring:%1", "", undefined, undefined);
479 480
480} 481}
481 482
482ExternalAppHandler *ExternalAppHandler::instance() 483ExternalAppHandler *ExternalAppHandler::instance()
483{ 484{
484 if ( !sInstance ) { 485 if ( !sInstance ) {
485 sInstance = staticDeleter.setObject( new ExternalAppHandler() ); 486 sInstance = staticDeleter.setObject( new ExternalAppHandler() );
486 sInstance->loadConfig(); 487 sInstance->loadConfig();
487 } 488 }
488 489
489 return sInstance; 490 return sInstance;
490} 491}
491 492
492void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameter, const QString& message2, const QString& parameter2) 493void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameter, const QString& message2, const QString& parameter2)
493{ 494{
494 DefaultAppItem* dai = new DefaultAppItem(type, id, label, channel, message, parameter, message2, parameter2); 495 DefaultAppItem* dai = new DefaultAppItem(type, id, label, channel, message, parameter, message2, parameter2);
495 // qDebug("%d %d %s %s ", type, id, label.latin1(), channel.latin1() ); 496 // qDebug("%d %d %s %s ", type, id, label.latin1(), channel.latin1() );
496 mDefaultItems.append(dai); 497 mDefaultItems.append(dai);
497} 498}
498 499
499 500
500QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type) 501QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type)
501{ 502{
502 QList<DefaultAppItem> list; 503 QList<DefaultAppItem> list;
503 504
504 DefaultAppItem* dai; 505 DefaultAppItem* dai;
505 506
506 for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() ) 507 for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() )
507 { 508 {
508 if (dai->_type == type) 509 if (dai->_type == type)
509 list.append(dai); 510 list.append(dai);
510 } 511 }
511 512
512 return list; 513 return list;
513} 514}
514 515
515DefaultAppItem* ExternalAppHandler::getDefaultItem(Types type, int clientid) 516DefaultAppItem* ExternalAppHandler::getDefaultItem(Types type, int clientid)
516{ 517{
517 DefaultAppItem* dai; 518 DefaultAppItem* dai;
518 519
519 for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() ) 520 for ( dai=mDefaultItems.first(); dai != 0; dai=mDefaultItems.next() )
520 { 521 {
521 if (dai->_type == type && dai->_id == clientid) 522 if (dai->_type == type && dai->_id == clientid)
522 return dai; 523 return dai;
523 } 524 }
524 525
525 return 0; 526 return 0;
526} 527}
527 528
528bool ExternalAppHandler::isEmailAppAvailable() 529bool ExternalAppHandler::isEmailAppAvailable()
529{ 530{
530#ifndef DESKTOP_VERSION 531#ifndef DESKTOP_VERSION
531 if (mEmailAppAvailable == UNDEFINED) 532 if (mEmailAppAvailable == UNDEFINED)
532 { 533 {
533 int client = KPimGlobalPrefs::instance()->mEmailClient; 534 int client = KPimGlobalPrefs::instance()->mEmailClient;
534 if (client == KPimGlobalPrefs::NONE_EMC) 535 if (client == KPimGlobalPrefs::NONE_EMC)
535 mEmailAppAvailable = UNAVAILABLE; 536 mEmailAppAvailable = UNAVAILABLE;
536 else 537 else
537 mEmailAppAvailable = AVAILABLE; 538 mEmailAppAvailable = AVAILABLE;
538 } 539 }
539 return (mEmailAppAvailable == AVAILABLE); 540 return (mEmailAppAvailable == AVAILABLE);
540 541
541#else //DESKTOP_VERSION 542#else //DESKTOP_VERSION
542 return false; 543 return false;
543#endif //DESKTOP_VERSION 544#endif //DESKTOP_VERSION
544} 545}
545 546
546bool ExternalAppHandler::isSMSAppAvailable() 547bool ExternalAppHandler::isSMSAppAvailable()
547{ 548{
548#ifndef DESKTOP_VERSION 549#ifndef DESKTOP_VERSION
549 if (mSMSAppAvailable == UNDEFINED) 550 if (mSMSAppAvailable == UNDEFINED)
550 { 551 {
551 int client = KPimGlobalPrefs::instance()->mSMSClient; 552 int client = KPimGlobalPrefs::instance()->mSMSClient;
552 if (client == KPimGlobalPrefs::NONE_SMC) 553 if (client == KPimGlobalPrefs::NONE_SMC)
553 mSMSAppAvailable = UNAVAILABLE; 554 mSMSAppAvailable = UNAVAILABLE;
554 else 555 else
555 mSMSAppAvailable = AVAILABLE; 556 mSMSAppAvailable = AVAILABLE;
556 } 557 }
557 558
558 return (mSMSAppAvailable == AVAILABLE); 559 return (mSMSAppAvailable == AVAILABLE);
559#else //DESKTOP_VERSION 560#else //DESKTOP_VERSION
560 return false; 561 return false;
561#endif //DESKTOP_VERSION 562#endif //DESKTOP_VERSION
562} 563}
563 564
564bool ExternalAppHandler::isPhoneAppAvailable() 565bool ExternalAppHandler::isPhoneAppAvailable()
565{ 566{
566#ifndef DESKTOP_VERSION 567#ifndef DESKTOP_VERSION
567 if (mPhoneAppAvailable == UNDEFINED) 568 if (mPhoneAppAvailable == UNDEFINED)
568 { 569 {
569 int client = KPimGlobalPrefs::instance()->mPhoneClient; 570 int client = KPimGlobalPrefs::instance()->mPhoneClient;
570 if (client == KPimGlobalPrefs::NONE_PHC) 571 if (client == KPimGlobalPrefs::NONE_PHC)
571 mPhoneAppAvailable = UNAVAILABLE; 572 mPhoneAppAvailable = UNAVAILABLE;
572 else 573 else
573 mPhoneAppAvailable = AVAILABLE; 574 mPhoneAppAvailable = AVAILABLE;
574 } 575 }
575 576
576 return (mPhoneAppAvailable == AVAILABLE); 577 return (mPhoneAppAvailable == AVAILABLE);
577#else //DESKTOP_VERSION 578#else //DESKTOP_VERSION
578 return false; 579 return false;
579#endif //DESKTOP_VERSION 580#endif //DESKTOP_VERSION
580} 581}
581 582
582bool ExternalAppHandler::isFaxAppAvailable() 583bool ExternalAppHandler::isFaxAppAvailable()
583{ 584{
584#ifndef DESKTOP_VERSION 585#ifndef DESKTOP_VERSION
585 if (mFaxAppAvailable == UNDEFINED) 586 if (mFaxAppAvailable == UNDEFINED)
586 { 587 {
587 int client = KPimGlobalPrefs::instance()->mFaxClient; 588 int client = KPimGlobalPrefs::instance()->mFaxClient;
588 if (client == KPimGlobalPrefs::NONE_FAC) 589 if (client == KPimGlobalPrefs::NONE_FAC)
589 mFaxAppAvailable = UNAVAILABLE; 590 mFaxAppAvailable = UNAVAILABLE;
590 else 591 else
591 mFaxAppAvailable = AVAILABLE; 592 mFaxAppAvailable = AVAILABLE;
592 } 593 }
593 594
594 return (mFaxAppAvailable == AVAILABLE); 595 return (mFaxAppAvailable == AVAILABLE);
595#else //DESKTOP_VERSION 596#else //DESKTOP_VERSION
596 return false; 597 return false;
597#endif //DESKTOP_VERSION 598#endif //DESKTOP_VERSION
598} 599}
599 600
600bool ExternalAppHandler::isPagerAppAvailable() 601bool ExternalAppHandler::isPagerAppAvailable()
601{ 602{
602#ifndef DESKTOP_VERSION 603#ifndef DESKTOP_VERSION
603 if (mPagerAppAvailable == UNDEFINED) 604 if (mPagerAppAvailable == UNDEFINED)
604 { 605 {
605 int client = KPimGlobalPrefs::instance()->mPagerClient; 606 int client = KPimGlobalPrefs::instance()->mPagerClient;
606 if (client == KPimGlobalPrefs::NONE_PAC) 607 if (client == KPimGlobalPrefs::NONE_PAC)
607 mPagerAppAvailable = UNAVAILABLE; 608 mPagerAppAvailable = UNAVAILABLE;
608 else 609 else
609 mPagerAppAvailable = AVAILABLE; 610 mPagerAppAvailable = AVAILABLE;
610 } 611 }
611 612
612 return (mPagerAppAvailable == AVAILABLE); 613 return (mPagerAppAvailable == AVAILABLE);
613#else //DESKTOP_VERSION 614#else //DESKTOP_VERSION
614 return false; 615 return false;
615#endif //DESKTOP_VERSION 616#endif //DESKTOP_VERSION
616} 617}
617 618
618 619
619bool ExternalAppHandler::isSIPAppAvailable() 620bool ExternalAppHandler::isSIPAppAvailable()
620{ 621{
621#ifndef DESKTOP_VERSION 622#ifndef DESKTOP_VERSION
622 if (mSIPAppAvailable == UNDEFINED) 623 if (mSIPAppAvailable == UNDEFINED)
623 { 624 {
624 int client = KPimGlobalPrefs::instance()->mSipClient; 625 int client = KPimGlobalPrefs::instance()->mSipClient;
625 if (client == KPimGlobalPrefs::NONE_SIC) 626 if (client == KPimGlobalPrefs::NONE_SIC)
626 mSIPAppAvailable = UNAVAILABLE; 627 mSIPAppAvailable = UNAVAILABLE;
627 else 628 else
628 mSIPAppAvailable = AVAILABLE; 629 mSIPAppAvailable = AVAILABLE;
629 } 630 }
630 631
631 return (mSIPAppAvailable == AVAILABLE); 632 return (mSIPAppAvailable == AVAILABLE);
632#else //DESKTOP_VERSION 633#else //DESKTOP_VERSION
633 return false; 634 return false;
634#endif //DESKTOP_VERSION 635#endif //DESKTOP_VERSION
635} 636}
636 637
637/************************************************************************** 638/**************************************************************************
638 * 639 *
639 **************************************************************************/ 640 **************************************************************************/
640 641
641 642
642//calls the emailapplication with a number of attachments that need to be send (Seperated by Comma) 643//calls the emailapplication with a number of attachments that need to be send (Seperated by Comma)
643bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QString& urls ) 644bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QString& urls )
644{ 645{
645 646
646#ifndef DESKTOP_VERSION 647#ifndef DESKTOP_VERSION
647 QString channel; 648 QString channel;
648 QString message2; 649 QString message2;
649 QString parameters2; 650 QString parameters2;
650 651
651 652
652 int client = KPimGlobalPrefs::instance()->mEmailClient; 653 int client = KPimGlobalPrefs::instance()->mEmailClient;
653 if (client == KPimGlobalPrefs::OTHER_EMC) 654 if (client == KPimGlobalPrefs::OTHER_EMC)
654 { 655 {
655 channel = KPimGlobalPrefs::instance()->mEmailOtherChannel; 656 channel = KPimGlobalPrefs::instance()->mEmailOtherChannel;
656 message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage; 657 message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage;
657 parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; 658 parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters;
658 } 659 }
659 else 660 else
660 { 661 {
661 DefaultAppItem* dai = getDefaultItem(EMAIL, client); 662 DefaultAppItem* dai = getDefaultItem(EMAIL, client);
662 if (!dai) 663 if (!dai)
663 { 664 {
664 qDebug("could not find configured email application."); 665 qDebug("could not find configured email application.");
665 return false; 666 return false;
666 } 667 }
667 channel = dai->_channel; 668 channel = dai->_channel;
668 message2 = dai->_message2; 669 message2 = dai->_message2;
669 parameters2 = dai->_parameters2; 670 parameters2 = dai->_parameters2;
670 } 671 }
671 672
672 //first check if one of the mailers need the emails right in the message. 673 //first check if one of the mailers need the emails right in the message.
673 message2 = translateMessage(message2, emails, urls); 674 message2 = translateMessage(message2, emails, urls);
674 675
675 676
676#ifdef DEBUG_EXT_APP_HANDLER 677#ifdef DEBUG_EXT_APP_HANDLER
677 qDebug("4Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1()); 678 qDebug("4Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1());
678 qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1()); 679 qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1());
679#endif 680#endif
680 681
681 682
682 QCopEnvelope e(channel.latin1(), message2.latin1()); 683 QCopEnvelope e(channel.latin1(), message2.latin1());
683 //US we need no names in the To field. The emailadresses are enough 684 //US we need no names in the To field. The emailadresses are enough
684 685
685 passParameters(&e, parameters2, emails, urls); 686 passParameters(&e, parameters2, emails, urls);
686 687
687 688
688 689
689#else 690#else
690 KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); 691 KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) );
691#endif 692#endif
692 693
693 return true; 694 return true;
694} 695}
695 696
696/************************************************************************** 697/**************************************************************************
697 * 698 *
698 **************************************************************************/ 699 **************************************************************************/
699 700
700 701
701//calls the emailapplication and creates a mail with parameter emails as recipients 702//calls the emailapplication and creates a mail with parameter emails as recipients
702bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& emailadress ) 703bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& emailadress )
703{ 704{
704#ifndef DESKTOP_VERSION 705#ifndef DESKTOP_VERSION
705 QString channel; 706 QString channel;
706 QString message; 707 QString message;
707 QString parameters; 708 QString parameters;
708 709
709 710
710 int client = KPimGlobalPrefs::instance()->mEmailClient; 711 int client = KPimGlobalPrefs::instance()->mEmailClient;
711 if (client == KPimGlobalPrefs::OTHER_EMC) 712 if (client == KPimGlobalPrefs::OTHER_EMC)
712 { 713 {
713 channel = KPimGlobalPrefs::instance()->mEmailOtherChannel; 714 channel = KPimGlobalPrefs::instance()->mEmailOtherChannel;
714 message = KPimGlobalPrefs::instance()->mEmailOtherMessage; 715 message = KPimGlobalPrefs::instance()->mEmailOtherMessage;
715 parameters = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; 716 parameters = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters;
716 } 717 }
717 else 718 else
718 { 719 {
719 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(EMAIL, client); 720 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(EMAIL, client);
720 if (!dai) 721 if (!dai)
721 { 722 {
722 qDebug("could not find configured email application."); 723 qDebug("could not find configured email application.");
723 return false; 724 return false;
724 } 725 }
725 channel = dai->_channel; 726 channel = dai->_channel;
726 message = dai->_message; 727 message = dai->_message;
727 parameters = dai->_parameters; 728 parameters = dai->_parameters;
728 } 729 }
729 730
730 731
731 //first check if one of the mailers need the emails right in the message. 732 //first check if one of the mailers need the emails right in the message.
732 message = translateMessage(message, name, emailadress); 733 message = translateMessage(message, name, emailadress);
733 734
734 735
735#ifdef DEBUG_EXT_APP_HANDLER 736#ifdef DEBUG_EXT_APP_HANDLER
736 qDebug("5Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 737 qDebug("5Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
737 qDebug("passing name(%s), emailadresses(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1()); 738 qDebug("passing name(%s), emailadresses(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1());
738#endif 739#endif
739 740
740 QCopEnvelope e(channel.latin1(), message.latin1()); 741 QCopEnvelope e(channel.latin1(), message.latin1());
741 //US we need no names in the To field. The emailadresses are enough 742 //US we need no names in the To field. The emailadresses are enough
742 743
743 passParameters(&e, parameters, name, emailadress); 744 passParameters(&e, parameters, name, emailadress);
744 745
745 746
746#else 747#else
747 KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) ); 748 KMessageBox::sorry( 0, i18n( "This version does not support the sending of emails." ) );
748#endif 749#endif
749 750
750 751
751 return true; 752 return true;
752} 753}
753 754
754/************************************************************************** 755/**************************************************************************
755 * 756 *
756 **************************************************************************/ 757 **************************************************************************/
757 758
758//calls the emailapplication and creates a mail with parameter as recipients 759//calls the emailapplication and creates a mail with parameter as recipients
759// parameters format is 760// parameters format is
760// NAME <EMAIL>:SUBJECT 761// NAME <EMAIL>:SUBJECT
761bool ExternalAppHandler::mailToOneContact( const QString& adressline ) 762bool ExternalAppHandler::mailToOneContact( const QString& adressline )
762{ 763{
763 QString line = adressline; 764 QString line = adressline;
764 765
765 int first = line.find( "<"); 766 int first = line.find( "<");
766 int last = line.find( ">"); 767 int last = line.find( ">");
767 QString name = line.left(first); 768 QString name = line.left(first);
768 QString emailadress = line.mid(first+1, last-first-1); 769 QString emailadress = line.mid(first+1, last-first-1);
769 770
770 //Subject can not be handled right now. 771 //Subject can not be handled right now.
771 return mailToOneContact( name, emailadress ); 772 return mailToOneContact( name, emailadress );
772 773
773} 774}
774 775
775 776
776/************************************************************************** 777/**************************************************************************
777 * 778 *
778 **************************************************************************/ 779 **************************************************************************/
779 780
780//calls the phoneapplication with the number 781//calls the phoneapplication with the number
781bool ExternalAppHandler::callByPhone( const QString& phonenumber ) 782bool ExternalAppHandler::callByPhone( const QString& phonenumber )
782{ 783{
783#ifndef DESKTOP_VERSION 784#ifndef DESKTOP_VERSION
784 QString channel; 785 QString channel;
785 QString message; 786 QString message;
786 QString parameters; 787 QString parameters;
787 788
788 789
789 int client = KPimGlobalPrefs::instance()->mPhoneClient; 790 int client = KPimGlobalPrefs::instance()->mPhoneClient;
790 if (client == KPimGlobalPrefs::OTHER_PHC) 791 if (client == KPimGlobalPrefs::OTHER_PHC)
791 { 792 {
792 channel = KPimGlobalPrefs::instance()->mPhoneOtherChannel; 793 channel = KPimGlobalPrefs::instance()->mPhoneOtherChannel;
793 message = KPimGlobalPrefs::instance()->mPhoneOtherMessage; 794 message = KPimGlobalPrefs::instance()->mPhoneOtherMessage;
794 parameters = KPimGlobalPrefs::instance()->mPhoneOtherMessageParameters; 795 parameters = KPimGlobalPrefs::instance()->mPhoneOtherMessageParameters;
795 } 796 }
796 else 797 else
797 { 798 {
798 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PHONE, client); 799 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PHONE, client);
799 if (!dai) 800 if (!dai)
800 { 801 {
801 qDebug("could not find configured phone application."); 802 qDebug("could not find configured phone application.");
802 return false; 803 return false;
803 } 804 }
804 channel = dai->_channel; 805 channel = dai->_channel;
805 message = dai->_message; 806 message = dai->_message;
806 parameters = dai->_parameters; 807 parameters = dai->_parameters;
807 } 808 }
808 809
809 810
810 //first check if one of the mailers need the emails right in the message. 811 //first check if one of the mailers need the emails right in the message.
811 message = translateMessage(message, phonenumber, ""); 812 message = translateMessage(message, phonenumber, "");
812 813
813 814
814#ifdef DEBUG_EXT_APP_HANDLER 815#ifdef DEBUG_EXT_APP_HANDLER
815 qDebug("6Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 816 qDebug("6Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
816 qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); 817 qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1());
817#endif 818#endif
818 819
819 QCopEnvelope e(channel.latin1(), message.latin1()); 820 QCopEnvelope e(channel.latin1(), message.latin1());
820 //US we need no names in the To field. The emailadresses are enough 821 //US we need no names in the To field. The emailadresses are enough
821 822
822 passParameters(&e, parameters, phonenumber, ""); 823 passParameters(&e, parameters, phonenumber, "");
823 824
824 825
825#else 826#else
826 KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) ); 827 KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) );
827#endif 828#endif
828 829
829 830
830 return true; 831 return true;
831} 832}
832 833
833/************************************************************************** 834/**************************************************************************
834 * 835 *
835 **************************************************************************/ 836 **************************************************************************/
836 837
837//calls the smsapplication with the number 838//calls the smsapplication with the number
838bool ExternalAppHandler::callBySMS( const QString& phonenumber ) 839bool ExternalAppHandler::callBySMS( const QString& phonenumber )
839{ 840{
840#ifndef DESKTOP_VERSION 841#ifndef DESKTOP_VERSION
841 QString channel; 842 QString channel;
842 QString message; 843 QString message;
843 QString parameters; 844 QString parameters;
844 845
845 846
846 int client = KPimGlobalPrefs::instance()->mSMSClient; 847 int client = KPimGlobalPrefs::instance()->mSMSClient;
847 if (client == KPimGlobalPrefs::OTHER_SMC) 848 if (client == KPimGlobalPrefs::OTHER_SMC)
848 { 849 {
849 channel = KPimGlobalPrefs::instance()->mSMSOtherChannel; 850 channel = KPimGlobalPrefs::instance()->mSMSOtherChannel;
850 message = KPimGlobalPrefs::instance()->mSMSOtherMessage; 851 message = KPimGlobalPrefs::instance()->mSMSOtherMessage;
851 parameters = KPimGlobalPrefs::instance()->mSMSOtherMessageParameters; 852 parameters = KPimGlobalPrefs::instance()->mSMSOtherMessageParameters;
852 } 853 }
853 else 854 else
854 { 855 {
855 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SMS, client); 856 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SMS, client);
856 if (!dai) 857 if (!dai)
857 { 858 {
858 qDebug("could not find configured sms application."); 859 qDebug("could not find configured sms application.");
859 return false; 860 return false;
860 } 861 }
861 channel = dai->_channel; 862 channel = dai->_channel;
862 message = dai->_message; 863 message = dai->_message;
863 parameters = dai->_parameters; 864 parameters = dai->_parameters;
864 } 865 }
865 866
866 867
867 //first check if one of the mailers need the emails right in the message. 868 //first check if one of the mailers need the emails right in the message.
868 message = translateMessage(message, phonenumber, ""); 869 message = translateMessage(message, phonenumber, "");
869 870
870 871
871#ifdef DEBUG_EXT_APP_HANDLER 872#ifdef DEBUG_EXT_APP_HANDLER
872 qDebug("7Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 873 qDebug("7Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
873 qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); 874 qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1());
874#endif 875#endif
875 876
876 QCopEnvelope e(channel.latin1(), message.latin1()); 877 QCopEnvelope e(channel.latin1(), message.latin1());
877 //US we need no names in the To field. The emailadresses are enough 878 //US we need no names in the To field. The emailadresses are enough
878 879
879 passParameters(&e, parameters, phonenumber, ""); 880 passParameters(&e, parameters, phonenumber, "");
880 881
881 882
882#else 883#else
883 KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) ); 884 KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) );
884#endif 885#endif
885 886
886 887
887 return true; 888 return true;
888} 889}
889 890
890/************************************************************************** 891/**************************************************************************
891 * 892 *
892 **************************************************************************/ 893 **************************************************************************/
893 894
894//calls the pagerapplication with the number 895//calls the pagerapplication with the number
895bool ExternalAppHandler::callByPager( const QString& pagernumber ) 896bool ExternalAppHandler::callByPager( const QString& pagernumber )
896{ 897{
897#ifndef DESKTOP_VERSION 898#ifndef DESKTOP_VERSION
898 QString channel; 899 QString channel;
899 QString message; 900 QString message;
900 QString parameters; 901 QString parameters;
901 902
902 903
903 int client = KPimGlobalPrefs::instance()->mPagerClient; 904 int client = KPimGlobalPrefs::instance()->mPagerClient;
904 if (client == KPimGlobalPrefs::OTHER_PAC) 905 if (client == KPimGlobalPrefs::OTHER_PAC)
905 { 906 {
906 channel = KPimGlobalPrefs::instance()->mPagerOtherChannel; 907 channel = KPimGlobalPrefs::instance()->mPagerOtherChannel;
907 message = KPimGlobalPrefs::instance()->mPagerOtherMessage; 908 message = KPimGlobalPrefs::instance()->mPagerOtherMessage;
908 parameters = KPimGlobalPrefs::instance()->mPagerOtherMessageParameters; 909 parameters = KPimGlobalPrefs::instance()->mPagerOtherMessageParameters;
909 } 910 }
910 else 911 else
911 { 912 {
912 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PAGER, client); 913 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PAGER, client);
913 if (!dai) 914 if (!dai)
914 { 915 {
915 qDebug("could not find configured pager application."); 916 qDebug("could not find configured pager application.");
916 return false; 917 return false;
917 } 918 }
918 channel = dai->_channel; 919 channel = dai->_channel;
919 message = dai->_message; 920 message = dai->_message;
920 parameters = dai->_parameters; 921 parameters = dai->_parameters;
921 } 922 }
922 923
923 924
924 //first check if one of the mailers need the emails right in the message. 925 //first check if one of the mailers need the emails right in the message.
925 message = translateMessage(message, pagernumber, ""); 926 message = translateMessage(message, pagernumber, "");
926 927
927 928
928#ifdef DEBUG_EXT_APP_HANDLER 929#ifdef DEBUG_EXT_APP_HANDLER
929 qDebug("8Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 930 qDebug("8Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
930 qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1()); 931 qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1());
931#endif 932#endif
932 933
933 QCopEnvelope e(channel.latin1(), message.latin1()); 934 QCopEnvelope e(channel.latin1(), message.latin1());
934 //US we need no names in the To field. The emailadresses are enough 935 //US we need no names in the To field. The emailadresses are enough
935 936
936 passParameters(&e, parameters, pagernumber, ""); 937 passParameters(&e, parameters, pagernumber, "");
937 938
938 939
939#else 940#else
940 KMessageBox::sorry( 0, i18n( "This version does not support paging." ) ); 941 KMessageBox::sorry( 0, i18n( "This version does not support paging." ) );
941#endif 942#endif
942 943
943 944
944 return true; 945 return true;
945} 946}
946 947
947/************************************************************************** 948/**************************************************************************
948 * 949 *
949 **************************************************************************/ 950 **************************************************************************/
950 951
951//calls the faxapplication with the number 952//calls the faxapplication with the number
952bool ExternalAppHandler::callByFax( const QString& faxnumber ) 953bool ExternalAppHandler::callByFax( const QString& faxnumber )
953{ 954{
954#ifndef DESKTOP_VERSION 955#ifndef DESKTOP_VERSION
955 QString channel; 956 QString channel;
956 QString message; 957 QString message;
957 QString parameters; 958 QString parameters;
958 959
959 960
960 int client = KPimGlobalPrefs::instance()->mFaxClient; 961 int client = KPimGlobalPrefs::instance()->mFaxClient;
961 if (client == KPimGlobalPrefs::OTHER_FAC) 962 if (client == KPimGlobalPrefs::OTHER_FAC)
962 { 963 {
963 channel = KPimGlobalPrefs::instance()->mFaxOtherChannel; 964 channel = KPimGlobalPrefs::instance()->mFaxOtherChannel;
964 message = KPimGlobalPrefs::instance()->mFaxOtherMessage; 965 message = KPimGlobalPrefs::instance()->mFaxOtherMessage;
965 parameters = KPimGlobalPrefs::instance()->mFaxOtherMessageParameters; 966 parameters = KPimGlobalPrefs::instance()->mFaxOtherMessageParameters;
966 } 967 }
967 else 968 else
968 { 969 {
969 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(FAX, client); 970 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(FAX, client);
970 if (!dai) 971 if (!dai)
971 { 972 {
972 qDebug("could not find configured fax application."); 973 qDebug("could not find configured fax application.");
973 return false; 974 return false;
974 } 975 }
975 channel = dai->_channel; 976 channel = dai->_channel;
976 message = dai->_message; 977 message = dai->_message;
977 parameters = dai->_parameters; 978 parameters = dai->_parameters;
978 } 979 }
979 980
980 981
981 //first check if one of the mailers need the emails right in the message. 982 //first check if one of the mailers need the emails right in the message.
982 message = translateMessage(message, faxnumber, ""); 983 message = translateMessage(message, faxnumber, "");
983 984
984 985
985#ifdef DEBUG_EXT_APP_HANDLER 986#ifdef DEBUG_EXT_APP_HANDLER
986 qDebug("9Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 987 qDebug("9Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
987 qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1()); 988 qDebug("passing faxnumber(%s) as parameter in the form %s to QCopEnvelope", faxnumber.latin1(), parameters.latin1());
988#endif 989#endif
989 990
990 QCopEnvelope e(channel.latin1(), message.latin1()); 991 QCopEnvelope e(channel.latin1(), message.latin1());
991 //US we need no names in the To field. The emailadresses are enough 992 //US we need no names in the To field. The emailadresses are enough
992 993
993 passParameters(&e, parameters, faxnumber, ""); 994 passParameters(&e, parameters, faxnumber, "");
994 995
995 996
996#else 997#else
997 KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) ); 998 KMessageBox::sorry( 0, i18n( "This version does not support the sending of faxes." ) );
998#endif 999#endif
999 1000
1000 1001
1001 return true; 1002 return true;
1002} 1003}
1003 1004
1004/************************************************************************** 1005/**************************************************************************
1005 * 1006 *
1006 **************************************************************************/ 1007 **************************************************************************/
1007 1008
1008//calls the sipapplication with the number 1009//calls the sipapplication with the number
1009bool ExternalAppHandler::callBySIP( const QString& sipnumber ) 1010bool ExternalAppHandler::callBySIP( const QString& sipnumber )
1010{ 1011{
1011#ifndef DESKTOP_VERSION 1012#ifndef DESKTOP_VERSION
1012 QString channel; 1013 QString channel;
1013 QString message; 1014 QString message;
1014 QString parameters; 1015 QString parameters;
1015 1016
1016 1017
1017 int client = KPimGlobalPrefs::instance()->mSipClient; 1018 int client = KPimGlobalPrefs::instance()->mSipClient;
1018 if (client == KPimGlobalPrefs::OTHER_SIC) 1019 if (client == KPimGlobalPrefs::OTHER_SIC)
1019 { 1020 {
1020 channel = KPimGlobalPrefs::instance()->mSipOtherChannel; 1021 channel = KPimGlobalPrefs::instance()->mSipOtherChannel;
1021 message = KPimGlobalPrefs::instance()->mSipOtherMessage; 1022 message = KPimGlobalPrefs::instance()->mSipOtherMessage;
1022 parameters = KPimGlobalPrefs::instance()->mSipOtherMessageParameters; 1023 parameters = KPimGlobalPrefs::instance()->mSipOtherMessageParameters;
1023 } 1024 }
1024 else 1025 else
1025 { 1026 {
1026 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SIP, client); 1027 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SIP, client);
1027 if (!dai) 1028 if (!dai)
1028 { 1029 {
1029 qDebug("could not find configured sip application."); 1030 qDebug("could not find configured sip application.");
1030 return false; 1031 return false;
1031 } 1032 }
1032 channel = dai->_channel; 1033 channel = dai->_channel;
1033 message = dai->_message; 1034 message = dai->_message;
1034 parameters = dai->_parameters; 1035 parameters = dai->_parameters;
1035 } 1036 }
1036 1037
1037 1038
1038 //first check if one of the sip apps need the emails right in the message. 1039 //first check if one of the sip apps need the emails right in the message.
1039 message = translateMessage(message, sipnumber, ""); 1040 message = translateMessage(message, sipnumber, "");
1040 1041
1041 1042
1042#ifdef DEBUG_EXT_APP_HANDLER 1043#ifdef DEBUG_EXT_APP_HANDLER
1043 qDebug("10Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 1044 qDebug("10Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
1044 qDebug("passing sipnumber(%s) as parameter in the form %s to QCopEnvelope", sipnumber.latin1(), parameters.latin1()); 1045 qDebug("passing sipnumber(%s) as parameter in the form %s to QCopEnvelope", sipnumber.latin1(), parameters.latin1());
1045#endif 1046#endif
1046 1047
1047 QCopEnvelope e(channel.latin1(), message.latin1()); 1048 QCopEnvelope e(channel.latin1(), message.latin1());
1048 //US we need no names in the To field. The emailadresses are enough 1049 //US we need no names in the To field. The emailadresses are enough
1049 1050
1050 passParameters(&e, parameters, sipnumber, ""); 1051 passParameters(&e, parameters, sipnumber, "");
1051 1052
1052 1053
1053#else 1054#else
1054 KMessageBox::sorry( 0, i18n( "This version does not support sip." ) ); 1055 KMessageBox::sorry( 0, i18n( "This version does not support sip." ) );
1055#endif 1056#endif
1056 1057
1057 1058
1058 return true; 1059 return true;
1059} 1060}
1060 1061
1061 1062
1062/************************************************************************** 1063/**************************************************************************
1063 * 1064 *
1064 **************************************************************************/ 1065 **************************************************************************/
1065 1066
1066 1067
1067QString& ExternalAppHandler::translateMessage(QString& message, const QString& param1, const QString& param2 ) const 1068QString& ExternalAppHandler::translateMessage(QString& message, const QString& param1, const QString& param2 ) const
1068{ 1069{
1069 message = message.replace( QRegExp("%1"), param1 ); 1070 message = message.replace( QRegExp("%1"), param1 );
1070 return message.replace( QRegExp("%2"), param2 ); 1071 return message.replace( QRegExp("%2"), param2 );
1071} 1072}
1072 1073
1073/************************************************************************** 1074/**************************************************************************
1074 * 1075 *
1075 **************************************************************************/ 1076 **************************************************************************/
1076 1077
1077void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1 , const QString& param2) const 1078void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1 , const QString& param2) const
1078{ 1079{
1079#ifndef DESKTOP_VERSION 1080#ifndef DESKTOP_VERSION
1080 QMap<QString, QString> valmap; 1081 QMap<QString, QString> valmap;
1081 bool useValMap = false; 1082 bool useValMap = false;
1082 1083
1083 // first extract all parts of the parameters. 1084 // first extract all parts of the parameters.
1084 QStringList paramlist = QStringList::split(";", parameters); 1085 QStringList paramlist = QStringList::split(";", parameters);
1085 1086
1086 //Now check how many parts we have. 1087 //Now check how many parts we have.
1087 //=0 :no params to pass 1088 //=0 :no params to pass
1088 //>0 :parameters to pass 1089 //>0 :parameters to pass
1089 for ( QStringList::Iterator it = paramlist.begin(); it != paramlist.end(); ++it ) 1090 for ( QStringList::Iterator it = paramlist.begin(); it != paramlist.end(); ++it )
1090 { 1091 {
1091 QString param = (*it); 1092 QString param = (*it);
1092 QStringList keyvallist = QStringList::split("=", param); 1093 QStringList keyvallist = QStringList::split("=", param);
1093 1094
1094 //if we have keyvalue pairs, we assume that we pass a map to the envelope 1095 //if we have keyvalue pairs, we assume that we pass a map to the envelope
1095 QStringList::Iterator it2 = keyvallist.begin(); 1096 QStringList::Iterator it2 = keyvallist.begin();
1096 QString key = (*it2); 1097 QString key = (*it2);
1097 key = key.replace( QRegExp("%1"), param1 ); 1098 key = key.replace( QRegExp("%1"), param1 );
1098 key = key.replace( QRegExp("%2"), param2 ); 1099 key = key.replace( QRegExp("%2"), param2 );
1099 ++it2; 1100 ++it2;
1100 1101
1101 if(it2 != keyvallist.end()) 1102 if(it2 != keyvallist.end())
1102 { 1103 {
1103 QString value = (*it2); 1104 QString value = (*it2);
1104 value = value.replace( QRegExp("%1"), param1 ); 1105 value = value.replace( QRegExp("%1"), param1 );
1105 value = value.replace( QRegExp("%2"), param2 ); 1106 value = value.replace( QRegExp("%2"), param2 );
1106 1107
1107 valmap.insert(key, value); 1108 valmap.insert(key, value);
1108 useValMap = true; 1109 useValMap = true;
1109 } 1110 }
1110 else 1111 else
1111 { 1112 {
1112 // qDebug("pass parameter << %s", key.latin1()); 1113 // qDebug("pass parameter << %s", key.latin1());
1113 (*e) << key; 1114 (*e) << key;
1114 } 1115 }
1115 } 1116 }
1116 1117
1117 if (useValMap == true) 1118 if (useValMap == true)
1118 (*e) << valmap; 1119 (*e) << valmap;
1119 1120
1120#endif 1121#endif
1121 1122
1122} 1123}
1123 1124
1124 1125
1125 1126
1126/************************************************************************** 1127/**************************************************************************
1127 * 1128 *
1128 **************************************************************************/ 1129 **************************************************************************/
1129 1130
1130void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) 1131void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data )
1131{ 1132{
1132 1133 qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this);
1133 if ( cmsg == "nextView()" ) { 1134 if ( cmsg == "nextView()" ) {
1134 qDebug("nextView()"); 1135 qDebug("nextView()");
1135 emit nextView(); 1136 QTimer::singleShot( 0, this, SIGNAL ( nextView() ));
1136 return; 1137 return;
1137 } 1138 }
1138 if ( cmsg == "callContactdialog()" ) { 1139 if ( cmsg == "callContactdialog()" ) {
1139 qDebug("callContactdialog()"); 1140 qDebug("callContactdialog()");
1140 emit callContactdialog(); 1141 QTimer::singleShot( 0, this, SIGNAL ( callContactdialog() ));
1142 return;
1143 }
1144 if ( cmsg == "doRingSync" ) {
1145 qDebug("doRingSync");
1146 QTimer::singleShot( 0, this, SIGNAL ( doRingSync() ));
1141 return; 1147 return;
1142 } 1148 }
1143 1149
1144 bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); 1150 bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data );
1145 if (!res) 1151 if (!res)
1146 res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); 1152 res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data );
1147 1153
1148 if (!res) 1154 if (!res)
1149 res = mDisplayDetails->appMessage( cmsg, data ); 1155 res = mDisplayDetails->appMessage( cmsg, data );
1150 1156
1151// if (!res) 1157// if (!res)
1152// res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); 1158// res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data );
1153} 1159}
1154 1160
1155 1161
1156 1162
1157bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) 1163bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid)
1158{ 1164{
1159 mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); 1165 mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel);
1160 // maybe we are sending to KA/Pi fom a different worldd... 1166 // maybe we are sending to KA/Pi fom a different worldd...
1161 // it may be that the QAplication::desktop()->width() values in KA/Pi are not the same as in our application 1167 // it may be that the QAplication::desktop()->width() values in KA/Pi are not the same as in our application
1162 // for that reason we send the current QApplication::desktop()->width() to KA/Pi 1168 // for that reason we send the current QApplication::desktop()->width() to KA/Pi
1163 //qDebug("UID %s ", sessionuid.latin1()); 1169 //qDebug("UID %s ", sessionuid.latin1());
1164 //return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(QString::number ( QApplication::desktop()->width() )); 1170 //return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(QString::number ( QApplication::desktop()->width() ));
1165 return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid); 1171 return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid);
1166} 1172}
1167 1173
1168bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) 1174bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3)
1169{ 1175{
1170 QStringList list4, list5, list6; 1176 QStringList list4, list5, list6;
1171 1177
1172 mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); 1178 mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel);
1173 return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); 1179 return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6);
1174} 1180}
1175 1181
1176bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) 1182bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email)
1177{ 1183{
1178 mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); 1184 mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel);
1179 return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); 1185 return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email);
1180} 1186}
1181 1187
1182bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) 1188bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3)
1183{ 1189{
1184 QStringList list4, list5, list6; 1190 QStringList list4, list5, list6;
1185 1191
1186 mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); 1192 mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel);
1187 return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); 1193 return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6);
1188} 1194}
1189 1195
1190bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid) 1196bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid)
1191{ 1197{
1192 mDisplayDetails->setSourceChannel(""); 1198 mDisplayDetails->setSourceChannel("");
1193 return mDisplayDetails->sendMessageToTarget("", name, email, uid); 1199 return mDisplayDetails->sendMessageToTarget("", name, email, uid);
1194} 1200}
1195 1201
1196bool ExternalAppHandler::requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid) 1202bool ExternalAppHandler::requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid)
1197{ 1203{
1198 mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); 1204 mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel);
1199 return mBirthdayListFromKAPITransfer->sendMessageToTarget(sessionuid); 1205 return mBirthdayListFromKAPITransfer->sendMessageToTarget(sessionuid);
1200} 1206}
1201 1207
1202bool ExternalAppHandler::returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6) 1208bool ExternalAppHandler::returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6)
1203{ 1209{
1204 mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel); 1210 mBirthdayListFromKAPITransfer->setSourceChannel(sourceChannel);
1205 return mBirthdayListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); 1211 return mBirthdayListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6);
1206} 1212}
1207 1213
1208 1214
1209 1215
1210 1216
1211 1217
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index 097f306..b899ad7 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -1,293 +1,294 @@
1/* 1/*
2 This file is part of libkdepim. 2 This file is part of libkdepim.
3 Copyright (c) 2004 Ulf Schenk 3 Copyright (c) 2004 Ulf Schenk
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24/* 24/*
25Enhanced Version of the file for platform independent KDE tools. 25Enhanced Version of the file for platform independent KDE tools.
26Copyright (c) 2004 Ulf Schenk 26Copyright (c) 2004 Ulf Schenk
27 27
28$Id$ 28$Id$
29*/ 29*/
30 30
31#ifndef EXTERNALAPPHANDLER_H 31#ifndef EXTERNALAPPHANDLER_H
32#define EXTERNALAPPHANDLER_H 32#define EXTERNALAPPHANDLER_H
33 33
34#include <qobject.h> 34#include <qobject.h>
35#include <qlist.h> 35#include <qlist.h>
36#include <qmap.h> 36#include <qmap.h>
37 37
38class QCopEnvelope; 38class QCopEnvelope;
39 39
40 40
41class ExternalAppHandler; 41class ExternalAppHandler;
42class QCopTransferItem : public QObject 42class QCopTransferItem : public QObject
43{ 43{
44 Q_OBJECT 44 Q_OBJECT
45 public: 45 public:
46 QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); 46 QCopTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage);
47 QCopTransferItem(); 47 QCopTransferItem();
48 48
49 bool sendMessageToTarget(const QString& uid, const QString& param1 = QString::null, const QString& param2 = QString::null, const QString& param3 = QString::null); 49 bool sendMessageToTarget(const QString& uid, const QString& param1 = QString::null, const QString& param2 = QString::null, const QString& param3 = QString::null);
50 50
51 void setSourceChannel(const QString& sourceChannel); 51 void setSourceChannel(const QString& sourceChannel);
52 52
53 virtual bool appMessage( const QCString& msg, const QByteArray& data ); 53 virtual bool appMessage( const QCString& msg, const QByteArray& data );
54 54
55 55
56 signals: 56 signals:
57 void receivedMessageFromSource(const QString& sourceChannel, const QString& uid); 57 void receivedMessageFromSource(const QString& sourceChannel, const QString& uid);
58 void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1); 58 void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1);
59 void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2); 59 void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2);
60 void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2, const QString& param3); 60 void receivedMessageFromSource(const QString& sourceChannel, const QString& uid, const QString& param1, const QString& param2, const QString& param3);
61 61
62 public: 62 public:
63 int _usedSourceParameters; 63 int _usedSourceParameters;
64 QString _sourceChannel; 64 QString _sourceChannel;
65 QString _sourceMessage; 65 QString _sourceMessage;
66 QString _sourceMessageParameters; 66 QString _sourceMessageParameters;
67 QString _targetChannel; 67 QString _targetChannel;
68 QString _targetMessage; 68 QString _targetMessage;
69 QString _targetMessageParameters; 69 QString _targetMessageParameters;
70 70
71}; 71};
72 72
73/********************************************************************************* 73/*********************************************************************************
74 * 74 *
75 ********************************************************************************/ 75 ********************************************************************************/
76 76
77class QCopMapTransferItem : public QCopTransferItem 77class QCopMapTransferItem : public QCopTransferItem
78{ 78{
79 Q_OBJECT 79 Q_OBJECT
80 public: 80 public:
81 QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); 81 QCopMapTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage);
82 82
83 bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap); 83 bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap);
84 84
85 85
86 virtual bool appMessage( const QCString& msg, const QByteArray& data ); 86 virtual bool appMessage( const QCString& msg, const QByteArray& data );
87 87
88 88
89 signals: 89 signals:
90 void receivedMessageFromTarget(const QString& uid, const QMap<QString,QString>& nameEmailMap); 90 void receivedMessageFromTarget(const QString& uid, const QMap<QString,QString>& nameEmailMap);
91 91
92}; 92};
93 93
94/********************************************************************************* 94/*********************************************************************************
95 * 95 *
96 ********************************************************************************/ 96 ********************************************************************************/
97 97
98class QCopListTransferItem : public QCopTransferItem 98class QCopListTransferItem : public QCopTransferItem
99{ 99{
100 Q_OBJECT 100 Q_OBJECT
101 public: 101 public:
102 QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage); 102 QCopListTransferItem(int usedSourceParameters, const QString& sourceMessage, const QString& targetChannel, const QString& targetMessage);
103 ~QCopListTransferItem(); 103 ~QCopListTransferItem();
104 bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6); 104 bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6);
105 105
106 106
107 virtual bool appMessage( const QCString& msg, const QByteArray& data ); 107 virtual bool appMessage( const QCString& msg, const QByteArray& data );
108 108
109 109
110 signals: 110 signals:
111 void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4 , const QStringList& list5, const QStringList& list6); 111 void receivedMessageFromTarget(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4 , const QStringList& list5, const QStringList& list6);
112 112
113}; 113};
114 114
115/********************************************************************************* 115/*********************************************************************************
116 * 116 *
117 ********************************************************************************/ 117 ********************************************************************************/
118 118
119 119
120class DefaultAppItem 120class DefaultAppItem
121{ 121{
122 public: 122 public:
123 DefaultAppItem(int type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2) 123 DefaultAppItem(int type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2)
124 : _type(type), _id(id), _label(label), _channel(channel), _message(message), _parameters(parameters), _message2(message2), _parameters2(parameters2) 124 : _type(type), _id(id), _label(label), _channel(channel), _message(message), _parameters(parameters), _message2(message2), _parameters2(parameters2)
125 {} 125 {}
126 126
127 DefaultAppItem() 127 DefaultAppItem()
128 { } 128 { }
129 129
130 public: 130 public:
131 int _type; 131 int _type;
132 int _id; 132 int _id;
133 QString _label; 133 QString _label;
134 QString _channel; 134 QString _channel;
135 QString _message; 135 QString _message;
136 QString _parameters;// a list of parameters in stringrepresentation. Delimiter is ; 136 QString _parameters;// a list of parameters in stringrepresentation. Delimiter is ;
137 QString _message2; 137 QString _message2;
138 QString _parameters2; // a list of parameters in stringrepresentation. Delimiter is ; 138 QString _parameters2; // a list of parameters in stringrepresentation. Delimiter is ;
139 139
140}; 140};
141 141
142/********************************************************************************* 142/*********************************************************************************
143 * 143 *
144 ********************************************************************************/ 144 ********************************************************************************/
145 145
146class ExternalAppHandler : public QObject 146class ExternalAppHandler : public QObject
147{ 147{
148 Q_OBJECT 148 Q_OBJECT
149 public: 149 public:
150 virtual ~ExternalAppHandler(); 150 virtual ~ExternalAppHandler();
151 151
152 static ExternalAppHandler *instance(); 152 static ExternalAppHandler *instance();
153 153
154 enum Types { 154 enum Types {
155 EMAIL = 0, 155 EMAIL = 0,
156 PHONE = 1, 156 PHONE = 1,
157 SMS = 2, 157 SMS = 2,
158 FAX = 3, 158 FAX = 3,
159 PAGER = 4, 159 PAGER = 4,
160 SIP = 5 160 SIP = 5
161 }; 161 };
162 162
163 enum Availability { 163 enum Availability {
164 UNDEFINED = -1, 164 UNDEFINED = -1,
165 UNAVAILABLE = 0, 165 UNAVAILABLE = 0,
166 AVAILABLE = 1 166 AVAILABLE = 1
167 }; 167 };
168 168
169 //calls the emailapplication with a number of attachments that need to be send. 169 //calls the emailapplication with a number of attachments that need to be send.
170 //either parameter can be left empty. 170 //either parameter can be left empty.
171 bool mailToMultipleContacts( const QString& recipients, const QString& attachmenturls ); 171 bool mailToMultipleContacts( const QString& recipients, const QString& attachmenturls );
172 172
173 //calls the emailapplication and creates a mail with parameter emailadress as recipients 173 //calls the emailapplication and creates a mail with parameter emailadress as recipients
174 bool mailToOneContact( const QString& name, const QString& emailadress ); 174 bool mailToOneContact( const QString& name, const QString& emailadress );
175 175
176 //calls the emailapplication and creates a mail with parameter as recipients 176 //calls the emailapplication and creates a mail with parameter as recipients
177 // parameters format is 177 // parameters format is
178 // NAME <EMAIL>:SUBJECT 178 // NAME <EMAIL>:SUBJECT
179 bool mailToOneContact( const QString& adressline ); 179 bool mailToOneContact( const QString& adressline );
180 180
181 //calls the phoneapplication with the number 181 //calls the phoneapplication with the number
182 bool callByPhone( const QString& phonenumber ); 182 bool callByPhone( const QString& phonenumber );
183 183
184 //calls the smsapplication with the number 184 //calls the smsapplication with the number
185 bool callBySMS( const QString& phonenumber ); 185 bool callBySMS( const QString& phonenumber );
186 186
187 //calls the pagerapplication with the number 187 //calls the pagerapplication with the number
188 bool callByPager( const QString& pagernumber ); 188 bool callByPager( const QString& pagernumber );
189 189
190 //calls the faxapplication with the number 190 //calls the faxapplication with the number
191 bool callByFax( const QString& faxnumber ); 191 bool callByFax( const QString& faxnumber );
192 192
193 //calls the sipapplication with the number 193 //calls the sipapplication with the number
194 bool callBySIP( const QString& sipnumber ); 194 bool callBySIP( const QString& sipnumber );
195 195
196 bool isEmailAppAvailable(); 196 bool isEmailAppAvailable();
197 bool isSMSAppAvailable(); 197 bool isSMSAppAvailable();
198 bool isPhoneAppAvailable(); 198 bool isPhoneAppAvailable();
199 bool isFaxAppAvailable(); 199 bool isFaxAppAvailable();
200 bool isPagerAppAvailable(); 200 bool isPagerAppAvailable();
201 bool isSIPAppAvailable(); 201 bool isSIPAppAvailable();
202 202
203 203
204 //Call this method on the source when you want to select names from the addressbook by using QCop 204 //Call this method on the source when you want to select names from the addressbook by using QCop
205 bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid); 205 bool requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid);
206 //Call this method on the target when you want to return the name/email map to the source (client). 206 //Call this method on the target when you want to return the name/email map to the source (client).
207 bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); 207 bool returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid);
208 208
209 209
210 210
211 bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email); 211 bool requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email);
212 bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid); 212 bool returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& name, const QStringList& email, const QStringList& uid);
213 213
214 bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid); 214 bool requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid);
215 215
216 216
217 217
218 bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid); 218 bool requestBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid);
219 bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid, 219 bool returnBirthdayListFromKAPI(const QString& sourceChannel, const QString& sessionuid,
220 const QStringList& birthdayList, const QStringList& anniversaryList, 220 const QStringList& birthdayList, const QStringList& anniversaryList,
221 const QStringList& realNameList, const QStringList& emailList, 221 const QStringList& realNameList, const QStringList& emailList,
222 const QStringList& assembledNameList, const QStringList& uidList); 222 const QStringList& assembledNameList, const QStringList& uidList);
223 223
224 224
225 //loadConfig clears the cache and checks again if the applications are available or not 225 //loadConfig clears the cache and checks again if the applications are available or not
226 void loadConfig(); 226 void loadConfig();
227 227
228 QList<DefaultAppItem> getAvailableDefaultItems(Types); 228 QList<DefaultAppItem> getAvailableDefaultItems(Types);
229 DefaultAppItem* getDefaultItem(Types, int); 229 DefaultAppItem* getDefaultItem(Types, int);
230 230
231 public slots: 231 public slots:
232 void appMessage( const QCString& msg, const QByteArray& data ); 232 void appMessage( const QCString& msg, const QByteArray& data );
233 233
234 234
235 signals: 235 signals:
236 void callContactdialog(); 236 void callContactdialog();
237 void nextView(); 237 void nextView();
238 void doRingSync();
238 // Emmitted when the target app receives a request from the source app 239 // Emmitted when the target app receives a request from the source app
239 void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); 240 void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid);
240 241
241 // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi 242 // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi
242 // The first parameter is a uniqueid. It can be used to identify the event 243 // The first parameter is a uniqueid. It can be used to identify the event
243 void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); 244 void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList);
244 245
245 void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); 246 void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email);
246 void receivedFindByEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); 247 void receivedFindByEmailEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList);
247 248
248 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); 249 void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid);
249 250
250 251
251 // Emmitted when the target app receives a request from the source app 252 // Emmitted when the target app receives a request from the source app
252 void requestForBirthdayList(const QString& sourceChannel, const QString& uid); 253 void requestForBirthdayList(const QString& sourceChannel, const QString& uid);
253 254
254 // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi 255 // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi
255 // The first parameter is a uniqueid. It can be used to identify the event 256 // The first parameter is a uniqueid. It can be used to identify the event
256 void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList, 257 void receivedBirthdayListEvent(const QString& uid, const QStringList& birthdayList,
257 const QStringList& anniversaryList, const QStringList& realNameList, 258 const QStringList& anniversaryList, const QStringList& realNameList,
258 const QStringList& emailList, const QStringList& assembledNameList, 259 const QStringList& emailList, const QStringList& assembledNameList,
259 const QStringList& uidList); 260 const QStringList& uidList);
260 261
261 262
262 private: 263 private:
263 ExternalAppHandler(); 264 ExternalAppHandler();
264 QList<DefaultAppItem> mDefaultItems; 265 QList<DefaultAppItem> mDefaultItems;
265 266
266 Availability mEmailAppAvailable; 267 Availability mEmailAppAvailable;
267 Availability mPhoneAppAvailable; 268 Availability mPhoneAppAvailable;
268 Availability mFaxAppAvailable; 269 Availability mFaxAppAvailable;
269 Availability mSMSAppAvailable; 270 Availability mSMSAppAvailable;
270 Availability mPagerAppAvailable; 271 Availability mPagerAppAvailable;
271 Availability mSIPAppAvailable; 272 Availability mSIPAppAvailable;
272 273
273 QCopListTransferItem* mNameEmailUidListFromKAPITransfer; 274 QCopListTransferItem* mNameEmailUidListFromKAPITransfer;
274 QCopListTransferItem* mFindByEmailFromKAPITransfer; 275 QCopListTransferItem* mFindByEmailFromKAPITransfer;
275 QCopTransferItem* mDisplayDetails; 276 QCopTransferItem* mDisplayDetails;
276 QCopListTransferItem* mBirthdayListFromKAPITransfer; 277 QCopListTransferItem* mBirthdayListFromKAPITransfer;
277 278
278 279
279 void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2); 280 void addDefaultAppItem(Types type, int id, const QString& label, const QString& channel, const QString& message, const QString& parameters, const QString& message2, const QString& parameters2);
280 281
281 QString& translateMessage(QString& message, const QString& param1, const QString& param2) const; 282 QString& translateMessage(QString& message, const QString& param1, const QString& param2) const;
282 void passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1, const QString& param2) const; 283 void passParameters(QCopEnvelope* e, const QString& parameters, const QString& param1, const QString& param2) const;
283 284
284 285
285 static ExternalAppHandler *sInstance; 286 static ExternalAppHandler *sInstance;
286 287
287 private slots: 288 private slots:
288 void receivedNameEmailUidList_Slot(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList, const QStringList&, const QStringList&, const QStringList& ); 289 void receivedNameEmailUidList_Slot(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList, const QStringList&, const QStringList&, const QStringList& );
289 290
290}; 291};
291 292
292 293
293#endif 294#endif
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index db815d6..038e032 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -1,1652 +1,1654 @@
1/* 1/*
2 This file is part of KDE-Pim/Pi. 2 This file is part of KDE-Pim/Pi.
3 Copyright (c) 2004 Ulf Schenk 3 Copyright (c) 2004 Ulf Schenk
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21// $Id$ 21// $Id$
22 22
23#include "ksyncmanager.h" 23#include "ksyncmanager.h"
24 24
25#include <stdlib.h> 25#include <stdlib.h>
26 26
27#ifndef _WIN32_ 27#ifndef _WIN32_
28#include <unistd.h> 28#include <unistd.h>
29#endif 29#endif
30 30
31 31
32#include "ksyncprofile.h" 32#include "ksyncprofile.h"
33#include "ksyncprefsdialog.h" 33#include "ksyncprefsdialog.h"
34#include "kpimprefs.h" 34#include "kpimprefs.h"
35#include <kmessagebox.h> 35#include <kmessagebox.h>
36 36
37#include <qdir.h> 37#include <qdir.h>
38#include <qprogressbar.h> 38#include <qprogressbar.h>
39#include <qpopupmenu.h> 39#include <qpopupmenu.h>
40#include <qpushbutton.h> 40#include <qpushbutton.h>
41#include <qradiobutton.h> 41#include <qradiobutton.h>
42#include <qbuttongroup.h> 42#include <qbuttongroup.h>
43#include <qtimer.h> 43#include <qtimer.h>
44#include <qmessagebox.h> 44#include <qmessagebox.h>
45#include <qapplication.h> 45#include <qapplication.h>
46#include <qlineedit.h> 46#include <qlineedit.h>
47#include <qdialog.h> 47#include <qdialog.h>
48#include <qlayout.h> 48#include <qlayout.h>
49#include <qtextcodec.h> 49#include <qtextcodec.h>
50#include <qlabel.h> 50#include <qlabel.h>
51#include <qcheckbox.h> 51#include <qcheckbox.h>
52 52
53#include <klocale.h> 53#include <klocale.h>
54#include <kglobal.h> 54#include <kglobal.h>
55#include <kconfig.h> 55#include <kconfig.h>
56#include <kfiledialog.h> 56#include <kfiledialog.h>
57 57
58QDateTime KSyncManager::mRequestedSyncEvent; 58QDateTime KSyncManager::mRequestedSyncEvent;
59 59
60 60
61KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) 61KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu)
62 : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu) 62 : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu)
63{ 63{
64 mServerSocket = 0; 64 mServerSocket = 0;
65 bar = new QProgressBar ( 1, 0 ); 65 bar = new QProgressBar ( 1, 0 );
66 bar->setCaption (""); 66 bar->setCaption ("");
67 mWriteBackInPast = 2; 67 mWriteBackInPast = 2;
68 68
69 69
70} 70}
71 71
72KSyncManager::~KSyncManager() 72KSyncManager::~KSyncManager()
73{ 73{
74 delete bar; 74 delete bar;
75} 75}
76 76
77void KSyncManager::setDefaultFileName( QString s) 77void KSyncManager::setDefaultFileName( QString s)
78{ 78{
79 mDefFileName = s ; 79 mDefFileName = s ;
80 if ( mPrefs->mPassiveSyncAutoStart ) 80 if ( mPrefs->mPassiveSyncAutoStart )
81 enableQuick( false ); 81 enableQuick( false );
82} 82}
83 83
84void KSyncManager::fillSyncMenu() 84void KSyncManager::fillSyncMenu()
85{ 85{
86 if ( mSyncMenu->count() ) 86 if ( mSyncMenu->count() )
87 mSyncMenu->clear(); 87 mSyncMenu->clear();
88 88
89 mSyncMenu->insertItem( i18n("Configure..."), 0 ); 89 mSyncMenu->insertItem( i18n("Configure..."), 0 );
90 mSyncMenu->insertSeparator(); 90 mSyncMenu->insertSeparator();
91 QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu ); 91 QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu );
92 mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 ); 92 mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 );
93 clearMenu->insertItem( i18n("For all profiles"), 1 ); 93 clearMenu->insertItem( i18n("For all profiles"), 1 );
94 clearMenu->insertSeparator(); 94 clearMenu->insertSeparator();
95 connect ( clearMenu, SIGNAL( activated ( int ) ), this, SLOT (slotClearMenu( int ) ) ); 95 connect ( clearMenu, SIGNAL( activated ( int ) ), this, SLOT (slotClearMenu( int ) ) );
96 mSyncMenu->insertSeparator(); 96 mSyncMenu->insertSeparator();
97 if ( mServerSocket == 0 ) { 97 if ( mServerSocket == 0 ) {
98 mSyncMenu->insertItem( i18n("Enable Pi-Sync"), 2 ); 98 mSyncMenu->insertItem( i18n("Enable Pi-Sync"), 2 );
99 } else { 99 } else {
100 mSyncMenu->insertItem( i18n("Disable Pi-Sync"), 3 ); 100 mSyncMenu->insertItem( i18n("Disable Pi-Sync"), 3 );
101 } 101 }
102 mSyncMenu->insertSeparator(); 102 mSyncMenu->insertSeparator();
103 mSyncMenu->insertItem( i18n("Multiple sync"), 1 ); 103 mSyncMenu->insertItem( i18n("Multiple sync"), 1 );
104 mSyncMenu->insertSeparator(); 104 mSyncMenu->insertSeparator();
105 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 105 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
106 config.setGroup("General"); 106 config.setGroup("General");
107 QStringList prof = config.readListEntry("SyncProfileNames"); 107 QStringList prof = config.readListEntry("SyncProfileNames");
108 mLocalMachineName = config.readEntry("LocalMachineName","undefined"); 108 mLocalMachineName = config.readEntry("LocalMachineName","undefined");
109 if ( prof.count() < 2 ) { 109 if ( prof.count() < 2 ) {
110 prof.clear(); 110 prof.clear();
111 QString externalName; 111 QString externalName;
112#ifdef DESKTOP_VERSION 112#ifdef DESKTOP_VERSION
113#ifdef _WIN32_ 113#ifdef _WIN32_
114 externalName = "OutLook(not_implemented)"; 114 externalName = "OutLook(not_implemented)";
115#else 115#else
116 externalName = "KDE_Desktop"; 116 externalName = "KDE_Desktop";
117#endif 117#endif
118#else 118#else
119 externalName = "Sharp_DTM"; 119 externalName = "Sharp_DTM";
120#endif 120#endif
121 prof << externalName; 121 prof << externalName;
122 prof << i18n("Local_file"); 122 prof << i18n("Local_file");
123 prof << i18n("Last_file"); 123 prof << i18n("Last_file");
124 KSyncProfile* temp = new KSyncProfile (); 124 KSyncProfile* temp = new KSyncProfile ();
125 temp->setName( prof[0] ); 125 temp->setName( prof[0] );
126 temp->writeConfig(&config); 126 temp->writeConfig(&config);
127 temp->setName( prof[1] ); 127 temp->setName( prof[1] );
128 temp->writeConfig(&config); 128 temp->writeConfig(&config);
129 temp->setName( prof[2] ); 129 temp->setName( prof[2] );
130 temp->writeConfig(&config); 130 temp->writeConfig(&config);
131 config.setGroup("General"); 131 config.setGroup("General");
132 config.writeEntry("SyncProfileNames",prof); 132 config.writeEntry("SyncProfileNames",prof);
133 config.writeEntry("ExternSyncProfiles",externalName); 133 config.writeEntry("ExternSyncProfiles",externalName);
134 config.sync(); 134 config.sync();
135 delete temp; 135 delete temp;
136 } 136 }
137 mExternSyncProfiles = config.readListEntry("ExternSyncProfiles"); 137 mExternSyncProfiles = config.readListEntry("ExternSyncProfiles");
138 mSyncProfileNames = prof; 138 mSyncProfileNames = prof;
139 unsigned int i; 139 unsigned int i;
140 for ( i = 0; i < prof.count(); ++i ) { 140 for ( i = 0; i < prof.count(); ++i ) {
141 QString insertText = prof[i]; 141 QString insertText = prof[i];
142 if ( i == 0 ) { 142 if ( i == 0 ) {
143#ifdef DESKTOP_VERSION 143#ifdef DESKTOP_VERSION
144#ifdef _WIN32_ 144#ifdef _WIN32_
145 insertText = "OutLook(not_implemented)"; 145 insertText = "OutLook(not_implemented)";
146#else 146#else
147 insertText = "KDE_Desktop"; 147 insertText = "KDE_Desktop";
148#endif 148#endif
149#else 149#else
150 insertText = "Sharp_DTM"; 150 insertText = "Sharp_DTM";
151#endif 151#endif
152 } 152 }
153 mSyncMenu->insertItem( insertText, 1000+i ); 153 mSyncMenu->insertItem( insertText, 1000+i );
154 clearMenu->insertItem( insertText, 1000+i ); 154 clearMenu->insertItem( insertText, 1000+i );
155 if ( i == 2 ) 155 if ( i == 2 )
156 mSyncMenu->insertSeparator(); 156 mSyncMenu->insertSeparator();
157 } 157 }
158 QDir app_dir; 158 QDir app_dir;
159 //US do not display SharpDTM if app is pwmpi, or no sharpfiles available 159 //US do not display SharpDTM if app is pwmpi, or no sharpfiles available
160 if ( mTargetApp == PWMPI) { 160 if ( mTargetApp == PWMPI) {
161 mSyncMenu->removeItem( 1000 ); 161 mSyncMenu->removeItem( 1000 );
162 clearMenu->removeItem( 1000 ); 162 clearMenu->removeItem( 1000 );
163 } 163 }
164#ifndef DESKTOP_VERSION 164#ifndef DESKTOP_VERSION
165 else if (!app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { 165 else if (!app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) {
166 mSyncMenu->removeItem( 1000 ); 166 mSyncMenu->removeItem( 1000 );
167 clearMenu->removeItem( 1000 ); 167 clearMenu->removeItem( 1000 );
168 } 168 }
169#endif 169#endif
170 mSyncMenu->removeItem( 1002 ); 170 mSyncMenu->removeItem( 1002 );
171 clearMenu->removeItem( 1002 ); 171 clearMenu->removeItem( 1002 );
172} 172}
173void KSyncManager::slotClearMenu( int action ) 173void KSyncManager::slotClearMenu( int action )
174{ 174{
175 QString syncDevice; 175 QString syncDevice;
176 if ( action > 999 ) { 176 if ( action > 999 ) {
177 syncDevice = mSyncProfileNames[action - 1000] ; 177 syncDevice = mSyncProfileNames[action - 1000] ;
178 } 178 }
179 179
180 180
181 181
182 int result = 0; 182 int result = 0;
183 QString sd; 183 QString sd;
184 if ( syncDevice.isEmpty() ) 184 if ( syncDevice.isEmpty() )
185 sd = i18n("Do you want to\nclear all sync info\nof all profiles?"); 185 sd = i18n("Do you want to\nclear all sync info\nof all profiles?");
186 else 186 else
187 sd = i18n("Do you want to\nclear the sync\ninfo of profile\n%1?\n"). arg( syncDevice ); 187 sd = i18n("Do you want to\nclear the sync\ninfo of profile\n%1?\n"). arg( syncDevice );
188 188
189 result = QMessageBox::warning( mParent, i18n("Warning!"),sd,i18n("OK"), i18n("Cancel"), 0, 189 result = QMessageBox::warning( mParent, i18n("Warning!"),sd,i18n("OK"), i18n("Cancel"), 0,
190 0, 1 ); 190 0, 1 );
191 if ( result ) 191 if ( result )
192 return; 192 return;
193 mImplementation->removeSyncInfo( syncDevice ); 193 mImplementation->removeSyncInfo( syncDevice );
194} 194}
195void KSyncManager::slotSyncMenu( int action ) 195void KSyncManager::slotSyncMenu( int action )
196{ 196{
197 qDebug("KSM::syncaction %d ", action); 197 qDebug("KSM::syncaction %d ", action);
198 if ( action == 5000 ) 198 if ( action == 5000 )
199 return; 199 return;
200 mSyncWithDesktop = false; 200 mSyncWithDesktop = false;
201 if ( action == 0 ) { 201 if ( action == 0 ) {
202 202
203 // seems to be a Qt2 event handling bug 203 // seems to be a Qt2 event handling bug
204 // syncmenu.clear causes a segfault at first time 204 // syncmenu.clear causes a segfault at first time
205 // when we call it after the main event loop, it is ok 205 // when we call it after the main event loop, it is ok
206 // same behaviour when calling OM/Pi via QCOP for the first time 206 // same behaviour when calling OM/Pi via QCOP for the first time
207 QTimer::singleShot ( 1, this, SLOT ( confSync() ) ); 207 QTimer::singleShot ( 1, this, SLOT ( confSync() ) );
208 //confSync(); 208 //confSync();
209 209
210 return; 210 return;
211 } 211 }
212 if ( action == 1 ) { 212 if ( action == 1 ) {
213 multiSync( true ); 213 multiSync( true );
214 return; 214 return;
215 } 215 }
216 if ( action == 2 ) { 216 if ( action == 2 ) {
217 enableQuick(); 217 enableQuick();
218 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); 218 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
219 return; 219 return;
220 } 220 }
221 if ( action == 3 ) { 221 if ( action == 3 ) {
222 delete mServerSocket; 222 delete mServerSocket;
223 mServerSocket = 0; 223 mServerSocket = 0;
224 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); 224 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
225 return; 225 return;
226 } 226 }
227 227
228 if (blockSave()) 228 if (blockSave())
229 return; 229 return;
230 230
231 setBlockSave(true); 231 setBlockSave(true);
232 bool silent = false; 232 bool silent = false;
233 if ( action == 999 ) { 233 if ( action == 999 ) {
234 //special mode for silent syncing 234 //special mode for silent syncing
235 action = 1000; 235 action = 1000;
236 silent = true; 236 silent = true;
237 } 237 }
238 238
239 mCurrentSyncProfile = action - 1000 ; 239 mCurrentSyncProfile = action - 1000 ;
240 mCurrentSyncDevice = mSyncProfileNames[mCurrentSyncProfile] ; 240 mCurrentSyncDevice = mSyncProfileNames[mCurrentSyncProfile] ;
241 mCurrentSyncName = mLocalMachineName ; 241 mCurrentSyncName = mLocalMachineName ;
242 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 242 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
243 KSyncProfile* temp = new KSyncProfile (); 243 KSyncProfile* temp = new KSyncProfile ();
244 temp->setName(mSyncProfileNames[mCurrentSyncProfile]); 244 temp->setName(mSyncProfileNames[mCurrentSyncProfile]);
245 temp->readConfig(&config); 245 temp->readConfig(&config);
246 if (silent) { 246 if (silent) {
247 mAskForPreferences = false; 247 mAskForPreferences = false;
248 mShowSyncSummary = false; 248 mShowSyncSummary = false;
249 mWriteBackFile = true; 249 mWriteBackFile = true;
250 mSyncAlgoPrefs = 2;// take newest 250 mSyncAlgoPrefs = 2;// take newest
251 } 251 }
252 else { 252 else {
253 mAskForPreferences = temp->getAskForPreferences(); 253 mAskForPreferences = temp->getAskForPreferences();
254 mShowSyncSummary = temp->getShowSummaryAfterSync(); 254 mShowSyncSummary = temp->getShowSummaryAfterSync();
255 mWriteBackFile = temp->getWriteBackFile(); 255 mWriteBackFile = temp->getWriteBackFile();
256 mSyncAlgoPrefs = temp->getSyncPrefs(); 256 mSyncAlgoPrefs = temp->getSyncPrefs();
257 } 257 }
258 mWriteBackExistingOnly = temp->getWriteBackExisting(); 258 mWriteBackExistingOnly = temp->getWriteBackExisting();
259 mIsKapiFile = temp->getIsKapiFile(); 259 mIsKapiFile = temp->getIsKapiFile();
260 mWriteBackInFuture = 0; 260 mWriteBackInFuture = 0;
261 if ( temp->getWriteBackFuture() ) { 261 if ( temp->getWriteBackFuture() ) {
262 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 262 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
263 mWriteBackInPast = temp->getWriteBackPastWeeks( ); 263 mWriteBackInPast = temp->getWriteBackPastWeeks( );
264 } 264 }
265 mFilterInCal = temp->getFilterInCal(); 265 mFilterInCal = temp->getFilterInCal();
266 mFilterOutCal = temp->getFilterOutCal(); 266 mFilterOutCal = temp->getFilterOutCal();
267 mFilterInAB = temp->getFilterInAB(); 267 mFilterInAB = temp->getFilterInAB();
268 mFilterOutAB = temp->getFilterOutAB(); 268 mFilterOutAB = temp->getFilterOutAB();
269 269
270 if ( action == 1000 ) { 270 if ( action == 1000 ) {
271 mIsKapiFile = false; 271 mIsKapiFile = false;
272#ifdef DESKTOP_VERSION 272#ifdef DESKTOP_VERSION
273 syncKDE(); 273 syncKDE();
274#else 274#else
275 syncSharp(); 275 syncSharp();
276#endif 276#endif
277 277
278 } else if ( action == 1001 ) { 278 } else if ( action == 1001 ) {
279 syncLocalFile(); 279 syncLocalFile();
280 280
281 } else if ( action == 1002 ) { 281 } else if ( action == 1002 ) {
282 mWriteBackFile = false; 282 mWriteBackFile = false;
283 mAskForPreferences = false; 283 mAskForPreferences = false;
284 mShowSyncSummary = false; 284 mShowSyncSummary = false;
285 mSyncAlgoPrefs = 3; 285 mSyncAlgoPrefs = 3;
286 quickSyncLocalFile(); 286 quickSyncLocalFile();
287 287
288 } else if ( action >= 1003 ) { 288 } else if ( action >= 1003 ) {
289 if ( temp->getIsLocalFileSync() ) { 289 if ( temp->getIsLocalFileSync() ) {
290 switch(mTargetApp) 290 switch(mTargetApp)
291 { 291 {
292 case (KAPI): 292 case (KAPI):
293 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) ) 293 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) )
294 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB(); 294 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB();
295 break; 295 break;
296 case (KOPI): 296 case (KOPI):
297 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 297 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
298 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName(); 298 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName();
299 break; 299 break;
300 case (PWMPI): 300 case (PWMPI):
301 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) 301 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )
302 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM(); 302 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM();
303 break; 303 break;
304 default: 304 default:
305 qDebug("KSM::slotSyncMenu: invalid apptype selected"); 305 qDebug("KSM::slotSyncMenu: invalid apptype selected");
306 break; 306 break;
307 307
308 } 308 }
309 } else { 309 } else {
310 if ( temp->getIsPhoneSync() ) { 310 if ( temp->getIsPhoneSync() ) {
311 mPhoneDevice = temp->getPhoneDevice( ) ; 311 mPhoneDevice = temp->getPhoneDevice( ) ;
312 mPhoneConnection = temp->getPhoneConnection( ); 312 mPhoneConnection = temp->getPhoneConnection( );
313 mPhoneModel = temp->getPhoneModel( ); 313 mPhoneModel = temp->getPhoneModel( );
314 syncPhone(); 314 syncPhone();
315 } else if ( temp->getIsPiSync() ) { 315 } else if ( temp->getIsPiSync() ) {
316 if ( mTargetApp == KAPI ) { 316 if ( mTargetApp == KAPI ) {
317 mPassWordPiSync = temp->getRemotePwAB(); 317 mPassWordPiSync = temp->getRemotePwAB();
318 mActiveSyncPort = temp->getRemotePortAB(); 318 mActiveSyncPort = temp->getRemotePortAB();
319 mActiveSyncIP = temp->getRemoteIPAB(); 319 mActiveSyncIP = temp->getRemoteIPAB();
320 } else if ( mTargetApp == KOPI ) { 320 } else if ( mTargetApp == KOPI ) {
321 mPassWordPiSync = temp->getRemotePw(); 321 mPassWordPiSync = temp->getRemotePw();
322 mActiveSyncPort = temp->getRemotePort(); 322 mActiveSyncPort = temp->getRemotePort();
323 mActiveSyncIP = temp->getRemoteIP(); 323 mActiveSyncIP = temp->getRemoteIP();
324 } else { 324 } else {
325 mPassWordPiSync = temp->getRemotePwPWM(); 325 mPassWordPiSync = temp->getRemotePwPWM();
326 mActiveSyncPort = temp->getRemotePortPWM(); 326 mActiveSyncPort = temp->getRemotePortPWM();
327 mActiveSyncIP = temp->getRemoteIPPWM(); 327 mActiveSyncIP = temp->getRemoteIPPWM();
328 } 328 }
329 syncPi(); 329 syncPi();
330 while ( !mPisyncFinished ) { 330 while ( !mPisyncFinished ) {
331 //qDebug("waiting "); 331 //qDebug("waiting ");
332 qApp->processEvents(); 332 qApp->processEvents();
333 } 333 }
334 } else 334 } else
335 syncRemote( temp ); 335 syncRemote( temp );
336 336
337 } 337 }
338 } 338 }
339 delete temp; 339 delete temp;
340 setBlockSave(false); 340 setBlockSave(false);
341} 341}
342 342
343void KSyncManager::enableQuick( bool ask ) 343void KSyncManager::enableQuick( bool ask )
344{ 344{
345 bool autoStart; 345 bool autoStart;
346 bool changed = false; 346 bool changed = false;
347 if ( ask ) { 347 if ( ask ) {
348 QDialog dia ( 0, "input-dialog", true ); 348 QDialog dia ( 0, "input-dialog", true );
349 QLineEdit lab ( &dia ); 349 QLineEdit lab ( &dia );
350 QVBoxLayout lay( &dia ); 350 QVBoxLayout lay( &dia );
351 lab.setText( mPrefs->mPassiveSyncPort ); 351 lab.setText( mPrefs->mPassiveSyncPort );
352 lay.setMargin(7); 352 lay.setMargin(7);
353 lay.setSpacing(7); 353 lay.setSpacing(7);
354 int po = 9197+mTargetApp; 354 int po = 9197+mTargetApp;
355 QLabel label ( i18n("Port number (Default: %1)").arg(po), &dia ); 355 QLabel label ( i18n("Port number (Default: %1)").arg(po), &dia );
356 lay.addWidget( &label); 356 lay.addWidget( &label);
357 lay.addWidget( &lab); 357 lay.addWidget( &lab);
358 358
359 QLineEdit lepw ( &dia ); 359 QLineEdit lepw ( &dia );
360 lepw.setText( mPrefs->mPassiveSyncPw ); 360 lepw.setText( mPrefs->mPassiveSyncPw );
361 QLabel label2 ( i18n("Password to enable\naccess from remote:"), &dia ); 361 QLabel label2 ( i18n("Password to enable\naccess from remote:"), &dia );
362 lay.addWidget( &label2); 362 lay.addWidget( &label2);
363 lay.addWidget( &lepw); 363 lay.addWidget( &lepw);
364 QCheckBox autostart(i18n("Automatically start\nat application startup"), &dia ); 364 QCheckBox autostart(i18n("Automatically start\nat application startup"), &dia );
365 lay.addWidget( &autostart); 365 lay.addWidget( &autostart);
366 autostart.setChecked( mPrefs->mPassiveSyncAutoStart ); 366 autostart.setChecked( mPrefs->mPassiveSyncAutoStart );
367#ifdef DESKTOP_VERSION 367#ifdef DESKTOP_VERSION
368#ifdef _WIN32_ 368#ifdef _WIN32_
369 QCheckBox syncdesktop( i18n("Automatically sync with Outlook\nwhen receiving sync request"),&dia ); 369 QCheckBox syncdesktop( i18n("Automatically sync with Outlook\nwhen receiving sync request"),&dia );
370 syncdesktop.hide();// not implemented! 370 syncdesktop.hide();// not implemented!
371#else 371#else
372 QCheckBox syncdesktop( i18n("Automatically sync with KDE-Desktop\nwhen receiving sync request"),&dia ); 372 QCheckBox syncdesktop( i18n("Automatically sync with KDE-Desktop\nwhen receiving sync request"),&dia );
373#endif 373#endif
374 lay.addWidget( &syncdesktop); 374 lay.addWidget( &syncdesktop);
375#else 375#else
376 mPrefs->mPassiveSyncWithDesktop = false; 376 mPrefs->mPassiveSyncWithDesktop = false;
377 QCheckBox syncdesktop( i18n("Automatically sync\nwith KDE-Desktop"),&dia ); 377 QCheckBox syncdesktop( i18n("Automatically sync\nwith KDE-Desktop"),&dia );
378 syncdesktop.hide(); 378 syncdesktop.hide();
379#endif 379#endif
380 syncdesktop.setChecked( mPrefs->mPassiveSyncWithDesktop ); 380 syncdesktop.setChecked( mPrefs->mPassiveSyncWithDesktop );
381 381
382 QPushButton pb ( "OK", &dia); 382 QPushButton pb ( "OK", &dia);
383 lay.addWidget( &pb ); 383 lay.addWidget( &pb );
384 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); 384 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
385 dia.resize( 230,120 ); 385 dia.resize( 230,120 );
386 dia.setCaption( i18n("Enter port for Pi-Sync") ); 386 dia.setCaption( i18n("Enter port for Pi-Sync") );
387 dia.show(); 387 dia.show();
388#ifndef DESKTOP_VERSION 388#ifndef DESKTOP_VERSION
389 int dw = QApplication::desktop()->width(); 389 int dw = QApplication::desktop()->width();
390 int dh = QApplication::desktop()->height(); 390 int dh = QApplication::desktop()->height();
391 dia.move( (dw-dia.width())/2, (dh - dia.height() )/2 ); 391 dia.move( (dw-dia.width())/2, (dh - dia.height() )/2 );
392#endif 392#endif
393 if ( ! dia.exec() ) 393 if ( ! dia.exec() )
394 return; 394 return;
395 dia.hide(); 395 dia.hide();
396 qApp->processEvents(); 396 qApp->processEvents();
397 if ( mPrefs->mPassiveSyncPw != lepw.text() ) { 397 if ( mPrefs->mPassiveSyncPw != lepw.text() ) {
398 changed = true; 398 changed = true;
399 mPrefs->mPassiveSyncPw = lepw.text(); 399 mPrefs->mPassiveSyncPw = lepw.text();
400 } 400 }
401 if ( mPrefs->mPassiveSyncPort != lab.text() ) { 401 if ( mPrefs->mPassiveSyncPort != lab.text() ) {
402 mPrefs->mPassiveSyncPort = lab.text(); 402 mPrefs->mPassiveSyncPort = lab.text();
403 changed = true; 403 changed = true;
404 } 404 }
405 autoStart = autostart.isChecked(); 405 autoStart = autostart.isChecked();
406 if (mPrefs->mPassiveSyncWithDesktop != syncdesktop.isChecked() ) { 406 if (mPrefs->mPassiveSyncWithDesktop != syncdesktop.isChecked() ) {
407 changed = true; 407 changed = true;
408 mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked(); 408 mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked();
409 } 409 }
410 } 410 }
411 else 411 else
412 autoStart = mPrefs->mPassiveSyncAutoStart; 412 autoStart = mPrefs->mPassiveSyncAutoStart;
413 if ( autoStart != mPrefs->mPassiveSyncAutoStart ) 413 if ( autoStart != mPrefs->mPassiveSyncAutoStart )
414 changed = true; 414 changed = true;
415 bool ok; 415 bool ok;
416 mPrefs->mPassiveSyncAutoStart = false; 416 mPrefs->mPassiveSyncAutoStart = false;
417 Q_UINT16 port = mPrefs->mPassiveSyncPort.toUInt(&ok); 417 Q_UINT16 port = mPrefs->mPassiveSyncPort.toUInt(&ok);
418 if ( ! ok ) { 418 if ( ! ok ) {
419 KMessageBox::information( 0, i18n("No valid port")); 419 KMessageBox::information( 0, i18n("No valid port"));
420 return; 420 return;
421 } 421 }
422 //qDebug("port %d ", port); 422 //qDebug("port %d ", port);
423 mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 ); 423 mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 );
424 mServerSocket->setFileName( defaultFileName() );//bbb 424 mServerSocket->setFileName( defaultFileName() );//bbb
425 if ( !mServerSocket->ok() ) { 425 if ( !mServerSocket->ok() ) {
426 KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!")); 426 KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!"));
427 delete mServerSocket; 427 delete mServerSocket;
428 mServerSocket = 0; 428 mServerSocket = 0;
429 return; 429 return;
430 } 430 }
431 mPrefs->mPassiveSyncAutoStart = autoStart; 431 mPrefs->mPassiveSyncAutoStart = autoStart;
432 if ( changed ) { 432 if ( changed ) {
433 mPrefs->writeConfig(); 433 mPrefs->writeConfig();
434 } 434 }
435 connect( mServerSocket, SIGNAL ( request_file() ),this, SIGNAL ( request_file() ) ); 435 connect( mServerSocket, SIGNAL ( request_file() ),this, SIGNAL ( request_file() ) );
436 connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) ); 436 connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) );
437} 437}
438 438
439void KSyncManager::syncLocalFile() 439void KSyncManager::syncLocalFile()
440{ 440{
441 441
442 QString fn =mPrefs->mLastSyncedLocalFile; 442 QString fn =mPrefs->mLastSyncedLocalFile;
443 QString ext; 443 QString ext;
444 444
445 switch(mTargetApp) 445 switch(mTargetApp)
446 { 446 {
447 case (KAPI): 447 case (KAPI):
448 ext = "(*.vcf)"; 448 ext = "(*.vcf)";
449 break; 449 break;
450 case (KOPI): 450 case (KOPI):
451 ext = "(*.ics/*.vcs)"; 451 ext = "(*.ics/*.vcs)";
452 break; 452 break;
453 case (PWMPI): 453 case (PWMPI):
454 ext = "(*.pwm)"; 454 ext = "(*.pwm)";
455 break; 455 break;
456 default: 456 default:
457 qDebug("KSM::syncLocalFile: invalid apptype selected"); 457 qDebug("KSM::syncLocalFile: invalid apptype selected");
458 break; 458 break;
459 459
460 } 460 }
461 461
462 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename"+ext), mParent ); 462 fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename"+ext), mParent );
463 if ( fn == "" ) 463 if ( fn == "" )
464 return; 464 return;
465 if ( syncWithFile( fn, false ) ) { 465 if ( syncWithFile( fn, false ) ) {
466 qDebug("KSM::syncLocalFile() successful "); 466 qDebug("KSM::syncLocalFile() successful ");
467 } 467 }
468 468
469} 469}
470 470
471bool KSyncManager::syncWithFile( QString fn , bool quick ) 471bool KSyncManager::syncWithFile( QString fn , bool quick )
472{ 472{
473 bool ret = false; 473 bool ret = false;
474 QFileInfo info; 474 QFileInfo info;
475 info.setFile( fn ); 475 info.setFile( fn );
476 QString mess; 476 QString mess;
477 if ( !info. exists() ) { 477 if ( !info. exists() ) {
478 mess = i18n( "Sync file \n...%1\ndoes not exist!\nNothing synced!\n").arg(fn.right( 30) ); 478 mess = i18n( "Sync file \n...%1\ndoes not exist!\nNothing synced!\n").arg(fn.right( 30) );
479 QMessageBox::warning( mParent, i18n("Warning!"), 479 QMessageBox::warning( mParent, i18n("Warning!"),
480 mess ); 480 mess );
481 return ret; 481 return ret;
482 } 482 }
483 int result = 0; 483 int result = 0;
484 if ( !quick ) { 484 if ( !quick ) {
485 mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 485 mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
486 result = QMessageBox::warning( mParent, i18n("Warning!"), 486 result = QMessageBox::warning( mParent, i18n("Warning!"),
487 mess, 487 mess,
488 i18n("Sync"), i18n("Cancel"), 0, 488 i18n("Sync"), i18n("Cancel"), 0,
489 0, 1 ); 489 0, 1 );
490 if ( result ) 490 if ( result )
491 return false; 491 return false;
492 } 492 }
493 if ( mAskForPreferences ) 493 if ( mAskForPreferences )
494 if ( !edit_sync_options()) { 494 if ( !edit_sync_options()) {
495 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); 495 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") );
496 return false; 496 return false;
497 } 497 }
498 if ( result == 0 ) { 498 if ( result == 0 ) {
499 //qDebug("Now sycing ... "); 499 //qDebug("Now sycing ... ");
500 if ( ret = mImplementation->sync( this, fn, mSyncAlgoPrefs ) ) 500 if ( ret = mImplementation->sync( this, fn, mSyncAlgoPrefs ) )
501 mParent->topLevelWidget()->setCaption( i18n("Synchronization successful") ); 501 mParent->topLevelWidget()->setCaption( i18n("Synchronization successful") );
502 else 502 else
503 mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); 503 mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") );
504 if ( ! quick ) 504 if ( ! quick )
505 mPrefs->mLastSyncedLocalFile = fn; 505 mPrefs->mLastSyncedLocalFile = fn;
506 } 506 }
507 return ret; 507 return ret;
508} 508}
509 509
510void KSyncManager::quickSyncLocalFile() 510void KSyncManager::quickSyncLocalFile()
511{ 511{
512 512
513 if ( syncWithFile( mPrefs->mLastSyncedLocalFile, true ) ) { 513 if ( syncWithFile( mPrefs->mLastSyncedLocalFile, true ) ) {
514 qDebug("KSM::quick syncLocalFile() successful "); 514 qDebug("KSM::quick syncLocalFile() successful ");
515 515
516 } 516 }
517} 517}
518 518
519void KSyncManager::multiSync( bool askforPrefs ) 519void KSyncManager::multiSync( bool askforPrefs )
520{ 520{
521 if (blockSave()) 521 if (blockSave())
522 return; 522 return;
523 setBlockSave(true); 523 setBlockSave(true);
524 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); 524 if ( askforPrefs ) {
525 if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"), 525 QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
526 question, 526 if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"),
527 i18n("Yes"), i18n("No"), 527 question,
528 0, 0 ) != 0 ) { 528 i18n("Yes"), i18n("No"),
529 setBlockSave(false); 529 0, 0 ) != 0 ) {
530 mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!")); 530 setBlockSave(false);
531 return; 531 mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!"));
532 return;
533 }
532 } 534 }
533 mCurrentSyncDevice = i18n("Multiple profiles") ; 535 mCurrentSyncDevice = i18n("Multiple profiles") ;
534 mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs; 536 mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs;
535 if ( askforPrefs ) { 537 if ( askforPrefs ) {
536 if ( !edit_sync_options()) { 538 if ( !edit_sync_options()) {
537 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted.") ); 539 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted.") );
538 return; 540 return;
539 } 541 }
540 mPrefs->mRingSyncAlgoPrefs = mSyncAlgoPrefs; 542 mPrefs->mRingSyncAlgoPrefs = mSyncAlgoPrefs;
541 } 543 }
542 mParent->topLevelWidget()->setCaption(i18n("Multiple sync started.") ); 544 mParent->topLevelWidget()->setCaption(i18n("Multiple sync started.") );
543 qApp->processEvents(); 545 qApp->processEvents();
544 int num = ringSync() ; 546 int num = ringSync() ;
545 if ( num > 1 ) 547 if ( num > 1 )
546 ringSync(); 548 ringSync();
547 setBlockSave(false); 549 setBlockSave(false);
548 if ( num ) 550 if ( num )
549 emit save(); 551 emit save();
550 if ( num ) 552 if ( num )
551 mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) ); 553 mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) );
552 else 554 else
553 mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!")); 555 mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!"));
554 return; 556 return;
555} 557}
556 558
557int KSyncManager::ringSync() 559int KSyncManager::ringSync()
558{ 560{
559 561
560 int syncedProfiles = 0; 562 int syncedProfiles = 0;
561 unsigned int i; 563 unsigned int i;
562 QTime timer; 564 QTime timer;
563 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 565 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
564 QStringList syncProfileNames = mSyncProfileNames; 566 QStringList syncProfileNames = mSyncProfileNames;
565 KSyncProfile* temp = new KSyncProfile (); 567 KSyncProfile* temp = new KSyncProfile ();
566 mAskForPreferences = false; 568 mAskForPreferences = false;
567 for ( i = 0; i < syncProfileNames.count(); ++i ) { 569 for ( i = 0; i < syncProfileNames.count(); ++i ) {
568 mCurrentSyncProfile = i; 570 mCurrentSyncProfile = i;
569 temp->setName(syncProfileNames[mCurrentSyncProfile]); 571 temp->setName(syncProfileNames[mCurrentSyncProfile]);
570 temp->readConfig(&config); 572 temp->readConfig(&config);
571 573
572 bool includeInRingSync = false; 574 bool includeInRingSync = false;
573 switch(mTargetApp) 575 switch(mTargetApp)
574 { 576 {
575 case (KAPI): 577 case (KAPI):
576 includeInRingSync = temp->getIncludeInRingSyncAB(); 578 includeInRingSync = temp->getIncludeInRingSyncAB();
577 break; 579 break;
578 case (KOPI): 580 case (KOPI):
579 includeInRingSync = temp->getIncludeInRingSync(); 581 includeInRingSync = temp->getIncludeInRingSync();
580 break; 582 break;
581 case (PWMPI): 583 case (PWMPI):
582 includeInRingSync = temp->getIncludeInRingSyncPWM(); 584 includeInRingSync = temp->getIncludeInRingSyncPWM();
583 break; 585 break;
584 default: 586 default:
585 qDebug("KSM::ringSync: invalid apptype selected"); 587 qDebug("KSM::ringSync: invalid apptype selected");
586 break; 588 break;
587 589
588 } 590 }
589 591
590 592
591 if ( includeInRingSync && ( i < 1 || i > 2 )) { 593 if ( includeInRingSync && ( i < 1 || i > 2 )) {
592 mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); 594 mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
593 ++syncedProfiles; 595 ++syncedProfiles;
594 mSyncWithDesktop = false; 596 mSyncWithDesktop = false;
595 // mAskForPreferences = temp->getAskForPreferences(); 597 // mAskForPreferences = temp->getAskForPreferences();
596 mWriteBackFile = temp->getWriteBackFile(); 598 mWriteBackFile = temp->getWriteBackFile();
597 mWriteBackExistingOnly = temp->getWriteBackExisting(); 599 mWriteBackExistingOnly = temp->getWriteBackExisting();
598 mIsKapiFile = temp->getIsKapiFile(); 600 mIsKapiFile = temp->getIsKapiFile();
599 mWriteBackInFuture = 0; 601 mWriteBackInFuture = 0;
600 if ( temp->getWriteBackFuture() ) { 602 if ( temp->getWriteBackFuture() ) {
601 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 603 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
602 mWriteBackInPast = temp->getWriteBackPastWeeks( ); 604 mWriteBackInPast = temp->getWriteBackPastWeeks( );
603 } 605 }
604 mFilterInCal = temp->getFilterInCal(); 606 mFilterInCal = temp->getFilterInCal();
605 mFilterOutCal = temp->getFilterOutCal(); 607 mFilterOutCal = temp->getFilterOutCal();
606 mFilterInAB = temp->getFilterInAB(); 608 mFilterInAB = temp->getFilterInAB();
607 mFilterOutAB = temp->getFilterOutAB(); 609 mFilterOutAB = temp->getFilterOutAB();
608 mShowSyncSummary = false; 610 mShowSyncSummary = false;
609 mCurrentSyncDevice = syncProfileNames[i] ; 611 mCurrentSyncDevice = syncProfileNames[i] ;
610 mCurrentSyncName = mLocalMachineName; 612 mCurrentSyncName = mLocalMachineName;
611 if ( i == 0 ) { 613 if ( i == 0 ) {
612 mIsKapiFile = false; 614 mIsKapiFile = false;
613#ifdef DESKTOP_VERSION 615#ifdef DESKTOP_VERSION
614 syncKDE(); 616 syncKDE();
615#else 617#else
616 syncSharp(); 618 syncSharp();
617#endif 619#endif
618 } else { 620 } else {
619 if ( temp->getIsLocalFileSync() ) { 621 if ( temp->getIsLocalFileSync() ) {
620 switch(mTargetApp) 622 switch(mTargetApp)
621 { 623 {
622 case (KAPI): 624 case (KAPI):
623 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) ) 625 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) )
624 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB(); 626 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB();
625 break; 627 break;
626 case (KOPI): 628 case (KOPI):
627 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 629 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
628 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName(); 630 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName();
629 break; 631 break;
630 case (PWMPI): 632 case (PWMPI):
631 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) 633 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )
632 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM(); 634 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM();
633 break; 635 break;
634 default: 636 default:
635 qDebug("KSM: invalid apptype selected"); 637 qDebug("KSM: invalid apptype selected");
636 break; 638 break;
637 } 639 }
638 } else { 640 } else {
639 if ( temp->getIsPhoneSync() ) { 641 if ( temp->getIsPhoneSync() ) {
640 mPhoneDevice = temp->getPhoneDevice( ) ; 642 mPhoneDevice = temp->getPhoneDevice( ) ;
641 mPhoneConnection = temp->getPhoneConnection( ); 643 mPhoneConnection = temp->getPhoneConnection( );
642 mPhoneModel = temp->getPhoneModel( ); 644 mPhoneModel = temp->getPhoneModel( );
643 syncPhone(); 645 syncPhone();
644 } else if ( temp->getIsPiSync() ) { 646 } else if ( temp->getIsPiSync() ) {
645 if ( mTargetApp == KAPI ) { 647 if ( mTargetApp == KAPI ) {
646 mPassWordPiSync = temp->getRemotePwAB(); 648 mPassWordPiSync = temp->getRemotePwAB();
647 mActiveSyncPort = temp->getRemotePortAB(); 649 mActiveSyncPort = temp->getRemotePortAB();
648 mActiveSyncIP = temp->getRemoteIPAB(); 650 mActiveSyncIP = temp->getRemoteIPAB();
649 } else if ( mTargetApp == KOPI ) { 651 } else if ( mTargetApp == KOPI ) {
650 mPassWordPiSync = temp->getRemotePw(); 652 mPassWordPiSync = temp->getRemotePw();
651 mActiveSyncPort = temp->getRemotePort(); 653 mActiveSyncPort = temp->getRemotePort();
652 mActiveSyncIP = temp->getRemoteIP(); 654 mActiveSyncIP = temp->getRemoteIP();
653 } else { 655 } else {
654 mPassWordPiSync = temp->getRemotePwPWM(); 656 mPassWordPiSync = temp->getRemotePwPWM();
655 mActiveSyncPort = temp->getRemotePortPWM(); 657 mActiveSyncPort = temp->getRemotePortPWM();
656 mActiveSyncIP = temp->getRemoteIPPWM(); 658 mActiveSyncIP = temp->getRemoteIPPWM();
657 } 659 }
658 syncPi(); 660 syncPi();
659 while ( !mPisyncFinished ) { 661 while ( !mPisyncFinished ) {
660 //qDebug("waiting "); 662 //qDebug("waiting ");
661 qApp->processEvents(); 663 qApp->processEvents();
662 } 664 }
663 timer.start(); 665 timer.start();
664 while ( timer.elapsed () < 2000 ) { 666 while ( timer.elapsed () < 2000 ) {
665 qApp->processEvents(); 667 qApp->processEvents();
666 } 668 }
667 } else 669 } else
668 syncRemote( temp, false ); 670 syncRemote( temp, false );
669 671
670 } 672 }
671 } 673 }
672 timer.start(); 674 timer.start();
673 mParent->topLevelWidget()->setCaption(i18n("Multiple sync in progress ... please wait!") ); 675 mParent->topLevelWidget()->setCaption(i18n("Multiple sync in progress ... please wait!") );
674 while ( timer.elapsed () < 2000 ) { 676 while ( timer.elapsed () < 2000 ) {
675 qApp->processEvents(); 677 qApp->processEvents();
676#ifndef _WIN32_ 678#ifndef _WIN32_
677 sleep (1); 679 sleep (1);
678#endif 680#endif
679 } 681 }
680 682
681 } 683 }
682 684
683 } 685 }
684 delete temp; 686 delete temp;
685 return syncedProfiles; 687 return syncedProfiles;
686} 688}
687 689
688void KSyncManager::syncRemote( KSyncProfile* prof, bool ask) 690void KSyncManager::syncRemote( KSyncProfile* prof, bool ask)
689{ 691{
690 QString question; 692 QString question;
691 if ( ask ) { 693 if ( ask ) {
692 question = i18n("Do you really want\nto remote sync\nwith profile \n")+ prof->getName()+" ?\n"; 694 question = i18n("Do you really want\nto remote sync\nwith profile \n")+ prof->getName()+" ?\n";
693 if ( QMessageBox::information( mParent, i18n("Sync"), 695 if ( QMessageBox::information( mParent, i18n("Sync"),
694 question, 696 question,
695 i18n("Yes"), i18n("No"), 697 i18n("Yes"), i18n("No"),
696 0, 0 ) != 0 ) 698 0, 0 ) != 0 )
697 return; 699 return;
698 } 700 }
699 701
700 QString preCommand; 702 QString preCommand;
701 QString localTempFile; 703 QString localTempFile;
702 QString postCommand; 704 QString postCommand;
703 705
704 switch(mTargetApp) 706 switch(mTargetApp)
705 { 707 {
706 case (KAPI): 708 case (KAPI):
707 preCommand = prof->getPreSyncCommandAB(); 709 preCommand = prof->getPreSyncCommandAB();
708 postCommand = prof->getPostSyncCommandAB(); 710 postCommand = prof->getPostSyncCommandAB();
709 localTempFile = prof->getLocalTempFileAB(); 711 localTempFile = prof->getLocalTempFileAB();
710 break; 712 break;
711 case (KOPI): 713 case (KOPI):
712 preCommand = prof->getPreSyncCommand(); 714 preCommand = prof->getPreSyncCommand();
713 postCommand = prof->getPostSyncCommand(); 715 postCommand = prof->getPostSyncCommand();
714 localTempFile = prof->getLocalTempFile(); 716 localTempFile = prof->getLocalTempFile();
715 break; 717 break;
716 case (PWMPI): 718 case (PWMPI):
717 preCommand = prof->getPreSyncCommandPWM(); 719 preCommand = prof->getPreSyncCommandPWM();
718 postCommand = prof->getPostSyncCommandPWM(); 720 postCommand = prof->getPostSyncCommandPWM();
719 localTempFile = prof->getLocalTempFilePWM(); 721 localTempFile = prof->getLocalTempFilePWM();
720 break; 722 break;
721 default: 723 default:
722 qDebug("KSM::syncRemote: invalid apptype selected"); 724 qDebug("KSM::syncRemote: invalid apptype selected");
723 break; 725 break;
724 } 726 }
725 727
726 728
727 int fi; 729 int fi;
728 if ( (fi = preCommand.find("$PWD$")) > 0 ) { 730 if ( (fi = preCommand.find("$PWD$")) > 0 ) {
729 QString pwd = getPassword(); 731 QString pwd = getPassword();
730 preCommand = preCommand.left( fi )+ pwd + preCommand.mid( fi+5 ); 732 preCommand = preCommand.left( fi )+ pwd + preCommand.mid( fi+5 );
731 733
732 } 734 }
733 int maxlen = 30; 735 int maxlen = 30;
734 if ( QApplication::desktop()->width() > 320 ) 736 if ( QApplication::desktop()->width() > 320 )
735 maxlen += 25; 737 maxlen += 25;
736 mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) ); 738 mParent->topLevelWidget()->setCaption ( i18n( "Copy remote file to local machine..." ) );
737 int fileSize = 0; 739 int fileSize = 0;
738 int result = system ( preCommand ); 740 int result = system ( preCommand );
739 // 0 : okay 741 // 0 : okay
740 // 256: no such file or dir 742 // 256: no such file or dir
741 // 743 //
742 qDebug("KSM::Sync: Remote copy result(0 = okay): %d ",result ); 744 qDebug("KSM::Sync: Remote copy result(0 = okay): %d ",result );
743 if ( result != 0 ) { 745 if ( result != 0 ) {
744 unsigned int len = maxlen; 746 unsigned int len = maxlen;
745 while ( len < preCommand.length() ) { 747 while ( len < preCommand.length() ) {
746 preCommand.insert( len , "\n" ); 748 preCommand.insert( len , "\n" );
747 len += maxlen +2; 749 len += maxlen +2;
748 } 750 }
749 question = i18n("Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n").arg (preCommand) ; 751 question = i18n("Sorry, the copy command failed!\nCommand was:\n%1\n \nTry command on console to get more\ndetailed info about the reason.\n").arg (preCommand) ;
750 QMessageBox::information( mParent, i18n("Sync - ERROR"), 752 QMessageBox::information( mParent, i18n("Sync - ERROR"),
751 question, 753 question,
752 i18n("Okay!")) ; 754 i18n("Okay!")) ;
753 mParent->topLevelWidget()->setCaption ("KDE-Pim"); 755 mParent->topLevelWidget()->setCaption ("KDE-Pim");
754 return; 756 return;
755 } 757 }
756 mParent->topLevelWidget()->setCaption ( i18n( "Copying succeed." ) ); 758 mParent->topLevelWidget()->setCaption ( i18n( "Copying succeed." ) );
757 //qDebug(" file **%s** ",prof->getLocalTempFile().latin1() ); 759 //qDebug(" file **%s** ",prof->getLocalTempFile().latin1() );
758 760
759 if ( syncWithFile( localTempFile, true ) ) { 761 if ( syncWithFile( localTempFile, true ) ) {
760 762
761 if ( mWriteBackFile ) { 763 if ( mWriteBackFile ) {
762 int fi; 764 int fi;
763 if ( (fi = postCommand.find("$PWD$")) > 0 ) { 765 if ( (fi = postCommand.find("$PWD$")) > 0 ) {
764 QString pwd = getPassword(); 766 QString pwd = getPassword();
765 postCommand = postCommand.left( fi )+ pwd + postCommand.mid( fi+5 ); 767 postCommand = postCommand.left( fi )+ pwd + postCommand.mid( fi+5 );
766 768
767 } 769 }
768 mParent->topLevelWidget()->setCaption ( i18n( "Writing back file ..." ) ); 770 mParent->topLevelWidget()->setCaption ( i18n( "Writing back file ..." ) );
769 result = system ( postCommand ); 771 result = system ( postCommand );
770 qDebug("KSM::Sync:Writing back file result: %d ", result); 772 qDebug("KSM::Sync:Writing back file result: %d ", result);
771 if ( result != 0 ) { 773 if ( result != 0 ) {
772 mParent->topLevelWidget()->setCaption ( i18n( "Writing back file result: " )+QString::number( result ) ); 774 mParent->topLevelWidget()->setCaption ( i18n( "Writing back file result: " )+QString::number( result ) );
773 return; 775 return;
774 } else { 776 } else {
775 mParent->topLevelWidget()->setCaption ( i18n( "Syncronization sucessfully completed" ) ); 777 mParent->topLevelWidget()->setCaption ( i18n( "Syncronization sucessfully completed" ) );
776 } 778 }
777 } 779 }
778 } 780 }
779 return; 781 return;
780} 782}
781bool KSyncManager::edit_pisync_options() 783bool KSyncManager::edit_pisync_options()
782{ 784{
783 QDialog dia( mParent, "dia", true ); 785 QDialog dia( mParent, "dia", true );
784 dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice ); 786 dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice );
785 QVBoxLayout lay ( &dia ); 787 QVBoxLayout lay ( &dia );
786 lay.setSpacing( 5 ); 788 lay.setSpacing( 5 );
787 lay.setMargin( 3 ); 789 lay.setMargin( 3 );
788 QLabel lab1 ( i18n("Password for remote access:"), &dia); 790 QLabel lab1 ( i18n("Password for remote access:"), &dia);
789 lay.addWidget( &lab1 ); 791 lay.addWidget( &lab1 );
790 QLineEdit le1 (&dia ); 792 QLineEdit le1 (&dia );
791 lay.addWidget( &le1 ); 793 lay.addWidget( &le1 );
792 QLabel lab2 ( i18n("Remote IP address:"), &dia); 794 QLabel lab2 ( i18n("Remote IP address:"), &dia);
793 lay.addWidget( &lab2 ); 795 lay.addWidget( &lab2 );
794 QLineEdit le2 (&dia ); 796 QLineEdit le2 (&dia );
795 lay.addWidget( &le2 ); 797 lay.addWidget( &le2 );
796 QLabel lab3 ( i18n("Remote port number:"), &dia); 798 QLabel lab3 ( i18n("Remote port number:"), &dia);
797 lay.addWidget( &lab3 ); 799 lay.addWidget( &lab3 );
798 QLineEdit le3 (&dia ); 800 QLineEdit le3 (&dia );
799 lay.addWidget( &le3 ); 801 lay.addWidget( &le3 );
800 QPushButton pb ( "OK", &dia); 802 QPushButton pb ( "OK", &dia);
801 lay.addWidget( &pb ); 803 lay.addWidget( &pb );
802 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); 804 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
803 le1.setText( mPassWordPiSync ); 805 le1.setText( mPassWordPiSync );
804 le2.setText( mActiveSyncIP ); 806 le2.setText( mActiveSyncIP );
805 le3.setText( mActiveSyncPort ); 807 le3.setText( mActiveSyncPort );
806 if ( dia.exec() ) { 808 if ( dia.exec() ) {
807 mPassWordPiSync = le1.text(); 809 mPassWordPiSync = le1.text();
808 mActiveSyncPort = le3.text(); 810 mActiveSyncPort = le3.text();
809 mActiveSyncIP = le2.text(); 811 mActiveSyncIP = le2.text();
810 return true; 812 return true;
811 } 813 }
812 return false; 814 return false;
813} 815}
814bool KSyncManager::edit_sync_options() 816bool KSyncManager::edit_sync_options()
815{ 817{
816 818
817 QDialog dia( mParent, "dia", true ); 819 QDialog dia( mParent, "dia", true );
818 dia.setCaption( i18n("Device: " ) +mCurrentSyncDevice ); 820 dia.setCaption( i18n("Device: " ) +mCurrentSyncDevice );
819 QButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia); 821 QButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia);
820 QVBoxLayout lay ( &dia ); 822 QVBoxLayout lay ( &dia );
821 lay.setSpacing( 2 ); 823 lay.setSpacing( 2 );
822 lay.setMargin( 3 ); 824 lay.setMargin( 3 );
823 lay.addWidget(&gr); 825 lay.addWidget(&gr);
824 QRadioButton loc ( i18n("Take local entry on conflict"), &gr ); 826 QRadioButton loc ( i18n("Take local entry on conflict"), &gr );
825 QRadioButton rem ( i18n("Take remote entry on conflict"), &gr ); 827 QRadioButton rem ( i18n("Take remote entry on conflict"), &gr );
826 QRadioButton newest( i18n("Take newest entry on conflict"), &gr ); 828 QRadioButton newest( i18n("Take newest entry on conflict"), &gr );
827 QRadioButton ask( i18n("Ask for every entry on conflict"), &gr ); 829 QRadioButton ask( i18n("Ask for every entry on conflict"), &gr );
828 QRadioButton f_loc( i18n("Force: Take local entry always"), &gr ); 830 QRadioButton f_loc( i18n("Force: Take local entry always"), &gr );
829 QRadioButton f_rem( i18n("Force: Take remote entry always"), &gr ); 831 QRadioButton f_rem( i18n("Force: Take remote entry always"), &gr );
830 //QRadioButton both( i18n("Take both on conflict"), &gr ); 832 //QRadioButton both( i18n("Take both on conflict"), &gr );
831 QPushButton pb ( "OK", &dia); 833 QPushButton pb ( "OK", &dia);
832 lay.addWidget( &pb ); 834 lay.addWidget( &pb );
833 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); 835 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
834 switch ( mSyncAlgoPrefs ) { 836 switch ( mSyncAlgoPrefs ) {
835 case 0: 837 case 0:
836 loc.setChecked( true); 838 loc.setChecked( true);
837 break; 839 break;
838 case 1: 840 case 1:
839 rem.setChecked( true ); 841 rem.setChecked( true );
840 break; 842 break;
841 case 2: 843 case 2:
842 newest.setChecked( true); 844 newest.setChecked( true);
843 break; 845 break;
844 case 3: 846 case 3:
845 ask.setChecked( true); 847 ask.setChecked( true);
846 break; 848 break;
847 case 4: 849 case 4:
848 f_loc.setChecked( true); 850 f_loc.setChecked( true);
849 break; 851 break;
850 case 5: 852 case 5:
851 f_rem.setChecked( true); 853 f_rem.setChecked( true);
852 break; 854 break;
853 case 6: 855 case 6:
854 // both.setChecked( true); 856 // both.setChecked( true);
855 break; 857 break;
856 default: 858 default:
857 break; 859 break;
858 } 860 }
859 if ( dia.exec() ) { 861 if ( dia.exec() ) {
860 mSyncAlgoPrefs = rem.isChecked()*1+newest.isChecked()*2+ ask.isChecked()*3+ f_loc.isChecked()*4+ f_rem.isChecked()*5;//+ both.isChecked()*6 ; 862 mSyncAlgoPrefs = rem.isChecked()*1+newest.isChecked()*2+ ask.isChecked()*3+ f_loc.isChecked()*4+ f_rem.isChecked()*5;//+ both.isChecked()*6 ;
861 return true; 863 return true;
862 } 864 }
863 return false; 865 return false;
864} 866}
865 867
866QString KSyncManager::getPassword( ) 868QString KSyncManager::getPassword( )
867{ 869{
868 QString retfile = ""; 870 QString retfile = "";
869 QDialog dia ( mParent, "input-dialog", true ); 871 QDialog dia ( mParent, "input-dialog", true );
870 QLineEdit lab ( &dia ); 872 QLineEdit lab ( &dia );
871 lab.setEchoMode( QLineEdit::Password ); 873 lab.setEchoMode( QLineEdit::Password );
872 QVBoxLayout lay( &dia ); 874 QVBoxLayout lay( &dia );
873 lay.setMargin(7); 875 lay.setMargin(7);
874 lay.setSpacing(7); 876 lay.setSpacing(7);
875 lay.addWidget( &lab); 877 lay.addWidget( &lab);
876 dia.setFixedSize( 230,50 ); 878 dia.setFixedSize( 230,50 );
877 dia.setCaption( i18n("Enter password") ); 879 dia.setCaption( i18n("Enter password") );
878 QPushButton pb ( "OK", &dia); 880 QPushButton pb ( "OK", &dia);
879 lay.addWidget( &pb ); 881 lay.addWidget( &pb );
880 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); 882 connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
881 dia.show(); 883 dia.show();
882 int res = dia.exec(); 884 int res = dia.exec();
883 if ( res ) 885 if ( res )
884 retfile = lab.text(); 886 retfile = lab.text();
885 dia.hide(); 887 dia.hide();
886 qApp->processEvents(); 888 qApp->processEvents();
887 return retfile; 889 return retfile;
888 890
889} 891}
890 892
891 893
892void KSyncManager::confSync() 894void KSyncManager::confSync()
893{ 895{
894 static KSyncPrefsDialog* sp = 0; 896 static KSyncPrefsDialog* sp = 0;
895 if ( ! sp ) { 897 if ( ! sp ) {
896 sp = new KSyncPrefsDialog( mParent, "syncprefs", true ); 898 sp = new KSyncPrefsDialog( mParent, "syncprefs", true );
897 } 899 }
898 sp->usrReadConfig(); 900 sp->usrReadConfig();
899#ifndef DESKTOP_VERSION 901#ifndef DESKTOP_VERSION
900 sp->showMaximized(); 902 sp->showMaximized();
901#else 903#else
902 sp->show(); 904 sp->show();
903#endif 905#endif
904 sp->exec(); 906 sp->exec();
905 QStringList oldSyncProfileNames = mSyncProfileNames; 907 QStringList oldSyncProfileNames = mSyncProfileNames;
906 mSyncProfileNames = sp->getSyncProfileNames(); 908 mSyncProfileNames = sp->getSyncProfileNames();
907 mLocalMachineName = sp->getLocalMachineName (); 909 mLocalMachineName = sp->getLocalMachineName ();
908 int ii; 910 int ii;
909 for ( ii = 0; ii < oldSyncProfileNames.count(); ++ii ) { 911 for ( ii = 0; ii < oldSyncProfileNames.count(); ++ii ) {
910 if ( ! mSyncProfileNames.contains( oldSyncProfileNames[ii] ) ) 912 if ( ! mSyncProfileNames.contains( oldSyncProfileNames[ii] ) )
911 mImplementation->removeSyncInfo( oldSyncProfileNames[ii] ); 913 mImplementation->removeSyncInfo( oldSyncProfileNames[ii] );
912 } 914 }
913 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); 915 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
914} 916}
915void KSyncManager::syncKDE() 917void KSyncManager::syncKDE()
916{ 918{
917 mSyncWithDesktop = true; 919 mSyncWithDesktop = true;
918 emit save(); 920 emit save();
919 switch(mTargetApp) 921 switch(mTargetApp)
920 { 922 {
921 case (KAPI): 923 case (KAPI):
922 { 924 {
923#ifdef DESKTOP_VERSION 925#ifdef DESKTOP_VERSION
924 QString command = "kdeabdump33"; 926 QString command = "kdeabdump33";
925 QString commandfile = "kdeabdump33"; 927 QString commandfile = "kdeabdump33";
926 QString commandpath = qApp->applicationDirPath () + "/"; 928 QString commandpath = qApp->applicationDirPath () + "/";
927#else 929#else
928 QString command = "kdeabdump33"; 930 QString command = "kdeabdump33";
929 QString commandfile = "kdeabdump33"; 931 QString commandfile = "kdeabdump33";
930 QString commandpath = QDir::homeDirPath ()+"/"; 932 QString commandpath = QDir::homeDirPath ()+"/";
931#endif 933#endif
932 if ( ! QFile::exists ( commandpath+commandfile ) ) 934 if ( ! QFile::exists ( commandpath+commandfile ) )
933 command = commandfile; 935 command = commandfile;
934 else 936 else
935 command = commandpath+commandfile; 937 command = commandpath+commandfile;
936 938
937 QString fileName = QDir::homeDirPath ()+"/.kdeaddressbookdump.vcf"; 939 QString fileName = QDir::homeDirPath ()+"/.kdeaddressbookdump.vcf";
938 int result = system ( command.latin1()); 940 int result = system ( command.latin1());
939 qDebug("AB dump 33 command call result: %d ", result); 941 qDebug("AB dump 33 command call result: %d ", result);
940 if ( result != 0 ) { 942 if ( result != 0 ) {
941 qDebug("Calling AB dump version 33 failed. Trying 34... "); 943 qDebug("Calling AB dump version 33 failed. Trying 34... ");
942 commandfile = "kdeabdump34"; 944 commandfile = "kdeabdump34";
943 if ( ! QFile::exists ( commandpath+commandfile ) ) 945 if ( ! QFile::exists ( commandpath+commandfile ) )
944 command = commandfile; 946 command = commandfile;
945 else 947 else
946 command = commandpath+commandfile; 948 command = commandpath+commandfile;
947 result = system ( command.latin1()); 949 result = system ( command.latin1());
948 qDebug("AB dump 34 command call result: %d ", result); 950 qDebug("AB dump 34 command call result: %d ", result);
949 if ( result != 0 ) { 951 if ( result != 0 ) {
950 KMessageBox::error( 0, i18n("Error accessing KDE addressbook data.\nMake sure the file\n%1kdeabdump3x\nexists ( x = 3 or 4 ).\nSupported KDE versions are 3.3 and 3.4.\nUsed version should be auto detected.\n").arg( commandpath )); 952 KMessageBox::error( 0, i18n("Error accessing KDE addressbook data.\nMake sure the file\n%1kdeabdump3x\nexists ( x = 3 or 4 ).\nSupported KDE versions are 3.3 and 3.4.\nUsed version should be auto detected.\n").arg( commandpath ));
951 return; 953 return;
952 } 954 }
953 } 955 }
954 if ( syncWithFile( fileName,true ) ) { 956 if ( syncWithFile( fileName,true ) ) {
955 if ( mWriteBackFile ) { 957 if ( mWriteBackFile ) {
956 command += " --read"; 958 command += " --read";
957 system ( command.latin1()); 959 system ( command.latin1());
958 } 960 }
959 } 961 }
960 962
961 } 963 }
962 break; 964 break;
963 case (KOPI): 965 case (KOPI):
964 { 966 {
965#ifdef DESKTOP_VERSION 967#ifdef DESKTOP_VERSION
966 QString command = "kdecaldump33"; 968 QString command = "kdecaldump33";
967 QString commandfile = "kdecaldump33"; 969 QString commandfile = "kdecaldump33";
968 QString commandpath = qApp->applicationDirPath () + "/"; 970 QString commandpath = qApp->applicationDirPath () + "/";
969#else 971#else
970 QString command = "kdecaldump33"; 972 QString command = "kdecaldump33";
971 QString commandfile = "kdecaldump33"; 973 QString commandfile = "kdecaldump33";
972 QString commandpath = QDir::homeDirPath ()+"/"; 974 QString commandpath = QDir::homeDirPath ()+"/";
973#endif 975#endif
974 if ( ! QFile::exists ( commandpath+commandfile ) ) 976 if ( ! QFile::exists ( commandpath+commandfile ) )
975 command = commandfile; 977 command = commandfile;
976 else 978 else
977 command = commandpath+commandfile; 979 command = commandpath+commandfile;
978 980
979 QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics"; 981 QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics";
980 int result = system ( command.latin1()); 982 int result = system ( command.latin1());
981 qDebug("Cal dump 33 command call result result: %d ", result); 983 qDebug("Cal dump 33 command call result result: %d ", result);
982 if ( result != 0 ) { 984 if ( result != 0 ) {
983 qDebug("Calling CAL dump version 33 failed. Trying 34... "); 985 qDebug("Calling CAL dump version 33 failed. Trying 34... ");
984 commandfile = "kdecaldump34"; 986 commandfile = "kdecaldump34";
985 if ( ! QFile::exists ( commandpath+commandfile ) ) 987 if ( ! QFile::exists ( commandpath+commandfile ) )
986 command = commandfile; 988 command = commandfile;
987 else 989 else
988 command = commandpath+commandfile; 990 command = commandpath+commandfile;
989 result = system ( command.latin1()); 991 result = system ( command.latin1());
990 qDebug("Cal dump 34 command call result result: %d ", result); 992 qDebug("Cal dump 34 command call result result: %d ", result);
991 if ( result != 0 ) { 993 if ( result != 0 ) {
992 KMessageBox::error( 0, i18n("Error accessing KDE calendar data.\nMake sure the file\n%1kdecaldump3x\nexists ( x = 3 or 4 ).\nSupported KDE versions are 3.3 and 3.4.\nUsed version should be auto detected.\n").arg( commandpath )); 994 KMessageBox::error( 0, i18n("Error accessing KDE calendar data.\nMake sure the file\n%1kdecaldump3x\nexists ( x = 3 or 4 ).\nSupported KDE versions are 3.3 and 3.4.\nUsed version should be auto detected.\n").arg( commandpath ));
993 return; 995 return;
994 } 996 }
995 } 997 }
996 if ( syncWithFile( fileName,true ) ) { 998 if ( syncWithFile( fileName,true ) ) {
997 if ( mWriteBackFile ) { 999 if ( mWriteBackFile ) {
998 command += " --read"; 1000 command += " --read";
999 system ( command.latin1()); 1001 system ( command.latin1());
1000 } 1002 }
1001 } 1003 }
1002 1004
1003 } 1005 }
1004 break; 1006 break;
1005 case (PWMPI): 1007 case (PWMPI):
1006 1008
1007 break; 1009 break;
1008 default: 1010 default:
1009 qDebug("KSM::slotSyncMenu: invalid apptype selected"); 1011 qDebug("KSM::slotSyncMenu: invalid apptype selected");
1010 break; 1012 break;
1011 1013
1012 } 1014 }
1013} 1015}
1014 1016
1015void KSyncManager::syncSharp() 1017void KSyncManager::syncSharp()
1016{ 1018{
1017 1019
1018 if ( ! syncExternalApplication("sharp") ) 1020 if ( ! syncExternalApplication("sharp") )
1019 qDebug("KSM::ERROR sync sharp "); 1021 qDebug("KSM::ERROR sync sharp ");
1020} 1022}
1021 1023
1022bool KSyncManager::syncExternalApplication(QString resource) 1024bool KSyncManager::syncExternalApplication(QString resource)
1023{ 1025{
1024 1026
1025 emit save(); 1027 emit save();
1026 1028
1027 if ( mAskForPreferences ) 1029 if ( mAskForPreferences )
1028 if ( !edit_sync_options()) { 1030 if ( !edit_sync_options()) {
1029 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); 1031 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") );
1030 return false; 1032 return false;
1031 } 1033 }
1032 1034
1033 qDebug("KSM::Sync extern %s", resource.latin1()); 1035 qDebug("KSM::Sync extern %s", resource.latin1());
1034 1036
1035 bool syncOK = mImplementation->syncExternal(this, resource); 1037 bool syncOK = mImplementation->syncExternal(this, resource);
1036 1038
1037 return syncOK; 1039 return syncOK;
1038 1040
1039} 1041}
1040 1042
1041void KSyncManager::syncPhone() 1043void KSyncManager::syncPhone()
1042{ 1044{
1043 1045
1044 syncExternalApplication("phone"); 1046 syncExternalApplication("phone");
1045 1047
1046} 1048}
1047 1049
1048void KSyncManager::showProgressBar(int percentage, QString caption, int total) 1050void KSyncManager::showProgressBar(int percentage, QString caption, int total)
1049{ 1051{
1050 if (!bar->isVisible()) 1052 if (!bar->isVisible())
1051 { 1053 {
1052 int w = 300; 1054 int w = 300;
1053 if ( QApplication::desktop()->width() < 320 ) 1055 if ( QApplication::desktop()->width() < 320 )
1054 w = 220; 1056 w = 220;
1055 int h = bar->sizeHint().height() ; 1057 int h = bar->sizeHint().height() ;
1056 int dw = QApplication::desktop()->width(); 1058 int dw = QApplication::desktop()->width();
1057 int dh = QApplication::desktop()->height(); 1059 int dh = QApplication::desktop()->height();
1058 bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 1060 bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
1059 bar->setCaption (caption); 1061 bar->setCaption (caption);
1060 bar->setTotalSteps ( total ) ; 1062 bar->setTotalSteps ( total ) ;
1061 bar->show(); 1063 bar->show();
1062 } 1064 }
1063 bar->raise(); 1065 bar->raise();
1064 bar->setProgress( percentage ); 1066 bar->setProgress( percentage );
1065 qApp->processEvents(); 1067 qApp->processEvents();
1066} 1068}
1067 1069
1068void KSyncManager::hideProgressBar() 1070void KSyncManager::hideProgressBar()
1069{ 1071{
1070 bar->hide(); 1072 bar->hide();
1071 qApp->processEvents(); 1073 qApp->processEvents();
1072} 1074}
1073 1075
1074bool KSyncManager::isProgressBarCanceled() 1076bool KSyncManager::isProgressBarCanceled()
1075{ 1077{
1076 return !bar->isVisible(); 1078 return !bar->isVisible();
1077} 1079}
1078 1080
1079QString KSyncManager::syncFileName() 1081QString KSyncManager::syncFileName()
1080{ 1082{
1081 1083
1082 QString fn = "tempfile"; 1084 QString fn = "tempfile";
1083 switch(mTargetApp) 1085 switch(mTargetApp)
1084 { 1086 {
1085 case (KAPI): 1087 case (KAPI):
1086 fn = "tempsyncab.vcf"; 1088 fn = "tempsyncab.vcf";
1087 break; 1089 break;
1088 case (KOPI): 1090 case (KOPI):
1089 fn = "tempsynccal.ics"; 1091 fn = "tempsynccal.ics";
1090 break; 1092 break;
1091 case (PWMPI): 1093 case (PWMPI):
1092 fn = "tempsyncpw.pwm"; 1094 fn = "tempsyncpw.pwm";
1093 break; 1095 break;
1094 default: 1096 default:
1095 break; 1097 break;
1096 } 1098 }
1097#ifdef _WIN32_ 1099#ifdef _WIN32_
1098 return locateLocal( "tmp", fn ); 1100 return locateLocal( "tmp", fn );
1099#else 1101#else
1100 return (QString( "/tmp/" )+ fn ); 1102 return (QString( "/tmp/" )+ fn );
1101#endif 1103#endif
1102} 1104}
1103 1105
1104void KSyncManager::syncPi() 1106void KSyncManager::syncPi()
1105{ 1107{
1106 mIsKapiFile = true; 1108 mIsKapiFile = true;
1107 mPisyncFinished = false; 1109 mPisyncFinished = false;
1108 qApp->processEvents(); 1110 qApp->processEvents();
1109 if ( mAskForPreferences ) 1111 if ( mAskForPreferences )
1110 if ( !edit_pisync_options()) { 1112 if ( !edit_pisync_options()) {
1111 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); 1113 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") );
1112 mPisyncFinished = true; 1114 mPisyncFinished = true;
1113 return; 1115 return;
1114 } 1116 }
1115 bool ok; 1117 bool ok;
1116 Q_UINT16 port = mActiveSyncPort.toUInt(&ok); 1118 Q_UINT16 port = mActiveSyncPort.toUInt(&ok);
1117 if ( ! ok ) { 1119 if ( ! ok ) {
1118 mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); 1120 mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") );
1119 mPisyncFinished = true; 1121 mPisyncFinished = true;
1120 return; 1122 return;
1121 } 1123 }
1122 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() ); 1124 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() );
1123 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); 1125 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) );
1124 commandSocket->readFile( syncFileName() ); 1126 commandSocket->readFile( syncFileName() );
1125} 1127}
1126 1128
1127void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) 1129void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state)
1128{ 1130{
1129 //enum { success, errorW, errorR, quiet }; 1131 //enum { success, errorW, errorR, quiet };
1130 1132
1131 1133
1132 1134
1133 if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ||state == KCommandSocket::errorPW || 1135 if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ||state == KCommandSocket::errorPW ||
1134 state == KCommandSocket::errorCA ||state == KCommandSocket::errorFI ||state == KCommandSocket::errorUN||state == KCommandSocket::errorED ) { 1136 state == KCommandSocket::errorCA ||state == KCommandSocket::errorFI ||state == KCommandSocket::errorUN||state == KCommandSocket::errorED ) {
1135 if ( state == KCommandSocket::errorPW ) 1137 if ( state == KCommandSocket::errorPW )
1136 mParent->topLevelWidget()->setCaption( i18n("Wrong password: Receiving remote file failed.") ); 1138 mParent->topLevelWidget()->setCaption( i18n("Wrong password: Receiving remote file failed.") );
1137 else if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ) 1139 else if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO )
1138 mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") ); 1140 mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") );
1139 else if ( state == KCommandSocket::errorCA ) 1141 else if ( state == KCommandSocket::errorCA )
1140 mParent->topLevelWidget()->setCaption( i18n("Sync cancelled from remote.") ); 1142 mParent->topLevelWidget()->setCaption( i18n("Sync cancelled from remote.") );
1141 else if ( state == KCommandSocket::errorFI ) 1143 else if ( state == KCommandSocket::errorFI )
1142 mParent->topLevelWidget()->setCaption( i18n("File error on remote.") ); 1144 mParent->topLevelWidget()->setCaption( i18n("File error on remote.") );
1143 else if ( state == KCommandSocket::errorED ) 1145 else if ( state == KCommandSocket::errorED )
1144 mParent->topLevelWidget()->setCaption( i18n("Please close error dialog on remote.") ); 1146 mParent->topLevelWidget()->setCaption( i18n("Please close error dialog on remote.") );
1145 else if ( state == KCommandSocket::errorUN ) 1147 else if ( state == KCommandSocket::errorUN )
1146 mParent->topLevelWidget()->setCaption( i18n("Unknown error on remote.") ); 1148 mParent->topLevelWidget()->setCaption( i18n("Unknown error on remote.") );
1147 delete s; 1149 delete s;
1148 if ( state == KCommandSocket::errorR ) { 1150 if ( state == KCommandSocket::errorR ) {
1149 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget()); 1151 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget());
1150 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); 1152 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) );
1151 commandSocket->sendStop(); 1153 commandSocket->sendStop();
1152 } 1154 }
1153 mPisyncFinished = true; 1155 mPisyncFinished = true;
1154 return; 1156 return;
1155 1157
1156 } else if ( state == KCommandSocket::errorW ) { 1158 } else if ( state == KCommandSocket::errorW ) {
1157 mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") ); 1159 mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") );
1158 mPisyncFinished = true; 1160 mPisyncFinished = true;
1159 1161
1160 } else if ( state == KCommandSocket::successR ) { 1162 } else if ( state == KCommandSocket::successR ) {
1161 QTimer::singleShot( 1, this , SLOT ( readFileFromSocket())); 1163 QTimer::singleShot( 1, this , SLOT ( readFileFromSocket()));
1162 1164
1163 } else if ( state == KCommandSocket::successW ) { 1165 } else if ( state == KCommandSocket::successW ) {
1164 mParent->topLevelWidget()->setCaption( i18n("Pi-Sync successful!") ); 1166 mParent->topLevelWidget()->setCaption( i18n("Pi-Sync successful!") );
1165 mPisyncFinished = true; 1167 mPisyncFinished = true;
1166 } else if ( state == KCommandSocket::quiet ){ 1168 } else if ( state == KCommandSocket::quiet ){
1167 qDebug("KSS: quiet "); 1169 qDebug("KSS: quiet ");
1168 mPisyncFinished = true; 1170 mPisyncFinished = true;
1169 } else { 1171 } else {
1170 qDebug("KSS: Error: unknown state: %d ", state); 1172 qDebug("KSS: Error: unknown state: %d ", state);
1171 mPisyncFinished = true; 1173 mPisyncFinished = true;
1172 } 1174 }
1173 1175
1174 delete s; 1176 delete s;
1175} 1177}
1176 1178
1177void KSyncManager::readFileFromSocket() 1179void KSyncManager::readFileFromSocket()
1178{ 1180{
1179 QString fileName = syncFileName(); 1181 QString fileName = syncFileName();
1180 bool syncOK = true; 1182 bool syncOK = true;
1181 mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") ); 1183 mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") );
1182 if ( ! syncWithFile( fileName , true ) ) { 1184 if ( ! syncWithFile( fileName , true ) ) {
1183 mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") ); 1185 mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") );
1184 syncOK = false; 1186 syncOK = false;
1185 } 1187 }
1186 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() ); 1188 KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() );
1187 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); 1189 connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) );
1188 if ( mWriteBackFile && syncOK ) 1190 if ( mWriteBackFile && syncOK )
1189 commandSocket->writeFile( fileName ); 1191 commandSocket->writeFile( fileName );
1190 else { 1192 else {
1191 commandSocket->sendStop(); 1193 commandSocket->sendStop();
1192 if ( syncOK ) 1194 if ( syncOK )
1193 mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); 1195 mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") );
1194 mPisyncFinished = true; 1196 mPisyncFinished = true;
1195 } 1197 }
1196} 1198}
1197 1199
1198KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name ) 1200KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name )
1199{ 1201{
1200 mPassWord = pw; 1202 mPassWord = pw;
1201 mSocket = 0; 1203 mSocket = 0;
1202 mSyncActionDialog = 0; 1204 mSyncActionDialog = 0;
1203 blockRC = false; 1205 blockRC = false;
1204 mErrorMessage = 0; 1206 mErrorMessage = 0;
1205} 1207}
1206 1208
1207void KServerSocket::newConnection ( int socket ) 1209void KServerSocket::newConnection ( int socket )
1208{ 1210{
1209 // qDebug("KServerSocket:New connection %d ", socket); 1211 // qDebug("KServerSocket:New connection %d ", socket);
1210 if ( mSocket ) { 1212 if ( mSocket ) {
1211 qDebug("KSS::newConnection Socket deleted! "); 1213 qDebug("KSS::newConnection Socket deleted! ");
1212 delete mSocket; 1214 delete mSocket;
1213 mSocket = 0; 1215 mSocket = 0;
1214 } 1216 }
1215 mSocket = new QSocket( this ); 1217 mSocket = new QSocket( this );
1216 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); 1218 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
1217 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); 1219 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
1218 mSocket->setSocket( socket ); 1220 mSocket->setSocket( socket );
1219} 1221}
1220 1222
1221void KServerSocket::discardClient() 1223void KServerSocket::discardClient()
1222{ 1224{
1223 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1225 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1224} 1226}
1225void KServerSocket::deleteSocket() 1227void KServerSocket::deleteSocket()
1226{ 1228{
1227 qDebug("KSS::deleteSocket"); 1229 qDebug("KSS::deleteSocket");
1228 if ( mSocket ) { 1230 if ( mSocket ) {
1229 delete mSocket; 1231 delete mSocket;
1230 mSocket = 0; 1232 mSocket = 0;
1231 } 1233 }
1232 if ( mErrorMessage ) 1234 if ( mErrorMessage )
1233 QTimer::singleShot( 10, this , SLOT ( displayErrorMessage())); 1235 QTimer::singleShot( 10, this , SLOT ( displayErrorMessage()));
1234} 1236}
1235void KServerSocket::readClient() 1237void KServerSocket::readClient()
1236{ 1238{
1237 if ( blockRC ) 1239 if ( blockRC )
1238 return; 1240 return;
1239 if ( mSocket == 0 ) { 1241 if ( mSocket == 0 ) {
1240 qDebug("ERROR::KSS::readClient(): mSocket == 0 "); 1242 qDebug("ERROR::KSS::readClient(): mSocket == 0 ");
1241 return; 1243 return;
1242 } 1244 }
1243 if ( mErrorMessage ) { 1245 if ( mErrorMessage ) {
1244 mErrorMessage = 999; 1246 mErrorMessage = 999;
1245 error_connect("ERROR_ED\r\n\r\n"); 1247 error_connect("ERROR_ED\r\n\r\n");
1246 return; 1248 return;
1247 } 1249 }
1248 mErrorMessage = 0; 1250 mErrorMessage = 0;
1249 //qDebug("KServerSocket::readClient()"); 1251 //qDebug("KServerSocket::readClient()");
1250 if ( mSocket->canReadLine() ) { 1252 if ( mSocket->canReadLine() ) {
1251 QString line = mSocket->readLine(); 1253 QString line = mSocket->readLine();
1252 //qDebug("KServerSocket readline: %s ", line.latin1()); 1254 //qDebug("KServerSocket readline: %s ", line.latin1());
1253 QStringList tokens = QStringList::split( QRegExp("[ \r\n][ \r\n]*"), line ); 1255 QStringList tokens = QStringList::split( QRegExp("[ \r\n][ \r\n]*"), line );
1254 if ( tokens[0] == "GET" ) { 1256 if ( tokens[0] == "GET" ) {
1255 if ( tokens[1] == mPassWord ) { 1257 if ( tokens[1] == mPassWord ) {
1256 //emit sendFile( mSocket ); 1258 //emit sendFile( mSocket );
1257 bool ok = false; 1259 bool ok = false;
1258 QDateTime dt = KGlobal::locale()->readDateTime( tokens[2], KLocale::ISODate, &ok); 1260 QDateTime dt = KGlobal::locale()->readDateTime( tokens[2], KLocale::ISODate, &ok);
1259 if ( ok ) { 1261 if ( ok ) {
1260 KSyncManager::mRequestedSyncEvent = dt; 1262 KSyncManager::mRequestedSyncEvent = dt;
1261 } 1263 }
1262 else 1264 else
1263 KSyncManager::mRequestedSyncEvent = QDateTime(); 1265 KSyncManager::mRequestedSyncEvent = QDateTime();
1264 send_file(); 1266 send_file();
1265 } 1267 }
1266 else { 1268 else {
1267 mErrorMessage = 1; 1269 mErrorMessage = 1;
1268 error_connect("ERROR_PW\r\n\r\n"); 1270 error_connect("ERROR_PW\r\n\r\n");
1269 } 1271 }
1270 } 1272 }
1271 if ( tokens[0] == "PUT" ) { 1273 if ( tokens[0] == "PUT" ) {
1272 if ( tokens[1] == mPassWord ) { 1274 if ( tokens[1] == mPassWord ) {
1273 //emit getFile( mSocket ); 1275 //emit getFile( mSocket );
1274 blockRC = true; 1276 blockRC = true;
1275 get_file(); 1277 get_file();
1276 } 1278 }
1277 else { 1279 else {
1278 mErrorMessage = 2; 1280 mErrorMessage = 2;
1279 error_connect("ERROR_PW\r\n\r\n"); 1281 error_connect("ERROR_PW\r\n\r\n");
1280 end_connect(); 1282 end_connect();
1281 } 1283 }
1282 } 1284 }
1283 if ( tokens[0] == "STOP" ) { 1285 if ( tokens[0] == "STOP" ) {
1284 //emit endConnect(); 1286 //emit endConnect();
1285 end_connect(); 1287 end_connect();
1286 } 1288 }
1287 } 1289 }
1288} 1290}
1289void KServerSocket::displayErrorMessage() 1291void KServerSocket::displayErrorMessage()
1290{ 1292{
1291 if ( mErrorMessage == 1 ) { 1293 if ( mErrorMessage == 1 ) {
1292 KMessageBox::error( 0, i18n("Got send file request\nwith invalid password")); 1294 KMessageBox::error( 0, i18n("Got send file request\nwith invalid password"));
1293 mErrorMessage = 0; 1295 mErrorMessage = 0;
1294 } 1296 }
1295 else if ( mErrorMessage == 2 ) { 1297 else if ( mErrorMessage == 2 ) {
1296 KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password")); 1298 KMessageBox::error( 0, i18n("Got receive file request\nwith invalid password"));
1297 mErrorMessage = 0; 1299 mErrorMessage = 0;
1298 } 1300 }
1299} 1301}
1300void KServerSocket::error_connect( QString errmess ) 1302void KServerSocket::error_connect( QString errmess )
1301{ 1303{
1302 QTextStream os( mSocket ); 1304 QTextStream os( mSocket );
1303 os.setEncoding( QTextStream::Latin1 ); 1305 os.setEncoding( QTextStream::Latin1 );
1304 os << errmess ; 1306 os << errmess ;
1305 mSocket->close(); 1307 mSocket->close();
1306 if ( mSocket->state() == QSocket::Idle ) { 1308 if ( mSocket->state() == QSocket::Idle ) {
1307 QTimer::singleShot( 0, this , SLOT ( discardClient())); 1309 QTimer::singleShot( 0, this , SLOT ( discardClient()));
1308 } 1310 }
1309} 1311}
1310void KServerSocket::end_connect() 1312void KServerSocket::end_connect()
1311{ 1313{
1312 delete mSyncActionDialog; 1314 delete mSyncActionDialog;
1313 mSyncActionDialog = 0; 1315 mSyncActionDialog = 0;
1314} 1316}
1315void KServerSocket::send_file() 1317void KServerSocket::send_file()
1316{ 1318{
1317 //qDebug("MainWindow::sendFile(QSocket* s) "); 1319 //qDebug("MainWindow::sendFile(QSocket* s) ");
1318 if ( mSyncActionDialog ) 1320 if ( mSyncActionDialog )
1319 delete mSyncActionDialog; 1321 delete mSyncActionDialog;
1320 mSyncActionDialog = new QDialog ( 0, "input-dialog", true ); 1322 mSyncActionDialog = new QDialog ( 0, "input-dialog", true );
1321 mSyncActionDialog->setCaption(i18n("Received sync request")); 1323 mSyncActionDialog->setCaption(i18n("Received sync request"));
1322 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog ); 1324 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog );
1323 label->setAlignment ( Qt::AlignHCenter ); 1325 label->setAlignment ( Qt::AlignHCenter );
1324 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog ); 1326 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog );
1325 lay->addWidget( label); 1327 lay->addWidget( label);
1326 lay->setMargin(7); 1328 lay->setMargin(7);
1327 lay->setSpacing(7); 1329 lay->setSpacing(7);
1328 if ( KSyncManager::mRequestedSyncEvent.isValid() ) { 1330 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
1329 int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent ); 1331 int secs = QDateTime::currentDateTime().secsTo( KSyncManager::mRequestedSyncEvent );
1330 //secs = 333; 1332 //secs = 333;
1331 if ( secs < 0 ) 1333 if ( secs < 0 )
1332 secs = secs * (-1); 1334 secs = secs * (-1);
1333 if ( secs > 30 ) 1335 if ( secs > 30 )
1334 //if ( true ) 1336 //if ( true )
1335 { 1337 {
1336 QString warning = i18n("Clock skew of\nsyncing devices\nis %1 seconds!").arg( secs ); 1338 QString warning = i18n("Clock skew of\nsyncing devices\nis %1 seconds!").arg( secs );
1337 QLabel* label = new QLabel( warning, mSyncActionDialog ); 1339 QLabel* label = new QLabel( warning, mSyncActionDialog );
1338 label->setAlignment ( Qt::AlignHCenter ); 1340 label->setAlignment ( Qt::AlignHCenter );
1339 lay->addWidget( label); 1341 lay->addWidget( label);
1340 if ( secs > 180 ) 1342 if ( secs > 180 )
1341 { 1343 {
1342 if ( secs > 300 ) { 1344 if ( secs > 300 ) {
1343 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(0, i18n("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!"), i18n("High clock skew!"),i18n("Synchronize!"))) { 1345 if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(0, i18n("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!"), i18n("High clock skew!"),i18n("Synchronize!"))) {
1344 qDebug("KSS::Sync cancelled ,cs"); 1346 qDebug("KSS::Sync cancelled ,cs");
1345 mErrorMessage = 0; 1347 mErrorMessage = 0;
1346 end_connect(); 1348 end_connect();
1347 error_connect("ERROR_CA\r\n\r\n"); 1349 error_connect("ERROR_CA\r\n\r\n");
1348 return ; 1350 return ;
1349 } 1351 }
1350 } 1352 }
1351 QFont f = label->font(); 1353 QFont f = label->font();
1352 f.setPointSize ( f.pointSize() *2 ); 1354 f.setPointSize ( f.pointSize() *2 );
1353 f. setBold (true ); 1355 f. setBold (true );
1354 QLabel* label = new QLabel( warning, mSyncActionDialog ); 1356 QLabel* label = new QLabel( warning, mSyncActionDialog );
1355 label->setFont( f ); 1357 label->setFont( f );
1356 warning = i18n("ADJUST\nYOUR\nCLOCKS!"); 1358 warning = i18n("ADJUST\nYOUR\nCLOCKS!");
1357 label->setText( warning ); 1359 label->setText( warning );
1358 label->setAlignment ( Qt::AlignHCenter ); 1360 label->setAlignment ( Qt::AlignHCenter );
1359 lay->addWidget( label); 1361 lay->addWidget( label);
1360 mSyncActionDialog->setFixedSize( 230, 300); 1362 mSyncActionDialog->setFixedSize( 230, 300);
1361 } else { 1363 } else {
1362 mSyncActionDialog->setFixedSize( 230, 200); 1364 mSyncActionDialog->setFixedSize( 230, 200);
1363 } 1365 }
1364 } else { 1366 } else {
1365 mSyncActionDialog->setFixedSize( 230, 120); 1367 mSyncActionDialog->setFixedSize( 230, 120);
1366 } 1368 }
1367 } else 1369 } else
1368 mSyncActionDialog->setFixedSize( 230, 120); 1370 mSyncActionDialog->setFixedSize( 230, 120);
1369 mSyncActionDialog->show(); 1371 mSyncActionDialog->show();
1370 mSyncActionDialog->raise(); 1372 mSyncActionDialog->raise();
1371 emit request_file(); 1373 emit request_file();
1372 qApp->processEvents(); 1374 qApp->processEvents();
1373 QString fileName = mFileName; 1375 QString fileName = mFileName;
1374 QFile file( fileName ); 1376 QFile file( fileName );
1375 if (!file.open( IO_ReadOnly ) ) { 1377 if (!file.open( IO_ReadOnly ) ) {
1376 mErrorMessage = 0; 1378 mErrorMessage = 0;
1377 end_connect(); 1379 end_connect();
1378 error_connect("ERROR_FI\r\n\r\n"); 1380 error_connect("ERROR_FI\r\n\r\n");
1379 return ; 1381 return ;
1380 } 1382 }
1381 mSyncActionDialog->setCaption( i18n("Sending file...") ); 1383 mSyncActionDialog->setCaption( i18n("Sending file...") );
1382 QTextStream ts( &file ); 1384 QTextStream ts( &file );
1383 ts.setEncoding( QTextStream::Latin1 ); 1385 ts.setEncoding( QTextStream::Latin1 );
1384 1386
1385 QTextStream os( mSocket ); 1387 QTextStream os( mSocket );
1386 os.setEncoding( QTextStream::Latin1 ); 1388 os.setEncoding( QTextStream::Latin1 );
1387 while ( ! ts.atEnd() ) { 1389 while ( ! ts.atEnd() ) {
1388 os << ts.readLine() << "\r\n"; 1390 os << ts.readLine() << "\r\n";
1389 } 1391 }
1390 os << "\r\n"; 1392 os << "\r\n";
1391 //os << ts.read(); 1393 //os << ts.read();
1392 file.close(); 1394 file.close();
1393 mSyncActionDialog->setCaption( i18n("Waiting for synced file...") ); 1395 mSyncActionDialog->setCaption( i18n("Waiting for synced file...") );
1394 mSocket->close(); 1396 mSocket->close();
1395 if ( mSocket->state() == QSocket::Idle ) 1397 if ( mSocket->state() == QSocket::Idle )
1396 QTimer::singleShot( 10, this , SLOT ( discardClient())); 1398 QTimer::singleShot( 10, this , SLOT ( discardClient()));
1397} 1399}
1398void KServerSocket::get_file() 1400void KServerSocket::get_file()
1399{ 1401{
1400 mSyncActionDialog->setCaption( i18n("Receiving synced file...") ); 1402 mSyncActionDialog->setCaption( i18n("Receiving synced file...") );
1401 1403
1402 piTime.start(); 1404 piTime.start();
1403 piFileString = ""; 1405 piFileString = "";
1404 QTimer::singleShot( 1, this , SLOT (readBackFileFromSocket( ) )); 1406 QTimer::singleShot( 1, this , SLOT (readBackFileFromSocket( ) ));
1405} 1407}
1406 1408
1407 1409
1408void KServerSocket::readBackFileFromSocket() 1410void KServerSocket::readBackFileFromSocket()
1409{ 1411{
1410 //qDebug("readBackFileFromSocket() %d ", piTime.elapsed ()); 1412 //qDebug("readBackFileFromSocket() %d ", piTime.elapsed ());
1411 while ( mSocket->canReadLine () ) { 1413 while ( mSocket->canReadLine () ) {
1412 piTime.restart(); 1414 piTime.restart();
1413 QString line = mSocket->readLine (); 1415 QString line = mSocket->readLine ();
1414 piFileString += line; 1416 piFileString += line;
1415 //qDebug("readline: %s ", line.latin1()); 1417 //qDebug("readline: %s ", line.latin1());
1416 mSyncActionDialog->setCaption( i18n("Received %1 bytes").arg( piFileString.length() ) ); 1418 mSyncActionDialog->setCaption( i18n("Received %1 bytes").arg( piFileString.length() ) );
1417 1419
1418 } 1420 }
1419 if ( piTime.elapsed () < 3000 ) { 1421 if ( piTime.elapsed () < 3000 ) {
1420 // wait for more 1422 // wait for more
1421 //qDebug("waitformore "); 1423 //qDebug("waitformore ");
1422 QTimer::singleShot( 100, this , SLOT (readBackFileFromSocket( ) )); 1424 QTimer::singleShot( 100, this , SLOT (readBackFileFromSocket( ) ));
1423 return; 1425 return;
1424 } 1426 }
1425 QString fileName = mFileName; 1427 QString fileName = mFileName;
1426 QFile file ( fileName ); 1428 QFile file ( fileName );
1427 if (!file.open( IO_WriteOnly ) ) { 1429 if (!file.open( IO_WriteOnly ) ) {
1428 delete mSyncActionDialog; 1430 delete mSyncActionDialog;
1429 mSyncActionDialog = 0; 1431 mSyncActionDialog = 0;
1430 qDebug("KSS:Error open read back file "); 1432 qDebug("KSS:Error open read back file ");
1431 piFileString = ""; 1433 piFileString = "";
1432 emit file_received( false ); 1434 emit file_received( false );
1433 blockRC = false; 1435 blockRC = false;
1434 return ; 1436 return ;
1435 1437
1436 } 1438 }
1437 1439
1438 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); 1440 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
1439 QTextStream ts ( &file ); 1441 QTextStream ts ( &file );
1440 ts.setEncoding( QTextStream::Latin1 ); 1442 ts.setEncoding( QTextStream::Latin1 );
1441 mSyncActionDialog->setCaption( i18n("Writing file to disk...") ); 1443 mSyncActionDialog->setCaption( i18n("Writing file to disk...") );
1442 ts << piFileString; 1444 ts << piFileString;
1443 mSocket->close(); 1445 mSocket->close();
1444 if ( mSocket->state() == QSocket::Idle ) 1446 if ( mSocket->state() == QSocket::Idle )
1445 QTimer::singleShot( 10, this , SLOT ( discardClient())); 1447 QTimer::singleShot( 10, this , SLOT ( discardClient()));
1446 file.close(); 1448 file.close();
1447 piFileString = ""; 1449 piFileString = "";
1448 emit file_received( true ); 1450 emit file_received( true );
1449 delete mSyncActionDialog; 1451 delete mSyncActionDialog;
1450 mSyncActionDialog = 0; 1452 mSyncActionDialog = 0;
1451 blockRC = false; 1453 blockRC = false;
1452 1454
1453} 1455}
1454 1456
1455KCommandSocket::KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent, QWidget * cap, const char * name ): QObject( parent, name ) 1457KCommandSocket::KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent, QWidget * cap, const char * name ): QObject( parent, name )
1456{ 1458{
1457 mPassWord = password; 1459 mPassWord = password;
1458 mSocket = 0; 1460 mSocket = 0;
1459 mFirst = false; 1461 mFirst = false;
1460 mFirstLine = true; 1462 mFirstLine = true;
1461 mPort = port; 1463 mPort = port;
1462 mHost = host; 1464 mHost = host;
1463 tlw = cap; 1465 tlw = cap;
1464 mRetVal = quiet; 1466 mRetVal = quiet;
1465 mTimerSocket = new QTimer ( this ); 1467 mTimerSocket = new QTimer ( this );
1466 connect( mTimerSocket, SIGNAL ( timeout () ), this, SLOT ( deleteSocket() ) ); 1468 connect( mTimerSocket, SIGNAL ( timeout () ), this, SLOT ( deleteSocket() ) );
1467} 1469}
1468void KCommandSocket::sendFileRequest() 1470void KCommandSocket::sendFileRequest()
1469{ 1471{
1470 if ( tlw ) 1472 if ( tlw )
1471 tlw->setCaption( i18n("Connected! Sending request for remote file ...") ); 1473 tlw->setCaption( i18n("Connected! Sending request for remote file ...") );
1472 mTimerSocket->start( 300000 ); 1474 mTimerSocket->start( 300000 );
1473 QTextStream os( mSocket ); 1475 QTextStream os( mSocket );
1474 os.setEncoding( QTextStream::Latin1 ); 1476 os.setEncoding( QTextStream::Latin1 );
1475 1477
1476 QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); 1478 QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate );
1477 os << "GET " << mPassWord << curDt <<"\r\n\r\n"; 1479 os << "GET " << mPassWord << curDt <<"\r\n\r\n";
1478} 1480}
1479 1481
1480void KCommandSocket::readFile( QString fn ) 1482void KCommandSocket::readFile( QString fn )
1481{ 1483{
1482 if ( !mSocket ) { 1484 if ( !mSocket ) {
1483 mSocket = new QSocket( this ); 1485 mSocket = new QSocket( this );
1484 connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) ); 1486 connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) );
1485 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1487 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1486 connect( mSocket, SIGNAL(connected ()), this, SLOT(sendFileRequest() )); 1488 connect( mSocket, SIGNAL(connected ()), this, SLOT(sendFileRequest() ));
1487 } 1489 }
1488 mFileString = ""; 1490 mFileString = "";
1489 mFileName = fn; 1491 mFileName = fn;
1490 mFirst = true; 1492 mFirst = true;
1491 if ( tlw ) 1493 if ( tlw )
1492 tlw->setCaption( i18n("Trying to connect to remote...") ); 1494 tlw->setCaption( i18n("Trying to connect to remote...") );
1493 mTimerSocket->start( 20000 ); 1495 mTimerSocket->start( 20000 );
1494 mSocket->connectToHost( mHost, mPort ); 1496 mSocket->connectToHost( mHost, mPort );
1495 qDebug("KSS: Waiting for connection"); 1497 qDebug("KSS: Waiting for connection");
1496} 1498}
1497 1499
1498void KCommandSocket::writeFile( QString fileName ) 1500void KCommandSocket::writeFile( QString fileName )
1499{ 1501{
1500 if ( !mSocket ) { 1502 if ( !mSocket ) {
1501 mSocket = new QSocket( this ); 1503 mSocket = new QSocket( this );
1502 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1504 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1503 connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) ); 1505 connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) );
1504 } 1506 }
1505 mFileName = fileName ; 1507 mFileName = fileName ;
1506 mTimerSocket->start( 20000 ); 1508 mTimerSocket->start( 20000 );
1507 mSocket->connectToHost( mHost, mPort ); 1509 mSocket->connectToHost( mHost, mPort );
1508} 1510}
1509void KCommandSocket::writeFileToSocket() 1511void KCommandSocket::writeFileToSocket()
1510{ 1512{
1511 mTimerSocket->stop(); 1513 mTimerSocket->stop();
1512 QFile file2( mFileName ); 1514 QFile file2( mFileName );
1513 if (!file2.open( IO_ReadOnly ) ) { 1515 if (!file2.open( IO_ReadOnly ) ) {
1514 mRetVal= errorW; 1516 mRetVal= errorW;
1515 mSocket->close(); 1517 mSocket->close();
1516 if ( mSocket->state() == QSocket::Idle ) 1518 if ( mSocket->state() == QSocket::Idle )
1517 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1519 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1518 return ; 1520 return ;
1519 } 1521 }
1520 QTextStream ts2( &file2 ); 1522 QTextStream ts2( &file2 );
1521 ts2.setEncoding( QTextStream::Latin1 ); 1523 ts2.setEncoding( QTextStream::Latin1 );
1522 QTextStream os2( mSocket ); 1524 QTextStream os2( mSocket );
1523 os2.setEncoding( QTextStream::Latin1 ); 1525 os2.setEncoding( QTextStream::Latin1 );
1524 os2 << "PUT " << mPassWord << "\r\n\r\n";; 1526 os2 << "PUT " << mPassWord << "\r\n\r\n";;
1525 while ( ! ts2.atEnd() ) { 1527 while ( ! ts2.atEnd() ) {
1526 os2 << ts2.readLine() << "\r\n"; 1528 os2 << ts2.readLine() << "\r\n";
1527 } 1529 }
1528 os2 << "\r\n"; 1530 os2 << "\r\n";
1529 mRetVal= successW; 1531 mRetVal= successW;
1530 file2.close(); 1532 file2.close();
1531 mSocket->close(); 1533 mSocket->close();
1532 if ( mSocket->state() == QSocket::Idle ) 1534 if ( mSocket->state() == QSocket::Idle )
1533 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1535 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1534} 1536}
1535void KCommandSocket::sendStop() 1537void KCommandSocket::sendStop()
1536{ 1538{
1537 if ( !mSocket ) { 1539 if ( !mSocket ) {
1538 mSocket = new QSocket( this ); 1540 mSocket = new QSocket( this );
1539 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1541 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1540 } 1542 }
1541 mSocket->connectToHost( mHost, mPort ); 1543 mSocket->connectToHost( mHost, mPort );
1542 QTextStream os2( mSocket ); 1544 QTextStream os2( mSocket );
1543 os2.setEncoding( QTextStream::Latin1 ); 1545 os2.setEncoding( QTextStream::Latin1 );
1544 os2 << "STOP\r\n\r\n"; 1546 os2 << "STOP\r\n\r\n";
1545 mSocket->close(); 1547 mSocket->close();
1546 if ( mSocket->state() == QSocket::Idle ) 1548 if ( mSocket->state() == QSocket::Idle )
1547 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1549 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1548} 1550}
1549 1551
1550void KCommandSocket::startReadFileFromSocket() 1552void KCommandSocket::startReadFileFromSocket()
1551{ 1553{
1552 if ( ! mFirst ) 1554 if ( ! mFirst )
1553 return; 1555 return;
1554 mFirst = false; 1556 mFirst = false;
1555 mTimerSocket->stop(); 1557 mTimerSocket->stop();
1556 mFileString = ""; 1558 mFileString = "";
1557 mTime.start(); 1559 mTime.start();
1558 mFirstLine = true; 1560 mFirstLine = true;
1559 QTimer::singleShot( 1, this , SLOT (readFileFromSocket( ) )); 1561 QTimer::singleShot( 1, this , SLOT (readFileFromSocket( ) ));
1560 1562
1561} 1563}
1562void KCommandSocket::readFileFromSocket() 1564void KCommandSocket::readFileFromSocket()
1563{ 1565{
1564 //qDebug("readBackFileFromSocket() %d ", mTime.elapsed ()); 1566 //qDebug("readBackFileFromSocket() %d ", mTime.elapsed ());
1565 while ( mSocket->canReadLine () ) { 1567 while ( mSocket->canReadLine () ) {
1566 mTime.restart(); 1568 mTime.restart();
1567 QString line = mSocket->readLine (); 1569 QString line = mSocket->readLine ();
1568 if ( mFirstLine ) { 1570 if ( mFirstLine ) {
1569 mFirstLine = false; 1571 mFirstLine = false;
1570 if ( line.left( 6 ) == "ERROR_" ) { 1572 if ( line.left( 6 ) == "ERROR_" ) {
1571 if ( line.left( 8 ) == "ERROR_PW" ) { 1573 if ( line.left( 8 ) == "ERROR_PW" ) {
1572 mRetVal = errorPW; 1574 mRetVal = errorPW;
1573 deleteSocket(); 1575 deleteSocket();
1574 return ; 1576 return ;
1575 } 1577 }
1576 if ( line.left( 8 ) == "ERROR_CA" ) { 1578 if ( line.left( 8 ) == "ERROR_CA" ) {
1577 mRetVal = errorCA; 1579 mRetVal = errorCA;
1578 deleteSocket(); 1580 deleteSocket();
1579 return ; 1581 return ;
1580 } 1582 }
1581 if ( line.left( 8 ) == "ERROR_FI" ) { 1583 if ( line.left( 8 ) == "ERROR_FI" ) {
1582 mRetVal = errorFI; 1584 mRetVal = errorFI;
1583 deleteSocket(); 1585 deleteSocket();
1584 return ; 1586 return ;
1585 } 1587 }
1586 if ( line.left( 8 ) == "ERROR_ED" ) { 1588 if ( line.left( 8 ) == "ERROR_ED" ) {
1587 mRetVal = errorED; 1589 mRetVal = errorED;
1588 deleteSocket(); 1590 deleteSocket();
1589 return ; 1591 return ;
1590 } 1592 }
1591 mRetVal = errorUN; 1593 mRetVal = errorUN;
1592 deleteSocket(); 1594 deleteSocket();
1593 return ; 1595 return ;
1594 } 1596 }
1595 } 1597 }
1596 mFileString += line; 1598 mFileString += line;
1597 //qDebug("readline: %s ", line.latin1()); 1599 //qDebug("readline: %s ", line.latin1());
1598 } 1600 }
1599 if ( mTime.elapsed () < 3000 ) { 1601 if ( mTime.elapsed () < 3000 ) {
1600 // wait for more 1602 // wait for more
1601 //qDebug("waitformore "); 1603 //qDebug("waitformore ");
1602 QTimer::singleShot( 100, this , SLOT (readFileFromSocket( ) )); 1604 QTimer::singleShot( 100, this , SLOT (readFileFromSocket( ) ));
1603 return; 1605 return;
1604 } 1606 }
1605 QString fileName = mFileName; 1607 QString fileName = mFileName;
1606 QFile file ( fileName ); 1608 QFile file ( fileName );
1607 if (!file.open( IO_WriteOnly ) ) { 1609 if (!file.open( IO_WriteOnly ) ) {
1608 mFileString = ""; 1610 mFileString = "";
1609 mRetVal = errorR; 1611 mRetVal = errorR;
1610 qDebug("KSS:Error open temp sync file for writing: %s",fileName.latin1() ); 1612 qDebug("KSS:Error open temp sync file for writing: %s",fileName.latin1() );
1611 deleteSocket(); 1613 deleteSocket();
1612 return ; 1614 return ;
1613 1615
1614 } 1616 }
1615 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); 1617 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
1616 QTextStream ts ( &file ); 1618 QTextStream ts ( &file );
1617 ts.setEncoding( QTextStream::Latin1 ); 1619 ts.setEncoding( QTextStream::Latin1 );
1618 ts << mFileString; 1620 ts << mFileString;
1619 file.close(); 1621 file.close();
1620 mFileString = ""; 1622 mFileString = "";
1621 mRetVal = successR; 1623 mRetVal = successR;
1622 mSocket->close(); 1624 mSocket->close();
1623 // if state is not idle, deleteSocket(); is called via 1625 // if state is not idle, deleteSocket(); is called via
1624 // connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1626 // connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1625 if ( mSocket->state() == QSocket::Idle ) 1627 if ( mSocket->state() == QSocket::Idle )
1626 deleteSocket(); 1628 deleteSocket();
1627} 1629}
1628 1630
1629void KCommandSocket::deleteSocket() 1631void KCommandSocket::deleteSocket()
1630{ 1632{
1631 //qDebug("KCommandSocket::deleteSocket() "); 1633 //qDebug("KCommandSocket::deleteSocket() ");
1632 if ( mTimerSocket->isActive () ) { 1634 if ( mTimerSocket->isActive () ) {
1633 mTimerSocket->stop(); 1635 mTimerSocket->stop();
1634 mRetVal = errorTO; 1636 mRetVal = errorTO;
1635 qDebug("KCS::Connection to remote host timed out"); 1637 qDebug("KCS::Connection to remote host timed out");
1636 if ( mSocket ) { 1638 if ( mSocket ) {
1637 mSocket->close(); 1639 mSocket->close();
1638 //if ( mSocket->state() == QSocket::Idle ) 1640 //if ( mSocket->state() == QSocket::Idle )
1639 // deleteSocket(); 1641 // deleteSocket();
1640 delete mSocket; 1642 delete mSocket;
1641 mSocket = 0; 1643 mSocket = 0;
1642 } 1644 }
1643 KMessageBox::error( 0, i18n("Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?")); 1645 KMessageBox::error( 0, i18n("Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?"));
1644 emit commandFinished( this, mRetVal ); 1646 emit commandFinished( this, mRetVal );
1645 return; 1647 return;
1646 } 1648 }
1647 //qDebug("KCommandSocket::deleteSocket() %d", mRetVal ); 1649 //qDebug("KCommandSocket::deleteSocket() %d", mRetVal );
1648 if ( mSocket) 1650 if ( mSocket)
1649 delete mSocket; 1651 delete mSocket;
1650 mSocket = 0; 1652 mSocket = 0;
1651 emit commandFinished( this, mRetVal ); 1653 emit commandFinished( this, mRetVal );
1652} 1654}