author | zautrix <zautrix> | 2005-01-05 18:00:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-05 18:00:42 (UTC) |
commit | 9bbe06c6cbf70ab8741acc6b356890c072b103e8 (patch) (unidiff) | |
tree | 89ce922f849540b959c6f778c9371f9ff01decf6 | |
parent | 71017beb975666a0f654898ed6a40a5303d567dc (diff) | |
download | kdepimpi-9bbe06c6cbf70ab8741acc6b356890c072b103e8.zip kdepimpi-9bbe06c6cbf70ab8741acc6b356890c072b103e8.tar.gz kdepimpi-9bbe06c6cbf70ab8741acc6b356890c072b103e8.tar.bz2 |
some fixes
-rw-r--r-- | bin/kdepim/SyncHowto.txt | 2 | ||||
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 10 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonapplet.cpp | 9 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 6 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 47 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 4 |
7 files changed, 35 insertions, 44 deletions
diff --git a/bin/kdepim/SyncHowto.txt b/bin/kdepim/SyncHowto.txt index 5874fc3..6c1da16 100644 --- a/bin/kdepim/SyncHowto.txt +++ b/bin/kdepim/SyncHowto.txt | |||
@@ -1,497 +1,497 @@ | |||
1 | WARNING: | 1 | WARNING: |
2 | YOU MAY GET UNEXSPECTED (I.E. WRONG) SYNCHRONIZATION RESULTS, | 2 | YOU MAY GET UNEXPECTED (I.E. WRONG) SYNCHRONIZATION RESULTS, |
3 | IF YOU CHANGE AN EVENT ON THE FIRST DEVICE AND SYNC IMMEDIATELY FROM | 3 | IF YOU CHANGE AN EVENT ON THE FIRST DEVICE AND SYNC IMMEDIATELY FROM |
4 | THE OTHER DEVICE WITH THIS DEVICE, IF THE CLOCKS OF THE TWO DEVICES | 4 | THE OTHER DEVICE WITH THIS DEVICE, IF THE CLOCKS OF THE TWO DEVICES |
5 | HAVE TOO MUCH DIFFERENCE. | 5 | HAVE TOO MUCH DIFFERENCE. |
6 | 6 | ||
7 | In other words: Please make sure, that the clocks of the devices | 7 | In other words: Please make sure, that the clocks of the devices |
8 | you want to sync have only a difference of some seconds! | 8 | you want to sync have only a difference of some seconds! |
9 | 9 | ||
10 | 10 | ||
11 | CONTENT: | 11 | CONTENT: |
12 | 12 | ||
13 | 0) How syncing works | 13 | 0) How syncing works |
14 | 1) Qick overview of settings | 14 | 1) Qick overview of settings |
15 | 2) Sync settings in sync dialog | 15 | 2) Sync settings in sync dialog |
16 | 3) Syncing background | 16 | 3) Syncing background |
17 | 4) Sync preferences | 17 | 4) Sync preferences |
18 | 5) Details about sync profile kinds | 18 | 5) Details about sync profile kinds |
19 | 19 | ||
20 | ************************************************************************* | 20 | ************************************************************************* |
21 | 0) How syncing works | 21 | 0) How syncing works |
22 | ************************************************************************* | 22 | ************************************************************************* |
23 | 23 | ||
24 | Note: | 24 | Note: |
25 | The recommended and easiest way to syncronize two devices where | 25 | The recommended and easiest way to syncronize two devices where |
26 | KO/Pi, KA/Pi or PWM/Pi is installed, is the profile kind "Pi-Sync". | 26 | KO/Pi, KA/Pi or PWM/Pi is installed, is the profile kind "Pi-Sync". |
27 | Details about that in 5) b). | 27 | Details about that in 5) b). |
28 | 28 | ||
29 | In KDE-Pim/Pi you can synchronize ( sync ) your calendar/addressbook/ | 29 | In KDE-Pim/Pi you can synchronize ( sync ) your calendar/addressbook/ |
30 | passwordfile with another calendar/addressbook/passwordfile, | 30 | passwordfile with another calendar/addressbook/passwordfile, |
31 | by syncing your (local) calendar/addressbook/passwordfile | 31 | by syncing your (local) calendar/addressbook/passwordfile |
32 | with a (remote) file. | 32 | with a (remote) file. |
33 | This remote file may on your local filesystem | 33 | This remote file may on your local filesystem |
34 | or on another (remote) device. | 34 | or on another (remote) device. |
35 | 35 | ||
36 | If you want to sync with another remote device, you have to create | 36 | If you want to sync with another remote device, you have to create |
37 | a sync profile. | 37 | a sync profile. |
38 | You have two choices for choosing the profil kind: | 38 | You have two choices for choosing the profil kind: |
39 | I) You can choose profile kind "Remote file" and specify a | 39 | I) You can choose profile kind "Remote file" and specify a |
40 | command line download/upload command ( like scp, ftp, ...) to | 40 | command line download/upload command ( like scp, ftp, ...) to |
41 | a) download the remote file to your local machine to a temp file | 41 | a) download the remote file to your local machine to a temp file |
42 | b) sync with this temp file | 42 | b) sync with this temp file |
43 | c) upload the synced file to the remote device | 43 | c) upload the synced file to the remote device |
44 | II) If you want to sync with a device, where KO/Pi( or KA/Pi, PWM/Pi) is | 44 | II) If you want to sync with a device, where KO/Pi( or KA/Pi, PWM/Pi) is |
45 | installed, you can easily get the remote file via network | 45 | installed, you can easily get the remote file via network |
46 | with the build in file transfer feature: | 46 | with the build in file transfer feature: |
47 | Choose profile kind "Pi-Sync" and | 47 | Choose profile kind "Pi-Sync" and |
48 | a) Start KO/Pi,KA/Pi or PWM/Pi on remote device and | 48 | a) Start KO/Pi,KA/Pi or PWM/Pi on remote device and |
49 | enable "Pi-Sync" on remote device with password and port. | 49 | enable "Pi-Sync" on remote device with password and port. |
50 | b) Specify password, port and IP address in your profile. | 50 | b) Specify password, port and IP address in your profile. |
51 | 51 | ||
52 | 52 | ||
53 | You can sync with your mobile phone as well. | 53 | You can sync with your mobile phone as well. |
54 | Everything is explained in more details below. | 54 | Everything is explained in more details below. |
55 | 55 | ||
56 | NOTE: | 56 | NOTE: |
57 | If you do not use profile kind "Pi-Sync", | 57 | If you do not use profile kind "Pi-Sync", |
58 | it is recommended to close | 58 | it is recommended to close |
59 | a running KO/Pi (KA/Pi, PWM/Pi) on the remote device. | 59 | a running KO/Pi (KA/Pi, PWM/Pi) on the remote device. |
60 | (Note: KO/Pi(KA/Pi, PWM/Pi) running on Zaurus with | 60 | (Note: KO/Pi(KA/Pi, PWM/Pi) running on Zaurus with |
61 | FastLoad enabled will never be closed!) | 61 | FastLoad enabled will never be closed!) |
62 | After syncing with a running KO/Pi on the remote device, | 62 | After syncing with a running KO/Pi on the remote device, |
63 | a "save" on the remote device will tell you that it needs to merge (sync). | 63 | a "save" on the remote device will tell you that it needs to merge (sync). |
64 | After merging (just a syncing with the changed file) | 64 | After merging (just a syncing with the changed file) |
65 | you will get the new data showing in remote KO/Pi. | 65 | you will get the new data showing in remote KO/Pi. |
66 | 66 | ||
67 | ************************************************************************* | 67 | ************************************************************************* |
68 | 1) Qick overview of settings | 68 | 1) Qick overview of settings |
69 | ************************************************************************* | 69 | ************************************************************************* |
70 | 70 | ||
71 | a) Open sync settings dialog (Menu Synchronize - Configure...) | 71 | a) Open sync settings dialog (Menu Synchronize - Configure...) |
72 | b) Give your device a unique name. | 72 | b) Give your device a unique name. |
73 | (unique in the set of all devices you want to sync with). | 73 | (unique in the set of all devices you want to sync with). |
74 | If you have already configured another devive and created | 74 | If you have already configured another devive and created |
75 | there a sync profile to sync with this device, give your device | 75 | there a sync profile to sync with this device, give your device |
76 | the same name as this sync profile! The same name is important, | 76 | the same name as this sync profile! The same name is important, |
77 | because it makes it possible to sync first A->B | 77 | because it makes it possible to sync first A->B |
78 | (A local device, that performs the sync, B remote device) | 78 | (A local device, that performs the sync, B remote device) |
79 | and then B->A. Such that the B->A sync knows about the | 79 | and then B->A. Such that the B->A sync knows about the |
80 | already performed A->B sync. | 80 | already performed A->B sync. |
81 | That means: It is unimportant if you sync A->B or B->A, | 81 | That means: It is unimportant if you sync A->B or B->A, |
82 | the devices A and B will be synced properly. | 82 | the devices A and B will be synced properly. |
83 | c) Create a new sync profile and give it a unique name. | 83 | c) Create a new sync profile and give it a unique name. |
84 | (unique in the set of all sync profiles on this device). | 84 | (unique in the set of all sync profiles on this device). |
85 | If you want to sync with a device, where KO/Pi is already installed | 85 | If you want to sync with a device, where KO/Pi is already installed |
86 | and which has a given unique device name, use this device name as | 86 | and which has a given unique device name, use this device name as |
87 | your profile name ( refer to b) ). | 87 | your profile name ( refer to b) ). |
88 | d) Coose the profile kind of your syncing method: | 88 | d) Coose the profile kind of your syncing method: |
89 | (i) Local file or | 89 | (i) Local file or |
90 | (ii) Pi-Sync or | 90 | (ii) Pi-Sync or |
91 | (iii) Remote file or | 91 | (iii) Remote file or |
92 | (iiii) Mobile Phone. | 92 | (iiii) Mobile Phone. |
93 | Detailed explanation in 5) | 93 | Detailed explanation in 5) |
94 | e) Choose the other profile options. | 94 | e) Choose the other profile options. |
95 | Detailed explanation in 2) | 95 | Detailed explanation in 2) |
96 | f) Close sync dialog with OK. | 96 | f) Close sync dialog with OK. |
97 | g) Sync. | 97 | g) Sync. |
98 | 98 | ||
99 | NOTE: | 99 | NOTE: |
100 | AFTER SYNCING THERE ARE "SYNC EVENTS" CREATED | 100 | AFTER SYNCING THERE ARE "SYNC EVENTS" CREATED |
101 | (OR UPDATED, IF IT ALREADY EXITS) FOR EACH SYNC PROFILE. | 101 | (OR UPDATED, IF IT ALREADY EXITS) FOR EACH SYNC PROFILE. |
102 | YOU MAY NOT DELETE OR CHANGE THESE EVENTS. | 102 | YOU MAY NOT DELETE OR CHANGE THESE EVENTS. |
103 | 103 | ||
104 | ************************************************************************* | 104 | ************************************************************************* |
105 | 2) Sync settings in sync dialog | 105 | 2) Sync settings in sync dialog |
106 | ************************************************************************* | 106 | ************************************************************************* |
107 | 107 | ||
108 | a) Local device name: | 108 | a) Local device name: |
109 | -> 1) b) | 109 | -> 1) b) |
110 | b) Profile: | 110 | b) Profile: |
111 | -> 1) c) | 111 | -> 1) c) |
112 | c) Include in multiple sync: | 112 | c) Include in multiple sync: |
113 | In the Synchronize menu, there is a multiple sync menu entry. | 113 | In the Synchronize menu, there is a multiple sync menu entry. |
114 | If you choose this menu entry, all user defined profiles with this | 114 | If you choose this menu entry, all user defined profiles with this |
115 | 'Include in multiple sync' option enabled will be synced | 115 | 'Include in multiple sync' option enabled will be synced |
116 | one after another. And this twice. This will take some time. | 116 | one after another. And this twice. This will take some time. |
117 | After that sync, on all devices should be the same data. | 117 | After that sync, on all devices should be the same data. |
118 | d) Ask for preferences before sync: | 118 | d) Ask for preferences before sync: |
119 | Check this to be asked for sync preferences settings before each sync. | 119 | Check this to be asked for sync preferences settings before each sync. |
120 | If the profile kind is "Pi-Sync" you will be asked to confirm | 120 | If the profile kind is "Pi-Sync" you will be asked to confirm |
121 | the "Pi-Sync" specific settings (Password,IP address, port number) | 121 | the "Pi-Sync" specific settings (Password,IP address, port number) |
122 | as well. That makes it possible to use that profile for a | 122 | as well. That makes it possible to use that profile for a |
123 | device that is connected via DHCP to the network and gets different | 123 | device that is connected via DHCP to the network and gets different |
124 | IP addresses when connection to the network. | 124 | IP addresses when connection to the network. |
125 | e) Sync preferences: | 125 | e) Sync preferences: |
126 | Choose here your sync preferences. | 126 | Choose here your sync preferences. |
127 | Details -> 4) | 127 | Details -> 4) |
128 | f) Show summary after sync: | 128 | f) Show summary after sync: |
129 | Check this to get a small summary dialog after sync | 129 | Check this to get a small summary dialog after sync |
130 | about number of added/changed/deleted events on local/remote. | 130 | about number of added/changed/deleted events on local/remote. |
131 | g) Write back synced data: | 131 | g) Write back synced data: |
132 | Uncheck this to update the local calendar only. | 132 | Uncheck this to update the local calendar only. |
133 | I.e. your local calendar is synced with the remote calendar | 133 | I.e. your local calendar is synced with the remote calendar |
134 | but nothing on the remote calendar is changed. | 134 | but nothing on the remote calendar is changed. |
135 | If you uncheck "Write back synced data", the settings | 135 | If you uncheck "Write back synced data", the settings |
136 | under h) and i) are ignored, of course. | 136 | under h) and i) are ignored, of course. |
137 | h) --Write back (on remote) existing entries only: | 137 | h) --Write back (on remote) existing entries only: |
138 | Check this to update the remote data only. | 138 | Check this to update the remote data only. |
139 | I.e. no data from yor local calendar/addressbook is added to the | 139 | I.e. no data from yor local calendar/addressbook is added to the |
140 | remote device. You may use this option to | 140 | remote device. You may use this option to |
141 | sync against some kind of "public calendar/addressbook" without | 141 | sync against some kind of "public calendar/addressbook" without |
142 | writing back your personal data. | 142 | writing back your personal data. |
143 | i) --Write back (calendar) entries in future only: | 143 | i) --Write back (calendar) entries in future only: |
144 | Check this to write back only calendar entries in future. | 144 | Check this to write back only calendar entries in future. |
145 | (Useful when syncing with mobile phones.) | 145 | (Useful when syncing with mobile phones.) |
146 | You can specify the date range in weeks with | 146 | You can specify the date range in weeks with |
147 | ---- Max. weeks in future. | 147 | ---- Max. weeks in future. |
148 | Note: The date range starts always 7 days before the actual date! | 148 | Note: The date range starts always 7 days before the actual date! |
149 | I.e. the calendar events of the last week are written back always. | 149 | I.e. the calendar events of the last week are written back always. |
150 | j) Profile kind: | 150 | j) Profile kind: |
151 | Details -> 5) | 151 | Details -> 5) |
152 | 152 | ||
153 | ************************************************************************* | 153 | ************************************************************************* |
154 | 3) Syncing background | 154 | 3) Syncing background |
155 | ************************************************************************* | 155 | ************************************************************************* |
156 | 156 | ||
157 | The same mentioned for calendars is valid for addressbooks as well. | 157 | The same mentioned for calendars is valid for addressbooks as well. |
158 | 158 | ||
159 | Synchronizing calendars ( i.e. files ) means, | 159 | Synchronizing calendars ( i.e. files ) means, |
160 | to merge two calendars in a useful way. | 160 | to merge two calendars in a useful way. |
161 | If the two calendars are completely different, | 161 | If the two calendars are completely different, |
162 | there is no problem, the resulting calendar contains | 162 | there is no problem, the resulting calendar contains |
163 | all data from the local and from the remote calendar. | 163 | all data from the local and from the remote calendar. |
164 | 164 | ||
165 | Problems will occur, if you have edited items | 165 | Problems will occur, if you have edited items |
166 | from the local calendar on the remote machine. | 166 | from the local calendar on the remote machine. |
167 | Then it could be, that items are in conflict. | 167 | Then it could be, that items are in conflict. |
168 | Two items are "in conflict", if they have the | 168 | Two items are "in conflict", if they have the |
169 | same unique ID (which get an item at time of | 169 | same unique ID (which get an item at time of |
170 | creation and owns it until it is deleted ) | 170 | creation and owns it until it is deleted ) |
171 | and they both are modified after the last | 171 | and they both are modified after the last |
172 | synchronization. | 172 | synchronization. |
173 | 173 | ||
174 | At first sync of two calendars there is no item deleted. | 174 | At first sync of two calendars there is no item deleted. |
175 | If the calendars are synced before and there is an item, | 175 | If the calendars are synced before and there is an item, |
176 | which is not edited after the last sync and is only | 176 | which is not edited after the last sync and is only |
177 | available in one calendar, then this item is deleted | 177 | available in one calendar, then this item is deleted |
178 | in this calendar. | 178 | in this calendar. |
179 | 179 | ||
180 | But when was the last synchronization between two calendars? | 180 | But when was the last synchronization between two calendars? |
181 | 181 | ||
182 | To know that, KO/Pi creates at first syncing | 182 | To know that, KO/Pi creates at first syncing |
183 | of two files an unique event "<profile name> - sync Event" | 183 | of two files an unique event "<profile name> - sync Event" |
184 | on the remote and the local calendar. | 184 | on the remote and the local calendar. |
185 | After syncing, the start time of this event is set | 185 | After syncing, the start time of this event is set |
186 | to the time of syncing. | 186 | to the time of syncing. |
187 | The event is read only and the user may not change it. | 187 | The event is read only and the user may not change it. |
188 | 188 | ||
189 | If two such files are synced, that both have an event | 189 | If two such files are synced, that both have an event |
190 | "<profile name> - sync Event" and the events have | 190 | "<profile name> - sync Event" and the events have |
191 | the same start time, then deleted items on the one calendar | 191 | the same start time, then deleted items on the one calendar |
192 | are deleted on the other as well. | 192 | are deleted on the other as well. |
193 | 193 | ||
194 | 194 | ||
195 | ************************************************************************* | 195 | ************************************************************************* |
196 | 4) Sync preferences | 196 | 4) Sync preferences |
197 | ************************************************************************* | 197 | ************************************************************************* |
198 | 198 | ||
199 | Two items are "in conflict", if they have the same unique ID | 199 | Two items are "in conflict", if they have the same unique ID |
200 | and they both are modified after the last synchronization. | 200 | and they both are modified after the last synchronization. |
201 | (Details -> 3) ). | 201 | (Details -> 3) ). |
202 | 202 | ||
203 | If an item is not modified after the last sync and | 203 | If an item is not modified after the last sync and |
204 | it is not found in the other calendar, it is deleted. | 204 | it is not found in the other calendar, it is deleted. |
205 | 205 | ||
206 | On the first sync, there is no item deleted. | 206 | On the first sync, there is no item deleted. |
207 | 207 | ||
208 | SYNC PREFERENCES: | 208 | SYNC PREFERENCES: |
209 | -Take local entry on conflict: | 209 | -Take local entry on conflict: |
210 | Takes the local entry on conflict. | 210 | Takes the local entry on conflict. |
211 | If it is the first sync, | 211 | If it is the first sync, |
212 | "Ask for every entry" | 212 | "Ask for every entry" |
213 | is chosen automatically, | 213 | is chosen automatically, |
214 | if this is selected. | 214 | if this is selected. |
215 | 215 | ||
216 | -Take remote entry on conflict: | 216 | -Take remote entry on conflict: |
217 | Takes the remote entry on conflict. | 217 | Takes the remote entry on conflict. |
218 | If it is the first sync, | 218 | If it is the first sync, |
219 | "Ask for every entry" | 219 | "Ask for every entry" |
220 | is chosen automatically, | 220 | is chosen automatically, |
221 | if this is selected. | 221 | if this is selected. |
222 | 222 | ||
223 | -Take newest entry on conflict: | 223 | -Take newest entry on conflict: |
224 | This takes the newest entry on conflict. | 224 | This takes the newest entry on conflict. |
225 | May be the most useful syncing mode. | 225 | May be the most useful syncing mode. |
226 | 226 | ||
227 | -Ask for every entry on conflict: | 227 | -Ask for every entry on conflict: |
228 | Pops up an event viewer dialog and | 228 | Pops up an event viewer dialog and |
229 | shows the two conflicting entries there. | 229 | shows the two conflicting entries there. |
230 | The user can chose, which entry he would like to take. | 230 | The user can chose, which entry he would like to take. |
231 | The button for the newest entry | 231 | The button for the newest entry |
232 | is automatically set as default button. | 232 | is automatically set as default button. |
233 | The color for the newest entry is green. | 233 | The color for the newest entry is green. |
234 | 234 | ||
235 | -Force: Take local entry always: | 235 | -Force: Take local entry always: |
236 | Even if the calendars are already synced | 236 | Even if the calendars are already synced |
237 | there is no item deleted on local. | 237 | there is no item deleted on local. |
238 | 238 | ||
239 | -Force: Take remote entry always: | 239 | -Force: Take remote entry always: |
240 | Analogous to | 240 | Analogous to |
241 | "Force: Take local entry always" | 241 | "Force: Take local entry always" |
242 | 242 | ||
243 | ************************************************************************* | 243 | ************************************************************************* |
244 | 5) Details about sync profile kinds | 244 | 5) Details about sync profile kinds |
245 | ************************************************************************* | 245 | ************************************************************************* |
246 | 246 | ||
247 | a) Local file | 247 | a) Local file |
248 | Please specify a local file you want to sync with. | 248 | Please specify a local file you want to sync with. |
249 | Note: If you are syncing a file, which is used by KA/Pi, please check the | 249 | Note: If you are syncing a file, which is used by KA/Pi, please check the |
250 | "Addressbook file (*.vcf) is used by KA/Pi". | 250 | "Addressbook file (*.vcf) is used by KA/Pi". |
251 | If you are syncing with a file from KAddressbook or another program, | 251 | If you are syncing with a file from KAddressbook or another program, |
252 | please uncheck "Addressbook file (*.vcf) is used by KA/Pi". | 252 | please uncheck "Addressbook file (*.vcf) is used by KA/Pi". |
253 | To set this properly is important! KA/Pi uses a "last modified" property, | 253 | To set this properly is important! KA/Pi uses a "last modified" property, |
254 | which is not supported by KAddressbook. | 254 | which is not supported by KAddressbook. |
255 | 255 | ||
256 | b) Pi-Sync (direct Kx/Pi to Kx/Pi sync) | 256 | b) Pi-Sync (direct Kx/Pi to Kx/Pi sync) |
257 | We mention here only KO/Pi, but the same is valid for KA/Pi. | 257 | We mention here only KO/Pi, but the same is valid for KA/Pi. |
258 | If you want to sync with a device, where KO/Pi is | 258 | If you want to sync with a device, where KO/Pi is |
259 | installed, you can easily get the remote file via network | 259 | installed, you can easily get the remote file via network |
260 | with the build in file transfer feature "Pi-Sync": | 260 | with the build in file transfer feature "Pi-Sync": |
261 | You have first to enable file transfer on the remote device: | 261 | You have first to enable file transfer on the remote device: |
262 | - Start KO/Pi on the remote device. | 262 | - Start KO/Pi on the remote device. |
263 | - Choose Menu Synchronize-Enable Pi-Sync. | 263 | - Choose Menu Synchronize-Enable Pi-Sync. |
264 | - Choose a port number, where KO/Pi should listen for | 264 | - Choose a port number, where KO/Pi should listen for |
265 | file sending requests. Valid port numbers are numbers | 265 | file sending requests. Valid port numbers are numbers |
266 | between 1 and 65565. Do not specify port numbers, that are | 266 | between 1 and 65565. Do not specify port numbers, that are |
267 | used by other applications. A port number between 9000 and 9999 | 267 | used by other applications. A port number between 9000 and 9999 |
268 | is most likely not used by another application. | 268 | is most likely not used by another application. |
269 | The default port number is 9197 for KO/Pi. | 269 | The default port number is 9197 for KO/Pi. |
270 | If you specify a port number, which is already in use, | 270 | If you specify a port number, which is already in use, |
271 | you will get an error message when closing this dialog. | 271 | you will get an error message when closing this dialog. |
272 | - Choose a password. | 272 | - Choose a password. |
273 | - Click OK. | 273 | - Click OK. |
274 | Now KO/Pi will send the calendar data via the network, | 274 | Now KO/Pi will send the calendar data via the network, |
275 | if some other device is sending a "please send calendar" | 275 | if some other device is sending a "please send calendar" |
276 | request on the given port using the given password. | 276 | request on the given port using the given password. |
277 | If you want to be sure, nobody can access your calendar | 277 | If you want to be sure, nobody can access your calendar |
278 | data, simply disable the file transfer feature on the | 278 | data, simply disable the file transfer feature on the |
279 | remote device after the syncing is done by choosing: | 279 | remote device after the syncing is done by choosing: |
280 | Menu Synchronize-Disable Pi-Sync. | 280 | Menu Synchronize-Disable Pi-Sync. |
281 | 281 | ||
282 | Note: If you want to sync with a remote device that gets different | 282 | Note: If you want to sync with a remote device that gets different |
283 | IPaddresses each time connected to the network | 283 | IPaddresses each time connected to the network |
284 | (this may be the case, if you use DHCP for connection | 284 | (this may be the case, if you use DHCP for connection |
285 | of the remote device to the network) simply enable | 285 | of the remote device to the network) simply enable |
286 | "Ask for preferences before sync". | 286 | "Ask for preferences before sync". |
287 | Then you will be asked to confirm the | 287 | Then you will be asked to confirm the |
288 | "Pi-Sync" specific settings | 288 | "Pi-Sync" specific settings |
289 | (Password,IP address, port number) | 289 | (Password,IP address, port number) |
290 | and you can easily change the IP address before each sync. | 290 | and you can easily change the IP address before each sync. |
291 | 291 | ||
292 | On your local device, create a new profile and choose | 292 | On your local device, create a new profile and choose |
293 | profile kind "Pi-Sync". | 293 | profile kind "Pi-Sync". |
294 | Fill in the needed values: | 294 | Fill in the needed values: |
295 | - Password for remote access: | 295 | - Password for remote access: |
296 | The password you specified on the remote device. | 296 | The password you specified on the remote device. |
297 | - Remote IP address: | 297 | - Remote IP address: |
298 | The IP address of the remote device. | 298 | The IP address of the remote device. |
299 | - Remote port number: | 299 | - Remote port number: |
300 | The port number you specified on the remote device. | 300 | The port number you specified on the remote device. |
301 | 301 | ||
302 | Now you can syncronize your local device easily with your | 302 | Now you can syncronize your local device easily with your |
303 | remote device. This works well for all platforms KO/Pi is | 303 | remote device. This works well for all platforms KO/Pi is |
304 | running on, e.g. syncing a KO/Pi on Zaurus with KO/Pi on Windows | 304 | running on, e.g. syncing a KO/Pi on Zaurus with KO/Pi on Windows |
305 | is now very easy. | 305 | is now very easy. |
306 | 306 | ||
307 | c) Remote file | 307 | c) Remote file |
308 | Note: If you are syncing a file, which is used by KA/Pi, please check the | 308 | Note: If you are syncing a file, which is used by KA/Pi, please check the |
309 | "Addressbook file (*.vcf) is used by KA/Pi". | 309 | "Addressbook file (*.vcf) is used by KA/Pi". |
310 | If you are syncing with a file from KAddressbook or another program, | 310 | If you are syncing with a file from KAddressbook or another program, |
311 | please uncheck "Addressbook file (*.vcf) is used by KA/Pi". | 311 | please uncheck "Addressbook file (*.vcf) is used by KA/Pi". |
312 | To set this properly is important! KA/Pi uses a "last modified" property, | 312 | To set this properly is important! KA/Pi uses a "last modified" property, |
313 | which is not supported by KAddressbook. | 313 | which is not supported by KAddressbook. |
314 | 314 | ||
315 | Syncing with the profile kind "Remote file" is performed in three steps: | 315 | Syncing with the profile kind "Remote file" is performed in three steps: |
316 | i) download the remote file to your local machine to a temp file | 316 | i) download the remote file to your local machine to a temp file |
317 | ii) sync with this temp file | 317 | ii) sync with this temp file |
318 | iii) upload the synced file to the remote device | 318 | iii) upload the synced file to the remote device |
319 | 319 | ||
320 | The down-/uploading if i) and iii) is done via a command line command. | 320 | The down-/uploading if i) and iii) is done via a command line command. |
321 | Please specify the download/upload command ( like scp, ftp, ...) and the | 321 | Please specify the download/upload command ( like scp, ftp, ...) and the |
322 | file name of the temp file in the corresponding fields. | 322 | file name of the temp file in the corresponding fields. |
323 | 323 | ||
324 | d) Mobile device (cell phone) | 324 | d) Mobile device (cell phone) |
325 | Note: On the Zaurus you have to install the phoneaccess_xxx_arm.ipk package | 325 | Note: On the Zaurus you have to install the phoneaccess_xxx_arm.ipk package |
326 | to be able to access mobile phones. | 326 | to be able to access mobile phones. |
327 | We mention here only KO/Pi, but the same is valid for KA/Pi. | 327 | We mention here only KO/Pi, but the same is valid for KA/Pi. |
328 | Note: | 328 | Note: |
329 | It is only possible to sync a mobile phone with one particular device | 329 | It is only possible to sync a mobile phone with one particular device |
330 | running KO/Pi. If you want to be able to write data of more than one device | 330 | running KO/Pi. If you want to be able to write data of more than one device |
331 | to the mobile phone (e.g. from your Zaurus and from your Windows Laptop) | 331 | to the mobile phone (e.g. from your Zaurus and from your Windows Laptop) |
332 | do not sync with the mobile phone at all, but use the | 332 | do not sync with the mobile phone at all, but use the |
333 | "Export to phone" functionality from the different devices. | 333 | "Export to phone" functionality from the different devices. |
334 | Using "Export to phone" makes it not possible to get back data from the | 334 | Using "Export to phone" makes it not possible to get back data from the |
335 | phone, if it was changed there, of course. | 335 | phone, if it was changed there, of course. |
336 | If you sync with the phone, do not use "Export to phone" from any device. | 336 | If you sync with the phone, do not use "Export to phone" from any device. |
337 | (And do not sync, as mentioned above, from any other device with that phone). | 337 | (And do not sync, as mentioned above, from any other device with that phone). |
338 | It would delete the needed information for syncing with that phone! | 338 | It would delete the needed information for syncing with that phone! |
339 | 339 | ||
340 | We are using Gammu (Version: 0.98.9) ( http://freshmeat.net/projects/gammu/ ) | 340 | We are using Gammu (Version: 0.98.9) ( http://freshmeat.net/projects/gammu/ ) |
341 | for accessing the phones. | 341 | for accessing the phones. |
342 | Note: You cannot use the original Gammu for syncing KDE-Pim/Pi, because | 342 | Note: You cannot use the original Gammu for syncing KDE-Pim/Pi, because |
343 | we have modified the original version to make it useable for syncing! | 343 | we have modified the original version to make it useable for syncing! |
344 | Gammu allows access to many phones in many ways (Irda, Bluetooth, serial,...). | 344 | Gammu allows access to many phones in many ways (Irda, Bluetooth, serial,...). |
345 | The recommended phone access using Gammu with KDE-Pim/Pi is Irda (infrared). | 345 | The recommended phone access using Gammu with KDE-Pim/Pi is Irda (infrared). |
346 | Bluetooth access is disabled on the Zaurus, but may work on Windows. | 346 | Bluetooth access is disabled on the Zaurus, but may work on Windows. |
347 | Please look at the Gammu homepage and documentation about more details | 347 | Please look at the Gammu homepage and documentation about more details |
348 | configuring Gammu how to access your phone. | 348 | configuring Gammu how to access your phone. |
349 | If you have problems accessing your phone, start KO/Pi from the konsole | 349 | If you have problems accessing your phone, start KO/Pi from the konsole |
350 | and you will get a more detailed output what went wrong. | 350 | and you will get a more detailed output what went wrong. |
351 | About Gammu from the Gammu homepage: | 351 | About Gammu from the Gammu homepage: |
352 | Gammu (formerly known as MyGnokii2) is a cellular | 352 | Gammu (formerly known as MyGnokii2) is a cellular |
353 | manager for various mobile phones/modems. | 353 | manager for various mobile phones/modems. |
354 | It supports the Nokia 2100, 3100, 32xx, 33xx, | 354 | It supports the Nokia 2100, 3100, 32xx, 33xx, |
355 | 3410, 35xx, 51xx, 5210, 5510, 61xx, 62xx, | 355 | 3410, 35xx, 51xx, 5210, 5510, 61xx, 62xx, |
356 | 63xx, 6510, 6610, 6800, 71xx, 7210, 7250, | 356 | 63xx, 6510, 6610, 6800, 71xx, 7210, 7250, |
357 | 7250i, 82xx, 83xx, 8910, 9110, 9210 | 357 | 7250i, 82xx, 83xx, 8910, 9110, 9210 |
358 | and compatible and AT devices (Siemens, Alcatel, | 358 | and compatible and AT devices (Siemens, Alcatel, |
359 | Falcom, WaveCom, IPAQ, Samsung, SE, and others) | 359 | Falcom, WaveCom, IPAQ, Samsung, SE, and others) |
360 | over cables/infrared/BlueTooth. | 360 | over cables/infrared/BlueTooth. |
361 | 361 | ||
362 | Here is an example what to specify to access a Nokia 6310i via infrared: | 362 | Here is an example what to specify to access a Nokia 6310i via infrared: |
363 | On Linux (Zaurus): | 363 | On Linux (Zaurus): |
364 | I/O device: /dev/ircomm | 364 | I/O device: /dev/ircomm |
365 | Connection: irda | 365 | Connection: irda |
366 | Model: <leave empty> | 366 | Model: <leave empty> |
367 | 367 | ||
368 | On Windows: | 368 | On Windows: |
369 | I/O device: <ignored - i.e. leave empty> | 369 | I/O device: <ignored - i.e. leave empty> |
370 | Connection: irda | 370 | Connection: irda |
371 | Model: <leave empty> | 371 | Model: <leave empty> |
372 | 372 | ||
373 | Here is the overview from the Gammu documentation, | 373 | Here is the overview from the Gammu documentation, |
374 | how to specify the connection settings for | 374 | how to specify the connection settings for |
375 | I/O device: | 375 | I/O device: |
376 | Connection: | 376 | Connection: |
377 | Model: | 377 | Model: |
378 | 378 | ||
379 | Note: The documentation uses the term "port", | 379 | Note: The documentation uses the term "port", |
380 | where we use the term "I/O device". | 380 | where we use the term "I/O device". |
381 | Note: You do not have to create/change the gammurc configuration file. | 381 | Note: You do not have to create/change the gammurc configuration file. |
382 | That will do KO/Pi for you. | 382 | That will do KO/Pi for you. |
383 | Note: For a known model, leave "Model:" always empty, | 383 | Note: For a known model, leave "Model:" always empty, |
384 | such that Gammu can auto detect the model. | 384 | such that Gammu can auto detect the model. |
385 | 385 | ||
386 | # This is a sample ~/.gammurc file. | 386 | # This is a sample ~/.gammurc file. |
387 | # In Unix/Linux copy it into your home directory and name it .gammurc | 387 | # In Unix/Linux copy it into your home directory and name it .gammurc |
388 | # or into /etc and name it gammurc | 388 | # or into /etc and name it gammurc |
389 | # In Win32 copy it into directory with Gammu.exe and name gammurc | 389 | # In Win32 copy it into directory with Gammu.exe and name gammurc |
390 | # More about parameters later | 390 | # More about parameters later |
391 | # ----------------------------------------------------------------------------- | 391 | # ----------------------------------------------------------------------------- |
392 | 392 | ||
393 | [gammu] | 393 | [gammu] |
394 | 394 | ||
395 | port = com8: | 395 | port = com8: |
396 | #model = 6110 | 396 | #model = 6110 |
397 | connection = fbusblue | 397 | connection = fbusblue |
398 | #synchronizetime = yes | 398 | #synchronizetime = yes |
399 | #logfile = gammulog | 399 | #logfile = gammulog |
400 | #logformat = textall | 400 | #logformat = textall |
401 | #use_locking = yes | 401 | #use_locking = yes |
402 | #gammuloc = locfile | 402 | #gammuloc = locfile |
403 | #startinfo = yes | 403 | #startinfo = yes |
404 | #gammucoding = utf8 | 404 | #gammucoding = utf8 |
405 | 405 | ||
406 | [gammu1] | 406 | [gammu1] |
407 | 407 | ||
408 | port = com8: | 408 | port = com8: |
409 | #model = 6110 | 409 | #model = 6110 |
410 | connection = fbusblue | 410 | connection = fbusblue |
411 | #synchronizetime = yes | 411 | #synchronizetime = yes |
412 | #logfile = gammulog | 412 | #logfile = gammulog |
413 | #logformat = textall | 413 | #logformat = textall |
414 | #use_locking = yes | 414 | #use_locking = yes |
415 | #gammuloc = locfile | 415 | #gammuloc = locfile |
416 | #startinfo = yes | 416 | #startinfo = yes |
417 | #gammucoding = utf8 | 417 | #gammucoding = utf8 |
418 | 418 | ||
419 | # ----------------------------------------------------------------------------- | 419 | # ----------------------------------------------------------------------------- |
420 | # Now info about "Connection" parameter and connected with it port type | 420 | # Now info about "Connection" parameter and connected with it port type |
421 | # (more about port types later) | 421 | # (more about port types later) |
422 | # ----------------------------------------------------------------------------- | 422 | # ----------------------------------------------------------------------------- |
423 | # "Connection" parameter | Port type | More details | 423 | # "Connection" parameter | Port type | More details |
424 | # -----------------------|-----------|----------------------------------------- | 424 | # -----------------------|-----------|----------------------------------------- |
425 | # "fbus" | serial | Nokia FBUS2 | 425 | # "fbus" | serial | Nokia FBUS2 |
426 | # "fbusirda"/"infrared" | serial | Nokia FBUS2 over direct infrared device | 426 | # "fbusirda"/"infrared" | serial | Nokia FBUS2 over direct infrared device |
427 | # "fbusdlr3"/"dlr3" | serial | Nokia FBUS2 with DLR3 cable | 427 | # "fbusdlr3"/"dlr3" | serial | Nokia FBUS2 with DLR3 cable |
428 | # "fbusdku5" | dku5 | Nokia FBUS2 with DKU5 cable. WIN32 ONLY | 428 | # "fbusdku5" | dku5 | Nokia FBUS2 with DKU5 cable. WIN32 ONLY |
429 | # "fbuspl2303" | usb | Nokia FBUS2 with USB cable based on | 429 | # "fbuspl2303" | usb | Nokia FBUS2 with USB cable based on |
430 | # | | PL2303 chip. | 430 | # | | PL2303 chip. |
431 | # "fbusblue" | serial | Nokia FBUS2 over Bluetooth serial device | 431 | # "fbusblue" | serial | Nokia FBUS2 over Bluetooth serial device |
432 | # "phonetblue" | serial | Nokia PHONET FBUS over Bluetooth serial | 432 | # "phonetblue" | serial | Nokia PHONET FBUS over Bluetooth serial |
433 | # | | device | 433 | # | | device |
434 | # "mrouterblue" | serial | | 434 | # "mrouterblue" | serial | |
435 | # "mbus" | serial | Nokia MBUS2 | 435 | # "mbus" | serial | Nokia MBUS2 |
436 | # "at19200"/"at115200"/..| serial | AT commands.8 bits, None parity, 1 stop | 436 | # "at19200"/"at115200"/..| serial | AT commands.8 bits, None parity, 1 stop |
437 | # | | bit, no flow control | 437 | # | | bit, no flow control |
438 | # -----------------------|-----------|----------------------------------------- | 438 | # -----------------------|-----------|----------------------------------------- |
439 | # "irdaphonet"/"irda" | irda | Nokia PHONET FBUS over socket infrared | 439 | # "irdaphonet"/"irda" | irda | Nokia PHONET FBUS over socket infrared |
440 | # "irdaat" | irda | AT commands with socket infrared | 440 | # "irdaat" | irda | AT commands with socket infrared |
441 | # "irdaobex" | irda | OBEX over socket infrared. MODEL "obex" | 441 | # "irdaobex" | irda | OBEX over socket infrared. MODEL "obex" |
442 | # -----------------------|-----------|----------------------------------------- | 442 | # -----------------------|-----------|----------------------------------------- |
443 | # "bluephonet" | BT | Nokia PHONET FBUS with Bluetooth stack | 443 | # "bluephonet" | BT | Nokia PHONET FBUS with Bluetooth stack |
444 | # "bluefbus"/"dlr3blue" | BT | Nokia FBUS2 with Bluetooth stack | 444 | # "bluefbus"/"dlr3blue" | BT | Nokia FBUS2 with Bluetooth stack |
445 | # "blueat"/"atblue" | BT | AT commands with Bluetooth stack | 445 | # "blueat"/"atblue" | BT | AT commands with Bluetooth stack |
446 | # "blueobex" | BT | OBEX with Bluetooth. MODEL "obex" | 446 | # "blueobex" | BT | OBEX with Bluetooth. MODEL "obex" |
447 | # | 447 | # |
448 | # Now more about port types and connected with it "Port" parameter | 448 | # Now more about port types and connected with it "Port" parameter |
449 | # ----------------------------------------------------------------------------- | 449 | # ----------------------------------------------------------------------------- |
450 | # Port type | "Port" parameter in Windows/DOS | "Port" parameter in Linux/Unix | 450 | # Port type | "Port" parameter in Windows/DOS | "Port" parameter in Linux/Unix |
451 | # ----------|---------------------------------|-------------------------------- | 451 | # ----------|---------------------------------|-------------------------------- |
452 | # serial | "com*:" | "/dev/ttyS*" | 452 | # serial | "com*:" | "/dev/ttyS*" |
453 | # | (example "com1:") | (example "/dev/ttyS1") | 453 | # | (example "com1:") | (example "/dev/ttyS1") |
454 | # | | or "/dev/tts/**" (with DevFS) | 454 | # | | or "/dev/tts/**" (with DevFS) |
455 | # ----------|---------------------------------|-------------------------------- | 455 | # ----------|---------------------------------|-------------------------------- |
456 | # irda | ignored (can be empty) | "/dev/ircomm*" | 456 | # irda | ignored (can be empty) | "/dev/ircomm*" |
457 | # ----------|---------------------------------|-------------------------------- | 457 | # ----------|---------------------------------|-------------------------------- |
458 | # BT | Bluetooth device address | 458 | # BT | Bluetooth device address |
459 | # | (example "") | 459 | # | (example "") |
460 | # ----------|---------------------------------|-------------------------------- | 460 | # ----------|---------------------------------|-------------------------------- |
461 | # dku5 | ignored (can be empty) | connection with it not possible | 461 | # dku5 | ignored (can be empty) | connection with it not possible |
462 | # ----------|---------------------------------|-------------------------------- | 462 | # ----------|---------------------------------|-------------------------------- |
463 | # usb | connection with it not possible | "/dev/ttyUSB*" | 463 | # usb | connection with it not possible | "/dev/ttyUSB*" |
464 | # | 464 | # |
465 | # Other config parameters | 465 | # Other config parameters |
466 | # ----------------------------------------------------------------------------- | 466 | # ----------------------------------------------------------------------------- |
467 | # Parameter name | Description | 467 | # Parameter name | Description |
468 | # ----------------|------------------------------------------------------------ | 468 | # ----------------|------------------------------------------------------------ |
469 | # Model | use only, when Gammu doesn't recognize your phone model. | 469 | # Model | use only, when Gammu doesn't recognize your phone model. |
470 | # | Put it here. Example values: "6110", "6150", "6210", "8210" | 470 | # | Put it here. Example values: "6110", "6150", "6210", "8210" |
471 | # SynchronizeTime | if you want to set time from computer to phone during | 471 | # SynchronizeTime | if you want to set time from computer to phone during |
472 | # | starting connection. Do not rather use this option when | 472 | # | starting connection. Do not rather use this option when |
473 | # | when to reset phone during connection (in some phones need | 473 | # | when to reset phone during connection (in some phones need |
474 | # | to set time again after restart) | 474 | # | to set time again after restart) |
475 | # GammuLoc | name of localisation file | 475 | # GammuLoc | name of localisation file |
476 | # StartInfo | this option allow to set, that you want (setting "yes") | 476 | # StartInfo | this option allow to set, that you want (setting "yes") |
477 | # | to see message on the phone screen or phone should enable | 477 | # | to see message on the phone screen or phone should enable |
478 | # | light for a moment during starting connection. Phone | 478 | # | light for a moment during starting connection. Phone |
479 | # | WON'T beep during starting connection with this option. | 479 | # | WON'T beep during starting connection with this option. |
480 | # GammuCoding | forces using specified codepage (in win32 - for example | 480 | # GammuCoding | forces using specified codepage (in win32 - for example |
481 | # | "1250" will force CP1250) or UTF8 (in Linux - "utf8") | 481 | # | "1250" will force CP1250) or UTF8 (in Linux - "utf8") |
482 | # ----------------|------------------------------------------------------------ | 482 | # ----------------|------------------------------------------------------------ |
483 | # Logfile | Use, when want to have logfile from communication. | 483 | # Logfile | Use, when want to have logfile from communication. |
484 | # Logformat | What debug info and format should be used: | 484 | # Logformat | What debug info and format should be used: |
485 | # | "nothing" - no debug level (default) | 485 | # | "nothing" - no debug level (default) |
486 | # | "text" - transmission dump in text format | 486 | # | "text" - transmission dump in text format |
487 | # | "textall" - all possible info in text format | 487 | # | "textall" - all possible info in text format |
488 | # | "errors" - errors in text format | 488 | # | "errors" - errors in text format |
489 | # | "binary" - transmission dump in binary format | 489 | # | "binary" - transmission dump in binary format |
490 | # ----------------|------------------------------------------------------------ | 490 | # ----------------|------------------------------------------------------------ |
491 | # Use_Locking | under Unix/Linux use "yes", if want to lock used device | 491 | # Use_Locking | under Unix/Linux use "yes", if want to lock used device |
492 | # | to prevent using it by other applications. In win32 ignored | 492 | # | to prevent using it by other applications. In win32 ignored |
493 | 493 | ||
494 | 494 | ||
495 | 495 | ||
496 | 496 | ||
497 | 497 | ||
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 1a8b885..df0b2eb 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,658 +1,666 @@ | |||
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.16 ************ | 3 | ********** VERSION 1.9.16 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fixed search dialog size on Z 6000 (480x640 display). | 6 | Fixed search dialog size on Z 6000 (480x640 display). |
7 | Added setting to hide/show time in agenda items. | 7 | Added setting to hide/show time in agenda items. |
8 | Added setting to hide not running todos in todo view. | 8 | Added setting to hide not running todos in todo view. |
9 | Added columns for start date/time in todo view. | 9 | Added columns for start date/time in todo view. |
10 | Replaced the solid half-hour lines in agenda view by dot lines. | 10 | Replaced the solid half-hour lines in agenda view by dot lines. |
11 | Fixed some minor problems. (Like word wrap in help text windows). | ||
12 | |||
13 | Fixed a strange problem in KO/Pi alarm applet. | ||
14 | Did not find the actual problem, | ||
15 | such that now Qtopia reboots if deinstalling the alarm applet. | ||
16 | But the alarm applet should work again. | ||
17 | |||
11 | 18 | ||
12 | ********** VERSION 1.9.15 ************ | 19 | ********** VERSION 1.9.15 ************ |
13 | 20 | ||
14 | Usebilty enhancements in KO/Pi: | 21 | Usebilty enhancements in KO/Pi: |
15 | When clicking on the date in a month view cell, the day view is shown. | 22 | When clicking on the date in a month view cell, the day view is shown. |
16 | Old behaviour was, that the "new event" dialog popped up. | 23 | Old behaviour was, that the "new event" dialog popped up. |
17 | 24 | ||
18 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). | 25 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). |
19 | That means, you can restore the latest | 26 | That means, you can restore the latest |
20 | event/todo/journal you have deleted. | 27 | event/todo/journal you have deleted. |
21 | A journal is deleted, if you clear all the text of the journal. | 28 | A journal is deleted, if you clear all the text of the journal. |
22 | 29 | ||
23 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. | 30 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. |
24 | 31 | ||
25 | KA/Pi starting in 480x640 resolution: | 32 | KA/Pi starting in 480x640 resolution: |
26 | Hide the filter action in toolbar | 33 | Hide the filter action in toolbar |
27 | and added icons for undo/delete/redo in toolbar. | 34 | and added icons for undo/delete/redo in toolbar. |
28 | 35 | ||
29 | Change in OM/Pi ViewMail dialog: | 36 | Change in OM/Pi ViewMail dialog: |
30 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). | 37 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. |
38 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). | ||
31 | 39 | ||
32 | Fixed a crash when deleting mail-accounts in OM/Pi. | 40 | Fixed a crash when deleting mail-accounts in OM/Pi. |
33 | 41 | ||
34 | 42 | ||
35 | ********** VERSION 1.9.14 ************ | 43 | ********** VERSION 1.9.14 ************ |
36 | 44 | ||
37 | Fixed some problems with the dialog sizes when switching | 45 | Fixed some problems with the dialog sizes when switching |
38 | portrait/landscape mode on 640x480 PDA display. | 46 | portrait/landscape mode on 640x480 PDA display. |
39 | 47 | ||
40 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. | 48 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. |
41 | 49 | ||
42 | Fixed an ugly bug in KOpieMail: | 50 | Fixed an ugly bug in KOpieMail: |
43 | KOpieMail was not able to write files (mails) to MSDOS file system, | 51 | KOpieMail was not able to write files (mails) to MSDOS file system, |
44 | like on an usual preformatted SD card. That should work now. | 52 | like on an usual preformatted SD card. That should work now. |
45 | To save your mail data on the Sd card do the following: | 53 | To save your mail data on the Sd card do the following: |
46 | Create a dir on the SD card: | 54 | Create a dir on the SD card: |
47 | mkdir /mnt/card/localmail | 55 | mkdir /mnt/card/localmail |
48 | Go to your home dir: | 56 | Go to your home dir: |
49 | cd | 57 | cd |
50 | Go to kopiemail data storage dir: | 58 | Go to kopiemail data storage dir: |
51 | cd kdepim/apps/kopiemail | 59 | cd kdepim/apps/kopiemail |
52 | Create a symlink to the SD card: | 60 | Create a symlink to the SD card: |
53 | ls -s /mnt/card/localmail | 61 | ls -s /mnt/card/localmail |
54 | Now KOpieMail will store all mails on the SD card. | 62 | Now KOpieMail will store all mails on the SD card. |
55 | 63 | ||
56 | KO/Pi Monthview: | 64 | KO/Pi Monthview: |
57 | Now "Go to Today" selects the current month from day 1-end, | 65 | Now "Go to Today" selects the current month from day 1-end, |
58 | not the current date + some days. | 66 | not the current date + some days. |
59 | I.e. "Go to Today" shows now always | 67 | I.e. "Go to Today" shows now always |
60 | the current month with first day of month in the first row. | 68 | the current month with first day of month in the first row. |
61 | 69 | ||
62 | Added missing German translation. | 70 | Added missing German translation. |
63 | 71 | ||
64 | Fixed icons of executeable on Wintendo. | 72 | Fixed icons of executeable on Wintendo. |
65 | 73 | ||
66 | Added a "Show next Mail" button to the OM/Pi | 74 | Added a "Show next Mail" button to the OM/Pi |
67 | mail viewer such that the mail below the current mail | 75 | mail viewer such that the mail below the current mail |
68 | in the mail list view of the current folder | 76 | in the mail list view of the current folder |
69 | can be read with a single click. | 77 | can be read with a single click. |
70 | 78 | ||
71 | 79 | ||
72 | ********** VERSION 1.9.13 ************ | 80 | ********** VERSION 1.9.13 ************ |
73 | 81 | ||
74 | Fixed nasty PwM/Pi file reading bug, when | 82 | Fixed nasty PwM/Pi file reading bug, when |
75 | the used hash algo of file is different then the global | 83 | the used hash algo of file is different then the global |
76 | hash algo. | 84 | hash algo. |
77 | 85 | ||
78 | Added KA/Pi support for opie mailit mailapplication. | 86 | Added KA/Pi support for opie mailit mailapplication. |
79 | 87 | ||
80 | Fixed some bugs in OM/Pi. | 88 | Fixed some bugs in OM/Pi. |
81 | Now character conversion tables are available for the Zaurus | 89 | Now character conversion tables are available for the Zaurus |
82 | to make OM/Pi working properly. | 90 | to make OM/Pi working properly. |
83 | To get the character conversion in OM/Pi working, please download | 91 | To get the character conversion in OM/Pi working, please download |
84 | at the sourceforge project site the package | 92 | at the sourceforge project site the package |
85 | sr-character-conversion_SharpROM_arm.ipk.zip | 93 | sr-character-conversion_SharpROM_arm.ipk.zip |
86 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) | 94 | (or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms) |
87 | from the section "general files for KDE/Pim" | 95 | from the section "general files for KDE/Pim" |
88 | Instructions how to install this package are in a ReadMe in this file. | 96 | Instructions how to install this package are in a ReadMe in this file. |
89 | 97 | ||
90 | 98 | ||
91 | Fixed the orientation change problem in KA/Pi when switching | 99 | Fixed the orientation change problem in KA/Pi when switching |
92 | portrait/landscape mode. | 100 | portrait/landscape mode. |
93 | 101 | ||
94 | French translation available for KA/Pi and OM/Pi. | 102 | French translation available for KA/Pi and OM/Pi. |
95 | 103 | ||
96 | Fixed some problems with categories in KO/Pi in DTM sync. | 104 | Fixed some problems with categories in KO/Pi in DTM sync. |
97 | 105 | ||
98 | Added selection dialog for export to phone in KA/Pi. | 106 | Added selection dialog for export to phone in KA/Pi. |
99 | 107 | ||
100 | If in KO/Pi is an attendee selected to add to a meeting and this | 108 | If in KO/Pi is an attendee selected to add to a meeting and this |
101 | attendee is already in the list of attendees, this person is not added | 109 | attendee is already in the list of attendees, this person is not added |
102 | again. | 110 | again. |
103 | 111 | ||
104 | Some menu cleanup in KA/Pi. | 112 | Some menu cleanup in KA/Pi. |
105 | 113 | ||
106 | ********** VERSION 1.9.12 ************ | 114 | ********** VERSION 1.9.12 ************ |
107 | 115 | ||
108 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. | 116 | Fix for the bug in KO/Pi What's Next view of version 1.9.11. |
109 | 117 | ||
110 | Bugfix: Licence file is now shown again. | 118 | Bugfix: Licence file is now shown again. |
111 | 119 | ||
112 | OM/Pi now supports Unicode (utf8 charset). | 120 | OM/Pi now supports Unicode (utf8 charset). |
113 | Fixed some bugs in OM/Pi. | 121 | Fixed some bugs in OM/Pi. |
114 | 122 | ||
115 | KA/Pi has more German translation. | 123 | KA/Pi has more German translation. |
116 | 124 | ||
117 | 125 | ||
118 | ********** VERSION 1.9.11 ************ | 126 | ********** VERSION 1.9.11 ************ |
119 | 127 | ||
120 | Fixed several problems in PWM/Pi, like | 128 | Fixed several problems in PWM/Pi, like |
121 | asking the user, if unsaved changed are pending | 129 | asking the user, if unsaved changed are pending |
122 | when closing the app. | 130 | when closing the app. |
123 | And PwM/Pi handles now different texts for the | 131 | And PwM/Pi handles now different texts for the |
124 | fields Description, Username, Password, configurable per category. | 132 | fields Description, Username, Password, configurable per category. |
125 | 133 | ||
126 | Fixed a crash in KO/Pi , when importing/loading vcs files | 134 | Fixed a crash in KO/Pi , when importing/loading vcs files |
127 | which have an entry with an attendee with state: | 135 | which have an entry with an attendee with state: |
128 | NEEDS ACTION | 136 | NEEDS ACTION |
129 | 137 | ||
130 | Fixed some problems in the German translation of OM/Pi, | 138 | Fixed some problems in the German translation of OM/Pi, |
131 | which makes some dialogs not fitting on the screen | 139 | which makes some dialogs not fitting on the screen |
132 | of the Z 5500. | 140 | of the Z 5500. |
133 | 141 | ||
134 | Fixed Qtopia crash, when disabling/deinstalling | 142 | Fixed Qtopia crash, when disabling/deinstalling |
135 | KO/Pi alarm applet. | 143 | KO/Pi alarm applet. |
136 | 144 | ||
137 | Implemented direct KDE<->KA/Pi sync for KA/Pi running | 145 | Implemented direct KDE<->KA/Pi sync for KA/Pi running |
138 | on Linux desktop. | 146 | on Linux desktop. |
139 | 147 | ||
140 | Added feature "remove sync info" to sync menu. | 148 | Added feature "remove sync info" to sync menu. |
141 | 149 | ||
142 | Tweaked the KO/Pi What's next view a bit, added | 150 | Tweaked the KO/Pi What's next view a bit, added |
143 | setting to hide events that are done. | 151 | setting to hide events that are done. |
144 | 152 | ||
145 | Disabled "beam receive enabled" on startup to | 153 | Disabled "beam receive enabled" on startup to |
146 | avoid problems if Fastload is enabled. | 154 | avoid problems if Fastload is enabled. |
147 | Please set "beam receive enabled", | 155 | Please set "beam receive enabled", |
148 | if you want to receive data via IR. | 156 | if you want to receive data via IR. |
149 | 157 | ||
150 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running | 158 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running |
151 | on Linux desktop. | 159 | on Linux desktop. |
152 | 160 | ||
153 | Made in KA/Pi scrolling possible, if details view is selected. | 161 | Made in KA/Pi scrolling possible, if details view is selected. |
154 | (The keyboard focus is set automatically to the search line) | 162 | (The keyboard focus is set automatically to the search line) |
155 | 163 | ||
156 | Fixed a bug in DMT sync, that a new entry in DTM was added | 164 | Fixed a bug in DMT sync, that a new entry in DTM was added |
157 | on every sync to Kx/Pi. | 165 | on every sync to Kx/Pi. |
158 | 166 | ||
159 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. | 167 | Fixed missing writing of KA/Pi categories to DMT entries when syncing. |
160 | 168 | ||
161 | Fixed a bug in DMT sync with todos created in KO/Pi containing | 169 | Fixed a bug in DMT sync with todos created in KO/Pi containing |
162 | non-latin1 characters. | 170 | non-latin1 characters. |
163 | 171 | ||
164 | Rearranged package contents of Sharp-ipks and made all | 172 | Rearranged package contents of Sharp-ipks and made all |
165 | packages installable on SD again. | 173 | packages installable on SD again. |
166 | 174 | ||
167 | Fixed the writing of addressbook data in DTM sync. | 175 | Fixed the writing of addressbook data in DTM sync. |
168 | Empty fields in KA/Pi were not removed. | 176 | Empty fields in KA/Pi were not removed. |
169 | 177 | ||
170 | Added better category handling in KA/Pi: | 178 | Added better category handling in KA/Pi: |
171 | Added item | 179 | Added item |
172 | Edit Categories and | 180 | Edit Categories and |
173 | Manage new categories | 181 | Manage new categories |
174 | to the settings menu. | 182 | to the settings menu. |
175 | Possible to configure a view to display categories. | 183 | Possible to configure a view to display categories. |
176 | 184 | ||
177 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. | 185 | Added detailed "KDE Sync Howto" and "Multi Sync Howto" to Help menu. |
178 | 186 | ||
179 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. | 187 | Fixed displaying of "free" days and time in KO Monthview and Agendaview. |
180 | 188 | ||
181 | ... and many other bugfixes. | 189 | ... and many other bugfixes. |
182 | 190 | ||
183 | ********** VERSION 1.9.10 ************ | 191 | ********** VERSION 1.9.10 ************ |
184 | 192 | ||
185 | Many internal small bugfixes. | 193 | Many internal small bugfixes. |
186 | And fix of the "big" bug in KO/Pi, | 194 | And fix of the "big" bug in KO/Pi, |
187 | that after Syncing the appointments had an offset by several hours. | 195 | that after Syncing the appointments had an offset by several hours. |
188 | That was a problem with the internal timezone setting, | 196 | That was a problem with the internal timezone setting, |
189 | introduced by the changed timezone configuration settings. | 197 | introduced by the changed timezone configuration settings. |
190 | 198 | ||
191 | German translation for OM/Pi is now available. | 199 | German translation for OM/Pi is now available. |
192 | 200 | ||
193 | 201 | ||
194 | ********** VERSION 1.9.9 ************ | 202 | ********** VERSION 1.9.9 ************ |
195 | 203 | ||
196 | KDE-Pim/Pi has a new Member! | 204 | KDE-Pim/Pi has a new Member! |
197 | It is called PWM/Pi (Passwordmanager/platform-independent) | 205 | It is called PWM/Pi (Passwordmanager/platform-independent) |
198 | and it is available for the Zaurus. | 206 | and it is available for the Zaurus. |
199 | It is planned, that it will be available later for Windows. | 207 | It is planned, that it will be available later for Windows. |
200 | (And for Linux, of course). | 208 | (And for Linux, of course). |
201 | It is a port of the Passwordmanager of KDE. | 209 | It is a port of the Passwordmanager of KDE. |
202 | It will need the MicroKDElibs to run. | 210 | It will need the MicroKDElibs to run. |
203 | 211 | ||
204 | Made loading of addressbooks in KA/Pi up to 7 times faster! | 212 | Made loading of addressbooks in KA/Pi up to 7 times faster! |
205 | The bigger your addressbook file, the more starting speed | 213 | The bigger your addressbook file, the more starting speed |
206 | will you gain. (relatively) | 214 | will you gain. (relatively) |
207 | 215 | ||
208 | The Qtopia addressbook connector is now platform independend | 216 | The Qtopia addressbook connector is now platform independend |
209 | as well and should work on any platform for importing/exporting | 217 | as well and should work on any platform for importing/exporting |
210 | Qtopia and Opie XML files. | 218 | Qtopia and Opie XML files. |
211 | 219 | ||
212 | Added a +30min feature to the timezone settings to make | 220 | Added a +30min feature to the timezone settings to make |
213 | KDE-Pim/Pi useable in Australia and other parts on the | 221 | KDE-Pim/Pi useable in Australia and other parts on the |
214 | world with strange timezones ;-) | 222 | world with strange timezones ;-) |
215 | 223 | ||
216 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. | 224 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. |
217 | 225 | ||
218 | It is now possible to disable the | 226 | It is now possible to disable the |
219 | "receive data via infrared" feature, such that syncing with | 227 | "receive data via infrared" feature, such that syncing with |
220 | Outlook is now possible again with Kx/Pi runing. | 228 | Outlook is now possible again with Kx/Pi runing. |
221 | Please disable it, before syncing Sharp DTM with Outlook. | 229 | Please disable it, before syncing Sharp DTM with Outlook. |
222 | For your convenience, the "receive data via infrared" feature | 230 | For your convenience, the "receive data via infrared" feature |
223 | is disabled automatically, if you sync Kx/Pi with DTM. | 231 | is disabled automatically, if you sync Kx/Pi with DTM. |
224 | You have to enable it again manually after syncing. | 232 | You have to enable it again manually after syncing. |
225 | Enabling this feature makes it impossible to start the | 233 | Enabling this feature makes it impossible to start the |
226 | Sharp DTM apps. If this feature is enabled, you will only get the | 234 | Sharp DTM apps. If this feature is enabled, you will only get the |
227 | alarm notification from KO/Pi and not from the Sharp calendar. | 235 | alarm notification from KO/Pi and not from the Sharp calendar. |
228 | This is very useful if you sync KO/Pi with Sharp DTM, | 236 | This is very useful if you sync KO/Pi with Sharp DTM, |
229 | because after syncing you usually would get notified about | 237 | because after syncing you usually would get notified about |
230 | an alarm by KO/Pi and the Sharp Calendar. | 238 | an alarm by KO/Pi and the Sharp Calendar. |
231 | 239 | ||
232 | Together with the Linux desktop version of KO/Pi | 240 | Together with the Linux desktop version of KO/Pi |
233 | it is now possible to sync KO/Pi on the Zaurus | 241 | it is now possible to sync KO/Pi on the Zaurus |
234 | with the complete KDE-desktop (3.3 or later) | 242 | with the complete KDE-desktop (3.3 or later) |
235 | calendar data easily. | 243 | calendar data easily. |
236 | That makes it possible to sync the Z with one | 244 | That makes it possible to sync the Z with one |
237 | click of a mouse with the KDE-Desktop. | 245 | click of a mouse with the KDE-Desktop. |
238 | This feature it available for all Zaurus platforms KO/Pi | 246 | This feature it available for all Zaurus platforms KO/Pi |
239 | is running on. | 247 | is running on. |
240 | The only thing needed is a running KO/Pi on Linux and | 248 | The only thing needed is a running KO/Pi on Linux and |
241 | a compiled version of the small | 249 | a compiled version of the small |
242 | KDE-Pim/Pi<->KDE-Desktop access command line program, | 250 | KDE-Pim/Pi<->KDE-Desktop access command line program, |
243 | which is in the KDE-Pim/Pi sources available. | 251 | which is in the KDE-Pim/Pi sources available. |
244 | 252 | ||
245 | The "KDE-desktop" syncing feature for KA/Pi will follow | 253 | The "KDE-desktop" syncing feature for KA/Pi will follow |
246 | in the next releases. | 254 | in the next releases. |
247 | 255 | ||
248 | Fixed the vcard export bug, which had the version 1.9.8. | 256 | Fixed the vcard export bug, which had the version 1.9.8. |
249 | 257 | ||
250 | Added missing GERMAN translation to KO/Pi. | 258 | Added missing GERMAN translation to KO/Pi. |
251 | Hi PsionX, could you add the missing french translation?Thx! | 259 | Hi PsionX, could you add the missing french translation?Thx! |
252 | 260 | ||
253 | Translation files for KA/Pi are available as well. | 261 | Translation files for KA/Pi are available as well. |
254 | GERMAN translation will be available in the next release. | 262 | GERMAN translation will be available in the next release. |
255 | PsionX ( yres, you again ;-) ), could you start translating | 263 | PsionX ( yres, you again ;-) ), could you start translating |
256 | KA/Pi? Thx! | 264 | KA/Pi? Thx! |
257 | 265 | ||
258 | You can download the version 1.9.9 at | 266 | You can download the version 1.9.9 at |
259 | 267 | ||
260 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 | 268 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 |
261 | 269 | ||
262 | Note: | 270 | Note: |
263 | To run the mail program OM/Pi you need libopenssl. | 271 | To run the mail program OM/Pi you need libopenssl. |
264 | A link to a download loaction is available at | 272 | A link to a download loaction is available at |
265 | ZSI at www.killefiz.de | 273 | ZSI at www.killefiz.de |
266 | 274 | ||
267 | 275 | ||
268 | ********** VERSION 1.9.8 ************ | 276 | ********** VERSION 1.9.8 ************ |
269 | 277 | ||
270 | Fixed character decoding in OM/Pi. | 278 | Fixed character decoding in OM/Pi. |
271 | (e.g. German "Umlaute" were not displayed properly.) | 279 | (e.g. German "Umlaute" were not displayed properly.) |
272 | 280 | ||
273 | Made is possible to reparent todos in KO/Pi. | 281 | Made is possible to reparent todos in KO/Pi. |
274 | Use contextmenu or keys (look at Help-Keys + Colors) for that. | 282 | Use contextmenu or keys (look at Help-Keys + Colors) for that. |
275 | 283 | ||
276 | Added the missing Sync-Howto and WhatsNew to the packages. | 284 | Added the missing Sync-Howto and WhatsNew to the packages. |
277 | 285 | ||
278 | KO/Pi on Linux desktop can now sync with KDE desktop. | 286 | KO/Pi on Linux desktop can now sync with KDE desktop. |
279 | That means: When using KO/Pi on Linux desktop for syncing with | 287 | That means: When using KO/Pi on Linux desktop for syncing with |
280 | KDE desktop and the Zaurus, the Zaurus can be synced now | 288 | KDE desktop and the Zaurus, the Zaurus can be synced now |
281 | with all KDE-Calendar resources, not only with one local file. | 289 | with all KDE-Calendar resources, not only with one local file. |
282 | (That makes it possible to sync the Zaurus with the | 290 | (That makes it possible to sync the Zaurus with the |
283 | calendar data on a Kolab server) | 291 | calendar data on a Kolab server) |
284 | 292 | ||
285 | KA/Pi syncing with KDE desktop will be available in the next version. | 293 | KA/Pi syncing with KDE desktop will be available in the next version. |
286 | 294 | ||
287 | 295 | ||
288 | ********** VERSION 1.9.7 ************ | 296 | ********** VERSION 1.9.7 ************ |
289 | 297 | ||
290 | KO/Pi - KA/Pi on Windows: | 298 | KO/Pi - KA/Pi on Windows: |
291 | Now a directory can be defined by the user, where the | 299 | Now a directory can be defined by the user, where the |
292 | application/config data should be saved. | 300 | application/config data should be saved. |
293 | Define your desired path in the evironment variable | 301 | Define your desired path in the evironment variable |
294 | MICROKDEHOME | 302 | MICROKDEHOME |
295 | before starting KO/Pi or KA/Pi. | 303 | before starting KO/Pi or KA/Pi. |
296 | 304 | ||
297 | An easy Kx/Pi to Kx/Pi syncing is now possible | 305 | An easy Kx/Pi to Kx/Pi syncing is now possible |
298 | (it is called Pi-Sync) via network. | 306 | (it is called Pi-Sync) via network. |
299 | Please look at the Sync Howto. | 307 | Please look at the Sync Howto. |
300 | 308 | ||
301 | Exporting of calendar data and contacts to mobile phones is now possible. | 309 | Exporting of calendar data and contacts to mobile phones is now possible. |
302 | The SyncHowto is updated with information howto | 310 | The SyncHowto is updated with information howto |
303 | access/sync mobile phones. | 311 | access/sync mobile phones. |
304 | Please look at the Sync Howto. | 312 | Please look at the Sync Howto. |
305 | 313 | ||
306 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. | 314 | Now KO/Pi and KA/Pi on the Zaurus can receive data via infrared directly. |
307 | Please disable Fastload for the original contact/calendar applications | 315 | Please disable Fastload for the original contact/calendar applications |
308 | and close them. | 316 | and close them. |
309 | KO/Pi and KA/Pi must be running in order to receive the data. | 317 | KO/Pi and KA/Pi must be running in order to receive the data. |
310 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) | 318 | (KO/Pi and KA/Pi are always running if Fastload for them is enabled!) |
311 | 319 | ||
312 | In the KA/Pi details view are now the preferred tel. numbers displayed on top | 320 | In the KA/Pi details view are now the preferred tel. numbers displayed on top |
313 | of the other data ( emails/tel.numbers/addresses) | 321 | of the other data ( emails/tel.numbers/addresses) |
314 | 322 | ||
315 | Fixed some syncing problems in KA/Pi. | 323 | Fixed some syncing problems in KA/Pi. |
316 | 324 | ||
317 | Added font settings for the KA/Pi details view. | 325 | Added font settings for the KA/Pi details view. |
318 | Added fields "children's name" and "gender" to KA/Pi. | 326 | Added fields "children's name" and "gender" to KA/Pi. |
319 | 327 | ||
320 | Made searching in KA/Pi better: | 328 | Made searching in KA/Pi better: |
321 | Now the first item in a view is selected after a search automatically and | 329 | Now the first item in a view is selected after a search automatically and |
322 | the views can be scrolled up/down when the search input field has the keyboard focus. | 330 | the views can be scrolled up/down when the search input field has the keyboard focus. |
323 | 331 | ||
324 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. | 332 | And, of course, fixed a bunch of reported bugs in KO/Pi and KA/Pi. |
325 | 333 | ||
326 | 334 | ||
327 | ********** VERSION 1.9.6 ************ | 335 | ********** VERSION 1.9.6 ************ |
328 | 336 | ||
329 | Changes in the external application communication on the Zaurus | 337 | Changes in the external application communication on the Zaurus |
330 | in order to use less RAM when the apps are running. | 338 | in order to use less RAM when the apps are running. |
331 | First syncing of addressbooks (KA/Pi) is possible. | 339 | First syncing of addressbooks (KA/Pi) is possible. |
332 | 340 | ||
333 | 341 | ||
334 | ********** VERSION 1.9.5a ************ | 342 | ********** VERSION 1.9.5a ************ |
335 | 343 | ||
336 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. | 344 | Fixed a bug in KO/Pi in the SharpDTM sync of version 1.9.5. |
337 | Fixed some small bugs. | 345 | Fixed some small bugs. |
338 | KA/Pi shows now the birthday in summary view. | 346 | KA/Pi shows now the birthday in summary view. |
339 | Now OM/Pi and KA/Pi are using the date format defined in KO/Pi | 347 | Now OM/Pi and KA/Pi are using the date format defined in KO/Pi |
340 | for displaying dates. | 348 | for displaying dates. |
341 | 349 | ||
342 | 350 | ||
343 | ********** VERSION 1.9.5 ************ | 351 | ********** VERSION 1.9.5 ************ |
344 | 352 | ||
345 | There is still no Addressbook syncing! | 353 | There is still no Addressbook syncing! |
346 | 354 | ||
347 | New in 1.9.5: | 355 | New in 1.9.5: |
348 | 356 | ||
349 | Many bugfixes. | 357 | Many bugfixes. |
350 | Better searching in KA/Pi. | 358 | Better searching in KA/Pi. |
351 | You can configure in KA/Pi if you want to search only after | 359 | You can configure in KA/Pi if you want to search only after |
352 | <return> key pressed. | 360 | <return> key pressed. |
353 | 361 | ||
354 | Better mail downloading in OM/Pi. | 362 | Better mail downloading in OM/Pi. |
355 | 363 | ||
356 | First experimental alpha version of sync of KO/Pi with mobile phones. | 364 | First experimental alpha version of sync of KO/Pi with mobile phones. |
357 | See gammu documentation for supported phones. | 365 | See gammu documentation for supported phones. |
358 | You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp. | 366 | You need to install the package kammu_1.9.5_arm.ipk for sync of KO/Pi with mobile phones. kammu_1.9.5_arm.ipk needs libbluetooth and libsdp. |
359 | Quick hint how to use: | 367 | Quick hint how to use: |
360 | NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! | 368 | NOTE: MOBILE PHONE SYNC IS EXPERIMENTAL! |
361 | Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. | 369 | Install kammu_1.9.5_arm.ipk , libbluetooth and libsdp. |
362 | Create syncprofile - mobile device | 370 | Create syncprofile - mobile device |
363 | Remove entry for model. (Leave empty ). | 371 | Remove entry for model. (Leave empty ). |
364 | Enable infrared on Zaurus and your Phone. | 372 | Enable infrared on Zaurus and your Phone. |
365 | Sync. | 373 | Sync. |
366 | To get a more detailed log, start kopi from konsole. | 374 | To get a more detailed log, start kopi from konsole. |
367 | 375 | ||
368 | ********** VERSION 1.9.4 ************ | 376 | ********** VERSION 1.9.4 ************ |
369 | 377 | ||
370 | This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. | 378 | This is the version 1.9.4 of KDE-Pim/Pi for the Zaurus. |
371 | 379 | ||
372 | WARNING: | 380 | WARNING: |
373 | PLEASE BACKUP ALL YOUR DATA! | 381 | PLEASE BACKUP ALL YOUR DATA! |
374 | We have changed a lot and maybe there are some unknown problems. | 382 | We have changed a lot and maybe there are some unknown problems. |
375 | 383 | ||
376 | SYNC HANDLING HAS CHANGED! | 384 | SYNC HANDLING HAS CHANGED! |
377 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. | 385 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. |
378 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). | 386 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). |
379 | 387 | ||
380 | You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. | 388 | You need the kmicrokdelibs_1.9.4_arm.ipk as a base for the other programs. |
381 | If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well. | 389 | If you get the error: "Install only possible in main memory", just try it again to install it on SD card. That worked for me. And it was reported that rebooting Qtopia did help in this case as well. |
382 | 390 | ||
383 | As programs are available: | 391 | As programs are available: |
384 | KO/Pi (korganizer ipk) - a calendar program. | 392 | KO/Pi (korganizer ipk) - a calendar program. |
385 | KA/Pi (kaddressbook ipk ) - an addressbook | 393 | KA/Pi (kaddressbook ipk ) - an addressbook |
386 | OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. | 394 | OM/Pi (kopiemail ipk ) an email program with pop/smtp and IMAP support. |
387 | 395 | ||
388 | An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. | 396 | An alarm notification program ( korganizer-alarm ipk ) for KO/Pi that notifies you about alarms, even if the Zaurus is in suspend mode. |
389 | (If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) | 397 | (If you do not see an icon in the taskbar after installing korganizer-alarm, please restart Qtopia) |
390 | 398 | ||
391 | All the applications are installed in a "Pim" TAB. | 399 | All the applications are installed in a "Pim" TAB. |
392 | If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk | 400 | If this TAB is new on your system, you can get an icon in this TAB by installing pim_TAB_icon_1.9.4_arm.ipk |
393 | 401 | ||
394 | All the application are integrated. | 402 | All the application are integrated. |
395 | Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail. | 403 | Such that you can choose in KO/Pi the attendees of a meeting from the addresses in KA/Pi. When you click in KA/Pi on the email address, OM/Pi is started to write the mail. |
396 | 404 | ||
397 | HINT: | 405 | HINT: |
398 | If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. | 406 | If you install KPhone/Pi 0.9.7, it will be called, if you click in KA/Pi on a phone number. |
399 | 407 | ||
400 | What's new? | 408 | What's new? |
401 | 409 | ||
402 | SYNC HANDLING HAS CHANGED! | 410 | SYNC HANDLING HAS CHANGED! |
403 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. | 411 | Such that, if you sync now with an already synded device, you will duplicated entries after the first sync. |
404 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). | 412 | (This change was introduced to make it possible to sync with mobile phones, which will be available later (maybe in 4 weeks). |
405 | 413 | ||
406 | New in OM/Pi: | 414 | New in OM/Pi: |
407 | When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails. | 415 | When copying(i.e. downloading mails) , you can specify, that only mails of a given size should be downloaded. Added mail copy possibility for selected mails. |
408 | 416 | ||
409 | New in KO/Pi: | 417 | New in KO/Pi: |
410 | French is now available for KO/Pi. | 418 | French is now available for KO/Pi. |
411 | Choose menu:Actions - Configure:TAB locale | 419 | Choose menu:Actions - Configure:TAB locale |
412 | Syncing has changed. | 420 | Syncing has changed. |
413 | Phone sync available soon. | 421 | Phone sync available soon. |
414 | Not much changes, I cannot remember them ... | 422 | Not much changes, I cannot remember them ... |
415 | 423 | ||
416 | New in KA/Pi: | 424 | New in KA/Pi: |
417 | Beaming possible. | 425 | Beaming possible. |
418 | Sharp DTM readonly access possible( create a new DTM resource ); | 426 | Sharp DTM readonly access possible( create a new DTM resource ); |
419 | Better searching possible. | 427 | Better searching possible. |
420 | Search is performed only after pressing the return key. | 428 | Search is performed only after pressing the return key. |
421 | Use wildcard * to specify parts of a name. | 429 | Use wildcard * to specify parts of a name. |
422 | 430 | ||
423 | Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * . | 431 | Better name/email selection dialog (called from KO/Pi or OM/Pi). In this dialog, now searching is possible. Like in KA/Pi, use return key and wildcard * . |
424 | 432 | ||
425 | A big improvement is the new management of the contact access. | 433 | A big improvement is the new management of the contact access. |
426 | In version 1.9.3, every application was using their own addressbook access data. | 434 | In version 1.9.3, every application was using their own addressbook access data. |
427 | That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. | 435 | That means, the addressbook was loaded up to three times in the memory, when accessed by KA/Pi, KO/Pi and OM/Pi. |
428 | That was wasting of memory, if you had several hundreds of contacts. | 436 | That was wasting of memory, if you had several hundreds of contacts. |
429 | 437 | ||
430 | Now only KA/Pi accesses the addressbook. | 438 | Now only KA/Pi accesses the addressbook. |
431 | If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them. | 439 | If KO/Pi or OM/Pi want to get some name/email data, they request KA/Pi to open the name/email selection dialog and send it back to them. |
432 | If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. | 440 | If you click on an attendee in a meeting, its contact data is displayed in KA/Pi directly. |
433 | That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. | 441 | That means, if KO/Pi or OM/Pi want to access contact data, KA/Pi is started first. |
434 | 442 | ||
435 | New in the KO/Pi alarm applet: | 443 | New in the KO/Pi alarm applet: |
436 | Configure your own timer popup menu! | 444 | Configure your own timer popup menu! |
437 | (Text and minutes for timer countdown) | 445 | (Text and minutes for timer countdown) |
438 | Just edit the file | 446 | Just edit the file |
439 | (yourhomedir)/.kopialarmtimerrc | 447 | (yourhomedir)/.kopialarmtimerrc |
440 | and start/stop a timer to get a new menu with the data of this file. | 448 | and start/stop a timer to get a new menu with the data of this file. |
441 | 449 | ||
442 | ********** VERSION 1.9.3 ************ | 450 | ********** VERSION 1.9.3 ************ |
443 | 1) | 451 | 1) |
444 | Now KO/Pi on Windows imports directly the calendar data of | 452 | Now KO/Pi on Windows imports directly the calendar data of |
445 | an installed Outlook. Should work with OL version >= 2000. | 453 | an installed Outlook. Should work with OL version >= 2000. |
446 | 454 | ||
447 | ********** VERSION 1.9.2 ************ | 455 | ********** VERSION 1.9.2 ************ |
448 | 1) | 456 | 1) |
449 | KDE-Pim/Pi has got a new member: | 457 | KDE-Pim/Pi has got a new member: |
450 | KmicroMail (KM/Pi) is a mail program, | 458 | KmicroMail (KM/Pi) is a mail program, |
451 | which can handle IMAP and POP mail access. | 459 | which can handle IMAP and POP mail access. |
452 | It is based on Opie-Mail v3. | 460 | It is based on Opie-Mail v3. |
453 | All dependencies to the Opie libraries ar removed, | 461 | All dependencies to the Opie libraries ar removed, |
454 | such that no additional Opie lib is needed. | 462 | such that no additional Opie lib is needed. |
455 | It is already integrated in KO/Pi and KA/Pi. | 463 | It is already integrated in KO/Pi and KA/Pi. |
456 | It it now available for the Zaurus,probably it | 464 | It it now available for the Zaurus,probably it |
457 | will be available for other platforms later. | 465 | will be available for other platforms later. |
458 | Hint: | 466 | Hint: |
459 | Create your own contact (name + email) | 467 | Create your own contact (name + email) |
460 | in KA/Pi, select this contact and choose menu: | 468 | in KA/Pi, select this contact and choose menu: |
461 | Settings - Set Who Am I. | 469 | Settings - Set Who Am I. |
462 | Now the settings of this contact are used as | 470 | Now the settings of this contact are used as |
463 | the sender data in KM/Pi. | 471 | the sender data in KM/Pi. |
464 | 2) | 472 | 2) |
465 | KDE-Pim/Pi is split up in five different | 473 | KDE-Pim/Pi is split up in five different |
466 | packages now precompiled for Sharp Zaurus: | 474 | packages now precompiled for Sharp Zaurus: |
467 | --kmicrokdelibs_1.9.2_arm.ipk | 475 | --kmicrokdelibs_1.9.2_arm.ipk |
468 | The libs are needed for any | 476 | The libs are needed for any |
469 | of the following programs: | 477 | of the following programs: |
470 | --kaddressbook_1.9.2_arm.ipk | 478 | --kaddressbook_1.9.2_arm.ipk |
471 | --kmicromail_1.9.2_arm.ipk | 479 | --kmicromail_1.9.2_arm.ipk |
472 | --korganizer_1.9.2_arm.ipk | 480 | --korganizer_1.9.2_arm.ipk |
473 | Independ from that, there is the alarm applet | 481 | Independ from that, there is the alarm applet |
474 | available for KO/Pi, which also offers | 482 | available for KO/Pi, which also offers |
475 | quick access for a new mail or | 483 | quick access for a new mail or |
476 | showing the addressbook.: | 484 | showing the addressbook.: |
477 | --korganizer-alarm_1.9.2_arm.ipk | 485 | --korganizer-alarm_1.9.2_arm.ipk |
478 | Independend means, that the alarm applet | 486 | Independend means, that the alarm applet |
479 | does not need any of the libs or programs above to run. | 487 | does not need any of the libs or programs above to run. |
480 | But it would be quite useless without these programs. | 488 | But it would be quite useless without these programs. |
481 | NOTE: | 489 | NOTE: |
482 | If you get a | 490 | If you get a |
483 | "This application depends on other programs" | 491 | "This application depends on other programs" |
484 | during installation of | 492 | during installation of |
485 | --kmicrokdelibs_1.9.2_arm.ipk | 493 | --kmicrokdelibs_1.9.2_arm.ipk |
486 | you probably do not have to care about that. | 494 | you probably do not have to care about that. |
487 | kmicrokdelibs_1.9.2 will come with some | 495 | kmicrokdelibs_1.9.2 will come with some |
488 | resource plugins, which needs additional libraries. | 496 | resource plugins, which needs additional libraries. |
489 | (E.g. libopie1, if you want to use the | 497 | (E.g. libopie1, if you want to use the |
490 | opie resource connector in KA/Pi). | 498 | opie resource connector in KA/Pi). |
491 | If you do not have this libraries installed, | 499 | If you do not have this libraries installed, |
492 | you simply cannot use the resource. | 500 | you simply cannot use the resource. |
493 | To make it clear: | 501 | To make it clear: |
494 | If the libraries are missing, the applications | 502 | If the libraries are missing, the applications |
495 | using kmicrokdelibs will start, | 503 | using kmicrokdelibs will start, |
496 | because the resources are plugins. | 504 | because the resources are plugins. |
497 | 3) | 505 | 3) |
498 | KO/Pi and friends are now installable on SD-Card! | 506 | KO/Pi and friends are now installable on SD-Card! |
499 | It is recommended to install all libs and apps | 507 | It is recommended to install all libs and apps |
500 | on the SD card or all in the internal storage. | 508 | on the SD card or all in the internal storage. |
501 | There may be problems, if this is mixed. | 509 | There may be problems, if this is mixed. |
502 | 4) | 510 | 4) |
503 | Fixed two bugs in the alarm notification on Windows. | 511 | Fixed two bugs in the alarm notification on Windows. |
504 | 5) | 512 | 5) |
505 | Great improvement! | 513 | Great improvement! |
506 | KO/Pi uses now the latest version of libical. | 514 | KO/Pi uses now the latest version of libical. |
507 | Libical is the library which actually reads | 515 | Libical is the library which actually reads |
508 | the calendar files and extract the data from it. | 516 | the calendar files and extract the data from it. |
509 | With the old version, there were problems | 517 | With the old version, there were problems |
510 | (crashes or program hangs) when licical did read | 518 | (crashes or program hangs) when licical did read |
511 | files, which were not stored from KO/Pi. | 519 | files, which were not stored from KO/Pi. |
512 | I do not know, if the new libical works perfect, | 520 | I do not know, if the new libical works perfect, |
513 | but actually it works much better than | 521 | but actually it works much better than |
514 | the old version. | 522 | the old version. |
515 | There are no problems with compatibility with | 523 | There are no problems with compatibility with |
516 | old calendar files of KO/Pi, of course! | 524 | old calendar files of KO/Pi, of course! |
517 | 6) | 525 | 6) |
518 | New in KA/Pi: | 526 | New in KA/Pi: |
519 | Opie addressbook resource connector available! | 527 | Opie addressbook resource connector available! |
520 | You will need libopie1 and the opie addressbook, | 528 | You will need libopie1 and the opie addressbook, |
521 | of course. | 529 | of course. |
522 | With the Opie addressbook resource connector, | 530 | With the Opie addressbook resource connector, |
523 | you can access the Opie addressbook readonly in KA/Pi. | 531 | you can access the Opie addressbook readonly in KA/Pi. |
524 | If you want to edit or import the data into KA/Pi, | 532 | If you want to edit or import the data into KA/Pi, |
525 | do this: | 533 | do this: |
526 | a) Create an Opie resource. | 534 | a) Create an Opie resource. |
527 | (Menu: Settings-Configure Resources). | 535 | (Menu: Settings-Configure Resources). |
528 | After configuration and restarting KA/Pi you should see | 536 | After configuration and restarting KA/Pi you should see |
529 | the Opie contacts in KA/Pi. | 537 | the Opie contacts in KA/Pi. |
530 | b) Select some or all Opie contacts. | 538 | b) Select some or all Opie contacts. |
531 | (NOTE: +++++ | 539 | (NOTE: +++++ |
532 | To know exactly, what contacts are Opie contacts, | 540 | To know exactly, what contacts are Opie contacts, |
533 | do this: Choose menu: | 541 | do this: Choose menu: |
534 | View-Modify View - TAB Fields. | 542 | View-Modify View - TAB Fields. |
535 | Select in the above list "Resource" and click | 543 | Select in the above list "Resource" and click |
536 | down arrow to add it to the "Selected fields". | 544 | down arrow to add it to the "Selected fields". |
537 | Click OK. | 545 | Click OK. |
538 | Now you have a new column "Resource" in your list, | 546 | Now you have a new column "Resource" in your list, |
539 | where you can see, what an Opie resource is. | 547 | where you can see, what an Opie resource is. |
540 | ++++ NOTE end.) | 548 | ++++ NOTE end.) |
541 | Ok, we do have now some Opie contacts seleted. | 549 | Ok, we do have now some Opie contacts seleted. |
542 | (Use SHIFT or CTRL key in order to multiple select). | 550 | (Use SHIFT or CTRL key in order to multiple select). |
543 | c) Choose menu: Edit-Copy. | 551 | c) Choose menu: Edit-Copy. |
544 | d) Choose menu: Edit-Paste. | 552 | d) Choose menu: Edit-Paste. |
545 | e) Select the resource, you want to add the contacts to. | 553 | e) Select the resource, you want to add the contacts to. |
546 | Congrats! Now you have read/write access to the copied | 554 | Congrats! Now you have read/write access to the copied |
547 | opie contacts as "real" KA/Pi contacts. | 555 | opie contacts as "real" KA/Pi contacts. |
548 | 556 | ||
549 | 557 | ||
550 | ********** VERSION 1.9.1 ************ | 558 | ********** VERSION 1.9.1 ************ |
551 | 1) | 559 | 1) |
552 | +++ IMPORTANT 1 +++ | 560 | +++ IMPORTANT 1 +++ |
553 | 561 | ||
554 | The storing place of the default calendar | 562 | The storing place of the default calendar |
555 | file has changed! | 563 | file has changed! |
556 | The default calendar file was | 564 | The default calendar file was |
557 | Applications/korganizer/mycalendar.ics | 565 | Applications/korganizer/mycalendar.ics |
558 | on Zaurus and | 566 | on Zaurus and |
559 | (yourHomeDir)/korganizer/mycalendar.ics | 567 | (yourHomeDir)/korganizer/mycalendar.ics |
560 | on Windows/Linux desktop. Now it is | 568 | on Windows/Linux desktop. Now it is |
561 | (yourHomeDir)/kdepim/korganizer/mycalendar.ics | 569 | (yourHomeDir)/kdepim/korganizer/mycalendar.ics |
562 | on Zaurus, Windows and Linux. | 570 | on Zaurus, Windows and Linux. |
563 | To load the old file, choose menu | 571 | To load the old file, choose menu |
564 | File-Load calendar backup. | 572 | File-Load calendar backup. |
565 | (It should be loaded automatically | 573 | (It should be loaded automatically |
566 | at startup with a warning message displayed). | 574 | at startup with a warning message displayed). |
567 | The place of the configuration file has changed too. | 575 | The place of the configuration file has changed too. |
568 | If you want to use your old KO/Pi config, | 576 | If you want to use your old KO/Pi config, |
569 | copy it to | 577 | copy it to |
570 | (yourHomeDir)/kdepim/config/korganizerrc | 578 | (yourHomeDir)/kdepim/config/korganizerrc |
571 | Please read VERSION 1.9.0 - topic 3) as well! | 579 | Please read VERSION 1.9.0 - topic 3) as well! |
572 | 580 | ||
573 | +++ IMPORTANT 2 +++ | 581 | +++ IMPORTANT 2 +++ |
574 | 582 | ||
575 | Because of the new paths, you will need | 583 | Because of the new paths, you will need |
576 | a new version of the KO/Pi alarm applet | 584 | a new version of the KO/Pi alarm applet |
577 | for Zaurus. | 585 | for Zaurus. |
578 | Use version >= 1.9.1 | 586 | Use version >= 1.9.1 |
579 | 587 | ||
580 | 2) | 588 | 2) |
581 | Now the QWhat'sThis Icon works for items | 589 | Now the QWhat'sThis Icon works for items |
582 | in the month view as well. | 590 | in the month view as well. |
583 | (See VERSION 1.7.8 Topic 1) ). | 591 | (See VERSION 1.7.8 Topic 1) ). |
584 | 3) | 592 | 3) |
585 | You can import birtsdays/anniversaries | 593 | You can import birtsdays/anniversaries |
586 | from KA/Pi into KO/Pi. | 594 | from KA/Pi into KO/Pi. |
587 | Choose menu File-Import birthdays. | 595 | Choose menu File-Import birthdays. |
588 | If you import twice, already imported items | 596 | If you import twice, already imported items |
589 | will not be imported again, if they | 597 | will not be imported again, if they |
590 | have not been changed in KO/Pi. | 598 | have not been changed in KO/Pi. |
591 | 4) | 599 | 4) |
592 | When syncing with sharp DTM, now a progress | 600 | When syncing with sharp DTM, now a progress |
593 | is shown, when the data is written back. | 601 | is shown, when the data is written back. |
594 | If there is much data in KO/Pi and no data | 602 | If there is much data in KO/Pi and no data |
595 | in DTM, that can take a long time. | 603 | in DTM, that can take a long time. |
596 | (But only for the first time ). | 604 | (But only for the first time ). |
597 | 5) | 605 | 5) |
598 | In the search dialog, you can search | 606 | In the search dialog, you can search |
599 | now for the name/email of an attendee | 607 | now for the name/email of an attendee |
600 | of an event/todo. | 608 | of an event/todo. |
601 | To get more space for displaying | 609 | To get more space for displaying |
602 | search results, the buttons | 610 | search results, the buttons |
603 | for "search" and "close" on the | 611 | for "search" and "close" on the |
604 | bottom are removed in the PDA version. | 612 | bottom are removed in the PDA version. |
605 | You have to click OK in the top right | 613 | You have to click OK in the top right |
606 | corner to do a search. | 614 | corner to do a search. |
607 | 6) | 615 | 6) |
608 | Now it is possible to disable the displaying | 616 | Now it is possible to disable the displaying |
609 | of todo items in the Allday part of the Agenda. | 617 | of todo items in the Allday part of the Agenda. |
610 | Choose Menu Action-Configure, | 618 | Choose Menu Action-Configure, |
611 | TAB Todo View, checkbox | 619 | TAB Todo View, checkbox |
612 | "Allday Agenda view shows todos" | 620 | "Allday Agenda view shows todos" |
613 | 7) | 621 | 7) |
614 | If FastLoad is enabled, now the settings and the | 622 | If FastLoad is enabled, now the settings and the |
615 | calendar data are saved, when KO/Pi is closed. | 623 | calendar data are saved, when KO/Pi is closed. |
616 | (If no Fastload is enabled, KO/Pi saves | 624 | (If no Fastload is enabled, KO/Pi saves |
617 | the data as well, of course) | 625 | the data as well, of course) |
618 | 8) | 626 | 8) |
619 | The Agenda View has a minimize-splitter now, | 627 | The Agenda View has a minimize-splitter now, |
620 | such that the height of the allday part can be | 628 | such that the height of the allday part can be |
621 | changed quickly. | 629 | changed quickly. |
622 | 630 | ||
623 | ********** VERSION 1.9.0 ************ | 631 | ********** VERSION 1.9.0 ************ |
624 | 1) | 632 | 1) |
625 | KO/Pi is now merged with the new microKDE from KA/Pi. | 633 | KO/Pi is now merged with the new microKDE from KA/Pi. |
626 | KO/Pi accesses now KA/Pi as the addressbook. | 634 | KO/Pi accesses now KA/Pi as the addressbook. |
627 | The other ddressbook-plugins are not working any longer. | 635 | The other ddressbook-plugins are not working any longer. |
628 | (It is planned, that later KA/Pi itself uses these plugins) | 636 | (It is planned, that later KA/Pi itself uses these plugins) |
629 | New versions of KO/Pi are only available | 637 | New versions of KO/Pi are only available |
630 | together with KA/Pi as the KDE-Pim/Pi package. | 638 | together with KA/Pi as the KDE-Pim/Pi package. |
631 | 2) | 639 | 2) |
632 | If you click on an attendee of a meeting in the | 640 | If you click on an attendee of a meeting in the |
633 | event viewer, a detailed summary of the | 641 | event viewer, a detailed summary of the |
634 | attendee is shown. | 642 | attendee is shown. |
635 | 3) | 643 | 3) |
636 | The place of the configuration file has changed. | 644 | The place of the configuration file has changed. |
637 | If you want to use your old KO/Pi config, copy | 645 | If you want to use your old KO/Pi config, copy |
638 | Applications/korganizer/config_korganizerrc | 646 | Applications/korganizer/config_korganizerrc |
639 | to | 647 | to |
640 | Applications/korganizer/config/korganizerrc | 648 | Applications/korganizer/config/korganizerrc |
641 | 649 | ||
642 | ********** VERSION 1.7.8 ************ | 650 | ********** VERSION 1.7.8 ************ |
643 | 1) | 651 | 1) |
644 | Now the QWhat'sThis ist working. | 652 | Now the QWhat'sThis ist working. |
645 | Enable the QWhat'sThis icon in the toolbar. | 653 | Enable the QWhat'sThis icon in the toolbar. |
646 | (You have to restart to reload the changed toolbar config). | 654 | (You have to restart to reload the changed toolbar config). |
647 | Now click on the QWhat'sThis Icon | 655 | Now click on the QWhat'sThis Icon |
648 | in the top right corner of KO/Pi. | 656 | in the top right corner of KO/Pi. |
649 | Then click on an item in the Agenda View: | 657 | Then click on an item in the Agenda View: |
650 | You will get a detailed display of the items content. | 658 | You will get a detailed display of the items content. |
651 | 2) | 659 | 2) |
652 | Some other very minor changes. | 660 | Some other very minor changes. |
653 | But I have forgotten the details ... | 661 | But I have forgotten the details ... |
654 | For that reason I start this log here: | 662 | For that reason I start this log here: |
655 | To document my changes, when I am doing it. | 663 | To document my changes, when I am doing it. |
656 | 664 | ||
657 | ********** VERSION 1.7.7 ************ | 665 | ********** VERSION 1.7.7 ************ |
658 | Stable Version of KO/Pi | 666 | Stable Version of KO/Pi |
diff --git a/kalarmd/simplealarmdaemonapplet.cpp b/kalarmd/simplealarmdaemonapplet.cpp index 38a744f..3277036 100644 --- a/kalarmd/simplealarmdaemonapplet.cpp +++ b/kalarmd/simplealarmdaemonapplet.cpp | |||
@@ -1,59 +1,60 @@ | |||
1 | #include "simplealarmdaemonapplet.h" | 1 | #include "simplealarmdaemonapplet.h" |
2 | 2 | ||
3 | #include "simplealarmdaemonimpl.h" | 3 | #include "simplealarmdaemonimpl.h" |
4 | 4 | ||
5 | #include <qcopchannel_qws.h> | 5 | #include <qcopchannel_qws.h> |
6 | #include <qlabel.h> | 6 | #include <qlabel.h> |
7 | #include <qapp.h> | 7 | #include <qapp.h> |
8 | #include <qpe/resource.h> | 8 | #include <qpe/resource.h> |
9 | SimpleAlarmDaemonApplet::SimpleAlarmDaemonApplet() | 9 | SimpleAlarmDaemonApplet::SimpleAlarmDaemonApplet() |
10 | : mApplet( 0 ), ref( 0 ) | 10 | : mApplet( 0 ), ref( 0 ) |
11 | { | 11 | { |
12 | 12 | ||
13 | } | 13 | } |
14 | 14 | ||
15 | SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet() | 15 | SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet() |
16 | { | 16 | { |
17 | delete mApplet; | 17 | //delete mApplet; |
18 | mApplet = 0; | 18 | mApplet = 0; |
19 | } | 19 | } |
20 | 20 | ||
21 | 21 | ||
22 | QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent ) | 22 | QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent ) |
23 | { | 23 | { |
24 | if ( !mApplet ) { | 24 | if ( !mApplet ) { |
25 | mApplet = new SimpleAlarmDaemonImpl( parent ); | 25 | mApplet = new SimpleAlarmDaemonImpl( parent ); |
26 | if ( QApplication::desktop()->width() < 480 ) | 26 | if ( QApplication::desktop()->width() < 480 ) |
27 | mApplet->setPixmap( Resource::loadPixmap( "ko16" ) ); | 27 | mApplet->setPixmap( Resource::loadPixmap( "ko16" ) ); |
28 | else | 28 | else |
29 | mApplet->setPixmap( Resource::loadPixmap( "ko24" ) ); | 29 | mApplet->setPixmap( Resource::loadPixmap( "ko24" ) ); |
30 | QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ; | 30 | QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ; |
31 | QObject::connect( c, SIGNAL (received ( const QCString &, const QByteArray & )),mApplet, SLOT(recieve( const QCString&, const QByteArray& ))); | 31 | QObject::connect( c, SIGNAL (received ( const QCString &, const QByteArray & )),mApplet, SLOT(recieve( const QCString&, const QByteArray& ))); |
32 | mApplet->show(); | 32 | mApplet->show(); |
33 | } | 33 | } |
34 | return mApplet; | 34 | return mApplet; |
35 | } | 35 | } |
36 | 36 | ||
37 | int SimpleAlarmDaemonApplet::position() const | 37 | int SimpleAlarmDaemonApplet::position() const |
38 | { | 38 | { |
39 | return 7; | 39 | return 7; |
40 | } | 40 | } |
41 | 41 | ||
42 | QRESULT SimpleAlarmDaemonApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 42 | QRESULT SimpleAlarmDaemonApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
43 | { | 43 | { |
44 | // qDebug(" SimpleAlarmDaemonApplet::queryInterface "); | ||
44 | *iface = 0; | 45 | *iface = 0; |
45 | if ( uuid == IID_QUnknown ) | 46 | if ( uuid == IID_QUnknown ) |
46 | *iface = this; | 47 | *iface = this; |
47 | else if ( uuid == IID_TaskbarApplet ) | 48 | else if ( uuid == IID_TaskbarApplet ) |
48 | *iface = this; | 49 | *iface = this; |
50 | |||
49 | if ( *iface ) { | 51 | if ( *iface ) { |
50 | //(*iface)->addRef(); | 52 | (*iface)->addRef(); |
51 | return QS_OK; | 53 | return QS_OK; |
52 | } | 54 | } |
53 | return QE_NOCOMPONENT; | 55 | return QE_NOINTERFACE; |
54 | } | 56 | } |
55 | |||
56 | Q_EXPORT_INTERFACE() | 57 | Q_EXPORT_INTERFACE() |
57 | { | 58 | { |
58 | Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet ) | 59 | Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet ) |
59 | } | 60 | } |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 5d7b066..97b4a03 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1,1153 +1,1157 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qheader.h> | 25 | #include <qheader.h> |
26 | #include <qcursor.h> | 26 | #include <qcursor.h> |
27 | 27 | ||
28 | #include <qvbox.h> | 28 | #include <qvbox.h> |
29 | #include <kdebug.h> | 29 | #include <kdebug.h> |
30 | #include "koprefs.h" | 30 | #include "koprefs.h" |
31 | #include <klocale.h> | 31 | #include <klocale.h> |
32 | #include <kglobal.h> | 32 | #include <kglobal.h> |
33 | #include <kiconloader.h> | 33 | #include <kiconloader.h> |
34 | #include <kmessagebox.h> | 34 | #include <kmessagebox.h> |
35 | 35 | ||
36 | #include <libkcal/icaldrag.h> | 36 | #include <libkcal/icaldrag.h> |
37 | #include <libkcal/vcaldrag.h> | 37 | #include <libkcal/vcaldrag.h> |
38 | #include <libkcal/calfilter.h> | 38 | #include <libkcal/calfilter.h> |
39 | #include <libkcal/dndfactory.h> | 39 | #include <libkcal/dndfactory.h> |
40 | #include <libkcal/calendarresources.h> | 40 | #include <libkcal/calendarresources.h> |
41 | #include <libkcal/resourcecalendar.h> | 41 | #include <libkcal/resourcecalendar.h> |
42 | #include <kresources/resourceselectdialog.h> | 42 | #include <kresources/resourceselectdialog.h> |
43 | #ifndef DESKTOP_VERSION | 43 | #ifndef DESKTOP_VERSION |
44 | #include <qpe/qpeapplication.h> | 44 | #include <qpe/qpeapplication.h> |
45 | #else | 45 | #else |
46 | #include <qapplication.h> | 46 | #include <qapplication.h> |
47 | #endif | 47 | #endif |
48 | #ifndef KORG_NOPRINTER | 48 | #ifndef KORG_NOPRINTER |
49 | #include "calprinter.h" | 49 | #include "calprinter.h" |
50 | #endif | 50 | #endif |
51 | #include "docprefs.h" | 51 | #include "docprefs.h" |
52 | 52 | ||
53 | #include "kotodoview.h" | 53 | #include "kotodoview.h" |
54 | using namespace KOrg; | 54 | using namespace KOrg; |
55 | 55 | ||
56 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, | 56 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, |
57 | const char *name) : | 57 | const char *name) : |
58 | KListView(parent,name) | 58 | KListView(parent,name) |
59 | { | 59 | { |
60 | mName = QString ( name ); | 60 | mName = QString ( name ); |
61 | mCalendar = calendar; | 61 | mCalendar = calendar; |
62 | #ifndef DESKTOP_VERSION | 62 | #ifndef DESKTOP_VERSION |
63 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 63 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
64 | #endif | 64 | #endif |
65 | mOldCurrent = 0; | 65 | mOldCurrent = 0; |
66 | mMousePressed = false; | 66 | mMousePressed = false; |
67 | 67 | ||
68 | setAcceptDrops(true); | 68 | setAcceptDrops(true); |
69 | viewport()->setAcceptDrops(true); | 69 | viewport()->setAcceptDrops(true); |
70 | int size = 16; | 70 | int size = 16; |
71 | if (qApp->desktop()->width() < 300 ) | 71 | if (qApp->desktop()->width() < 300 ) |
72 | size = 12; | 72 | size = 12; |
73 | setTreeStepSize( size + 6 ); | 73 | setTreeStepSize( size + 6 ); |
74 | 74 | ||
75 | } | 75 | } |
76 | 76 | ||
77 | void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) | 77 | void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) |
78 | { | 78 | { |
79 | #ifndef KORG_NODND | 79 | #ifndef KORG_NODND |
80 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; | 80 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; |
81 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 81 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
82 | !QTextDrag::canDecode( e ) ) { | 82 | !QTextDrag::canDecode( e ) ) { |
83 | e->ignore(); | 83 | e->ignore(); |
84 | return; | 84 | return; |
85 | } | 85 | } |
86 | 86 | ||
87 | mOldCurrent = currentItem(); | 87 | mOldCurrent = currentItem(); |
88 | #endif | 88 | #endif |
89 | } | 89 | } |
90 | 90 | ||
91 | 91 | ||
92 | void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) | 92 | void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) |
93 | { | 93 | { |
94 | #ifndef KORG_NODND | 94 | #ifndef KORG_NODND |
95 | // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; | 95 | // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; |
96 | 96 | ||
97 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 97 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
98 | !QTextDrag::canDecode( e ) ) { | 98 | !QTextDrag::canDecode( e ) ) { |
99 | e->ignore(); | 99 | e->ignore(); |
100 | return; | 100 | return; |
101 | } | 101 | } |
102 | 102 | ||
103 | e->accept(); | 103 | e->accept(); |
104 | #endif | 104 | #endif |
105 | } | 105 | } |
106 | 106 | ||
107 | void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) | 107 | void KOTodoListView::contentsDragLeaveEvent(QDragLeaveEvent *) |
108 | { | 108 | { |
109 | #ifndef KORG_NODND | 109 | #ifndef KORG_NODND |
110 | // kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl; | 110 | // kdDebug() << "KOTodoListView::contentsDragLeaveEvent" << endl; |
111 | 111 | ||
112 | setCurrentItem(mOldCurrent); | 112 | setCurrentItem(mOldCurrent); |
113 | setSelected(mOldCurrent,true); | 113 | setSelected(mOldCurrent,true); |
114 | #endif | 114 | #endif |
115 | } | 115 | } |
116 | 116 | ||
117 | void KOTodoListView::contentsDropEvent(QDropEvent *e) | 117 | void KOTodoListView::contentsDropEvent(QDropEvent *e) |
118 | { | 118 | { |
119 | #ifndef KORG_NODND | 119 | #ifndef KORG_NODND |
120 | // kdDebug() << "KOTodoListView::contentsDropEvent" << endl; | 120 | // kdDebug() << "KOTodoListView::contentsDropEvent" << endl; |
121 | 121 | ||
122 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 122 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
123 | !QTextDrag::canDecode( e ) ) { | 123 | !QTextDrag::canDecode( e ) ) { |
124 | e->ignore(); | 124 | e->ignore(); |
125 | return; | 125 | return; |
126 | } | 126 | } |
127 | 127 | ||
128 | DndFactory factory( mCalendar ); | 128 | DndFactory factory( mCalendar ); |
129 | Todo *todo = factory.createDropTodo(e); | 129 | Todo *todo = factory.createDropTodo(e); |
130 | 130 | ||
131 | if (todo) { | 131 | if (todo) { |
132 | e->acceptAction(); | 132 | e->acceptAction(); |
133 | 133 | ||
134 | KOTodoViewItem *destination = | 134 | KOTodoViewItem *destination = |
135 | (KOTodoViewItem *)itemAt(contentsToViewport(e->pos())); | 135 | (KOTodoViewItem *)itemAt(contentsToViewport(e->pos())); |
136 | Todo *destinationEvent = 0; | 136 | Todo *destinationEvent = 0; |
137 | if (destination) destinationEvent = destination->todo(); | 137 | if (destination) destinationEvent = destination->todo(); |
138 | 138 | ||
139 | Todo *existingTodo = mCalendar->todo(todo->uid()); | 139 | Todo *existingTodo = mCalendar->todo(todo->uid()); |
140 | 140 | ||
141 | if(existingTodo) { | 141 | if(existingTodo) { |
142 | // kdDebug() << "Drop existing Todo" << endl; | 142 | // kdDebug() << "Drop existing Todo" << endl; |
143 | Incidence *to = destinationEvent; | 143 | Incidence *to = destinationEvent; |
144 | while(to) { | 144 | while(to) { |
145 | if (to->uid() == todo->uid()) { | 145 | if (to->uid() == todo->uid()) { |
146 | KMessageBox::sorry(this, | 146 | KMessageBox::sorry(this, |
147 | i18n("Cannot move To-Do to itself or a child of itself"), | 147 | i18n("Cannot move To-Do to itself or a child of itself"), |
148 | i18n("Drop To-Do")); | 148 | i18n("Drop To-Do")); |
149 | delete todo; | 149 | delete todo; |
150 | return; | 150 | return; |
151 | } | 151 | } |
152 | to = to->relatedTo(); | 152 | to = to->relatedTo(); |
153 | } | 153 | } |
154 | existingTodo->setRelatedTo(destinationEvent); | 154 | existingTodo->setRelatedTo(destinationEvent); |
155 | emit todoDropped(todo); | 155 | emit todoDropped(todo); |
156 | delete todo; | 156 | delete todo; |
157 | } else { | 157 | } else { |
158 | // kdDebug() << "Drop new Todo" << endl; | 158 | // kdDebug() << "Drop new Todo" << endl; |
159 | todo->setRelatedTo(destinationEvent); | 159 | todo->setRelatedTo(destinationEvent); |
160 | mCalendar->addTodo(todo); | 160 | mCalendar->addTodo(todo); |
161 | 161 | ||
162 | emit todoDropped(todo); | 162 | emit todoDropped(todo); |
163 | } | 163 | } |
164 | } | 164 | } |
165 | else { | 165 | else { |
166 | QString text; | 166 | QString text; |
167 | if (QTextDrag::decode(e,text)) { | 167 | if (QTextDrag::decode(e,text)) { |
168 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); | 168 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); |
169 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); | 169 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); |
170 | kdDebug() << "Dropped : " << text << endl; | 170 | kdDebug() << "Dropped : " << text << endl; |
171 | QStringList emails = QStringList::split(",",text); | 171 | QStringList emails = QStringList::split(",",text); |
172 | for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { | 172 | for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { |
173 | kdDebug() << " Email: " << (*it) << endl; | 173 | kdDebug() << " Email: " << (*it) << endl; |
174 | int pos = (*it).find("<"); | 174 | int pos = (*it).find("<"); |
175 | QString name = (*it).left(pos); | 175 | QString name = (*it).left(pos); |
176 | QString email = (*it).mid(pos); | 176 | QString email = (*it).mid(pos); |
177 | if (!email.isEmpty() && todoi) { | 177 | if (!email.isEmpty() && todoi) { |
178 | todoi->todo()->addAttendee(new Attendee(name,email)); | 178 | todoi->todo()->addAttendee(new Attendee(name,email)); |
179 | } | 179 | } |
180 | } | 180 | } |
181 | } | 181 | } |
182 | else { | 182 | else { |
183 | kdDebug() << "KOTodoListView::contentsDropEvent(): Todo from drop not decodable" << endl; | 183 | kdDebug() << "KOTodoListView::contentsDropEvent(): Todo from drop not decodable" << endl; |
184 | e->ignore(); | 184 | e->ignore(); |
185 | } | 185 | } |
186 | } | 186 | } |
187 | #endif | 187 | #endif |
188 | } | 188 | } |
189 | 189 | ||
190 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | 190 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) |
191 | { | 191 | { |
192 | QListView::contentsMousePressEvent(e); | 192 | QListView::contentsMousePressEvent(e); |
193 | #ifndef KORG_NODND | 193 | #ifndef KORG_NODND |
194 | QPoint p(contentsToViewport(e->pos())); | 194 | QPoint p(contentsToViewport(e->pos())); |
195 | QListViewItem *i = itemAt(p); | 195 | QListViewItem *i = itemAt(p); |
196 | if (i) { | 196 | if (i) { |
197 | // if the user clicked into the root decoration of the item, don't | 197 | // if the user clicked into the root decoration of the item, don't |
198 | // try to start a drag! | 198 | // try to start a drag! |
199 | if (p.x() > header()->sectionPos(header()->mapToIndex(0)) + | 199 | if (p.x() > header()->sectionPos(header()->mapToIndex(0)) + |
200 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + | 200 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + |
201 | itemMargin() || | 201 | itemMargin() || |
202 | p.x() < header()->sectionPos(header()->mapToIndex(0))) { | 202 | p.x() < header()->sectionPos(header()->mapToIndex(0))) { |
203 | if (e->button()==Qt::LeftButton) { | 203 | if (e->button()==Qt::LeftButton) { |
204 | mPressPos = e->pos(); | 204 | mPressPos = e->pos(); |
205 | mMousePressed = true; | 205 | mMousePressed = true; |
206 | } | 206 | } |
207 | } | 207 | } |
208 | } | 208 | } |
209 | #endif | 209 | #endif |
210 | } | 210 | } |
211 | 211 | ||
212 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) | 212 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) |
213 | { | 213 | { |
214 | 214 | ||
215 | #ifndef KORG_NODND | 215 | #ifndef KORG_NODND |
216 | // kdDebug() << "KOTodoListView::contentsMouseMoveEvent()" << endl; | 216 | // kdDebug() << "KOTodoListView::contentsMouseMoveEvent()" << endl; |
217 | QListView::contentsMouseMoveEvent(e); | 217 | QListView::contentsMouseMoveEvent(e); |
218 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > | 218 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > |
219 | QApplication::startDragDistance()) { | 219 | QApplication::startDragDistance()) { |
220 | mMousePressed = false; | 220 | mMousePressed = false; |
221 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); | 221 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); |
222 | if (item) { | 222 | if (item) { |
223 | // kdDebug() << "Start Drag for item " << item->text(0) << endl; | 223 | // kdDebug() << "Start Drag for item " << item->text(0) << endl; |
224 | DndFactory factory( mCalendar ); | 224 | DndFactory factory( mCalendar ); |
225 | ICalDrag *vd = factory.createDragTodo( | 225 | ICalDrag *vd = factory.createDragTodo( |
226 | ((KOTodoViewItem *)item)->todo(),viewport()); | 226 | ((KOTodoViewItem *)item)->todo(),viewport()); |
227 | if (vd->drag()) { | 227 | if (vd->drag()) { |
228 | kdDebug() << "KOTodoListView::contentsMouseMoveEvent(): Delete drag source" << endl; | 228 | kdDebug() << "KOTodoListView::contentsMouseMoveEvent(): Delete drag source" << endl; |
229 | } | 229 | } |
230 | /* | 230 | /* |
231 | QString source = fullPath(item); | 231 | QString source = fullPath(item); |
232 | if ( QFile::exists(source) ) { | 232 | if ( QFile::exists(source) ) { |
233 | QUriDrag* ud = new QUriDrag(viewport()); | 233 | QUriDrag* ud = new QUriDrag(viewport()); |
234 | ud->setFilenames( source ); | 234 | ud->setFilenames( source ); |
235 | if ( ud->drag() ) | 235 | if ( ud->drag() ) |
236 | QMessageBox::information( this, "Drag source", | 236 | QMessageBox::information( this, "Drag source", |
237 | QString("Delete ")+source, "Not implemented" ); | 237 | QString("Delete ")+source, "Not implemented" ); |
238 | */ | 238 | */ |
239 | } | 239 | } |
240 | } | 240 | } |
241 | #endif | 241 | #endif |
242 | } | 242 | } |
243 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | 243 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) |
244 | { | 244 | { |
245 | 245 | ||
246 | QListViewItem* cn; | 246 | QListViewItem* cn; |
247 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { | 247 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { |
248 | cn = currentItem(); | 248 | cn = currentItem(); |
249 | if ( cn ) { | 249 | if ( cn ) { |
250 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 250 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
251 | if ( ci ){ | 251 | if ( ci ){ |
252 | if ( e->state() == ShiftButton ) | 252 | if ( e->state() == ShiftButton ) |
253 | ci->setOn( false ); | 253 | ci->setOn( false ); |
254 | else | 254 | else |
255 | ci->setOn( true ); | 255 | ci->setOn( true ); |
256 | cn = cn->nextSibling(); | 256 | cn = cn->nextSibling(); |
257 | if ( cn ) { | 257 | if ( cn ) { |
258 | setCurrentItem ( cn ); | 258 | setCurrentItem ( cn ); |
259 | ensureItemVisible ( cn ); | 259 | ensureItemVisible ( cn ); |
260 | } | 260 | } |
261 | 261 | ||
262 | } | 262 | } |
263 | } | 263 | } |
264 | 264 | ||
265 | return; | 265 | return; |
266 | } | 266 | } |
267 | 267 | ||
268 | // qDebug("KOTodoListView::keyPressEvent "); | 268 | // qDebug("KOTodoListView::keyPressEvent "); |
269 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { | 269 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { |
270 | switch ( e->key() ) { | 270 | switch ( e->key() ) { |
271 | case Qt::Key_Down: | 271 | case Qt::Key_Down: |
272 | case Qt::Key_Up: | 272 | case Qt::Key_Up: |
273 | QListView::keyPressEvent ( e ); | 273 | QListView::keyPressEvent ( e ); |
274 | break; | 274 | break; |
275 | case Qt::Key_Left: | 275 | case Qt::Key_Left: |
276 | case Qt::Key_Right: | 276 | case Qt::Key_Right: |
277 | QListView::keyPressEvent ( e ); | 277 | QListView::keyPressEvent ( e ); |
278 | e->accept(); | 278 | e->accept(); |
279 | return; | 279 | return; |
280 | break; | 280 | break; |
281 | default: | 281 | default: |
282 | e->ignore(); | 282 | e->ignore(); |
283 | break; | 283 | break; |
284 | } | 284 | } |
285 | return; | 285 | return; |
286 | } | 286 | } |
287 | e->ignore(); | 287 | e->ignore(); |
288 | } | 288 | } |
289 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) | 289 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) |
290 | { | 290 | { |
291 | QListView::contentsMouseReleaseEvent(e); | 291 | QListView::contentsMouseReleaseEvent(e); |
292 | mMousePressed = false; | 292 | mMousePressed = false; |
293 | } | 293 | } |
294 | 294 | ||
295 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 295 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
296 | { | 296 | { |
297 | if (!e) return; | 297 | if (!e) return; |
298 | 298 | ||
299 | QPoint vp = contentsToViewport(e->pos()); | 299 | QPoint vp = contentsToViewport(e->pos()); |
300 | 300 | ||
301 | QListViewItem *item = itemAt(vp); | 301 | QListViewItem *item = itemAt(vp); |
302 | 302 | ||
303 | emit double_Clicked(item); | 303 | emit double_Clicked(item); |
304 | if (!item) return; | 304 | if (!item) return; |
305 | 305 | ||
306 | emit doubleClicked(item,vp,0); | 306 | emit doubleClicked(item,vp,0); |
307 | } | 307 | } |
308 | 308 | ||
309 | ///////////////////////////////////////////////////////////////////////////// | 309 | ///////////////////////////////////////////////////////////////////////////// |
310 | 310 | ||
311 | KOQuickTodo::KOQuickTodo(QWidget *parent) : | 311 | KOQuickTodo::KOQuickTodo(QWidget *parent) : |
312 | QLineEdit(parent) | 312 | QLineEdit(parent) |
313 | { | 313 | { |
314 | setText(i18n("Click to add a new Todo")); | 314 | setText(i18n("Click to add a new Todo")); |
315 | } | 315 | } |
316 | 316 | ||
317 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) | 317 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) |
318 | { | 318 | { |
319 | if ( text()==i18n("Click to add a new Todo") ) | 319 | if ( text()==i18n("Click to add a new Todo") ) |
320 | setText(""); | 320 | setText(""); |
321 | QLineEdit::focusInEvent(ev); | 321 | QLineEdit::focusInEvent(ev); |
322 | } | 322 | } |
323 | 323 | ||
324 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) | 324 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) |
325 | { | 325 | { |
326 | setText(i18n("Click to add a new Todo")); | 326 | setText(i18n("Click to add a new Todo")); |
327 | QLineEdit::focusOutEvent(ev); | 327 | QLineEdit::focusOutEvent(ev); |
328 | } | 328 | } |
329 | 329 | ||
330 | ///////////////////////////////////////////////////////////////////////////// | 330 | ///////////////////////////////////////////////////////////////////////////// |
331 | 331 | ||
332 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | 332 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : |
333 | KOrg::BaseView(calendar,parent,name) | 333 | KOrg::BaseView(calendar,parent,name) |
334 | { | 334 | { |
335 | mNavigator = 0; | 335 | mNavigator = 0; |
336 | QBoxLayout *topLayout = new QVBoxLayout(this); | 336 | QBoxLayout *topLayout = new QVBoxLayout(this); |
337 | mName = QString ( name ); | 337 | mName = QString ( name ); |
338 | mBlockUpdate = false; | 338 | mBlockUpdate = false; |
339 | mQuickAdd = new KOQuickTodo(this); | 339 | mQuickAdd = new KOQuickTodo(this); |
340 | topLayout->addWidget(mQuickAdd); | 340 | topLayout->addWidget(mQuickAdd); |
341 | 341 | ||
342 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); | 342 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); |
343 | 343 | ||
344 | mTodoListView = new KOTodoListView(calendar,this, name ); | 344 | mTodoListView = new KOTodoListView(calendar,this, name ); |
345 | topLayout->addWidget(mTodoListView); | 345 | topLayout->addWidget(mTodoListView); |
346 | //mTodoListView->header()->setMaximumHeight(30); | 346 | //mTodoListView->header()->setMaximumHeight(30); |
347 | mTodoListView->setRootIsDecorated(true); | 347 | mTodoListView->setRootIsDecorated(true); |
348 | mTodoListView->setAllColumnsShowFocus(true); | 348 | mTodoListView->setAllColumnsShowFocus(true); |
349 | 349 | ||
350 | mTodoListView->setShowSortIndicator(true); | 350 | mTodoListView->setShowSortIndicator(true); |
351 | 351 | ||
352 | mTodoListView->addColumn(i18n("Todo")); | 352 | mTodoListView->addColumn(i18n("Todo")); |
353 | mTodoListView->addColumn(i18n("Prio")); | 353 | mTodoListView->addColumn(i18n("Prio")); |
354 | mTodoListView->setColumnAlignment(1,AlignHCenter); | 354 | mTodoListView->setColumnAlignment(1,AlignHCenter); |
355 | mTodoListView->addColumn(i18n("Complete")); | 355 | mTodoListView->addColumn(i18n("Complete")); |
356 | mTodoListView->setColumnAlignment(2,AlignCenter); | 356 | mTodoListView->setColumnAlignment(2,AlignCenter); |
357 | 357 | ||
358 | mTodoListView->addColumn(i18n("Due Date")); | 358 | mTodoListView->addColumn(i18n("Due Date")); |
359 | mTodoListView->setColumnAlignment(3,AlignLeft); | 359 | mTodoListView->setColumnAlignment(3,AlignLeft); |
360 | mTodoListView->addColumn(i18n("Due Time")); | 360 | mTodoListView->addColumn(i18n("Due Time")); |
361 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 361 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
362 | 362 | ||
363 | mTodoListView->addColumn(i18n("Start Date")); | 363 | mTodoListView->addColumn(i18n("Start Date")); |
364 | mTodoListView->setColumnAlignment(5,AlignLeft); | 364 | mTodoListView->setColumnAlignment(5,AlignLeft); |
365 | mTodoListView->addColumn(i18n("Start Time")); | 365 | mTodoListView->addColumn(i18n("Start Time")); |
366 | mTodoListView->setColumnAlignment(6,AlignHCenter); | 366 | mTodoListView->setColumnAlignment(6,AlignHCenter); |
367 | 367 | ||
368 | mTodoListView->addColumn(i18n("Cancelled")); | 368 | mTodoListView->addColumn(i18n("Cancelled")); |
369 | mTodoListView->addColumn(i18n("Categories")); | 369 | mTodoListView->addColumn(i18n("Categories")); |
370 | #if 0 | 370 | #if 0 |
371 | mTodoListView->addColumn(i18n("Sort Id")); | 371 | mTodoListView->addColumn(i18n("Sort Id")); |
372 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 372 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
373 | #endif | 373 | #endif |
374 | 374 | ||
375 | mTodoListView->setMinimumHeight( 60 ); | 375 | mTodoListView->setMinimumHeight( 60 ); |
376 | mTodoListView->setItemsRenameable( true ); | 376 | mTodoListView->setItemsRenameable( true ); |
377 | mTodoListView->setRenameable( 0 ); | 377 | mTodoListView->setRenameable( 0 ); |
378 | mTodoListView->setColumnWidth( 0, 120 ); | 378 | mTodoListView->setColumnWidth( 0, 120 ); |
379 | mTodoListView->setColumnWidthMode(0, QListView::Manual); | 379 | mTodoListView->setColumnWidthMode(0, QListView::Manual); |
380 | mTodoListView->setColumnWidthMode(1, QListView::Manual); | 380 | mTodoListView->setColumnWidthMode(1, QListView::Manual); |
381 | mTodoListView->setColumnWidthMode(2, QListView::Manual); | 381 | mTodoListView->setColumnWidthMode(2, QListView::Manual); |
382 | mTodoListView->setColumnWidthMode(3, QListView::Manual); | 382 | mTodoListView->setColumnWidthMode(3, QListView::Manual); |
383 | mTodoListView->setColumnWidthMode(4, QListView::Manual); | 383 | mTodoListView->setColumnWidthMode(4, QListView::Manual); |
384 | mTodoListView->setColumnWidthMode(5, QListView::Manual); | 384 | mTodoListView->setColumnWidthMode(5, QListView::Manual); |
385 | mTodoListView->setColumnWidthMode(6, QListView::Manual); | 385 | mTodoListView->setColumnWidthMode(6, QListView::Manual); |
386 | mTodoListView->setColumnWidthMode(7, QListView::Manual); | 386 | mTodoListView->setColumnWidthMode(7, QListView::Manual); |
387 | mTodoListView->setColumnWidthMode(8, QListView::Manual); | 387 | mTodoListView->setColumnWidthMode(8, QListView::Manual); |
388 | 388 | ||
389 | 389 | ||
390 | mPriorityPopupMenu = new QPopupMenu(this); | 390 | mPriorityPopupMenu = new QPopupMenu(this); |
391 | for (int i = 1; i <= 5; i++) { | 391 | for (int i = 1; i <= 5; i++) { |
392 | QString label = QString ("%1").arg (i); | 392 | QString label = QString ("%1").arg (i); |
393 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; | 393 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; |
394 | } | 394 | } |
395 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); | 395 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); |
396 | 396 | ||
397 | mPercentageCompletedPopupMenu = new QPopupMenu(this); | 397 | mPercentageCompletedPopupMenu = new QPopupMenu(this); |
398 | for (int i = 0; i <= 100; i+=20) { | 398 | for (int i = 0; i <= 100; i+=20) { |
399 | QString label = QString ("%1 %").arg (i); | 399 | QString label = QString ("%1 %").arg (i); |
400 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; | 400 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; |
401 | } | 401 | } |
402 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); | 402 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); |
403 | 403 | ||
404 | 404 | ||
405 | 405 | ||
406 | mItemPopupMenu = new QPopupMenu(this); | 406 | mItemPopupMenu = new QPopupMenu(this); |
407 | mItemPopupMenu->insertItem(i18n("Show..."), this, | 407 | mItemPopupMenu->insertItem(i18n("Show..."), this, |
408 | SLOT (showTodo())); | 408 | SLOT (showTodo())); |
409 | mItemPopupMenu->insertItem(i18n("Edit..."), this, | 409 | mItemPopupMenu->insertItem(i18n("Edit..."), this, |
410 | SLOT (editTodo())); | 410 | SLOT (editTodo())); |
411 | mItemPopupMenu->insertItem( i18n("Delete"), this, | 411 | mItemPopupMenu->insertItem( i18n("Delete"), this, |
412 | SLOT (deleteTodo())); | 412 | SLOT (deleteTodo())); |
413 | mItemPopupMenu->insertItem( i18n("Clone..."), this, | 413 | mItemPopupMenu->insertItem( i18n("Clone..."), this, |
414 | SLOT (cloneTodo())); | 414 | SLOT (cloneTodo())); |
415 | mItemPopupMenu->insertItem( i18n("Move..."), this, | 415 | mItemPopupMenu->insertItem( i18n("Move..."), this, |
416 | SLOT (moveTodo())); | 416 | SLOT (moveTodo())); |
417 | mItemPopupMenu->insertItem( i18n("Beam..."), this, | 417 | mItemPopupMenu->insertItem( i18n("Beam..."), this, |
418 | SLOT (beamTodo())); | 418 | SLOT (beamTodo())); |
419 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, | 419 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, |
420 | SLOT (cancelTodo())); | 420 | SLOT (cancelTodo())); |
421 | mItemPopupMenu->insertSeparator(); | 421 | mItemPopupMenu->insertSeparator(); |
422 | 422 | ||
423 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, | 423 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, |
424 | SLOT (newTodo())); | 424 | SLOT (newTodo())); |
425 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, | 425 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, |
426 | SLOT (newSubTodo())); | 426 | SLOT (newSubTodo())); |
427 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, | 427 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, |
428 | SLOT (unparentTodo()),0,21); | 428 | SLOT (unparentTodo()),0,21); |
429 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, | 429 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, |
430 | SLOT (reparentTodo()),0,22); | 430 | SLOT (reparentTodo()),0,22); |
431 | mItemPopupMenu->insertSeparator(); | 431 | mItemPopupMenu->insertSeparator(); |
432 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), | 432 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), |
433 | this, SLOT( purgeCompleted() ) ); | 433 | this, SLOT( purgeCompleted() ) ); |
434 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), | 434 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), |
435 | this, SLOT( toggleCompleted() ),0, 33 ); | 435 | this, SLOT( toggleCompleted() ),0, 33 ); |
436 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 436 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
437 | this, SLOT( toggleQuickTodo() ),0, 34 ); | 437 | this, SLOT( toggleQuickTodo() ),0, 34 ); |
438 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 438 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
439 | this, SLOT( toggleRunning() ),0, 35 ); | 439 | this, SLOT( toggleRunning() ),0, 35 ); |
440 | 440 | ||
441 | mPopupMenu = new QPopupMenu(this); | 441 | mPopupMenu = new QPopupMenu(this); |
442 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, | 442 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, |
443 | SLOT (newTodo()),0,1); | 443 | SLOT (newTodo()),0,1); |
444 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), | 444 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), |
445 | this, SLOT(purgeCompleted()),0,2); | 445 | this, SLOT(purgeCompleted()),0,2); |
446 | mPopupMenu->insertItem(i18n("Show Completed"), | 446 | mPopupMenu->insertItem(i18n("Show Completed"), |
447 | this, SLOT( toggleCompleted() ),0,3 ); | 447 | this, SLOT( toggleCompleted() ),0,3 ); |
448 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 448 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
449 | this, SLOT( toggleQuickTodo() ),0,4 ); | 449 | this, SLOT( toggleQuickTodo() ),0,4 ); |
450 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 450 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
451 | this, SLOT( toggleRunning() ),0,5 ); | 451 | this, SLOT( toggleRunning() ),0,5 ); |
452 | mDocPrefs = new DocPrefs( name ); | 452 | mDocPrefs = new DocPrefs( name ); |
453 | 453 | ||
454 | mPopupMenu->setCheckable( true ); | 454 | mPopupMenu->setCheckable( true ); |
455 | mItemPopupMenu->setCheckable( true ); | 455 | mItemPopupMenu->setCheckable( true ); |
456 | 456 | ||
457 | 457 | ||
458 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 458 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
459 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 459 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
460 | 460 | ||
461 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 461 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
462 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 462 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
463 | 463 | ||
464 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | 464 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); |
465 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | 465 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); |
466 | 466 | ||
467 | 467 | ||
468 | // Double clicking conflicts with opening/closing the subtree | 468 | // Double clicking conflicts with opening/closing the subtree |
469 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), | 469 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), |
470 | SLOT( editItem( QListViewItem *) ) ); | 470 | SLOT( editItem( QListViewItem *) ) ); |
471 | /* | 471 | /* |
472 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, | 472 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, |
473 | const QPoint &,int ) ), | 473 | const QPoint &,int ) ), |
474 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 474 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
475 | */ | 475 | */ |
476 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, | 476 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, |
477 | const QPoint &,int ) ), | 477 | const QPoint &,int ) ), |
478 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 478 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
479 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), | 479 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), |
480 | SLOT( itemClicked( QListViewItem * ) ) ); | 480 | SLOT( itemClicked( QListViewItem * ) ) ); |
481 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), | 481 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), |
482 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); | 482 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); |
483 | connect( mTodoListView, SIGNAL( todoDropped( Todo * ) ), | 483 | connect( mTodoListView, SIGNAL( todoDropped( Todo * ) ), |
484 | SLOT( updateView() ) ); | 484 | SLOT( updateView() ) ); |
485 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), | 485 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), |
486 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 486 | SLOT( itemStateChanged( QListViewItem * ) ) ); |
487 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), | 487 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), |
488 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 488 | SLOT( itemStateChanged( QListViewItem * ) ) ); |
489 | 489 | ||
490 | #if 0 | 490 | #if 0 |
491 | connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), | 491 | connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), |
492 | SLOT(selectionChanged(QListViewItem *))); | 492 | SLOT(selectionChanged(QListViewItem *))); |
493 | connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), | 493 | connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), |
494 | SLOT(selectionChanged(QListViewItem *))); | 494 | SLOT(selectionChanged(QListViewItem *))); |
495 | connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), | 495 | connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), |
496 | SLOT(selectionChanged(QListViewItem *))); | 496 | SLOT(selectionChanged(QListViewItem *))); |
497 | #endif | 497 | #endif |
498 | connect( mTodoListView, SIGNAL(selectionChanged() ), | 498 | connect( mTodoListView, SIGNAL(selectionChanged() ), |
499 | SLOT( processSelectionChange() ) ); | 499 | SLOT( processSelectionChange() ) ); |
500 | connect( mQuickAdd, SIGNAL( returnPressed () ), | 500 | connect( mQuickAdd, SIGNAL( returnPressed () ), |
501 | SLOT( addQuickTodo() ) ); | 501 | SLOT( addQuickTodo() ) ); |
502 | 502 | ||
503 | } | 503 | } |
504 | 504 | ||
505 | KOTodoView::~KOTodoView() | 505 | KOTodoView::~KOTodoView() |
506 | { | 506 | { |
507 | delete mDocPrefs; | 507 | delete mDocPrefs; |
508 | } | 508 | } |
509 | 509 | ||
510 | void KOTodoView::jumpToDate () | 510 | void KOTodoView::jumpToDate () |
511 | { | 511 | { |
512 | // if (mActiveItem) { | 512 | // if (mActiveItem) { |
513 | // mActiveItem->todo()); | 513 | // mActiveItem->todo()); |
514 | // if ( mActiveItem->todo()->hasDueDate() ) | 514 | // if ( mActiveItem->todo()->hasDueDate() ) |
515 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); | 515 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); |
516 | } | 516 | } |
517 | 517 | ||
518 | void KOTodoView::updateView() | 518 | void KOTodoView::updateView() |
519 | { | 519 | { |
520 | pendingSubtodo = 0; | 520 | pendingSubtodo = 0; |
521 | if ( mBlockUpdate ) { | 521 | if ( mBlockUpdate ) { |
522 | //qDebug("blocked "); | 522 | //qDebug("blocked "); |
523 | return; | 523 | return; |
524 | } | 524 | } |
525 | //qDebug("update "); | 525 | //qDebug("update "); |
526 | // kdDebug() << "KOTodoView::updateView()" << endl; | 526 | // kdDebug() << "KOTodoView::updateView()" << endl; |
527 | QFont fo = KOPrefs::instance()->mTodoViewFont; | 527 | QFont fo = KOPrefs::instance()->mTodoViewFont; |
528 | mTodoListView->clear(); | 528 | mTodoListView->clear(); |
529 | if ( mName == "todolistsmall" ) { | 529 | if ( mName == "todolistsmall" ) { |
530 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { | 530 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { |
531 | int ps = fo.pointSize() -2; | 531 | int ps = fo.pointSize() -2; |
532 | if ( ps > 12 ) | 532 | if ( ps > 12 ) |
533 | ps -= 2; | 533 | ps -= 2; |
534 | fo.setPointSize( ps ); | 534 | fo.setPointSize( ps ); |
535 | } | 535 | } |
536 | } | 536 | } |
537 | 537 | ||
538 | mTodoListView->setFont( fo ); | 538 | mTodoListView->setFont( fo ); |
539 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); | 539 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); |
540 | //mTodoListView->header()->setMaximumHeight(fm.height()); | 540 | //mTodoListView->header()->setMaximumHeight(fm.height()); |
541 | QPtrList<Todo> todoList = calendar()->todos(); | 541 | QPtrList<Todo> todoList = calendar()->todos(); |
542 | 542 | ||
543 | /* | 543 | /* |
544 | kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; | 544 | kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; |
545 | Event *t; | 545 | Event *t; |
546 | for(t = todoList.first(); t; t = todoList.next()) { | 546 | for(t = todoList.first(); t; t = todoList.next()) { |
547 | kdDebug() << " " << t->getSummary() << endl; | 547 | kdDebug() << " " << t->getSummary() << endl; |
548 | 548 | ||
549 | if (t->getRelatedTo()) { | 549 | if (t->getRelatedTo()) { |
550 | kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; | 550 | kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl; |
551 | } | 551 | } |
552 | 552 | ||
553 | QPtrList<Event> l = t->getRelations(); | 553 | QPtrList<Event> l = t->getRelations(); |
554 | Event *c; | 554 | Event *c; |
555 | for(c=l.first();c;c=l.next()) { | 555 | for(c=l.first();c;c=l.next()) { |
556 | kdDebug() << " - relation: " << c->getSummary() << endl; | 556 | kdDebug() << " - relation: " << c->getSummary() << endl; |
557 | } | 557 | } |
558 | } | 558 | } |
559 | */ | 559 | */ |
560 | 560 | ||
561 | // Put for each Event a KOTodoViewItem in the list view. Don't rely on a | 561 | // Put for each Event a KOTodoViewItem in the list view. Don't rely on a |
562 | // specific order of events. That means that we have to generate parent items | 562 | // specific order of events. That means that we have to generate parent items |
563 | // recursively for proper hierarchical display of Todos. | 563 | // recursively for proper hierarchical display of Todos. |
564 | mTodoMap.clear(); | 564 | mTodoMap.clear(); |
565 | Todo *todo; | 565 | Todo *todo; |
566 | todo = todoList.first();// todo; todo = todoList.next()) { | 566 | todo = todoList.first();// todo; todo = todoList.next()) { |
567 | while ( todo ) { | 567 | while ( todo ) { |
568 | bool next = true; | 568 | bool next = true; |
569 | // qDebug("todo %s ", todo->summary().latin1()); | 569 | // qDebug("todo %s ", todo->summary().latin1()); |
570 | Incidence *incidence = todo->relatedTo(); | 570 | Incidence *incidence = todo->relatedTo(); |
571 | while ( incidence ) { | 571 | while ( incidence ) { |
572 | if ( incidence->type() == "Todo") { | 572 | if ( incidence->type() == "Todo") { |
573 | //qDebug("related %s ",incidence->summary().latin1() ); | 573 | //qDebug("related %s ",incidence->summary().latin1() ); |
574 | if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { | 574 | if ( !(todoList.contains ( ((Todo* )incidence ) ) )) { |
575 | //qDebug("related not found "); | 575 | //qDebug("related not found "); |
576 | todoList.remove( ); | 576 | todoList.remove( ); |
577 | todo = todoList.current(); | 577 | todo = todoList.current(); |
578 | next = false; | 578 | next = false; |
579 | incidence = 0; | 579 | incidence = 0; |
580 | 580 | ||
581 | } else { | 581 | } else { |
582 | //qDebug("related found "); | 582 | //qDebug("related found "); |
583 | incidence = incidence->relatedTo(); | 583 | incidence = incidence->relatedTo(); |
584 | } | 584 | } |
585 | } else | 585 | } else |
586 | incidence = 0; | 586 | incidence = 0; |
587 | } | 587 | } |
588 | if ( next ) | 588 | if ( next ) |
589 | todo = todoList.next(); | 589 | todo = todoList.next(); |
590 | } | 590 | } |
591 | // qDebug("again .... "); | 591 | // qDebug("again .... "); |
592 | // for(todo = todoList.first(); todo; todo = todoList.next()) { | 592 | // for(todo = todoList.first(); todo; todo = todoList.next()) { |
593 | 593 | ||
594 | // qDebug("yytodo %s ", todo->summary().latin1()); | 594 | // qDebug("yytodo %s ", todo->summary().latin1()); |
595 | // } | 595 | // } |
596 | //qDebug("for "); | 596 | //qDebug("for "); |
597 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 597 | for(todo = todoList.first(); todo; todo = todoList.next()) { |
598 | if (!mTodoMap.contains(todo) && checkTodo( todo ) ) | 598 | if (!mTodoMap.contains(todo) && checkTodo( todo ) ) |
599 | { | 599 | { |
600 | insertTodoItem(todo); | 600 | insertTodoItem(todo); |
601 | } | 601 | } |
602 | } | 602 | } |
603 | //qDebug("for end "); | 603 | //qDebug("for end "); |
604 | // Restore opened/closed state | 604 | // Restore opened/closed state |
605 | mTodoListView->blockSignals( true ); | 605 | mTodoListView->blockSignals( true ); |
606 | if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); | 606 | if( mDocPrefs ) restoreItemState( mTodoListView->firstChild() ); |
607 | mTodoListView->blockSignals( false ); | 607 | mTodoListView->blockSignals( false ); |
608 | mTodoListView->setFocus(); | 608 | mTodoListView->setFocus(); |
609 | processSelectionChange(); | 609 | processSelectionChange(); |
610 | } | 610 | } |
611 | 611 | ||
612 | bool KOTodoView::checkTodo( Todo * todo ) | 612 | bool KOTodoView::checkTodo( Todo * todo ) |
613 | { | 613 | { |
614 | 614 | ||
615 | if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) | 615 | if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) |
616 | return false; | 616 | return false; |
617 | if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { | 617 | if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { |
618 | if ( todo->hasStartDate() ) | 618 | if ( todo->hasStartDate() ) |
619 | if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) | 619 | if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) |
620 | return false; | 620 | return false; |
621 | if ( todo->hasDueDate() ) | 621 | if ( todo->hasDueDate() ) |
622 | if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) | 622 | if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) |
623 | return false; | 623 | return false; |
624 | } | 624 | } |
625 | return true; | 625 | return true; |
626 | } | 626 | } |
627 | 627 | ||
628 | void KOTodoView::restoreItemState( QListViewItem *item ) | 628 | void KOTodoView::restoreItemState( QListViewItem *item ) |
629 | { | 629 | { |
630 | pendingSubtodo = 0; | 630 | pendingSubtodo = 0; |
631 | while( item ) { | 631 | while( item ) { |
632 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 632 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
633 | todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); | 633 | todoItem->setOpen( mDocPrefs->readBoolEntry( todoItem->todo()->uid() ) ); |
634 | if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); | 634 | if( item->childCount() > 0 ) restoreItemState( item->firstChild() ); |
635 | item = item->nextSibling(); | 635 | item = item->nextSibling(); |
636 | } | 636 | } |
637 | } | 637 | } |
638 | 638 | ||
639 | 639 | ||
640 | QMap<Todo *,KOTodoViewItem *>::ConstIterator | 640 | QMap<Todo *,KOTodoViewItem *>::ConstIterator |
641 | KOTodoView::insertTodoItem(Todo *todo) | 641 | KOTodoView::insertTodoItem(Todo *todo) |
642 | { | 642 | { |
643 | 643 | ||
644 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; | 644 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; |
645 | // TODO: Check, if dynmaic cast is necessary | 645 | // TODO: Check, if dynmaic cast is necessary |
646 | 646 | ||
647 | pendingSubtodo = 0; | 647 | pendingSubtodo = 0; |
648 | Incidence *incidence = todo->relatedTo(); | 648 | Incidence *incidence = todo->relatedTo(); |
649 | if (incidence && incidence->type() == "Todo") { | 649 | if (incidence && incidence->type() == "Todo") { |
650 | Todo *relatedTodo = static_cast<Todo *>(incidence); | 650 | Todo *relatedTodo = static_cast<Todo *>(incidence); |
651 | 651 | ||
652 | // kdDebug() << " has Related" << endl; | 652 | // kdDebug() << " has Related" << endl; |
653 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 653 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
654 | itemIterator = mTodoMap.find(relatedTodo); | 654 | itemIterator = mTodoMap.find(relatedTodo); |
655 | if (itemIterator == mTodoMap.end()) { | 655 | if (itemIterator == mTodoMap.end()) { |
656 | // kdDebug() << " related not yet in list" << endl; | 656 | // kdDebug() << " related not yet in list" << endl; |
657 | itemIterator = insertTodoItem (relatedTodo); | 657 | itemIterator = insertTodoItem (relatedTodo); |
658 | } | 658 | } |
659 | // isn't this pretty stupid? We give one Todo to the KOTodoViewItem | 659 | // isn't this pretty stupid? We give one Todo to the KOTodoViewItem |
660 | // and one into the map. Sure finding is more easy but why? -zecke | 660 | // and one into the map. Sure finding is more easy but why? -zecke |
661 | KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); | 661 | KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this); |
662 | return mTodoMap.insert(todo,todoItem); | 662 | return mTodoMap.insert(todo,todoItem); |
663 | } else { | 663 | } else { |
664 | // kdDebug() << " no Related" << endl; | 664 | // kdDebug() << " no Related" << endl; |
665 | // see above -zecke | 665 | // see above -zecke |
666 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | 666 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); |
667 | return mTodoMap.insert(todo,todoItem); | 667 | return mTodoMap.insert(todo,todoItem); |
668 | } | 668 | } |
669 | } | 669 | } |
670 | 670 | ||
671 | 671 | ||
672 | void KOTodoView::updateConfig() | 672 | void KOTodoView::updateConfig() |
673 | { | 673 | { |
674 | updateView(); | 674 | updateView(); |
675 | mTodoListView->repaintContents(); | 675 | mTodoListView->repaintContents(); |
676 | } | 676 | } |
677 | 677 | ||
678 | QPtrList<Incidence> KOTodoView::selectedIncidences() | 678 | QPtrList<Incidence> KOTodoView::selectedIncidences() |
679 | { | 679 | { |
680 | QPtrList<Incidence> selected; | 680 | QPtrList<Incidence> selected; |
681 | 681 | ||
682 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 682 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
683 | // if (!item) item = mActiveItem; | 683 | // if (!item) item = mActiveItem; |
684 | if (item) selected.append(item->todo()); | 684 | if (item) selected.append(item->todo()); |
685 | 685 | ||
686 | return selected; | 686 | return selected; |
687 | } | 687 | } |
688 | 688 | ||
689 | QPtrList<Todo> KOTodoView::selectedTodos() | 689 | QPtrList<Todo> KOTodoView::selectedTodos() |
690 | { | 690 | { |
691 | QPtrList<Todo> selected; | 691 | QPtrList<Todo> selected; |
692 | 692 | ||
693 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 693 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
694 | // if (!item) item = mActiveItem; | 694 | // if (!item) item = mActiveItem; |
695 | if (item) selected.append(item->todo()); | 695 | if (item) selected.append(item->todo()); |
696 | 696 | ||
697 | return selected; | 697 | return selected; |
698 | } | 698 | } |
699 | 699 | ||
700 | void KOTodoView::changeEventDisplay(Event *, int) | 700 | void KOTodoView::changeEventDisplay(Event *, int) |
701 | { | 701 | { |
702 | updateView(); | 702 | updateView(); |
703 | } | 703 | } |
704 | 704 | ||
705 | void KOTodoView::showDates(const QDate &, const QDate &) | 705 | void KOTodoView::showDates(const QDate &, const QDate &) |
706 | { | 706 | { |
707 | } | 707 | } |
708 | 708 | ||
709 | void KOTodoView::showEvents(QPtrList<Event>) | 709 | void KOTodoView::showEvents(QPtrList<Event>) |
710 | { | 710 | { |
711 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; | 711 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; |
712 | } | 712 | } |
713 | 713 | ||
714 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 714 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
715 | const QDate &td) | 715 | const QDate &td) |
716 | { | 716 | { |
717 | #ifndef KORG_NOPRINTER | 717 | #ifndef KORG_NOPRINTER |
718 | calPrinter->preview(CalPrinter::Todolist, fd, td); | 718 | calPrinter->preview(CalPrinter::Todolist, fd, td); |
719 | #endif | 719 | #endif |
720 | } | 720 | } |
721 | 721 | ||
722 | void KOTodoView::editItem(QListViewItem *item ) | 722 | void KOTodoView::editItem(QListViewItem *item ) |
723 | { | 723 | { |
724 | // qDebug("editItem(QListViewItem *item ) "); | 724 | // qDebug("editItem(QListViewItem *item ) "); |
725 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); | 725 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); |
726 | } | 726 | } |
727 | 727 | ||
728 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) | 728 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) |
729 | { | 729 | { |
730 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); | 730 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); |
731 | } | 731 | } |
732 | 732 | ||
733 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &,int column) | 733 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &,int column) |
734 | { | 734 | { |
735 | pendingSubtodo = 0; | 735 | pendingSubtodo = 0; |
736 | mActiveItem = (KOTodoViewItem *)item; | 736 | mActiveItem = (KOTodoViewItem *)item; |
737 | if (item) { | 737 | if (item) { |
738 | switch (column){ | 738 | switch (column){ |
739 | case 1: | 739 | case 1: |
740 | mPriorityPopupMenu->popup(QCursor::pos ()); break; | 740 | mPriorityPopupMenu->popup(QCursor::pos ()); break; |
741 | case 2: | 741 | case 2: |
742 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; | 742 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; |
743 | case 3: | 743 | case 3: |
744 | moveTodo(); | 744 | moveTodo(); |
745 | break; | 745 | break; |
746 | case 8: | 746 | case 8: |
747 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; | 747 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; |
748 | default: | 748 | default: |
749 | mItemPopupMenu->popup(QCursor::pos()); | 749 | mItemPopupMenu->popup(QCursor::pos()); |
750 | } | 750 | } |
751 | } else mPopupMenu->popup(QCursor::pos()); | 751 | } else mPopupMenu->popup(QCursor::pos()); |
752 | } | 752 | } |
753 | void KOTodoView::newTodo() | 753 | void KOTodoView::newTodo() |
754 | { | 754 | { |
755 | emit newTodoSignal(); | 755 | emit newTodoSignal(); |
756 | } | 756 | } |
757 | 757 | ||
758 | void KOTodoView::newSubTodo() | 758 | void KOTodoView::newSubTodo() |
759 | { | 759 | { |
760 | if (mActiveItem) { | 760 | if (mActiveItem) { |
761 | emit newSubTodoSignal(mActiveItem->todo()); | 761 | emit newSubTodoSignal(mActiveItem->todo()); |
762 | } | 762 | } |
763 | } | 763 | } |
764 | void KOTodoView::unparentTodo() | 764 | void KOTodoView::unparentTodo() |
765 | { | 765 | { |
766 | if (mActiveItem) { | 766 | if (mActiveItem) { |
767 | emit unparentTodoSignal(mActiveItem->todo()); | 767 | emit unparentTodoSignal(mActiveItem->todo()); |
768 | } | 768 | } |
769 | } | 769 | } |
770 | 770 | ||
771 | void KOTodoView::reparentTodo() | 771 | void KOTodoView::reparentTodo() |
772 | { | 772 | { |
773 | if (mActiveItem) { | 773 | if (mActiveItem) { |
774 | qDebug("KOTodoView::reparentTodo() "); | 774 | qDebug("KOTodoView::reparentTodo() "); |
775 | topLevelWidget()->setCaption(i18n("Click on new parent item")); | 775 | topLevelWidget()->setCaption(i18n("Click on new parent item")); |
776 | pendingSubtodo = mActiveItem; | 776 | pendingSubtodo = mActiveItem; |
777 | } | 777 | } |
778 | } | 778 | } |
779 | void KOTodoView::editTodo() | 779 | void KOTodoView::editTodo() |
780 | { | 780 | { |
781 | if (mActiveItem) { | 781 | if (mActiveItem) { |
782 | emit editTodoSignal(mActiveItem->todo()); | 782 | emit editTodoSignal(mActiveItem->todo()); |
783 | } | 783 | } |
784 | } | 784 | } |
785 | void KOTodoView::cloneTodo() | 785 | void KOTodoView::cloneTodo() |
786 | { | 786 | { |
787 | if (mActiveItem) { | 787 | if (mActiveItem) { |
788 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); | 788 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); |
789 | } | 789 | } |
790 | } | 790 | } |
791 | void KOTodoView::cancelTodo() | 791 | void KOTodoView::cancelTodo() |
792 | { | 792 | { |
793 | if (mActiveItem) { | 793 | if (mActiveItem) { |
794 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); | 794 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); |
795 | } | 795 | } |
796 | } | 796 | } |
797 | void KOTodoView::moveTodo() | 797 | void KOTodoView::moveTodo() |
798 | { | 798 | { |
799 | if (mActiveItem) { | 799 | if (mActiveItem) { |
800 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); | 800 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); |
801 | } | 801 | } |
802 | } | 802 | } |
803 | void KOTodoView::beamTodo() | 803 | void KOTodoView::beamTodo() |
804 | { | 804 | { |
805 | if (mActiveItem) { | 805 | if (mActiveItem) { |
806 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); | 806 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); |
807 | } | 807 | } |
808 | } | 808 | } |
809 | 809 | ||
810 | 810 | ||
811 | void KOTodoView::showTodo() | 811 | void KOTodoView::showTodo() |
812 | { | 812 | { |
813 | if (mActiveItem) { | 813 | if (mActiveItem) { |
814 | emit showTodoSignal(mActiveItem->todo()); | 814 | emit showTodoSignal(mActiveItem->todo()); |
815 | } | 815 | } |
816 | } | 816 | } |
817 | 817 | ||
818 | void KOTodoView::deleteTodo() | 818 | void KOTodoView::deleteTodo() |
819 | { | 819 | { |
820 | if (mActiveItem) { | 820 | if (mActiveItem) { |
821 | if (mActiveItem->childCount()) { | 821 | if (mActiveItem->childCount()) { |
822 | KMessageBox::sorry(this,i18n("Cannot delete To-Do which has children."), | 822 | KMessageBox::sorry(this,i18n("Cannot delete To-Do which has children."), |
823 | i18n("Delete To-Do")); | 823 | i18n("Delete To-Do")); |
824 | } else { | 824 | } else { |
825 | emit deleteTodoSignal(mActiveItem->todo()); | 825 | emit deleteTodoSignal(mActiveItem->todo()); |
826 | } | 826 | } |
827 | } | 827 | } |
828 | } | 828 | } |
829 | 829 | ||
830 | void KOTodoView::setNewPriority(int index) | 830 | void KOTodoView::setNewPriority(int index) |
831 | { | 831 | { |
832 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 832 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
833 | mActiveItem->todo()->setPriority(mPriority[index]); | 833 | mActiveItem->todo()->setPriority(mPriority[index]); |
834 | mActiveItem->construct(); | 834 | mActiveItem->construct(); |
835 | todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); | 835 | todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); |
836 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 836 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
837 | } | 837 | } |
838 | } | 838 | } |
839 | 839 | ||
840 | void KOTodoView::setNewPercentage(int index) | 840 | void KOTodoView::setNewPercentage(int index) |
841 | { | 841 | { |
842 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 842 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
843 | if (mPercentage[index] == 100) { | 843 | if (mPercentage[index] == 100) { |
844 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); | 844 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); |
845 | } else { | 845 | } else { |
846 | mActiveItem->todo()->setCompleted(false); | 846 | mActiveItem->todo()->setCompleted(false); |
847 | } | 847 | } |
848 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); | 848 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); |
849 | mActiveItem->construct(); | 849 | mActiveItem->construct(); |
850 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); | 850 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); |
851 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 851 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
852 | } | 852 | } |
853 | } | 853 | } |
854 | 854 | ||
855 | 855 | ||
856 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) | 856 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) |
857 | { | 857 | { |
858 | QPopupMenu* tempMenu = new QPopupMenu (this); | 858 | QPopupMenu* tempMenu = new QPopupMenu (this); |
859 | QStringList checkedCategories = todoItem->todo()->categories (); | 859 | QStringList checkedCategories = todoItem->todo()->categories (); |
860 | 860 | ||
861 | tempMenu->setCheckable (true); | 861 | tempMenu->setCheckable (true); |
862 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); | 862 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); |
863 | it != KOPrefs::instance()->mCustomCategories.end (); | 863 | it != KOPrefs::instance()->mCustomCategories.end (); |
864 | ++it) { | 864 | ++it) { |
865 | int index = tempMenu->insertItem (*it); | 865 | int index = tempMenu->insertItem (*it); |
866 | mCategory[index] = *it; | 866 | mCategory[index] = *it; |
867 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); | 867 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); |
868 | } | 868 | } |
869 | 869 | ||
870 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); | 870 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); |
871 | return tempMenu; | 871 | return tempMenu; |
872 | 872 | ||
873 | 873 | ||
874 | } | 874 | } |
875 | void KOTodoView::changedCategories(int index) | 875 | void KOTodoView::changedCategories(int index) |
876 | { | 876 | { |
877 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 877 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
878 | QStringList categories = mActiveItem->todo()->categories (); | 878 | QStringList categories = mActiveItem->todo()->categories (); |
879 | if (categories.find (mCategory[index]) != categories.end ()) | 879 | if (categories.find (mCategory[index]) != categories.end ()) |
880 | categories.remove (mCategory[index]); | 880 | categories.remove (mCategory[index]); |
881 | else | 881 | else |
882 | categories.insert (categories.end(), mCategory[index]); | 882 | categories.insert (categories.end(), mCategory[index]); |
883 | categories.sort (); | 883 | categories.sort (); |
884 | mActiveItem->todo()->setCategories (categories); | 884 | mActiveItem->todo()->setCategories (categories); |
885 | mActiveItem->construct(); | 885 | mActiveItem->construct(); |
886 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 886 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
887 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); | 887 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); |
888 | } | 888 | } |
889 | } | 889 | } |
890 | void KOTodoView::itemDoubleClicked(QListViewItem *item) | 890 | void KOTodoView::itemDoubleClicked(QListViewItem *item) |
891 | { | 891 | { |
892 | if ( pendingSubtodo != 0 ) { | 892 | if ( pendingSubtodo != 0 ) { |
893 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 893 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
894 | } | 894 | } |
895 | pendingSubtodo = 0; | 895 | pendingSubtodo = 0; |
896 | if (!item) { | 896 | if (!item) { |
897 | newTodo(); | 897 | newTodo(); |
898 | return; | 898 | return; |
899 | } | 899 | } |
900 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 900 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
901 | editItem( item ); | 901 | editItem( item ); |
902 | else | 902 | else |
903 | showItem( item , QPoint(), 0 ); | 903 | showItem( item , QPoint(), 0 ); |
904 | } | 904 | } |
905 | void KOTodoView::itemClicked(QListViewItem *item) | 905 | void KOTodoView::itemClicked(QListViewItem *item) |
906 | { | 906 | { |
907 | 907 | ||
908 | if (!item) { | 908 | if (!item) { |
909 | if ( pendingSubtodo != 0 ) { | 909 | if ( pendingSubtodo != 0 ) { |
910 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | 910 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); |
911 | } | 911 | } |
912 | pendingSubtodo = 0; | 912 | pendingSubtodo = 0; |
913 | return; | 913 | return; |
914 | } | 914 | } |
915 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 915 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
916 | if ( pendingSubtodo != 0 ) { | 916 | if ( pendingSubtodo != 0 ) { |
917 | bool allowReparent = true; | 917 | bool allowReparent = true; |
918 | QListViewItem *par = item; | 918 | QListViewItem *par = item; |
919 | while ( par ) { | 919 | while ( par ) { |
920 | if ( par == pendingSubtodo ) { | 920 | if ( par == pendingSubtodo ) { |
921 | allowReparent = false; | 921 | allowReparent = false; |
922 | break; | 922 | break; |
923 | } | 923 | } |
924 | par = par->parent(); | 924 | par = par->parent(); |
925 | } | 925 | } |
926 | if ( !allowReparent ) { | 926 | if ( !allowReparent ) { |
927 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); | 927 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); |
928 | qDebug("Recursive reparenting not possible "); | 928 | qDebug("Recursive reparenting not possible "); |
929 | pendingSubtodo = 0; | 929 | pendingSubtodo = 0; |
930 | } else { | 930 | } else { |
931 | Todo* newParent = todoItem->todo(); | 931 | Todo* newParent = todoItem->todo(); |
932 | Todo* newSub = pendingSubtodo->todo(); | 932 | Todo* newSub = pendingSubtodo->todo(); |
933 | pendingSubtodo = 0; | 933 | pendingSubtodo = 0; |
934 | emit reparentTodoSignal( newParent,newSub ); | 934 | emit reparentTodoSignal( newParent,newSub ); |
935 | return; | 935 | return; |
936 | } | 936 | } |
937 | } | 937 | } |
938 | int completed = todoItem->todo()->isCompleted(); // Completed or not? | 938 | int completed = todoItem->todo()->isCompleted(); // Completed or not? |
939 | 939 | ||
940 | if (todoItem->isOn()) { | 940 | if (todoItem->isOn()) { |
941 | if (!completed) { | 941 | if (!completed) { |
942 | todoItem->todo()->setCompleted(QDateTime::currentDateTime()); | 942 | todoItem->todo()->setCompleted(QDateTime::currentDateTime()); |
943 | } | 943 | } |
944 | } else { | 944 | } else { |
945 | if (completed) { | 945 | if (completed) { |
946 | todoItem->todo()->setCompleted(false); | 946 | todoItem->todo()->setCompleted(false); |
947 | } | 947 | } |
948 | } | 948 | } |
949 | } | 949 | } |
950 | 950 | ||
951 | void KOTodoView::setDocumentId( const QString &id ) | 951 | void KOTodoView::setDocumentId( const QString &id ) |
952 | { | 952 | { |
953 | kdDebug() << "KOTodoView::setDocumentId()" << endl; | 953 | kdDebug() << "KOTodoView::setDocumentId()" << endl; |
954 | 954 | ||
955 | mDocPrefs->setDoc( id ); | 955 | mDocPrefs->setDoc( id ); |
956 | } | 956 | } |
957 | 957 | ||
958 | void KOTodoView::itemStateChanged( QListViewItem *item ) | 958 | void KOTodoView::itemStateChanged( QListViewItem *item ) |
959 | { | 959 | { |
960 | if (!item) return; | 960 | if (!item) return; |
961 | 961 | ||
962 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 962 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
963 | 963 | ||
964 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; | 964 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; |
965 | 965 | ||
966 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); | 966 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); |
967 | } | 967 | } |
968 | 968 | ||
969 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const | 969 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const |
970 | { | 970 | { |
971 | mTodoListView->saveLayout(config,group); | 971 | mTodoListView->saveLayout(config,group); |
972 | } | 972 | } |
973 | 973 | ||
974 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) | 974 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) |
975 | { | 975 | { |
976 | mTodoListView->restoreLayout(config,group); | 976 | mTodoListView->restoreLayout(config,group); |
977 | } | 977 | } |
978 | 978 | ||
979 | void KOTodoView::processSelectionChange() | 979 | void KOTodoView::processSelectionChange() |
980 | { | 980 | { |
981 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; | 981 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; |
982 | 982 | ||
983 | KOTodoViewItem *item = | 983 | KOTodoViewItem *item = |
984 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); | 984 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); |
985 | 985 | ||
986 | if ( !item ) { | 986 | if ( !item ) { |
987 | emit incidenceSelected( 0 ); | 987 | emit incidenceSelected( 0 ); |
988 | } else { | 988 | } else { |
989 | emit incidenceSelected( item->todo() ); | 989 | emit incidenceSelected( item->todo() ); |
990 | } | 990 | } |
991 | } | 991 | } |
992 | 992 | ||
993 | void KOTodoView::modified(bool b) | 993 | void KOTodoView::modified(bool b) |
994 | { | 994 | { |
995 | emit isModified(b); | 995 | emit isModified(b); |
996 | } | 996 | } |
997 | void KOTodoView::setTodoModified( Todo* todo ) | 997 | void KOTodoView::setTodoModified( Todo* todo ) |
998 | { | 998 | { |
999 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); | 999 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); |
1000 | } | 1000 | } |
1001 | void KOTodoView::clearSelection() | 1001 | void KOTodoView::clearSelection() |
1002 | { | 1002 | { |
1003 | mTodoListView->selectAll( false ); | 1003 | mTodoListView->selectAll( false ); |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | void KOTodoView::purgeCompleted() | 1006 | void KOTodoView::purgeCompleted() |
1007 | { | 1007 | { |
1008 | emit purgeCompletedSignal(); | 1008 | emit purgeCompletedSignal(); |
1009 | } | 1009 | } |
1010 | void KOTodoView::toggleQuickTodo() | 1010 | void KOTodoView::toggleQuickTodo() |
1011 | { | 1011 | { |
1012 | if ( mQuickAdd->isVisible() ) { | 1012 | if ( mQuickAdd->isVisible() ) { |
1013 | mQuickAdd->hide(); | 1013 | mQuickAdd->hide(); |
1014 | KOPrefs::instance()->mEnableQuickTodo = false; | 1014 | KOPrefs::instance()->mEnableQuickTodo = false; |
1015 | } | 1015 | } |
1016 | else { | 1016 | else { |
1017 | mQuickAdd->show(); | 1017 | mQuickAdd->show(); |
1018 | KOPrefs::instance()->mEnableQuickTodo = true; | 1018 | KOPrefs::instance()->mEnableQuickTodo = true; |
1019 | } | 1019 | } |
1020 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 1020 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
1021 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 1021 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | void KOTodoView::toggleRunning() | 1024 | void KOTodoView::toggleRunning() |
1025 | { | 1025 | { |
1026 | KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; | 1026 | KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; |
1027 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | 1027 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); |
1028 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | 1028 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); |
1029 | updateView(); | 1029 | updateView(); |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | void KOTodoView::toggleCompleted() | 1032 | void KOTodoView::toggleCompleted() |
1033 | { | 1033 | { |
1034 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; | 1034 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; |
1035 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 1035 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
1036 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 1036 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
1037 | updateView(); | 1037 | updateView(); |
1038 | } | 1038 | } |
1039 | 1039 | ||
1040 | void KOTodoView::addQuickTodo() | 1040 | void KOTodoView::addQuickTodo() |
1041 | { | 1041 | { |
1042 | Todo *todo = new Todo(); | 1042 | Todo *todo = new Todo(); |
1043 | todo->setSummary(mQuickAdd->text()); | 1043 | todo->setSummary(mQuickAdd->text()); |
1044 | todo->setOrganizer(KOPrefs::instance()->email()); | 1044 | todo->setOrganizer(KOPrefs::instance()->email()); |
1045 | CalFilter * cf = mCalendar->filter(); | 1045 | CalFilter * cf = mCalendar->filter(); |
1046 | if ( cf ) { | 1046 | if ( cf ) { |
1047 | if ( cf->isEnabled()&& cf->showCategories()) { | 1047 | if ( cf->isEnabled()&& cf->showCategories()) { |
1048 | todo->setCategories(cf->categoryList()); | 1048 | todo->setCategories(cf->categoryList()); |
1049 | } | 1049 | } |
1050 | if ( cf->isEnabled() ) | 1050 | if ( cf->isEnabled() ) |
1051 | todo->setSecrecy( cf->getSecrecy()); | 1051 | todo->setSecrecy( cf->getSecrecy()); |
1052 | } | 1052 | } |
1053 | mCalendar->addTodo(todo); | 1053 | mCalendar->addTodo(todo); |
1054 | mQuickAdd->setText(""); | 1054 | mQuickAdd->setText(""); |
1055 | todoModified (todo, KOGlobals::EVENTADDED ); | 1055 | todoModified (todo, KOGlobals::EVENTADDED ); |
1056 | updateView(); | 1056 | updateView(); |
1057 | } | 1057 | } |
1058 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) | 1058 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) |
1059 | { | 1059 | { |
1060 | // e->ignore(); | 1060 | // e->ignore(); |
1061 | //return; | 1061 | //return; |
1062 | //qDebug("KOTodoView::keyPressEvent "); | 1062 | //qDebug("KOTodoView::keyPressEvent "); |
1063 | switch ( e->key() ) { | 1063 | switch ( e->key() ) { |
1064 | case Qt::Key_Down: | 1064 | case Qt::Key_Down: |
1065 | case Qt::Key_Up: | 1065 | case Qt::Key_Up: |
1066 | QWidget::keyPressEvent ( e ); | 1066 | QWidget::keyPressEvent ( e ); |
1067 | break; | 1067 | break; |
1068 | 1068 | ||
1069 | case Qt::Key_Q: | 1069 | case Qt::Key_Q: |
1070 | toggleQuickTodo(); | 1070 | toggleQuickTodo(); |
1071 | break; | 1071 | break; |
1072 | case Qt::Key_U: | 1072 | case Qt::Key_U: |
1073 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1073 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { |
1074 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1074 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1075 | unparentTodo(); | 1075 | unparentTodo(); |
1076 | e->accept(); | 1076 | e->accept(); |
1077 | } else | 1077 | } else |
1078 | e->ignore(); | 1078 | e->ignore(); |
1079 | break; | 1079 | break; |
1080 | case Qt::Key_S: | 1080 | case Qt::Key_S: |
1081 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1081 | if ( e->state() == Qt::ControlButton ) { |
1082 | e->ignore(); | ||
1083 | break; | ||
1084 | } | ||
1085 | if ( e->state() == Qt::ShiftButton ) { | ||
1082 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1086 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1083 | reparentTodo(); | 1087 | reparentTodo(); |
1084 | e->accept(); | 1088 | e->accept(); |
1085 | } else | 1089 | } else |
1086 | e->ignore(); | 1090 | e->ignore(); |
1087 | break; | 1091 | break; |
1088 | case Qt::Key_P: | 1092 | case Qt::Key_P: |
1089 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | 1093 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { |
1090 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | 1094 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); |
1091 | if ( pendingSubtodo ) | 1095 | if ( pendingSubtodo ) |
1092 | itemClicked(mActiveItem); | 1096 | itemClicked(mActiveItem); |
1093 | e->accept(); | 1097 | e->accept(); |
1094 | } else | 1098 | } else |
1095 | e->ignore(); | 1099 | e->ignore(); |
1096 | break; | 1100 | break; |
1097 | case Qt::Key_Escape: | 1101 | case Qt::Key_Escape: |
1098 | if ( pendingSubtodo ) { | 1102 | if ( pendingSubtodo ) { |
1099 | itemClicked(0); | 1103 | itemClicked(0); |
1100 | e->accept(); | 1104 | e->accept(); |
1101 | } else | 1105 | } else |
1102 | e->ignore(); | 1106 | e->ignore(); |
1103 | break; | 1107 | break; |
1104 | default: | 1108 | default: |
1105 | e->ignore(); | 1109 | e->ignore(); |
1106 | } | 1110 | } |
1107 | 1111 | ||
1108 | if ( true ) { | 1112 | if ( true ) { |
1109 | if ( e->key() == Qt::Key_I ) { | 1113 | if ( e->key() == Qt::Key_I ) { |
1110 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); | 1114 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); |
1111 | if ( cn ) { | 1115 | if ( cn ) { |
1112 | mActiveItem = cn; | 1116 | mActiveItem = cn; |
1113 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 1117 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
1114 | if ( ci ){ | 1118 | if ( ci ){ |
1115 | showTodo(); | 1119 | showTodo(); |
1116 | cn = (KOTodoViewItem*)cn->itemBelow(); | 1120 | cn = (KOTodoViewItem*)cn->itemBelow(); |
1117 | if ( cn ) { | 1121 | if ( cn ) { |
1118 | mTodoListView->setCurrentItem ( cn ); | 1122 | mTodoListView->setCurrentItem ( cn ); |
1119 | mTodoListView->ensureItemVisible ( cn ); | 1123 | mTodoListView->ensureItemVisible ( cn ); |
1120 | } | 1124 | } |
1121 | 1125 | ||
1122 | } | 1126 | } |
1123 | } | 1127 | } |
1124 | e->accept(); | 1128 | e->accept(); |
1125 | 1129 | ||
1126 | } | 1130 | } |
1127 | 1131 | ||
1128 | } | 1132 | } |
1129 | 1133 | ||
1130 | } | 1134 | } |
1131 | void KOTodoView::updateTodo( Todo * t, int type ) | 1135 | void KOTodoView::updateTodo( Todo * t, int type ) |
1132 | { | 1136 | { |
1133 | if ( mBlockUpdate) | 1137 | if ( mBlockUpdate) |
1134 | return; | 1138 | return; |
1135 | 1139 | ||
1136 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 1140 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
1137 | itemIterator = mTodoMap.find(t); | 1141 | itemIterator = mTodoMap.find(t); |
1138 | if (itemIterator != mTodoMap.end()) { | 1142 | if (itemIterator != mTodoMap.end()) { |
1139 | (*itemIterator)->construct(); | 1143 | (*itemIterator)->construct(); |
1140 | } else { | 1144 | } else { |
1141 | if ( type == KOGlobals::EVENTADDED ) { | 1145 | if ( type == KOGlobals::EVENTADDED ) { |
1142 | insertTodoItem( t ); | 1146 | insertTodoItem( t ); |
1143 | } | 1147 | } |
1144 | } | 1148 | } |
1145 | 1149 | ||
1146 | } | 1150 | } |
1147 | 1151 | ||
1148 | void KOTodoView::todoModified(Todo * t , int p ) | 1152 | void KOTodoView::todoModified(Todo * t , int p ) |
1149 | { | 1153 | { |
1150 | mBlockUpdate = true; | 1154 | mBlockUpdate = true; |
1151 | emit todoModifiedSignal ( t, p ); | 1155 | emit todoModifiedSignal ( t, p ); |
1152 | mBlockUpdate = false; | 1156 | mBlockUpdate = false; |
1153 | } | 1157 | } |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index a652c05..6bc5b3a 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1,1917 +1,1894 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | 2 | ||
3 | #include <qaction.h> | 3 | #include <qaction.h> |
4 | #include <qpopupmenu.h> | 4 | #include <qpopupmenu.h> |
5 | #include <qpainter.h> | 5 | #include <qpainter.h> |
6 | #include <qwhatsthis.h> | 6 | #include <qwhatsthis.h> |
7 | #include <qpushbutton.h> | 7 | #include <qpushbutton.h> |
8 | #include <qmessagebox.h> | 8 | #include <qmessagebox.h> |
9 | #include <qlineedit.h> | 9 | #include <qlineedit.h> |
10 | #include <qtextcodec.h> | 10 | #include <qtextcodec.h> |
11 | #include <qfile.h> | 11 | #include <qfile.h> |
12 | #include <qdir.h> | 12 | #include <qdir.h> |
13 | #include <qapp.h> | 13 | #include <qapp.h> |
14 | #include <qfileinfo.h> | 14 | #include <qfileinfo.h> |
15 | #include <qlabel.h> | 15 | #include <qlabel.h> |
16 | #include <qspinbox.h> | 16 | #include <qspinbox.h> |
17 | #include <qcheckbox.h> | 17 | #include <qcheckbox.h> |
18 | #include <qmap.h> | 18 | #include <qmap.h> |
19 | #include <qwmatrix.h> | 19 | #include <qwmatrix.h> |
20 | #include <qtextbrowser.h> | 20 | #include <qtextbrowser.h> |
21 | #include <qtextstream.h> | 21 | #include <qtextstream.h> |
22 | #ifndef DESKTOP_VERSION | 22 | #ifndef DESKTOP_VERSION |
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | #include <qpe/qpemenubar.h> | 24 | #include <qpe/qpemenubar.h> |
25 | #include <qpe/qpetoolbar.h> | 25 | #include <qpe/qpetoolbar.h> |
26 | #include <qpe/resource.h> | 26 | #include <qpe/resource.h> |
27 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
28 | #include <qtopia/alarmserver.h> | 28 | #include <qtopia/alarmserver.h> |
29 | #include <qtopia/qcopenvelope_qws.h> | 29 | #include <qtopia/qcopenvelope_qws.h> |
30 | #include <unistd.h> // for sleep | 30 | #include <unistd.h> // for sleep |
31 | #else | 31 | #else |
32 | #include <qmenubar.h> | 32 | #include <qmenubar.h> |
33 | #include <qtoolbar.h> | 33 | #include <qtoolbar.h> |
34 | #include <qapplication.h> | 34 | #include <qapplication.h> |
35 | //#include <resource.h> | 35 | //#include <resource.h> |
36 | 36 | ||
37 | #endif | 37 | #endif |
38 | #include <libkcal/calendarlocal.h> | 38 | #include <libkcal/calendarlocal.h> |
39 | #include <libkcal/todo.h> | 39 | #include <libkcal/todo.h> |
40 | #include <libkcal/phoneformat.h> | 40 | #include <libkcal/phoneformat.h> |
41 | #include <libkdepim/ksyncprofile.h> | 41 | #include <libkdepim/ksyncprofile.h> |
42 | #include <libkdepim/phoneaccess.h> | 42 | #include <libkdepim/phoneaccess.h> |
43 | #include <libkcal/kincidenceformatter.h> | 43 | #include <libkcal/kincidenceformatter.h> |
44 | #include <libkdepim/kpimglobalprefs.h> | 44 | #include <libkdepim/kpimglobalprefs.h> |
45 | 45 | ||
46 | #include "calendarview.h" | 46 | #include "calendarview.h" |
47 | #include "koviewmanager.h" | 47 | #include "koviewmanager.h" |
48 | #include "datenavigator.h" | 48 | #include "datenavigator.h" |
49 | #include "koagendaview.h" | 49 | #include "koagendaview.h" |
50 | #include "koagenda.h" | 50 | #include "koagenda.h" |
51 | #include "kodialogmanager.h" | 51 | #include "kodialogmanager.h" |
52 | #include "kdialogbase.h" | 52 | #include "kdialogbase.h" |
53 | #include "kapplication.h" | 53 | #include "kapplication.h" |
54 | #include "kofilterview.h" | 54 | #include "kofilterview.h" |
55 | #include "kstandarddirs.h" | 55 | #include "kstandarddirs.h" |
56 | #include "koprefs.h" | 56 | #include "koprefs.h" |
57 | #include "kfiledialog.h" | 57 | #include "kfiledialog.h" |
58 | #include "koglobals.h" | 58 | #include "koglobals.h" |
59 | #include "kglobal.h" | 59 | #include "kglobal.h" |
60 | #include "klocale.h" | 60 | #include "klocale.h" |
61 | #include "kconfig.h" | 61 | #include "kconfig.h" |
62 | #include "simplealarmclient.h" | 62 | #include "simplealarmclient.h" |
63 | #include "externalapphandler.h" | 63 | #include "externalapphandler.h" |
64 | 64 | ||
65 | using namespace KCal; | 65 | using namespace KCal; |
66 | #ifndef _WIN32_ | 66 | #ifndef _WIN32_ |
67 | #include <unistd.h> | 67 | #include <unistd.h> |
68 | #else | 68 | #else |
69 | #include "koimportoldialog.h" | 69 | #include "koimportoldialog.h" |
70 | #endif | 70 | #endif |
71 | #include "mainwindow.h" | 71 | #include "mainwindow.h" |
72 | 72 | ||
73 | class KOex2phonePrefs : public QDialog | 73 | class KOex2phonePrefs : public QDialog |
74 | { | 74 | { |
75 | public: | 75 | public: |
76 | KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : | 76 | KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : |
77 | QDialog( parent, name, true ) | 77 | QDialog( parent, name, true ) |
78 | { | 78 | { |
79 | setCaption( i18n("Export to phone options") ); | 79 | setCaption( i18n("Export to phone options") ); |
80 | QVBoxLayout* lay = new QVBoxLayout( this ); | 80 | QVBoxLayout* lay = new QVBoxLayout( this ); |
81 | lay->setSpacing( 3 ); | 81 | lay->setSpacing( 3 ); |
82 | lay->setMargin( 3 ); | 82 | lay->setMargin( 3 ); |
83 | QLabel *lab; | 83 | QLabel *lab; |
84 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); | 84 | lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); |
85 | lab->setAlignment (AlignHCenter ); | 85 | lab->setAlignment (AlignHCenter ); |
86 | QHBox* temphb; | 86 | QHBox* temphb; |
87 | temphb = new QHBox( this ); | 87 | temphb = new QHBox( this ); |
88 | new QLabel( i18n("I/O device: "), temphb ); | 88 | new QLabel( i18n("I/O device: "), temphb ); |
89 | mPhoneDevice = new QLineEdit( temphb); | 89 | mPhoneDevice = new QLineEdit( temphb); |
90 | lay->addWidget( temphb ); | 90 | lay->addWidget( temphb ); |
91 | temphb = new QHBox( this ); | 91 | temphb = new QHBox( this ); |
92 | new QLabel( i18n("Connection: "), temphb ); | 92 | new QLabel( i18n("Connection: "), temphb ); |
93 | mPhoneConnection = new QLineEdit( temphb); | 93 | mPhoneConnection = new QLineEdit( temphb); |
94 | lay->addWidget( temphb ); | 94 | lay->addWidget( temphb ); |
95 | temphb = new QHBox( this ); | 95 | temphb = new QHBox( this ); |
96 | new QLabel( i18n("Model(opt.): "), temphb ); | 96 | new QLabel( i18n("Model(opt.): "), temphb ); |
97 | mPhoneModel = new QLineEdit( temphb); | 97 | mPhoneModel = new QLineEdit( temphb); |
98 | lay->addWidget( temphb ); | 98 | lay->addWidget( temphb ); |
99 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); | 99 | mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); |
100 | mWriteBackFuture->setChecked( true ); | 100 | mWriteBackFuture->setChecked( true ); |
101 | lay->addWidget( mWriteBackFuture ); | 101 | lay->addWidget( mWriteBackFuture ); |
102 | temphb = new QHBox( this ); | 102 | temphb = new QHBox( this ); |
103 | new QLabel( i18n("Max. weeks in future: ") , temphb ); | 103 | new QLabel( i18n("Max. weeks in future: ") , temphb ); |
104 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); | 104 | mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); |
105 | mWriteBackFutureWeeks->setValue( 8 ); | 105 | mWriteBackFutureWeeks->setValue( 8 ); |
106 | lay->addWidget( temphb ); | 106 | lay->addWidget( temphb ); |
107 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); | 107 | lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); |
108 | lab->setAlignment (AlignHCenter ); | 108 | lab->setAlignment (AlignHCenter ); |
109 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); | 109 | QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); |
110 | lay->addWidget( ok ); | 110 | lay->addWidget( ok ); |
111 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 111 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
112 | lay->addWidget( cancel ); | 112 | lay->addWidget( cancel ); |
113 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 113 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
114 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 114 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
115 | resize( 220, 240 ); | 115 | resize( 220, 240 ); |
116 | qApp->processEvents(); | 116 | qApp->processEvents(); |
117 | int dw = QApplication::desktop()->width(); | 117 | int dw = QApplication::desktop()->width(); |
118 | int dh = QApplication::desktop()->height(); | 118 | int dh = QApplication::desktop()->height(); |
119 | move( (dw-width())/2, (dh - height() )/2 ); | 119 | move( (dw-width())/2, (dh - height() )/2 ); |
120 | } | 120 | } |
121 | 121 | ||
122 | public: | 122 | public: |
123 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; | 123 | QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; |
124 | QCheckBox* mWriteBackFuture; | 124 | QCheckBox* mWriteBackFuture; |
125 | QSpinBox* mWriteBackFutureWeeks; | 125 | QSpinBox* mWriteBackFutureWeeks; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | int globalFlagBlockStartup; | 128 | int globalFlagBlockStartup; |
129 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | 129 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : |
130 | QMainWindow( parent, name ) | 130 | QMainWindow( parent, name ) |
131 | { | 131 | { |
132 | 132 | ||
133 | #ifdef DESKTOP_VERSION | 133 | #ifdef DESKTOP_VERSION |
134 | setFont( QFont("Arial"), 14 ); | 134 | setFont( QFont("Arial"), 14 ); |
135 | #endif | 135 | #endif |
136 | mClosed = false; | 136 | mClosed = false; |
137 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; | 137 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; |
138 | QString confFile = locateLocal("config","korganizerrc"); | 138 | QString confFile = locateLocal("config","korganizerrc"); |
139 | QFileInfo finf ( confFile ); | 139 | QFileInfo finf ( confFile ); |
140 | bool showWarning = !finf.exists(); | 140 | bool showWarning = !finf.exists(); |
141 | setIcon(SmallIcon( "ko24" ) ); | 141 | setIcon(SmallIcon( "ko24" ) ); |
142 | mBlockAtStartup = true; | 142 | mBlockAtStartup = true; |
143 | mFlagKeyPressed = false; | 143 | mFlagKeyPressed = false; |
144 | setCaption("KOrganizer/Pi"); | 144 | setCaption("KOrganizer/Pi"); |
145 | KOPrefs *p = KOPrefs::instance(); | 145 | KOPrefs *p = KOPrefs::instance(); |
146 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 146 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
147 | if ( p->mHourSize > 18 ) | 147 | if ( p->mHourSize > 18 ) |
148 | p->mHourSize = 18; | 148 | p->mHourSize = 18; |
149 | QMainWindow::ToolBarDock tbd; | 149 | QMainWindow::ToolBarDock tbd; |
150 | if ( p->mToolBarHor ) { | 150 | if ( p->mToolBarHor ) { |
151 | if ( p->mToolBarUp ) | 151 | if ( p->mToolBarUp ) |
152 | tbd = Bottom; | 152 | tbd = Bottom; |
153 | else | 153 | else |
154 | tbd = Top; | 154 | tbd = Top; |
155 | } | 155 | } |
156 | else { | 156 | else { |
157 | if ( p->mToolBarUp ) | 157 | if ( p->mToolBarUp ) |
158 | tbd = Right; | 158 | tbd = Right; |
159 | else | 159 | else |
160 | tbd = Left; | 160 | tbd = Left; |
161 | } | 161 | } |
162 | if ( KOPrefs::instance()->mUseAppColors ) | 162 | if ( KOPrefs::instance()->mUseAppColors ) |
163 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 163 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
164 | globalFlagBlockStartup = 1; | 164 | globalFlagBlockStartup = 1; |
165 | iconToolBar = new QPEToolBar( this ); | 165 | iconToolBar = new QPEToolBar( this ); |
166 | addToolBar (iconToolBar , tbd ); | 166 | addToolBar (iconToolBar , tbd ); |
167 | mCalendarModifiedFlag = false; | 167 | mCalendarModifiedFlag = false; |
168 | 168 | ||
169 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); | 169 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); |
170 | splash->setAlignment ( AlignCenter ); | 170 | splash->setAlignment ( AlignCenter ); |
171 | setCentralWidget( splash ); | 171 | setCentralWidget( splash ); |
172 | #ifndef DESKTOP_VERSION | 172 | #ifndef DESKTOP_VERSION |
173 | showMaximized(); | 173 | showMaximized(); |
174 | #endif | 174 | #endif |
175 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); | 175 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); |
176 | setDefaultPreferences(); | 176 | setDefaultPreferences(); |
177 | mCalendar = new CalendarLocal(); | 177 | mCalendar = new CalendarLocal(); |
178 | mView = new CalendarView( mCalendar, this,"mCalendar " ); | 178 | mView = new CalendarView( mCalendar, this,"mCalendar " ); |
179 | mView->hide(); | 179 | mView->hide(); |
180 | //mView->resize(splash->size() ); | 180 | //mView->resize(splash->size() ); |
181 | initActions(); | 181 | initActions(); |
182 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); | 182 | mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); |
183 | mSyncManager->setBlockSave(false); | 183 | mSyncManager->setBlockSave(false); |
184 | mView->setSyncManager(mSyncManager); | 184 | mView->setSyncManager(mSyncManager); |
185 | #ifndef DESKTOP_VERSION | 185 | #ifndef DESKTOP_VERSION |
186 | iconToolBar->show(); | 186 | iconToolBar->show(); |
187 | qApp->processEvents(); | 187 | qApp->processEvents(); |
188 | #endif | 188 | #endif |
189 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); | 189 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); |
190 | int vh = height() ; | 190 | int vh = height() ; |
191 | int vw = width(); | 191 | int vw = width(); |
192 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); | 192 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); |
193 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 193 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
194 | vh -= iconToolBar->height(); | 194 | vh -= iconToolBar->height(); |
195 | } else { | 195 | } else { |
196 | vw -= iconToolBar->height(); | 196 | vw -= iconToolBar->height(); |
197 | } | 197 | } |
198 | //mView->setMaximumSize( splash->size() ); | 198 | //mView->setMaximumSize( splash->size() ); |
199 | //mView->resize( splash->size() ); | 199 | //mView->resize( splash->size() ); |
200 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 200 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
201 | mView->readSettings(); | 201 | mView->readSettings(); |
202 | bool newFile = false; | 202 | bool newFile = false; |
203 | if( !QFile::exists( defaultFileName() ) ) { | 203 | if( !QFile::exists( defaultFileName() ) ) { |
204 | QFileInfo finfo ( defaultFileName() ); | 204 | QFileInfo finfo ( defaultFileName() ); |
205 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); | 205 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); |
206 | qDebug("oldfile %s ", oldFile.latin1()); | 206 | qDebug("oldfile %s ", oldFile.latin1()); |
207 | QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; | 207 | QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; |
208 | finfo.setFile( oldFile ); | 208 | finfo.setFile( oldFile ); |
209 | if (finfo.exists() ) { | 209 | if (finfo.exists() ) { |
210 | KMessageBox::information( this, message); | 210 | KMessageBox::information( this, message); |
211 | mView->openCalendar( oldFile ); | 211 | mView->openCalendar( oldFile ); |
212 | qApp->processEvents(); | 212 | qApp->processEvents(); |
213 | } else { | 213 | } else { |
214 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); | 214 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); |
215 | finfo.setFile( oldFile ); | 215 | finfo.setFile( oldFile ); |
216 | if (finfo.exists() ) { | 216 | if (finfo.exists() ) { |
217 | KMessageBox::information( this, message); | 217 | KMessageBox::information( this, message); |
218 | mView->openCalendar( oldFile ); | 218 | mView->openCalendar( oldFile ); |
219 | qApp->processEvents(); | 219 | qApp->processEvents(); |
220 | } | 220 | } |
221 | } | 221 | } |
222 | mView->saveCalendar( defaultFileName() ); | 222 | mView->saveCalendar( defaultFileName() ); |
223 | newFile = true; | 223 | newFile = true; |
224 | } | 224 | } |
225 | 225 | ||
226 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 226 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
227 | mView->openCalendar( defaultFileName() ); | 227 | mView->openCalendar( defaultFileName() ); |
228 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 228 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
229 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); | 229 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); |
230 | 230 | ||
231 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { | 231 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { |
232 | KOPrefs::instance()->setCategoryDefaults(); | 232 | KOPrefs::instance()->setCategoryDefaults(); |
233 | int count = mView->addCategories(); | 233 | int count = mView->addCategories(); |
234 | } | 234 | } |
235 | processIncidenceSelection( 0 ); | 235 | processIncidenceSelection( 0 ); |
236 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), | 236 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), |
237 | SLOT( processIncidenceSelection( Incidence * ) ) ); | 237 | SLOT( processIncidenceSelection( Incidence * ) ) ); |
238 | connect( mView, SIGNAL( modifiedChanged( bool ) ), | 238 | connect( mView, SIGNAL( modifiedChanged( bool ) ), |
239 | SLOT( slotModifiedChanged( bool ) ) ); | 239 | SLOT( slotModifiedChanged( bool ) ) ); |
240 | 240 | ||
241 | 241 | ||
242 | connect( mView, SIGNAL( tempDisableBR(bool) ), | 242 | connect( mView, SIGNAL( tempDisableBR(bool) ), |
243 | SLOT( disableBR(bool) ) ); | 243 | SLOT( disableBR(bool) ) ); |
244 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); | 244 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); |
245 | mView->setModified( false ); | 245 | mView->setModified( false ); |
246 | mBlockAtStartup = false; | 246 | mBlockAtStartup = false; |
247 | mView->setModified( false ); | 247 | mView->setModified( false ); |
248 | setCentralWidget( mView ); | 248 | setCentralWidget( mView ); |
249 | globalFlagBlockStartup = 0; | 249 | globalFlagBlockStartup = 0; |
250 | mView->show(); | 250 | mView->show(); |
251 | delete splash; | 251 | delete splash; |
252 | if ( newFile ) | 252 | if ( newFile ) |
253 | mView->updateConfig(); | 253 | mView->updateConfig(); |
254 | // qApp->processEvents(); | 254 | // qApp->processEvents(); |
255 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 255 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
256 | //fillSyncMenu(); | 256 | //fillSyncMenu(); |
257 | 257 | ||
258 | 258 | ||
259 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); | 259 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); |
260 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 260 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
261 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 261 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
262 | mSyncManager->setDefaultFileName( defaultFileName()); | 262 | mSyncManager->setDefaultFileName( defaultFileName()); |
263 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); | 263 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); |
264 | mSyncManager->fillSyncMenu(); | 264 | mSyncManager->fillSyncMenu(); |
265 | 265 | ||
266 | 266 | ||
267 | 267 | ||
268 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 268 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
269 | if ( showWarning ) { | 269 | if ( showWarning ) { |
270 | KMessageBox::information( this, | 270 | KMessageBox::information( this, |
271 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); | 271 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); |
272 | qApp->processEvents(); | 272 | qApp->processEvents(); |
273 | mView->dialogManager()->showSyncOptions(); | 273 | mView->dialogManager()->showSyncOptions(); |
274 | } | 274 | } |
275 | 275 | ||
276 | //US listen for result adressed from Ka/Pi | 276 | //US listen for result adressed from Ka/Pi |
277 | #ifndef DESKTOP_VERSION | 277 | #ifndef DESKTOP_VERSION |
278 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 278 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
279 | #endif | 279 | #endif |
280 | #ifndef DESKTOP_VERSION | 280 | #ifndef DESKTOP_VERSION |
281 | infrared = 0; | 281 | infrared = 0; |
282 | #endif | 282 | #endif |
283 | 283 | ||
284 | mBRdisabled = false; | 284 | mBRdisabled = false; |
285 | //toggleBeamReceive(); | 285 | //toggleBeamReceive(); |
286 | } | 286 | } |
287 | MainWindow::~MainWindow() | 287 | MainWindow::~MainWindow() |
288 | { | 288 | { |
289 | //qDebug("MainWindow::~MainWindow() "); | 289 | //qDebug("MainWindow::~MainWindow() "); |
290 | //save toolbar location | 290 | //save toolbar location |
291 | delete mCalendar; | 291 | delete mCalendar; |
292 | delete mSyncManager; | 292 | delete mSyncManager; |
293 | #ifndef DESKTOP_VERSION | 293 | #ifndef DESKTOP_VERSION |
294 | if ( infrared ) | 294 | if ( infrared ) |
295 | delete infrared; | 295 | delete infrared; |
296 | #endif | 296 | #endif |
297 | 297 | ||
298 | 298 | ||
299 | } | 299 | } |
300 | 300 | ||
301 | void MainWindow::disableBR(bool b) | 301 | void MainWindow::disableBR(bool b) |
302 | { | 302 | { |
303 | #ifndef DESKTOP_VERSION | 303 | #ifndef DESKTOP_VERSION |
304 | if ( b ) { | 304 | if ( b ) { |
305 | if ( infrared ) { | 305 | if ( infrared ) { |
306 | toggleBeamReceive(); | 306 | toggleBeamReceive(); |
307 | mBRdisabled = true; | 307 | mBRdisabled = true; |
308 | } | 308 | } |
309 | mBRdisabled = true; | 309 | mBRdisabled = true; |
310 | } else { | 310 | } else { |
311 | if ( mBRdisabled ) { | 311 | if ( mBRdisabled ) { |
312 | mBRdisabled = false; | 312 | mBRdisabled = false; |
313 | //makes no sense,because other cal ap is probably running | 313 | //makes no sense,because other cal ap is probably running |
314 | // toggleBeamReceive(); | 314 | // toggleBeamReceive(); |
315 | } | 315 | } |
316 | } | 316 | } |
317 | #endif | 317 | #endif |
318 | 318 | ||
319 | } | 319 | } |
320 | bool MainWindow::beamReceiveEnabled() | 320 | bool MainWindow::beamReceiveEnabled() |
321 | { | 321 | { |
322 | #ifndef DESKTOP_VERSION | 322 | #ifndef DESKTOP_VERSION |
323 | return ( infrared != 0 ); | 323 | return ( infrared != 0 ); |
324 | #endif | 324 | #endif |
325 | return false; | 325 | return false; |
326 | } | 326 | } |
327 | 327 | ||
328 | void MainWindow::toggleBeamReceive() | 328 | void MainWindow::toggleBeamReceive() |
329 | { | 329 | { |
330 | if ( mBRdisabled ) | 330 | if ( mBRdisabled ) |
331 | return; | 331 | return; |
332 | #ifndef DESKTOP_VERSION | 332 | #ifndef DESKTOP_VERSION |
333 | if ( infrared ) { | 333 | if ( infrared ) { |
334 | qDebug("disable BeamReceive "); | 334 | qDebug("disable BeamReceive "); |
335 | delete infrared; | 335 | delete infrared; |
336 | infrared = 0; | 336 | infrared = 0; |
337 | brAction->setOn(false); | 337 | brAction->setOn(false); |
338 | return; | 338 | return; |
339 | } | 339 | } |
340 | qDebug("enable BeamReceive "); | 340 | qDebug("enable BeamReceive "); |
341 | brAction->setOn(true); | 341 | brAction->setOn(true); |
342 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; | 342 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; |
343 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); | 343 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); |
344 | #endif | 344 | #endif |
345 | } | 345 | } |
346 | void MainWindow::showMaximized () | 346 | void MainWindow::showMaximized () |
347 | { | 347 | { |
348 | #ifndef DESKTOP_VERSION | 348 | #ifndef DESKTOP_VERSION |
349 | if ( ! globalFlagBlockStartup ) | 349 | if ( ! globalFlagBlockStartup ) |
350 | if ( mClosed ) | 350 | if ( mClosed ) |
351 | mView->goToday(); | 351 | mView->goToday(); |
352 | #endif | 352 | #endif |
353 | QWidget::showMaximized () ; | 353 | QWidget::showMaximized () ; |
354 | mClosed = false; | 354 | mClosed = false; |
355 | } | 355 | } |
356 | void MainWindow::closeEvent( QCloseEvent* ce ) | 356 | void MainWindow::closeEvent( QCloseEvent* ce ) |
357 | { | 357 | { |
358 | 358 | ||
359 | 359 | ||
360 | 360 | ||
361 | if ( ! KOPrefs::instance()->mAskForQuit ) { | 361 | if ( ! KOPrefs::instance()->mAskForQuit ) { |
362 | saveOnClose(); | 362 | saveOnClose(); |
363 | mClosed = true; | 363 | mClosed = true; |
364 | ce->accept(); | 364 | ce->accept(); |
365 | return; | 365 | return; |
366 | 366 | ||
367 | } | 367 | } |
368 | 368 | ||
369 | switch( QMessageBox::information( this, "KO/Pi", | 369 | switch( QMessageBox::information( this, "KO/Pi", |
370 | i18n("Do you really want\nto close KO/Pi?"), | 370 | i18n("Do you really want\nto close KO/Pi?"), |
371 | i18n("Close"), i18n("No"), | 371 | i18n("Close"), i18n("No"), |
372 | 0, 0 ) ) { | 372 | 0, 0 ) ) { |
373 | case 0: | 373 | case 0: |
374 | saveOnClose(); | 374 | saveOnClose(); |
375 | mClosed = true; | 375 | mClosed = true; |
376 | ce->accept(); | 376 | ce->accept(); |
377 | break; | 377 | break; |
378 | case 1: | 378 | case 1: |
379 | ce->ignore(); | 379 | ce->ignore(); |
380 | break; | 380 | break; |
381 | case 2: | 381 | case 2: |
382 | 382 | ||
383 | default: | 383 | default: |
384 | break; | 384 | break; |
385 | } | 385 | } |
386 | 386 | ||
387 | 387 | ||
388 | } | 388 | } |
389 | 389 | ||
390 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | 390 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) |
391 | { | 391 | { |
392 | QDataStream stream( data, IO_ReadOnly ); | 392 | QDataStream stream( data, IO_ReadOnly ); |
393 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); | 393 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); |
394 | //QString datamess; | 394 | //QString datamess; |
395 | //qDebug("message "); | 395 | //qDebug("message "); |
396 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); | 396 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); |
397 | 397 | ||
398 | if ( cmsg == "setDocument(QString)" ) { | 398 | if ( cmsg == "setDocument(QString)" ) { |
399 | QDataStream stream( data, IO_ReadOnly ); | 399 | QDataStream stream( data, IO_ReadOnly ); |
400 | QString fileName; | 400 | QString fileName; |
401 | stream >> fileName; | 401 | stream >> fileName; |
402 | //qDebug("filename %s ", fileName.latin1()); | 402 | //qDebug("filename %s ", fileName.latin1()); |
403 | showMaximized(); | 403 | showMaximized(); |
404 | raise(); | 404 | raise(); |
405 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; | 405 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; |
406 | mSyncManager->slotSyncMenu( 1002 ); | 406 | mSyncManager->slotSyncMenu( 1002 ); |
407 | return; | 407 | return; |
408 | } | 408 | } |
409 | 409 | ||
410 | if ( cmsg == "-writeFile" ) { | 410 | if ( cmsg == "-writeFile" ) { |
411 | // I made from the "-writeFile" an "-writeAlarm" | 411 | // I made from the "-writeFile" an "-writeAlarm" |
412 | mView->viewManager()->showWhatsNextView(); | 412 | mView->viewManager()->showWhatsNextView(); |
413 | mCalendar->checkAlarmForIncidence( 0, true); | 413 | mCalendar->checkAlarmForIncidence( 0, true); |
414 | showMaximized(); | 414 | showMaximized(); |
415 | raise(); | 415 | raise(); |
416 | return; | 416 | return; |
417 | 417 | ||
418 | } | 418 | } |
419 | if ( cmsg == "-writeFileSilent" ) { | 419 | if ( cmsg == "-writeFileSilent" ) { |
420 | // I made from the "-writeFile" an "-writeAlarm" | 420 | // I made from the "-writeFile" an "-writeAlarm" |
421 | // mView->viewManager()->showWhatsNextView(); | 421 | // mView->viewManager()->showWhatsNextView(); |
422 | mCalendar->checkAlarmForIncidence( 0, true); | 422 | mCalendar->checkAlarmForIncidence( 0, true); |
423 | //showMaximized(); | 423 | //showMaximized(); |
424 | //raise(); | 424 | //raise(); |
425 | hide(); | 425 | hide(); |
426 | return; | 426 | return; |
427 | } | 427 | } |
428 | if ( cmsg == "-newCountdown" ) { | 428 | if ( cmsg == "-newCountdown" ) { |
429 | qDebug("newCountdown "); | 429 | qDebug("newCountdown "); |
430 | 430 | ||
431 | } | 431 | } |
432 | QString msg ; | 432 | QString msg ; |
433 | QString allmsg = cmsg; | 433 | QString allmsg = cmsg; |
434 | while ( allmsg.length() > 0 ) { | 434 | while ( allmsg.length() > 0 ) { |
435 | int nextC = allmsg.find( "-", 1 ); | 435 | int nextC = allmsg.find( "-", 1 ); |
436 | if ( nextC == -1 ) { | 436 | if ( nextC == -1 ) { |
437 | msg = allmsg; | 437 | msg = allmsg; |
438 | allmsg = ""; | 438 | allmsg = ""; |
439 | } else{ | 439 | } else{ |
440 | msg = allmsg.left( nextC ); | 440 | msg = allmsg.left( nextC ); |
441 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); | 441 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); |
442 | } | 442 | } |
443 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); | 443 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); |
444 | if ( msg == "-newEvent" ) { | 444 | if ( msg == "-newEvent" ) { |
445 | mView->newEvent(); | 445 | mView->newEvent(); |
446 | } | 446 | } |
447 | if ( msg == "-newTodo" ) { | 447 | if ( msg == "-newTodo" ) { |
448 | mView->newTodo(); | 448 | mView->newTodo(); |
449 | 449 | ||
450 | } | 450 | } |
451 | if ( msg == "-showWN" ) { | 451 | if ( msg == "-showWN" ) { |
452 | mView->viewManager()->showWhatsNextView(); | 452 | mView->viewManager()->showWhatsNextView(); |
453 | } | 453 | } |
454 | if ( msg == "-showTodo" ) { | 454 | if ( msg == "-showTodo" ) { |
455 | mView->viewManager()->showTodoView(); | 455 | mView->viewManager()->showTodoView(); |
456 | } | 456 | } |
457 | if ( msg == "-showList" ) { | 457 | if ( msg == "-showList" ) { |
458 | mView->viewManager()->showListView(); | 458 | mView->viewManager()->showListView(); |
459 | } | 459 | } |
460 | else if ( msg == "-showDay" ) { | 460 | else if ( msg == "-showDay" ) { |
461 | mView->viewManager()->showDayView(); | 461 | mView->viewManager()->showDayView(); |
462 | } | 462 | } |
463 | else if ( msg == "-showWWeek" ) { | 463 | else if ( msg == "-showWWeek" ) { |
464 | mView->viewManager()->showWorkWeekView(); | 464 | mView->viewManager()->showWorkWeekView(); |
465 | } | 465 | } |
466 | else if ( msg == "-ringSync" ) { | 466 | else if ( msg == "-ringSync" ) { |
467 | mSyncManager->multiSync( false ); | 467 | mSyncManager->multiSync( false ); |
468 | } | 468 | } |
469 | else if ( msg == "-showWeek" ) { | 469 | else if ( msg == "-showWeek" ) { |
470 | mView->viewManager()->showWeekView(); | 470 | mView->viewManager()->showWeekView(); |
471 | } | 471 | } |
472 | else if ( msg == "-showTodo" ) { | 472 | else if ( msg == "-showTodo" ) { |
473 | mView->viewManager()->showTodoView(); | 473 | mView->viewManager()->showTodoView(); |
474 | } | 474 | } |
475 | else if ( msg == "-showJournal" ) { | 475 | else if ( msg == "-showJournal" ) { |
476 | mView->dateNavigator()->selectDates( 1 ); | 476 | mView->dateNavigator()->selectDates( 1 ); |
477 | mView->dateNavigator()->selectToday(); | 477 | mView->dateNavigator()->selectToday(); |
478 | mView->viewManager()->showJournalView(); | 478 | mView->viewManager()->showJournalView(); |
479 | } | 479 | } |
480 | else if ( msg == "-showKO" ) { | 480 | else if ( msg == "-showKO" ) { |
481 | mView->viewManager()->showNextXView(); | 481 | mView->viewManager()->showNextXView(); |
482 | } | 482 | } |
483 | else if ( msg == "-showWNext" || msg == "nextView()" ) { | 483 | else if ( msg == "-showWNext" || msg == "nextView()" ) { |
484 | mView->viewManager()->showWhatsNextView(); | 484 | mView->viewManager()->showWhatsNextView(); |
485 | } | 485 | } |
486 | else if ( msg == "-showNextXView" ) { | 486 | else if ( msg == "-showNextXView" ) { |
487 | mView->viewManager()->showNextXView(); | 487 | mView->viewManager()->showNextXView(); |
488 | } | 488 | } |
489 | 489 | ||
490 | 490 | ||
491 | } | 491 | } |
492 | 492 | ||
493 | showMaximized(); | 493 | showMaximized(); |
494 | raise(); | 494 | raise(); |
495 | } | 495 | } |
496 | 496 | ||
497 | QPixmap MainWindow::loadPixmap( QString name ) | 497 | QPixmap MainWindow::loadPixmap( QString name ) |
498 | { | 498 | { |
499 | return SmallIcon( name ); | 499 | return SmallIcon( name ); |
500 | 500 | ||
501 | } | 501 | } |
502 | void MainWindow::initActions() | 502 | void MainWindow::initActions() |
503 | { | 503 | { |
504 | //KOPrefs::instance()->mShowFullMenu | 504 | //KOPrefs::instance()->mShowFullMenu |
505 | iconToolBar->clear(); | 505 | iconToolBar->clear(); |
506 | KOPrefs *p = KOPrefs::instance(); | 506 | KOPrefs *p = KOPrefs::instance(); |
507 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); | 507 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); |
508 | 508 | ||
509 | QPopupMenu *viewMenu = new QPopupMenu( this ); | 509 | QPopupMenu *viewMenu = new QPopupMenu( this ); |
510 | QPopupMenu *actionMenu = new QPopupMenu( this ); | 510 | QPopupMenu *actionMenu = new QPopupMenu( this ); |
511 | QPopupMenu *importMenu = new QPopupMenu( this ); | 511 | QPopupMenu *importMenu = new QPopupMenu( this ); |
512 | selectFilterMenu = new QPopupMenu( this ); | 512 | selectFilterMenu = new QPopupMenu( this ); |
513 | selectFilterMenu->setCheckable( true ); | 513 | selectFilterMenu->setCheckable( true ); |
514 | syncMenu = new QPopupMenu( this ); | 514 | syncMenu = new QPopupMenu( this ); |
515 | configureAgendaMenu = new QPopupMenu( this ); | 515 | configureAgendaMenu = new QPopupMenu( this ); |
516 | configureToolBarMenu = new QPopupMenu( this ); | 516 | configureToolBarMenu = new QPopupMenu( this ); |
517 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 517 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
518 | if ( KOPrefs::instance()->mShowFullMenu ) { | 518 | if ( KOPrefs::instance()->mShowFullMenu ) { |
519 | QMenuBar *menuBar1; | 519 | QMenuBar *menuBar1; |
520 | menuBar1 = menuBar(); | 520 | menuBar1 = menuBar(); |
521 | menuBar1->insertItem( i18n("File"), importMenu ); | 521 | menuBar1->insertItem( i18n("File"), importMenu ); |
522 | menuBar1->insertItem( i18n("View"), viewMenu ); | 522 | menuBar1->insertItem( i18n("View"), viewMenu ); |
523 | menuBar1->insertItem( i18n("Actions"), actionMenu ); | 523 | menuBar1->insertItem( i18n("Actions"), actionMenu ); |
524 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); | 524 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); |
525 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 525 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
526 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 526 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
527 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); | 527 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); |
528 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 528 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
529 | } else { | 529 | } else { |
530 | QPEMenuBar *menuBar1; | 530 | QPEMenuBar *menuBar1; |
531 | menuBar1 = new QPEMenuBar( iconToolBar ); | 531 | menuBar1 = new QPEMenuBar( iconToolBar ); |
532 | QPopupMenu *menuBar = new QPopupMenu( this ); | 532 | QPopupMenu *menuBar = new QPopupMenu( this ); |
533 | menuBar1->insertItem( i18n("ME"), menuBar); | 533 | menuBar1->insertItem( i18n("ME"), menuBar); |
534 | menuBar->insertItem( i18n("File"), importMenu ); | 534 | menuBar->insertItem( i18n("File"), importMenu ); |
535 | menuBar->insertItem( i18n("View"), viewMenu ); | 535 | menuBar->insertItem( i18n("View"), viewMenu ); |
536 | menuBar->insertItem( i18n("Actions"), actionMenu ); | 536 | menuBar->insertItem( i18n("Actions"), actionMenu ); |
537 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); | 537 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); |
538 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 538 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
539 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 539 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
540 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 540 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
541 | menuBar->insertItem( i18n("Help"), helpMenu ); | 541 | menuBar->insertItem( i18n("Help"), helpMenu ); |
542 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 542 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
543 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 543 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
544 | } | 544 | } |
545 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 545 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
546 | connect ( selectFilterMenu, SIGNAL( aboutToShow () ), this, SLOT (fillFilterMenu() ) ); | 546 | connect ( selectFilterMenu, SIGNAL( aboutToShow () ), this, SLOT (fillFilterMenu() ) ); |
547 | 547 | ||
548 | // ****************** | 548 | // ****************** |
549 | QAction *action; | 549 | QAction *action; |
550 | QIconSet icon; | 550 | QIconSet icon; |
551 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 551 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
552 | configureToolBarMenu->setCheckable( true ); | 552 | configureToolBarMenu->setCheckable( true ); |
553 | 553 | ||
554 | QString pathString = ""; | 554 | QString pathString = ""; |
555 | if ( !p->mToolBarMiniIcons ) { | 555 | if ( !p->mToolBarMiniIcons ) { |
556 | if ( QApplication::desktop()->width() < 480 ) | 556 | if ( QApplication::desktop()->width() < 480 ) |
557 | pathString += "icons16/"; | 557 | pathString += "icons16/"; |
558 | } else | 558 | } else |
559 | pathString += "iconsmini/"; | 559 | pathString += "iconsmini/"; |
560 | configureAgendaMenu->setCheckable( true ); | 560 | configureAgendaMenu->setCheckable( true ); |
561 | configureAgendaMenu->insertItem(i18n("Toggle Allday"), 1 ); | ||
562 | configureAgendaMenu->insertSeparator(); | ||
563 | configureAgendaMenu->insertItem(i18n("Tiny"), 4 ); | 561 | configureAgendaMenu->insertItem(i18n("Tiny"), 4 ); |
564 | configureAgendaMenu->insertItem(i18n("Small"), 6 ); | 562 | configureAgendaMenu->insertItem(i18n("Small"), 6 ); |
565 | configureAgendaMenu->insertItem(i18n("Medium"), 8 ); | 563 | configureAgendaMenu->insertItem(i18n("Medium"), 8 ); |
566 | configureAgendaMenu->insertItem(i18n("Normal"), 10 ); | 564 | configureAgendaMenu->insertItem(i18n("Normal"), 10 ); |
567 | configureAgendaMenu->insertItem(i18n("Large"), 12 ); | 565 | configureAgendaMenu->insertItem(i18n("Large"), 12 ); |
568 | configureAgendaMenu->insertItem(i18n("Big"), 14 ); | 566 | configureAgendaMenu->insertItem(i18n("Big"), 14 ); |
569 | configureAgendaMenu->insertItem(i18n("Bigger"), 16 ); | 567 | configureAgendaMenu->insertItem(i18n("Bigger"), 16 ); |
570 | configureAgendaMenu->insertItem(i18n("Biggest"), 18 ); | 568 | configureAgendaMenu->insertItem(i18n("Biggest"), 18 ); |
571 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 569 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
572 | 570 | ||
573 | icon = loadPixmap( pathString + "configure" ); | 571 | icon = loadPixmap( pathString + "configure" ); |
574 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); | 572 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); |
575 | action->addTo( actionMenu ); | 573 | action->addTo( actionMenu ); |
576 | connect( action, SIGNAL( activated() ), | 574 | connect( action, SIGNAL( activated() ), |
577 | mView, SLOT( edit_options() ) ); | 575 | mView, SLOT( edit_options() ) ); |
578 | actionMenu->insertSeparator(); | 576 | actionMenu->insertSeparator(); |
579 | 577 | ||
580 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | 578 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
581 | action->addTo( actionMenu ); | 579 | action->addTo( actionMenu ); |
582 | connect( action, SIGNAL( activated() ), | 580 | connect( action, SIGNAL( activated() ), |
583 | mView, SLOT( undo_delete() ) ); | 581 | mView, SLOT( undo_delete() ) ); |
584 | actionMenu->insertSeparator(); | 582 | actionMenu->insertSeparator(); |
585 | 583 | ||
586 | icon = loadPixmap( pathString + "newevent" ); | 584 | icon = loadPixmap( pathString + "newevent" ); |
587 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 585 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
588 | configureToolBarMenu->insertSeparator(); | 586 | configureToolBarMenu->insertSeparator(); |
589 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 587 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
590 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 588 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
591 | ne_action->addTo( actionMenu ); | 589 | ne_action->addTo( actionMenu ); |
592 | connect( ne_action, SIGNAL( activated() ), | 590 | connect( ne_action, SIGNAL( activated() ), |
593 | mView, SLOT( newEvent() ) ); | 591 | mView, SLOT( newEvent() ) ); |
594 | icon = loadPixmap( pathString + "newtodo" ); | 592 | icon = loadPixmap( pathString + "newtodo" ); |
595 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 593 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
596 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 594 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
597 | nt_action->addTo( actionMenu ); | 595 | nt_action->addTo( actionMenu ); |
598 | connect( nt_action, SIGNAL( activated() ), | 596 | connect( nt_action, SIGNAL( activated() ), |
599 | mView, SLOT( newTodo() ) ); | 597 | mView, SLOT( newTodo() ) ); |
600 | icon = loadPixmap( pathString + "navi" ); | 598 | icon = loadPixmap( pathString + "navi" ); |
601 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 599 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
602 | action->addTo( viewMenu ); | 600 | action->addTo( viewMenu ); |
603 | connect( action, SIGNAL( activated() ), | 601 | connect( action, SIGNAL( activated() ), |
604 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 602 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
605 | icon = loadPixmap( pathString + "filter" ); | 603 | icon = loadPixmap( pathString + "filter" ); |
606 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); | 604 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); |
607 | action->addTo( viewMenu ); | 605 | action->addTo( viewMenu ); |
608 | connect( action, SIGNAL( activated() ), | 606 | connect( action, SIGNAL( activated() ), |
609 | mView, SLOT( toggleFilter() ) ); | 607 | mView, SLOT( toggleFilter() ) ); |
610 | 608 | action = new QAction( i18n("Toggle Allday"), i18n("Toggle Allday"), 0, this ); | |
609 | action->addTo( viewMenu ); | ||
610 | connect( action, SIGNAL( activated() ), | ||
611 | mView, SLOT( toggleAllDaySize() ) ); | ||
611 | 612 | ||
612 | viewMenu->insertSeparator(); | 613 | viewMenu->insertSeparator(); |
613 | icon = loadPixmap( pathString + "picker" ); | 614 | icon = loadPixmap( pathString + "picker" ); |
614 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); | 615 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); |
615 | action->addTo( viewMenu ); | 616 | action->addTo( viewMenu ); |
616 | connect( action, SIGNAL( activated() ), | 617 | connect( action, SIGNAL( activated() ), |
617 | mView, SLOT( showDatePicker() ) ); | 618 | mView, SLOT( showDatePicker() ) ); |
618 | action->addTo( iconToolBar ); | 619 | action->addTo( iconToolBar ); |
619 | viewMenu->insertSeparator(); | 620 | viewMenu->insertSeparator(); |
620 | icon = loadPixmap( pathString + "list" ); | 621 | icon = loadPixmap( pathString + "list" ); |
621 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | 622 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); |
622 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | 623 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); |
623 | showlist_action->addTo( viewMenu ); | 624 | showlist_action->addTo( viewMenu ); |
624 | connect( showlist_action, SIGNAL( activated() ), | 625 | connect( showlist_action, SIGNAL( activated() ), |
625 | mView->viewManager(), SLOT( showListView() ) ); | 626 | mView->viewManager(), SLOT( showListView() ) ); |
626 | 627 | ||
627 | 628 | ||
628 | icon = loadPixmap( pathString + "day" ); | 629 | icon = loadPixmap( pathString + "day" ); |
629 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 630 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
630 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 631 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
631 | day1_action->addTo( viewMenu ); | 632 | day1_action->addTo( viewMenu ); |
632 | // action->addTo( toolBar ); | 633 | // action->addTo( toolBar ); |
633 | connect( day1_action, SIGNAL( activated() ), | 634 | connect( day1_action, SIGNAL( activated() ), |
634 | mView->viewManager(), SLOT( showDayView() ) ); | 635 | mView->viewManager(), SLOT( showDayView() ) ); |
635 | 636 | ||
636 | icon = loadPixmap( pathString + "workweek" ); | 637 | icon = loadPixmap( pathString + "workweek" ); |
637 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 638 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
638 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 639 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
639 | day5_action->addTo( viewMenu ); | 640 | day5_action->addTo( viewMenu ); |
640 | connect( day5_action, SIGNAL( activated() ), | 641 | connect( day5_action, SIGNAL( activated() ), |
641 | mView->viewManager(), SLOT( showWorkWeekView() ) ); | 642 | mView->viewManager(), SLOT( showWorkWeekView() ) ); |
642 | 643 | ||
643 | icon = loadPixmap( pathString + "week" ); | 644 | icon = loadPixmap( pathString + "week" ); |
644 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 645 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
645 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 646 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
646 | day7_action->addTo( viewMenu ); | 647 | day7_action->addTo( viewMenu ); |
647 | connect( day7_action, SIGNAL( activated() ), | 648 | connect( day7_action, SIGNAL( activated() ), |
648 | mView->viewManager(), SLOT( showWeekView() ) ); | 649 | mView->viewManager(), SLOT( showWeekView() ) ); |
649 | 650 | ||
650 | icon = loadPixmap( pathString + "month" ); | 651 | icon = loadPixmap( pathString + "month" ); |
651 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 652 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
652 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 653 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
653 | month_action->addTo( viewMenu ); | 654 | month_action->addTo( viewMenu ); |
654 | connect( month_action, SIGNAL( activated() ), | 655 | connect( month_action, SIGNAL( activated() ), |
655 | mView->viewManager(), SLOT( showMonthView() ) ); | 656 | mView->viewManager(), SLOT( showMonthView() ) ); |
656 | 657 | ||
657 | icon = loadPixmap( pathString + "todo" ); | 658 | icon = loadPixmap( pathString + "todo" ); |
658 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 659 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
659 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 660 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
660 | todoview_action->addTo( viewMenu ); | 661 | todoview_action->addTo( viewMenu ); |
661 | connect( todoview_action, SIGNAL( activated() ), | 662 | connect( todoview_action, SIGNAL( activated() ), |
662 | mView->viewManager(), SLOT( showTodoView() ) ); | 663 | mView->viewManager(), SLOT( showTodoView() ) ); |
663 | 664 | ||
664 | icon = loadPixmap( pathString + "journal" ); | 665 | icon = loadPixmap( pathString + "journal" ); |
665 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 666 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
666 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 667 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
667 | viewjournal_action->addTo( viewMenu ); | 668 | viewjournal_action->addTo( viewMenu ); |
668 | connect( viewjournal_action, SIGNAL( activated() ), | 669 | connect( viewjournal_action, SIGNAL( activated() ), |
669 | mView->viewManager(), SLOT( showJournalView() ) ); | 670 | mView->viewManager(), SLOT( showJournalView() ) ); |
670 | 671 | ||
671 | icon = loadPixmap( pathString + "xdays" ); | 672 | icon = loadPixmap( pathString + "xdays" ); |
672 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); | 673 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); |
673 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 674 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
674 | xdays_action->addTo( viewMenu ); | 675 | xdays_action->addTo( viewMenu ); |
675 | connect( xdays_action, SIGNAL( activated() ), | 676 | connect( xdays_action, SIGNAL( activated() ), |
676 | mView->viewManager(), SLOT( showNextXView() ) ); | 677 | mView->viewManager(), SLOT( showNextXView() ) ); |
677 | 678 | ||
678 | icon = loadPixmap( pathString + "whatsnext" ); | 679 | icon = loadPixmap( pathString + "whatsnext" ); |
679 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); | 680 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); |
680 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 681 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
681 | whatsnext_action->addTo( viewMenu ); | 682 | whatsnext_action->addTo( viewMenu ); |
682 | connect( whatsnext_action, SIGNAL( activated() ), | 683 | connect( whatsnext_action, SIGNAL( activated() ), |
683 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 684 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
684 | 685 | ||
685 | #if 0 | 686 | #if 0 |
686 | action = new QAction( "view_timespan", "Time Span", 0, this ); | 687 | action = new QAction( "view_timespan", "Time Span", 0, this ); |
687 | action->addTo( viewMenu ); | 688 | action->addTo( viewMenu ); |
688 | connect( action, SIGNAL( activated() ), | 689 | connect( action, SIGNAL( activated() ), |
689 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 690 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
690 | #endif | 691 | #endif |
691 | 692 | ||
692 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 693 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, |
693 | this ); | 694 | this ); |
694 | mNewSubTodoAction->addTo( actionMenu ); | 695 | mNewSubTodoAction->addTo( actionMenu ); |
695 | connect( mNewSubTodoAction, SIGNAL( activated() ), | 696 | connect( mNewSubTodoAction, SIGNAL( activated() ), |
696 | mView, SLOT( newSubTodo() ) ); | 697 | mView, SLOT( newSubTodo() ) ); |
697 | 698 | ||
698 | actionMenu->insertSeparator(); | 699 | actionMenu->insertSeparator(); |
699 | 700 | ||
700 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); | 701 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); |
701 | mShowAction->addTo( actionMenu ); | 702 | mShowAction->addTo( actionMenu ); |
702 | connect( mShowAction, SIGNAL( activated() ), | 703 | connect( mShowAction, SIGNAL( activated() ), |
703 | mView, SLOT( showIncidence() ) ); | 704 | mView, SLOT( showIncidence() ) ); |
704 | 705 | ||
705 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); | 706 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); |
706 | mEditAction->addTo( actionMenu ); | 707 | mEditAction->addTo( actionMenu ); |
707 | connect( mEditAction, SIGNAL( activated() ), | 708 | connect( mEditAction, SIGNAL( activated() ), |
708 | mView, SLOT( editIncidence() ) ); | 709 | mView, SLOT( editIncidence() ) ); |
709 | 710 | ||
710 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); | 711 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); |
711 | mDeleteAction->addTo( actionMenu ); | 712 | mDeleteAction->addTo( actionMenu ); |
712 | connect( mDeleteAction, SIGNAL( activated() ), | 713 | connect( mDeleteAction, SIGNAL( activated() ), |
713 | mView, SLOT( deleteIncidence() ) ); | 714 | mView, SLOT( deleteIncidence() ) ); |
714 | 715 | ||
715 | 716 | ||
716 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); | 717 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); |
717 | mCloneAction->addTo( actionMenu ); | 718 | mCloneAction->addTo( actionMenu ); |
718 | connect( mCloneAction, SIGNAL( activated() ), | 719 | connect( mCloneAction, SIGNAL( activated() ), |
719 | mView, SLOT( cloneIncidence() ) ); | 720 | mView, SLOT( cloneIncidence() ) ); |
720 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); | 721 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); |
721 | mMoveAction->addTo( actionMenu ); | 722 | mMoveAction->addTo( actionMenu ); |
722 | connect( mMoveAction, SIGNAL( activated() ), | 723 | connect( mMoveAction, SIGNAL( activated() ), |
723 | mView, SLOT( moveIncidence() ) ); | 724 | mView, SLOT( moveIncidence() ) ); |
724 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); | 725 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); |
725 | mBeamAction->addTo( actionMenu ); | 726 | mBeamAction->addTo( actionMenu ); |
726 | connect( mBeamAction, SIGNAL( activated() ), | 727 | connect( mBeamAction, SIGNAL( activated() ), |
727 | mView, SLOT( beamIncidence() ) ); | 728 | mView, SLOT( beamIncidence() ) ); |
728 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); | 729 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); |
729 | mCancelAction->addTo( actionMenu ); | 730 | mCancelAction->addTo( actionMenu ); |
730 | connect( mCancelAction, SIGNAL( activated() ), | 731 | connect( mCancelAction, SIGNAL( activated() ), |
731 | mView, SLOT( toggleCancelIncidence() ) ); | 732 | mView, SLOT( toggleCancelIncidence() ) ); |
732 | 733 | ||
733 | actionMenu->insertSeparator(); | 734 | actionMenu->insertSeparator(); |
734 | 735 | ||
735 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, | 736 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, |
736 | this ); | 737 | this ); |
737 | action->addTo( actionMenu ); | 738 | action->addTo( actionMenu ); |
738 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); | 739 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); |
739 | 740 | ||
740 | icon = loadPixmap( pathString + "search" ); | 741 | icon = loadPixmap( pathString + "search" ); |
741 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 742 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); |
742 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); | 743 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); |
743 | search_action->addTo( actionMenu ); | 744 | search_action->addTo( actionMenu ); |
744 | connect( search_action, SIGNAL( activated() ), | 745 | connect( search_action, SIGNAL( activated() ), |
745 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 746 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
746 | 747 | ||
747 | icon = loadPixmap( pathString + "today" ); | 748 | icon = loadPixmap( pathString + "today" ); |
748 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 749 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
749 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 750 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
750 | today_action->addTo( actionMenu ); | 751 | today_action->addTo( actionMenu ); |
751 | connect( today_action, SIGNAL( activated() ), | 752 | connect( today_action, SIGNAL( activated() ), |
752 | mView, SLOT( goToday() ) ); | 753 | mView, SLOT( goToday() ) ); |
753 | 754 | ||
754 | if ( KOPrefs::instance()->mShowFullMenu ) { | 755 | if ( KOPrefs::instance()->mShowFullMenu ) { |
755 | actionMenu->insertSeparator(); | 756 | actionMenu->insertSeparator(); |
756 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); | 757 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); |
757 | 758 | ||
758 | } | 759 | } |
759 | // actionMenu->insertSeparator(); | 760 | // actionMenu->insertSeparator(); |
760 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, | 761 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, |
761 | this ); | 762 | this ); |
762 | action->addTo( importMenu ); | 763 | action->addTo( importMenu ); |
763 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); | 764 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); |
764 | action = new QAction( "import_quick", i18n("Import last file"), 0, | 765 | action = new QAction( "import_quick", i18n("Import last file"), 0, |
765 | this ); | 766 | this ); |
766 | action->addTo( importMenu ); | 767 | action->addTo( importMenu ); |
767 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); | 768 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); |
768 | importMenu->insertSeparator(); | 769 | importMenu->insertSeparator(); |
769 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, | 770 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, |
770 | this ); | 771 | this ); |
771 | action->addTo( importMenu ); | 772 | action->addTo( importMenu ); |
772 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); | 773 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); |
773 | #ifndef DESKTOP_VERSION | 774 | #ifndef DESKTOP_VERSION |
774 | importMenu->insertSeparator(); | 775 | importMenu->insertSeparator(); |
775 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, | 776 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, |
776 | this ); | 777 | this ); |
777 | action->addTo( importMenu ); | 778 | action->addTo( importMenu ); |
778 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); | 779 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); |
779 | #else | 780 | #else |
780 | #ifdef _WIN32_ | 781 | #ifdef _WIN32_ |
781 | importMenu->insertSeparator(); | 782 | importMenu->insertSeparator(); |
782 | action = new QAction( "import_ol", i18n("Import from OL"), 0, | 783 | action = new QAction( "import_ol", i18n("Import from OL"), 0, |
783 | this ); | 784 | this ); |
784 | action->addTo( importMenu ); | 785 | action->addTo( importMenu ); |
785 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); | 786 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); |
786 | #endif | 787 | #endif |
787 | #endif | 788 | #endif |
788 | 789 | ||
789 | importMenu->insertSeparator(); | 790 | importMenu->insertSeparator(); |
790 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, | 791 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, |
791 | this ); | 792 | this ); |
792 | action->addTo( importMenu ); | 793 | action->addTo( importMenu ); |
793 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); | 794 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); |
794 | 795 | ||
795 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, | 796 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, |
796 | this ); | 797 | this ); |
797 | action->addTo( importMenu ); | 798 | action->addTo( importMenu ); |
798 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 799 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
799 | 800 | ||
800 | importMenu->insertSeparator(); | 801 | importMenu->insertSeparator(); |
801 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 802 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, |
802 | this ); | 803 | this ); |
803 | action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 804 | action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
804 | 805 | ||
805 | 806 | ||
806 | //LR | 807 | //LR |
807 | QPopupMenu *ex2phone = new QPopupMenu( this ); | 808 | QPopupMenu *ex2phone = new QPopupMenu( this ); |
808 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 809 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
809 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 810 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
810 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); | 811 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); |
811 | importMenu->insertItem( i18n("Export to phone"), ex2phone ); | 812 | importMenu->insertItem( i18n("Export to phone"), ex2phone ); |
812 | 813 | ||
813 | importMenu->insertSeparator(); | 814 | importMenu->insertSeparator(); |
814 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 815 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
815 | this ); | 816 | this ); |
816 | action->addTo( importMenu ); | 817 | action->addTo( importMenu ); |
817 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 818 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
818 | #ifndef DESKTOP_VERSION | 819 | #ifndef DESKTOP_VERSION |
819 | importMenu->insertSeparator(); | 820 | importMenu->insertSeparator(); |
820 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, | 821 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, |
821 | this ); | 822 | this ); |
822 | brAction->addTo( importMenu ); | 823 | brAction->addTo( importMenu ); |
823 | brAction->setToggleAction (true ) ; | 824 | brAction->setToggleAction (true ) ; |
824 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 825 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
825 | 826 | ||
826 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 827 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
827 | this ); | 828 | this ); |
828 | action->addTo( importMenu ); | 829 | action->addTo( importMenu ); |
829 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 830 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
830 | 831 | ||
831 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 832 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
832 | this ); | 833 | this ); |
833 | action->addTo( importMenu ); | 834 | action->addTo( importMenu ); |
834 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 835 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
835 | #else | 836 | #else |
836 | importMenu->insertSeparator(); | 837 | importMenu->insertSeparator(); |
837 | icon = loadPixmap( pathString + "print" ); | 838 | icon = loadPixmap( pathString + "print" ); |
838 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 839 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
839 | action->addTo( importMenu ); | 840 | action->addTo( importMenu ); |
840 | connect( action, SIGNAL( activated() ), | 841 | connect( action, SIGNAL( activated() ), |
841 | this, SLOT( printCal() ) ); | 842 | this, SLOT( printCal() ) ); |
842 | 843 | ||
843 | icon = loadPixmap( pathString + "print" ); | 844 | icon = loadPixmap( pathString + "print" ); |
844 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 845 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
845 | action->addTo( importMenu ); | 846 | action->addTo( importMenu ); |
846 | connect( action, SIGNAL( activated() ), | 847 | connect( action, SIGNAL( activated() ), |
847 | this, SLOT( printSel() ) ); | 848 | this, SLOT( printSel() ) ); |
848 | #endif | 849 | #endif |
849 | importMenu->insertSeparator(); | 850 | importMenu->insertSeparator(); |
850 | action = new QAction( "beam all", i18n("Save"), 0, | 851 | action = new QAction( "beam all", i18n("Save"), 0, |
851 | this ); | 852 | this ); |
852 | action->addTo( importMenu ); | 853 | action->addTo( importMenu ); |
853 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 854 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
854 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 855 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
855 | this ); | 856 | this ); |
856 | action->addTo( importMenu ); | 857 | action->addTo( importMenu ); |
857 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 858 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
858 | 859 | ||
859 | //menuBar->insertItem( "Configure",configureMenu ); | 860 | //menuBar->insertItem( "Configure",configureMenu ); |
860 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 861 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
861 | icon = loadPixmap( "korganizer/korganizer" ); | 862 | icon = loadPixmap( "korganizer/korganizer" ); |
862 | 863 | ||
863 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 864 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
864 | action->addTo( helpMenu ); | 865 | action->addTo( helpMenu ); |
865 | connect( action, SIGNAL( activated() ), | 866 | connect( action, SIGNAL( activated() ), |
866 | SLOT( whatsNew() ) ); | 867 | SLOT( whatsNew() ) ); |
867 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 868 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
868 | action->addTo( helpMenu ); | 869 | action->addTo( helpMenu ); |
869 | connect( action, SIGNAL( activated() ), | 870 | connect( action, SIGNAL( activated() ), |
870 | SLOT( features() ) ); | 871 | SLOT( features() ) ); |
871 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 872 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
872 | action->addTo( helpMenu ); | 873 | action->addTo( helpMenu ); |
873 | connect( action, SIGNAL( activated() ), | 874 | connect( action, SIGNAL( activated() ), |
874 | SLOT( keyBindings() ) ); | 875 | SLOT( keyBindings() ) ); |
875 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 876 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
876 | action->addTo( helpMenu ); | 877 | action->addTo( helpMenu ); |
877 | connect( action, SIGNAL( activated() ), | 878 | connect( action, SIGNAL( activated() ), |
878 | SLOT( synchowto() ) ); | 879 | SLOT( synchowto() ) ); |
879 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); | 880 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); |
880 | action->addTo( helpMenu ); | 881 | action->addTo( helpMenu ); |
881 | connect( action, SIGNAL( activated() ), | 882 | connect( action, SIGNAL( activated() ), |
882 | SLOT( kdesynchowto() ) ); | 883 | SLOT( kdesynchowto() ) ); |
883 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); | 884 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); |
884 | action->addTo( helpMenu ); | 885 | action->addTo( helpMenu ); |
885 | connect( action, SIGNAL( activated() ), | 886 | connect( action, SIGNAL( activated() ), |
886 | SLOT( multisynchowto() ) ); | 887 | SLOT( multisynchowto() ) ); |
887 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 888 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
888 | action->addTo( helpMenu ); | 889 | action->addTo( helpMenu ); |
889 | connect( action, SIGNAL( activated() ), | 890 | connect( action, SIGNAL( activated() ), |
890 | SLOT( aboutAutoSaving() ) ); | 891 | SLOT( aboutAutoSaving() ) ); |
891 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 892 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
892 | action->addTo( helpMenu ); | 893 | action->addTo( helpMenu ); |
893 | connect( action, SIGNAL( activated() ), | 894 | connect( action, SIGNAL( activated() ), |
894 | SLOT( aboutKnownBugs() ) ); | 895 | SLOT( aboutKnownBugs() ) ); |
895 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 896 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
896 | action->addTo( helpMenu ); | 897 | action->addTo( helpMenu ); |
897 | connect( action, SIGNAL( activated() ), | 898 | connect( action, SIGNAL( activated() ), |
898 | SLOT( usertrans() ) ); | 899 | SLOT( usertrans() ) ); |
899 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 900 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
900 | action->addTo( helpMenu ); | 901 | action->addTo( helpMenu ); |
901 | connect( action, SIGNAL( activated() ), | 902 | connect( action, SIGNAL( activated() ), |
902 | SLOT( faq() ) ); | 903 | SLOT( faq() ) ); |
903 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | 904 | action = new QAction( "licence", i18n("Licence..."), 0, this ); |
904 | action->addTo( helpMenu ); | 905 | action->addTo( helpMenu ); |
905 | connect( action, SIGNAL( activated() ), | 906 | connect( action, SIGNAL( activated() ), |
906 | SLOT( licence() ) ); | 907 | SLOT( licence() ) ); |
907 | action = new QAction( "about", i18n("About..."), 0, this ); | 908 | action = new QAction( "about", i18n("About..."), 0, this ); |
908 | action->addTo( helpMenu ); | 909 | action->addTo( helpMenu ); |
909 | connect( action, SIGNAL( activated() ), | 910 | connect( action, SIGNAL( activated() ), |
910 | SLOT( about() ) ); | 911 | SLOT( about() ) ); |
911 | //menuBar->insertSeparator(); | 912 | //menuBar->insertSeparator(); |
912 | 913 | ||
913 | // ****************************************************** | 914 | // ****************************************************** |
914 | // menubar icons | 915 | // menubar icons |
915 | 916 | ||
916 | 917 | ||
917 | iconToolBar->setHorizontalStretchable (true ); | 918 | iconToolBar->setHorizontalStretchable (true ); |
918 | //menuBar->insertItem( iconToolBar ); | 919 | //menuBar->insertItem( iconToolBar ); |
919 | //xdays_action | 920 | //xdays_action |
920 | if (p-> mShowIconNewEvent) | 921 | if (p-> mShowIconNewEvent) |
921 | ne_action->addTo( iconToolBar ); | 922 | ne_action->addTo( iconToolBar ); |
922 | if (p->mShowIconNewTodo ) | 923 | if (p->mShowIconNewTodo ) |
923 | nt_action->addTo( iconToolBar ); | 924 | nt_action->addTo( iconToolBar ); |
924 | if (p-> mShowIconSearch) | 925 | if (p-> mShowIconSearch) |
925 | search_action->addTo( iconToolBar ); | 926 | search_action->addTo( iconToolBar ); |
926 | if (p-> mShowIconNext) | 927 | if (p-> mShowIconNext) |
927 | whatsnext_action->addTo( iconToolBar ); | 928 | whatsnext_action->addTo( iconToolBar ); |
928 | if (p-> mShowIconNextDays) | 929 | if (p-> mShowIconNextDays) |
929 | xdays_action->addTo( iconToolBar ); | 930 | xdays_action->addTo( iconToolBar ); |
930 | if (p-> mShowIconList) | 931 | if (p-> mShowIconList) |
931 | showlist_action->addTo( iconToolBar ); | 932 | showlist_action->addTo( iconToolBar ); |
932 | if (p-> mShowIconDay1) | 933 | if (p-> mShowIconDay1) |
933 | day1_action->addTo( iconToolBar ); | 934 | day1_action->addTo( iconToolBar ); |
934 | if (p-> mShowIconDay5) | 935 | if (p-> mShowIconDay5) |
935 | day5_action->addTo( iconToolBar ); | 936 | day5_action->addTo( iconToolBar ); |
936 | if (p-> mShowIconDay7) | 937 | if (p-> mShowIconDay7) |
937 | day7_action->addTo( iconToolBar ); | 938 | day7_action->addTo( iconToolBar ); |
938 | if (p-> mShowIconMonth) | 939 | if (p-> mShowIconMonth) |
939 | month_action->addTo( iconToolBar ); | 940 | month_action->addTo( iconToolBar ); |
940 | if (p-> mShowIconTodoview) | 941 | if (p-> mShowIconTodoview) |
941 | todoview_action->addTo( iconToolBar ); | 942 | todoview_action->addTo( iconToolBar ); |
942 | if (p-> mShowIconJournal) | 943 | if (p-> mShowIconJournal) |
943 | viewjournal_action->addTo( iconToolBar ); | 944 | viewjournal_action->addTo( iconToolBar ); |
944 | icon = loadPixmap( pathString + "2leftarrowB" ); | 945 | icon = loadPixmap( pathString + "2leftarrowB" ); |
945 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); | 946 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); |
946 | if (p-> mShowIconBackFast) { | 947 | if (p-> mShowIconBackFast) { |
947 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 948 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
948 | connect( action, SIGNAL( activated() ), | 949 | connect( action, SIGNAL( activated() ), |
949 | mView, SLOT( goPreviousMonth() ) ); | 950 | mView, SLOT( goPreviousMonth() ) ); |
950 | action->addTo( iconToolBar ); | 951 | action->addTo( iconToolBar ); |
951 | } | 952 | } |
952 | icon = loadPixmap( pathString + "1leftarrowB" ); | 953 | icon = loadPixmap( pathString + "1leftarrowB" ); |
953 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); | 954 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); |
954 | if (p-> mShowIconBack) { | 955 | if (p-> mShowIconBack) { |
955 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 956 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
956 | connect( action, SIGNAL( activated() ), | 957 | connect( action, SIGNAL( activated() ), |
957 | mView, SLOT( goPrevious() ) ); | 958 | mView, SLOT( goPrevious() ) ); |
958 | action->addTo( iconToolBar ); | 959 | action->addTo( iconToolBar ); |
959 | } | 960 | } |
960 | if (p-> mShowIconToday) | 961 | if (p-> mShowIconToday) |
961 | today_action->addTo( iconToolBar ); | 962 | today_action->addTo( iconToolBar ); |
962 | icon = loadPixmap( pathString + "1rightarrowB" ); | 963 | icon = loadPixmap( pathString + "1rightarrowB" ); |
963 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 964 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
964 | if (p-> mShowIconForward) { | 965 | if (p-> mShowIconForward) { |
965 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 966 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
966 | connect( action, SIGNAL( activated() ), | 967 | connect( action, SIGNAL( activated() ), |
967 | mView, SLOT( goNext() ) ); | 968 | mView, SLOT( goNext() ) ); |
968 | action->addTo( iconToolBar ); | 969 | action->addTo( iconToolBar ); |
969 | } | 970 | } |
970 | icon = loadPixmap( pathString + "2rightarrowB" ); | 971 | icon = loadPixmap( pathString + "2rightarrowB" ); |
971 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 972 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
972 | if (p-> mShowIconForwardFast) { | 973 | if (p-> mShowIconForwardFast) { |
973 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); | 974 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); |
974 | connect( action, SIGNAL( activated() ), | 975 | connect( action, SIGNAL( activated() ), |
975 | mView, SLOT( goNextMonth() ) ); | 976 | mView, SLOT( goNextMonth() ) ); |
976 | action->addTo( iconToolBar ); | 977 | action->addTo( iconToolBar ); |
977 | } | 978 | } |
978 | 979 | ||
979 | 980 | ||
980 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); | 981 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); |
981 | 982 | ||
982 | if (p-> mShowIconNewEvent) | 983 | if (p-> mShowIconNewEvent) |
983 | configureToolBarMenu->setItemChecked( 10, true ); | 984 | configureToolBarMenu->setItemChecked( 10, true ); |
984 | if (p->mShowIconNewTodo ) | 985 | if (p->mShowIconNewTodo ) |
985 | configureToolBarMenu->setItemChecked( 20, true ); | 986 | configureToolBarMenu->setItemChecked( 20, true ); |
986 | if (p-> mShowIconSearch) | 987 | if (p-> mShowIconSearch) |
987 | configureToolBarMenu->setItemChecked( 120, true ); | 988 | configureToolBarMenu->setItemChecked( 120, true ); |
988 | if (p-> mShowIconList) | 989 | if (p-> mShowIconList) |
989 | configureToolBarMenu->setItemChecked( 30, true ); | 990 | configureToolBarMenu->setItemChecked( 30, true ); |
990 | if (p-> mShowIconDay1) | 991 | if (p-> mShowIconDay1) |
991 | configureToolBarMenu->setItemChecked( 40, true ); | 992 | configureToolBarMenu->setItemChecked( 40, true ); |
992 | if (p-> mShowIconDay5) | 993 | if (p-> mShowIconDay5) |
993 | configureToolBarMenu->setItemChecked( 50, true ); | 994 | configureToolBarMenu->setItemChecked( 50, true ); |
994 | if (p-> mShowIconDay7) | 995 | if (p-> mShowIconDay7) |
995 | configureToolBarMenu->setItemChecked( 60, true ); | 996 | configureToolBarMenu->setItemChecked( 60, true ); |
996 | if (p-> mShowIconMonth) | 997 | if (p-> mShowIconMonth) |
997 | configureToolBarMenu->setItemChecked( 70, true ); | 998 | configureToolBarMenu->setItemChecked( 70, true ); |
998 | if (p-> mShowIconTodoview) | 999 | if (p-> mShowIconTodoview) |
999 | configureToolBarMenu->setItemChecked( 80, true ); | 1000 | configureToolBarMenu->setItemChecked( 80, true ); |
1000 | if (p-> mShowIconBackFast) | 1001 | if (p-> mShowIconBackFast) |
1001 | configureToolBarMenu->setItemChecked( 200, true ); | 1002 | configureToolBarMenu->setItemChecked( 200, true ); |
1002 | if (p-> mShowIconBack) | 1003 | if (p-> mShowIconBack) |
1003 | configureToolBarMenu->setItemChecked( 210, true ); | 1004 | configureToolBarMenu->setItemChecked( 210, true ); |
1004 | if (p-> mShowIconToday) | 1005 | if (p-> mShowIconToday) |
1005 | configureToolBarMenu->setItemChecked( 130, true ); | 1006 | configureToolBarMenu->setItemChecked( 130, true ); |
1006 | if (p-> mShowIconForward) | 1007 | if (p-> mShowIconForward) |
1007 | configureToolBarMenu->setItemChecked( 220, true ); | 1008 | configureToolBarMenu->setItemChecked( 220, true ); |
1008 | if (p-> mShowIconForwardFast) | 1009 | if (p-> mShowIconForwardFast) |
1009 | configureToolBarMenu->setItemChecked( 230, true ); | 1010 | configureToolBarMenu->setItemChecked( 230, true ); |
1010 | if (p-> mShowIconNextDays) | 1011 | if (p-> mShowIconNextDays) |
1011 | configureToolBarMenu->setItemChecked( 100, true ); | 1012 | configureToolBarMenu->setItemChecked( 100, true ); |
1012 | if (p-> mShowIconNext) | 1013 | if (p-> mShowIconNext) |
1013 | configureToolBarMenu->setItemChecked( 110, true ); | 1014 | configureToolBarMenu->setItemChecked( 110, true ); |
1014 | if (p-> mShowIconJournal) | 1015 | if (p-> mShowIconJournal) |
1015 | configureToolBarMenu->setItemChecked( 90, true ); | 1016 | configureToolBarMenu->setItemChecked( 90, true ); |
1016 | if (p-> mShowIconWhatsThis) | 1017 | if (p-> mShowIconWhatsThis) |
1017 | configureToolBarMenu->setItemChecked( 300, true ); | 1018 | configureToolBarMenu->setItemChecked( 300, true ); |
1018 | 1019 | ||
1019 | QLabel* dummy = new QLabel( iconToolBar ); | 1020 | QLabel* dummy = new QLabel( iconToolBar ); |
1020 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 1021 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
1021 | if (!p-> mShowIconStretch) | 1022 | if (!p-> mShowIconStretch) |
1022 | iconToolBar->setStretchableWidget ( dummy ) ; | 1023 | iconToolBar->setStretchableWidget ( dummy ) ; |
1023 | else | 1024 | else |
1024 | configureToolBarMenu->setItemChecked( 5, true ); | 1025 | configureToolBarMenu->setItemChecked( 5, true ); |
1025 | if (p-> mShowIconWhatsThis) | 1026 | if (p-> mShowIconWhatsThis) |
1026 | QWhatsThis::whatsThisButton ( iconToolBar ); | 1027 | QWhatsThis::whatsThisButton ( iconToolBar ); |
1027 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 1028 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
1028 | configureAgenda( p->mHourSize ); | 1029 | configureAgenda( p->mHourSize ); |
1029 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 1030 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
1030 | } | 1031 | } |
1031 | 1032 | ||
1032 | void MainWindow::exportToPhone( int mode ) | 1033 | void MainWindow::exportToPhone( int mode ) |
1033 | { | 1034 | { |
1034 | 1035 | ||
1035 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1036 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1036 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1037 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1037 | KOex2phonePrefs ex2phone; | 1038 | KOex2phonePrefs ex2phone; |
1038 | 1039 | ||
1039 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 1040 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |
1040 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); | 1041 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); |
1041 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1042 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1042 | if ( mode == 1 ) | 1043 | if ( mode == 1 ) |
1043 | ex2phone.setCaption(i18n("Export complete calendar")); | 1044 | ex2phone.setCaption(i18n("Export complete calendar")); |
1044 | if ( mode == 2 ) | 1045 | if ( mode == 2 ) |
1045 | ex2phone.setCaption(i18n("Export filtered calendar")); | 1046 | ex2phone.setCaption(i18n("Export filtered calendar")); |
1046 | 1047 | ||
1047 | if ( !ex2phone.exec() ) { | 1048 | if ( !ex2phone.exec() ) { |
1048 | return; | 1049 | return; |
1049 | } | 1050 | } |
1050 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); | 1051 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); |
1051 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); | 1052 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); |
1052 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); | 1053 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); |
1053 | 1054 | ||
1054 | int inFuture = 0; | 1055 | int inFuture = 0; |
1055 | if ( ex2phone.mWriteBackFuture->isChecked() ) | 1056 | if ( ex2phone.mWriteBackFuture->isChecked() ) |
1056 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); | 1057 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); |
1057 | QPtrList<Incidence> delSel; | 1058 | QPtrList<Incidence> delSel; |
1058 | if ( mode == 1 ) | 1059 | if ( mode == 1 ) |
1059 | delSel = mCalendar->rawIncidences(); | 1060 | delSel = mCalendar->rawIncidences(); |
1060 | if ( mode == 2 ) | 1061 | if ( mode == 2 ) |
1061 | delSel = mCalendar->incidences(); | 1062 | delSel = mCalendar->incidences(); |
1062 | CalendarLocal* cal = new CalendarLocal(); | 1063 | CalendarLocal* cal = new CalendarLocal(); |
1063 | cal->setLocalTime(); | 1064 | cal->setLocalTime(); |
1064 | Incidence *incidence = delSel.first(); | 1065 | Incidence *incidence = delSel.first(); |
1065 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); | 1066 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); |
1066 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); | 1067 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); |
1067 | while ( incidence ) { | 1068 | while ( incidence ) { |
1068 | if ( incidence->type() != "Journal" ) { | 1069 | if ( incidence->type() != "Journal" ) { |
1069 | bool add = true; | 1070 | bool add = true; |
1070 | if ( inFuture ) { | 1071 | if ( inFuture ) { |
1071 | QDateTime dt; | 1072 | QDateTime dt; |
1072 | if ( incidence->type() == "Todo" ) { | 1073 | if ( incidence->type() == "Todo" ) { |
1073 | Todo * t = (Todo*)incidence; | 1074 | Todo * t = (Todo*)incidence; |
1074 | if ( t->hasDueDate() ) | 1075 | if ( t->hasDueDate() ) |
1075 | dt = t->dtDue(); | 1076 | dt = t->dtDue(); |
1076 | else | 1077 | else |
1077 | dt = cur.addSecs( 62 ); | 1078 | dt = cur.addSecs( 62 ); |
1078 | } | 1079 | } |
1079 | else { | 1080 | else { |
1080 | bool ok; | 1081 | bool ok; |
1081 | dt = incidence->getNextOccurence( cur, &ok ); | 1082 | dt = incidence->getNextOccurence( cur, &ok ); |
1082 | if ( !ok ) | 1083 | if ( !ok ) |
1083 | dt = cur.addSecs( -62 ); | 1084 | dt = cur.addSecs( -62 ); |
1084 | } | 1085 | } |
1085 | if ( dt < cur || dt > end ) { | 1086 | if ( dt < cur || dt > end ) { |
1086 | add = false; | 1087 | add = false; |
1087 | } | 1088 | } |
1088 | } | 1089 | } |
1089 | if ( add ) { | 1090 | if ( add ) { |
1090 | Incidence *in = incidence->clone(); | 1091 | Incidence *in = incidence->clone(); |
1091 | cal->addIncidence( in ); | 1092 | cal->addIncidence( in ); |
1092 | } | 1093 | } |
1093 | } | 1094 | } |
1094 | incidence = delSel.next(); | 1095 | incidence = delSel.next(); |
1095 | } | 1096 | } |
1096 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 1097 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
1097 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 1098 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
1098 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1099 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1099 | 1100 | ||
1100 | setCaption( i18n("Writing to phone...")); | 1101 | setCaption( i18n("Writing to phone...")); |
1101 | if ( PhoneFormat::writeToPhone( cal ) ) | 1102 | if ( PhoneFormat::writeToPhone( cal ) ) |
1102 | setCaption( i18n("Export to phone successful!")); | 1103 | setCaption( i18n("Export to phone successful!")); |
1103 | else | 1104 | else |
1104 | setCaption( i18n("Error exporting to phone!")); | 1105 | setCaption( i18n("Error exporting to phone!")); |
1105 | delete cal; | 1106 | delete cal; |
1106 | } | 1107 | } |
1107 | 1108 | ||
1108 | 1109 | ||
1109 | void MainWindow::setDefaultPreferences() | 1110 | void MainWindow::setDefaultPreferences() |
1110 | { | 1111 | { |
1111 | KOPrefs *p = KOPrefs::instance(); | 1112 | KOPrefs *p = KOPrefs::instance(); |
1112 | 1113 | ||
1113 | p->mCompactDialogs = true; | 1114 | p->mCompactDialogs = true; |
1114 | p->mConfirm = true; | 1115 | p->mConfirm = true; |
1115 | // p->mEnableQuickTodo = false; | 1116 | // p->mEnableQuickTodo = false; |
1116 | 1117 | ||
1117 | } | 1118 | } |
1118 | 1119 | ||
1119 | QString MainWindow::resourcePath() | 1120 | QString MainWindow::resourcePath() |
1120 | { | 1121 | { |
1121 | return KGlobal::iconLoader()->iconPath(); | 1122 | return KGlobal::iconLoader()->iconPath(); |
1122 | } | 1123 | } |
1123 | 1124 | ||
1124 | void MainWindow::displayText( QString text ,QString cap ) | 1125 | void MainWindow::displayText( QString text ,QString cap ) |
1125 | { | 1126 | { |
1126 | QDialog dia( this, "name", true ); ; | 1127 | QDialog dia( this, "name", true ); ; |
1127 | dia.setCaption( cap ); | 1128 | dia.setCaption( cap ); |
1128 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 1129 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
1129 | lay->setSpacing( 3 ); | 1130 | lay->setSpacing( 3 ); |
1130 | lay->setMargin( 3 ); | 1131 | lay->setMargin( 3 ); |
1131 | QTextBrowser tb ( &dia ); | 1132 | QTextBrowser tb ( &dia ); |
1132 | lay->addWidget( &tb ); | 1133 | lay->addWidget( &tb ); |
1133 | tb.setText( text ); | 1134 | tb.setText( text ); |
1134 | #ifdef DESKTOP_VERSION | 1135 | #ifdef DESKTOP_VERSION |
1135 | dia.resize( 640, 480); | 1136 | dia.resize( 640, 480); |
1136 | #else | 1137 | #else |
1137 | dia.showMaximized(); | 1138 | dia.showMaximized(); |
1138 | #endif | 1139 | #endif |
1139 | dia.exec(); | 1140 | dia.exec(); |
1140 | } | 1141 | } |
1141 | void MainWindow::displayFile( QString fn, QString cap ) | ||
1142 | { | ||
1143 | QString fileName = resourcePath() + fn; | ||
1144 | QString text; | ||
1145 | QFile file( fileName ); | ||
1146 | if (!file.open( IO_ReadOnly ) ) { | ||
1147 | return ; | ||
1148 | 1142 | ||
1149 | } | ||
1150 | QTextStream ts( &file ); | ||
1151 | text = ts.read(); | ||
1152 | file.close(); | ||
1153 | displayText( text, cap); | ||
1154 | } | ||
1155 | void MainWindow::features() | 1143 | void MainWindow::features() |
1156 | { | 1144 | { |
1157 | 1145 | ||
1158 | displayFile( "featuresKOPI.txt",i18n("KO/Pi Features and hints") ); | 1146 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); |
1159 | } | 1147 | } |
1160 | 1148 | ||
1161 | void MainWindow::usertrans() | 1149 | void MainWindow::usertrans() |
1162 | { | 1150 | { |
1163 | 1151 | ||
1164 | displayFile( "usertranslationHOWTO.txt",i18n("KO/Pi User translation HowTo") ); | 1152 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); |
1165 | } | 1153 | } |
1166 | 1154 | ||
1167 | void MainWindow::kdesynchowto() | 1155 | void MainWindow::kdesynchowto() |
1168 | { | 1156 | { |
1169 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 1157 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
1170 | } | 1158 | } |
1171 | void MainWindow::multisynchowto() | 1159 | void MainWindow::multisynchowto() |
1172 | { | 1160 | { |
1173 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 1161 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
1174 | } | 1162 | } |
1175 | void MainWindow::synchowto() | 1163 | void MainWindow::synchowto() |
1176 | { | 1164 | { |
1177 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 1165 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
1178 | } | 1166 | } |
1179 | void MainWindow::faq() | 1167 | void MainWindow::faq() |
1180 | { | 1168 | { |
1181 | displayFile( "kopiFAQ.txt",i18n("KO/Pi FAQ") ); | 1169 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); |
1182 | 1170 | ||
1183 | } | 1171 | } |
1184 | void MainWindow::whatsNew() | 1172 | void MainWindow::whatsNew() |
1185 | { | 1173 | { |
1186 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 1174 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
1187 | 1175 | ||
1188 | } | 1176 | } |
1189 | void MainWindow::licence() | 1177 | void MainWindow::licence() |
1190 | { | 1178 | { |
1191 | KApplication::showLicence(); | 1179 | KApplication::showLicence(); |
1192 | 1180 | ||
1193 | } | 1181 | } |
1194 | void MainWindow::about() | 1182 | void MainWindow::about() |
1195 | { | 1183 | { |
1196 | QString version; | 1184 | QString version; |
1197 | #include <../version> | 1185 | #include <../version> |
1198 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), | 1186 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), |
1199 | i18n("KOrganizer/Platform-independent\n") + | 1187 | i18n("KOrganizer/Platform-independent\n") + |
1200 | "(KO/Pi) " + version + " - " + | 1188 | "(KO/Pi) " + version + " - " + |
1201 | 1189 | ||
1202 | #ifdef DESKTOP_VERSION | 1190 | #ifdef DESKTOP_VERSION |
1203 | i18n("Desktop Edition\n") + | 1191 | i18n("Desktop Edition\n") + |
1204 | #else | 1192 | #else |
1205 | i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + | 1193 | i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + |
1206 | #endif | 1194 | #endif |
1207 | i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); | 1195 | i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); |
1208 | } | 1196 | } |
1209 | void MainWindow::keyBindings() | 1197 | void MainWindow::keyBindings() |
1210 | { | 1198 | { |
1211 | QString cap = i18n("Key bindings KOrganizer/Pi"); | 1199 | QString cap = i18n("KO/Pi Keys + Colors"); |
1212 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1200 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1213 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1201 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1214 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1202 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1215 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1203 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1216 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1204 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ |
1217 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1205 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1218 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1206 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1219 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ | 1207 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ |
1220 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1208 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1221 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1209 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1222 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1210 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1223 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1211 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1224 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1212 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1225 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ | 1213 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ |
1226 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1214 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1227 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1215 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1228 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1216 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1229 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1217 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1230 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1218 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1231 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1219 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1232 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1220 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1233 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1221 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1234 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1222 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1235 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1223 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1236 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | 1224 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ |
1237 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | 1225 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ |
1238 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | 1226 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ |
1239 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1227 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1240 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1228 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1241 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1229 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1242 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1230 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1243 | i18n("<p><h3>In list view:</h3></p>\n") + | 1231 | i18n("<p><h3>In list view:</h3></p>\n") + |
1244 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1232 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1245 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1233 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1246 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1234 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1247 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1235 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1248 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1236 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1249 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1237 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1250 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1238 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1251 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1239 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1252 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1240 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1253 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1241 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1254 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1242 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
1255 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1243 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1256 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1244 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1257 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1245 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1258 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1246 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1259 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1247 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
1260 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ | 1248 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ |
1261 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + | 1249 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + |
1262 | i18n("<p><b>White</b>: Item readonly</p>\n"); | 1250 | i18n("<p><b>White</b>: Item readonly</p>\n"); |
1263 | displayText( text, cap); | 1251 | displayText( text, cap); |
1264 | |||
1265 | } | 1252 | } |
1266 | void MainWindow::aboutAutoSaving() | 1253 | void MainWindow::aboutAutoSaving() |
1267 | { | 1254 | { |
1268 | QMessageBox* msg; | 1255 | QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); |
1269 | msg = new QMessageBox( i18n("Auto Saving in KOrganizer/Pi"), | 1256 | |
1270 | i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"), QMessageBox::NoIcon, | 1257 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); |
1271 | QMessageBox::Ok, | ||
1272 | QMessageBox::NoButton, | ||
1273 | QMessageBox::NoButton); | ||
1274 | msg->exec(); | ||
1275 | delete msg; | ||
1276 | |||
1277 | 1258 | ||
1278 | } | 1259 | } |
1279 | void MainWindow::aboutKnownBugs() | 1260 | void MainWindow::aboutKnownBugs() |
1280 | { | 1261 | { |
1281 | QMessageBox* msg; | 1262 | QMessageBox* msg; |
1282 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), | 1263 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), |
1283 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ | 1264 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ |
1284 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1265 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1285 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + | 1266 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + |
1286 | i18n("\nor report them in the bugtracker on\n") + | 1267 | i18n("\nor report them in the bugtracker on\n") + |
1287 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), | 1268 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), |
1288 | QMessageBox::NoIcon, | 1269 | QMessageBox::NoIcon, |
1289 | QMessageBox::Ok, | 1270 | QMessageBox::Ok, |
1290 | QMessageBox::NoButton, | 1271 | QMessageBox::NoButton, |
1291 | QMessageBox::NoButton); | 1272 | QMessageBox::NoButton); |
1292 | msg->exec(); | 1273 | msg->exec(); |
1293 | delete msg; | 1274 | delete msg; |
1294 | 1275 | ||
1295 | } | 1276 | } |
1296 | 1277 | ||
1297 | QString MainWindow::defaultFileName() | 1278 | QString MainWindow::defaultFileName() |
1298 | { | 1279 | { |
1299 | return locateLocal( "data", "korganizer/mycalendar.ics" ); | 1280 | return locateLocal( "data", "korganizer/mycalendar.ics" ); |
1300 | } | 1281 | } |
1301 | QString MainWindow::syncFileName() | 1282 | QString MainWindow::syncFileName() |
1302 | { | 1283 | { |
1303 | #ifdef DESKTOP_VERSION | 1284 | #ifdef DESKTOP_VERSION |
1304 | return locateLocal( "tmp", "synccalendar.ics" ); | 1285 | return locateLocal( "tmp", "synccalendar.ics" ); |
1305 | #else | 1286 | #else |
1306 | return QString( "/tmp/synccalendar.ics" ); | 1287 | return QString( "/tmp/synccalendar.ics" ); |
1307 | #endif | 1288 | #endif |
1308 | } | 1289 | } |
1309 | 1290 | ||
1310 | void MainWindow::processIncidenceSelection( Incidence *incidence ) | 1291 | void MainWindow::processIncidenceSelection( Incidence *incidence ) |
1311 | { | 1292 | { |
1312 | if ( !incidence ) { | 1293 | if ( !incidence ) { |
1313 | enableIncidenceActions( false ); | 1294 | enableIncidenceActions( false ); |
1314 | 1295 | ||
1315 | mNewSubTodoAction->setEnabled( false ); | 1296 | mNewSubTodoAction->setEnabled( false ); |
1316 | setCaptionToDates(); | 1297 | setCaptionToDates(); |
1317 | return; | 1298 | return; |
1318 | 1299 | ||
1319 | } | 1300 | } |
1320 | 1301 | ||
1321 | //KGlobal::locale()->formatDateTime(nextA, true); | 1302 | //KGlobal::locale()->formatDateTime(nextA, true); |
1322 | QString startString = ""; | 1303 | QString startString = ""; |
1323 | if ( incidence->type() != "Todo" ) { | 1304 | if ( incidence->type() != "Todo" ) { |
1324 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { | 1305 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { |
1325 | if ( incidence->doesFloat() ) { | 1306 | if ( incidence->doesFloat() ) { |
1326 | startString += ": "+incidence->dtStartDateStr( true ); | 1307 | startString += ": "+incidence->dtStartDateStr( true ); |
1327 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); | 1308 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); |
1328 | 1309 | ||
1329 | } else { | 1310 | } else { |
1330 | startString = ": "+incidence->dtStartStr(true); | 1311 | startString = ": "+incidence->dtStartStr(true); |
1331 | startString += " --- "+((Event*)incidence)->dtEndStr(true); | 1312 | startString += " --- "+((Event*)incidence)->dtEndStr(true); |
1332 | 1313 | ||
1333 | } | 1314 | } |
1334 | 1315 | ||
1335 | } else { | 1316 | } else { |
1336 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) | 1317 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) |
1337 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ | 1318 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ |
1338 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); | 1319 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); |
1339 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); | 1320 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); |
1340 | } | 1321 | } |
1341 | 1322 | ||
1342 | } | 1323 | } |
1343 | else | 1324 | else |
1344 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); | 1325 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); |
1345 | if ( !incidence->location().isEmpty() ) | 1326 | if ( !incidence->location().isEmpty() ) |
1346 | startString += " (" +incidence->location()+")"; | 1327 | startString += " (" +incidence->location()+")"; |
1347 | setCaption( incidence->summary()+startString); | 1328 | setCaption( incidence->summary()+startString); |
1348 | 1329 | ||
1349 | enableIncidenceActions( true ); | 1330 | enableIncidenceActions( true ); |
1350 | 1331 | ||
1351 | if ( incidence->type() == "Event" ) { | 1332 | if ( incidence->type() == "Event" ) { |
1352 | mShowAction->setText( i18n("Show Event...") ); | 1333 | mShowAction->setText( i18n("Show Event...") ); |
1353 | mEditAction->setText( i18n("Edit Event...") ); | 1334 | mEditAction->setText( i18n("Edit Event...") ); |
1354 | mDeleteAction->setText( i18n("Delete Event...") ); | 1335 | mDeleteAction->setText( i18n("Delete Event...") ); |
1355 | 1336 | ||
1356 | mNewSubTodoAction->setEnabled( false ); | 1337 | mNewSubTodoAction->setEnabled( false ); |
1357 | } else if ( incidence->type() == "Todo" ) { | 1338 | } else if ( incidence->type() == "Todo" ) { |
1358 | mShowAction->setText( i18n("Show Todo...") ); | 1339 | mShowAction->setText( i18n("Show Todo...") ); |
1359 | mEditAction->setText( i18n("Edit Todo...") ); | 1340 | mEditAction->setText( i18n("Edit Todo...") ); |
1360 | mDeleteAction->setText( i18n("Delete Todo...") ); | 1341 | mDeleteAction->setText( i18n("Delete Todo...") ); |
1361 | 1342 | ||
1362 | mNewSubTodoAction->setEnabled( true ); | 1343 | mNewSubTodoAction->setEnabled( true ); |
1363 | } else { | 1344 | } else { |
1364 | mShowAction->setText( i18n("Show...") ); | 1345 | mShowAction->setText( i18n("Show...") ); |
1365 | mShowAction->setText( i18n("Edit...") ); | 1346 | mShowAction->setText( i18n("Edit...") ); |
1366 | mShowAction->setText( i18n("Delete...") ); | 1347 | mShowAction->setText( i18n("Delete...") ); |
1367 | 1348 | ||
1368 | mNewSubTodoAction->setEnabled( false ); | 1349 | mNewSubTodoAction->setEnabled( false ); |
1369 | } | 1350 | } |
1370 | } | 1351 | } |
1371 | 1352 | ||
1372 | void MainWindow::enableIncidenceActions( bool enabled ) | 1353 | void MainWindow::enableIncidenceActions( bool enabled ) |
1373 | { | 1354 | { |
1374 | mShowAction->setEnabled( enabled ); | 1355 | mShowAction->setEnabled( enabled ); |
1375 | mEditAction->setEnabled( enabled ); | 1356 | mEditAction->setEnabled( enabled ); |
1376 | mDeleteAction->setEnabled( enabled ); | 1357 | mDeleteAction->setEnabled( enabled ); |
1377 | 1358 | ||
1378 | mCloneAction->setEnabled( enabled ); | 1359 | mCloneAction->setEnabled( enabled ); |
1379 | mMoveAction->setEnabled( enabled ); | 1360 | mMoveAction->setEnabled( enabled ); |
1380 | mBeamAction->setEnabled( enabled ); | 1361 | mBeamAction->setEnabled( enabled ); |
1381 | mCancelAction->setEnabled( enabled ); | 1362 | mCancelAction->setEnabled( enabled ); |
1382 | } | 1363 | } |
1383 | 1364 | ||
1384 | void MainWindow::importOL() | 1365 | void MainWindow::importOL() |
1385 | { | 1366 | { |
1386 | #ifdef _WIN32_ | 1367 | #ifdef _WIN32_ |
1387 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); | 1368 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); |
1388 | id->exec(); | 1369 | id->exec(); |
1389 | delete id; | 1370 | delete id; |
1390 | mView->updateView(); | 1371 | mView->updateView(); |
1391 | #endif | 1372 | #endif |
1392 | } | 1373 | } |
1393 | void MainWindow::importBday() | 1374 | void MainWindow::importBday() |
1394 | { | 1375 | { |
1395 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1376 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1396 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), | 1377 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), |
1397 | i18n("Import!"), i18n("Cancel"), 0, | 1378 | i18n("Import!"), i18n("Cancel"), 0, |
1398 | 0, 1 ); | 1379 | 0, 1 ); |
1399 | if ( result == 0 ) { | 1380 | if ( result == 0 ) { |
1400 | mView->importBday(); | 1381 | mView->importBday(); |
1401 | 1382 | ||
1402 | } | 1383 | } |
1403 | 1384 | ||
1404 | 1385 | ||
1405 | } | 1386 | } |
1406 | void MainWindow::importQtopia() | 1387 | void MainWindow::importQtopia() |
1407 | { | 1388 | { |
1408 | #ifndef DESKTOP_VERSION | 1389 | #ifndef DESKTOP_VERSION |
1409 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1390 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1410 | i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"), | 1391 | i18n("When importing a calendar twice\nduplicated events will be ignored!\nYou can create a backup file with\nFile - Save Calendar Backup\nto revert importing"), |
1411 | i18n("Import!"), i18n("Cancel"), 0, | 1392 | i18n("Import!"), i18n("Cancel"), 0, |
1412 | 0, 1 ); | 1393 | 0, 1 ); |
1413 | if ( result == 0 ) { | 1394 | if ( result == 0 ) { |
1414 | QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); | 1395 | QString datebook = Global::applicationFileName( "datebook", "datebook.xml"); |
1415 | QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); | 1396 | QString todolist = Global::applicationFileName( "todolist", "todolist.xml"); |
1416 | QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; | 1397 | QString categories = QString( getenv( "HOME" ) ) + "/Settings/Categories.xml"; |
1417 | mView->importQtopia( categories, datebook, todolist ); | 1398 | mView->importQtopia( categories, datebook, todolist ); |
1418 | } | 1399 | } |
1419 | #else | 1400 | #else |
1420 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1401 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1421 | i18n("Not supported \non desktop!\n"), | 1402 | i18n("Not supported \non desktop!\n"), |
1422 | i18n("Ok"), i18n("Cancel"), 0, | 1403 | i18n("Ok"), i18n("Cancel"), 0, |
1423 | 0, 1 ); | 1404 | 0, 1 ); |
1424 | 1405 | ||
1425 | #endif | 1406 | #endif |
1426 | } | 1407 | } |
1427 | 1408 | ||
1428 | void MainWindow::saveOnClose() | 1409 | void MainWindow::saveOnClose() |
1429 | { | 1410 | { |
1430 | KOPrefs *p = KOPrefs::instance(); | 1411 | KOPrefs *p = KOPrefs::instance(); |
1431 | p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); | 1412 | p->mToolBarHor = ( iconToolBar->orientation () == Qt:: Horizontal ); |
1432 | p->mToolBarUp = iconToolBar->x() > width()/2 || | 1413 | p->mToolBarUp = iconToolBar->x() > width()/2 || |
1433 | iconToolBar->y() > height()/2; | 1414 | iconToolBar->y() > height()/2; |
1434 | mView->writeSettings(); | 1415 | mView->writeSettings(); |
1435 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) | 1416 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) |
1436 | save(); | 1417 | save(); |
1437 | } | 1418 | } |
1438 | void MainWindow::slotModifiedChanged( bool changed ) | 1419 | void MainWindow::slotModifiedChanged( bool changed ) |
1439 | { | 1420 | { |
1440 | if ( mBlockAtStartup ) | 1421 | if ( mBlockAtStartup ) |
1441 | return; | 1422 | return; |
1442 | int msec; | 1423 | int msec; |
1443 | // we store the changes after 1 minute, | 1424 | // we store the changes after 1 minute, |
1444 | // and for safety reasons after 10 minutes again | 1425 | // and for safety reasons after 10 minutes again |
1445 | if ( !mSyncManager->blockSave() ) | 1426 | if ( !mSyncManager->blockSave() ) |
1446 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; | 1427 | msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; |
1447 | else | 1428 | else |
1448 | msec = 1000 * 600; | 1429 | msec = 1000 * 600; |
1449 | mSaveTimer.start( msec, true ); // 1 minute | 1430 | mSaveTimer.start( msec, true ); // 1 minute |
1450 | qDebug("KO: Saving File in %d secs!", msec/1000); | 1431 | qDebug("KO: Saving File in %d secs!", msec/1000); |
1451 | mCalendarModifiedFlag = true; | 1432 | mCalendarModifiedFlag = true; |
1452 | } | 1433 | } |
1453 | void MainWindow::save() | 1434 | void MainWindow::save() |
1454 | { | 1435 | { |
1455 | if ( mSyncManager->blockSave() ) | 1436 | if ( mSyncManager->blockSave() ) |
1456 | return; | 1437 | return; |
1457 | mSyncManager->setBlockSave(true); | 1438 | mSyncManager->setBlockSave(true); |
1458 | if ( mView->checkFileVersion( defaultFileName()) ) { | 1439 | if ( mView->checkFileVersion( defaultFileName()) ) { |
1459 | 1440 | ||
1460 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 1441 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
1461 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); | 1442 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); |
1462 | qDebug("KO: Start saving data to file!"); | 1443 | qDebug("KO: Start saving data to file!"); |
1463 | mView->saveCalendar( defaultFileName() ); | 1444 | mView->saveCalendar( defaultFileName() ); |
1464 | 1445 | ||
1465 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 1446 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
1466 | qDebug("KO: Needed %d ms for saving.",msNeeded ); | 1447 | qDebug("KO: Needed %d ms for saving.",msNeeded ); |
1467 | QString savemes; | 1448 | QString savemes; |
1468 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); | 1449 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); |
1469 | setCaption(savemes); | 1450 | setCaption(savemes); |
1470 | } else | 1451 | } else |
1471 | setCaption(i18n("Saving cancelled!")); | 1452 | setCaption(i18n("Saving cancelled!")); |
1472 | mCalendarModifiedFlag = false; | 1453 | mCalendarModifiedFlag = false; |
1473 | mSyncManager->setBlockSave( false ); | 1454 | mSyncManager->setBlockSave( false ); |
1474 | } | 1455 | } |
1475 | 1456 | ||
1476 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) | 1457 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) |
1477 | { | 1458 | { |
1478 | if ( !e->isAutoRepeat() ) { | 1459 | if ( !e->isAutoRepeat() ) { |
1479 | mFlagKeyPressed = false; | 1460 | mFlagKeyPressed = false; |
1480 | } | 1461 | } |
1481 | } | 1462 | } |
1482 | void MainWindow::keyPressEvent ( QKeyEvent * e ) | 1463 | void MainWindow::keyPressEvent ( QKeyEvent * e ) |
1483 | { | 1464 | { |
1484 | qApp->processEvents(); | 1465 | qApp->processEvents(); |
1485 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { | 1466 | if ( e->isAutoRepeat() && !mFlagKeyPressed ) { |
1486 | e->ignore(); | 1467 | e->ignore(); |
1487 | // qDebug(" ignore %d",e->isAutoRepeat() ); | 1468 | // qDebug(" ignore %d",e->isAutoRepeat() ); |
1488 | return; | 1469 | return; |
1489 | } | 1470 | } |
1490 | if (! e->isAutoRepeat() ) | 1471 | if (! e->isAutoRepeat() ) |
1491 | mFlagKeyPressed = true; | 1472 | mFlagKeyPressed = true; |
1492 | KOPrefs *p = KOPrefs::instance(); | 1473 | KOPrefs *p = KOPrefs::instance(); |
1493 | bool showSelectedDates = false; | 1474 | bool showSelectedDates = false; |
1494 | int size; | 1475 | int size; |
1495 | int pro = 0; | 1476 | int pro = 0; |
1496 | //qDebug("MainWindow::keyPressEvent "); | 1477 | //qDebug("MainWindow::keyPressEvent "); |
1497 | switch ( e->key() ) { | 1478 | switch ( e->key() ) { |
1498 | case Qt::Key_Right: | 1479 | case Qt::Key_Right: |
1499 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 1480 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1500 | mView->goNextMonth(); | 1481 | mView->goNextMonth(); |
1501 | else | 1482 | else |
1502 | mView->goNext(); | 1483 | mView->goNext(); |
1503 | showSelectedDates = true; | 1484 | showSelectedDates = true; |
1504 | break; | 1485 | break; |
1505 | case Qt::Key_Left: | 1486 | case Qt::Key_Left: |
1506 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1487 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1507 | mView->goPreviousMonth(); | 1488 | mView->goPreviousMonth(); |
1508 | else | 1489 | else |
1509 | mView->goPrevious(); | 1490 | mView->goPrevious(); |
1510 | showSelectedDates = true; | 1491 | showSelectedDates = true; |
1511 | break; | 1492 | break; |
1512 | case Qt::Key_Down: | 1493 | case Qt::Key_Down: |
1513 | mView->viewManager()->agendaView()->scrollOneHourDown(); | 1494 | mView->viewManager()->agendaView()->scrollOneHourDown(); |
1514 | break; | 1495 | break; |
1515 | case Qt::Key_Up: | 1496 | case Qt::Key_Up: |
1516 | mView->viewManager()->agendaView()->scrollOneHourUp(); | 1497 | mView->viewManager()->agendaView()->scrollOneHourUp(); |
1517 | break; | 1498 | break; |
1518 | case Qt::Key_I: | 1499 | case Qt::Key_I: |
1519 | mView->showIncidence(); | 1500 | mView->showIncidence(); |
1520 | break; | 1501 | break; |
1521 | case Qt::Key_Delete: | 1502 | case Qt::Key_Delete: |
1522 | case Qt::Key_Backspace: | 1503 | case Qt::Key_Backspace: |
1523 | mView->deleteIncidence(); | 1504 | mView->deleteIncidence(); |
1524 | break; | 1505 | break; |
1525 | case Qt::Key_D: | 1506 | case Qt::Key_D: |
1526 | mView->viewManager()->showDayView(); | 1507 | mView->viewManager()->showDayView(); |
1527 | showSelectedDates = true; | 1508 | showSelectedDates = true; |
1528 | break; | 1509 | break; |
1529 | case Qt::Key_O: | 1510 | case Qt::Key_O: |
1530 | mView->toggleFilerEnabled( ); | 1511 | mView->toggleFilerEnabled( ); |
1531 | break; | 1512 | break; |
1532 | case Qt::Key_0: | 1513 | case Qt::Key_0: |
1533 | case Qt::Key_1: | 1514 | case Qt::Key_1: |
1534 | case Qt::Key_2: | 1515 | case Qt::Key_2: |
1535 | case Qt::Key_3: | 1516 | case Qt::Key_3: |
1536 | case Qt::Key_4: | 1517 | case Qt::Key_4: |
1537 | case Qt::Key_5: | 1518 | case Qt::Key_5: |
1538 | case Qt::Key_6: | 1519 | case Qt::Key_6: |
1539 | case Qt::Key_7: | 1520 | case Qt::Key_7: |
1540 | case Qt::Key_8: | 1521 | case Qt::Key_8: |
1541 | case Qt::Key_9: | 1522 | case Qt::Key_9: |
1542 | pro = e->key()-48; | 1523 | pro = e->key()-48; |
1543 | if ( pro == 0 ) | 1524 | if ( pro == 0 ) |
1544 | pro = 10; | 1525 | pro = 10; |
1545 | if ( e->state() == Qt::ControlButton) | 1526 | if ( e->state() == Qt::ControlButton) |
1546 | pro += 10; | 1527 | pro += 10; |
1547 | break; | 1528 | break; |
1548 | case Qt::Key_M: | 1529 | case Qt::Key_M: |
1549 | mView->viewManager()->showMonthView(); | 1530 | mView->viewManager()->showMonthView(); |
1550 | showSelectedDates = true; | 1531 | showSelectedDates = true; |
1551 | break; | 1532 | break; |
1552 | case Qt::Key_Insert: | 1533 | case Qt::Key_Insert: |
1553 | mView->newEvent(); | 1534 | mView->newEvent(); |
1554 | break; | 1535 | break; |
1555 | case Qt::Key_S : | 1536 | case Qt::Key_S : |
1556 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) | 1537 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) |
1557 | mView->newSubTodo(); | 1538 | mView->newSubTodo(); |
1558 | else | 1539 | else |
1559 | mView->dialogManager()->showSearchDialog(); | 1540 | mView->dialogManager()->showSearchDialog(); |
1560 | break; | 1541 | break; |
1561 | case Qt::Key_Y : | 1542 | case Qt::Key_Y : |
1562 | case Qt::Key_Z : | 1543 | case Qt::Key_Z : |
1563 | mView->viewManager()->showWorkWeekView(); | 1544 | mView->viewManager()->showWorkWeekView(); |
1564 | showSelectedDates = true; | 1545 | showSelectedDates = true; |
1565 | break; | 1546 | break; |
1566 | case Qt::Key_U : | 1547 | case Qt::Key_U : |
1567 | mView->viewManager()->showWeekView(); | 1548 | mView->viewManager()->showWeekView(); |
1568 | showSelectedDates = true; | 1549 | showSelectedDates = true; |
1569 | break; | 1550 | break; |
1570 | case Qt::Key_H : | 1551 | case Qt::Key_H : |
1571 | keyBindings(); | 1552 | keyBindings(); |
1572 | break; | 1553 | break; |
1573 | case Qt::Key_W: | 1554 | case Qt::Key_W: |
1574 | mView->viewManager()->showWhatsNextView(); | 1555 | mView->viewManager()->showWhatsNextView(); |
1575 | break; | 1556 | break; |
1576 | case Qt::Key_L: | 1557 | case Qt::Key_L: |
1577 | mView->viewManager()->showListView(); | 1558 | mView->viewManager()->showListView(); |
1578 | break; | 1559 | break; |
1579 | case Qt::Key_N: | 1560 | case Qt::Key_N: |
1580 | mView->viewManager()->showNextXView(); | 1561 | mView->viewManager()->showNextXView(); |
1581 | showSelectedDates = true; | 1562 | showSelectedDates = true; |
1582 | break; | 1563 | break; |
1583 | case Qt::Key_V: | 1564 | case Qt::Key_V: |
1584 | mView->viewManager()->showTodoView(); | 1565 | mView->viewManager()->showTodoView(); |
1585 | break; | 1566 | break; |
1586 | case Qt::Key_C: | 1567 | case Qt::Key_C: |
1587 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); | 1568 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); |
1588 | break; | 1569 | break; |
1589 | case Qt::Key_P: | 1570 | case Qt::Key_P: |
1590 | mView->showDatePicker( ); | 1571 | mView->showDatePicker( ); |
1591 | break; | 1572 | break; |
1592 | case Qt::Key_F: | 1573 | case Qt::Key_F: |
1593 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1574 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1594 | mView->editFilters(); | 1575 | mView->editFilters(); |
1595 | else | 1576 | else |
1596 | mView->toggleFilter(); | 1577 | mView->toggleFilter(); |
1597 | break; | 1578 | break; |
1598 | case Qt::Key_X: | 1579 | case Qt::Key_X: |
1599 | mView->toggleDateNavigatorWidget(); | 1580 | mView->toggleDateNavigatorWidget(); |
1600 | break; | 1581 | break; |
1601 | case Qt::Key_Space: | 1582 | case Qt::Key_Space: |
1602 | mView->toggleExpand(); | 1583 | mView->toggleExpand(); |
1603 | break; | 1584 | break; |
1604 | case Qt::Key_A: | 1585 | case Qt::Key_A: |
1605 | mView->toggleAllDaySize(); | 1586 | mView->toggleAllDaySize(); |
1606 | break; | 1587 | break; |
1607 | case Qt::Key_T: | 1588 | case Qt::Key_T: |
1608 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1589 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1609 | mView->newTodo(); | 1590 | mView->newTodo(); |
1610 | else { | 1591 | else { |
1611 | mView->goToday(); | 1592 | mView->goToday(); |
1612 | showSelectedDates = true; | 1593 | showSelectedDates = true; |
1613 | } | 1594 | } |
1614 | break; | 1595 | break; |
1615 | case Qt::Key_J: | 1596 | case Qt::Key_J: |
1616 | mView->viewManager()->showJournalView(); | 1597 | mView->viewManager()->showJournalView(); |
1617 | break; | 1598 | break; |
1618 | case Qt::Key_B: | 1599 | case Qt::Key_B: |
1619 | mView->editIncidenceDescription();; | 1600 | mView->editIncidenceDescription();; |
1620 | break; | 1601 | break; |
1621 | // case Qt::Key_Return: | 1602 | // case Qt::Key_Return: |
1622 | case Qt::Key_E: | 1603 | case Qt::Key_E: |
1623 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1604 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
1624 | mView->newEvent(); | 1605 | mView->newEvent(); |
1625 | else | 1606 | else |
1626 | mView->editIncidence(); | 1607 | mView->editIncidence(); |
1627 | break; | 1608 | break; |
1628 | case Qt::Key_Plus: | 1609 | case Qt::Key_Plus: |
1629 | size = p->mHourSize +2; | 1610 | size = p->mHourSize +2; |
1630 | if ( size <= 18 ) | 1611 | if ( size <= 18 ) |
1631 | configureAgenda( size ); | 1612 | configureAgenda( size ); |
1632 | break; | 1613 | break; |
1633 | case Qt::Key_Minus: | 1614 | case Qt::Key_Minus: |
1634 | size = p->mHourSize - 2; | 1615 | size = p->mHourSize - 2; |
1635 | if ( size >= 4 ) | 1616 | if ( size >= 4 ) |
1636 | configureAgenda( size ); | 1617 | configureAgenda( size ); |
1637 | break; | 1618 | break; |
1638 | 1619 | ||
1639 | 1620 | ||
1640 | default: | 1621 | default: |
1641 | e->ignore(); | 1622 | e->ignore(); |
1642 | } | 1623 | } |
1643 | if ( pro > 0 ) { | 1624 | if ( pro > 0 ) { |
1644 | mView->selectFilter( pro-1 ); | 1625 | mView->selectFilter( pro-1 ); |
1645 | } | 1626 | } |
1646 | if ( showSelectedDates ) { | 1627 | if ( showSelectedDates ) { |
1647 | ;// setCaptionToDates(); | 1628 | ;// setCaptionToDates(); |
1648 | } | 1629 | } |
1649 | 1630 | ||
1650 | } | 1631 | } |
1651 | 1632 | ||
1652 | void MainWindow::fillFilterMenu() | 1633 | void MainWindow::fillFilterMenu() |
1653 | { | 1634 | { |
1654 | selectFilterMenu->clear(); | 1635 | selectFilterMenu->clear(); |
1655 | bool disable = false; | 1636 | bool disable = false; |
1656 | if ( mView->filterView()->filtersEnabled() ) { | 1637 | if ( mView->filterView()->filtersEnabled() ) { |
1657 | selectFilterMenu->insertItem(i18n ( "Turn filter off" ), 0 ); | 1638 | selectFilterMenu->insertItem(i18n ( "Turn filter off" ), 0 ); |
1658 | } | 1639 | } |
1659 | else { | 1640 | else { |
1660 | selectFilterMenu->insertItem(i18n ( "Turn filter on" ), 0 ); | 1641 | selectFilterMenu->insertItem(i18n ( "Turn filter on" ), 0 ); |
1661 | disable = true; | 1642 | disable = true; |
1662 | } | 1643 | } |
1663 | selectFilterMenu->insertSeparator(); | 1644 | selectFilterMenu->insertSeparator(); |
1664 | QPtrList<CalFilter> fili = mView->filters(); | 1645 | QPtrList<CalFilter> fili = mView->filters(); |
1665 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 1646 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
1666 | CalFilter *filter = fili.first(); | 1647 | CalFilter *filter = fili.first(); |
1667 | int iii = 1; | 1648 | int iii = 1; |
1668 | while(filter) { | 1649 | while(filter) { |
1669 | selectFilterMenu->insertItem( filter->name(), iii ); | 1650 | selectFilterMenu->insertItem( filter->name(), iii ); |
1670 | if ( filter == curfilter) | 1651 | if ( filter == curfilter) |
1671 | selectFilterMenu->setItemChecked( iii, true ); | 1652 | selectFilterMenu->setItemChecked( iii, true ); |
1672 | if ( disable ) | 1653 | if ( disable ) |
1673 | selectFilterMenu->setItemEnabled( iii, false ); | 1654 | selectFilterMenu->setItemEnabled( iii, false ); |
1674 | filter = fili.next(); | 1655 | filter = fili.next(); |
1675 | ++iii; | 1656 | ++iii; |
1676 | } | 1657 | } |
1677 | } | 1658 | } |
1678 | void MainWindow::selectFilter( int fil ) | 1659 | void MainWindow::selectFilter( int fil ) |
1679 | { | 1660 | { |
1680 | if ( fil == 0 ) { | 1661 | if ( fil == 0 ) { |
1681 | mView->toggleFilerEnabled( ); | 1662 | mView->toggleFilerEnabled( ); |
1682 | } else { | 1663 | } else { |
1683 | mView->selectFilter( fil-1 ); | 1664 | mView->selectFilter( fil-1 ); |
1684 | } | 1665 | } |
1685 | } | 1666 | } |
1686 | void MainWindow::configureToolBar( int item ) | 1667 | void MainWindow::configureToolBar( int item ) |
1687 | { | 1668 | { |
1688 | 1669 | ||
1689 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); | 1670 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); |
1690 | KOPrefs *p = KOPrefs::instance(); | 1671 | KOPrefs *p = KOPrefs::instance(); |
1691 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); | 1672 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); |
1692 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); | 1673 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); |
1693 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); | 1674 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); |
1694 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); | 1675 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); |
1695 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); | 1676 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); |
1696 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); | 1677 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); |
1697 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); | 1678 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); |
1698 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); | 1679 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); |
1699 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); | 1680 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); |
1700 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); | 1681 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); |
1701 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); | 1682 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); |
1702 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); | 1683 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); |
1703 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); | 1684 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); |
1704 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); | 1685 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); |
1705 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); | 1686 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); |
1706 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); | 1687 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); |
1707 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); | 1688 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); |
1708 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); | 1689 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); |
1709 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); | 1690 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); |
1710 | // initActions(); | 1691 | // initActions(); |
1711 | } | 1692 | } |
1712 | 1693 | ||
1713 | void MainWindow::setCaptionToDates() | 1694 | void MainWindow::setCaptionToDates() |
1714 | { | 1695 | { |
1715 | QString selDates; | 1696 | QString selDates; |
1716 | selDates = KGlobal::locale()->formatDate(mView->startDate(), true); | 1697 | selDates = KGlobal::locale()->formatDate(mView->startDate(), true); |
1717 | if (mView->startDate() < mView->endDate() ) | 1698 | if (mView->startDate() < mView->endDate() ) |
1718 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); | 1699 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); |
1719 | setCaption( i18n("Dates: ") + selDates ); | 1700 | setCaption( i18n("Dates: ") + selDates ); |
1720 | 1701 | ||
1721 | } | 1702 | } |
1722 | // parameter item == 0: reinit | 1703 | // parameter item == 0: reinit |
1723 | void MainWindow::configureAgenda( int item ) | 1704 | void MainWindow::configureAgenda( int item ) |
1724 | { | 1705 | { |
1725 | 1706 | ||
1726 | KOPrefs *p = KOPrefs::instance(); | 1707 | KOPrefs *p = KOPrefs::instance(); |
1727 | 1708 | ||
1728 | int i; | 1709 | int i; |
1729 | if ( item == 1 ) { | ||
1730 | mView->toggleAllDaySize(); | ||
1731 | return; | ||
1732 | } | ||
1733 | // do not allow 4 for widgets higher than 480 | 1710 | // do not allow 4 for widgets higher than 480 |
1734 | // if ( QApplication::desktop()->height() > 480 ) { | 1711 | // if ( QApplication::desktop()->height() > 480 ) { |
1735 | // if ( item == 4 ) | 1712 | // if ( item == 4 ) |
1736 | // item = 6; | 1713 | // item = 6; |
1737 | // } | 1714 | // } |
1738 | for ( i = 4; i <= 18; i= i+2 ) | 1715 | for ( i = 4; i <= 18; i= i+2 ) |
1739 | configureAgendaMenu->setItemChecked( i, false ); | 1716 | configureAgendaMenu->setItemChecked( i, false ); |
1740 | configureAgendaMenu->setItemChecked( item, true ); | 1717 | configureAgendaMenu->setItemChecked( item, true ); |
1741 | if ( p->mHourSize == item ) | 1718 | if ( p->mHourSize == item ) |
1742 | return; | 1719 | return; |
1743 | p->mHourSize=item; | 1720 | p->mHourSize=item; |
1744 | mView->viewManager()->agendaView()->updateConfig(); | 1721 | mView->viewManager()->agendaView()->updateConfig(); |
1745 | } | 1722 | } |
1746 | 1723 | ||
1747 | void MainWindow::saveCalendar() | 1724 | void MainWindow::saveCalendar() |
1748 | { | 1725 | { |
1749 | QString fn = KOPrefs::instance()->mLastSaveFile; | 1726 | QString fn = KOPrefs::instance()->mLastSaveFile; |
1750 | fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); | 1727 | fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); |
1751 | 1728 | ||
1752 | if ( fn == "" ) | 1729 | if ( fn == "" ) |
1753 | return; | 1730 | return; |
1754 | QFileInfo info; | 1731 | QFileInfo info; |
1755 | info.setFile( fn ); | 1732 | info.setFile( fn ); |
1756 | QString mes; | 1733 | QString mes; |
1757 | bool createbup = true; | 1734 | bool createbup = true; |
1758 | if ( info. exists() ) { | 1735 | if ( info. exists() ) { |
1759 | mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; | 1736 | mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; |
1760 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 1737 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
1761 | i18n("Overwrite!"), i18n("Cancel"), 0, | 1738 | i18n("Overwrite!"), i18n("Cancel"), 0, |
1762 | 0, 1 ); | 1739 | 0, 1 ); |
1763 | if ( result != 0 ) { | 1740 | if ( result != 0 ) { |
1764 | createbup = false; | 1741 | createbup = false; |
1765 | } | 1742 | } |
1766 | } | 1743 | } |
1767 | if ( createbup ) { | 1744 | if ( createbup ) { |
1768 | mView->saveCalendar( fn ); | 1745 | mView->saveCalendar( fn ); |
1769 | mes = i18n("KO/Pi:Saved %1").arg(fn); | 1746 | mes = i18n("KO/Pi:Saved %1").arg(fn); |
1770 | KOPrefs::instance()->mLastSaveFile = fn; | 1747 | KOPrefs::instance()->mLastSaveFile = fn; |
1771 | setCaption(mes); | 1748 | setCaption(mes); |
1772 | } | 1749 | } |
1773 | } | 1750 | } |
1774 | void MainWindow::loadCalendar() | 1751 | void MainWindow::loadCalendar() |
1775 | { | 1752 | { |
1776 | 1753 | ||
1777 | QString fn = KOPrefs::instance()->mLastLoadFile; | 1754 | QString fn = KOPrefs::instance()->mLastLoadFile; |
1778 | fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); | 1755 | fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); |
1779 | 1756 | ||
1780 | if ( fn == "" ) | 1757 | if ( fn == "" ) |
1781 | return; | 1758 | return; |
1782 | QFileInfo info; | 1759 | QFileInfo info; |
1783 | info.setFile( fn ); | 1760 | info.setFile( fn ); |
1784 | QString mess; | 1761 | QString mess; |
1785 | bool loadbup = true; | 1762 | bool loadbup = true; |
1786 | if ( info. exists() ) { | 1763 | if ( info. exists() ) { |
1787 | mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); | 1764 | mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); |
1788 | int result = QMessageBox::warning( this, "KO/Pi: Warning!", | 1765 | int result = QMessageBox::warning( this, "KO/Pi: Warning!", |
1789 | mess, | 1766 | mess, |
1790 | i18n("Load!"), i18n("Cancel"), 0, | 1767 | i18n("Load!"), i18n("Cancel"), 0, |
1791 | 0, 1 ); | 1768 | 0, 1 ); |
1792 | if ( result != 0 ) { | 1769 | if ( result != 0 ) { |
1793 | loadbup = false; | 1770 | loadbup = false; |
1794 | } | 1771 | } |
1795 | } else { | 1772 | } else { |
1796 | QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1773 | QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1797 | i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, | 1774 | i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, |
1798 | 0, 1 ); | 1775 | 0, 1 ); |
1799 | 1776 | ||
1800 | return; | 1777 | return; |
1801 | } | 1778 | } |
1802 | if ( loadbup ) { | 1779 | if ( loadbup ) { |
1803 | mView->openCalendar( fn ); | 1780 | mView->openCalendar( fn ); |
1804 | KOPrefs::instance()->mLastLoadFile = fn; | 1781 | KOPrefs::instance()->mLastLoadFile = fn; |
1805 | mess = i18n("KO/Pi:Loaded %1").arg(fn) ; | 1782 | mess = i18n("KO/Pi:Loaded %1").arg(fn) ; |
1806 | setCaption(mess); | 1783 | setCaption(mess); |
1807 | } | 1784 | } |
1808 | 1785 | ||
1809 | } | 1786 | } |
1810 | void MainWindow::quickImportIcal() | 1787 | void MainWindow::quickImportIcal() |
1811 | { | 1788 | { |
1812 | importFile( KOPrefs::instance()->mLastImportFile, false ); | 1789 | importFile( KOPrefs::instance()->mLastImportFile, false ); |
1813 | } | 1790 | } |
1814 | void MainWindow::importFile( QString fn, bool quick ) | 1791 | void MainWindow::importFile( QString fn, bool quick ) |
1815 | { | 1792 | { |
1816 | QFileInfo info; | 1793 | QFileInfo info; |
1817 | info.setFile( fn ); | 1794 | info.setFile( fn ); |
1818 | QString mess; | 1795 | QString mess; |
1819 | bool loadbup = true; | 1796 | bool loadbup = true; |
1820 | if ( !info. exists() ) { | 1797 | if ( !info. exists() ) { |
1821 | mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); | 1798 | mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); |
1822 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1799 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1823 | mess ); | 1800 | mess ); |
1824 | return; | 1801 | return; |
1825 | } | 1802 | } |
1826 | int result = 0; | 1803 | int result = 0; |
1827 | if ( !quick ) { | 1804 | if ( !quick ) { |
1828 | mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); | 1805 | mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); |
1829 | result = QMessageBox::warning( this, "KO/Pi: Warning!", | 1806 | result = QMessageBox::warning( this, "KO/Pi: Warning!", |
1830 | mess, | 1807 | mess, |
1831 | "Import", "Cancel", 0, | 1808 | "Import", "Cancel", 0, |
1832 | 0, 1 ); | 1809 | 0, 1 ); |
1833 | } | 1810 | } |
1834 | if ( result == 0 ) { | 1811 | if ( result == 0 ) { |
1835 | if ( mView->openCalendar( fn, true )) { | 1812 | if ( mView->openCalendar( fn, true )) { |
1836 | KOPrefs::instance()->mLastImportFile = fn; | 1813 | KOPrefs::instance()->mLastImportFile = fn; |
1837 | setCaption(i18n("Imported file successfully")); | 1814 | setCaption(i18n("Imported file successfully")); |
1838 | } else { | 1815 | } else { |
1839 | setCaption(i18n("Error importing file")); | 1816 | setCaption(i18n("Error importing file")); |
1840 | } | 1817 | } |
1841 | } | 1818 | } |
1842 | } | 1819 | } |
1843 | 1820 | ||
1844 | void MainWindow::importIcal() | 1821 | void MainWindow::importIcal() |
1845 | { | 1822 | { |
1846 | 1823 | ||
1847 | QString fn =KOPrefs::instance()->mLastImportFile; | 1824 | QString fn =KOPrefs::instance()->mLastImportFile; |
1848 | 1825 | ||
1849 | fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); | 1826 | fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); |
1850 | if ( fn == "" ) | 1827 | if ( fn == "" ) |
1851 | return; | 1828 | return; |
1852 | importFile( fn, true ); | 1829 | importFile( fn, true ); |
1853 | 1830 | ||
1854 | } | 1831 | } |
1855 | 1832 | ||
1856 | void MainWindow::exportVCalendar() | 1833 | void MainWindow::exportVCalendar() |
1857 | { | 1834 | { |
1858 | QString fn = KOPrefs::instance()->mLastVcalFile; | 1835 | QString fn = KOPrefs::instance()->mLastVcalFile; |
1859 | fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); | 1836 | fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); |
1860 | if ( fn == "" ) | 1837 | if ( fn == "" ) |
1861 | return; | 1838 | return; |
1862 | QFileInfo info; | 1839 | QFileInfo info; |
1863 | info.setFile( fn ); | 1840 | info.setFile( fn ); |
1864 | QString mes; | 1841 | QString mes; |
1865 | bool createbup = true; | 1842 | bool createbup = true; |
1866 | if ( info. exists() ) { | 1843 | if ( info. exists() ) { |
1867 | mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 1844 | mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
1868 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, | 1845 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, |
1869 | i18n("Overwrite!"), i18n("Cancel"), 0, | 1846 | i18n("Overwrite!"), i18n("Cancel"), 0, |
1870 | 0, 1 ); | 1847 | 0, 1 ); |
1871 | if ( result != 0 ) { | 1848 | if ( result != 0 ) { |
1872 | createbup = false; | 1849 | createbup = false; |
1873 | } | 1850 | } |
1874 | } | 1851 | } |
1875 | if ( createbup ) { | 1852 | if ( createbup ) { |
1876 | if ( mView->exportVCalendar( fn ) ) { | 1853 | if ( mView->exportVCalendar( fn ) ) { |
1877 | KOPrefs::instance()->mLastVcalFile = fn; | 1854 | KOPrefs::instance()->mLastVcalFile = fn; |
1878 | if ( fn.length() > 20 ) | 1855 | if ( fn.length() > 20 ) |
1879 | mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; | 1856 | mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; |
1880 | else | 1857 | else |
1881 | mes = i18n("KO/Pi:Exported to %1").arg(fn ); | 1858 | mes = i18n("KO/Pi:Exported to %1").arg(fn ); |
1882 | setCaption(mes); | 1859 | setCaption(mes); |
1883 | } | 1860 | } |
1884 | } | 1861 | } |
1885 | 1862 | ||
1886 | } | 1863 | } |
1887 | 1864 | ||
1888 | void MainWindow::syncFileRequest() | 1865 | void MainWindow::syncFileRequest() |
1889 | { | 1866 | { |
1890 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { | 1867 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { |
1891 | mSyncManager->slotSyncMenu( 999 ); | 1868 | mSyncManager->slotSyncMenu( 999 ); |
1892 | } | 1869 | } |
1893 | save(); | 1870 | save(); |
1894 | } | 1871 | } |
1895 | void MainWindow::getFile( bool success ) | 1872 | void MainWindow::getFile( bool success ) |
1896 | { | 1873 | { |
1897 | if ( ! success ) { | 1874 | if ( ! success ) { |
1898 | setCaption( i18n("Error receiving file. Nothing changed!") ); | 1875 | setCaption( i18n("Error receiving file. Nothing changed!") ); |
1899 | return; | 1876 | return; |
1900 | } | 1877 | } |
1901 | mView->openCalendar( defaultFileName() ); | 1878 | mView->openCalendar( defaultFileName() ); |
1902 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { | 1879 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { |
1903 | mSyncManager->slotSyncMenu( 999 ); | 1880 | mSyncManager->slotSyncMenu( 999 ); |
1904 | } | 1881 | } |
1905 | setCaption( i18n("Pi-Sync successful!") ); | 1882 | setCaption( i18n("Pi-Sync successful!") ); |
1906 | } | 1883 | } |
1907 | 1884 | ||
1908 | void MainWindow::printSel( ) | 1885 | void MainWindow::printSel( ) |
1909 | { | 1886 | { |
1910 | mView->viewManager()->agendaView()->agenda()->printSelection(); | 1887 | mView->viewManager()->agendaView()->agenda()->printSelection(); |
1911 | } | 1888 | } |
1912 | 1889 | ||
1913 | void MainWindow::printCal() | 1890 | void MainWindow::printCal() |
1914 | { | 1891 | { |
1915 | mView->print();//mCp->showDialog(); | 1892 | mView->print();//mCp->showDialog(); |
1916 | } | 1893 | } |
1917 | 1894 | ||
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index ed65d36..96e627e 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -1,140 +1,139 @@ | |||
1 | #ifndef KORGE_MAINWINDOW_H | 1 | #ifndef KORGE_MAINWINDOW_H |
2 | #define KORGE_MAINWINDOW_H | 2 | #define KORGE_MAINWINDOW_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
5 | #include <qtimer.h> | 5 | #include <qtimer.h> |
6 | #include <qdict.h> | 6 | #include <qdict.h> |
7 | #include <qfile.h> | 7 | #include <qfile.h> |
8 | #include <qtextstream.h> | 8 | #include <qtextstream.h> |
9 | #include <qregexp.h> | 9 | #include <qregexp.h> |
10 | 10 | ||
11 | #include <libkcal/incidence.h> | 11 | #include <libkcal/incidence.h> |
12 | #include "simplealarmclient.h" | 12 | #include "simplealarmclient.h" |
13 | #include <ksyncmanager.h> | 13 | #include <ksyncmanager.h> |
14 | #ifndef DESKTOP_VERSION | 14 | #ifndef DESKTOP_VERSION |
15 | #include <qcopchannel_qws.h> | 15 | #include <qcopchannel_qws.h> |
16 | #endif | 16 | #endif |
17 | class QAction; | 17 | class QAction; |
18 | class CalendarView; | 18 | class CalendarView; |
19 | class KSyncProfile; | 19 | class KSyncProfile; |
20 | #ifdef DESKTOP_VERSION | 20 | #ifdef DESKTOP_VERSION |
21 | 21 | ||
22 | #define QPEToolBar QToolBar | 22 | #define QPEToolBar QToolBar |
23 | #define QPEMenuBar QMenuBar | 23 | #define QPEMenuBar QMenuBar |
24 | #endif | 24 | #endif |
25 | class QPEToolBar; | 25 | class QPEToolBar; |
26 | 26 | ||
27 | 27 | ||
28 | namespace KCal { | 28 | namespace KCal { |
29 | class CalendarLocal; | 29 | class CalendarLocal; |
30 | } | 30 | } |
31 | 31 | ||
32 | using namespace KCal; | 32 | using namespace KCal; |
33 | 33 | ||
34 | class MainWindow : public QMainWindow | 34 | class MainWindow : public QMainWindow |
35 | { | 35 | { |
36 | Q_OBJECT | 36 | Q_OBJECT |
37 | public: | 37 | public: |
38 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); | 38 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); |
39 | ~MainWindow(); | 39 | ~MainWindow(); |
40 | bool beamReceiveEnabled(); | 40 | bool beamReceiveEnabled(); |
41 | public slots: | 41 | public slots: |
42 | virtual void showMaximized (); | 42 | virtual void showMaximized (); |
43 | void configureAgenda( int ); | 43 | void configureAgenda( int ); |
44 | void recieve( const QCString& msg, const QByteArray& data ); | 44 | void recieve( const QCString& msg, const QByteArray& data ); |
45 | static QString defaultFileName(); | 45 | static QString defaultFileName(); |
46 | static QString syncFileName(); | 46 | static QString syncFileName(); |
47 | static QString resourcePath(); | 47 | static QString resourcePath(); |
48 | protected slots: | 48 | protected slots: |
49 | void setCaptionToDates(); | 49 | void setCaptionToDates(); |
50 | void about(); | 50 | void about(); |
51 | void licence(); | 51 | void licence(); |
52 | void faq(); | 52 | void faq(); |
53 | void usertrans(); | 53 | void usertrans(); |
54 | void features(); | 54 | void features(); |
55 | void synchowto(); | 55 | void synchowto(); |
56 | void kdesynchowto(); | 56 | void kdesynchowto(); |
57 | void multisynchowto(); | 57 | void multisynchowto(); |
58 | void whatsNew(); | 58 | void whatsNew(); |
59 | void keyBindings(); | 59 | void keyBindings(); |
60 | void aboutAutoSaving();; | 60 | void aboutAutoSaving();; |
61 | void aboutKnownBugs(); | 61 | void aboutKnownBugs(); |
62 | 62 | ||
63 | void processIncidenceSelection( Incidence * ); | 63 | void processIncidenceSelection( Incidence * ); |
64 | 64 | ||
65 | void importQtopia(); | 65 | void importQtopia(); |
66 | void importBday(); | 66 | void importBday(); |
67 | void importOL(); | 67 | void importOL(); |
68 | void importIcal(); | 68 | void importIcal(); |
69 | void importFile( QString, bool ); | 69 | void importFile( QString, bool ); |
70 | void quickImportIcal(); | 70 | void quickImportIcal(); |
71 | 71 | ||
72 | void slotModifiedChanged( bool ); | 72 | void slotModifiedChanged( bool ); |
73 | 73 | ||
74 | void save(); | 74 | void save(); |
75 | void configureToolBar( int ); | 75 | void configureToolBar( int ); |
76 | void printSel(); | 76 | void printSel(); |
77 | void printCal(); | 77 | void printCal(); |
78 | void saveCalendar(); | 78 | void saveCalendar(); |
79 | void loadCalendar(); | 79 | void loadCalendar(); |
80 | void exportVCalendar(); | 80 | void exportVCalendar(); |
81 | void fillFilterMenu(); | 81 | void fillFilterMenu(); |
82 | void selectFilter( int ); | 82 | void selectFilter( int ); |
83 | void exportToPhone( int ); | 83 | void exportToPhone( int ); |
84 | void toggleBeamReceive(); | 84 | void toggleBeamReceive(); |
85 | void disableBR(bool); | 85 | void disableBR(bool); |
86 | 86 | ||
87 | 87 | ||
88 | protected: | 88 | protected: |
89 | void displayText( QString, QString); | 89 | void displayText( QString, QString); |
90 | void displayFile( QString, QString); | ||
91 | 90 | ||
92 | void enableIncidenceActions( bool ); | 91 | void enableIncidenceActions( bool ); |
93 | 92 | ||
94 | private slots: | 93 | private slots: |
95 | QSocket* piSocket; | 94 | QSocket* piSocket; |
96 | QString piFileString; | 95 | QString piFileString; |
97 | QTime piTime; | 96 | QTime piTime; |
98 | void getFile( bool ); | 97 | void getFile( bool ); |
99 | void syncFileRequest(); | 98 | void syncFileRequest(); |
100 | private: | 99 | private: |
101 | bool mBRdisabled; | 100 | bool mBRdisabled; |
102 | #ifndef DESKTOP_VERSION | 101 | #ifndef DESKTOP_VERSION |
103 | QCopChannel* infrared; | 102 | QCopChannel* infrared; |
104 | #endif | 103 | #endif |
105 | QAction* brAction; | 104 | QAction* brAction; |
106 | KSyncManager* mSyncManager; | 105 | KSyncManager* mSyncManager; |
107 | bool mClosed; | 106 | bool mClosed; |
108 | void saveOnClose(); | 107 | void saveOnClose(); |
109 | bool mFlagKeyPressed; | 108 | bool mFlagKeyPressed; |
110 | bool mBlockAtStartup; | 109 | bool mBlockAtStartup; |
111 | QPEToolBar *iconToolBar; | 110 | QPEToolBar *iconToolBar; |
112 | void initActions(); | 111 | void initActions(); |
113 | void setDefaultPreferences(); | 112 | void setDefaultPreferences(); |
114 | void keyPressEvent ( QKeyEvent * ) ; | 113 | void keyPressEvent ( QKeyEvent * ) ; |
115 | void keyReleaseEvent ( QKeyEvent * ) ; | 114 | void keyReleaseEvent ( QKeyEvent * ) ; |
116 | QPopupMenu *configureToolBarMenu; | 115 | QPopupMenu *configureToolBarMenu; |
117 | QPopupMenu *selectFilterMenu; | 116 | QPopupMenu *selectFilterMenu; |
118 | QPopupMenu *configureAgendaMenu, *syncMenu; | 117 | QPopupMenu *configureAgendaMenu, *syncMenu; |
119 | CalendarLocal *mCalendar; | 118 | CalendarLocal *mCalendar; |
120 | CalendarView *mView; | 119 | CalendarView *mView; |
121 | QAction *mNewSubTodoAction; | 120 | QAction *mNewSubTodoAction; |
122 | 121 | ||
123 | QAction *mShowAction; | 122 | QAction *mShowAction; |
124 | QAction *mEditAction; | 123 | QAction *mEditAction; |
125 | QAction *mDeleteAction; | 124 | QAction *mDeleteAction; |
126 | QAction *mCloneAction; | 125 | QAction *mCloneAction; |
127 | QAction *mMoveAction; | 126 | QAction *mMoveAction; |
128 | QAction *mBeamAction; | 127 | QAction *mBeamAction; |
129 | QAction *mCancelAction; | 128 | QAction *mCancelAction; |
130 | 129 | ||
131 | void closeEvent( QCloseEvent* ce ); | 130 | void closeEvent( QCloseEvent* ce ); |
132 | SimpleAlarmClient mAlarmClient; | 131 | SimpleAlarmClient mAlarmClient; |
133 | QTimer mSaveTimer; | 132 | QTimer mSaveTimer; |
134 | //bool mBlockSaveFlag; | 133 | //bool mBlockSaveFlag; |
135 | bool mCalendarModifiedFlag; | 134 | bool mCalendarModifiedFlag; |
136 | QPixmap loadPixmap( QString ); | 135 | QPixmap loadPixmap( QString ); |
137 | }; | 136 | }; |
138 | 137 | ||
139 | 138 | ||
140 | #endif | 139 | #endif |
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index d6f556d..21aa0a4 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp | |||
@@ -1,108 +1,110 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #include <stdio.h> | 2 | #include <stdio.h> |
3 | 3 | ||
4 | #include "kapplication.h" | 4 | #include "kapplication.h" |
5 | #include "ktextedit.h" | ||
5 | #include <qapplication.h> | 6 | #include <qapplication.h> |
6 | #include <qstring.h> | 7 | #include <qstring.h> |
7 | #include <qfile.h> | 8 | #include <qfile.h> |
8 | #include <qtextstream.h> | 9 | #include <qtextstream.h> |
9 | #include <qdialog.h> | 10 | #include <qdialog.h> |
10 | #include <qlayout.h> | 11 | #include <qlayout.h> |
11 | #include <qtextbrowser.h> | 12 | #include <qtextbrowser.h> |
12 | 13 | ||
13 | int KApplication::random() | 14 | int KApplication::random() |
14 | { | 15 | { |
15 | return rand(); | 16 | return rand(); |
16 | } | 17 | } |
17 | 18 | ||
18 | //US | 19 | //US |
19 | QString KApplication::randomString(int length) | 20 | QString KApplication::randomString(int length) |
20 | { | 21 | { |
21 | if (length <=0 ) return QString::null; | 22 | if (length <=0 ) return QString::null; |
22 | 23 | ||
23 | QString str; | 24 | QString str; |
24 | while (length--) | 25 | while (length--) |
25 | { | 26 | { |
26 | int r=random() % 62; | 27 | int r=random() % 62; |
27 | r+=48; | 28 | r+=48; |
28 | if (r>57) r+=7; | 29 | if (r>57) r+=7; |
29 | if (r>90) r+=6; | 30 | if (r>90) r+=6; |
30 | str += char(r); | 31 | str += char(r); |
31 | // so what if I work backwards? | 32 | // so what if I work backwards? |
32 | } | 33 | } |
33 | return str; | 34 | return str; |
34 | } | 35 | } |
35 | int KApplication::execDialog( QDialog* d ) | 36 | int KApplication::execDialog( QDialog* d ) |
36 | { | 37 | { |
37 | if (QApplication::desktop()->width() <= 640 ) | 38 | if (QApplication::desktop()->width() <= 640 ) |
38 | d->showMaximized(); | 39 | d->showMaximized(); |
39 | else | 40 | else |
40 | ;//d->resize( 800, 600 ); | 41 | ;//d->resize( 800, 600 ); |
41 | return d->exec(); | 42 | return d->exec(); |
42 | } | 43 | } |
43 | void KApplication::showLicence() | 44 | void KApplication::showLicence() |
44 | { | 45 | { |
45 | KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/licence.txt" ); | 46 | KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/licence.txt" ); |
46 | } | 47 | } |
47 | 48 | ||
48 | void KApplication::showFile(QString caption, QString fn) | 49 | void KApplication::showFile(QString caption, QString fn) |
49 | { | 50 | { |
50 | QString text; | 51 | QString text; |
51 | QString fileName; | 52 | QString fileName; |
52 | #ifndef DESKTOP_VERSION | 53 | #ifndef DESKTOP_VERSION |
53 | fileName = getenv("QPEDIR"); | 54 | fileName = getenv("QPEDIR"); |
54 | fileName += "/pics/" + fn ; | 55 | fileName += "/pics/" + fn ; |
55 | #else | 56 | #else |
56 | fileName = qApp->applicationDirPath () + "/" + fn; | 57 | fileName = qApp->applicationDirPath () + "/" + fn; |
57 | #endif | 58 | #endif |
58 | QFile file( fileName ); | 59 | QFile file( fileName ); |
59 | if (!file.open( IO_ReadOnly ) ) { | 60 | if (!file.open( IO_ReadOnly ) ) { |
60 | return ; | 61 | return ; |
61 | } | 62 | } |
62 | QTextStream ts( &file ); | 63 | QTextStream ts( &file ); |
63 | text = ts.read(); | 64 | text = ts.read(); |
64 | file.close(); | 65 | file.close(); |
65 | KApplication::showText( caption, text ); | 66 | KApplication::showText( caption, text ); |
66 | 67 | ||
67 | } | 68 | } |
68 | 69 | ||
69 | bool KApplication::convert2latin1(QString fileName) | 70 | bool KApplication::convert2latin1(QString fileName) |
70 | { | 71 | { |
71 | QString text; | 72 | QString text; |
72 | QFile file( fileName ); | 73 | QFile file( fileName ); |
73 | if (!file.open( IO_ReadOnly ) ) { | 74 | if (!file.open( IO_ReadOnly ) ) { |
74 | return false; | 75 | return false; |
75 | 76 | ||
76 | } | 77 | } |
77 | QTextStream ts( &file ); | 78 | QTextStream ts( &file ); |
78 | ts.setEncoding( QTextStream::UnicodeUTF8 ); | 79 | ts.setEncoding( QTextStream::UnicodeUTF8 ); |
79 | text = ts.read(); | 80 | text = ts.read(); |
80 | file.close(); | 81 | file.close(); |
81 | if (!file.open( IO_WriteOnly ) ) { | 82 | if (!file.open( IO_WriteOnly ) ) { |
82 | return false; | 83 | return false; |
83 | } | 84 | } |
84 | QTextStream tsIn( &file ); | 85 | QTextStream tsIn( &file ); |
85 | tsIn.setEncoding( QTextStream::Latin1 ); | 86 | tsIn.setEncoding( QTextStream::Latin1 ); |
86 | tsIn << text.latin1(); | 87 | tsIn << text.latin1(); |
87 | file.close(); | 88 | file.close(); |
88 | 89 | ||
89 | 90 | ||
90 | } | 91 | } |
91 | void KApplication::showText(QString caption, QString text) | 92 | void KApplication::showText(QString caption, QString text) |
92 | { | 93 | { |
93 | QDialog dia( 0, "name", true ); ; | 94 | QDialog dia( 0, "name", true ); ; |
94 | dia.setCaption( caption ); | 95 | dia.setCaption( caption ); |
95 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 96 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
96 | lay->setSpacing( 3 ); | 97 | lay->setSpacing( 3 ); |
97 | lay->setMargin( 3 ); | 98 | lay->setMargin( 3 ); |
98 | QTextBrowser tb ( &dia ); | 99 | KTextEdit tb ( &dia ); |
100 | tb.setWordWrap( QMultiLineEdit::WidgetWidth ); | ||
99 | lay->addWidget( &tb ); | 101 | lay->addWidget( &tb ); |
100 | tb.setText( text ); | 102 | tb.setText( text ); |
101 | #ifdef DESKTOP_VERSION | 103 | #ifdef DESKTOP_VERSION |
102 | dia.resize( 640, 480); | 104 | dia.resize( 640, 480); |
103 | #else | 105 | #else |
104 | dia.showMaximized(); | 106 | dia.showMaximized(); |
105 | #endif | 107 | #endif |
106 | dia.exec(); | 108 | dia.exec(); |
107 | 109 | ||
108 | } | 110 | } |