-rw-r--r-- | bin/kdepim/WhatsNew.txt | 1 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 16 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 3 |
3 files changed, 19 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index da33d12..ccebf58 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,393 +1,394 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 1.9.17 ************ | 3 | ********** VERSION 1.9.17 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fixed that tooltips were not updated after moving an item in agenda view. | 6 | Fixed that tooltips were not updated after moving an item in agenda view. |
7 | Fixed a bug in sorting start date for recurring events in list view. | 7 | Fixed a bug in sorting start date for recurring events in list view. |
8 | Changed the left button in todo viewer from "Agenda" to "Set completed". | 8 | Changed the left button in todo viewer from "Agenda" to "Set completed". |
9 | This 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. | 9 | This 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. |
10 | Added more info in the todo viewer: Startdate, parent/sub todos. | ||
10 | 11 | ||
11 | 12 | ||
12 | KA/Pi: | 13 | KA/Pi: |
13 | All fields search does now actually search all the (possible) fields, | 14 | All fields search does now actually search all the (possible) fields, |
14 | not only those listed in the contact list. | 15 | not only those listed in the contact list. |
15 | Made is possible to inline a picture in a vcard on the Z. | 16 | Made is possible to inline a picture in a vcard on the Z. |
16 | This was only possible on the desktop, now is it possible on the Z as well. | 17 | This was only possible on the desktop, now is it possible on the Z as well. |
17 | Fixed of missing save settings after filter configuration. | 18 | Fixed of missing save settings after filter configuration. |
18 | Made saving of addressbook much faster. | 19 | Made saving of addressbook much faster. |
19 | Fixed extension widget layout problem. | 20 | Fixed extension widget layout problem. |
20 | Fixed saving of default formatted name settings. | 21 | Fixed saving of default formatted name settings. |
21 | Fixed formatted name handling in edit dialog. | 22 | Fixed formatted name handling in edit dialog. |
22 | Added an option for changing formatted names of many contacts | 23 | Added an option for changing formatted names of many contacts |
23 | (menu: File - Change - Set formatted name). | 24 | (menu: File - Change - Set formatted name). |
24 | 25 | ||
25 | QWhatsThis was not working on the Z ( only black rectangle was shown). | 26 | QWhatsThis was not working on the Z ( only black rectangle was shown). |
26 | This is Fixed. | 27 | This is Fixed. |
27 | 28 | ||
28 | KDE-Sync: | 29 | KDE-Sync: |
29 | Now readonly KDE resources are synced as well. | 30 | Now readonly KDE resources are synced as well. |
30 | (They are not changed in KDE itself, of course). | 31 | (They are not changed in KDE itself, of course). |
31 | 32 | ||
32 | 33 | ||
33 | 34 | ||
34 | ********** VERSION 1.9.16 ************ | 35 | ********** VERSION 1.9.16 ************ |
35 | 36 | ||
36 | KO/Pi: | 37 | KO/Pi: |
37 | Fixed search dialog size on Z 6000 (480x640 display). | 38 | Fixed search dialog size on Z 6000 (480x640 display). |
38 | Added setting to hide/show time in agenda items. | 39 | Added setting to hide/show time in agenda items. |
39 | Added setting to hide not running todos in todo view. | 40 | Added setting to hide not running todos in todo view. |
40 | Added columns for start date/time in todo view. | 41 | Added columns for start date/time in todo view. |
41 | Replaced the solid half-hour lines in agenda view by dot lines. | 42 | Replaced the solid half-hour lines in agenda view by dot lines. |
42 | Added possibility of printing the What's Next View on the desktop | 43 | Added possibility of printing the What's Next View on the desktop |
43 | (i.e. Windows and Linux). | 44 | (i.e. Windows and Linux). |
44 | Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. | 45 | Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. |
45 | Added tooltips in month view.(Tooltips only available on desktop) | 46 | Added tooltips in month view.(Tooltips only available on desktop) |
46 | 47 | ||
47 | Fixed a strange problem in KO/Pi alarm applet. | 48 | Fixed a strange problem in KO/Pi alarm applet. |
48 | Did not find the actual problem, | 49 | Did not find the actual problem, |
49 | such that now Qtopia reboots again if deinstalling the alarm applet. | 50 | such that now Qtopia reboots again if deinstalling the alarm applet. |
50 | But the alarm applet should work again. | 51 | But the alarm applet should work again. |
51 | 52 | ||
52 | KA/Pi: | 53 | KA/Pi: |
53 | Fixed the problem, that internal pictures were not saved. | 54 | Fixed the problem, that internal pictures were not saved. |
54 | 55 | ||
55 | Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. | 56 | Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. |
56 | 57 | ||
57 | Fixed some minor problems. (Like word wrap in help text windows). | 58 | Fixed some minor problems. (Like word wrap in help text windows). |
58 | 59 | ||
59 | Fixed a compiling problem in microkde/kresources. | 60 | Fixed a compiling problem in microkde/kresources. |
60 | 61 | ||
61 | KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. | 62 | KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. |
62 | This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) | 63 | This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) |
63 | such that now syncing KO/Pi with Sharp DTM should work on the | 64 | such that now syncing KO/Pi with Sharp DTM should work on the |
64 | Zaurus C 3000 model. | 65 | Zaurus C 3000 model. |
65 | 66 | ||
66 | ********** VERSION 1.9.15 ************ | 67 | ********** VERSION 1.9.15 ************ |
67 | 68 | ||
68 | Usebilty enhancements in KO/Pi: | 69 | Usebilty enhancements in KO/Pi: |
69 | When clicking on the date in a month view cell, the day view is shown. | 70 | When clicking on the date in a month view cell, the day view is shown. |
70 | Old behaviour was, that the "new event" dialog popped up. | 71 | Old behaviour was, that the "new event" dialog popped up. |
71 | 72 | ||
72 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). | 73 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). |
73 | That means, you can restore the latest | 74 | That means, you can restore the latest |
74 | event/todo/journal you have deleted. | 75 | event/todo/journal you have deleted. |
75 | A journal is deleted, if you clear all the text of the journal. | 76 | A journal is deleted, if you clear all the text of the journal. |
76 | 77 | ||
77 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. | 78 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. |
78 | 79 | ||
79 | KA/Pi starting in 480x640 resolution: | 80 | KA/Pi starting in 480x640 resolution: |
80 | Hide the filter action in toolbar | 81 | Hide the filter action in toolbar |
81 | and added icons for undo/delete/redo in toolbar. | 82 | and added icons for undo/delete/redo in toolbar. |
82 | 83 | ||
83 | Change in OM/Pi ViewMail dialog: | 84 | Change in OM/Pi ViewMail dialog: |
84 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. | 85 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. |
85 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). | 86 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). |
86 | 87 | ||
87 | Fixed a crash when deleting mail-accounts in OM/Pi. | 88 | Fixed a crash when deleting mail-accounts in OM/Pi. |
88 | 89 | ||
89 | 90 | ||
90 | ********** VERSION 1.9.14 ************ | 91 | ********** VERSION 1.9.14 ************ |
91 | 92 | ||
92 | Fixed some problems with the dialog sizes when switching | 93 | Fixed some problems with the dialog sizes when switching |
93 | portrait/landscape mode on 640x480 PDA display. | 94 | portrait/landscape mode on 640x480 PDA display. |
94 | 95 | ||
95 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. | 96 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. |
96 | 97 | ||
97 | Fixed an ugly bug in KOpieMail: | 98 | Fixed an ugly bug in KOpieMail: |
98 | KOpieMail was not able to write files (mails) to MSDOS file system, | 99 | KOpieMail was not able to write files (mails) to MSDOS file system, |
99 | like on an usual preformatted SD card. That should work now. | 100 | like on an usual preformatted SD card. That should work now. |
100 | To save your mail data on the Sd card do the following: | 101 | To save your mail data on the Sd card do the following: |
101 | Create a dir on the SD card: | 102 | Create a dir on the SD card: |
102 | mkdir /mnt/card/localmail | 103 | mkdir /mnt/card/localmail |
103 | Go to your home dir: | 104 | Go to your home dir: |
104 | cd | 105 | cd |
105 | Go to kopiemail data storage dir: | 106 | Go to kopiemail data storage dir: |
106 | cd kdepim/apps/kopiemail | 107 | cd kdepim/apps/kopiemail |
107 | Create a symlink to the SD card: | 108 | Create a symlink to the SD card: |
108 | ls -s /mnt/card/localmail | 109 | ls -s /mnt/card/localmail |
109 | Now KOpieMail will store all mails on the SD card. | 110 | Now KOpieMail will store all mails on the SD card. |
110 | 111 | ||
111 | KO/Pi Monthview: | 112 | KO/Pi Monthview: |
112 | Now "Go to Today" selects the current month from day 1-end, | 113 | Now "Go to Today" selects the current month from day 1-end, |
113 | not the current date + some days. | 114 | not the current date + some days. |
114 | I.e. "Go to Today" shows now always | 115 | I.e. "Go to Today" shows now always |
115 | the current month with first day of month in the first row. | 116 | the current month with first day of month in the first row. |
116 | 117 | ||
117 | Added missing German translation. | 118 | Added missing German translation. |
118 | 119 | ||
119 | Fixed icons of executeable on Wintendo. | 120 | Fixed icons of executeable on Wintendo. |
120 | 121 | ||
121 | Added a "Show next Mail" button to the OM/Pi | 122 | Added a "Show next Mail" button to the OM/Pi |
122 | mail viewer such that the mail below the current mail | 123 | mail viewer such that the mail below the current mail |
123 | in the mail list view of the current folder | 124 | in the mail list view of the current folder |
124 | can be read with a single click. | 125 | can be read with a single click. |
125 | 126 | ||
126 | 127 | ||
127 | ********** VERSION 1.9.13 ************ | 128 | ********** VERSION 1.9.13 ************ |
128 | 129 | ||
129 | Fixed nasty PwM/Pi file reading bug, when | 130 | Fixed nasty PwM/Pi file reading bug, when |
130 | the used hash algo of file is different then the global | 131 | the used hash algo of file is different then the global |
131 | hash algo. | 132 | hash algo. |
132 | 133 | ||
133 | Added KA/Pi support for opie mailit mailapplication. | 134 | Added KA/Pi support for opie mailit mailapplication. |
134 | 135 | ||
135 | Fixed some bugs in OM/Pi. | 136 | Fixed some bugs in OM/Pi. |
136 | Now character conversion tables are available for the Zaurus | 137 | Now character conversion tables are available for the Zaurus |
137 | to make OM/Pi working properly. | 138 | to make OM/Pi working properly. |
138 | To get the character conversion in OM/Pi working, please download | 139 | To get the character conversion in OM/Pi working, please download |
139 | at the sourceforge project site the package | 140 | at the sourceforge project site the package |
140 | sr-character-conversion_SharpROM_arm.ipk.zip | 141 | sr-character-conversion_SharpROM_arm.ipk.zip |
141 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) | 142 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) |
142 | from the section "general files for KDE/Pim" | 143 | from the section "general files for KDE/Pim" |
143 | Instructions how to install this package are in a ReadMe in this file. | 144 | Instructions how to install this package are in a ReadMe in this file. |
144 | 145 | ||
145 | 146 | ||
146 | Fixed the orientation change problem in KA/Pi when switching | 147 | Fixed the orientation change problem in KA/Pi when switching |
147 | portrait/landscape mode. | 148 | portrait/landscape mode. |
148 | 149 | ||
149 | French translation available for KA/Pi and OM/Pi. | 150 | French translation available for KA/Pi and OM/Pi. |
150 | 151 | ||
151 | Fixed some problems with categories in KO/Pi in DTM sync. | 152 | Fixed some problems with categories in KO/Pi in DTM sync. |
152 | 153 | ||
153 | Added selection dialog for export to phone in KA/Pi. | 154 | Added selection dialog for export to phone in KA/Pi. |
154 | 155 | ||
155 | If in KO/Pi is an attendee selected to add to a meeting and this | 156 | If in KO/Pi is an attendee selected to add to a meeting and this |
156 | attendee is already in the list of attendees, this person is not added | 157 | attendee is already in the list of attendees, this person is not added |
157 | again. | 158 | again. |
158 | 159 | ||
159 | Some menu cleanup in KA/Pi. | 160 | Some menu cleanup in KA/Pi. |
160 | 161 | ||
161 | ********** VERSION 1.9.12 ************ | 162 | ********** VERSION 1.9.12 ************ |
162 | 163 | ||
163 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. | 164 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. |
164 | 165 | ||
165 | Bugfix: Licence file is now shown again. | 166 | Bugfix: Licence file is now shown again. |
166 | 167 | ||
167 | OM/Pi now supports Unicode (utf8 charset). | 168 | OM/Pi now supports Unicode (utf8 charset). |
168 | Fixed some bugs in OM/Pi. | 169 | Fixed some bugs in OM/Pi. |
169 | 170 | ||
170 | KA/Pi has more German translation. | 171 | KA/Pi has more German translation. |
171 | 172 | ||
172 | 173 | ||
173 | ********** VERSION 1.9.11 ************ | 174 | ********** VERSION 1.9.11 ************ |
174 | 175 | ||
175 | Fixed several problems in PWM/Pi, like | 176 | Fixed several problems in PWM/Pi, like |
176 | asking the user, if unsaved changed are pending | 177 | asking the user, if unsaved changed are pending |
177 | when closing the app. | 178 | when closing the app. |
178 | And PwM/Pi handles now different texts for the | 179 | And PwM/Pi handles now different texts for the |
179 | fields Description, Username, Password, configurable per category. | 180 | fields Description, Username, Password, configurable per category. |
180 | 181 | ||
181 | Fixed a crash in KO/Pi , when importing/loading vcs files | 182 | Fixed a crash in KO/Pi , when importing/loading vcs files |
182 | which have an entry with an attendee with state: | 183 | which have an entry with an attendee with state: |
183 | NEEDS ACTION | 184 | NEEDS ACTION |
184 | 185 | ||
185 | Fixed some problems in the German translation of OM/Pi, | 186 | Fixed some problems in the German translation of OM/Pi, |
186 | which makes some dialogs not fitting on the screen | 187 | which makes some dialogs not fitting on the screen |
187 | of the Z 5500. | 188 | of the Z 5500. |
188 | 189 | ||
189 | Fixed Qtopia crash, when disabling/deinstalling | 190 | Fixed Qtopia crash, when disabling/deinstalling |
190 | KO/Pi alarm applet. | 191 | KO/Pi alarm applet. |
191 | 192 | ||
192 | Implemented direct KDE<->KA/Pi sync for KA/Pi running | 193 | Implemented direct KDE<->KA/Pi sync for KA/Pi running |
193 | on Linux desktop. | 194 | on Linux desktop. |
194 | 195 | ||
195 | Added feature "remove sync info" to sync menu. | 196 | Added feature "remove sync info" to sync menu. |
196 | 197 | ||
197 | Tweaked the KO/Pi What's next view a bit, added | 198 | Tweaked the KO/Pi What's next view a bit, added |
198 | setting to hide events that are done. | 199 | setting to hide events that are done. |
199 | 200 | ||
200 | Disabled "beam receive enabled" on startup to | 201 | Disabled "beam receive enabled" on startup to |
201 | avoid problems if Fastload is enabled. | 202 | avoid problems if Fastload is enabled. |
202 | Please set "beam receive enabled", | 203 | Please set "beam receive enabled", |
203 | if you want to receive data via IR. | 204 | if you want to receive data via IR. |
204 | 205 | ||
205 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running | 206 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running |
206 | on Linux desktop. | 207 | on Linux desktop. |
207 | 208 | ||
208 | Made in KA/Pi scrolling possible, if details view is selected. | 209 | Made in KA/Pi scrolling possible, if details view is selected. |
209 | (The keyboard focus is set automatically to the search line) | 210 | (The keyboard focus is set automatically to the search line) |
210 | 211 | ||
211 | Fixed a bug in DMT sync, that a new entry in DTM was added | 212 | Fixed a bug in DMT sync, that a new entry in DTM was added |
212 | on every sync to Kx/Pi. | 213 | on every sync to Kx/Pi. |
213 | 214 | ||
214 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. | 215 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. |
215 | 216 | ||
216 | Fixed a bug in DMT sync with todos created in KO/Pi containing | 217 | Fixed a bug in DMT sync with todos created in KO/Pi containing |
217 | non-latin1 characters. | 218 | non-latin1 characters. |
218 | 219 | ||
219 | Rearranged package contents of Sharp-ipks and made all | 220 | Rearranged package contents of Sharp-ipks and made all |
220 | packages installable on SD again. | 221 | packages installable on SD again. |
221 | 222 | ||
222 | Fixed the writing of addressbook data in DTM sync. | 223 | Fixed the writing of addressbook data in DTM sync. |
223 | Empty fields in KA/Pi were not removed. | 224 | Empty fields in KA/Pi were not removed. |
224 | 225 | ||
225 | Added better category handling in KA/Pi: | 226 | Added better category handling in KA/Pi: |
226 | Added item | 227 | Added item |
227 | Edit Categories and | 228 | Edit Categories and |
228 | Manage new categories | 229 | Manage new categories |
229 | to the settings menu. | 230 | to the settings menu. |
230 | Possible to configure a view to display categories. | 231 | Possible to configure a view to display categories. |
231 | 232 | ||
232 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. | 233 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. |
233 | 234 | ||
234 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. | 235 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. |
235 | 236 | ||
236 | ... and many other bugfixes. | 237 | ... and many other bugfixes. |
237 | 238 | ||
238 | ********** VERSION 1.9.10 ************ | 239 | ********** VERSION 1.9.10 ************ |
239 | 240 | ||
240 | Many internal small bugfixes. | 241 | Many internal small bugfixes. |
241 | And fix of the "big" bug in KO/Pi, | 242 | And fix of the "big" bug in KO/Pi, |
242 | that after Syncing the appointments had an offset by several hours. | 243 | that after Syncing the appointments had an offset by several hours. |
243 | That was a problem with the internal timezone setting, | 244 | That was a problem with the internal timezone setting, |
244 | introduced by the changed timezone configuration settings. | 245 | introduced by the changed timezone configuration settings. |
245 | 246 | ||
246 | German translation for OM/Pi is now available. | 247 | German translation for OM/Pi is now available. |
247 | 248 | ||
248 | 249 | ||
249 | ********** VERSION 1.9.9 ************ | 250 | ********** VERSION 1.9.9 ************ |
250 | 251 | ||
251 | KDE-Pim/Pi has a new Member! | 252 | KDE-Pim/Pi has a new Member! |
252 | It is called PWM/Pi (Passwordmanager/platform-independent) | 253 | It is called PWM/Pi (Passwordmanager/platform-independent) |
253 | and it is available for the Zaurus. | 254 | and it is available for the Zaurus. |
254 | It is planned, that it will be available later for Windows. | 255 | It is planned, that it will be available later for Windows. |
255 | (And for Linux, of course). | 256 | (And for Linux, of course). |
256 | It is a port of the Passwordmanager of KDE. | 257 | It is a port of the Passwordmanager of KDE. |
257 | It will need the MicroKDElibs to run. | 258 | It will need the MicroKDElibs to run. |
258 | 259 | ||
259 | Made loading of addressbooks in KA/Pi up to 7 times faster! | 260 | Made loading of addressbooks in KA/Pi up to 7 times faster! |
260 | The bigger your addressbook file, the more starting speed | 261 | The bigger your addressbook file, the more starting speed |
261 | will you gain. (relatively) | 262 | will you gain. (relatively) |
262 | 263 | ||
263 | The Qtopia addressbook connector is now platform independend | 264 | The Qtopia addressbook connector is now platform independend |
264 | as well and should work on any platform for importing/exporting | 265 | as well and should work on any platform for importing/exporting |
265 | Qtopia and Opie XML files. | 266 | Qtopia and Opie XML files. |
266 | 267 | ||
267 | Added a +30min feature to the timezone settings to make | 268 | Added a +30min feature to the timezone settings to make |
268 | KDE-Pim/Pi useable in Australia and other parts on the | 269 | KDE-Pim/Pi useable in Australia and other parts on the |
269 | world with strange timezones ;-) | 270 | world with strange timezones ;-) |
270 | 271 | ||
271 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. | 272 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. |
272 | 273 | ||
273 | It is now possible to disable the | 274 | It is now possible to disable the |
274 | "receive data via infrared" feature, such that syncing with | 275 | "receive data via infrared" feature, such that syncing with |
275 | Outlook is now possible again with Kx/Pi runing. | 276 | Outlook is now possible again with Kx/Pi runing. |
276 | Please disable it, before syncing Sharp DTM with Outlook. | 277 | Please disable it, before syncing Sharp DTM with Outlook. |
277 | For your convenience, the "receive data via infrared" feature | 278 | For your convenience, the "receive data via infrared" feature |
278 | is disabled automatically, if you sync Kx/Pi with DTM. | 279 | is disabled automatically, if you sync Kx/Pi with DTM. |
279 | You have to enable it again manually after syncing. | 280 | You have to enable it again manually after syncing. |
280 | Enabling this feature makes it impossible to start the | 281 | Enabling this feature makes it impossible to start the |
281 | Sharp DTM apps. If this feature is enabled, you will only get the | 282 | Sharp DTM apps. If this feature is enabled, you will only get the |
282 | alarm notification from KO/Pi and not from the Sharp calendar. | 283 | alarm notification from KO/Pi and not from the Sharp calendar. |
283 | This is very useful if you sync KO/Pi with Sharp DTM, | 284 | This is very useful if you sync KO/Pi with Sharp DTM, |
284 | because after syncing you usually would get notified about | 285 | because after syncing you usually would get notified about |
285 | an alarm by KO/Pi and the Sharp Calendar. | 286 | an alarm by KO/Pi and the Sharp Calendar. |
286 | 287 | ||
287 | Together with the Linux desktop version of KO/Pi | 288 | Together with the Linux desktop version of KO/Pi |
288 | it is now possible to sync KO/Pi on the Zaurus | 289 | it is now possible to sync KO/Pi on the Zaurus |
289 | with the complete KDE-desktop (3.3 or later) | 290 | with the complete KDE-desktop (3.3 or later) |
290 | calendar data easily. | 291 | calendar data easily. |
291 | That makes it possible to sync the Z with one | 292 | That makes it possible to sync the Z with one |
292 | click of a mouse with the KDE-Desktop. | 293 | click of a mouse with the KDE-Desktop. |
293 | This feature it available for all Zaurus platforms KO/Pi | 294 | This feature it available for all Zaurus platforms KO/Pi |
294 | is running on. | 295 | is running on. |
295 | The only thing needed is a running KO/Pi on Linux and | 296 | The only thing needed is a running KO/Pi on Linux and |
296 | a compiled version of the small | 297 | a compiled version of the small |
297 | KDE-Pim/Pi<->KDE-Desktop access command line program, | 298 | KDE-Pim/Pi<->KDE-Desktop access command line program, |
298 | which is in the KDE-Pim/Pi sources available. | 299 | which is in the KDE-Pim/Pi sources available. |
299 | 300 | ||
300 | The "KDE-desktop" syncing feature for KA/Pi will follow | 301 | The "KDE-desktop" syncing feature for KA/Pi will follow |
301 | in the next releases. | 302 | in the next releases. |
302 | 303 | ||
303 | Fixed the vcard export bug, which had the version 1.9.8. | 304 | Fixed the vcard export bug, which had the version 1.9.8. |
304 | 305 | ||
305 | Added missing GERMAN translation to KO/Pi. | 306 | Added missing GERMAN translation to KO/Pi. |
306 | Hi PsionX, could you add the missing french translation?Thx! | 307 | Hi PsionX, could you add the missing french translation?Thx! |
307 | 308 | ||
308 | Translation files for KA/Pi are available as well. | 309 | Translation files for KA/Pi are available as well. |
309 | GERMAN translation will be available in the next release. | 310 | GERMAN translation will be available in the next release. |
310 | PsionX ( yres, you again ;-) ), could you start translating | 311 | PsionX ( yres, you again ;-) ), could you start translating |
311 | KA/Pi? Thx! | 312 | KA/Pi? Thx! |
312 | 313 | ||
313 | You can download the version 1.9.9 at | 314 | You can download the version 1.9.9 at |
314 | 315 | ||
315 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 | 316 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 |
316 | 317 | ||
317 | Note: | 318 | Note: |
318 | To run the mail program OM/Pi you need libopenssl. | 319 | To run the mail program OM/Pi you need libopenssl. |
319 | A link to a download loaction is available at | 320 | A link to a download loaction is available at |
320 | ZSI at www.killefiz.de | 321 | ZSI at www.killefiz.de |
321 | 322 | ||
322 | 323 | ||
323 | ********** VERSION 1.9.8 ************ | 324 | ********** VERSION 1.9.8 ************ |
324 | 325 | ||
325 | Fixed character decoding in OM/Pi. | 326 | Fixed character decoding in OM/Pi. |
326 | (e.g. German "Umlaute" were not displayed properly.) | 327 | (e.g. German "Umlaute" were not displayed properly.) |
327 | 328 | ||
328 | Made is possible to reparent todos in KO/Pi. | 329 | Made is possible to reparent todos in KO/Pi. |
329 | Use contextmenu or keys (look at Help-Keys + Colors) for that. | 330 | Use contextmenu or keys (look at Help-Keys + Colors) for that. |
330 | 331 | ||
331 | Added the missing Sync-Howto and WhatsNew to the packages. | 332 | Added the missing Sync-Howto and WhatsNew to the packages. |
332 | 333 | ||
333 | KO/Pi on Linux desktop can now sync with KDE desktop. | 334 | KO/Pi on Linux desktop can now sync with KDE desktop. |
334 | That means: When using KO/Pi on Linux desktop for syncing with | 335 | That means: When using KO/Pi on Linux desktop for syncing with |
335 | KDE desktop and the Zaurus, the Zaurus can be synced now | 336 | KDE desktop and the Zaurus, the Zaurus can be synced now |
336 | with all KDE-Calendar resources, not only with one local file. | 337 | with all KDE-Calendar resources, not only with one local file. |
337 | (That makes it possible to sync the Zaurus with the | 338 | (That makes it possible to sync the Zaurus with the |
338 | calendar data on a Kolab server) | 339 | calendar data on a Kolab server) |
339 | 340 | ||
340 | KA/Pi syncing with KDE desktop will be available in the next version. | 341 | KA/Pi syncing with KDE desktop will be available in the next version. |
341 | 342 | ||
342 | 343 | ||
343 | ********** VERSION 1.9.7 ************ | 344 | ********** VERSION 1.9.7 ************ |
344 | 345 | ||
345 | KO/Pi - KA/Pi on Windows: | 346 | KO/Pi - KA/Pi on Windows: |
346 | Now a directory can be defined by the user, where the | 347 | Now a directory can be defined by the user, where the |
347 | application/config data should be saved. | 348 | application/config data should be saved. |
348 | Define your desired path in the evironment variable | 349 | Define your desired path in the evironment variable |
349 | MICROKDEHOME | 350 | MICROKDEHOME |
350 | before starting KO/Pi or KA/Pi. | 351 | before starting KO/Pi or KA/Pi. |
351 | 352 | ||
352 | An easy Kx/Pi to Kx/Pi syncing is now possible | 353 | An easy Kx/Pi to Kx/Pi syncing is now possible |
353 | (it is called Pi-Sync) via network. | 354 | (it is called Pi-Sync) via network. |
354 | Please look at the Sync Howto. | 355 | Please look at the Sync Howto. |
355 | 356 | ||
356 | Exporting of calendar data and contacts to mobile phones is now possible. | 357 | Exporting of calendar data and contacts to mobile phones is now possible. |
357 | The SyncHowto is updated with information howto | 358 | The SyncHowto is updated with information howto |
358 | access/sync mobile phones. | 359 | access/sync mobile phones. |
359 | Please look at the Sync Howto. | 360 | Please look at the Sync Howto. |
360 | 361 | ||
361 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. | 362 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. |
362 | Please disable Fastload for the original contact/calendar applications | 363 | Please disable Fastload for the original contact/calendar applications |
363 | and close them. | 364 | and close them. |
364 | KO/Pi and KA/Pi must be running in order to receive the data. | 365 | KO/Pi and KA/Pi must be running in order to receive the data. |
365 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) | 366 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) |
366 | 367 | ||
367 | In the KA/Pi details view are now the preferred tel. numbers displayed on top | 368 | In the KA/Pi details view are now the preferred tel. numbers displayed on top |
368 | of the other data ( emails/tel.numbers/addresses) | 369 | of the other data ( emails/tel.numbers/addresses) |
369 | 370 | ||
370 | Fixed some syncing problems in KA/Pi. | 371 | Fixed some syncing problems in KA/Pi. |
371 | 372 | ||
372 | Added font settings for the KA/Pi details view. | 373 | Added font settings for the KA/Pi details view. |
373 | Added fields "children's name" and "gender" to KA/Pi. | 374 | Added fields "children's name" and "gender" to KA/Pi. |
374 | 375 | ||
375 | Made searching in KA/Pi better: | 376 | Made searching in KA/Pi better: |
376 | Now the first item in a view is selected after a search automatically and | 377 | Now the first item in a view is selected after a search automatically and |
377 | the views can be scrolled up/down when the search input field has the keyboard focus. | 378 | the views can be scrolled up/down when the search input field has the keyboard focus. |
378 | 379 | ||
379 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. | 380 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. |
380 | 381 | ||
381 | 382 | ||
382 | ********** VERSION 1.9.6 ************ | 383 | ********** VERSION 1.9.6 ************ |
383 | 384 | ||
384 | Changes in the external application communication on the Zaurus | 385 | Changes in the external application communication on the Zaurus |
385 | in order to use less RAM when the apps are running. | 386 | in order to use less RAM when the apps are running. |
386 | First syncing of addressbooks (KA/Pi) is possible. | 387 | First syncing of addressbooks (KA/Pi) is possible. |
387 | 388 | ||
388 | 389 | ||
389 | ********** VERSION 1.9.5a ************ | 390 | ********** VERSION 1.9.5a ************ |
390 | 391 | ||
391 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. | 392 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. |
392 | Fixed some small bugs. | 393 | Fixed some small bugs. |
393 | KA/Pi shows now the birthday in summary view. | 394 | KA/Pi shows now the birthday in summary view. |
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 1fcc977..cee0466 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -1,581 +1,595 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <qcstring.h> | 20 | #include <qcstring.h> |
21 | #include <qwhatsthis.h> | 21 | #include <qwhatsthis.h> |
22 | #include <qdialog.h> | 22 | #include <qdialog.h> |
23 | #include <qapplication.h> | 23 | #include <qapplication.h> |
24 | #include <qlabel.h> | 24 | #include <qlabel.h> |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | 26 | ||
27 | #include <klocale.h> | 27 | #include <klocale.h> |
28 | #include <kapplication.h> | 28 | #include <kapplication.h> |
29 | #include <libkcal/event.h> | 29 | #include <libkcal/event.h> |
30 | #include <libkcal/todo.h> | 30 | #include <libkcal/todo.h> |
31 | #include <kdebug.h> | 31 | #include <kdebug.h> |
32 | #include <kiconloader.h> | 32 | #include <kiconloader.h> |
33 | #include <krun.h> | 33 | #include <krun.h> |
34 | #include <kglobal.h> | 34 | #include <kglobal.h> |
35 | #include <kprocess.h> | 35 | #include <kprocess.h> |
36 | #include "koprefs.h" | 36 | #include "koprefs.h" |
37 | 37 | ||
38 | #include <kabc/stdaddressbook.h> | 38 | #include <kabc/stdaddressbook.h> |
39 | 39 | ||
40 | #ifndef KORG_NODCOP | 40 | #ifndef KORG_NODCOP |
41 | #include <dcopclient.h> | 41 | #include <dcopclient.h> |
42 | #include "korganizer.h" | 42 | #include "korganizer.h" |
43 | #include "koprefs.h" | 43 | #include "koprefs.h" |
44 | #include "actionmanager.h" | 44 | #include "actionmanager.h" |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #include "koeventviewer.h" | 47 | #include "koeventviewer.h" |
48 | //#ifndef KORG_NOKABC | 48 | //#ifndef KORG_NOKABC |
49 | //#include <kabc/stdaddressbook.h> | 49 | //#include <kabc/stdaddressbook.h> |
50 | //#define size count | 50 | //#define size count |
51 | //#endif | 51 | //#endif |
52 | 52 | ||
53 | #ifdef DESKTOP_VERSION | 53 | #ifdef DESKTOP_VERSION |
54 | #include <kabc/addresseedialog.h> | 54 | #include <kabc/addresseedialog.h> |
55 | #include <kabc/addresseeview.h> | 55 | #include <kabc/addresseeview.h> |
56 | #else //DESKTOP_VERSION | 56 | #else //DESKTOP_VERSION |
57 | #include <externalapphandler.h> | 57 | #include <externalapphandler.h> |
58 | #include <qtopia/qcopenvelope_qws.h> | 58 | #include <qtopia/qcopenvelope_qws.h> |
59 | #endif //DESKTOP_VERSION | 59 | #endif //DESKTOP_VERSION |
60 | 60 | ||
61 | KOEventViewer::KOEventViewer(QWidget *parent,const char *name) | 61 | KOEventViewer::KOEventViewer(QWidget *parent,const char *name) |
62 | : QTextBrowser(parent,name) | 62 | : QTextBrowser(parent,name) |
63 | { | 63 | { |
64 | mSyncMode = false; | 64 | mSyncMode = false; |
65 | mColorMode = 0; | 65 | mColorMode = 0; |
66 | } | 66 | } |
67 | 67 | ||
68 | KOEventViewer::~KOEventViewer() | 68 | KOEventViewer::~KOEventViewer() |
69 | { | 69 | { |
70 | } | 70 | } |
71 | 71 | ||
72 | void KOEventViewer::setSource(const QString& n) | 72 | void KOEventViewer::setSource(const QString& n) |
73 | { | 73 | { |
74 | 74 | ||
75 | if ( n.left(3) == "uid" ) | 75 | if ( n.left(3) == "uid" ) |
76 | #ifdef DESKTOP_VERSION | 76 | #ifdef DESKTOP_VERSION |
77 | { | 77 | { |
78 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 78 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
79 | KABC::AddressBook::Iterator it; | 79 | KABC::AddressBook::Iterator it; |
80 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 80 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
81 | // LR I do not understand, why the uid string is different on zaurus and desktop | 81 | // LR I do not understand, why the uid string is different on zaurus and desktop |
82 | QString uid = "uid://"+(*it).uid(); | 82 | QString uid = "uid://"+(*it).uid(); |
83 | 83 | ||
84 | //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); | 84 | //qDebug("for *%s* +%s+ ", n.latin1(), uid.latin1()); |
85 | if (n == uid ) { | 85 | if (n == uid ) { |
86 | //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); | 86 | //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); |
87 | QDialog dia( this,"dia123", true ); | 87 | QDialog dia( this,"dia123", true ); |
88 | dia.setCaption( i18n("Details of attendee") ); | 88 | dia.setCaption( i18n("Details of attendee") ); |
89 | QVBoxLayout lay ( &dia ); | 89 | QVBoxLayout lay ( &dia ); |
90 | KPIM::AddresseeView av ( &dia ); | 90 | KPIM::AddresseeView av ( &dia ); |
91 | av.setAddressee( (*it) ); | 91 | av.setAddressee( (*it) ); |
92 | lay.addWidget( &av ); | 92 | lay.addWidget( &av ); |
93 | if ( QApplication::desktop()->width() < 480 ) | 93 | if ( QApplication::desktop()->width() < 480 ) |
94 | dia.resize( 220, 240); | 94 | dia.resize( 220, 240); |
95 | else { | 95 | else { |
96 | dia.resize( 400,400); | 96 | dia.resize( 400,400); |
97 | } | 97 | } |
98 | dia.exec(); | 98 | dia.exec(); |
99 | break; | 99 | break; |
100 | } | 100 | } |
101 | } | 101 | } |
102 | return; | 102 | return; |
103 | } | 103 | } |
104 | #else | 104 | #else |
105 | { | 105 | { |
106 | if ( "uid:organizer" == n ) { | 106 | if ( "uid:organizer" == n ) { |
107 | ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); | 107 | ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); |
108 | return; | 108 | return; |
109 | } | 109 | } |
110 | QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); | 110 | QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); |
111 | if (attendees.count()) { | 111 | if (attendees.count()) { |
112 | Attendee *a; | 112 | Attendee *a; |
113 | for(a=attendees.first();a;a=attendees.next()) { | 113 | for(a=attendees.first();a;a=attendees.next()) { |
114 | if ( "uid:"+a->uid() == n ) { | 114 | if ( "uid:"+a->uid() == n ) { |
115 | bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); | 115 | bool res = ExternalAppHandler::instance()->requestDetailsFromKAPI(a->name(), a->email(), a->uid()); |
116 | return; | 116 | return; |
117 | } | 117 | } |
118 | } | 118 | } |
119 | } | 119 | } |
120 | return; | 120 | return; |
121 | } | 121 | } |
122 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); | 122 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); |
123 | // the result should now arrive through method insertAttendees | 123 | // the result should now arrive through method insertAttendees |
124 | //QString uid = "uid:"+(*it).uid(); | 124 | //QString uid = "uid:"+(*it).uid(); |
125 | #endif | 125 | #endif |
126 | if ( n.left(6) == "mailto" ) { | 126 | if ( n.left(6) == "mailto" ) { |
127 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); | 127 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); |
128 | #ifndef DESKTOP_VERSION | 128 | #ifndef DESKTOP_VERSION |
129 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); | 129 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); |
130 | e << n.mid(7); | 130 | e << n.mid(7); |
131 | #endif | 131 | #endif |
132 | 132 | ||
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||
136 | #ifndef KORG_NODCOP | 136 | #ifndef KORG_NODCOP |
137 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; | 137 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; |
138 | QString tmpStr; | 138 | QString tmpStr; |
139 | if (n.startsWith("mailto:")) { | 139 | if (n.startsWith("mailto:")) { |
140 | KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); | 140 | KApplication::kApplication()->invokeMailer(n.mid(7),QString::null); |
141 | //emit showIncidence(n); | 141 | //emit showIncidence(n); |
142 | return; | 142 | return; |
143 | } else if (n.startsWith("uid:")) { | 143 | } else if (n.startsWith("uid:")) { |
144 | DCOPClient *client = KApplication::kApplication()->dcopClient(); | 144 | DCOPClient *client = KApplication::kApplication()->dcopClient(); |
145 | const QByteArray noParamData; | 145 | const QByteArray noParamData; |
146 | const QByteArray paramData; | 146 | const QByteArray paramData; |
147 | QByteArray replyData; | 147 | QByteArray replyData; |
148 | QCString replyTypeStr; | 148 | QCString replyTypeStr; |
149 | #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) | 149 | #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) |
150 | bool foundAbbrowser = PING_ABBROWSER; | 150 | bool foundAbbrowser = PING_ABBROWSER; |
151 | 151 | ||
152 | if (foundAbbrowser) { | 152 | if (foundAbbrowser) { |
153 | //KAddressbook is already running, so just DCOP to it to bring up the contact editor | 153 | //KAddressbook is already running, so just DCOP to it to bring up the contact editor |
154 | //client->send("kaddressbook","KAddressBookIface", | 154 | //client->send("kaddressbook","KAddressBookIface", |
155 | QDataStream arg(paramData, IO_WriteOnly); | 155 | QDataStream arg(paramData, IO_WriteOnly); |
156 | arg << n.mid(6); | 156 | arg << n.mid(6); |
157 | client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); | 157 | client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); |
158 | return; | 158 | return; |
159 | } else { | 159 | } else { |
160 | /* | 160 | /* |
161 | KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. | 161 | KaddressBook is not already running. Pass it the UID of the contact via the command line while starting it - its neater. |
162 | We start it without its main interface | 162 | We start it without its main interface |
163 | */ | 163 | */ |
164 | KIconLoader* iconLoader = new KIconLoader(); | 164 | KIconLoader* iconLoader = new KIconLoader(); |
165 | QString iconPath = iconLoader->iconPath("go",KIcon::Small); | 165 | QString iconPath = iconLoader->iconPath("go",KIcon::Small); |
166 | ActionManager::setStartedKAddressBook(true); | 166 | ActionManager::setStartedKAddressBook(true); |
167 | tmpStr = "kaddressbook --editor-only --uid "; | 167 | tmpStr = "kaddressbook --editor-only --uid "; |
168 | tmpStr += KProcess::quote(n.mid(6)); | 168 | tmpStr += KProcess::quote(n.mid(6)); |
169 | KRun::runCommand(tmpStr,"KAddressBook",iconPath); | 169 | KRun::runCommand(tmpStr,"KAddressBook",iconPath); |
170 | return; | 170 | return; |
171 | } | 171 | } |
172 | } else { | 172 | } else { |
173 | //QTextBrowser::setSource(n); | 173 | //QTextBrowser::setSource(n); |
174 | } | 174 | } |
175 | #endif | 175 | #endif |
176 | } | 176 | } |
177 | 177 | ||
178 | void KOEventViewer::addTag(const QString & tag,const QString & text) | 178 | void KOEventViewer::addTag(const QString & tag,const QString & text) |
179 | { | 179 | { |
180 | int number=text.contains("\n"); | 180 | int number=text.contains("\n"); |
181 | QString str = "<" + tag + ">"; | 181 | QString str = "<" + tag + ">"; |
182 | QString tmpText=text; | 182 | QString tmpText=text; |
183 | QString tmpStr=str; | 183 | QString tmpStr=str; |
184 | if(number !=-1) | 184 | if(number !=-1) |
185 | { | 185 | { |
186 | if (number > 0) { | 186 | if (number > 0) { |
187 | int pos=0; | 187 | int pos=0; |
188 | QString tmp; | 188 | QString tmp; |
189 | for(int i=0;i<=number;i++) { | 189 | for(int i=0;i<=number;i++) { |
190 | pos=tmpText.find("\n"); | 190 | pos=tmpText.find("\n"); |
191 | tmp=tmpText.left(pos); | 191 | tmp=tmpText.left(pos); |
192 | tmpText=tmpText.right(tmpText.length()-pos-1); | 192 | tmpText=tmpText.right(tmpText.length()-pos-1); |
193 | tmpStr+=tmp+"<br>"; | 193 | tmpStr+=tmp+"<br>"; |
194 | } | 194 | } |
195 | } | 195 | } |
196 | else tmpStr += tmpText; | 196 | else tmpStr += tmpText; |
197 | tmpStr+="</" + tag + ">"; | 197 | tmpStr+="</" + tag + ">"; |
198 | mText.append(tmpStr); | 198 | mText.append(tmpStr); |
199 | } | 199 | } |
200 | else | 200 | else |
201 | { | 201 | { |
202 | str += text + "</" + tag + ">"; | 202 | str += text + "</" + tag + ">"; |
203 | mText.append(str); | 203 | mText.append(str); |
204 | } | 204 | } |
205 | } | 205 | } |
206 | 206 | ||
207 | void KOEventViewer::setColorMode( int m ) | 207 | void KOEventViewer::setColorMode( int m ) |
208 | { | 208 | { |
209 | mColorMode = m; | 209 | mColorMode = m; |
210 | } | 210 | } |
211 | void KOEventViewer::appendEvent(Event *event, int mode ) | 211 | void KOEventViewer::appendEvent(Event *event, int mode ) |
212 | { | 212 | { |
213 | mMailSubject = ""; | 213 | mMailSubject = ""; |
214 | mCurrentIncidence = event; | 214 | mCurrentIncidence = event; |
215 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 215 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
216 | topLevelWidget()->setCaption(i18n("Event Viewer")); | 216 | topLevelWidget()->setCaption(i18n("Event Viewer")); |
217 | if ( mode == 0 ) { | 217 | if ( mode == 0 ) { |
218 | addTag("h2",event->summary()); | 218 | addTag("h2",event->summary()); |
219 | } | 219 | } |
220 | else { | 220 | else { |
221 | if ( mColorMode == 1 ) { | 221 | if ( mColorMode == 1 ) { |
222 | mText +="<font color=\"#00A000\">"; | 222 | mText +="<font color=\"#00A000\">"; |
223 | } | 223 | } |
224 | if ( mColorMode == 2 ) { | 224 | if ( mColorMode == 2 ) { |
225 | mText +="<font color=\"#C00000\">"; | 225 | mText +="<font color=\"#C00000\">"; |
226 | } | 226 | } |
227 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; | 227 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; |
228 | if ( mode == 1 ) { | 228 | if ( mode == 1 ) { |
229 | addTag("h2",i18n( "Local: " ) +event->summary()); | 229 | addTag("h2",i18n( "Local: " ) +event->summary()); |
230 | } else { | 230 | } else { |
231 | addTag("h2",i18n( "Remote: " ) +event->summary()); | 231 | addTag("h2",i18n( "Remote: " ) +event->summary()); |
232 | } | 232 | } |
233 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 233 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
234 | if ( mColorMode ) | 234 | if ( mColorMode ) |
235 | mText += "</font>"; | 235 | mText += "</font>"; |
236 | } | 236 | } |
237 | mMailSubject += i18n( "Meeting " )+ event->summary(); | 237 | mMailSubject += i18n( "Meeting " )+ event->summary(); |
238 | if (event->cancelled ()) { | 238 | if (event->cancelled ()) { |
239 | mText +="<font color=\"#B00000\">"; | 239 | mText +="<font color=\"#B00000\">"; |
240 | addTag("i",i18n("This event has been cancelled!")); | 240 | addTag("i",i18n("This event has been cancelled!")); |
241 | mText.append("<br>"); | 241 | mText.append("<br>"); |
242 | mText += "</font>"; | 242 | mText += "</font>"; |
243 | mMailSubject += i18n("(cancelled)"); | 243 | mMailSubject += i18n("(cancelled)"); |
244 | } | 244 | } |
245 | if (!event->location().isEmpty()) { | 245 | if (!event->location().isEmpty()) { |
246 | addTag("b",i18n("Location: ")); | 246 | addTag("b",i18n("Location: ")); |
247 | mText.append(event->location()+"<br>"); | 247 | mText.append(event->location()+"<br>"); |
248 | mMailSubject += i18n(" at ") + event->location(); | 248 | mMailSubject += i18n(" at ") + event->location(); |
249 | } | 249 | } |
250 | if (event->doesFloat()) { | 250 | if (event->doesFloat()) { |
251 | if (event->isMultiDay()) { | 251 | if (event->isMultiDay()) { |
252 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") | 252 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") |
253 | .arg(event->dtStartDateStr(shortDate)) | 253 | .arg(event->dtStartDateStr(shortDate)) |
254 | .arg(event->dtEndDateStr(shortDate))); | 254 | .arg(event->dtEndDateStr(shortDate))); |
255 | } else { | 255 | } else { |
256 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); | 256 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); |
257 | } | 257 | } |
258 | } else { | 258 | } else { |
259 | if (event->isMultiDay()) { | 259 | if (event->isMultiDay()) { |
260 | mText.append(i18n("<p><b>From:</b> %1</p> ") | 260 | mText.append(i18n("<p><b>From:</b> %1</p> ") |
261 | .arg(event->dtStartStr( shortDate))); | 261 | .arg(event->dtStartStr( shortDate))); |
262 | mText.append(i18n("<p><b>To:</b> %1</p>") | 262 | mText.append(i18n("<p><b>To:</b> %1</p>") |
263 | .arg(event->dtEndStr(shortDate))); | 263 | .arg(event->dtEndStr(shortDate))); |
264 | } else { | 264 | } else { |
265 | mText.append(i18n("<p><b>On:</b> %1</p> ") | 265 | mText.append(i18n("<p><b>On:</b> %1</p> ") |
266 | .arg(event->dtStartDateStr( shortDate ))); | 266 | .arg(event->dtStartDateStr( shortDate ))); |
267 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") | 267 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") |
268 | .arg(event->dtStartTimeStr()) | 268 | .arg(event->dtStartTimeStr()) |
269 | .arg(event->dtEndTimeStr())); | 269 | .arg(event->dtEndTimeStr())); |
270 | } | 270 | } |
271 | } | 271 | } |
272 | 272 | ||
273 | if (event->recurrence()->doesRecur()) { | 273 | if (event->recurrence()->doesRecur()) { |
274 | 274 | ||
275 | QString recurText = event->recurrence()->recurrenceText(); | 275 | QString recurText = event->recurrence()->recurrenceText(); |
276 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); | 276 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); |
277 | bool last; | 277 | bool last; |
278 | QDate start = QDate::currentDate(); | 278 | QDate start = QDate::currentDate(); |
279 | QDate next; | 279 | QDate next; |
280 | next = event->recurrence()->getPreviousDate( start , &last ); | 280 | next = event->recurrence()->getPreviousDate( start , &last ); |
281 | if ( !last ) { | 281 | if ( !last ) { |
282 | next = event->recurrence()->getNextDate( start.addDays( - 1 ) ); | 282 | next = event->recurrence()->getNextDate( start.addDays( - 1 ) ); |
283 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); | 283 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); |
284 | addTag("p", KGlobal::locale()->formatDate( next, shortDate )); | 284 | addTag("p", KGlobal::locale()->formatDate( next, shortDate )); |
285 | QDateTime nextdt = QDateTime( next, event->dtStart().time()); | 285 | QDateTime nextdt = QDateTime( next, event->dtStart().time()); |
286 | mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( nextdt, true ); | 286 | mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( nextdt, true ); |
287 | 287 | ||
288 | } else { | 288 | } else { |
289 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); | 289 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); |
290 | addTag("p", KGlobal::locale()->formatDate( next, shortDate )); | 290 | addTag("p", KGlobal::locale()->formatDate( next, shortDate )); |
291 | } | 291 | } |
292 | } else { | 292 | } else { |
293 | mMailSubject += i18n(" - " )+event->dtStartStr( true ); | 293 | mMailSubject += i18n(" - " )+event->dtStartStr( true ); |
294 | 294 | ||
295 | } | 295 | } |
296 | 296 | ||
297 | 297 | ||
298 | if (event->isAlarmEnabled()) { | 298 | if (event->isAlarmEnabled()) { |
299 | Alarm *alarm =event->alarms().first() ; | 299 | Alarm *alarm =event->alarms().first() ; |
300 | QDateTime t = alarm->time(); | 300 | QDateTime t = alarm->time(); |
301 | int min = t.secsTo( event->dtStart() )/60; | 301 | int min = t.secsTo( event->dtStart() )/60; |
302 | QString s =i18n("( %1 min before )").arg( min ); | 302 | QString s =i18n("( %1 min before )").arg( min ); |
303 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); | 303 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); |
304 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 304 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); |
305 | //addTag("p",s); | 305 | //addTag("p",s); |
306 | } | 306 | } |
307 | 307 | ||
308 | addTag("b",i18n("Access: ")); | 308 | addTag("b",i18n("Access: ")); |
309 | mText.append(event->secrecyStr()+"<br>"); | 309 | mText.append(event->secrecyStr()+"<br>"); |
310 | if (!event->description().isEmpty()) { | 310 | if (!event->description().isEmpty()) { |
311 | addTag("p",i18n("<b>Details: </b>")); | 311 | addTag("p",i18n("<b>Details: </b>")); |
312 | addTag("p",event->description()); | 312 | addTag("p",event->description()); |
313 | } | 313 | } |
314 | 314 | ||
315 | formatCategories(event); | 315 | formatCategories(event); |
316 | 316 | ||
317 | formatReadOnly(event); | 317 | formatReadOnly(event); |
318 | formatAttendees(event); | 318 | formatAttendees(event); |
319 | 319 | ||
320 | setText(mText); | 320 | setText(mText); |
321 | //QWhatsThis::add(this,mText); | 321 | //QWhatsThis::add(this,mText); |
322 | 322 | ||
323 | } | 323 | } |
324 | 324 | ||
325 | void KOEventViewer::appendTodo(Todo *event, int mode ) | 325 | void KOEventViewer::appendTodo(Todo *event, int mode ) |
326 | { | 326 | { |
327 | mMailSubject = ""; | 327 | mMailSubject = ""; |
328 | mCurrentIncidence = event; | 328 | mCurrentIncidence = event; |
329 | topLevelWidget()->setCaption(i18n("Todo Viewer")); | 329 | topLevelWidget()->setCaption(i18n("Todo Viewer")); |
330 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 330 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
331 | if (mode == 0 ) | 331 | if (mode == 0 ) |
332 | addTag("h2",event->summary()); | 332 | addTag("h2",event->summary()); |
333 | else { | 333 | else { |
334 | if ( mColorMode == 1 ) { | 334 | if ( mColorMode == 1 ) { |
335 | mText +="<font color=\"#00A000\">"; | 335 | mText +="<font color=\"#00A000\">"; |
336 | } | 336 | } |
337 | if ( mColorMode == 2 ) { | 337 | if ( mColorMode == 2 ) { |
338 | mText +="<font color=\"#B00000\">"; | 338 | mText +="<font color=\"#B00000\">"; |
339 | } | 339 | } |
340 | if ( mode == 1 ) { | 340 | if ( mode == 1 ) { |
341 | addTag("h2",i18n( "Local: " ) +event->summary()); | 341 | addTag("h2",i18n( "Local: " ) +event->summary()); |
342 | } else { | 342 | } else { |
343 | addTag("h2",i18n( "Remote: " ) +event->summary()); | 343 | addTag("h2",i18n( "Remote: " ) +event->summary()); |
344 | } | 344 | } |
345 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 345 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
346 | if ( mColorMode ) | 346 | if ( mColorMode ) |
347 | mText += "</font>"; | 347 | mText += "</font>"; |
348 | } | 348 | } |
349 | mMailSubject += i18n( "Todo " )+ event->summary(); | 349 | mMailSubject += i18n( "Todo " )+ event->summary(); |
350 | if (event->cancelled ()) { | 350 | if (event->cancelled ()) { |
351 | mText +="<font color=\"#B00000\">"; | 351 | mText +="<font color=\"#B00000\">"; |
352 | addTag("i",i18n("This todo has been cancelled!")); | 352 | addTag("i",i18n("This todo has been cancelled!")); |
353 | mText.append("<br>"); | 353 | mText.append("<br>"); |
354 | mText += "</font>"; | 354 | mText += "</font>"; |
355 | mMailSubject += i18n("(cancelled)"); | 355 | mMailSubject += i18n("(cancelled)"); |
356 | } | 356 | } |
357 | 357 | ||
358 | if (!event->location().isEmpty()) { | 358 | if (!event->location().isEmpty()) { |
359 | addTag("b",i18n("Location: ")); | 359 | addTag("b",i18n("Location: ")); |
360 | mText.append(event->location()+"<br>"); | 360 | mText.append(event->location()+"<br>"); |
361 | mMailSubject += i18n(" at ") + event->location(); | 361 | mMailSubject += i18n(" at ") + event->location(); |
362 | } | 362 | } |
363 | if (event->hasStartDate()) { | ||
364 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); | ||
365 | } | ||
363 | if (event->hasDueDate()) { | 366 | if (event->hasDueDate()) { |
364 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); | 367 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); |
365 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); | 368 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); |
366 | } | 369 | } |
367 | addTag("b",i18n("Access: ")); | 370 | addTag("b",i18n("Access: ")); |
368 | mText.append(event->secrecyStr()+"<br>"); | 371 | mText.append(event->secrecyStr()+"<br>"); |
369 | if (!event->description().isEmpty()) { | 372 | if (!event->description().isEmpty()) { |
370 | addTag("p",i18n("<b>Details: </b>")); | 373 | addTag("p",i18n("<b>Details: </b>")); |
371 | addTag("p",event->description()); | 374 | addTag("p",event->description()); |
372 | } | 375 | } |
373 | 376 | ||
374 | formatCategories(event); | 377 | formatCategories(event); |
375 | 378 | ||
376 | mText.append(i18n("<p><b>Priority:</b> %2</p>") | 379 | mText.append(i18n("<p><b>Priority:</b> %2</p>") |
377 | .arg(QString::number(event->priority()))); | 380 | .arg(QString::number(event->priority()))); |
378 | 381 | ||
379 | mText.append(i18n("<p><i>%1 % completed</i></p>") | 382 | mText.append(i18n("<p><i>%1 % completed</i></p>") |
380 | .arg(event->percentComplete())); | 383 | .arg(event->percentComplete())); |
381 | 384 | ||
382 | formatReadOnly(event); | 385 | formatReadOnly(event); |
383 | formatAttendees(event); | 386 | formatAttendees(event); |
384 | 387 | if ( event->relatedTo() ) { | |
388 | addTag("b",i18n("Parent todo: ")); | ||
389 | mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); | ||
390 | } | ||
391 | QPtrList<Incidence> Relations = event->relations(); | ||
392 | Incidence *to; | ||
393 | if ( Relations.first() ) | ||
394 | addTag("b",i18n("Sub todos:<br>")); | ||
395 | for (to=Relations.first();to;to=Relations.next()) { | ||
396 | mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); | ||
397 | |||
398 | } | ||
385 | setText(mText); | 399 | setText(mText); |
386 | } | 400 | } |
387 | 401 | ||
388 | void KOEventViewer::formatCategories(Incidence *event) | 402 | void KOEventViewer::formatCategories(Incidence *event) |
389 | { | 403 | { |
390 | if (!event->categoriesStr().isEmpty()) { | 404 | if (!event->categoriesStr().isEmpty()) { |
391 | if (event->categories().count() == 1) { | 405 | if (event->categories().count() == 1) { |
392 | addTag("h3",i18n("Category")); | 406 | addTag("h3",i18n("Category")); |
393 | } else { | 407 | } else { |
394 | addTag("h3",i18n("Categories")); | 408 | addTag("h3",i18n("Categories")); |
395 | } | 409 | } |
396 | addTag("p",event->categoriesStr()); | 410 | addTag("p",event->categoriesStr()); |
397 | } | 411 | } |
398 | } | 412 | } |
399 | void KOEventViewer::formatAttendees(Incidence *event) | 413 | void KOEventViewer::formatAttendees(Incidence *event) |
400 | { | 414 | { |
401 | QPtrList<Attendee> attendees = event->attendees(); | 415 | QPtrList<Attendee> attendees = event->attendees(); |
402 | if (attendees.count()) { | 416 | if (attendees.count()) { |
403 | 417 | ||
404 | 418 | ||
405 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); | 419 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); |
406 | addTag("h3",i18n("Organizer")); | 420 | addTag("h3",i18n("Organizer")); |
407 | mText.append("<ul><li>"); | 421 | mText.append("<ul><li>"); |
408 | #ifndef KORG_NOKABC | 422 | #ifndef KORG_NOKABC |
409 | 423 | ||
410 | #ifdef DESKTOP_VERSION | 424 | #ifdef DESKTOP_VERSION |
411 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); | 425 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); |
412 | KABC::Addressee::List addressList; | 426 | KABC::Addressee::List addressList; |
413 | addressList = add_book->findByEmail(event->organizer()); | 427 | addressList = add_book->findByEmail(event->organizer()); |
414 | KABC::Addressee o = addressList.first(); | 428 | KABC::Addressee o = addressList.first(); |
415 | if (!o.isEmpty() && addressList.size()<2) { | 429 | if (!o.isEmpty() && addressList.size()<2) { |
416 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 430 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
417 | mText += o.formattedName(); | 431 | mText += o.formattedName(); |
418 | mText += "</a>\n"; | 432 | mText += "</a>\n"; |
419 | } else { | 433 | } else { |
420 | mText.append(event->organizer()); | 434 | mText.append(event->organizer()); |
421 | } | 435 | } |
422 | #else //DESKTOP_VERSION | 436 | #else //DESKTOP_VERSION |
423 | mText += "<a href=\"uid:organizer\">"; | 437 | mText += "<a href=\"uid:organizer\">"; |
424 | mText += event->organizer(); | 438 | mText += event->organizer(); |
425 | mText += "</a>\n"; | 439 | mText += "</a>\n"; |
426 | #endif //DESKTOP_VERSION | 440 | #endif //DESKTOP_VERSION |
427 | 441 | ||
428 | 442 | ||
429 | #else | 443 | #else |
430 | mText.append(event->organizer()); | 444 | mText.append(event->organizer()); |
431 | #endif | 445 | #endif |
432 | 446 | ||
433 | if (iconPath) { | 447 | if (iconPath) { |
434 | mText += " <a href=\"mailto:" + event->organizer() + "\">"; | 448 | mText += " <a href=\"mailto:" + event->organizer() + "\">"; |
435 | mText += "<IMG src=\"" + iconPath + "\">"; | 449 | mText += "<IMG src=\"" + iconPath + "\">"; |
436 | mText += "</a>\n"; | 450 | mText += "</a>\n"; |
437 | } | 451 | } |
438 | mText.append("</li></ul>"); | 452 | mText.append("</li></ul>"); |
439 | 453 | ||
440 | addTag("h3",i18n("Attendees")); | 454 | addTag("h3",i18n("Attendees")); |
441 | Attendee *a; | 455 | Attendee *a; |
442 | mText.append("<ul>"); | 456 | mText.append("<ul>"); |
443 | for(a=attendees.first();a;a=attendees.next()) { | 457 | for(a=attendees.first();a;a=attendees.next()) { |
444 | #ifndef KORG_NOKABC | 458 | #ifndef KORG_NOKABC |
445 | #ifdef DESKTOP_VERSION | 459 | #ifdef DESKTOP_VERSION |
446 | if (a->name().isEmpty()) { | 460 | if (a->name().isEmpty()) { |
447 | addressList = add_book->findByEmail(a->email()); | 461 | addressList = add_book->findByEmail(a->email()); |
448 | KABC::Addressee o = addressList.first(); | 462 | KABC::Addressee o = addressList.first(); |
449 | if (!o.isEmpty() && addressList.size()<2) { | 463 | if (!o.isEmpty() && addressList.size()<2) { |
450 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 464 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
451 | mText += o.formattedName(); | 465 | mText += o.formattedName(); |
452 | mText += "</a>\n"; | 466 | mText += "</a>\n"; |
453 | } else { | 467 | } else { |
454 | mText += "<li>"; | 468 | mText += "<li>"; |
455 | mText.append(a->email()); | 469 | mText.append(a->email()); |
456 | mText += "\n"; | 470 | mText += "\n"; |
457 | } | 471 | } |
458 | } else { | 472 | } else { |
459 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 473 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
460 | if (!a->name().isEmpty()) mText += a->name(); | 474 | if (!a->name().isEmpty()) mText += a->name(); |
461 | else mText += a->email(); | 475 | else mText += a->email(); |
462 | mText += "</a>\n"; | 476 | mText += "</a>\n"; |
463 | } | 477 | } |
464 | #else //DESKTOP_VERSION | 478 | #else //DESKTOP_VERSION |
465 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 479 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
466 | if (!a->name().isEmpty()) mText += a->name(); | 480 | if (!a->name().isEmpty()) mText += a->name(); |
467 | else mText += a->email(); | 481 | else mText += a->email(); |
468 | mText += "</a>\n"; | 482 | mText += "</a>\n"; |
469 | #endif //DESKTOP_VERSION | 483 | #endif //DESKTOP_VERSION |
470 | #else | 484 | #else |
471 | //qDebug("nokabc "); | 485 | //qDebug("nokabc "); |
472 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 486 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
473 | if (!a->name().isEmpty()) mText += a->name(); | 487 | if (!a->name().isEmpty()) mText += a->name(); |
474 | else mText += a->email(); | 488 | else mText += a->email(); |
475 | mText += "</a>\n"; | 489 | mText += "</a>\n"; |
476 | #endif | 490 | #endif |
477 | 491 | ||
478 | 492 | ||
479 | if (!a->email().isEmpty()) { | 493 | if (!a->email().isEmpty()) { |
480 | if (iconPath) { | 494 | if (iconPath) { |
481 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; | 495 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; |
482 | mText += "<IMG src=\"" + iconPath + "\">"; | 496 | mText += "<IMG src=\"" + iconPath + "\">"; |
483 | mText += "</a>\n"; | 497 | mText += "</a>\n"; |
484 | } | 498 | } |
485 | } | 499 | } |
486 | if (a->status() != Attendee::NeedsAction ) | 500 | if (a->status() != Attendee::NeedsAction ) |
487 | mText +="[" + a->statusStr() + "] "; | 501 | mText +="[" + a->statusStr() + "] "; |
488 | if (a->role() == Attendee::Chair ) | 502 | if (a->role() == Attendee::Chair ) |
489 | mText +="(" + a->roleStr().left(1) + ".)"; | 503 | mText +="(" + a->roleStr().left(1) + ".)"; |
490 | } | 504 | } |
491 | mText.append("</li></ul>"); | 505 | mText.append("</li></ul>"); |
492 | } | 506 | } |
493 | 507 | ||
494 | } | 508 | } |
495 | void KOEventViewer::appendJournal(Journal *jour, int mode ) | 509 | void KOEventViewer::appendJournal(Journal *jour, int mode ) |
496 | { | 510 | { |
497 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 511 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
498 | if (mode == 0 ) { | 512 | if (mode == 0 ) { |
499 | addTag("h2",i18n("Journal from: ")); | 513 | addTag("h2",i18n("Journal from: ")); |
500 | } | 514 | } |
501 | else { | 515 | else { |
502 | if ( mode == 1 ) { | 516 | if ( mode == 1 ) { |
503 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); | 517 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); |
504 | } else { | 518 | } else { |
505 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); | 519 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); |
506 | } | 520 | } |
507 | } | 521 | } |
508 | topLevelWidget()->setCaption("Journal Viewer"); | 522 | topLevelWidget()->setCaption("Journal Viewer"); |
509 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); | 523 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); |
510 | addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); | 524 | addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); |
511 | if (!jour->description().isEmpty()) { | 525 | if (!jour->description().isEmpty()) { |
512 | addTag("p",jour->description()); | 526 | addTag("p",jour->description()); |
513 | } | 527 | } |
514 | setText(mText); | 528 | setText(mText); |
515 | } | 529 | } |
516 | 530 | ||
517 | void KOEventViewer::formatReadOnly(Incidence *event) | 531 | void KOEventViewer::formatReadOnly(Incidence *event) |
518 | { | 532 | { |
519 | if (event->isReadOnly()) { | 533 | if (event->isReadOnly()) { |
520 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); | 534 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); |
521 | } | 535 | } |
522 | } | 536 | } |
523 | void KOEventViewer::setSyncMode( bool b ) | 537 | void KOEventViewer::setSyncMode( bool b ) |
524 | { | 538 | { |
525 | mSyncMode = b; | 539 | mSyncMode = b; |
526 | } | 540 | } |
527 | 541 | ||
528 | 542 | ||
529 | void KOEventViewer::setTodo(Todo *event, bool clearV ) | 543 | void KOEventViewer::setTodo(Todo *event, bool clearV ) |
530 | { | 544 | { |
531 | if ( clearV ) | 545 | if ( clearV ) |
532 | clearEvents(); | 546 | clearEvents(); |
533 | if ( mSyncMode ) { | 547 | if ( mSyncMode ) { |
534 | if ( clearV ) | 548 | if ( clearV ) |
535 | appendTodo(event,1 ); | 549 | appendTodo(event,1 ); |
536 | else | 550 | else |
537 | appendTodo(event,2); | 551 | appendTodo(event,2); |
538 | } else | 552 | } else |
539 | appendTodo(event); | 553 | appendTodo(event); |
540 | } | 554 | } |
541 | void KOEventViewer::setJournal(Journal *event, bool clearV ) | 555 | void KOEventViewer::setJournal(Journal *event, bool clearV ) |
542 | { | 556 | { |
543 | if ( clearV ) | 557 | if ( clearV ) |
544 | clearEvents(); | 558 | clearEvents(); |
545 | if ( mSyncMode ) { | 559 | if ( mSyncMode ) { |
546 | if ( clearV ) | 560 | if ( clearV ) |
547 | appendJournal(event, 1); | 561 | appendJournal(event, 1); |
548 | else | 562 | else |
549 | appendJournal(event, 2); | 563 | appendJournal(event, 2); |
550 | } else | 564 | } else |
551 | appendJournal(event); | 565 | appendJournal(event); |
552 | } | 566 | } |
553 | 567 | ||
554 | void KOEventViewer::setEvent(Event *event) | 568 | void KOEventViewer::setEvent(Event *event) |
555 | { | 569 | { |
556 | clearEvents(); | 570 | clearEvents(); |
557 | if ( mSyncMode ) | 571 | if ( mSyncMode ) |
558 | appendEvent(event, 1); | 572 | appendEvent(event, 1); |
559 | else | 573 | else |
560 | appendEvent(event); | 574 | appendEvent(event); |
561 | } | 575 | } |
562 | 576 | ||
563 | void KOEventViewer::addEvent(Event *event) | 577 | void KOEventViewer::addEvent(Event *event) |
564 | { | 578 | { |
565 | if ( mSyncMode ) | 579 | if ( mSyncMode ) |
566 | appendEvent(event, 2); | 580 | appendEvent(event, 2); |
567 | else | 581 | else |
568 | appendEvent(event); | 582 | appendEvent(event); |
569 | } | 583 | } |
570 | 584 | ||
571 | void KOEventViewer::clearEvents(bool now) | 585 | void KOEventViewer::clearEvents(bool now) |
572 | { | 586 | { |
573 | mText = ""; | 587 | mText = ""; |
574 | if (now) setText(mText); | 588 | if (now) setText(mText); |
575 | } | 589 | } |
576 | 590 | ||
577 | void KOEventViewer::addText(QString text) | 591 | void KOEventViewer::addText(QString text) |
578 | { | 592 | { |
579 | mText.append(text); | 593 | mText.append(text); |
580 | setText(mText); | 594 | setText(mText); |
581 | } | 595 | } |
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 772fd95..3979ed2 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp | |||
@@ -1,256 +1,259 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <klocale.h> | 20 | #include <klocale.h> |
21 | 21 | ||
22 | #include <libkcal/event.h> | 22 | #include <libkcal/event.h> |
23 | #include <qpushbutton.h> | 23 | #include <qpushbutton.h> |
24 | 24 | ||
25 | #include "koeventviewer.h" | 25 | #include "koeventviewer.h" |
26 | #include "koprefs.h" | 26 | #include "koprefs.h" |
27 | #include <libkcal/todo.h> | 27 | #include <libkcal/todo.h> |
28 | #include "qapp.h" | 28 | #include "qapp.h" |
29 | 29 | ||
30 | #include "koeventviewerdialog.h" | 30 | #include "koeventviewerdialog.h" |
31 | extern int globalFlagBlockAgenda; | 31 | extern int globalFlagBlockAgenda; |
32 | 32 | ||
33 | KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) | 33 | KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) |
34 | : KDialogBase(parent,name, | 34 | : KDialogBase(parent,name, |
35 | #ifndef DESKTOP_VERSION | 35 | #ifndef DESKTOP_VERSION |
36 | true , | 36 | true , |
37 | #else | 37 | #else |
38 | false, | 38 | false, |
39 | #endif | 39 | #endif |
40 | i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) | 40 | i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) |
41 | { | 41 | { |
42 | 42 | ||
43 | mEventViewer = new KOEventViewer(this); | 43 | mEventViewer = new KOEventViewer(this); |
44 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); | 44 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); |
45 | setMainWidget(mEventViewer); | 45 | setMainWidget(mEventViewer); |
46 | setButtonText(Ok, i18n("Edit") ); | 46 | setButtonText(Ok, i18n("Edit") ); |
47 | 47 | ||
48 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), | 48 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), |
49 | SLOT(editIncidence())); | 49 | SLOT(editIncidence())); |
50 | QObject::connect(this,SIGNAL(user1Clicked()), | 50 | QObject::connect(this,SIGNAL(user1Clicked()), |
51 | SLOT(showIncidence())); | 51 | SLOT(showIncidence())); |
52 | mIncidence = 0; | 52 | mIncidence = 0; |
53 | // TODO: Set a sensible size (based on the content?). | 53 | // TODO: Set a sensible size (based on the content?). |
54 | //showMaximized(); | 54 | //showMaximized(); |
55 | //qDebug("++++++++++++KOEventViewerDialog() "); | 55 | //qDebug("++++++++++++KOEventViewerDialog() "); |
56 | // if ( KOPrefs::instance()->mCompactDialogs ) { | 56 | // if ( KOPrefs::instance()->mCompactDialogs ) { |
57 | // setFixedSize( 240,284 ); | 57 | // setFixedSize( 240,284 ); |
58 | // move( 0, 15 ); | 58 | // move( 0, 15 ); |
59 | // } else { | 59 | // } else { |
60 | // setMinimumSize(300,200); | 60 | // setMinimumSize(300,200); |
61 | // resize(320,300); | 61 | // resize(320,300); |
62 | // } | 62 | // } |
63 | mSyncMode = false; | 63 | mSyncMode = false; |
64 | mSyncResult = 0; | 64 | mSyncResult = 0; |
65 | 65 | ||
66 | } | 66 | } |
67 | 67 | ||
68 | KOEventViewerDialog::~KOEventViewerDialog() | 68 | KOEventViewerDialog::~KOEventViewerDialog() |
69 | { | 69 | { |
70 | //qDebug("-------~KOEventViewerDialog() "); | 70 | //qDebug("-------~KOEventViewerDialog() "); |
71 | } | 71 | } |
72 | void KOEventViewerDialog::showMe() | 72 | void KOEventViewerDialog::showMe() |
73 | { | 73 | { |
74 | 74 | ||
75 | #ifdef DESKTOP_VERSION | 75 | #ifdef DESKTOP_VERSION |
76 | show(); | 76 | show(); |
77 | #else | 77 | #else |
78 | showMaximized(); | 78 | showMaximized(); |
79 | #endif | 79 | #endif |
80 | setFocus(); | 80 | setFocus(); |
81 | setActiveWindow(); | 81 | setActiveWindow(); |
82 | 82 | ||
83 | } | 83 | } |
84 | void KOEventViewerDialog::setSyncMode( bool b ) | 84 | void KOEventViewerDialog::setSyncMode( bool b ) |
85 | { | 85 | { |
86 | mSyncMode = b; | 86 | mSyncMode = b; |
87 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); | 87 | //qDebug("KOEventViewerDialog::setSyncMode %d ",mSyncMode ); |
88 | if ( mSyncMode ) { | 88 | if ( mSyncMode ) { |
89 | findButton( Close )->setText( i18n("Cancel Sync")); | 89 | findButton( Close )->setText( i18n("Cancel Sync")); |
90 | findButton( Ok )->setText( i18n("Remote")); | 90 | findButton( Ok )->setText( i18n("Remote")); |
91 | findButton( User1 )->setText( i18n("Local")); | 91 | findButton( User1 )->setText( i18n("Local")); |
92 | } else { | 92 | } else { |
93 | findButton( Close )->setText( i18n("Close")); | 93 | findButton( Close )->setText( i18n("Close")); |
94 | findButton( Ok )->setText( i18n("Edit")); | 94 | findButton( Ok )->setText( i18n("Edit")); |
95 | findButton( User1 )->setText( i18n("Agenda")); | 95 | findButton( User1 )->setText( i18n("Agenda")); |
96 | } | 96 | } |
97 | mEventViewer->setSyncMode( b ); | 97 | mEventViewer->setSyncMode( b ); |
98 | } | 98 | } |
99 | void KOEventViewerDialog::setColorMode( int m ) | 99 | void KOEventViewerDialog::setColorMode( int m ) |
100 | { | 100 | { |
101 | mEventViewer->setColorMode( m ); | 101 | mEventViewer->setColorMode( m ); |
102 | } | 102 | } |
103 | int KOEventViewerDialog::executeS( bool local ) | 103 | int KOEventViewerDialog::executeS( bool local ) |
104 | { | 104 | { |
105 | mSyncResult = 3; | 105 | mSyncResult = 3; |
106 | if ( local ) | 106 | if ( local ) |
107 | findButton( User1 )->setFocus(); | 107 | findButton( User1 )->setFocus(); |
108 | else | 108 | else |
109 | findButton( Ok )->setFocus(); | 109 | findButton( Ok )->setFocus(); |
110 | exec(); | 110 | exec(); |
111 | return mSyncResult; | 111 | return mSyncResult; |
112 | } | 112 | } |
113 | 113 | ||
114 | void KOEventViewerDialog::updateConfig() | 114 | void KOEventViewerDialog::updateConfig() |
115 | { | 115 | { |
116 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); | 116 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); |
117 | 117 | ||
118 | } | 118 | } |
119 | void KOEventViewerDialog::setEvent(Event *event) | 119 | void KOEventViewerDialog::setEvent(Event *event) |
120 | { | 120 | { |
121 | mEventViewer->setEvent(event); | 121 | mEventViewer->setEvent(event); |
122 | mIncidence = event; | 122 | mIncidence = event; |
123 | findButton( Close )->setFocus(); | 123 | findButton( Close )->setFocus(); |
124 | if ( !mSyncMode ) { | ||
125 | findButton( User1 )->setText( i18n("Agenda")); | ||
126 | } | ||
124 | } | 127 | } |
125 | void KOEventViewerDialog::setIncidence(Incidence *in ) | 128 | void KOEventViewerDialog::setIncidence(Incidence *in ) |
126 | { | 129 | { |
127 | if ( in->type() == "Event" ) | 130 | if ( in->type() == "Event" ) |
128 | setEvent( (Event*) in ); | 131 | setEvent( (Event*) in ); |
129 | else if ( in->type() =="Todo" ) | 132 | else if ( in->type() =="Todo" ) |
130 | setTodo( (Todo*) in ); | 133 | setTodo( (Todo*) in ); |
131 | else if ( in->type() =="Journal" ) | 134 | else if ( in->type() =="Journal" ) |
132 | setJournal( (Journal*) in ); | 135 | setJournal( (Journal*) in ); |
133 | } | 136 | } |
134 | void KOEventViewerDialog::addIncidence(Incidence *in) | 137 | void KOEventViewerDialog::addIncidence(Incidence *in) |
135 | { | 138 | { |
136 | if ( in->type() == "Event" ) | 139 | if ( in->type() == "Event" ) |
137 | addEvent( (Event*) in ); | 140 | addEvent( (Event*) in ); |
138 | else if ( in->type() =="Todo" ) | 141 | else if ( in->type() =="Todo" ) |
139 | mEventViewer->setTodo( (Todo*) in, false ); | 142 | mEventViewer->setTodo( (Todo*) in, false ); |
140 | else if ( in->type() =="Journal" ) | 143 | else if ( in->type() =="Journal" ) |
141 | mEventViewer->setJournal( (Journal*) in, false ); | 144 | mEventViewer->setJournal( (Journal*) in, false ); |
142 | if ( mSyncMode ) { | 145 | if ( mSyncMode ) { |
143 | findButton( User1 )->setFocus(); | 146 | findButton( User1 )->setFocus(); |
144 | setCaption(i18n("Conflict! Please choose entry")); | 147 | setCaption(i18n("Conflict! Please choose entry")); |
145 | } | 148 | } |
146 | } | 149 | } |
147 | 150 | ||
148 | void KOEventViewerDialog::addEvent(Event *event) | 151 | void KOEventViewerDialog::addEvent(Event *event) |
149 | { | 152 | { |
150 | mEventViewer->addEvent(event); | 153 | mEventViewer->addEvent(event); |
151 | mIncidence = event; | 154 | mIncidence = event; |
152 | findButton( Close )->setFocus(); | 155 | findButton( Close )->setFocus(); |
153 | if ( !mSyncMode ) { | 156 | if ( !mSyncMode ) { |
154 | findButton( User1 )->setText( i18n("Agenda")); | 157 | findButton( User1 )->setText( i18n("Agenda")); |
155 | } | 158 | } |
156 | } | 159 | } |
157 | 160 | ||
158 | void KOEventViewerDialog::setTodo(Todo *event) | 161 | void KOEventViewerDialog::setTodo(Todo *event) |
159 | { | 162 | { |
160 | mEventViewer->setTodo(event); | 163 | mEventViewer->setTodo(event); |
161 | mIncidence = (Incidence*)event; | 164 | mIncidence = (Incidence*)event; |
162 | findButton( Close )->setFocus(); | 165 | findButton( Close )->setFocus(); |
163 | if ( !mSyncMode ) { | 166 | if ( !mSyncMode ) { |
164 | findButton( User1 )->setText( i18n("Set complete")); | 167 | findButton( User1 )->setText( i18n("Set complete")); |
165 | } | 168 | } |
166 | } | 169 | } |
167 | void KOEventViewerDialog::setJournal(Journal *j) | 170 | void KOEventViewerDialog::setJournal(Journal *j) |
168 | { | 171 | { |
169 | mEventViewer->setJournal(j); | 172 | mEventViewer->setJournal(j); |
170 | mIncidence = (Incidence*)j; | 173 | mIncidence = (Incidence*)j; |
171 | findButton( Close )->setFocus(); | 174 | findButton( Close )->setFocus(); |
172 | if ( !mSyncMode ) { | 175 | if ( !mSyncMode ) { |
173 | findButton( User1 )->setText( i18n("Agenda")); | 176 | findButton( User1 )->setText( i18n("Agenda")); |
174 | } | 177 | } |
175 | } | 178 | } |
176 | 179 | ||
177 | void KOEventViewerDialog::addText(QString text) | 180 | void KOEventViewerDialog::addText(QString text) |
178 | { | 181 | { |
179 | mEventViewer->addText(text); | 182 | mEventViewer->addText(text); |
180 | findButton( Close )->setFocus(); | 183 | findButton( Close )->setFocus(); |
181 | } | 184 | } |
182 | void KOEventViewerDialog::editIncidence() | 185 | void KOEventViewerDialog::editIncidence() |
183 | { | 186 | { |
184 | if ( mSyncMode ) { | 187 | if ( mSyncMode ) { |
185 | mSyncResult = 2; | 188 | mSyncResult = 2; |
186 | accept(); | 189 | accept(); |
187 | return; | 190 | return; |
188 | } | 191 | } |
189 | if ( mIncidence ){ | 192 | if ( mIncidence ){ |
190 | #ifndef DESKTOP_VERSION | 193 | #ifndef DESKTOP_VERSION |
191 | hide(); | 194 | hide(); |
192 | #endif | 195 | #endif |
193 | emit editIncidence( mIncidence ); | 196 | emit editIncidence( mIncidence ); |
194 | } | 197 | } |
195 | } | 198 | } |
196 | void KOEventViewerDialog::showIncidence() | 199 | void KOEventViewerDialog::showIncidence() |
197 | { | 200 | { |
198 | 201 | ||
199 | if ( mSyncMode ) { | 202 | if ( mSyncMode ) { |
200 | mSyncResult = 1; | 203 | mSyncResult = 1; |
201 | accept(); | 204 | accept(); |
202 | return; | 205 | return; |
203 | } | 206 | } |
204 | 207 | ||
205 | if ( mIncidence ){ | 208 | if ( mIncidence ){ |
206 | #ifndef DESKTOP_VERSION | 209 | #ifndef DESKTOP_VERSION |
207 | hide(); | 210 | hide(); |
208 | #endif | 211 | #endif |
209 | QDate date; | 212 | QDate date; |
210 | if ( mIncidence->type() == "Todo" ) { | 213 | if ( mIncidence->type() == "Todo" ) { |
211 | /* | 214 | /* |
212 | if ( ((Todo*)mIncidence)->hasDueDate() ) | 215 | if ( ((Todo*)mIncidence)->hasDueDate() ) |
213 | date = ((Todo*)mIncidence)->dtDue().date(); | 216 | date = ((Todo*)mIncidence)->dtDue().date(); |
214 | else { | 217 | else { |
215 | globalFlagBlockAgenda = 2; | 218 | globalFlagBlockAgenda = 2; |
216 | emit showAgendaView( false ); | 219 | emit showAgendaView( false ); |
217 | return; | 220 | return; |
218 | } | 221 | } |
219 | */ | 222 | */ |
220 | ((Todo*)mIncidence)->setCompleted( true ); | 223 | ((Todo*)mIncidence)->setCompleted( true ); |
221 | hide(); | 224 | hide(); |
222 | emit todoCompleted(((Todo*)mIncidence)); | 225 | emit todoCompleted(((Todo*)mIncidence)); |
223 | return; | 226 | return; |
224 | 227 | ||
225 | } else | 228 | } else |
226 | date = mIncidence->dtStart().date(); | 229 | date = mIncidence->dtStart().date(); |
227 | globalFlagBlockAgenda = 1; | 230 | globalFlagBlockAgenda = 1; |
228 | emit showAgendaView( false ); | 231 | emit showAgendaView( false ); |
229 | globalFlagBlockAgenda = 2; | 232 | globalFlagBlockAgenda = 2; |
230 | emit jumpToTime( date ); | 233 | emit jumpToTime( date ); |
231 | } | 234 | } |
232 | } | 235 | } |
233 | void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) | 236 | void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) |
234 | { | 237 | { |
235 | switch ( e->key() ) { | 238 | switch ( e->key() ) { |
236 | 239 | ||
237 | case Qt::Key_A : | 240 | case Qt::Key_A : |
238 | case Qt::Key_L : | 241 | case Qt::Key_L : |
239 | showIncidence(); | 242 | showIncidence(); |
240 | break; | 243 | break; |
241 | case Qt::Key_E : | 244 | case Qt::Key_E : |
242 | case Qt::Key_R : | 245 | case Qt::Key_R : |
243 | editIncidence(); | 246 | editIncidence(); |
244 | break; | 247 | break; |
245 | case Qt::Key_C: | 248 | case Qt::Key_C: |
246 | case Qt::Key_Escape: | 249 | case Qt::Key_Escape: |
247 | close(); | 250 | close(); |
248 | break; | 251 | break; |
249 | case Qt::Key_I: | 252 | case Qt::Key_I: |
250 | accept(); | 253 | accept(); |
251 | break; | 254 | break; |
252 | default: | 255 | default: |
253 | break; | 256 | break; |
254 | } | 257 | } |
255 | 258 | ||
256 | } | 259 | } |