summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt6
-rw-r--r--bin/kdepim/pwmanager/germantranslation.txt353
-rw-r--r--korganizer/kolistview.cpp3
-rw-r--r--pwmanager/pwmanager/main.cpp2
-rw-r--r--pwmanager/pwmanager/pwminit.cpp5
5 files changed, 366 insertions, 3 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 23ff53c..5c36415 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,263 +1,269 @@
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 1.9.19 ************ 3********** VERSION 1.9.19 ************
4 4
5Added a lot of missing translations to KA/Pi, 5Added a lot of missing translations to KA/Pi,
6added some missing translations to KO/Pi and OM/Pi. 6added some missing translations to KO/Pi and OM/Pi.
7 7
8Fixed some minor problems in KA/Pi + KO/Pi.
9
10Fixed a crash when closing PwM/Pi.
11Added German translation for PwM/Pi.
12
13
8********** VERSION 1.9.18 ************ 14********** VERSION 1.9.18 ************
9 15
10FYI: The VERSION 1.9.17 was a testing release only. 16FYI: The VERSION 1.9.17 was a testing release only.
11Please read the changelog of VERSION 1.9.17 as well. 17Please read the changelog of VERSION 1.9.17 as well.
12 18
13Cleaned up the syncing config dialog. 19Cleaned up the syncing config dialog.
14Added sync config options for date range for events. 20Added sync config options for date range for events.
15Added sync config options for filters on incoming data. 21Added sync config options for filters on incoming data.
16Added sync config options for filters on outgoing data. 22Added sync config options for filters on outgoing data.
17Please read the updated SyncHowTo about the new filter settings. 23Please read the updated SyncHowTo about the new filter settings.
18These filter settings make it now possible to sync with shared 24These filter settings make it now possible to sync with shared
19calendars without writing back private or confidential data 25calendars without writing back private or confidential data
20(via the outgoing filters). 26(via the outgoing filters).
21To sync only with particular parts of a shared calendar, 27To sync only with particular parts of a shared calendar,
22the incoming filter settings can be used. 28the incoming filter settings can be used.
23An example can be found in the SyncHowTo. 29An example can be found in the SyncHowTo.
24Same for shared addressbooks. 30Same for shared addressbooks.
25 31
26Added a setting for the global kdepim data storage. 32Added a setting for the global kdepim data storage.
27Usually the data is stored in (yourhomedir/kdepim). 33Usually the data is stored in (yourhomedir/kdepim).
28Now you can set in the Global config dialog TAB, subTAB "Data storage path" 34Now you can set in the Global config dialog TAB, subTAB "Data storage path"
29a directory where all the kdepim data is stored. 35a directory where all the kdepim data is stored.
30That makes it easy to save all kdepim data on a SD card on the Z, for example. 36That makes it easy to save all kdepim data on a SD card on the Z, for example.
31 37
32KO/Pi: 38KO/Pi:
33The timeedit input has a pulldown list for times. 39The timeedit input has a pulldown list for times.
34If opened, this pulldown list should now has the right time highlighted. 40If opened, this pulldown list should now has the right time highlighted.
35Added the possibility to exclude events/todos/journals in a filter. 41Added the possibility to exclude events/todos/journals in a filter.
36You should exclude journals, if you do not want them to sync with a public calendar. 42You should exclude journals, if you do not want them to sync with a public calendar.
37 43
38KA/Pi: 44KA/Pi:
39Added the possibility to in/exclude public/private/confidential contacts to a filter. 45Added the possibility to in/exclude public/private/confidential contacts to a filter.
40If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... 46If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ...
41Added printing of card view and details view on desktop. 47Added printing of card view and details view on desktop.
42Printing of list view is not working... 48Printing of list view is not working...
43Added button for removing pictures in contact editor. 49Added button for removing pictures in contact editor.
44Parsing data fix of KA/Pi version 1.9.17. 50Parsing data fix of KA/Pi version 1.9.17.
45Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 51Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
46Fixed some syncing merging problems. 52Fixed some syncing merging problems.
47 53
48 54
49********** VERSION 1.9.17 ************ 55********** VERSION 1.9.17 ************
50 56
51KO/Pi: 57KO/Pi:
52Fixed that tooltips were not updated after moving an item in agenda view. 58Fixed that tooltips were not updated after moving an item in agenda view.
53Fixed a bug in sorting start date for recurring events in list view. 59Fixed a bug in sorting start date for recurring events in list view.
54Changed the left button in todo viewer from "Agenda" to "Set completed". 60Changed the left button in todo viewer from "Agenda" to "Set completed".
55This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. 61This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View.
56Added more info in the todo viewer: Startdate, parent/sub todos. 62Added more info in the todo viewer: Startdate, parent/sub todos.
57 63
58 64
59KA/Pi: 65KA/Pi:
60All fields search does now actually search all the (possible) fields, 66All fields search does now actually search all the (possible) fields,
61not only those listed in the contact list. 67not only those listed in the contact list.
62Made is possible to inline a picture in a vcard on the Z. 68Made is possible to inline a picture in a vcard on the Z.
63This was only possible on the desktop, now is it possible on the Z as well. 69This was only possible on the desktop, now is it possible on the Z as well.
64Fixed of missing save settings after filter configuration. 70Fixed of missing save settings after filter configuration.
65Made saving of addressbook much faster. 71Made saving of addressbook much faster.
66Fixed extension widget layout problem. 72Fixed extension widget layout problem.
67Fixed saving of default formatted name settings. 73Fixed saving of default formatted name settings.
68Fixed formatted name handling in edit dialog. 74Fixed formatted name handling in edit dialog.
69Added an option for changing formatted names of many contacts 75Added an option for changing formatted names of many contacts
70(menu: File - Change - Set formatted name). 76(menu: File - Change - Set formatted name).
71 77
72QWhatsThis was not working on the Z ( only black rectangle was shown). 78QWhatsThis was not working on the Z ( only black rectangle was shown).
73This is Fixed. 79This is Fixed.
74 80
75KDE-Sync: 81KDE-Sync:
76Now readonly KDE resources are synced as well. 82Now readonly KDE resources are synced as well.
77(They are not changed in KDE itself, of course). 83(They are not changed in KDE itself, of course).
78 84
79 85
80 86
81********** VERSION 1.9.16 ************ 87********** VERSION 1.9.16 ************
82 88
83KO/Pi: 89KO/Pi:
84Fixed search dialog size on Z 6000 (480x640 display). 90Fixed search dialog size on Z 6000 (480x640 display).
85Added setting to hide/show time in agenda items. 91Added setting to hide/show time in agenda items.
86Added setting to hide not running todos in todo view. 92Added setting to hide not running todos in todo view.
87Added columns for start date/time in todo view. 93Added columns for start date/time in todo view.
88Replaced the solid half-hour lines in agenda view by dot lines. 94Replaced the solid half-hour lines in agenda view by dot lines.
89Added possibility of printing the What's Next View on the desktop 95Added possibility of printing the What's Next View on the desktop
90(i.e. Windows and Linux). 96(i.e. Windows and Linux).
91Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 97Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
92Added tooltips in month view.(Tooltips only available on desktop) 98Added tooltips in month view.(Tooltips only available on desktop)
93 99
94Fixed a strange problem in KO/Pi alarm applet. 100Fixed a strange problem in KO/Pi alarm applet.
95Did not find the actual problem, 101Did not find the actual problem,
96such that now Qtopia reboots again if deinstalling the alarm applet. 102such that now Qtopia reboots again if deinstalling the alarm applet.
97But the alarm applet should work again. 103But the alarm applet should work again.
98 104
99KA/Pi: 105KA/Pi:
100Fixed the problem, that internal pictures were not saved. 106Fixed the problem, that internal pictures were not saved.
101 107
102Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 108Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
103 109
104Fixed some minor problems. (Like word wrap in help text windows). 110Fixed some minor problems. (Like word wrap in help text windows).
105 111
106Fixed a compiling problem in microkde/kresources. 112Fixed a compiling problem in microkde/kresources.
107 113
108KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 114KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
109This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 115This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
110such that now syncing KO/Pi with Sharp DTM should work on the 116such that now syncing KO/Pi with Sharp DTM should work on the
111Zaurus C 3000 model. 117Zaurus C 3000 model.
112 118
113********** VERSION 1.9.15 ************ 119********** VERSION 1.9.15 ************
114 120
115Usebilty enhancements in KO/Pi: 121Usebilty enhancements in KO/Pi:
116When clicking on the date in a month view cell, the day view is shown. 122When clicking on the date in a month view cell, the day view is shown.
117Old behaviour was, that the "new event" dialog popped up. 123Old behaviour was, that the "new event" dialog popped up.
118 124
119Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 125Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
120That means, you can restore the latest 126That means, you can restore the latest
121event/todo/journal you have deleted. 127event/todo/journal you have deleted.
122A journal is deleted, if you clear all the text of the journal. 128A journal is deleted, if you clear all the text of the journal.
123 129
124Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 130Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
125 131
126KA/Pi starting in 480x640 resolution: 132KA/Pi starting in 480x640 resolution:
127Hide the filter action in toolbar 133Hide the filter action in toolbar
128and added icons for undo/delete/redo in toolbar. 134and added icons for undo/delete/redo in toolbar.
129 135
130Change in OM/Pi ViewMail dialog: 136Change in OM/Pi ViewMail dialog:
131When clicking on the "delete" icon the mail is deleted after confirmation as usual. 137When clicking on the "delete" icon the mail is deleted after confirmation as usual.
132But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 138But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
133 139
134Fixed a crash when deleting mail-accounts in OM/Pi. 140Fixed a crash when deleting mail-accounts in OM/Pi.
135 141
136 142
137********** VERSION 1.9.14 ************ 143********** VERSION 1.9.14 ************
138 144
139Fixed some problems with the dialog sizes when switching 145Fixed some problems with the dialog sizes when switching
140portrait/landscape mode on 640x480 PDA display. 146portrait/landscape mode on 640x480 PDA display.
141 147
142Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 148Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
143 149
144Fixed an ugly bug in KOpieMail: 150Fixed an ugly bug in KOpieMail:
145KOpieMail was not able to write files (mails) to MSDOS file system, 151KOpieMail was not able to write files (mails) to MSDOS file system,
146like on an usual preformatted SD card. That should work now. 152like on an usual preformatted SD card. That should work now.
147To save your mail data on the Sd card do the following: 153To save your mail data on the Sd card do the following:
148Create a dir on the SD card: 154Create a dir on the SD card:
149mkdir /mnt/card/localmail 155mkdir /mnt/card/localmail
150Go to your home dir: 156Go to your home dir:
151cd 157cd
152Go to kopiemail data storage dir: 158Go to kopiemail data storage dir:
153cd kdepim/apps/kopiemail 159cd kdepim/apps/kopiemail
154Create a symlink to the SD card: 160Create a symlink to the SD card:
155ls -s /mnt/card/localmail 161ls -s /mnt/card/localmail
156Now KOpieMail will store all mails on the SD card. 162Now KOpieMail will store all mails on the SD card.
157 163
158KO/Pi Monthview: 164KO/Pi Monthview:
159Now "Go to Today" selects the current month from day 1-end, 165Now "Go to Today" selects the current month from day 1-end,
160not the current date + some days. 166not the current date + some days.
161I.e. "Go to Today" shows now always 167I.e. "Go to Today" shows now always
162the current month with first day of month in the first row. 168the current month with first day of month in the first row.
163 169
164Added missing German translation. 170Added missing German translation.
165 171
166Fixed icons of executeable on Wintendo. 172Fixed icons of executeable on Wintendo.
167 173
168Added a "Show next Mail" button to the OM/Pi 174Added a "Show next Mail" button to the OM/Pi
169mail viewer such that the mail below the current mail 175mail viewer such that the mail below the current mail
170in the mail list view of the current folder 176in the mail list view of the current folder
171can be read with a single click. 177can be read with a single click.
172 178
173 179
174********** VERSION 1.9.13 ************ 180********** VERSION 1.9.13 ************
175 181
176Fixed nasty PwM/Pi file reading bug, when 182Fixed nasty PwM/Pi file reading bug, when
177the used hash algo of file is different then the global 183the used hash algo of file is different then the global
178hash algo. 184hash algo.
179 185
180Added KA/Pi support for opie mailit mailapplication. 186Added KA/Pi support for opie mailit mailapplication.
181 187
182Fixed some bugs in OM/Pi. 188Fixed some bugs in OM/Pi.
183Now character conversion tables are available for the Zaurus 189Now character conversion tables are available for the Zaurus
184to make OM/Pi working properly. 190to make OM/Pi working properly.
185To get the character conversion in OM/Pi working, please download 191To get the character conversion in OM/Pi working, please download
186at the sourceforge project site the package 192at the sourceforge project site the package
187sr-character-conversion_SharpROM_arm.ipk.zip 193sr-character-conversion_SharpROM_arm.ipk.zip
188(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) 194(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
189from the section "general files for KDE/Pim" 195from the section "general files for KDE/Pim"
190Instructions how to install this package are in a ReadMe in this file. 196Instructions how to install this package are in a ReadMe in this file.
191 197
192 198
193Fixed the orientation change problem in KA/Pi when switching 199Fixed the orientation change problem in KA/Pi when switching
194portrait/landscape mode. 200portrait/landscape mode.
195 201
196French translation available for KA/Pi and OM/Pi. 202French translation available for KA/Pi and OM/Pi.
197 203
198Fixed some problems with categories in KO/Pi in DTM sync. 204Fixed some problems with categories in KO/Pi in DTM sync.
199 205
200Added selection dialog for export to phone in KA/Pi. 206Added selection dialog for export to phone in KA/Pi.
201 207
202If in KO/Pi is an attendee selected to add to a meeting and this 208If in KO/Pi is an attendee selected to add to a meeting and this
203attendee is already in the list of attendees, this person is not added 209attendee is already in the list of attendees, this person is not added
204again. 210again.
205 211
206Some menu cleanup in KA/Pi. 212Some menu cleanup in KA/Pi.
207 213
208********** VERSION 1.9.12 ************ 214********** VERSION 1.9.12 ************
209 215
210Fix for the bug in KO/Pi What's Next view of version 1.9.11. 216Fix for the bug in KO/Pi What's Next view of version 1.9.11.
211 217
212Bugfix: Licence file is now shown again. 218Bugfix: Licence file is now shown again.
213 219
214OM/Pi now supports Unicode (utf8 charset). 220OM/Pi now supports Unicode (utf8 charset).
215Fixed some bugs in OM/Pi. 221Fixed some bugs in OM/Pi.
216 222
217KA/Pi has more German translation. 223KA/Pi has more German translation.
218 224
219 225
220********** VERSION 1.9.11 ************ 226********** VERSION 1.9.11 ************
221 227
222Fixed several problems in PWM/Pi, like 228Fixed several problems in PWM/Pi, like
223asking the user, if unsaved changed are pending 229asking the user, if unsaved changed are pending
224when closing the app. 230when closing the app.
225And PwM/Pi handles now different texts for the 231And PwM/Pi handles now different texts for the
226fields Description, Username, Password, configurable per category. 232fields Description, Username, Password, configurable per category.
227 233
228Fixed a crash in KO/Pi , when importing/loading vcs files 234Fixed a crash in KO/Pi , when importing/loading vcs files
229which have an entry with an attendee with state: 235which have an entry with an attendee with state:
230NEEDS ACTION 236NEEDS ACTION
231 237
232Fixed some problems in the German translation of OM/Pi, 238Fixed some problems in the German translation of OM/Pi,
233which makes some dialogs not fitting on the screen 239which makes some dialogs not fitting on the screen
234of the Z 5500. 240of the Z 5500.
235 241
236Fixed Qtopia crash, when disabling/deinstalling 242Fixed Qtopia crash, when disabling/deinstalling
237KO/Pi alarm applet. 243KO/Pi alarm applet.
238 244
239Implemented direct KDE<->KA/Pi sync for KA/Pi running 245Implemented direct KDE<->KA/Pi sync for KA/Pi running
240on Linux desktop. 246on Linux desktop.
241 247
242Added feature "remove sync info" to sync menu. 248Added feature "remove sync info" to sync menu.
243 249
244Tweaked the KO/Pi What's next view a bit, added 250Tweaked the KO/Pi What's next view a bit, added
245setting to hide events that are done. 251setting to hide events that are done.
246 252
247Disabled "beam receive enabled" on startup to 253Disabled "beam receive enabled" on startup to
248avoid problems if Fastload is enabled. 254avoid problems if Fastload is enabled.
249Please set "beam receive enabled", 255Please set "beam receive enabled",
250if you want to receive data via IR. 256if you want to receive data via IR.
251 257
252Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running 258Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running
253on Linux desktop. 259on Linux desktop.
254 260
255Made in KA/Pi scrolling possible, if details view is selected. 261Made in KA/Pi scrolling possible, if details view is selected.
256(The keyboard focus is set automatically to the search line) 262(The keyboard focus is set automatically to the search line)
257 263
258Fixed a bug in DMT sync, that a new entry in DTM was added 264Fixed a bug in DMT sync, that a new entry in DTM was added
259on every sync to Kx/Pi. 265on every sync to Kx/Pi.
260 266
261Fixed missing writing of KA/Pi categories to DMT entries when syncing. 267Fixed missing writing of KA/Pi categories to DMT entries when syncing.
262 268
263Fixed a bug in DMT sync with todos created in KO/Pi containing 269Fixed a bug in DMT sync with todos created in KO/Pi containing
diff --git a/bin/kdepim/pwmanager/germantranslation.txt b/bin/kdepim/pwmanager/germantranslation.txt
new file mode 100644
index 0000000..5941c2a
--- a/dev/null
+++ b/bin/kdepim/pwmanager/germantranslation.txt
@@ -0,0 +1,353 @@
1{ " Local Time","Ortszeit" },
2{ "Default","Voreinstellungen" },
3{ "Configure...","Konfigurieren..." },
4{ "Remove sync info","Entferne Sync Info" },
5{ "For all profiles","Für alle Profile" },
6{ "Enable Pi-Sync","Aktiviere Pi-Sync" },
7{ "Multiple sync","Multi Sync" },
8{ "&Save","&Speichern" },
9{ "&Print...","Drucken..." },
10{ "&File","Datei" },
11{ "&Edit","Bearbeite" },
12{ "&View","Ansichten" },
13{ "&Help","Hilfe" },
14{ "Description","Beschreibungen" },
15{ "URL","URL" },
16{ "Name:","Name:" },
17{ "Documents","Dokumente" },
18{ "Files","Dateien" },
19{ "All Files","Alle Dateien" },
20{ "Name","Name" },
21{ "Size","Größe" },
22{ "Date","Datum" },
23{ "Mime Type","Mime Typ" },
24{ "Ok","Ok" },
25{ "Cancel","Abbrechen" },
26{ "1","1" },
27{ "Synchronization Preferences","Einstellungen der Synchronisationsprofile" },
28{ "Local device name:","Name dieses Gerätes:" },
29{ "New profile","Neues Profil" },
30{ "Clone profile","Klone Profil" },
31{ "Delete profile","Lösche Profil" },
32{ "Profile:","Profil:" },
33{ "Multiple Sync options","Multi Sync Optionen" },
34{ "Include in multiple ","Beziehe in mehrfach " },
35{ "calendar ","Kalender " },
36{ "addressbook ","Adressbuch " },
37{ "pwmanager","PWmanager" },
38{ " sync"," Sync ein" },
39{ "Sync algo options","Sync Ablauf Optionen" },
40{ "Ask for preferences before sync","Frage nach Synchronisationseinstellungen vor dem Syncen" },
41{ "Sync preferences","Synchronisations Einstellungen" },
42{ "Take local entry on conflict","Nimm lokalen Eintrag beim Konflikt" },
43{ "Take remote entry on conflict","Nimm fernen Eintrag beim Konflikt" },
44{ "Take newest entry on conflict","Nimm neuesten Eintrag beim Konflikt" },
45{ "Ask for every entry on conflict","Frage bei Konflikten nach" },
46{ "Force: Take local entry always","Erzwinge: Nimm immer lokalen Eintrag" },
47{ "Force: Take remote entry always","Erzwinge: Nimm immer fernen Eintrag" },
48{ "Show summary after sync","Zeige Zusammenfassung nach dem Synchronisieren" },
49{ "Apply filter when adding data to local:","Filter für das Hinzufügen von Daten zu Lokal:" },
50{ "Incoming calendar filter:","Eingehender Kalender Filter:" },
51{ "Incoming addressbook filter:","Eingehender Adressbuch Filter:" },
52{ "Write back synced data","Schreibe gesyncte Daten zurück" },
53{ "Write back options","Optionen zum Zurückschreiben" },
54{ "Write back (on remote) existing entries only","Schreibe nur existierende (auf Entfernt) Einträge zurück" },
55{ "Apply filter when adding data to remote:","Filter für das Hinzufügen von Daten zu Entfernt:" },
56{ "Outgoing calendar filter:","Ausgehender Kalender Filter:" },
57{ "Outgoing addressbook filter:","Ausgehender Adressbuch Filter:" },
58{ "Write back (calendar) entries for time period only","Schreibe nur Kalender Einträge für Zeitspanne zurück" },
59{ "Time period","Zeitspanne" },
60{ "From ","Von " },
61{ " weeks in the past to "," Wochen in der Vergangenheit bis zu " },
62{ " weeks in the future "," Wochen in der Zukunft " },
63{ "Profile kind","Profil Art" },
64{ "Local file","Lokale Datei" },
65{ "Pi-Sync ( direct Kx/Pi to Kx/Pi sync )","Pi-Sync ( direktes Kx/Pi zu Kx/Pi sync )" },
66{ "Remote file (w down/upload command)","Entfernte Datei (via down/upload Kommando)" },
67{ "Mobile device (cell phone)","Mobiles Gerät (Handy)" },
68{ "Profile kind specific settings","Profil Art abhängige Einstellungen" },
69{ "I/O device: ","I/O device: " },
70{ "Help...","Hilfe..." },
71{ "Connection: ","Connection: " },
72{ "Model(opt.): ","Model(opt.): " },
73{ "Local file Cal:","Lokale Datei Kal:" },
74{ "Local file ABook:","Lokale Datei ABuch:" },
75{ "Local file PWMgr:","Lokale Datei PWMgr:" },
76{ "Choose...","Wähle..." },
77{ "Addressbook file (*.vcf) is used by KA/Pi","Adressbuch Datei (*.vcf) wird von KA/Pi genutzt" },
78{ "Calendar:","Kalender:" },
79{ "AddressBook:","AdressBuch:" },
80{ "PWManager:","PWManager:" },
81{ "Pre sync (download) command:","Bevor Sync (download) Kommando:" },
82{ "Local temp file:","Lokale temp Datei:" },
83{ "Post sync (upload) command:","Nach Sync (upload) Kommando:" },
84{ "Addressbook file is used by KA/Pi","Adressbuch Datei wird von KA/Pi genutzt" },
85{ "Fill in default values for:","Setze Beispiel Werte ein für:" },
86{ "ssh/scp","ssh/scp" },
87{ "ftp","ftp" },
88{ "Hint: Use $PWD$ for placeholder of password!","Hinweis: Benutze $PWD$ als Platzhalter für ein Passwort!" },
89{ "Password for remote access: (could be the same for each)","Passwort für entfernten Zugriff: (kann dasselbe sein für alle)" },
90{ "Remote IP address: (could be the same for each)","Entfernte IP Adresse: (kann dasselbe sein für alle)" },
91{ "Remote port number: (should be different for each)","Entfernte Port Nummer: (Sollte für alle unterschiedlich sein)" },
92{ "command for downloading remote file to local device","Kommando zum Download der entfernten Datei zum lokalen Gerät" },
93{ "command for uploading local temp file to remote device","Kommando zum Upload der lokalen temp. Datei zum entfernten Gerät" },
94{ "No Filter","Kein Filter" },
95{ "KO/Pi config error","KO/Pi Konfig. Fehler" },
96{ "Local device name undefined!\nPlease define device name!","Name dieses Gerätes undefiniert!\nBitte Namen angeben!" },
97{ "Multiple profiles with same name!\nPlease use unique profile names!","Mehrere Profile mit demselben Namen!\nBitte verschiedene Namen benutzen!" },
98{ "Configure","Konfiguriere" },
99{ "Apply","Anwenden" },
100{ "None","Kein" },
101{ "Global","Allgemein" },
102{ "Email","E-Mail" },
103{ "Phone","Telefon" },
104{ "SMS","SMS" },
105{ "Fax","Fax" },
106{ "Pager","Pager" },
107{ "SIP","SIP" },
108{ "Language:(needs restart)","Sprache:(Neustart)" },
109{ "English","English" },
110{ "German","Deutsch" },
111{ "French","Französisch" },
112{ "Italian","Italienisch" },
113{ "User defined (usertranslation.txt)","Benutzerdef. (usertranslation.txt)" },
114{ "Language","Sprache" },
115{ "Time Format(nr):","Zeit Format(nr):" },
116{ "24:00","24:00" },
117{ "12:00am","12:00am" },
118{ "Week starts on Sunday","Woche beginnt Sonntags" },
119{ "Time Format","Zeit Format" },
120{ "Date Format:","Datums Format:" },
121{ "24.03.2004 (%d.%m.%Y|%A %d %B %Y)","24.03.2004 (%d.%m.%Y|%A %d %B %Y)" },
122{ "03.24.2004 (%m.%d.%Y|%A %B %d %Y)","03.24.2004 (%m.%d.%Y|%A %B %d %Y)" },
123{ "2004-03-24 (%Y-%m-%d|%A %Y %B %d)","2004-03-24 (%Y-%m-%d|%A %Y %B %d)" },
124{ "User defined","Benutzerdefiniert" },
125{ "User long date:","Format langes Datum:" },
126{ "User short date:","Format kurzes Datum:" },
127{ "Monday 19 April 2004: %A %d %B %Y","Monday 19 April 2004: %A %d %B %Y" },
128{ "Mon 19.04.04: %a %d.%m.%y","Mon 19.04.04: %a %d.%m.%y" },
129{ "Mon, 19.Apr.04: %a, %d.%b.%y","Mon, 19.Apr.04: %a, %d.%b.%y" },
130{ "Date Format","Datums Format" },
131{ "Timezone:","Zeitzone:" },
132{ "Add 30 min to selected Timezone","Addiere 30 min zur Zeitzone" },
133{ "Timezone has daylight saving","Zeitzone hat Sommerzeit" },
134{ "Actual start and end is the\nsunday before this date.","Tatsächlicher Beginn/Ende ist der\nSonntag vor diesem Datum!" },
135{ "The year in the date is ignored.","Das Jahr vom Datum wird ignoriert." },
136{ "Daylight start:","Sommerzeit Beginn:" },
137{ "Mon","Mo" },
138{ "Tue","Di" },
139{ "Wed","Mi" },
140{ "Thu","Do" },
141{ "Fri","Fr" },
142{ "Sat","Sa" },
143{ "Sun","So" },
144{ "January","Januar" },
145{ "February","Februar" },
146{ "March","März" },
147{ "April","April" },
148{ "May","Mai" },
149{ "June","Juni" },
150{ "July","July" },
151{ "August","August" },
152{ "September","September" },
153{ "October","October" },
154{ "November","November" },
155{ "December","Dezember" },
156{ "tomorrow","Morgen" },
157{ "today","Heute" },
158{ "yesterday","Gestern" },
159{ "Monday","Montag" },
160{ "Tuesday","Dienstag" },
161{ "Wednesday","Mittwoch" },
162{ "Thursday","Donnerstag" },
163{ "Friday","Freitag" },
164{ "Saturday","Samstag" },
165{ "Sunday","Sonntag" },
166{ "Daylight end:","Sommerzeit Ende:" },
167{ "Time Zone","Zeit Zone" },
168{ "Used Mail Client","Benutzter Mail Client" },
169{ "Channel:","Channel:" },
170{ "Message:","Message:" },
171{ "Parameters:","Parameter:" },
172{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
173{ "extra Message:","extra Message:" },
174{ "extra Parameters:","extra Parameter:" },
175{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
176{ "External Apps.","Externe Appl." },
177{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Ihr gerade genutztes Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverzeichnis)/apps/kopiemail/localmail" },
178{ "<b>Set new data storage dir:</b>","<b>Setze neues Datenspeicherverzeichnis:</b>" },
179{ "Not existing dirs are created automatically","Nicht existierende Verzeichnisse werden erstellt" },
180{ "Save settings","Speichere Einstellungen" },
181{ "Save standard","Speichere Standard" },
182{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
183{ "The settings of the storage\ndir is saved in the file\n%1","Die Einstellungen des Speicherverzeichnisses\nwerden in folgender Datei gespeichert:\n%1" },
184{ "Data storage path","Daten Speicherpfad" },
185{ "Used %1 Client","Benutzer %1 Client" },
186{ "No email client installed","Keine Email Client installiert" },
187{ "Userdefined email client","Benutzerdef. Email Client" },
188{ "OM/Pi email client","OM/Pi Email Client" },
189{ "URL:","URL:" },
190{ "No","Nein" },
191{ "Yes","Ja" },
192{ "Untitled","Unbenannt" },
193{ "&New","&Neu" },
194{ "&Open","&Öffne" },
195{ "&Close","Schließen" },
196{ "Save &as...","Speichere &als..." },
197{ "&Text-file...","&Text-Datei..." },
198{ "&Gpasman / Kpasman ...","&Gpasman / Kpasman ..." },
199{ "&CSV (Comma Separated Value) ...","&CSV (Komma getrennte Werte) ..." },
200{ "E&xport","E&xport" },
201{ "I&mport","I&mport" },
202{ "&Quit","Beenden" },
203{ "&Add password","&Passwort hinzufügen" },
204{ "&Delete","Lösche" },
205{ "Change &Master Password","Ändere &Master Passwort" },
206{ "&Manage","Verwalte" },
207{ "&Find","&Finde" },
208{ "&Lock all entries","Sperre alle Einträge" },
209{ "&Deep-lock all entries","Sperre total alle Einträge" },
210{ "&Unlock all entries","Entsperre alle Einträge" },
211{ "&Configure...","Konfiguriere..." },
212{ "&Options","&Optionen" },
213{ "C&ategories...","K&ategorien..." },
214{ "&Sync","&Sync" },
215{ "&License","&Lizenz" },
216{ "&Faq","&Faq" },
217{ "&About PwManager","Über PwManager" },
218{ "&Sync HowTo","&Sync HowTo" },
219{ "&What's New","Was ist neu?" },
220{ "New","Neu" },
221{ "Open","Öffnen" },
222{ "Save","Speichern" },
223{ "Save as","Speichern als" },
224{ "Print...","Drucke..." },
225{ "Add password","Passwort hinzufügen" },
226{ "Edit password","Passwort ändern" },
227{ "Delete password","Passwort löschen" },
228{ "Find entry","Finde Eintrag" },
229{ "Lock all entries","Sperre alle Einträge" },
230{ "Deep-Lock all entries","Sperre total alle Einträge" },
231{ "Unlock all entries","Entsperre alle Einträge" },
232{ "Categories:","Kategorien:" },
233{ "&Rename","&Umbenennen" },
234{ "Username","Benutzername" },
235{ "Password","Passwort" },
236{ "Launcher","Launcher" },
237{ "copy password to clipboard","Kopiere Passwort ins Clipboard" },
238{ "copy username to clipboard","Kopiere Benutzername ins Clipboard" },
239{ "copy description to clipboard","Kopiere Beschreibung ins Clipboard" },
240{ "copy url to clipboard","Kopiere URL ins Clipboard" },
241{ "copy launcher to clipboard","Kopiere Launcher ins Clipboard" },
242{ "copy comment to clipboard","Kopiere Kommentare ins Clipboard" },
243{ "Execute "Launcher"",""Launcher" ausführen" },
244{ "Go to "URL"","Gehe zu "URL"" },
245{ "Ready.","Fertig." },
246{ "password filename(*.pwm)","passwort dateiname(*.pwm)" },
247{ "File error","Datei Fehler" },
248{ "Could not read file!","Kann Datei nicht lesen!" },
249{ "Master-password","Master-Passwort" },
250{ "Please enter the master-password:","Bitter Master-Passwort eingeben:" },
251{ "Wrong master-password!\nPlease try again.","Falsches Master-Passwort!\nBitte erneut versuchen." },
252{ "password error","Passwort Fehler" },
253{ "Successfully opened file.","Datei erfolgreich geöffnet." },
254{ "DEEP-LOCKED","DEEP-LOCKED" },
255{ "This file is DEEP-LOCKED!\nThat means all data has been encrypted\nand written out to the file. If you want\nto see the entries, please UNLOCK the file.\nWhile unlocking, you will be prompted for the\nmaster-password or the key-card.","This file is DEEP-LOCKED!\nThat means all data has been encrypted\nand written out to the file. If you want\nto see the entries, please UNLOCK the file.\nWhile unlocking, you will be prompted for the\nmaster-password or the key-card." },
256{ "<LOCKED>","<GESPERRT>" },
257{ "To unlock click the icon on the left.","Zum Entsperren klicke auf das linke Icon." },
258{ "PwManager","PwManager" },
259{ "Window-style:","Window-style:" },
260{ "Category on top","Kategorien oben" },
261{ "Category-list left/top","Kategorien links oben" },
262{ "<b>Font for Password entries:</b>","<b>Schrift für Passwort Einträge:</b>" },
263{ "Font:","Schriftart:" },
264{ "Compression:","Kompression:" },
265{ "gzip","gzip" },
266{ "Encryption:","Verschlüsselung:" },
267{ "Blowfish (128 bit)","Blowfish (128 bit)" },
268{ "AES-128, Rijndael (128 bit)","AES-128, Rijndael (128 bit)" },
269{ "AES-192, Rijndael (192 bit)","AES-192, Rijndael (192 bit)" },
270{ "AES-256, Rijndael (256 bit)","AES-256, Rijndael (256 bit)" },
271{ "Triple-DES (168 bit)","Triple-DES (168 bit)" },
272{ "Twofish (256 bit)","Twofish (256 bit)" },
273{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" },
274{ "Hashing:","Hashing:" },
275{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" },
276{ "SHA-256 (256 bit)","SHA-256 (256 bit)" },
277{ "SHA-384 (384 bit)","SHA-384 (384 bit)" },
278{ "SHA-512 (512 bit)","SHA-512 (512 bit)" },
279{ "MD5 (128 bit)","MD5 (128 bit)" },
280{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" },
281{ "Tiger (192 bit)","Tiger (192 bit)" },
282{ "Permissions:","Zugriffsrechte:" },
283{ "Make backup before saving","Mache Backup vor dem Speichern" },
284{ "Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:","Passwort Timeout\n(Timeout um das Passwort\nim Speicher zu halten,\nso dass es nicht noch mal\neingegeben werden muß.)\n[Setze auf 0 zum deaktivieren]:" },
285{ "Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:","(Total-)Sperr-Timeout\n(Sperre Dokument total nach\ndieser Anzahl Sekunden)\n[Setze auf 0 zum deaktivieren]:" },
286{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" },
287{ "open deeplocked","Öffne total gesperrt" },
288{ "Favourite browser:","Bevorzugter Browser:" },
289{ "Favourite x-terminal:","Bevorzugtes x-terminal:" },
290{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" },
291{ "Look && feel","Aussehen" },
292{ "File","Datei" },
293{ "Timeout","Timeout" },
294{ "Autostart","Autostart" },
295{ "External apps","Externe Applik." },
296{ "Miscellaneous","Verschiedenes" },
297{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
298{ "edit category descriptions","Ändrere Kategoriebeschreibungen" },
299{ "Close","Schließen" },
300{ "Category:","Category:" },
301{ "Text1 (Description):","Text1 (Beschreibung):" },
302{ "Text2 (Username):","Text2 (Benutzername):" },
303{ "Text3 (Password):","Text3 (Passwort):" },
304{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" },
305{ "Description:","Beschreibung:" },
306{ "Username:","Benutzername:" },
307{ "Password:","Passwort:" },
308{ "&Reveal","&Offen zeigen" },
309{ "&Generate","&Generiere" },
310{ "&Password","&Passwort" },
311{ "&Comments","Kommentare" },
312{ "Launcher:","Launcher:" },
313{ "$d = Description","$d = Beschreibung" },
314{ "$n = Username","$n = Benutzername" },
315{ "$c = Comment","$c = Kommentar" },
316{ "$u = URL","$u = URL" },
317{ "$p = Password","$p = Passwort" },
318{ "&Launcher","&Launcher" },
319{ "Password generator","Passwort Generator" },
320{ "Character set:","Buchstaben Set:" },
321{ "Lowercase (abc)","Klein (abc)" },
322{ "Uppercase (ABC)","Groß (ABC)" },
323{ "Numbers (123)","Nummmern (123)" },
324{ "Special characters:","Spezielle Buchstaben:" },
325{ "Spaces (blank characters)","Leerzeichen" },
326{ "User defined:","Benutzer definiert:" },
327{ "Password Length:","Passwort Länge:" },
328{ "Enable Filtering to get better passwords","Enable Filtering to get better passwords" },
329{ "no password","Kein Passwort" },
330{ "Sorry, you haven't set a password.","Sorry, Sie haben kein Passwort angegeben." },
331{ "not saved, yet","not saved, yet" },
332{ "Can't deep-lock, because the document\nhasn't been saved, yet. Please save\nto a file and try again.","Kann nicht tiefsperren, weil das\nDokument noch nicht gespeichert wurde.\nBitte speichern und noch einmal versuchen." },
333{ "Find","Finde" },
334{ "&Exact match","Genaue Übereinstimmung" },
335{ "&Case sensitive","Großschrift abhängig" },
336{ "Search in Column","Suche in Spalten" },
337{ "&Description","Beschreibung" },
338{ "C&omment","Kommentar" },
339{ "&Username","Benutzername" },
340{ "U&RL","URL" },
341{ "delete?","Löschen?" },
342{ "Do you really want to delete\nthe selected entry","Wollen Sie wirklich\nden Eintrag löschen:" },
343{ "Save?","Speichern?" },
344{ ""\nhas been modified.\nDo you want to save it?",""\nwurde geändert.\nMöchten Sie speichern?" },
345{ "The list\n "","Die Liste\n "" },
346{ "nothing to do","Nichts zu tun" },
347{ "Sorry, there's nothing to save.\nPlease first add some passwords.","Sorry, es gibt nichts zu speichern.\nBitte erst Passwörter hinzufügen." },
348{ "","" },
349{ "","" },
350{ "","" },
351{ "","" },
352{ "","" },
353
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index f8bfc8b..b21b419 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -1,481 +1,482 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 1999 Preston Brown 3 Copyright (c) 1999 Preston Brown
4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or 8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24 24
25#include <qlistview.h> 25#include <qlistview.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qpopupmenu.h> 28#include <qpopupmenu.h>
29#include <qprogressbar.h> 29#include <qprogressbar.h>
30#include <qfileinfo.h> 30#include <qfileinfo.h>
31#include <qmessagebox.h> 31#include <qmessagebox.h>
32#include <qdialog.h> 32#include <qdialog.h>
33#include <qtextstream.h> 33#include <qtextstream.h>
34#include <qdir.h> 34#include <qdir.h>
35#include <qregexp.h> 35#include <qregexp.h>
36 36
37#include <klocale.h> 37#include <klocale.h>
38#include <kdebug.h> 38#include <kdebug.h>
39#include <kiconloader.h> 39#include <kiconloader.h>
40#include <kglobal.h> 40#include <kglobal.h>
41 41
42#include <libkdepim/kpimglobalprefs.h> 42#include <libkdepim/kpimglobalprefs.h>
43#include <libkcal/calendar.h> 43#include <libkcal/calendar.h>
44#include <libkcal/calendarlocal.h> 44#include <libkcal/calendarlocal.h>
45#include <libkcal/icalformat.h> 45#include <libkcal/icalformat.h>
46#include <libkcal/vcalformat.h> 46#include <libkcal/vcalformat.h>
47#include <libkcal/recurrence.h> 47#include <libkcal/recurrence.h>
48#include <libkcal/filestorage.h> 48#include <libkcal/filestorage.h>
49#include <libkdepim/categoryselectdialog.h> 49#include <libkdepim/categoryselectdialog.h>
50#ifndef DESKTOP_VERSION 50#ifndef DESKTOP_VERSION
51#include <qpe/qpeapplication.h> 51#include <qpe/qpeapplication.h>
52#else 52#else
53#include <qapplication.h> 53#include <qapplication.h>
54#endif 54#endif
55 55
56#ifndef KORG_NOPRINTER 56#ifndef KORG_NOPRINTER
57#include "calprinter.h" 57#include "calprinter.h"
58#endif 58#endif
59#include "koglobals.h" 59#include "koglobals.h"
60#include "koprefs.h" 60#include "koprefs.h"
61#include "kfiledialog.h" 61#include "kfiledialog.h"
62 62
63#include "kolistview.h" 63#include "kolistview.h"
64 64
65ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) 65ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date )
66{ 66{
67 mItem = item; 67 mItem = item;
68 mDate = date; 68 mDate = date;
69} 69}
70 70
71ListItemVisitor::~ListItemVisitor() 71ListItemVisitor::~ListItemVisitor()
72{ 72{
73} 73}
74 74
75bool ListItemVisitor::visit(Event *e) 75bool ListItemVisitor::visit(Event *e)
76{ 76{
77 77
78 bool ok = false; 78 bool ok = false;
79 QString start, end; 79 QString start, end;
80 QDate ds, de; 80 QDate ds, de;
81 if ( e->doesRecur() ) { 81 if ( e->doesRecur() ) {
82 ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date(); 82 ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date();
83 if ( ok ) { 83 if ( ok ) {
84 int days = e->dtStart().date().daysTo(e->dtEnd().date() ); 84 int days = e->dtStart().date().daysTo(e->dtEnd().date() );
85 start = KGlobal::locale()->formatDate(ds,true); 85 start = KGlobal::locale()->formatDate(ds,true);
86 de = ds.addDays( days); 86 de = ds.addDays( days);
87 end = KGlobal::locale()->formatDate(de,true); 87 end = KGlobal::locale()->formatDate(de,true);
88 } 88 }
89 89
90 } 90 }
91 if ( ! ok ) { 91 if ( ! ok ) {
92 start =e->dtStartDateStr(); 92 start =e->dtStartDateStr();
93 end = e->dtEndDateStr(); 93 end = e->dtEndDateStr();
94 ds = e->dtStart().date(); 94 ds = e->dtStart().date();
95 de = e->dtEnd().date(); 95 de = e->dtEnd().date();
96 } 96 }
97 mItem->setText(0,e->summary()); 97 mItem->setText(0,e->summary());
98 mItem->setText(1,start); 98 mItem->setText(1,start);
99 mItem->setText(2,e->dtStartTimeStr()); 99 mItem->setText(2,e->dtStartTimeStr());
100 mItem->setText(3,end); 100 mItem->setText(3,end);
101 mItem->setText(4,e->dtEndTimeStr()); 101 mItem->setText(4,e->dtEndTimeStr());
102 mItem->setText(5,e->isAlarmEnabled() ? i18n("Yes") : i18n("No")); 102 mItem->setText(5,e->isAlarmEnabled() ? i18n("Yes") : i18n("No"));
103 mItem->setText(6, e->recurrence()->recurrenceText()); 103 mItem->setText(6, e->recurrence()->recurrenceText());
104 mItem->setText(7,"---"); 104 mItem->setText(7,"---");
105 mItem->setText(8,"---"); 105 mItem->setText(8,"---");
106 mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No")); 106 mItem->setText(9, e->cancelled() ? i18n("Yes") : i18n("No"));
107 mItem->setText(10,e->categoriesStr()); 107 mItem->setText(10,e->categoriesStr());
108 108
109 QString key; 109 QString key;
110 QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time(); 110 QTime t = e->doesFloat() ? QTime(0,0) : e->dtStart().time();
111 key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute()); 111 key.sprintf("%04d%02d%02d%02d%02d",ds.year(),ds.month(),ds.day(),t.hour(),t.minute());
112 mItem->setSortKey(1,key); 112 mItem->setSortKey(1,key);
113 113
114 t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time(); 114 t = e->doesFloat() ? QTime(0,0) : e->dtEnd().time();
115 key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute()); 115 key.sprintf("%04d%02d%02d%02d%02d",de.year(),de.month(),de.day(),t.hour(),t.minute());
116 mItem->setSortKey(3,key); 116 mItem->setSortKey(3,key);
117 117
118 return true; 118 return true;
119} 119}
120 120
121bool ListItemVisitor::visit(Todo *t) 121bool ListItemVisitor::visit(Todo *t)
122{ 122{
123 mItem->setText(0,i18n("To-Do: %1").arg(t->summary())); 123 mItem->setText(0,i18n("To-Do: %1").arg(t->summary()));
124 if (t->hasStartDate()) { 124 if (t->hasStartDate()) {
125 mItem->setText(1,t->dtStartDateStr()); 125 mItem->setText(1,t->dtStartDateStr());
126 if (t->doesFloat()) { 126 if (t->doesFloat()) {
127 mItem->setText(2,"---"); 127 mItem->setText(2,"---");
128 } else { 128 } else {
129 mItem->setText(2,t->dtStartTimeStr()); 129 mItem->setText(2,t->dtStartTimeStr());
130 } 130 }
131 } else { 131 } else {
132 mItem->setText(1,"---"); 132 mItem->setText(1,"---");
133 mItem->setText(2,"---"); 133 mItem->setText(2,"---");
134 } 134 }
135 mItem->setText(3,"---"); 135 mItem->setText(3,"---");
136 mItem->setText(4,"---"); 136 mItem->setText(4,"---");
137 mItem->setText(5,"---"); 137 mItem->setText(5,t->isAlarmEnabled() ? i18n("Yes") : i18n("No"));
138 mItem->setText(6,"---"); 138 mItem->setText(6,"---");
139 if (t->hasDueDate()) { 139 if (t->hasDueDate()) {
140 mItem->setText(7,t->dtDueDateStr()); 140 mItem->setText(7,t->dtDueDateStr());
141 if (t->doesFloat()) { 141 if (t->doesFloat()) {
142 mItem->setText(8,"---"); 142 mItem->setText(8,"---");
143 } else { 143 } else {
144 mItem->setText(8,t->dtDueTimeStr()); 144 mItem->setText(8,t->dtDueTimeStr());
145 } 145 }
146 } else { 146 } else {
147 mItem->setText(7,"---"); 147 mItem->setText(7,"---");
148 mItem->setText(8,"---"); 148 mItem->setText(8,"---");
149 } 149 }
150 mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No")); 150 mItem->setText(9, t->cancelled() ? i18n("Yes") : i18n("No"));
151 mItem->setText(10,t->categoriesStr()); 151 mItem->setText(10,t->categoriesStr());
152 152
153 QString key; 153 QString key;
154 QDate d; 154 QDate d;
155 if (t->hasDueDate()) { 155 if (t->hasDueDate()) {
156 d = t->dtDue().date(); 156 d = t->dtDue().date();
157 QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); 157 QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time();
158 key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); 158 key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute());
159 mItem->setSortKey(7,key); 159 mItem->setSortKey(7,key);
160 } 160 }
161 if ( t->hasStartDate() ) { 161 if ( t->hasStartDate() ) {
162 d = t->dtStart().date(); 162 d = t->dtStart().date();
163 QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); 163 QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time();
164 key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); 164 key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute());
165 mItem->setSortKey(1,key); 165 mItem->setSortKey(1,key);
166 } 166 }
167 return true; 167 return true;
168} 168}
169 169
170bool ListItemVisitor::visit(Journal * j) 170bool ListItemVisitor::visit(Journal * j)
171{ 171{
172 QString des = j->description().left(50); 172 QString des = j->description().left(50);
173 des = des.simplifyWhiteSpace (); 173 des = des.simplifyWhiteSpace ();
174 des.replace (QRegExp ("\\n"),"" ); 174 des.replace (QRegExp ("\\n"),"" );
175 des.replace (QRegExp ("\\r"),"" ); 175 des.replace (QRegExp ("\\r"),"" );
176 mItem->setText(0,i18n("Journal")+": "+des.left(25)); 176 mItem->setText(0,i18n("Journal")+": "+des.left(25));
177 mItem->setText(1,j->dtStartDateStr()); 177 mItem->setText(1,j->dtStartDateStr());
178 mItem->setText(2,"---"); 178 mItem->setText(2,"---");
179 mItem->setText(3,"---"); 179 mItem->setText(3,"---");
180 mItem->setText(4,"---"); 180 mItem->setText(4,"---");
181 mItem->setText(5,"---"); 181 mItem->setText(5,"---");
182 mItem->setText(6,"---"); 182 mItem->setText(6,"---");
183 mItem->setText(7,j->dtStartDateStr()); 183 mItem->setText(7,j->dtStartDateStr());
184 mItem->setText(8,"---"); 184 mItem->setText(8,"---");
185 mItem->setText(9,"---"); 185 mItem->setText(9,"---");
186 mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); 186 mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) );
187 187
188 QString key; 188 QString key;
189 QDate d = j->dtStart().date(); 189 QDate d = j->dtStart().date();
190 key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); 190 key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day());
191 mItem->setSortKey(1,key); 191 mItem->setSortKey(1,key);
192 mItem->setSortKey(7,key); 192 mItem->setSortKey(7,key);
193 193
194 return true; 194 return true;
195} 195}
196 196
197KOListView::KOListView(Calendar *calendar, QWidget *parent, 197KOListView::KOListView(Calendar *calendar, QWidget *parent,
198 const char *name) 198 const char *name)
199 : KOEventView(calendar, parent, name) 199 : KOEventView(calendar, parent, name)
200{ 200{
201 mActiveItem = 0; 201 mActiveItem = 0;
202 mListView = new KOListViewListView(this); 202 mListView = new KOListViewListView(this);
203 mListView->addColumn(i18n("Summary")); 203 mListView->addColumn(i18n("Summary"));
204 mListView->addColumn(i18n("Start Date")); 204 mListView->addColumn(i18n("Start Date"));
205 mListView->addColumn(i18n("Start Time")); 205 mListView->addColumn(i18n("Start Time"));
206 mListView->addColumn(i18n("End Date")); 206 mListView->addColumn(i18n("End Date"));
207 mListView->addColumn(i18n("End Time")); 207 mListView->addColumn(i18n("End Time"));
208 mListView->addColumn(i18n("Alarm")); // alarm set? 208 mListView->addColumn(i18n("Alarm")); // alarm set?
209 mListView->addColumn(i18n("Recurs")); // recurs? 209 mListView->addColumn(i18n("Recurs")); // recurs?
210 mListView->addColumn(i18n("Due Date")); 210 mListView->addColumn(i18n("Due Date"));
211 mListView->addColumn(i18n("Due Time")); 211 mListView->addColumn(i18n("Due Time"));
212 mListView->addColumn(i18n("Cancelled")); 212 mListView->addColumn(i18n("Cancelled"));
213 mListView->addColumn(i18n("Categories")); 213 mListView->addColumn(i18n("Categories"));
214 214
215 mListView->setColumnAlignment(0,AlignLeft); 215 mListView->setColumnAlignment(0,AlignLeft);
216 mListView->setColumnAlignment(1,AlignLeft); 216 mListView->setColumnAlignment(1,AlignLeft);
217 mListView->setColumnAlignment(2,AlignHCenter); 217 mListView->setColumnAlignment(2,AlignHCenter);
218 mListView->setColumnAlignment(3,AlignLeft); 218 mListView->setColumnAlignment(3,AlignLeft);
219 mListView->setColumnAlignment(4,AlignHCenter); 219 mListView->setColumnAlignment(4,AlignHCenter);
220 mListView->setColumnAlignment(5,AlignLeft); 220 mListView->setColumnAlignment(5,AlignLeft);
221 mListView->setColumnAlignment(6,AlignLeft); 221 mListView->setColumnAlignment(6,AlignLeft);
222 mListView->setColumnAlignment(7,AlignLeft); 222 mListView->setColumnAlignment(7,AlignLeft);
223 mListView->setColumnAlignment(8,AlignLeft); 223 mListView->setColumnAlignment(8,AlignLeft);
224 mListView->setColumnAlignment(9,AlignLeft); 224 mListView->setColumnAlignment(9,AlignLeft);
225 mListView->setColumnAlignment(10,AlignLeft); 225 mListView->setColumnAlignment(10,AlignLeft);
226 mListView->setColumnWidthMode(10, QListView::Manual);
226 227
227 int iii = 0; 228 int iii = 0;
228 for ( iii = 0; iii< 10 ; ++iii ) 229 for ( iii = 0; iii< 10 ; ++iii )
229 mListView->setColumnWidthMode( iii, QListView::Manual ); 230 mListView->setColumnWidthMode( iii, QListView::Manual );
230 231
231 QBoxLayout *layoutTop = new QVBoxLayout(this); 232 QBoxLayout *layoutTop = new QVBoxLayout(this);
232 layoutTop->addWidget(mListView); 233 layoutTop->addWidget(mListView);
233 mListView->setFont ( KOPrefs::instance()->mListViewFont ); 234 mListView->setFont ( KOPrefs::instance()->mListViewFont );
234 mPopupMenu = eventPopup(); 235 mPopupMenu = eventPopup();
235 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 236 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
236 i18n("Select all"),this, 237 i18n("Select all"),this,
237 SLOT(allSelection()),true); 238 SLOT(allSelection()),true);
238 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 239 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
239 i18n("Deselect All"),this, 240 i18n("Deselect All"),this,
240 SLOT(clearSelection()),true); 241 SLOT(clearSelection()),true);
241 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 242 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
242 i18n("Delete all selected"),this, 243 i18n("Delete all selected"),this,
243 SLOT(deleteAll()),true); 244 SLOT(deleteAll()),true);
244 mPopupMenu->insertSeparator(); 245 mPopupMenu->insertSeparator();
245 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 246 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
246 i18n("Save selected to file..."),this, 247 i18n("Save selected to file..."),this,
247 SLOT(saveToFile()),true); 248 SLOT(saveToFile()),true);
248 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 249 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
249 i18n("Save Journal/Description..."),this, 250 i18n("Save Journal/Description..."),this,
250 SLOT(saveDescriptionToFile()),true); 251 SLOT(saveDescriptionToFile()),true);
251 mPopupMenu->insertSeparator(); 252 mPopupMenu->insertSeparator();
252 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 253 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
253 i18n("Add Categ. to selected..."),this, 254 i18n("Add Categ. to selected..."),this,
254 SLOT(addCat()),true); 255 SLOT(addCat()),true);
255 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 256 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
256 i18n("Set Categ. for selected..."),this, 257 i18n("Set Categ. for selected..."),this,
257 SLOT(setCat()),true); 258 SLOT(setCat()),true);
258 mPopupMenu->insertSeparator(); 259 mPopupMenu->insertSeparator();
259 260
260 261
261#ifndef DESKTOP_VERSION 262#ifndef DESKTOP_VERSION
262 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 263 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
263 i18n("Beam selected via IR"),this, 264 i18n("Beam selected via IR"),this,
264 SLOT(beamSelected()),true); 265 SLOT(beamSelected()),true);
265#endif 266#endif
266 /* 267 /*
267 mPopupMenu = new QPopupMenu; 268 mPopupMenu = new QPopupMenu;
268 mPopupMenu->insertItem(i18n("Edit Event"), this, 269 mPopupMenu->insertItem(i18n("Edit Event"), this,
269 SLOT (editEvent())); 270 SLOT (editEvent()));
270 mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, 271 mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this,
271 SLOT (deleteEvent())); 272 SLOT (deleteEvent()));
272 mPopupMenu->insertSeparator(); 273 mPopupMenu->insertSeparator();
273 mPopupMenu->insertItem(i18n("Show Dates"), this, 274 mPopupMenu->insertItem(i18n("Show Dates"), this,
274 SLOT(showDates())); 275 SLOT(showDates()));
275 mPopupMenu->insertItem(i18n("Hide Dates"), this, 276 mPopupMenu->insertItem(i18n("Hide Dates"), this,
276 SLOT(hideDates())); 277 SLOT(hideDates()));
277 */ 278 */
278 QObject::connect(mListView,SIGNAL( newEvent()), 279 QObject::connect(mListView,SIGNAL( newEvent()),
279 this,SIGNAL(signalNewEvent())); 280 this,SIGNAL(signalNewEvent()));
280 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), 281 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)),
281 this,SLOT(defaultItemAction(QListViewItem *))); 282 this,SLOT(defaultItemAction(QListViewItem *)));
282 QObject::connect(mListView,SIGNAL(rightButtonClicked ( QListViewItem *, 283 QObject::connect(mListView,SIGNAL(rightButtonClicked ( QListViewItem *,
283 const QPoint &, int )), 284 const QPoint &, int )),
284 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); 285 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int)));
285 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), 286 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)),
286 SLOT(processSelectionChange(QListViewItem *))); 287 SLOT(processSelectionChange(QListViewItem *)));
287 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), 288 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)),
288 SIGNAL(showIncidenceSignal(Incidence *)) ); 289 SIGNAL(showIncidenceSignal(Incidence *)) );
289 290
290 readSettings(KOGlobals::config(),"KOListView Layout"); 291 readSettings(KOGlobals::config(),"KOListView Layout");
291} 292}
292 293
293KOListView::~KOListView() 294KOListView::~KOListView()
294{ 295{
295 delete mPopupMenu; 296 delete mPopupMenu;
296} 297}
297 298
298void KOListView::updateList() 299void KOListView::updateList()
299{ 300{
300 // qDebug(" KOListView::updateList() "); 301 // qDebug(" KOListView::updateList() ");
301 302
302} 303}
303 304
304void KOListView::addCat( ) 305void KOListView::addCat( )
305{ 306{
306 setCategories( false ); 307 setCategories( false );
307} 308}
308void KOListView::setCat() 309void KOListView::setCat()
309{ 310{
310 setCategories( true ); 311 setCategories( true );
311} 312}
312void KOListView::setCategories( bool removeOld ) 313void KOListView::setCategories( bool removeOld )
313{ 314{
314 315
315 KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 ); 316 KPIM::CategorySelectDialog* csd = new KPIM::CategorySelectDialog( KOPrefs::instance(), 0 );
316 if (! csd->exec()) { 317 if (! csd->exec()) {
317 delete csd; 318 delete csd;
318 return; 319 return;
319 } 320 }
320 QStringList catList = csd->selectedCategories(); 321 QStringList catList = csd->selectedCategories();
321 delete csd; 322 delete csd;
322 // if ( catList.count() == 0 ) 323 // if ( catList.count() == 0 )
323 // return; 324 // return;
324 catList.sort(); 325 catList.sort();
325 QString categoriesStr = catList.join(","); 326 QString categoriesStr = catList.join(",");
326 int i; 327 int i;
327 QStringList itemList; 328 QStringList itemList;
328 QPtrList<KOListViewItem> sel ; 329 QPtrList<KOListViewItem> sel ;
329 QListViewItem *qitem = mListView->firstChild (); 330 QListViewItem *qitem = mListView->firstChild ();
330 while ( qitem ) { 331 while ( qitem ) {
331 if ( qitem->isSelected() ) { 332 if ( qitem->isSelected() ) {
332 sel.append(((KOListViewItem *)qitem)); 333 sel.append(((KOListViewItem *)qitem));
333 } 334 }
334 qitem = qitem->nextSibling(); 335 qitem = qitem->nextSibling();
335 } 336 }
336 KOListViewItem * item, *temp; 337 KOListViewItem * item, *temp;
337 item = sel.first(); 338 item = sel.first();
338 Incidence* inc; 339 Incidence* inc;
339 while ( item ) { 340 while ( item ) {
340 inc = item->data(); 341 inc = item->data();
341 if ( removeOld ) { 342 if ( removeOld ) {
342 inc->setCategories( categoriesStr ); 343 inc->setCategories( categoriesStr );
343 } else { 344 } else {
344 itemList = QStringList::split (",", inc->categoriesStr() ); 345 itemList = QStringList::split (",", inc->categoriesStr() );
345 for( i = 0; i< catList.count(); ++i ) { 346 for( i = 0; i< catList.count(); ++i ) {
346 if ( !itemList.contains (catList[i])) 347 if ( !itemList.contains (catList[i]))
347 itemList.append( catList[i] ); 348 itemList.append( catList[i] );
348 } 349 }
349 itemList.sort(); 350 itemList.sort();
350 inc->setCategories( itemList.join(",") ); 351 inc->setCategories( itemList.join(",") );
351 } 352 }
352 temp = item; 353 temp = item;
353 item = sel.next(); 354 item = sel.next();
354 mUidDict.remove( inc->uid() ); 355 mUidDict.remove( inc->uid() );
355 delete temp;; 356 delete temp;;
356 addIncidence( inc ); 357 addIncidence( inc );
357 } 358 }
358} 359}
359 360
360void KOListView::beamSelected() 361void KOListView::beamSelected()
361{ 362{
362 int icount = 0; 363 int icount = 0;
363 QPtrList<Incidence> delSel ; 364 QPtrList<Incidence> delSel ;
364 QListViewItem *item = mListView->firstChild (); 365 QListViewItem *item = mListView->firstChild ();
365 while ( item ) { 366 while ( item ) {
366 if ( item->isSelected() ) { 367 if ( item->isSelected() ) {
367 delSel.append(((KOListViewItem *)item)->data()); 368 delSel.append(((KOListViewItem *)item)->data());
368 ++icount; 369 ++icount;
369 } 370 }
370 371
371 item = item->nextSibling(); 372 item = item->nextSibling();
372 } 373 }
373 if ( icount ) { 374 if ( icount ) {
374 emit beamIncidenceList( delSel ); 375 emit beamIncidenceList( delSel );
375 return; 376 return;
376 QString fn ; 377 QString fn ;
377 fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs"; 378 fn = QDir::homeDirPath()+"/kopitempbeamfile.vcs";
378 QString mes; 379 QString mes;
379 bool createbup = true; 380 bool createbup = true;
380 if ( createbup ) { 381 if ( createbup ) {
381 QString description = "\n"; 382 QString description = "\n";
382 CalendarLocal* cal = new CalendarLocal(); 383 CalendarLocal* cal = new CalendarLocal();
383 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 384 cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
384 Incidence *incidence = delSel.first(); 385 Incidence *incidence = delSel.first();
385 while ( incidence ) { 386 while ( incidence ) {
386 Incidence *in = incidence->clone(); 387 Incidence *in = incidence->clone();
387 description += in->summary() + "\n"; 388 description += in->summary() + "\n";
388 cal->addIncidence( in ); 389 cal->addIncidence( in );
389 incidence = delSel.next(); 390 incidence = delSel.next();
390 } 391 }
391 FileStorage storage( cal, fn, new VCalFormat ); 392 FileStorage storage( cal, fn, new VCalFormat );
392 storage.save(); 393 storage.save();
393 delete cal; 394 delete cal;
394 mes = i18n("KO/Pi: Ready for beaming"); 395 mes = i18n("KO/Pi: Ready for beaming");
395 topLevelWidget()->setCaption(mes); 396 topLevelWidget()->setCaption(mes);
396 397
397#ifndef DESKTOP_VERSION 398#ifndef DESKTOP_VERSION
398 Ir *ir = new Ir( this ); 399 Ir *ir = new Ir( this );
399 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); 400 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
400 ir->send( fn, description, "text/x-vCalendar" ); 401 ir->send( fn, description, "text/x-vCalendar" );
401#endif 402#endif
402 } 403 }
403 } 404 }
404} 405}
405void KOListView::beamDone( Ir *ir ) 406void KOListView::beamDone( Ir *ir )
406{ 407{
407#ifndef DESKTOP_VERSION 408#ifndef DESKTOP_VERSION
408 delete ir; 409 delete ir;
409#endif 410#endif
410 topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done")); 411 topLevelWidget()->setCaption(i18n("KO/Pi:Beaming done"));
411} 412}
412 413
413void KOListView::saveDescriptionToFile() 414void KOListView::saveDescriptionToFile()
414{ 415{
415 416
416 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 417 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
417 i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."), 418 i18n("This saves the text/details of selected\nJournals and Events/Todos\nto a text file."),
418 i18n("Continue"), i18n("Cancel"), 0, 419 i18n("Continue"), i18n("Cancel"), 0,
419 0, 1 ); 420 0, 1 );
420 if ( result != 0 ) { 421 if ( result != 0 ) {
421 return; 422 return;
422 } 423 }
423 int icount = 0; 424 int icount = 0;
424 QPtrList<Incidence> delSel ; 425 QPtrList<Incidence> delSel ;
425 QListViewItem *item = mListView->firstChild (); 426 QListViewItem *item = mListView->firstChild ();
426 while ( item ) { 427 while ( item ) {
427 if ( item->isSelected() ) { 428 if ( item->isSelected() ) {
428 delSel.append(((KOListViewItem *)item)->data()); 429 delSel.append(((KOListViewItem *)item)->data());
429 ++icount; 430 ++icount;
430 } 431 }
431 432
432 item = item->nextSibling(); 433 item = item->nextSibling();
433 } 434 }
434 if ( icount ) { 435 if ( icount ) {
435 QString fn = KOPrefs::instance()->mLastSaveFile; 436 QString fn = KOPrefs::instance()->mLastSaveFile;
436 fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this ); 437 fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this );
437 438
438 if ( fn == "" ) 439 if ( fn == "" )
439 return; 440 return;
440 QFileInfo info; 441 QFileInfo info;
441 info.setFile( fn ); 442 info.setFile( fn );
442 QString mes; 443 QString mes;
443 bool createbup = true; 444 bool createbup = true;
444 if ( info. exists() ) { 445 if ( info. exists() ) {
445 mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); 446 mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) );
446 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 447 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
447 i18n("Overwrite!"), i18n("Cancel"), 0, 448 i18n("Overwrite!"), i18n("Cancel"), 0,
448 0, 1 ); 449 0, 1 );
449 if ( result != 0 ) { 450 if ( result != 0 ) {
450 createbup = false; 451 createbup = false;
451 } 452 }
452 } 453 }
453 if ( createbup ) { 454 if ( createbup ) {
454 QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") + 455 QString text = i18n("KO/Pi Description/Journal save file.\nSave date: ") +
455 KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false); 456 KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), false);
456 Incidence *incidence = delSel.first(); 457 Incidence *incidence = delSel.first();
457 icount = 0; 458 icount = 0;
458 while ( incidence ) { 459 while ( incidence ) {
459 if ( incidence->type() == "Journal" ) { 460 if ( incidence->type() == "Journal" ) {
460 text += "\n************************************\n"; 461 text += "\n************************************\n";
461 text += i18n("Journal from: ") +incidence->dtStartDateStr( false ); 462 text += i18n("Journal from: ") +incidence->dtStartDateStr( false );
462 text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); 463 text +="\n" + i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false);
463 text +="\n" + i18n("Description: ") + "\n"+ incidence->description(); 464 text +="\n" + i18n("Description: ") + "\n"+ incidence->description();
464 ++icount; 465 ++icount;
465 466
466 } else { 467 } else {
467 if ( !incidence->description().isEmpty() ) { 468 if ( !incidence->description().isEmpty() ) {
468 text += "\n************************************\n"; 469 text += "\n************************************\n";
469 if ( incidence->type() == "Todo" ) 470 if ( incidence->type() == "Todo" )
470 text += i18n("To-Do: "); 471 text += i18n("To-Do: ");
471 text += incidence->summary(); 472 text += incidence->summary();
472 if ( incidence->hasStartDate() ) 473 if ( incidence->hasStartDate() )
473 text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false ); 474 text +="\n"+ i18n("Start Date: ") + incidence->dtStartStr( false );
474 text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false); 475 text +="\n"+ i18n("Last modified: ") +KGlobal::locale()->formatDateTime(incidence->lastModified(), false);
475 if ( !incidence->location().isEmpty() ) 476 if ( !incidence->location().isEmpty() )
476 text += "\n" +i18n("Location: ") + incidence->location(); 477 text += "\n" +i18n("Location: ") + incidence->location();
477 text += "\n" + i18n("Description: ") + "\n" + incidence->description(); 478 text += "\n" + i18n("Description: ") + "\n" + incidence->description();
478 ++icount; 479 ++icount;
479 480
480 } 481 }
481 } 482 }
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp
index 70df15d..6e449c6 100644
--- a/pwmanager/pwmanager/main.cpp
+++ b/pwmanager/pwmanager/main.cpp
@@ -1,220 +1,222 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * copyright (C) 2003, 2004 by Michael Buesch * 3 * copyright (C) 2003, 2004 by Michael Buesch *
4 * email: mbuesch@freenet.de * 4 * email: mbuesch@freenet.de *
5 * * 5 * *
6 * This program is free software; you can redistribute it and/or modify * 6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License version 2 * 7 * it under the terms of the GNU General Public License version 2 *
8 * as published by the Free Software Foundation. * 8 * as published by the Free Software Foundation. *
9 * * 9 * *
10 ***************************************************************************/ 10 ***************************************************************************/
11 11
12/*************************************************************************** 12/***************************************************************************
13 * copyright (C) 2004 by Ulf Schenk 13 * copyright (C) 2004 by Ulf Schenk
14 * This file is originaly based on version 1.0.1 of pwmanager 14 * This file is originaly based on version 1.0.1 of pwmanager
15 * and was modified to run on embedded devices that run microkde 15 * and was modified to run on embedded devices that run microkde
16 * 16 *
17 * $Id$ 17 * $Id$
18 **************************************************************************/ 18 **************************************************************************/
19 19
20#ifndef PWM_EMBEDDED 20#ifndef PWM_EMBEDDED
21#include <kcmdlineargs.h> 21#include <kcmdlineargs.h>
22#include <kaboutdata.h> 22#include <kaboutdata.h>
23#else 23#else
24#include <qdir.h> 24#include <qdir.h>
25#include <kpimglobalprefs.h> 25#include <kpimglobalprefs.h>
26#endif 26#endif
27 27
28#include <klocale.h> 28#include <klocale.h>
29#include <kstandarddirs.h> 29#include <kstandarddirs.h>
30 30
31#include "pwmexception.h" 31#include "pwmexception.h"
32#include "pwminit.h" 32#include "pwminit.h"
33void dumpMissing();
33 34
34 #define LICENSE_FILE(::locate("data", "pwmanager/pwmanager_license_text")) 35 #define LICENSE_FILE(::locate("data", "pwmanager/pwmanager_license_text"))
35 36
36int PwMApplication::newInstance() 37int PwMApplication::newInstance()
37{ 38{
38 static bool initial = true; 39 static bool initial = true;
39 if (initial) { 40 if (initial) {
40 initial = false; 41 initial = false;
41 init = new PwMInit(this); 42 init = new PwMInit(this);
42 init->initializeApp(); 43 init->initializeApp();
43 } else { 44 } else {
44 BUG_ON(!init); 45 BUG_ON(!init);
45 printInfo("passing parameters to old instance."); 46 printInfo("passing parameters to old instance.");
46 init->handleCmdLineArgs(false); 47 init->handleCmdLineArgs(false);
47 } 48 }
48 return EXIT_SUCCESS; 49 return EXIT_SUCCESS;
49} 50}
50 51
51 52
52static const char *description = I18N_NOOP("PwManager\n" 53static const char *description = I18N_NOOP("PwManager\n"
53 "The convenient way of managing passwords"); 54 "The convenient way of managing passwords");
54 55
55#ifndef PWM_EMBEDDED 56#ifndef PWM_EMBEDDED
56static KCmdLineOptions options[] = 57static KCmdLineOptions options[] =
57{ 58{
58 { "minimized", I18N_NOOP("Windows minimized"), 0 }, 59 { "minimized", I18N_NOOP("Windows minimized"), 0 },
59 { "mintray", I18N_NOOP("Windows minimized to tray"),0 }, 60 { "mintray", I18N_NOOP("Windows minimized to tray"),0 },
60 { "open-deeplocked", I18N_NOOP("Open all \"files\" deeplocked"),0 }, 61 { "open-deeplocked", I18N_NOOP("Open all \"files\" deeplocked"),0 },
61 { "skip-self-test", I18N_NOOP("Don't run a self-test on startup"),0 }, 62 { "skip-self-test", I18N_NOOP("Don't run a self-test on startup"),0 },
62 { "+[files...]", I18N_NOOP("Files to open on startup"), 0 }, 63 { "+[files...]", I18N_NOOP("Files to open on startup"), 0 },
63 { 0, 0, 0 } 64 { 0, 0, 0 }
64}; 65};
65#endif 66#endif
66 67
67#ifdef PWM_DEBUG 68#ifdef PWM_DEBUG
68static void printDebugConfigureInfo() 69static void printDebugConfigureInfo()
69{ 70{
70 cout << "================================" << endl; 71 cout << "================================" << endl;
71 cout << PROG_NAME " version " PACKAGE_VER << endl; 72 cout << PROG_NAME " version " PACKAGE_VER << endl;
72#ifdef CONFIG_KEYCARD 73#ifdef CONFIG_KEYCARD
73 cout << "CONFIG_KEYCARD: enabled" << endl; 74 cout << "CONFIG_KEYCARD: enabled" << endl;
74#else 75#else
75 cout << "CONFIG_KEYCARD: disabled" << endl; 76 cout << "CONFIG_KEYCARD: disabled" << endl;
76#endif 77#endif
77#ifdef CONFIG_KWALLETIF 78#ifdef CONFIG_KWALLETIF
78 cout << "CONFIG_KWALLETIF: enabled" << endl; 79 cout << "CONFIG_KWALLETIF: enabled" << endl;
79#else 80#else
80 cout << "CONFIG_KWALLETIF: disabled" << endl; 81 cout << "CONFIG_KWALLETIF: disabled" << endl;
81#endif 82#endif
82#ifdef BIG_ENDIAN_HOST 83#ifdef BIG_ENDIAN_HOST
83 cout << "Endianess: big-endian" << endl; 84 cout << "Endianess: big-endian" << endl;
84#else 85#else
85 cout << "Endianess: little-endian" << endl; 86 cout << "Endianess: little-endian" << endl;
86#endif 87#endif
87#ifdef WORDS_BIGENDIAN 88#ifdef WORDS_BIGENDIAN
88 cout << "Endianess 2: big-endian" << endl; 89 cout << "Endianess 2: big-endian" << endl;
89#else 90#else
90 cout << "Endianess 2: little-endian" << endl; 91 cout << "Endianess 2: little-endian" << endl;
91#endif 92#endif
92 93
93 cout << "sizeof(long): " << sizeof(long) << endl; 94 cout << "sizeof(long): " << sizeof(long) << endl;
94 cout << "================================" << endl; 95 cout << "================================" << endl;
95} 96}
96#else // PWM_DEBUG 97#else // PWM_DEBUG
97static inline void printDebugConfigureInfo() { /* nothing */ } 98static inline void printDebugConfigureInfo() { /* nothing */ }
98#endif // PWM_DEBUG 99#endif // PWM_DEBUG
99 100
100#ifndef PWM_EMBEDDED 101#ifndef PWM_EMBEDDED
101static void addAuthors(KAboutData *aboutData) 102static void addAuthors(KAboutData *aboutData)
102{ 103{
103 aboutData->addAuthor("Michael Buesch", 104 aboutData->addAuthor("Michael Buesch",
104 I18N_NOOP( 105 I18N_NOOP(
105 "main programming and current maintainer"), 106 "main programming and current maintainer"),
106 "mbuesch@freenet.de"); 107 "mbuesch@freenet.de");
107 aboutData->addAuthor("Matt Scifo", 108 aboutData->addAuthor("Matt Scifo",
108 I18N_NOOP( 109 I18N_NOOP(
109 "original implementaion of \n" 110 "original implementaion of \n"
110 "\"categories\" and the password-tree \n" 111 "\"categories\" and the password-tree \n"
111 "in the system-tray. Original implementations of \n" 112 "in the system-tray. Original implementations of \n"
112 "numerous view-improvements."), 113 "numerous view-improvements."),
113 "mscifo@o1.com"); 114 "mscifo@o1.com");
114 aboutData->addCredit("Elias Probst", 115 aboutData->addCredit("Elias Probst",
115 I18N_NOOP( 116 I18N_NOOP(
116 "Gentoo ebuild maintainer."), 117 "Gentoo ebuild maintainer."),
117 "elias.probst@gmx.de"); 118 "elias.probst@gmx.de");
118 aboutData->addCredit("George Staikos", 119 aboutData->addCredit("George Staikos",
119 I18N_NOOP("KWallet"), 120 I18N_NOOP("KWallet"),
120 "staikos@kde.org"); 121 "staikos@kde.org");
121 aboutData->addCredit("Matthew Palmer", 122 aboutData->addCredit("Matthew Palmer",
122 I18N_NOOP("rc2 code"), 123 I18N_NOOP("rc2 code"),
123 "mjp16@uow.edu.au"); 124 "mjp16@uow.edu.au");
124 aboutData->addCredit("Olivier Sessink", 125 aboutData->addCredit("Olivier Sessink",
125 I18N_NOOP("gpasman"), 126 I18N_NOOP("gpasman"),
126 "gpasman@nl.linux.org"); 127 "gpasman@nl.linux.org");
127 aboutData->addCredit("The libgcrypt developers", 128 aboutData->addCredit("The libgcrypt developers",
128 I18N_NOOP("Blowfish and SHA1 algorithms"), 129 I18N_NOOP("Blowfish and SHA1 algorithms"),
129 0, "ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/"); 130 0, "ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/");
130 aboutData->addCredit("Troy Engel", 131 aboutData->addCredit("Troy Engel",
131 I18N_NOOP("kpasman"), 132 I18N_NOOP("kpasman"),
132 "tengel@sonic.net"); 133 "tengel@sonic.net");
133 aboutData->addCredit("Wickey", 134 aboutData->addCredit("Wickey",
134 I18N_NOOP("graphics-design in older versions."), 135 I18N_NOOP("graphics-design in older versions."),
135 "wickey@gmx.at"); 136 "wickey@gmx.at");
136 aboutData->addCredit("Ian MacGregor", 137 aboutData->addCredit("Ian MacGregor",
137 I18N_NOOP( 138 I18N_NOOP(
138 "original documentation author.")); 139 "original documentation author."));
139} 140}
140#endif 141#endif
141 142
142int main(int argc, char *argv[]) 143int main(int argc, char *argv[])
143{ 144{
144 printDebugConfigureInfo(); 145 printDebugConfigureInfo();
145#ifndef PWM_EMBEDDED 146#ifndef PWM_EMBEDDED
146 KAboutData aboutData(PACKAGE_NAME, PROG_NAME, 147 KAboutData aboutData(PACKAGE_NAME, PROG_NAME,
147 PACKAGE_VER, description, KAboutData::License_File, 148 PACKAGE_VER, description, KAboutData::License_File,
148 "(c) 2003, 2004 Michael Buesch and the PwManager Team", 0, 149 "(c) 2003, 2004 Michael Buesch and the PwManager Team", 0,
149 "http://passwordmanager.sourceforge.net/", 150 "http://passwordmanager.sourceforge.net/",
150 "mbuesch@freenet.de"); 151 "mbuesch@freenet.de");
151 addAuthors(&aboutData); 152 addAuthors(&aboutData);
152 153
153 KCmdLineArgs::init(argc, argv, &aboutData); 154 KCmdLineArgs::init(argc, argv, &aboutData);
154 KCmdLineArgs::addCmdLineOptions(options); 155 KCmdLineArgs::addCmdLineOptions(options);
155 156
156 KUniqueApplication::addCmdLineOptions(); 157 KUniqueApplication::addCmdLineOptions();
157 if (!KUniqueApplication::start()) { 158 if (!KUniqueApplication::start()) {
158 printInfo("already running."); 159 printInfo("already running.");
159 return EXIT_SUCCESS; 160 return EXIT_SUCCESS;
160 } 161 }
161 PwMApplication a; 162 PwMApplication a;
162 aboutData.setLicenseTextFile(LICENSE_FILE); 163 aboutData.setLicenseTextFile(LICENSE_FILE);
163 return a.exec(); 164 return a.exec();
164#else 165#else
165 166
166 bool exitHelp = false; 167 bool exitHelp = false;
167 if ( argc > 1 ) { 168 if ( argc > 1 ) {
168 QString command = argv[1]; 169 QString command = argv[1];
169 if ( command == "-help" ){ 170 if ( command == "-help" ){
170 printf("PWM/PI command line commands:\n"); 171 printf("PWM/PI command line commands:\n");
171 printf(" no command: Start PWM/PI in usual way\n"); 172 printf(" no command: Start PWM/PI in usual way\n");
172 printf(" -help: This output\n"); 173 printf(" -help: This output\n");
173 printf(" PWM/PI is exiting now. Bye!\n"); 174 printf(" PWM/PI is exiting now. Bye!\n");
174 exitHelp = true; 175 exitHelp = true;
175 } 176 }
176 } 177 }
177 if ( ! exitHelp ) { 178 if ( ! exitHelp ) {
178 179
179 PwMApplication a(argc, argv); 180 PwMApplication a(argc, argv);
180 181
181 KGlobal::setAppName( "pwmanager" ); 182 KGlobal::setAppName( "pwmanager" );
182#ifndef DESKTOP_VERSION 183#ifndef DESKTOP_VERSION
183 //qDebug("width %d ",QApplication::desktop()->width() ); 184 //qDebug("width %d ",QApplication::desktop()->width() );
184 if ( QApplication::desktop()->width() > 320 ) 185 if ( QApplication::desktop()->width() > 320 )
185 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/"); 186 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons22/");
186 else 187 else
187 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/"); 188 KGlobal::iconLoader()->setIconPath(QString(getenv("QPEDIR"))+"/pics/kdepim/pwmanager/icons16/");
188#else 189#else
189 QString fileName ; 190 QString fileName ;
190 fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/"; 191 fileName = qApp->applicationDirPath () + "/kdepim/pwmanager/icons22/";
191 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); 192 KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
192 QApplication::addLibraryPath ( qApp->applicationDirPath () ); 193 QApplication::addLibraryPath ( qApp->applicationDirPath () );
193 194
194#endif 195#endif
195 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager"))); 196 KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "pwmanager")));
196 KPimGlobalPrefs::instance()->setGlobalConfig(); 197 KPimGlobalPrefs::instance()->setGlobalConfig();
197 198
198 a.newInstance(); 199 a.newInstance();
199 200
200 //US KAddressBookMain m ; 201 //US KAddressBookMain m ;
201 202
202 //US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 203 //US QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
203 /*US 204 /*US
204#ifndef DESKTOP_VERSION 205#ifndef DESKTOP_VERSION
205 a.showMainWidget( &m ); 206 a.showMainWidget( &m );
206#else 207#else
207 a.setMainWidget( &m ); 208 a.setMainWidget( &m );
208 m.resize (640, 480 ); 209 m.resize (640, 480 );
209 m.show(); 210 m.show();
210#endif 211#endif
211 */ 212 */
212 QObject::connect( &a, SIGNAL( lastWindowClosed()), &a, SLOT (quit())); 213 QObject::connect( &a, SIGNAL( lastWindowClosed()), &a, SLOT (quit()));
213 a.exec(); 214 a.exec();
215 dumpMissing();
214 KPimGlobalPrefs::instance()->writeConfig(); 216 KPimGlobalPrefs::instance()->writeConfig();
215 } 217 }
216 qDebug("PWMPI: Bye! "); 218 qDebug("PWMPI: Bye! ");
217 219
218#endif 220#endif
219 221
220} 222}
diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp
index 68f3637..0cf248c 100644
--- a/pwmanager/pwmanager/pwminit.cpp
+++ b/pwmanager/pwmanager/pwminit.cpp
@@ -1,447 +1,448 @@
1/*************************************************************************** 1/***************************************************************************
2 * * 2 * *
3 * copyright (C) 2004 by Michael Buesch * 3 * copyright (C) 2004 by Michael Buesch *
4 * email: mbuesch@freenet.de * 4 * email: mbuesch@freenet.de *
5 * * 5 * *
6 * This program is free software; you can redistribute it and/or modify * 6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License version 2 * 7 * it under the terms of the GNU General Public License version 2 *
8 * as published by the Free Software Foundation. * 8 * as published by the Free Software Foundation. *
9 * * 9 * *
10 ***************************************************************************/ 10 ***************************************************************************/
11 11
12/*************************************************************************** 12/***************************************************************************
13 * copyright (C) 2004 by Ulf Schenk 13 * copyright (C) 2004 by Ulf Schenk
14 * This file is originaly based on version 1.0.1 of pwmanager 14 * This file is originaly based on version 1.0.1 of pwmanager
15 * and was modified to run on embedded devices that run microkde 15 * and was modified to run on embedded devices that run microkde
16 * 16 *
17 * $Id$ 17 * $Id$
18 **************************************************************************/ 18 **************************************************************************/
19 19
20#include "pwminit.h" 20#include "pwminit.h"
21#include "randomizer.h" 21#include "randomizer.h"
22#include <qdir.h> 22#include <qdir.h>
23 23
24#ifndef PWM_EMBEDDED 24#ifndef PWM_EMBEDDED
25#include "selftest.h" 25#include "selftest.h"
26#include "configuration.h" 26#include "configuration.h"
27#else 27#else
28#include "pwmprefs.h" 28#include "pwmprefs.h"
29#endif 29#endif
30 30
31#include "pwm.h" 31#include "pwm.h"
32#include "pwmexception.h" 32#include "pwmexception.h"
33#include "pwmtray.h" 33#include "pwmtray.h"
34#include "pwmdoc.h" 34#include "pwmdoc.h"
35 35
36#ifdef CONFIG_KWALLETIF 36#ifdef CONFIG_KWALLETIF
37# include "kwalletemu.h" 37# include "kwalletemu.h"
38#endif // CONFIG_KWALLETIF 38#endif // CONFIG_KWALLETIF
39#ifdef CONFIG_KEYCARD 39#ifdef CONFIG_KEYCARD
40# include "pwmkeycard.h" 40# include "pwmkeycard.h"
41#endif // CONFIG_KEYCARD 41#endif // CONFIG_KEYCARD
42 42
43#include <qmessagebox.h> 43#include <qmessagebox.h>
44 44
45#include <kmessagebox.h> 45#include <kmessagebox.h>
46#ifndef PWM_EMBEDDED 46#ifndef PWM_EMBEDDED
47#include <kcmdlineargs.h> 47#include <kcmdlineargs.h>
48#include <kwin.h> 48#include <kwin.h>
49#include <dcopclient.h> 49#include <dcopclient.h>
50#endif 50#endif
51 51
52#include <kapplication.h> 52#include <kapplication.h>
53#include <kiconloader.h> 53#include <kiconloader.h>
54 54
55#include <signal.h> 55#include <signal.h>
56 56
57static PwMInit *sig_init_pointer; 57static PwMInit *sig_init_pointer;
58#ifdef _WIN32_ 58#ifdef _WIN32_
59static void sig_handler(int signum) 59static void sig_handler(int signum)
60#else 60#else
61static NOREGPARM void sig_handler(int signum) 61static NOREGPARM void sig_handler(int signum)
62#endif 62#endif
63{ 63{
64 switch (signum) { 64 switch (signum) {
65 case SIGINT: 65 case SIGINT:
66 case SIGTERM: 66 case SIGTERM:
67 sig_init_pointer->shutdownApp(20 + signum); 67 sig_init_pointer->shutdownApp(20 + signum);
68 break; 68 break;
69 default: 69 default:
70 printDebug(string("unhandled signal ") 70 printDebug(string("unhandled signal ")
71 + tostr(signum)); 71 + tostr(signum));
72 } 72 }
73} 73}
74 74
75 75
76 76
77PwMInit::PwMInit(PwMApplication *_app) 77PwMInit::PwMInit(PwMApplication *_app)
78 : runStatus (unknown) 78 : runStatus (unknown)
79 , _curWidget (0) 79 , _curWidget (0)
80 , _dcopClient (0) 80 , _dcopClient (0)
81 , _kwalletEmu (0) 81 , _kwalletEmu (0)
82 , _keycard (0) 82 , _keycard (0)
83 , _tray (0) 83 , _tray (0)
84{ 84{
85 sig_init_pointer = this; 85 sig_init_pointer = this;
86 app = _app; 86 app = _app;
87} 87}
88 88
89PwMInit::~PwMInit() 89PwMInit::~PwMInit()
90{ 90{
91 qDebug("PwMInit::~PwMInit() "); 91 qDebug("PwMInit::~PwMInit() ");
92#ifndef PWM_EMBEDDED 92#ifndef PWM_EMBEDDED
93 SelfTest::cancel(); 93 SelfTest::cancel();
94 // close all open mainwnds 94 // close all open mainwnds
95 QValueList<PwM *>::iterator i = _mainWndList.begin(), 95 QValueList<PwM *>::iterator i = _mainWndList.begin(),
96 end = _mainWndList.end(); 96 end = _mainWndList.end();
97 97
98#else 98#else
99 // close all open mainwnds 99 // close all open mainwnds
100 QValueList<PwM *>::Iterator i = _mainWndList.begin(), 100 QValueList<PwM *>::Iterator i = _mainWndList.begin(),
101 end = _mainWndList.end(); 101 end = _mainWndList.end();
102#endif 102#endif
103 while (i != end) { 103 while (i != end) {
104 disconnect(*i, SIGNAL(closed(PwM *)), 104 disconnect(*i, SIGNAL(closed(PwM *)),
105 this, SLOT(mainWndClosed(PwM *))); 105 this, SLOT(mainWndClosed(PwM *)));
106 delete *i; 106 delete *i;
107 ++i; 107 ++i;
108 } 108 }
109 _mainWndList.clear(); 109 _mainWndList.clear();
110 // close all remaining open documents 110 // close all remaining open documents
111 PwMDocList *_dl = PwMDoc::getOpenDocList(); 111 PwMDocList *_dl = PwMDoc::getOpenDocList();
112 vector<PwMDocList::listItem> dl = *(_dl->getList()); 112 vector<PwMDocList::listItem> dl = *(_dl->getList());
113 vector<PwMDocList::listItem>::iterator i2 = dl.begin(), 113 vector<PwMDocList::listItem>::iterator i2 = dl.begin(),
114 end2 = dl.end(); 114 end2 = dl.end();
115 while (i2 != end2) { 115 while (i2 != end2) {
116 delete (*i2).doc; 116 delete (*i2).doc;
117 ++i2; 117 ++i2;
118 } 118 }
119 119
120#ifdef CONFIG_KWALLETIF 120#ifdef CONFIG_KWALLETIF
121 delete_ifnot_null(_kwalletEmu); 121 delete_ifnot_null(_kwalletEmu);
122#endif // CONFIG_KWALLETIF 122#endif // CONFIG_KWALLETIF
123#ifdef CONFIG_KEYCARD 123#ifdef CONFIG_KEYCARD
124 delete_ifnot_null(_keycard); 124 delete_ifnot_null(_keycard);
125#endif // CONFIG_KEYCARD 125#endif // CONFIG_KEYCARD
126 delete_ifnot_null(_tray); 126 delete_ifnot_null(_tray);
127 127
128 Randomizer::cleanup(); 128 Randomizer::cleanup();
129#ifndef PWM_EMBEDDED 129#ifndef PWM_EMBEDDED
130 Configuration::cleanup(); 130 Configuration::cleanup();
131#endif 131#endif
132} 132}
133 133
134void PwMInit::initializeApp() 134void PwMInit::initializeApp()
135{ 135{
136 //qDebug("PwMInit::initializeApp() "); 136 //qDebug("PwMInit::initializeApp() ");
137 PWM_ASSERT(runStatus == unknown); 137 PWM_ASSERT(runStatus == unknown);
138 runStatus = init; 138 runStatus = init;
139 initPosixSignalHandler(); 139 initPosixSignalHandler();
140 Randomizer::init(); 140 Randomizer::init();
141#ifndef PWM_EMBEDDED 141#ifndef PWM_EMBEDDED
142 Configuration::init(); 142 Configuration::init();
143#endif 143#endif
144 initDCOP(); 144 initDCOP();
145 initKWalletEmu(); 145 initKWalletEmu();
146 initKeycard(); 146 initKeycard();
147 initTray(); 147 initTray();
148 handleCmdLineArgs(); 148 handleCmdLineArgs();
149 bool openDeeplocked = false; 149 bool openDeeplocked = false;
150 if (conf()->confGlobAutostartDeepLocked() || 150 if (conf()->confGlobAutostartDeepLocked() ||
151 savedCmd.open_deeplocked) 151 savedCmd.open_deeplocked)
152 openDeeplocked = true; 152 openDeeplocked = true;
153 if ( false ){ 153 if ( false ){
154 // LR is not working 154 // LR is not working
155 //if (conf()->confWndAutoMinimizeOnStart() || 155 //if (conf()->confWndAutoMinimizeOnStart() ||
156 // savedCmd.minToTray) { 156 // savedCmd.minToTray) {
157 PwMDoc *newDoc = createDoc(); 157 PwMDoc *newDoc = createDoc();
158 qDebug(" createDoc()"); 158 qDebug(" createDoc()");
159 if (!newDoc->openDocUi(newDoc, 159 if (!newDoc->openDocUi(newDoc,
160 conf()->confGlobAutoStart(), 160 conf()->confGlobAutoStart(),
161 openDeeplocked)) { 161 openDeeplocked)) {
162 delete newDoc; 162 delete newDoc;
163 } 163 }
164 164
165 //US ENH for embedded devices: in the case of failure, open a document the default way 165 //US ENH for embedded devices: in the case of failure, open a document the default way
166 createMainWnd(conf()->confGlobAutoStart(), 166 createMainWnd(conf()->confGlobAutoStart(),
167 openDeeplocked, 167 openDeeplocked,
168 true, 168 true,
169 0, 169 0,
170 savedCmd.minimized); 170 savedCmd.minimized);
171 171
172 172
173 173
174 174
175 //} 175 //}
176 } else { 176 } else {
177 createMainWnd(conf()->confGlobAutoStart(), 177 createMainWnd(conf()->confGlobAutoStart(),
178 openDeeplocked, 178 openDeeplocked,
179 true, 179 true,
180 0, 180 0,
181 savedCmd.minimized); 181 savedCmd.minimized);
182 } 182 }
183 runStatus = running; 183 runStatus = running;
184} 184}
185 185
186void PwMInit::shutdownApp(int exitStatus) 186void PwMInit::shutdownApp(int exitStatus)
187{ 187{
188 188
189 189
190 PwM * iii; 190 PwM * iii;;
191 while ( iii = _mainWndList.first() ) { 191 while ( _mainWndList.count() ) {
192 iii = _mainWndList.first();
192 disconnect(iii, SIGNAL(closed(PwM *)), 193 disconnect(iii, SIGNAL(closed(PwM *)),
193 this, SLOT(mainWndClosed(PwM *))); 194 this, SLOT(mainWndClosed(PwM *)));
194 mainWndClosed((iii)); 195 mainWndClosed((iii));
195 } 196 }
196 197
197 printDebug(string("PwMInit::shutdownApp(") 198 printDebug(string("PwMInit::shutdownApp(")
198 + tostr(exitStatus) + ") called."); 199 + tostr(exitStatus) + ") called.");
199 PWM_ASSERT((runStatus == running) || (runStatus == init)); 200 PWM_ASSERT((runStatus == running) || (runStatus == init));
200 runStatus = shutdown; 201 runStatus = shutdown;
201 QApplication::exit(exitStatus); 202 QApplication::exit(exitStatus);
202 /* The destructor of PwMInit is called when control 203 /* The destructor of PwMInit is called when control
203 * leaves main() 204 * leaves main()
204 */ 205 */
205} 206}
206 207
207void PwMInit::initPosixSignalHandler() 208void PwMInit::initPosixSignalHandler()
208{ 209{
209 signal(SIGINT, sig_handler); 210 signal(SIGINT, sig_handler);
210 signal(SIGTERM, sig_handler); 211 signal(SIGTERM, sig_handler);
211} 212}
212 213
213void PwMInit::initDCOP() 214void PwMInit::initDCOP()
214{ 215{
215#ifndef PWM_EMBEDDED 216#ifndef PWM_EMBEDDED
216 _dcopClient = app->dcopClient(); 217 _dcopClient = app->dcopClient();
217 _dcopClient->setNotifications(true); 218 _dcopClient->setNotifications(true);
218#endif 219#endif
219 220
220} 221}
221 222
222void PwMInit::initKWalletEmu(bool forceDisable, bool forceReload) 223void PwMInit::initKWalletEmu(bool forceDisable, bool forceReload)
223{ 224{
224#ifdef CONFIG_KWALLETIF 225#ifdef CONFIG_KWALLETIF
225 if (!conf()->confGlobKwalletEmu() || 226 if (!conf()->confGlobKwalletEmu() ||
226 forceDisable) { 227 forceDisable) {
227 delete_ifnot_null(_kwalletEmu); 228 delete_ifnot_null(_kwalletEmu);
228 return; 229 return;
229 } 230 }
230 try { 231 try {
231 if (_kwalletEmu && forceReload) 232 if (_kwalletEmu && forceReload)
232 delete_and_null(_kwalletEmu); 233 delete_and_null(_kwalletEmu);
233 if (!_kwalletEmu) 234 if (!_kwalletEmu)
234 _kwalletEmu = new KWalletEmu(this); 235 _kwalletEmu = new KWalletEmu(this);
235 } catch (PwMException e) { 236 } catch (PwMException e) {
236 string errMsg("initializing KWallet emulation failed. ID: "); 237 string errMsg("initializing KWallet emulation failed. ID: ");
237 errMsg += tostr(static_cast<int>(e.getId())); 238 errMsg += tostr(static_cast<int>(e.getId()));
238 errMsg += " err-message: "; 239 errMsg += " err-message: ";
239 errMsg += e.getMessage(); 240 errMsg += e.getMessage();
240 printWarn(errMsg); 241 printWarn(errMsg);
241 return; 242 return;
242 } 243 }
243#else // CONFIG_KWALLETIF 244#else // CONFIG_KWALLETIF
244 PARAM_UNUSED(forceDisable); 245 PARAM_UNUSED(forceDisable);
245 PARAM_UNUSED(forceReload); 246 PARAM_UNUSED(forceReload);
246#endif // CONFIG_KWALLETIF 247#endif // CONFIG_KWALLETIF
247} 248}
248 249
249void PwMInit::initKeycard() 250void PwMInit::initKeycard()
250{ 251{
251#ifdef CONFIG_KEYCARD 252#ifdef CONFIG_KEYCARD
252 PWM_ASSERT(!_keycard); 253 PWM_ASSERT(!_keycard);
253 _keycard = new PwMKeyCard(this); 254 _keycard = new PwMKeyCard(this);
254#endif // CONFIG_KEYCARD 255#endif // CONFIG_KEYCARD
255} 256}
256 257
257void PwMInit::initTray() 258void PwMInit::initTray()
258{ 259{
259#ifdef PWM_EMBEDDED 260#ifdef PWM_EMBEDDED
260 //US ENH : embedded version does not support a tray 261 //US ENH : embedded version does not support a tray
261 return; 262 return;
262#endif 263#endif
263 264
264 if (!conf()->confGlobTray()) { 265 if (!conf()->confGlobTray()) {
265 if (!_tray) 266 if (!_tray)
266 return; 267 return;
267 _tray->hide(); 268 _tray->hide();
268 delete_and_null(_tray); 269 delete_and_null(_tray);
269 return; 270 return;
270 } 271 }
271 if (_tray) 272 if (_tray)
272 return; 273 return;
273 _tray = new PwMTray(this); 274 _tray = new PwMTray(this);
274 connect(_tray, SIGNAL(quitSelected()), 275 connect(_tray, SIGNAL(quitSelected()),
275 this, SLOT(removeTrayAndQuit())); 276 this, SLOT(removeTrayAndQuit()));
276 connect(_tray, SIGNAL(closed(PwMTray *)), 277 connect(_tray, SIGNAL(closed(PwMTray *)),
277 this, SLOT(trayIconClosed(PwMTray *))); 278 this, SLOT(trayIconClosed(PwMTray *)));
278 KIconLoader icons; 279 KIconLoader icons;
279#ifndef PWM_EMBEDDED 280#ifndef PWM_EMBEDDED
280 _tray->setPixmap(icons.loadIcon(PACKAGE_NAME, KIcon::Small)); 281 _tray->setPixmap(icons.loadIcon(PACKAGE_NAME, KIcon::Small));
281#endif 282#endif
282 _tray->show(); 283 _tray->show();
283 // connect the signals of all open documents. 284 // connect the signals of all open documents.
284 const vector<PwMDocList::listItem> *dl = PwMDoc::getOpenDocList()->getList(); 285 const vector<PwMDocList::listItem> *dl = PwMDoc::getOpenDocList()->getList();
285 vector<PwMDocList::listItem>::const_iterator i = dl->begin(), 286 vector<PwMDocList::listItem>::const_iterator i = dl->begin(),
286 end = dl->end(); 287 end = dl->end();
287 while (i != end) { 288 while (i != end) {
288 _tray->connectDocToTray((*i).doc); 289 _tray->connectDocToTray((*i).doc);
289 ++i; 290 ++i;
290 } 291 }
291} 292}
292 293
293void PwMInit::removeTrayAndQuit() 294void PwMInit::removeTrayAndQuit()
294{ 295{
295 PWM_ASSERT(_tray); 296 PWM_ASSERT(_tray);
296 // _tray is deleted in ~PwMInit 297 // _tray is deleted in ~PwMInit
297 shutdownApp(0); 298 shutdownApp(0);
298} 299}
299 300
300PwM * PwMInit::createMainWnd(const QString &loadFile, 301PwM * PwMInit::createMainWnd(const QString &loadFile,
301 bool loadFileDeepLocked, 302 bool loadFileDeepLocked,
302 bool virginity, 303 bool virginity,
303 PwMDoc *doc, 304 PwMDoc *doc,
304 bool minimized) 305 bool minimized)
305{ 306{
306 PwM *newWnd; 307 PwM *newWnd;
307 if (!doc) 308 if (!doc)
308 doc = createDoc(); 309 doc = createDoc();
309 newWnd = new PwM(this, doc, virginity); 310 newWnd = new PwM(this, doc, virginity);
310#ifndef PWM_EMBEDDED 311#ifndef PWM_EMBEDDED
311 _mainWndList.push_back(newWnd); 312 _mainWndList.push_back(newWnd);
312#else 313#else
313 _mainWndList.append(newWnd); 314 _mainWndList.append(newWnd);
314#endif 315#endif
315 connect(newWnd, SIGNAL(closed(PwM *)), 316 connect(newWnd, SIGNAL(closed(PwM *)),
316 this, SLOT(mainWndClosed(PwM *))); 317 this, SLOT(mainWndClosed(PwM *)));
317 connect(newWnd, SIGNAL(gotFocus(PwM *)), 318 connect(newWnd, SIGNAL(gotFocus(PwM *)),
318 this, SLOT(setCurWidget(PwM *))); 319 this, SLOT(setCurWidget(PwM *)));
319 connect(newWnd, SIGNAL(lostFocus(PwM *)), 320 connect(newWnd, SIGNAL(lostFocus(PwM *)),
320 this, SLOT(resetCurWidget())); 321 this, SLOT(resetCurWidget()));
321 322
322 //US ENH 323 //US ENH
323#ifndef PWM_EMBEDDED 324#ifndef PWM_EMBEDDED
324 if (minimized) 325 if (minimized)
325 newWnd->showMinimized(); 326 newWnd->showMinimized();
326 else 327 else
327 newWnd->show(); 328 newWnd->show();
328 329
329#else //PWM_EMBEDDED 330#else //PWM_EMBEDDED
330 331
331#ifndef DESKTOP_VERSION 332#ifndef DESKTOP_VERSION
332 app->showMainWidget( newWnd ); 333 app->showMainWidget( newWnd );
333#else //DESKTOP_VERSION 334#else //DESKTOP_VERSION
334 newWnd->resize (640, 480 ); 335 newWnd->resize (640, 480 );
335 newWnd->show(); 336 newWnd->show();
336#endif //DESKTOP_VERSION 337#endif //DESKTOP_VERSION
337 338
338#endif //PWM_EMBEDDED 339#endif //PWM_EMBEDDED
339 340
340 if (loadFile != QString::null && 341 if (loadFile != QString::null &&
341 loadFile != "") { 342 loadFile != "") {
342 newWnd->openDoc(loadFile, loadFileDeepLocked); 343 newWnd->openDoc(loadFile, loadFileDeepLocked);
343 } 344 }
344 return newWnd; 345 return newWnd;
345} 346}
346 347
347PwMDoc * PwMInit::createDoc() 348PwMDoc * PwMInit::createDoc()
348{ 349{
349 PwMDoc *doc = new PwMDoc(this); 350 PwMDoc *doc = new PwMDoc(this);
350#ifdef CONFIG_KEYCARD 351#ifdef CONFIG_KEYCARD
351 doc->setPwMKeyCard(keycard()); 352 doc->setPwMKeyCard(keycard());
352#endif 353#endif
353#ifdef CONFIG_KWALLETIF 354#ifdef CONFIG_KWALLETIF
354 if (kwalletEmu()) 355 if (kwalletEmu())
355 kwalletEmu()->connectDocSignals(doc); 356 kwalletEmu()->connectDocSignals(doc);
356#endif 357#endif
357 358
358 if (_tray) 359 if (_tray)
359 _tray->connectDocToTray(doc); 360 _tray->connectDocToTray(doc);
360 361
361 return doc; 362 return doc;
362 363
363} 364}
364 365
365void PwMInit::mainWndClosed(PwM *wnd) 366void PwMInit::mainWndClosed(PwM *wnd)
366{ 367{
367 bool doMinimizeToTray = false; 368 bool doMinimizeToTray = false;
368 bool doDeleteDoc = false; 369 bool doDeleteDoc = false;
369#ifndef PWM_EMBEDDED 370#ifndef PWM_EMBEDDED
370 dcopClient()->suspend(); 371 dcopClient()->suspend();
371 dcopClient()->setAcceptCalls(false); 372 dcopClient()->setAcceptCalls(false);
372#endif 373#endif
373again: 374again:
374 375
375 if (wnd->isForceMinimizeToTray()) { 376 if (wnd->isForceMinimizeToTray()) {
376 if (unlikely(!_tray)) { 377 if (unlikely(!_tray)) {
377 /* This should not happen! If we set forceMinimizeToTray , 378 /* This should not happen! If we set forceMinimizeToTray ,
378 * we must be sure that _tray exists. 379 * we must be sure that _tray exists.
379 */ 380 */
380 BUG(); 381 BUG();
381 wnd->setForceMinimizeToTray(false); 382 wnd->setForceMinimizeToTray(false);
382 goto again; 383 goto again;
383 } 384 }
384 doMinimizeToTray = true; 385 doMinimizeToTray = true;
385 } else { 386 } else {
386 // Ask to minimize to tray. If not, delete doc. 387 // Ask to minimize to tray. If not, delete doc.
387 if (_tray && 388 if (_tray &&
388 runStatus != shutdown && 389 runStatus != shutdown &&
389 !wnd->isForceQuit() && 390 !wnd->isForceQuit() &&
390 !wnd->curDoc()->isDeleted()) { 391 !wnd->curDoc()->isDeleted()) {
391 if (conf()->confWndClose()) 392 if (conf()->confWndClose())
392 doDeleteDoc = true; 393 doDeleteDoc = true;
393 else 394 else
394 doMinimizeToTray = true; 395 doMinimizeToTray = true;
395 } else { 396 } else {
396 doDeleteDoc = true; 397 doDeleteDoc = true;
397 } 398 }
398 } 399 }
399 400
400 if (doMinimizeToTray) { 401 if (doMinimizeToTray) {
401 qDebug("doMinimizeToTray "); 402 qDebug("doMinimizeToTray ");
402 PWM_ASSERT(_tray); 403 PWM_ASSERT(_tray);
403 int mmlock = conf()->confGlobMinimizeLock(); 404 int mmlock = conf()->confGlobMinimizeLock();
404 switch (mmlock) { 405 switch (mmlock) {
405 case 0: // don't lock anything 406 case 0: // don't lock anything
406 break; 407 break;
407 case 1: // normal lock 408 case 1: // normal lock
408 wnd->curDoc()->lockAll(true); 409 wnd->curDoc()->lockAll(true);
409 break; 410 break;
410 case 2: // deep-lock 411 case 2: // deep-lock
411 wnd->curDoc()->deepLock(); 412 wnd->curDoc()->deepLock();
412 break; 413 break;
413 default: 414 default:
414 WARN(); 415 WARN();
415 } 416 }
416 } else if (doDeleteDoc) { 417 } else if (doDeleteDoc) {
417 qDebug("doDeleteDoc "); 418 qDebug("doDeleteDoc ");
418 if (!wnd->curDoc()->tryDelete()) { 419 if (!wnd->curDoc()->tryDelete()) {
419 /* We failed deleting the doc, 420 /* We failed deleting the doc,
420 * so open a new window with it, again. 421 * so open a new window with it, again.
421 */ 422 */
422 createMainWnd(QString::null, false, 423 createMainWnd(QString::null, false,
423 false, wnd->curDoc()); 424 false, wnd->curDoc());
424 } 425 }
425 } 426 }
426#ifndef PWM_EMBEDDED 427#ifndef PWM_EMBEDDED
427 // find the closed window in the "mainWndList" and delete it. 428 // find the closed window in the "mainWndList" and delete it.
428 QValueList<PwM *>::iterator i = _mainWndList.begin(), 429 QValueList<PwM *>::iterator i = _mainWndList.begin(),
429 end = _mainWndList.end(); 430 end = _mainWndList.end();
430#else 431#else
431 // find the closed window in the "mainWndList" and delete it. 432 // find the closed window in the "mainWndList" and delete it.
432 QValueList<PwM *>::Iterator i = _mainWndList.begin(), 433 QValueList<PwM *>::Iterator i = _mainWndList.begin(),
433 end = _mainWndList.end(); 434 end = _mainWndList.end();
434#endif 435#endif
435 while (i != end) { 436 while (i != end) {
436 //qDebug("iii %x end %x wnd %x", (*i), (*end), wnd); 437 //qDebug("iii %x end %x wnd %x", (*i), (*end), wnd);
437 if (*i == wnd) { 438 if (*i == wnd) {
438#ifndef PWM_EMBEDDED 439#ifndef PWM_EMBEDDED
439 _mainWndList.erase(i); 440 _mainWndList.erase(i);
440#else 441#else
441 _mainWndList.remove(i); 442 _mainWndList.remove(i);
442#endif 443#endif
443 444
444 if ( app->mainWidget() == wnd ) { 445 if ( app->mainWidget() == wnd ) {
445 if ( _mainWndList.count() ) { 446 if ( _mainWndList.count() ) {
446#ifndef DESKTOP_VERSION 447#ifndef DESKTOP_VERSION
447 app->showMainWidget(_mainWndList.first() ); 448 app->showMainWidget(_mainWndList.first() );