author | zautrix <zautrix> | 2005-03-26 23:47:43 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-26 23:47:43 (UTC) |
commit | 1ec37e1988d32ed65fa1afa001eff8fc105fbbbc (patch) (unidiff) | |
tree | 40fa9c3e68692a71c32169efb679ce3f0717610c | |
parent | 9963563126c91d721406f24a49548b1d8f3dc415 (diff) | |
download | kdepimpi-1ec37e1988d32ed65fa1afa001eff8fc105fbbbc.zip kdepimpi-1ec37e1988d32ed65fa1afa001eff8fc105fbbbc.tar.gz kdepimpi-1ec37e1988d32ed65fa1afa001eff8fc105fbbbc.tar.bz2 |
fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 63 |
2 files changed, 37 insertions, 30 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index d5d1f76..d4ec863 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,191 +1,193 @@ | |||
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 2.0.21 ************ | 3 | ********** VERSION 2.0.21 ************ |
4 | 4 | ||
5 | Fixed another SMTP problem in OM/Pi. | 5 | Fixed another SMTP problem in OM/Pi. |
6 | Some small changed in the new datenavigator in KO/Pi. | 6 | Some small changed in the new datenavigator in KO/Pi. |
7 | Changed default setting for new filter in KA/Pi to "exclude categories". | 7 | Changed default setting for new filter in KA/Pi to "exclude categories". |
8 | Changed the default font size for 640x480 display . | 8 | Changed the default font size for 640x480 display . |
9 | Changed popup menu behaviour in agenda and list view. | 9 | Changed popup menu behaviour in agenda and list view. |
10 | Fixed some layout problems of the date label size in the month view. | 10 | Fixed some layout problems of the date label size in the month view. |
11 | Made month view update faster. | 11 | Made month view update faster. |
12 | Made first datenavigator repainting faster. | 12 | Made first datenavigator repainting faster. |
13 | Changed the title of the event/todo edit dialogs. | 13 | Changed the title of the event/todo edit dialogs. |
14 | Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course). | 14 | Timelabels in agenga changed from 22:00 to 22 oo. ( the oo higher, of course). |
15 | Please report, if there are layout problems with the new timelabels. | 15 | Many small usebility fixes in KO/Pi. |
16 | Pressing the "Calendar" button on the Z switches now to the next view in KO/Pi. | ||
17 | The set of possible "next views" are the views you have toolbar buttons for. | ||
16 | 18 | ||
17 | 19 | ||
18 | ********** VERSION 2.0.20 ************ | 20 | ********** VERSION 2.0.20 ************ |
19 | 21 | ||
20 | Two small fixes in OM/Pi. | 22 | Two small fixes in OM/Pi. |
21 | 23 | ||
22 | Better resizing of the new datenavigator in KO/Pi. | 24 | Better resizing of the new datenavigator in KO/Pi. |
23 | 25 | ||
24 | ********** VERSION 2.0.19 ************ | 26 | ********** VERSION 2.0.19 ************ |
25 | KO/Pi: | 27 | KO/Pi: |
26 | Enhancements and bugfixes in the new datenavigator. | 28 | Enhancements and bugfixes in the new datenavigator. |
27 | Bugfix in this changelog: | 29 | Bugfix in this changelog: |
28 | The datenavigator was changed in version 2.0.18, not the datepicker. | 30 | The datenavigator was changed in version 2.0.18, not the datepicker. |
29 | 31 | ||
30 | ********** VERSION 2.0.18 ************ | 32 | ********** VERSION 2.0.18 ************ |
31 | KO/Pi: | 33 | KO/Pi: |
32 | Fixed some minor problems. | 34 | Fixed some minor problems. |
33 | Cleaned up the KO/Pi config dialog. | 35 | Cleaned up the KO/Pi config dialog. |
34 | Fixed problem moving events in aganda view. | 36 | Fixed problem moving events in aganda view. |
35 | Made datepicker scaleable, i.e. if the datenavigator shows now a | 37 | Made datepicker scaleable, i.e. if the datenavigator shows now a |
36 | datenavigator matrix depending on its size. | 38 | datenavigator matrix depending on its size. |
37 | Birthdays are now displayed green in the datenavigator. | 39 | Birthdays are now displayed green in the datenavigator. |
38 | What'sThis Help in datenavigator shows all events of the day. | 40 | What'sThis Help in datenavigator shows all events of the day. |
39 | 41 | ||
40 | OM/Pi: | 42 | OM/Pi: |
41 | Updated the backend mail library to the latest version. | 43 | Updated the backend mail library to the latest version. |
42 | Please backup your mail before using this version. | 44 | Please backup your mail before using this version. |
43 | 45 | ||
44 | ********** VERSION 2.0.17 ************ | 46 | ********** VERSION 2.0.17 ************ |
45 | 47 | ||
46 | KO/Pi: | 48 | KO/Pi: |
47 | Tooltips in month view were not sorted. Fixed. | 49 | Tooltips in month view were not sorted. Fixed. |
48 | Daylabel in agenda view ( for display of one day ) was too short. Fixed. | 50 | Daylabel in agenda view ( for display of one day ) was too short. Fixed. |
49 | Conflict display dialog for syncing was not on top of other windows. Fixed. | 51 | Conflict display dialog for syncing was not on top of other windows. Fixed. |
50 | Fixed some minor problems. | 52 | Fixed some minor problems. |
51 | 53 | ||
52 | Fixed an endless loop when importing vcs file with RESOURCES entry. | 54 | Fixed an endless loop when importing vcs file with RESOURCES entry. |
53 | 55 | ||
54 | ********** VERSION 2.0.16 ************ | 56 | ********** VERSION 2.0.16 ************ |
55 | OM/Pi: | 57 | OM/Pi: |
56 | Fixed the SMTP account setting the option. | 58 | Fixed the SMTP account setting the option. |
57 | Fixed something in mail sending. | 59 | Fixed something in mail sending. |
58 | 60 | ||
59 | KO/Pi: | 61 | KO/Pi: |
60 | Added possibility to export selected events/todos as vcal file. | 62 | Added possibility to export selected events/todos as vcal file. |
61 | 63 | ||
62 | ********** VERSION 2.0.15 ************ | 64 | ********** VERSION 2.0.15 ************ |
63 | 65 | ||
64 | PwM/Pi: | 66 | PwM/Pi: |
65 | Added keyboard shorcuts for | 67 | Added keyboard shorcuts for |
66 | - toggling summary view (space bar) | 68 | - toggling summary view (space bar) |
67 | - delete item (delete + backspace key) | 69 | - delete item (delete + backspace key) |
68 | - add new item ( i + n key) | 70 | - add new item ( i + n key) |
69 | Fixed length of info in the title. | 71 | Fixed length of info in the title. |
70 | 72 | ||
71 | KO/Pi-KA/Pi: | 73 | KO/Pi-KA/Pi: |
72 | Changed "ME" menu bar entry to an icon. | 74 | Changed "ME" menu bar entry to an icon. |
73 | 75 | ||
74 | KO/Pi: | 76 | KO/Pi: |
75 | Fixed two minor bugs in displaying todos. | 77 | Fixed two minor bugs in displaying todos. |
76 | If in month view a cell is selected, the key shortcut "d" shows now that date. | 78 | If in month view a cell is selected, the key shortcut "d" shows now that date. |
77 | Added complete info for a todo in month view as an icon left of the text. | 79 | Added complete info for a todo in month view as an icon left of the text. |
78 | Fixed problems of displaying data when "<" or ">" are used in summary/location/description. | 80 | Fixed problems of displaying data when "<" or ">" are used in summary/location/description. |
79 | Fixed problem of search dialog size when switching displays. | 81 | Fixed problem of search dialog size when switching displays. |
80 | Cancel key now closes date picker. | 82 | Cancel key now closes date picker. |
81 | Rearranged KO/Pi file menu structure. | 83 | Rearranged KO/Pi file menu structure. |
82 | 84 | ||
83 | OM/Pi: | 85 | OM/Pi: |
84 | Added to the SMTP account setting the option | 86 | Added to the SMTP account setting the option |
85 | "No secure connection". | 87 | "No secure connection". |
86 | You have to configure your SMTP accounts again, sorry. | 88 | You have to configure your SMTP accounts again, sorry. |
87 | 89 | ||
88 | KA/Pi: | 90 | KA/Pi: |
89 | Added support for importing quoted-printable. | 91 | Added support for importing quoted-printable. |
90 | Support was added by Peter P.. Thanks, Peter! | 92 | Support was added by Peter P.. Thanks, Peter! |
91 | 93 | ||
92 | 94 | ||
93 | ********** VERSION 2.0.14 ************ | 95 | ********** VERSION 2.0.14 ************ |
94 | 96 | ||
95 | Made Passwordmanager PwM/Pi more userfriendly: | 97 | Made Passwordmanager PwM/Pi more userfriendly: |
96 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. | 98 | Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. |
97 | Fixed bug in KO/Pi todo printing. | 99 | Fixed bug in KO/Pi todo printing. |
98 | Made Qtopia calendar import possible on desktop . | 100 | Made Qtopia calendar import possible on desktop . |
99 | 101 | ||
100 | ********** VERSION 2.0.13 ************ | 102 | ********** VERSION 2.0.13 ************ |
101 | 103 | ||
102 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. | 104 | Fixed a problem in the addressee select dialog and made it more user friendly by adding a minimize splitter. |
103 | 105 | ||
104 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". | 106 | In the search dialog you can switch now the focus from search line edit to the list view by pressing key "arrow down". |
105 | 107 | ||
106 | OM/Pi: | 108 | OM/Pi: |
107 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. | 109 | Fixed a refresh problem of outgoing/sent/sendfailed folders after sending mails. |
108 | Added missing German translation. | 110 | Added missing German translation. |
109 | Added warning if path is specified in local folder settings of account config. | 111 | Added warning if path is specified in local folder settings of account config. |
110 | 112 | ||
111 | ********** VERSION 2.0.12 ************ | 113 | ********** VERSION 2.0.12 ************ |
112 | 114 | ||
113 | KO/Pi: | 115 | KO/Pi: |
114 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. | 116 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. |
115 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. | 117 | Fixed some layout problems in the KO/Pi agenda view when there were many conflicting itmes. |
116 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. | 118 | Fixed several problems of the keyboard focus in the desktop versions when opening the search dialog/event viewer. |
117 | 119 | ||
118 | Fixed problem in pi-sync mode when wrong password was sent. | 120 | Fixed problem in pi-sync mode when wrong password was sent. |
119 | 121 | ||
120 | OM/Pi: | 122 | OM/Pi: |
121 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. | 123 | Fixed a crash when displaying mails with "Show mail as html" was checked in the config. |
122 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. | 124 | Added a check before displaying the mail if the mail is in html format, if "Show mail as html" is enabled. |
123 | 125 | ||
124 | ********** VERSION 2.0.11 ************ | 126 | ********** VERSION 2.0.11 ************ |
125 | 127 | ||
126 | Fixed some problems in pi-sync mode | 128 | Fixed some problems in pi-sync mode |
127 | (e.g. details of events were not synced properly) | 129 | (e.g. details of events were not synced properly) |
128 | 130 | ||
129 | ********** VERSION 2.0.10 ************ | 131 | ********** VERSION 2.0.10 ************ |
130 | 132 | ||
131 | KO/Pi: | 133 | KO/Pi: |
132 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. | 134 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. |
133 | This is fixed. | 135 | This is fixed. |
134 | Changed the search dialog a bit to make it more user friendly. | 136 | Changed the search dialog a bit to make it more user friendly. |
135 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). | 137 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). |
136 | 138 | ||
137 | Added config option to hide the week number in KO/Pi toolbar. | 139 | Added config option to hide the week number in KO/Pi toolbar. |
138 | 140 | ||
139 | ********** VERSION 2.0.9 ************ | 141 | ********** VERSION 2.0.9 ************ |
140 | 142 | ||
141 | Made month view icons for multiday events a bit nicer. | 143 | Made month view icons for multiday events a bit nicer. |
142 | Some minor fixes in KO/Pi | 144 | Some minor fixes in KO/Pi |
143 | (e.g. go to today did not work for new week view properly). | 145 | (e.g. go to today did not work for new week view properly). |
144 | 146 | ||
145 | 147 | ||
146 | ********** VERSION 2.0.8 ************ | 148 | ********** VERSION 2.0.8 ************ |
147 | 149 | ||
148 | Fixed a problem in dependency info in the ipk files for the Zaurus. | 150 | Fixed a problem in dependency info in the ipk files for the Zaurus. |
149 | 151 | ||
150 | Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. | 152 | Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. |
151 | 153 | ||
152 | Added a "go today" button to the datepicker. | 154 | Added a "go today" button to the datepicker. |
153 | 155 | ||
154 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) | 156 | Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) |
155 | and made it configureable to show these values. | 157 | and made it configureable to show these values. |
156 | 158 | ||
157 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. | 159 | Fixed a problem for events (from external iCal files) that do have a duration but no end date. |
158 | 160 | ||
159 | 161 | ||
160 | ********** VERSION 2.0.7 ************ | 162 | ********** VERSION 2.0.7 ************ |
161 | 163 | ||
162 | Added global application font settings | 164 | Added global application font settings |
163 | (for all KDE-Pim/Pi apps) to the general settings. | 165 | (for all KDE-Pim/Pi apps) to the general settings. |
164 | 166 | ||
165 | Fixed a problem in OM/Pi when trying to login to some IMAP servers | 167 | Fixed a problem in OM/Pi when trying to login to some IMAP servers |
166 | (like the IMAP server of Apple: mail.mac.com ) | 168 | (like the IMAP server of Apple: mail.mac.com ) |
167 | 169 | ||
168 | Added recurring todos to KO/Pi. | 170 | Added recurring todos to KO/Pi. |
169 | 171 | ||
170 | 172 | ||
171 | ********** VERSION 2.0.6 ************ | 173 | ********** VERSION 2.0.6 ************ |
172 | 174 | ||
173 | Stable release 2.0.6! | 175 | Stable release 2.0.6! |
174 | 176 | ||
175 | Some bugfixes in the pi-sync mode. | 177 | Some bugfixes in the pi-sync mode. |
176 | Added German translation for pi-sync mode. | 178 | Added German translation for pi-sync mode. |
177 | 179 | ||
178 | KO/Pi: | 180 | KO/Pi: |
179 | Made the todolist using alternate background. | 181 | Made the todolist using alternate background. |
180 | 182 | ||
181 | Other minor fixes in KO/Pi. | 183 | Other minor fixes in KO/Pi. |
182 | 184 | ||
183 | 185 | ||
184 | You can find the complete changelog | 186 | You can find the complete changelog |
185 | from version 1.7.7 to 2.0.5 | 187 | from version 1.7.7 to 2.0.5 |
186 | in the source package or on | 188 | in the source package or on |
187 | 189 | ||
188 | http://www.pi-sync.net/html/changelog.html | 190 | http://www.pi-sync.net/html/changelog.html |
189 | 191 | ||
190 | 192 | ||
191 | 193 | ||
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 24055af..95b836c 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -305,1147 +305,1152 @@ MainWindow::~MainWindow() | |||
305 | void MainWindow::disableBR(bool b) | 305 | void MainWindow::disableBR(bool b) |
306 | { | 306 | { |
307 | #ifndef DESKTOP_VERSION | 307 | #ifndef DESKTOP_VERSION |
308 | if ( b ) { | 308 | if ( b ) { |
309 | if ( infrared ) { | 309 | if ( infrared ) { |
310 | toggleBeamReceive(); | 310 | toggleBeamReceive(); |
311 | mBRdisabled = true; | 311 | mBRdisabled = true; |
312 | } | 312 | } |
313 | mBRdisabled = true; | 313 | mBRdisabled = true; |
314 | } else { | 314 | } else { |
315 | if ( mBRdisabled ) { | 315 | if ( mBRdisabled ) { |
316 | mBRdisabled = false; | 316 | mBRdisabled = false; |
317 | //makes no sense,because other cal ap is probably running | 317 | //makes no sense,because other cal ap is probably running |
318 | // toggleBeamReceive(); | 318 | // toggleBeamReceive(); |
319 | } | 319 | } |
320 | } | 320 | } |
321 | #endif | 321 | #endif |
322 | 322 | ||
323 | } | 323 | } |
324 | bool MainWindow::beamReceiveEnabled() | 324 | bool MainWindow::beamReceiveEnabled() |
325 | { | 325 | { |
326 | #ifndef DESKTOP_VERSION | 326 | #ifndef DESKTOP_VERSION |
327 | return ( infrared != 0 ); | 327 | return ( infrared != 0 ); |
328 | #endif | 328 | #endif |
329 | return false; | 329 | return false; |
330 | } | 330 | } |
331 | 331 | ||
332 | void MainWindow::toggleBeamReceive() | 332 | void MainWindow::toggleBeamReceive() |
333 | { | 333 | { |
334 | if ( mBRdisabled ) | 334 | if ( mBRdisabled ) |
335 | return; | 335 | return; |
336 | #ifndef DESKTOP_VERSION | 336 | #ifndef DESKTOP_VERSION |
337 | if ( infrared ) { | 337 | if ( infrared ) { |
338 | qDebug("disable BeamReceive "); | 338 | qDebug("disable BeamReceive "); |
339 | delete infrared; | 339 | delete infrared; |
340 | infrared = 0; | 340 | infrared = 0; |
341 | brAction->setOn(false); | 341 | brAction->setOn(false); |
342 | return; | 342 | return; |
343 | } | 343 | } |
344 | qDebug("enable BeamReceive "); | 344 | qDebug("enable BeamReceive "); |
345 | brAction->setOn(true); | 345 | brAction->setOn(true); |
346 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; | 346 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; |
347 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); | 347 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); |
348 | #endif | 348 | #endif |
349 | } | 349 | } |
350 | void MainWindow::showMaximized () | 350 | void MainWindow::showMaximized () |
351 | { | 351 | { |
352 | #ifndef DESKTOP_VERSION | 352 | #ifndef DESKTOP_VERSION |
353 | if ( ! globalFlagBlockStartup ) | 353 | if ( ! globalFlagBlockStartup ) |
354 | if ( mClosed ) | 354 | if ( mClosed ) |
355 | mView->goToday(); | 355 | mView->goToday(); |
356 | #endif | 356 | #endif |
357 | QWidget::showMaximized () ; | 357 | QWidget::showMaximized () ; |
358 | mClosed = false; | 358 | mClosed = false; |
359 | } | 359 | } |
360 | void MainWindow::closeEvent( QCloseEvent* ce ) | 360 | void MainWindow::closeEvent( QCloseEvent* ce ) |
361 | { | 361 | { |
362 | 362 | ||
363 | 363 | ||
364 | 364 | ||
365 | if ( ! KOPrefs::instance()->mAskForQuit ) { | 365 | if ( ! KOPrefs::instance()->mAskForQuit ) { |
366 | saveOnClose(); | 366 | saveOnClose(); |
367 | mClosed = true; | 367 | mClosed = true; |
368 | ce->accept(); | 368 | ce->accept(); |
369 | return; | 369 | return; |
370 | 370 | ||
371 | } | 371 | } |
372 | 372 | ||
373 | switch( QMessageBox::information( this, "KO/Pi", | 373 | switch( QMessageBox::information( this, "KO/Pi", |
374 | i18n("Do you really want\nto close KO/Pi?"), | 374 | i18n("Do you really want\nto close KO/Pi?"), |
375 | i18n("Close"), i18n("No"), | 375 | i18n("Close"), i18n("No"), |
376 | 0, 0 ) ) { | 376 | 0, 0 ) ) { |
377 | case 0: | 377 | case 0: |
378 | saveOnClose(); | 378 | saveOnClose(); |
379 | mClosed = true; | 379 | mClosed = true; |
380 | ce->accept(); | 380 | ce->accept(); |
381 | break; | 381 | break; |
382 | case 1: | 382 | case 1: |
383 | ce->ignore(); | 383 | ce->ignore(); |
384 | break; | 384 | break; |
385 | case 2: | 385 | case 2: |
386 | 386 | ||
387 | default: | 387 | default: |
388 | break; | 388 | break; |
389 | } | 389 | } |
390 | 390 | ||
391 | 391 | ||
392 | } | 392 | } |
393 | 393 | ||
394 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | 394 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) |
395 | { | 395 | { |
396 | QDataStream stream( data, IO_ReadOnly ); | 396 | QDataStream stream( data, IO_ReadOnly ); |
397 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); | 397 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); |
398 | //QString datamess; | 398 | //QString datamess; |
399 | //qDebug("message "); | 399 | //qDebug("message "); |
400 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); | 400 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); |
401 | 401 | ||
402 | if ( cmsg == "setDocument(QString)" ) { | 402 | if ( cmsg == "setDocument(QString)" ) { |
403 | QDataStream stream( data, IO_ReadOnly ); | 403 | QDataStream stream( data, IO_ReadOnly ); |
404 | QString fileName; | 404 | QString fileName; |
405 | stream >> fileName; | 405 | stream >> fileName; |
406 | //qDebug("filename %s ", fileName.latin1()); | 406 | //qDebug("filename %s ", fileName.latin1()); |
407 | showMaximized(); | 407 | showMaximized(); |
408 | raise(); | 408 | raise(); |
409 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; | 409 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; |
410 | mSyncManager->slotSyncMenu( 1002 ); | 410 | mSyncManager->slotSyncMenu( 1002 ); |
411 | return; | 411 | return; |
412 | } | 412 | } |
413 | 413 | ||
414 | if ( cmsg == "-writeFile" ) { | 414 | if ( cmsg == "-writeFile" ) { |
415 | // I made from the "-writeFile" an "-writeAlarm" | 415 | // I made from the "-writeFile" an "-writeAlarm" |
416 | mView->viewManager()->showWhatsNextView(); | 416 | mView->viewManager()->showWhatsNextView(); |
417 | mCalendar->checkAlarmForIncidence( 0, true); | 417 | mCalendar->checkAlarmForIncidence( 0, true); |
418 | showMaximized(); | 418 | showMaximized(); |
419 | raise(); | 419 | raise(); |
420 | return; | 420 | return; |
421 | 421 | ||
422 | } | 422 | } |
423 | if ( cmsg == "-writeFileSilent" ) { | 423 | if ( cmsg == "-writeFileSilent" ) { |
424 | // I made from the "-writeFile" an "-writeAlarm" | 424 | // I made from the "-writeFile" an "-writeAlarm" |
425 | // mView->viewManager()->showWhatsNextView(); | 425 | // mView->viewManager()->showWhatsNextView(); |
426 | mCalendar->checkAlarmForIncidence( 0, true); | 426 | mCalendar->checkAlarmForIncidence( 0, true); |
427 | //showMaximized(); | 427 | //showMaximized(); |
428 | //raise(); | 428 | //raise(); |
429 | hide(); | 429 | hide(); |
430 | return; | 430 | return; |
431 | } | 431 | } |
432 | if ( cmsg == "-newCountdown" ) { | 432 | if ( cmsg == "-newCountdown" ) { |
433 | qDebug("newCountdown "); | 433 | qDebug("newCountdown "); |
434 | 434 | ||
435 | } | 435 | } |
436 | QString msg ; | 436 | QString msg ; |
437 | QString allmsg = cmsg; | 437 | QString allmsg = cmsg; |
438 | while ( allmsg.length() > 0 ) { | 438 | while ( allmsg.length() > 0 ) { |
439 | int nextC = allmsg.find( "-", 1 ); | 439 | int nextC = allmsg.find( "-", 1 ); |
440 | if ( nextC == -1 ) { | 440 | if ( nextC == -1 ) { |
441 | msg = allmsg; | 441 | msg = allmsg; |
442 | allmsg = ""; | 442 | allmsg = ""; |
443 | } else{ | 443 | } else{ |
444 | msg = allmsg.left( nextC ); | 444 | msg = allmsg.left( nextC ); |
445 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); | 445 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); |
446 | } | 446 | } |
447 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); | 447 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); |
448 | if ( msg == "-newEvent" ) { | 448 | if ( msg == "-newEvent" ) { |
449 | mView->newEvent(); | 449 | mView->newEvent(); |
450 | } | 450 | } |
451 | if ( msg == "-newTodo" ) { | 451 | if ( msg == "-newTodo" ) { |
452 | mView->newTodo(); | 452 | mView->newTodo(); |
453 | 453 | ||
454 | } | 454 | } |
455 | if ( msg == "-showWN" ) { | 455 | if ( msg == "-showWN" ) { |
456 | mView->viewManager()->showWhatsNextView(); | 456 | mView->viewManager()->showWhatsNextView(); |
457 | } | 457 | } |
458 | if ( msg == "-showTodo" ) { | 458 | if ( msg == "-showTodo" ) { |
459 | mView->viewManager()->showTodoView(); | 459 | mView->viewManager()->showTodoView(); |
460 | } | 460 | } |
461 | if ( msg == "-showList" ) { | 461 | if ( msg == "-showList" ) { |
462 | mView->viewManager()->showListView(); | 462 | mView->viewManager()->showListView(); |
463 | } | 463 | } |
464 | else if ( msg == "-showDay" ) { | 464 | else if ( msg == "-showDay" ) { |
465 | mView->viewManager()->showDayView(); | 465 | mView->viewManager()->showDayView(); |
466 | } | 466 | } |
467 | else if ( msg == "-showWWeek" ) { | 467 | else if ( msg == "-showWWeek" ) { |
468 | mView->viewManager()->showWorkWeekView(); | 468 | mView->viewManager()->showWorkWeekView(); |
469 | } | 469 | } |
470 | else if ( msg == "-ringSync" ) { | 470 | else if ( msg == "-ringSync" ) { |
471 | mSyncManager->multiSync( false ); | 471 | mSyncManager->multiSync( false ); |
472 | } | 472 | } |
473 | else if ( msg == "-showWeek" ) { | 473 | else if ( msg == "-showWeek" ) { |
474 | mView->viewManager()->showWeekView(); | 474 | mView->viewManager()->showWeekView(); |
475 | } | 475 | } |
476 | else if ( msg == "-showTodo" ) { | 476 | else if ( msg == "-showTodo" ) { |
477 | mView->viewManager()->showTodoView(); | 477 | mView->viewManager()->showTodoView(); |
478 | } | 478 | } |
479 | else if ( msg == "-showJournal" ) { | 479 | else if ( msg == "-showJournal" ) { |
480 | mView->dateNavigator()->selectDates( 1 ); | 480 | mView->dateNavigator()->selectDates( 1 ); |
481 | mView->dateNavigator()->selectToday(); | 481 | mView->dateNavigator()->selectToday(); |
482 | mView->viewManager()->showJournalView(); | 482 | mView->viewManager()->showJournalView(); |
483 | } | 483 | } |
484 | else if ( msg == "-showKO" ) { | 484 | else if ( msg == "-showKO" ) { |
485 | mView->viewManager()->showNextXView(); | 485 | mView->viewManager()->showNextXView(); |
486 | } | 486 | } |
487 | else if ( msg == "-showWNext" ) { | 487 | else if ( msg == "-showWNext" ) { |
488 | mView->viewManager()->showWhatsNextView(); | 488 | mView->viewManager()->showWhatsNextView(); |
489 | } | 489 | } |
490 | else if ( msg == "nextView()" ) { | 490 | else if ( msg == "nextView()" ) { |
491 | mView->viewManager()->showNextView(); | 491 | mView->viewManager()->showNextView(); |
492 | } | 492 | } |
493 | else if ( msg == "-showNextXView" ) { | 493 | else if ( msg == "-showNextXView" ) { |
494 | mView->viewManager()->showNextXView(); | 494 | mView->viewManager()->showNextXView(); |
495 | } | 495 | } |
496 | 496 | ||
497 | 497 | ||
498 | } | 498 | } |
499 | 499 | ||
500 | showMaximized(); | 500 | showMaximized(); |
501 | raise(); | 501 | raise(); |
502 | } | 502 | } |
503 | 503 | ||
504 | QPixmap MainWindow::loadPixmap( QString name ) | 504 | QPixmap MainWindow::loadPixmap( QString name ) |
505 | { | 505 | { |
506 | return SmallIcon( name ); | 506 | return SmallIcon( name ); |
507 | 507 | ||
508 | } | 508 | } |
509 | void MainWindow::initActions() | 509 | void MainWindow::initActions() |
510 | { | 510 | { |
511 | //KOPrefs::instance()->mShowFullMenu | 511 | //KOPrefs::instance()->mShowFullMenu |
512 | iconToolBar->clear(); | 512 | iconToolBar->clear(); |
513 | KOPrefs *p = KOPrefs::instance(); | 513 | KOPrefs *p = KOPrefs::instance(); |
514 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); | 514 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); |
515 | 515 | ||
516 | QPopupMenu *viewMenu = new QPopupMenu( this ); | 516 | QPopupMenu *viewMenu = new QPopupMenu( this ); |
517 | QPopupMenu *actionMenu = new QPopupMenu( this ); | 517 | QPopupMenu *actionMenu = new QPopupMenu( this ); |
518 | QPopupMenu *importMenu = new QPopupMenu( this ); | 518 | QPopupMenu *importMenu = new QPopupMenu( this ); |
519 | QPopupMenu *importMenu_X = new QPopupMenu( this ); | 519 | QPopupMenu *importMenu_X = new QPopupMenu( this ); |
520 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); | 520 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); |
521 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); | 521 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); |
522 | selectFilterMenu = new QPopupMenu( this ); | 522 | selectFilterMenu = new QPopupMenu( this ); |
523 | selectFilterMenu->setCheckable( true ); | 523 | selectFilterMenu->setCheckable( true ); |
524 | syncMenu = new QPopupMenu( this ); | 524 | syncMenu = new QPopupMenu( this ); |
525 | configureAgendaMenu = new QPopupMenu( this ); | 525 | configureAgendaMenu = new QPopupMenu( this ); |
526 | configureToolBarMenu = new QPopupMenu( this ); | 526 | configureToolBarMenu = new QPopupMenu( this ); |
527 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 527 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
528 | QIconSet icon; | 528 | QIconSet icon; |
529 | int pixWid = 22, pixHei = 22; | 529 | int pixWid = 22, pixHei = 22; |
530 | QString pathString = ""; | 530 | QString pathString = ""; |
531 | if ( !p->mToolBarMiniIcons ) { | 531 | if ( !p->mToolBarMiniIcons ) { |
532 | if ( QApplication::desktop()->width() < 480 ) { | 532 | if ( QApplication::desktop()->width() < 480 ) { |
533 | pathString += "icons16/"; | 533 | pathString += "icons16/"; |
534 | pixWid = 18; pixHei = 16; | 534 | pixWid = 18; pixHei = 16; |
535 | } | 535 | } |
536 | } else { | 536 | } else { |
537 | pathString += "iconsmini/"; | 537 | pathString += "iconsmini/"; |
538 | pixWid = 18; pixHei = 16; | 538 | pixWid = 18; pixHei = 16; |
539 | } | 539 | } |
540 | if ( KOPrefs::instance()->mShowFullMenu ) { | 540 | if ( KOPrefs::instance()->mShowFullMenu ) { |
541 | QMenuBar *menuBar1; | 541 | QMenuBar *menuBar1; |
542 | menuBar1 = menuBar(); | 542 | menuBar1 = menuBar(); |
543 | menuBar1->insertItem( i18n("File"), importMenu ); | 543 | menuBar1->insertItem( i18n("File"), importMenu ); |
544 | menuBar1->insertItem( i18n("View"), viewMenu ); | 544 | menuBar1->insertItem( i18n("View"), viewMenu ); |
545 | menuBar1->insertItem( i18n("Actions"), actionMenu ); | 545 | menuBar1->insertItem( i18n("Actions"), actionMenu ); |
546 | #ifdef DESKTOP_VERSION | 546 | #ifdef DESKTOP_VERSION |
547 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); | 547 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); |
548 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 548 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
549 | #else | 549 | #else |
550 | menuBar1->insertItem( i18n("Sync"), syncMenu ); | 550 | menuBar1->insertItem( i18n("Sync"), syncMenu ); |
551 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); | 551 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); |
552 | #endif | 552 | #endif |
553 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 553 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
554 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); | 554 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); |
555 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 555 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
556 | } else { | 556 | } else { |
557 | QPEMenuBar *menuBar1; | 557 | QPEMenuBar *menuBar1; |
558 | menuBar1 = new QPEMenuBar( iconToolBar ); | 558 | menuBar1 = new QPEMenuBar( iconToolBar ); |
559 | QPopupMenu *menuBar = new QPopupMenu( this ); | 559 | QPopupMenu *menuBar = new QPopupMenu( this ); |
560 | icon = loadPixmap( pathString + "z_menu" ); | 560 | icon = loadPixmap( pathString + "z_menu" ); |
561 | menuBar1->insertItem( icon.pixmap(), menuBar); | 561 | menuBar1->insertItem( icon.pixmap(), menuBar); |
562 | //menuBar1->insertItem( i18n("ME"), menuBar); | 562 | //menuBar1->insertItem( i18n("ME"), menuBar); |
563 | menuBar->insertItem( i18n("File"), importMenu ); | 563 | menuBar->insertItem( i18n("File"), importMenu ); |
564 | menuBar->insertItem( i18n("View"), viewMenu ); | 564 | menuBar->insertItem( i18n("View"), viewMenu ); |
565 | menuBar->insertItem( i18n("Actions"), actionMenu ); | 565 | menuBar->insertItem( i18n("Actions"), actionMenu ); |
566 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); | 566 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); |
567 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 567 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
568 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 568 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
569 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 569 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
570 | menuBar->insertItem( i18n("Help"), helpMenu ); | 570 | menuBar->insertItem( i18n("Help"), helpMenu ); |
571 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 571 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
572 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 572 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
573 | } | 573 | } |
574 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 574 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
575 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); | 575 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); |
576 | mWeekBgColor = iconToolBar->backgroundColor(); | 576 | mWeekBgColor = iconToolBar->backgroundColor(); |
577 | mWeekPixmap.resize( pixWid , pixHei ); | 577 | mWeekPixmap.resize( pixWid , pixHei ); |
578 | mWeekPixmap.fill( mWeekBgColor ); | 578 | mWeekPixmap.fill( mWeekBgColor ); |
579 | icon = mWeekPixmap; | 579 | icon = mWeekPixmap; |
580 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); | 580 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); |
581 | if ( p-> mShowIconWeekNum ) | 581 | if ( p-> mShowIconWeekNum ) |
582 | mWeekAction->addTo( iconToolBar ); | 582 | mWeekAction->addTo( iconToolBar ); |
583 | mWeekFont = font(); | 583 | mWeekFont = font(); |
584 | 584 | ||
585 | int fontPoint = mWeekFont.pointSize(); | 585 | int fontPoint = mWeekFont.pointSize(); |
586 | QFontMetrics f( mWeekFont ); | 586 | QFontMetrics f( mWeekFont ); |
587 | int fontWid = f.width( "30" ); | 587 | int fontWid = f.width( "30" ); |
588 | while ( fontWid > pixWid ) { | 588 | while ( fontWid > pixWid ) { |
589 | --fontPoint; | 589 | --fontPoint; |
590 | mWeekFont.setPointSize( fontPoint ); | 590 | mWeekFont.setPointSize( fontPoint ); |
591 | QFontMetrics f( mWeekFont ); | 591 | QFontMetrics f( mWeekFont ); |
592 | fontWid = f.width( "30" ); | 592 | fontWid = f.width( "30" ); |
593 | qDebug("dec-- "); | 593 | qDebug("dec-- "); |
594 | } | 594 | } |
595 | 595 | ||
596 | connect( mWeekAction, SIGNAL( activated() ), | 596 | connect( mWeekAction, SIGNAL( activated() ), |
597 | this, SLOT( weekAction() ) ); | 597 | this, SLOT( weekAction() ) ); |
598 | 598 | ||
599 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); | 599 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); |
600 | 600 | ||
601 | //#endif | 601 | //#endif |
602 | // ****************** | 602 | // ****************** |
603 | QAction *action; | 603 | QAction *action; |
604 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 604 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
605 | configureToolBarMenu->setCheckable( true ); | 605 | configureToolBarMenu->setCheckable( true ); |
606 | 606 | ||
607 | 607 | ||
608 | configureAgendaMenu->setCheckable( true ); | 608 | configureAgendaMenu->setCheckable( true ); |
609 | int iii ; | 609 | int iii ; |
610 | for ( iii = 1;iii<= 10 ;++iii ){ | 610 | for ( iii = 1;iii<= 10 ;++iii ){ |
611 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); | 611 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); |
612 | } | 612 | } |
613 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 613 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
614 | 614 | ||
615 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), | 615 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), |
616 | this, SLOT( showConfigureAgenda( ) ) ); | 616 | this, SLOT( showConfigureAgenda( ) ) ); |
617 | 617 | ||
618 | icon = loadPixmap( pathString + "configure" ); | 618 | icon = loadPixmap( pathString + "configure" ); |
619 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); | 619 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); |
620 | action->addTo( actionMenu ); | 620 | action->addTo( actionMenu ); |
621 | connect( action, SIGNAL( activated() ), | 621 | connect( action, SIGNAL( activated() ), |
622 | mView, SLOT( edit_options() ) ); | 622 | mView, SLOT( edit_options() ) ); |
623 | actionMenu->insertSeparator(); | 623 | actionMenu->insertSeparator(); |
624 | 624 | ||
625 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | 625 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
626 | action->addTo( actionMenu ); | 626 | action->addTo( actionMenu ); |
627 | connect( action, SIGNAL( activated() ), | 627 | connect( action, SIGNAL( activated() ), |
628 | mView, SLOT( undo_delete() ) ); | 628 | mView, SLOT( undo_delete() ) ); |
629 | actionMenu->insertSeparator(); | 629 | actionMenu->insertSeparator(); |
630 | 630 | ||
631 | icon = loadPixmap( pathString + "newevent" ); | 631 | icon = loadPixmap( pathString + "newevent" ); |
632 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 632 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
633 | configureToolBarMenu->insertSeparator(); | 633 | configureToolBarMenu->insertSeparator(); |
634 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); | 634 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); |
635 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 635 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
636 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 636 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
637 | ne_action->addTo( actionMenu ); | 637 | ne_action->addTo( actionMenu ); |
638 | connect( ne_action, SIGNAL( activated() ), | 638 | connect( ne_action, SIGNAL( activated() ), |
639 | mView, SLOT( newEvent() ) ); | 639 | mView, SLOT( newEvent() ) ); |
640 | icon = loadPixmap( pathString + "newtodo" ); | 640 | icon = loadPixmap( pathString + "newtodo" ); |
641 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 641 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
642 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 642 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
643 | nt_action->addTo( actionMenu ); | 643 | nt_action->addTo( actionMenu ); |
644 | connect( nt_action, SIGNAL( activated() ), | 644 | connect( nt_action, SIGNAL( activated() ), |
645 | mView, SLOT( newTodo() ) ); | 645 | mView, SLOT( newTodo() ) ); |
646 | 646 | ||
647 | icon = loadPixmap( pathString + "today" ); | 647 | icon = loadPixmap( pathString + "today" ); |
648 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 648 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
649 | today_action->addTo( viewMenu ); | 649 | today_action->addTo( viewMenu ); |
650 | connect( today_action, SIGNAL( activated() ), | 650 | connect( today_action, SIGNAL( activated() ), |
651 | mView, SLOT( goToday() ) ); | 651 | mView, SLOT( goToday() ) ); |
652 | viewMenu->insertSeparator(); | 652 | viewMenu->insertSeparator(); |
653 | 653 | ||
654 | icon = loadPixmap( pathString + "navi" ); | 654 | icon = loadPixmap( pathString + "navi" ); |
655 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 655 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
656 | action->addTo( viewMenu ); | 656 | action->addTo( viewMenu ); |
657 | connect( action, SIGNAL( activated() ), | 657 | connect( action, SIGNAL( activated() ), |
658 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 658 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
659 | mToggleNav = action ; | 659 | mToggleNav = action ; |
660 | icon = loadPixmap( pathString + "filter" ); | 660 | icon = loadPixmap( pathString + "filter" ); |
661 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); | 661 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); |
662 | action->addTo( viewMenu ); | 662 | action->addTo( viewMenu ); |
663 | connect( action, SIGNAL( activated() ), | 663 | connect( action, SIGNAL( activated() ), |
664 | mView, SLOT( toggleFilter() ) ); | 664 | mView, SLOT( toggleFilter() ) ); |
665 | mToggleFilter = action; | 665 | mToggleFilter = action; |
666 | icon = loadPixmap( pathString + "allday" ); | 666 | icon = loadPixmap( pathString + "allday" ); |
667 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); | 667 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); |
668 | action->addTo( viewMenu ); | 668 | action->addTo( viewMenu ); |
669 | connect( action, SIGNAL( activated() ), | 669 | connect( action, SIGNAL( activated() ), |
670 | mView, SLOT( toggleAllDaySize() ) ); | 670 | mView, SLOT( toggleAllDaySize() ) ); |
671 | mToggleAllday = action; | 671 | mToggleAllday = action; |
672 | 672 | ||
673 | 673 | ||
674 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 674 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
675 | mToggleNav, SLOT( setEnabled ( bool ) ) ); | 675 | mToggleNav, SLOT( setEnabled ( bool ) ) ); |
676 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 676 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
677 | mToggleFilter, SLOT( setEnabled ( bool ) ) ); | 677 | mToggleFilter, SLOT( setEnabled ( bool ) ) ); |
678 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 678 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
679 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); | 679 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); |
680 | 680 | ||
681 | viewMenu->insertSeparator(); | 681 | viewMenu->insertSeparator(); |
682 | icon = loadPixmap( pathString + "picker" ); | 682 | icon = loadPixmap( pathString + "picker" ); |
683 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); | 683 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); |
684 | action->addTo( viewMenu ); | 684 | action->addTo( viewMenu ); |
685 | connect( action, SIGNAL( activated() ), | 685 | connect( action, SIGNAL( activated() ), |
686 | mView, SLOT( showDatePicker() ) ); | 686 | mView, SLOT( showDatePicker() ) ); |
687 | action->addTo( iconToolBar ); | 687 | action->addTo( iconToolBar ); |
688 | viewMenu->insertSeparator(); | 688 | viewMenu->insertSeparator(); |
689 | icon = loadPixmap( pathString + "list" ); | 689 | |
690 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | 690 | |
691 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | 691 | icon = loadPixmap( pathString + "whatsnext" ); |
692 | showlist_action->addTo( viewMenu ); | 692 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); |
693 | connect( showlist_action, SIGNAL( activated() ), | 693 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
694 | mView->viewManager(), SLOT( showListView() ) ); | 694 | whatsnext_action->addTo( viewMenu ); |
695 | connect( whatsnext_action, SIGNAL( activated() ), | ||
696 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | ||
697 | |||
698 | icon = loadPixmap( pathString + "xdays" ); | ||
699 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); | ||
700 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | ||
701 | xdays_action->addTo( viewMenu ); | ||
702 | connect( xdays_action, SIGNAL( activated() ), | ||
703 | mView->viewManager(), SLOT( showNextXView() ) ); | ||
704 | |||
705 | |||
706 | icon = loadPixmap( pathString + "journal" ); | ||
707 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | ||
708 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | ||
709 | viewjournal_action->addTo( viewMenu ); | ||
710 | connect( viewjournal_action, SIGNAL( activated() ), | ||
711 | mView->viewManager(), SLOT( showJournalView() ) ); | ||
695 | 712 | ||
696 | 713 | ||
697 | icon = loadPixmap( pathString + "day" ); | 714 | icon = loadPixmap( pathString + "day" ); |
698 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 715 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
699 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 716 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
700 | day1_action->addTo( viewMenu ); | 717 | day1_action->addTo( viewMenu ); |
701 | // action->addTo( toolBar ); | 718 | // action->addTo( toolBar ); |
702 | connect( day1_action, SIGNAL( activated() ), | 719 | connect( day1_action, SIGNAL( activated() ), |
703 | mView->viewManager(), SLOT( showDayView() ) ); | 720 | mView->viewManager(), SLOT( showDayView() ) ); |
704 | 721 | ||
705 | icon = loadPixmap( pathString + "workweek" ); | 722 | icon = loadPixmap( pathString + "workweek" ); |
706 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 723 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
707 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 724 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
708 | day5_action->addTo( viewMenu ); | 725 | day5_action->addTo( viewMenu ); |
709 | connect( day5_action, SIGNAL( activated() ), | 726 | connect( day5_action, SIGNAL( activated() ), |
710 | mView->viewManager(), SLOT( showWorkWeekView() ) ); | 727 | mView->viewManager(), SLOT( showWorkWeekView() ) ); |
711 | 728 | ||
712 | icon = loadPixmap( pathString + "week" ); | 729 | icon = loadPixmap( pathString + "week" ); |
713 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 730 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
714 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 731 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
715 | day7_action->addTo( viewMenu ); | 732 | day7_action->addTo( viewMenu ); |
716 | connect( day7_action, SIGNAL( activated() ), | 733 | connect( day7_action, SIGNAL( activated() ), |
717 | mView->viewManager(), SLOT( showWeekView() ) ); | 734 | mView->viewManager(), SLOT( showWeekView() ) ); |
718 | 735 | ||
719 | icon = loadPixmap( pathString + "workweek2" ); | 736 | icon = loadPixmap( pathString + "workweek2" ); |
720 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); | 737 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); |
721 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); | 738 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); |
722 | day6_action->addTo( viewMenu ); | 739 | day6_action->addTo( viewMenu ); |
723 | connect( day6_action, SIGNAL( activated() ), | 740 | connect( day6_action, SIGNAL( activated() ), |
724 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); | 741 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); |
725 | 742 | ||
726 | icon = loadPixmap( pathString + "month" ); | 743 | icon = loadPixmap( pathString + "month" ); |
727 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 744 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
728 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 745 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
729 | month_action->addTo( viewMenu ); | 746 | month_action->addTo( viewMenu ); |
730 | connect( month_action, SIGNAL( activated() ), | 747 | connect( month_action, SIGNAL( activated() ), |
731 | mView->viewManager(), SLOT( showMonthView() ) ); | 748 | mView->viewManager(), SLOT( showMonthView() ) ); |
732 | 749 | ||
750 | icon = loadPixmap( pathString + "list" ); | ||
751 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | ||
752 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | ||
753 | showlist_action->addTo( viewMenu ); | ||
754 | connect( showlist_action, SIGNAL( activated() ), | ||
755 | mView->viewManager(), SLOT( showListView() ) ); | ||
756 | |||
733 | icon = loadPixmap( pathString + "todo" ); | 757 | icon = loadPixmap( pathString + "todo" ); |
734 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 758 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
735 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 759 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
736 | todoview_action->addTo( viewMenu ); | 760 | todoview_action->addTo( viewMenu ); |
737 | connect( todoview_action, SIGNAL( activated() ), | 761 | connect( todoview_action, SIGNAL( activated() ), |
738 | mView->viewManager(), SLOT( showTodoView() ) ); | 762 | mView->viewManager(), SLOT( showTodoView() ) ); |
739 | 763 | ||
740 | icon = loadPixmap( pathString + "journal" ); | ||
741 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | ||
742 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | ||
743 | viewjournal_action->addTo( viewMenu ); | ||
744 | connect( viewjournal_action, SIGNAL( activated() ), | ||
745 | mView->viewManager(), SLOT( showJournalView() ) ); | ||
746 | |||
747 | icon = loadPixmap( pathString + "xdays" ); | ||
748 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); | ||
749 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | ||
750 | xdays_action->addTo( viewMenu ); | ||
751 | connect( xdays_action, SIGNAL( activated() ), | ||
752 | mView->viewManager(), SLOT( showNextXView() ) ); | ||
753 | 764 | ||
754 | icon = loadPixmap( pathString + "whatsnext" ); | ||
755 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); | ||
756 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | ||
757 | whatsnext_action->addTo( viewMenu ); | ||
758 | connect( whatsnext_action, SIGNAL( activated() ), | ||
759 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | ||
760 | 765 | ||
761 | #if 0 | 766 | #if 0 |
762 | action = new QAction( "view_timespan", "Time Span", 0, this ); | 767 | action = new QAction( "view_timespan", "Time Span", 0, this ); |
763 | action->addTo( viewMenu ); | 768 | action->addTo( viewMenu ); |
764 | connect( action, SIGNAL( activated() ), | 769 | connect( action, SIGNAL( activated() ), |
765 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 770 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
766 | #endif | 771 | #endif |
767 | 772 | ||
768 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 773 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, |
769 | this ); | 774 | this ); |
770 | mNewSubTodoAction->addTo( actionMenu ); | 775 | mNewSubTodoAction->addTo( actionMenu ); |
771 | connect( mNewSubTodoAction, SIGNAL( activated() ), | 776 | connect( mNewSubTodoAction, SIGNAL( activated() ), |
772 | mView, SLOT( newSubTodo() ) ); | 777 | mView, SLOT( newSubTodo() ) ); |
773 | 778 | ||
774 | actionMenu->insertSeparator(); | 779 | actionMenu->insertSeparator(); |
775 | 780 | ||
776 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); | 781 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); |
777 | mShowAction->addTo( actionMenu ); | 782 | mShowAction->addTo( actionMenu ); |
778 | connect( mShowAction, SIGNAL( activated() ), | 783 | connect( mShowAction, SIGNAL( activated() ), |
779 | mView, SLOT( showIncidence() ) ); | 784 | mView, SLOT( showIncidence() ) ); |
780 | 785 | ||
781 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); | 786 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); |
782 | mEditAction->addTo( actionMenu ); | 787 | mEditAction->addTo( actionMenu ); |
783 | connect( mEditAction, SIGNAL( activated() ), | 788 | connect( mEditAction, SIGNAL( activated() ), |
784 | mView, SLOT( editIncidence() ) ); | 789 | mView, SLOT( editIncidence() ) ); |
785 | 790 | ||
786 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); | 791 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); |
787 | mDeleteAction->addTo( actionMenu ); | 792 | mDeleteAction->addTo( actionMenu ); |
788 | connect( mDeleteAction, SIGNAL( activated() ), | 793 | connect( mDeleteAction, SIGNAL( activated() ), |
789 | mView, SLOT( deleteIncidence() ) ); | 794 | mView, SLOT( deleteIncidence() ) ); |
790 | 795 | ||
791 | 796 | ||
792 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); | 797 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); |
793 | mCloneAction->addTo( actionMenu ); | 798 | mCloneAction->addTo( actionMenu ); |
794 | connect( mCloneAction, SIGNAL( activated() ), | 799 | connect( mCloneAction, SIGNAL( activated() ), |
795 | mView, SLOT( cloneIncidence() ) ); | 800 | mView, SLOT( cloneIncidence() ) ); |
796 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); | 801 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); |
797 | mMoveAction->addTo( actionMenu ); | 802 | mMoveAction->addTo( actionMenu ); |
798 | connect( mMoveAction, SIGNAL( activated() ), | 803 | connect( mMoveAction, SIGNAL( activated() ), |
799 | mView, SLOT( moveIncidence() ) ); | 804 | mView, SLOT( moveIncidence() ) ); |
800 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); | 805 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); |
801 | mBeamAction->addTo( actionMenu ); | 806 | mBeamAction->addTo( actionMenu ); |
802 | connect( mBeamAction, SIGNAL( activated() ), | 807 | connect( mBeamAction, SIGNAL( activated() ), |
803 | mView, SLOT( beamIncidence() ) ); | 808 | mView, SLOT( beamIncidence() ) ); |
804 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); | 809 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); |
805 | mCancelAction->addTo( actionMenu ); | 810 | mCancelAction->addTo( actionMenu ); |
806 | connect( mCancelAction, SIGNAL( activated() ), | 811 | connect( mCancelAction, SIGNAL( activated() ), |
807 | mView, SLOT( toggleCancelIncidence() ) ); | 812 | mView, SLOT( toggleCancelIncidence() ) ); |
808 | 813 | ||
809 | actionMenu->insertSeparator(); | 814 | actionMenu->insertSeparator(); |
810 | 815 | ||
811 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, | 816 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, |
812 | this ); | 817 | this ); |
813 | action->addTo( actionMenu ); | 818 | action->addTo( actionMenu ); |
814 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); | 819 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); |
815 | 820 | ||
816 | icon = loadPixmap( pathString + "search" ); | 821 | icon = loadPixmap( pathString + "search" ); |
817 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 822 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); |
818 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); | 823 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); |
819 | search_action->addTo( actionMenu ); | 824 | search_action->addTo( actionMenu ); |
820 | connect( search_action, SIGNAL( activated() ), | 825 | connect( search_action, SIGNAL( activated() ), |
821 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 826 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
822 | 827 | ||
823 | 828 | ||
824 | 829 | ||
825 | if ( KOPrefs::instance()->mShowFullMenu ) { | 830 | if ( KOPrefs::instance()->mShowFullMenu ) { |
826 | actionMenu->insertSeparator(); | 831 | actionMenu->insertSeparator(); |
827 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); | 832 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); |
828 | 833 | ||
829 | } | 834 | } |
830 | // actionMenu->insertSeparator(); | 835 | // actionMenu->insertSeparator(); |
831 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, | 836 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, |
832 | this ); | 837 | this ); |
833 | action->addTo( importMenu_X ); | 838 | action->addTo( importMenu_X ); |
834 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); | 839 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); |
835 | action = new QAction( "import_quick", i18n("Import last file"), 0, | 840 | action = new QAction( "import_quick", i18n("Import last file"), 0, |
836 | this ); | 841 | this ); |
837 | action->addTo( importMenu_X ); | 842 | action->addTo( importMenu_X ); |
838 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); | 843 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); |
839 | importMenu_X->insertSeparator(); | 844 | importMenu_X->insertSeparator(); |
840 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, | 845 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, |
841 | this ); | 846 | this ); |
842 | action->addTo( importMenu_X ); | 847 | action->addTo( importMenu_X ); |
843 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); | 848 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); |
844 | //#ifndef DESKTOP_VERSION | 849 | //#ifndef DESKTOP_VERSION |
845 | importMenu_X->insertSeparator(); | 850 | importMenu_X->insertSeparator(); |
846 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, | 851 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, |
847 | this ); | 852 | this ); |
848 | action->addTo( importMenu_X ); | 853 | action->addTo( importMenu_X ); |
849 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); | 854 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); |
850 | //#else | 855 | //#else |
851 | #ifdef _OL_IMPORT_ | 856 | #ifdef _OL_IMPORT_ |
852 | importMenu_X->insertSeparator(); | 857 | importMenu_X->insertSeparator(); |
853 | action = new QAction( "import_ol", i18n("Import from OL"), 0, | 858 | action = new QAction( "import_ol", i18n("Import from OL"), 0, |
854 | this ); | 859 | this ); |
855 | action->addTo( importMenu_X ); | 860 | action->addTo( importMenu_X ); |
856 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); | 861 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); |
857 | #endif | 862 | #endif |
858 | //#endif | 863 | //#endif |
859 | 864 | ||
860 | //importMenu->insertSeparator(); | 865 | //importMenu->insertSeparator(); |
861 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, | 866 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, |
862 | this ); | 867 | this ); |
863 | action->addTo( importMenu ); | 868 | action->addTo( importMenu ); |
864 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); | 869 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); |
865 | 870 | ||
866 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, | 871 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, |
867 | this ); | 872 | this ); |
868 | action->addTo( importMenu ); | 873 | action->addTo( importMenu ); |
869 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 874 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
870 | importMenu->insertSeparator(); | 875 | importMenu->insertSeparator(); |
871 | importMenu->insertItem( i18n("Import"), importMenu_X ); | 876 | importMenu->insertItem( i18n("Import"), importMenu_X ); |
872 | //importMenu->insertSeparator(); | 877 | //importMenu->insertSeparator(); |
873 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 878 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, |
874 | this ); | 879 | this ); |
875 | action->addTo( exportMenu_X ); | 880 | action->addTo( exportMenu_X ); |
876 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 881 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
877 | 882 | ||
878 | 883 | ||
879 | //LR | 884 | //LR |
880 | QPopupMenu *ex2phone = new QPopupMenu( this ); | 885 | QPopupMenu *ex2phone = new QPopupMenu( this ); |
881 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 886 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
882 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 887 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
883 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); | 888 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); |
884 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); | 889 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); |
885 | 890 | ||
886 | importMenu->insertItem( i18n("Export"), exportMenu_X ); | 891 | importMenu->insertItem( i18n("Export"), exportMenu_X ); |
887 | #ifndef DESKTOP_VERSION | 892 | #ifndef DESKTOP_VERSION |
888 | //importMenu->insertSeparator(); | 893 | //importMenu->insertSeparator(); |
889 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, | 894 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, |
890 | this ); | 895 | this ); |
891 | brAction->addTo( beamMenu_X ); | 896 | brAction->addTo( beamMenu_X ); |
892 | brAction->setToggleAction (true ) ; | 897 | brAction->setToggleAction (true ) ; |
893 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 898 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
894 | 899 | ||
895 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 900 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
896 | this ); | 901 | this ); |
897 | action->addTo( beamMenu_X ); | 902 | action->addTo( beamMenu_X ); |
898 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 903 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
899 | 904 | ||
900 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 905 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
901 | this ); | 906 | this ); |
902 | action->addTo( beamMenu_X ); | 907 | action->addTo( beamMenu_X ); |
903 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 908 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
904 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); | 909 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); |
905 | #else | 910 | #else |
906 | //importMenu->insertSeparator(); | 911 | //importMenu->insertSeparator(); |
907 | icon = loadPixmap( pathString + "print" ); | 912 | icon = loadPixmap( pathString + "print" ); |
908 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 913 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
909 | action->addTo( beamMenu_X ); | 914 | action->addTo( beamMenu_X ); |
910 | connect( action, SIGNAL( activated() ), | 915 | connect( action, SIGNAL( activated() ), |
911 | this, SLOT( printCal() ) ); | 916 | this, SLOT( printCal() ) ); |
912 | 917 | ||
913 | icon = loadPixmap( pathString + "print" ); | 918 | icon = loadPixmap( pathString + "print" ); |
914 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 919 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
915 | action->addTo( beamMenu_X ); | 920 | action->addTo( beamMenu_X ); |
916 | connect( action, SIGNAL( activated() ), | 921 | connect( action, SIGNAL( activated() ), |
917 | this, SLOT( printSel() ) ); | 922 | this, SLOT( printSel() ) ); |
918 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); | 923 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); |
919 | action->addTo( beamMenu_X ); | 924 | action->addTo( beamMenu_X ); |
920 | connect( action, SIGNAL( activated() ), | 925 | connect( action, SIGNAL( activated() ), |
921 | mView->viewManager(), SIGNAL( printWNV() ) ); | 926 | mView->viewManager(), SIGNAL( printWNV() ) ); |
922 | importMenu->insertItem( i18n("Print"), beamMenu_X ); | 927 | importMenu->insertItem( i18n("Print"), beamMenu_X ); |
923 | #endif | 928 | #endif |
924 | importMenu->insertSeparator(); | 929 | importMenu->insertSeparator(); |
925 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 930 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
926 | this ); | 931 | this ); |
927 | action->addTo( importMenu ); | 932 | action->addTo( importMenu ); |
928 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 933 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
929 | importMenu->insertSeparator(); | 934 | importMenu->insertSeparator(); |
930 | action = new QAction( "beam all", i18n("Save"), 0, | 935 | action = new QAction( "beam all", i18n("Save"), 0, |
931 | this ); | 936 | this ); |
932 | action->addTo( importMenu ); | 937 | action->addTo( importMenu ); |
933 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 938 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
934 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 939 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
935 | this ); | 940 | this ); |
936 | action->addTo( importMenu ); | 941 | action->addTo( importMenu ); |
937 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 942 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
938 | 943 | ||
939 | //menuBar->insertItem( "Configure",configureMenu ); | 944 | //menuBar->insertItem( "Configure",configureMenu ); |
940 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 945 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
941 | icon = loadPixmap( "korganizer/korganizer" ); | 946 | icon = loadPixmap( "korganizer/korganizer" ); |
942 | 947 | ||
943 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 948 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
944 | action->addTo( helpMenu ); | 949 | action->addTo( helpMenu ); |
945 | connect( action, SIGNAL( activated() ), | 950 | connect( action, SIGNAL( activated() ), |
946 | SLOT( whatsNew() ) ); | 951 | SLOT( whatsNew() ) ); |
947 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 952 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
948 | action->addTo( helpMenu ); | 953 | action->addTo( helpMenu ); |
949 | connect( action, SIGNAL( activated() ), | 954 | connect( action, SIGNAL( activated() ), |
950 | SLOT( features() ) ); | 955 | SLOT( features() ) ); |
951 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 956 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
952 | action->addTo( helpMenu ); | 957 | action->addTo( helpMenu ); |
953 | connect( action, SIGNAL( activated() ), | 958 | connect( action, SIGNAL( activated() ), |
954 | SLOT( keyBindings() ) ); | 959 | SLOT( keyBindings() ) ); |
955 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 960 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
956 | action->addTo( helpMenu ); | 961 | action->addTo( helpMenu ); |
957 | connect( action, SIGNAL( activated() ), | 962 | connect( action, SIGNAL( activated() ), |
958 | SLOT( synchowto() ) ); | 963 | SLOT( synchowto() ) ); |
959 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); | 964 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); |
960 | action->addTo( helpMenu ); | 965 | action->addTo( helpMenu ); |
961 | connect( action, SIGNAL( activated() ), | 966 | connect( action, SIGNAL( activated() ), |
962 | SLOT( kdesynchowto() ) ); | 967 | SLOT( kdesynchowto() ) ); |
963 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); | 968 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); |
964 | action->addTo( helpMenu ); | 969 | action->addTo( helpMenu ); |
965 | connect( action, SIGNAL( activated() ), | 970 | connect( action, SIGNAL( activated() ), |
966 | SLOT( multisynchowto() ) ); | 971 | SLOT( multisynchowto() ) ); |
967 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 972 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
968 | action->addTo( helpMenu ); | 973 | action->addTo( helpMenu ); |
969 | connect( action, SIGNAL( activated() ), | 974 | connect( action, SIGNAL( activated() ), |
970 | SLOT( aboutAutoSaving() ) ); | 975 | SLOT( aboutAutoSaving() ) ); |
971 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 976 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
972 | action->addTo( helpMenu ); | 977 | action->addTo( helpMenu ); |
973 | connect( action, SIGNAL( activated() ), | 978 | connect( action, SIGNAL( activated() ), |
974 | SLOT( aboutKnownBugs() ) ); | 979 | SLOT( aboutKnownBugs() ) ); |
975 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 980 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
976 | action->addTo( helpMenu ); | 981 | action->addTo( helpMenu ); |
977 | connect( action, SIGNAL( activated() ), | 982 | connect( action, SIGNAL( activated() ), |
978 | SLOT( usertrans() ) ); | 983 | SLOT( usertrans() ) ); |
979 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 984 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
980 | action->addTo( helpMenu ); | 985 | action->addTo( helpMenu ); |
981 | connect( action, SIGNAL( activated() ), | 986 | connect( action, SIGNAL( activated() ), |
982 | SLOT( faq() ) ); | 987 | SLOT( faq() ) ); |
983 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | 988 | action = new QAction( "licence", i18n("Licence..."), 0, this ); |
984 | action->addTo( helpMenu ); | 989 | action->addTo( helpMenu ); |
985 | connect( action, SIGNAL( activated() ), | 990 | connect( action, SIGNAL( activated() ), |
986 | SLOT( licence() ) ); | 991 | SLOT( licence() ) ); |
987 | action = new QAction( "about", i18n("About..."), 0, this ); | 992 | action = new QAction( "about", i18n("About..."), 0, this ); |
988 | action->addTo( helpMenu ); | 993 | action->addTo( helpMenu ); |
989 | connect( action, SIGNAL( activated() ), | 994 | connect( action, SIGNAL( activated() ), |
990 | SLOT( about() ) ); | 995 | SLOT( about() ) ); |
991 | //menuBar->insertSeparator(); | 996 | //menuBar->insertSeparator(); |
992 | 997 | ||
993 | // ****************************************************** | 998 | // ****************************************************** |
994 | // menubar icons | 999 | // menubar icons |
995 | 1000 | ||
996 | 1001 | ||
997 | iconToolBar->setHorizontalStretchable (true ); | 1002 | iconToolBar->setHorizontalStretchable (true ); |
998 | //menuBar->insertItem( iconToolBar ); | 1003 | //menuBar->insertItem( iconToolBar ); |
999 | //xdays_action | 1004 | //xdays_action |
1000 | if (p-> mShowIconNewEvent) | 1005 | if (p-> mShowIconNewEvent) |
1001 | ne_action->addTo( iconToolBar ); | 1006 | ne_action->addTo( iconToolBar ); |
1002 | if (p->mShowIconNewTodo ) | 1007 | if (p->mShowIconNewTodo ) |
1003 | nt_action->addTo( iconToolBar ); | 1008 | nt_action->addTo( iconToolBar ); |
1004 | if (p-> mShowIconSearch) | 1009 | if (p-> mShowIconSearch) |
1005 | search_action->addTo( iconToolBar ); | 1010 | search_action->addTo( iconToolBar ); |
1006 | if (p-> mShowIconWhatsThis) | 1011 | if (p-> mShowIconWhatsThis) |
1007 | QWhatsThis::whatsThisButton ( iconToolBar ); | 1012 | QWhatsThis::whatsThisButton ( iconToolBar ); |
1008 | if (p-> mShowIconNext) | 1013 | if (p-> mShowIconNext) |
1009 | whatsnext_action->addTo( iconToolBar ); | 1014 | whatsnext_action->addTo( iconToolBar ); |
1010 | if (p-> mShowIconNextDays) | 1015 | if (p-> mShowIconNextDays) |
1011 | xdays_action->addTo( iconToolBar ); | 1016 | xdays_action->addTo( iconToolBar ); |
1012 | if (p-> mShowIconJournal) | 1017 | if (p-> mShowIconJournal) |
1013 | viewjournal_action->addTo( iconToolBar ); | 1018 | viewjournal_action->addTo( iconToolBar ); |
1014 | if (p-> mShowIconDay1) | 1019 | if (p-> mShowIconDay1) |
1015 | day1_action->addTo( iconToolBar ); | 1020 | day1_action->addTo( iconToolBar ); |
1016 | if (p-> mShowIconDay5) | 1021 | if (p-> mShowIconDay5) |
1017 | day5_action->addTo( iconToolBar ); | 1022 | day5_action->addTo( iconToolBar ); |
1018 | if (p-> mShowIconDay7) | 1023 | if (p-> mShowIconDay7) |
1019 | day7_action->addTo( iconToolBar ); | 1024 | day7_action->addTo( iconToolBar ); |
1020 | if (p-> mShowIconDay6) | 1025 | if (p-> mShowIconDay6) |
1021 | day6_action->addTo( iconToolBar ); | 1026 | day6_action->addTo( iconToolBar ); |
1022 | if (p-> mShowIconMonth) | 1027 | if (p-> mShowIconMonth) |
1023 | month_action->addTo( iconToolBar ); | 1028 | month_action->addTo( iconToolBar ); |
1024 | if (p-> mShowIconList) | 1029 | if (p-> mShowIconList) |
1025 | showlist_action->addTo( iconToolBar ); | 1030 | showlist_action->addTo( iconToolBar ); |
1026 | if (p-> mShowIconTodoview) | 1031 | if (p-> mShowIconTodoview) |
1027 | todoview_action->addTo( iconToolBar ); | 1032 | todoview_action->addTo( iconToolBar ); |
1028 | 1033 | ||
1029 | icon = loadPixmap( pathString + "2leftarrowB" ); | 1034 | icon = loadPixmap( pathString + "2leftarrowB" ); |
1030 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); | 1035 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); |
1031 | if (p-> mShowIconBackFast) { | 1036 | if (p-> mShowIconBackFast) { |
1032 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 1037 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
1033 | connect( action, SIGNAL( activated() ), | 1038 | connect( action, SIGNAL( activated() ), |
1034 | mView, SLOT( goPreviousMonth() ) ); | 1039 | mView, SLOT( goPreviousMonth() ) ); |
1035 | action->addTo( iconToolBar ); | 1040 | action->addTo( iconToolBar ); |
1036 | } | 1041 | } |
1037 | icon = loadPixmap( pathString + "1leftarrowB" ); | 1042 | icon = loadPixmap( pathString + "1leftarrowB" ); |
1038 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); | 1043 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); |
1039 | if (p-> mShowIconBack) { | 1044 | if (p-> mShowIconBack) { |
1040 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 1045 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
1041 | connect( action, SIGNAL( activated() ), | 1046 | connect( action, SIGNAL( activated() ), |
1042 | mView, SLOT( goPrevious() ) ); | 1047 | mView, SLOT( goPrevious() ) ); |
1043 | action->addTo( iconToolBar ); | 1048 | action->addTo( iconToolBar ); |
1044 | } | 1049 | } |
1045 | icon = loadPixmap( pathString + "today" ); | 1050 | icon = loadPixmap( pathString + "today" ); |
1046 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 1051 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
1047 | if (p-> mShowIconToday) | 1052 | if (p-> mShowIconToday) |
1048 | today_action->addTo( iconToolBar ); | 1053 | today_action->addTo( iconToolBar ); |
1049 | icon = loadPixmap( pathString + "1rightarrowB" ); | 1054 | icon = loadPixmap( pathString + "1rightarrowB" ); |
1050 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 1055 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
1051 | if (p-> mShowIconForward) { | 1056 | if (p-> mShowIconForward) { |
1052 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 1057 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
1053 | connect( action, SIGNAL( activated() ), | 1058 | connect( action, SIGNAL( activated() ), |
1054 | mView, SLOT( goNext() ) ); | 1059 | mView, SLOT( goNext() ) ); |
1055 | action->addTo( iconToolBar ); | 1060 | action->addTo( iconToolBar ); |
1056 | } | 1061 | } |
1057 | icon = loadPixmap( pathString + "2rightarrowB" ); | 1062 | icon = loadPixmap( pathString + "2rightarrowB" ); |
1058 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 1063 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
1059 | if (p-> mShowIconForwardFast) { | 1064 | if (p-> mShowIconForwardFast) { |
1060 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); | 1065 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); |
1061 | connect( action, SIGNAL( activated() ), | 1066 | connect( action, SIGNAL( activated() ), |
1062 | mView, SLOT( goNextMonth() ) ); | 1067 | mView, SLOT( goNextMonth() ) ); |
1063 | action->addTo( iconToolBar ); | 1068 | action->addTo( iconToolBar ); |
1064 | } | 1069 | } |
1065 | 1070 | ||
1066 | 1071 | ||
1067 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); | 1072 | configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); |
1068 | 1073 | ||
1069 | if (p-> mShowIconNewEvent) | 1074 | if (p-> mShowIconNewEvent) |
1070 | configureToolBarMenu->setItemChecked( 10, true ); | 1075 | configureToolBarMenu->setItemChecked( 10, true ); |
1071 | if (p->mShowIconNewTodo ) | 1076 | if (p->mShowIconNewTodo ) |
1072 | configureToolBarMenu->setItemChecked( 20, true ); | 1077 | configureToolBarMenu->setItemChecked( 20, true ); |
1073 | if (p-> mShowIconSearch) | 1078 | if (p-> mShowIconSearch) |
1074 | configureToolBarMenu->setItemChecked( 120, true ); | 1079 | configureToolBarMenu->setItemChecked( 120, true ); |
1075 | if (p-> mShowIconList) | 1080 | if (p-> mShowIconList) |
1076 | configureToolBarMenu->setItemChecked( 30, true ); | 1081 | configureToolBarMenu->setItemChecked( 30, true ); |
1077 | if (p-> mShowIconDay1) | 1082 | if (p-> mShowIconDay1) |
1078 | configureToolBarMenu->setItemChecked( 40, true ); | 1083 | configureToolBarMenu->setItemChecked( 40, true ); |
1079 | if (p-> mShowIconDay5) | 1084 | if (p-> mShowIconDay5) |
1080 | configureToolBarMenu->setItemChecked( 50, true ); | 1085 | configureToolBarMenu->setItemChecked( 50, true ); |
1081 | if (p-> mShowIconDay6) | 1086 | if (p-> mShowIconDay6) |
1082 | configureToolBarMenu->setItemChecked( 75, true ); | 1087 | configureToolBarMenu->setItemChecked( 75, true ); |
1083 | if (p-> mShowIconDay7) | 1088 | if (p-> mShowIconDay7) |
1084 | configureToolBarMenu->setItemChecked( 60, true ); | 1089 | configureToolBarMenu->setItemChecked( 60, true ); |
1085 | if (p-> mShowIconMonth) | 1090 | if (p-> mShowIconMonth) |
1086 | configureToolBarMenu->setItemChecked( 70, true ); | 1091 | configureToolBarMenu->setItemChecked( 70, true ); |
1087 | if (p-> mShowIconTodoview) | 1092 | if (p-> mShowIconTodoview) |
1088 | configureToolBarMenu->setItemChecked( 80, true ); | 1093 | configureToolBarMenu->setItemChecked( 80, true ); |
1089 | if (p-> mShowIconBackFast) | 1094 | if (p-> mShowIconBackFast) |
1090 | configureToolBarMenu->setItemChecked( 200, true ); | 1095 | configureToolBarMenu->setItemChecked( 200, true ); |
1091 | if (p-> mShowIconBack) | 1096 | if (p-> mShowIconBack) |
1092 | configureToolBarMenu->setItemChecked( 210, true ); | 1097 | configureToolBarMenu->setItemChecked( 210, true ); |
1093 | if (p-> mShowIconToday) | 1098 | if (p-> mShowIconToday) |
1094 | configureToolBarMenu->setItemChecked( 130, true ); | 1099 | configureToolBarMenu->setItemChecked( 130, true ); |
1095 | if (p-> mShowIconForward) | 1100 | if (p-> mShowIconForward) |
1096 | configureToolBarMenu->setItemChecked( 220, true ); | 1101 | configureToolBarMenu->setItemChecked( 220, true ); |
1097 | if (p-> mShowIconForwardFast) | 1102 | if (p-> mShowIconForwardFast) |
1098 | configureToolBarMenu->setItemChecked( 230, true ); | 1103 | configureToolBarMenu->setItemChecked( 230, true ); |
1099 | if (p-> mShowIconNextDays) | 1104 | if (p-> mShowIconNextDays) |
1100 | configureToolBarMenu->setItemChecked( 100, true ); | 1105 | configureToolBarMenu->setItemChecked( 100, true ); |
1101 | if (p-> mShowIconNext) | 1106 | if (p-> mShowIconNext) |
1102 | configureToolBarMenu->setItemChecked( 110, true ); | 1107 | configureToolBarMenu->setItemChecked( 110, true ); |
1103 | if (p-> mShowIconJournal) | 1108 | if (p-> mShowIconJournal) |
1104 | configureToolBarMenu->setItemChecked( 90, true ); | 1109 | configureToolBarMenu->setItemChecked( 90, true ); |
1105 | if (p-> mShowIconWhatsThis) | 1110 | if (p-> mShowIconWhatsThis) |
1106 | configureToolBarMenu->setItemChecked( 300, true ); | 1111 | configureToolBarMenu->setItemChecked( 300, true ); |
1107 | if (p-> mShowIconWeekNum) | 1112 | if (p-> mShowIconWeekNum) |
1108 | configureToolBarMenu->setItemChecked( 400, true ); | 1113 | configureToolBarMenu->setItemChecked( 400, true ); |
1109 | QLabel* dummy = new QLabel( iconToolBar ); | 1114 | QLabel* dummy = new QLabel( iconToolBar ); |
1110 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 1115 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
1111 | if (!p-> mShowIconStretch) | 1116 | if (!p-> mShowIconStretch) |
1112 | iconToolBar->setStretchableWidget ( dummy ) ; | 1117 | iconToolBar->setStretchableWidget ( dummy ) ; |
1113 | else | 1118 | else |
1114 | configureToolBarMenu->setItemChecked( 5, true ); | 1119 | configureToolBarMenu->setItemChecked( 5, true ); |
1115 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 1120 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
1116 | configureAgenda( p->mHourSize ); | 1121 | configureAgenda( p->mHourSize ); |
1117 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 1122 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
1118 | } | 1123 | } |
1119 | 1124 | ||
1120 | void MainWindow::exportToPhone( int mode ) | 1125 | void MainWindow::exportToPhone( int mode ) |
1121 | { | 1126 | { |
1122 | 1127 | ||
1123 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1128 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1124 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1129 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1125 | KOex2phonePrefs ex2phone; | 1130 | KOex2phonePrefs ex2phone; |
1126 | 1131 | ||
1127 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 1132 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |
1128 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); | 1133 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); |
1129 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1134 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1130 | if ( mode == 1 ) | 1135 | if ( mode == 1 ) |
1131 | ex2phone.setCaption(i18n("Export complete calendar")); | 1136 | ex2phone.setCaption(i18n("Export complete calendar")); |
1132 | if ( mode == 2 ) | 1137 | if ( mode == 2 ) |
1133 | ex2phone.setCaption(i18n("Export filtered calendar")); | 1138 | ex2phone.setCaption(i18n("Export filtered calendar")); |
1134 | 1139 | ||
1135 | if ( !ex2phone.exec() ) { | 1140 | if ( !ex2phone.exec() ) { |
1136 | return; | 1141 | return; |
1137 | } | 1142 | } |
1138 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); | 1143 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); |
1139 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); | 1144 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); |
1140 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); | 1145 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); |
1141 | 1146 | ||
1142 | int inFuture = 0; | 1147 | int inFuture = 0; |
1143 | if ( ex2phone.mWriteBackFuture->isChecked() ) | 1148 | if ( ex2phone.mWriteBackFuture->isChecked() ) |
1144 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); | 1149 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); |
1145 | QPtrList<Incidence> delSel; | 1150 | QPtrList<Incidence> delSel; |
1146 | if ( mode == 1 ) | 1151 | if ( mode == 1 ) |
1147 | delSel = mCalendar->rawIncidences(); | 1152 | delSel = mCalendar->rawIncidences(); |
1148 | if ( mode == 2 ) | 1153 | if ( mode == 2 ) |
1149 | delSel = mCalendar->incidences(); | 1154 | delSel = mCalendar->incidences(); |
1150 | CalendarLocal* cal = new CalendarLocal(); | 1155 | CalendarLocal* cal = new CalendarLocal(); |
1151 | cal->setLocalTime(); | 1156 | cal->setLocalTime(); |
1152 | Incidence *incidence = delSel.first(); | 1157 | Incidence *incidence = delSel.first(); |
1153 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); | 1158 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); |
1154 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); | 1159 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); |
1155 | while ( incidence ) { | 1160 | while ( incidence ) { |
1156 | if ( incidence->type() != "Journal" ) { | 1161 | if ( incidence->type() != "Journal" ) { |
1157 | bool add = true; | 1162 | bool add = true; |
1158 | if ( inFuture ) { | 1163 | if ( inFuture ) { |
1159 | QDateTime dt; | 1164 | QDateTime dt; |
1160 | if ( incidence->type() == "Todo" ) { | 1165 | if ( incidence->type() == "Todo" ) { |
1161 | Todo * t = (Todo*)incidence; | 1166 | Todo * t = (Todo*)incidence; |
1162 | if ( t->hasDueDate() ) | 1167 | if ( t->hasDueDate() ) |
1163 | dt = t->dtDue(); | 1168 | dt = t->dtDue(); |
1164 | else | 1169 | else |
1165 | dt = cur.addSecs( 62 ); | 1170 | dt = cur.addSecs( 62 ); |
1166 | } | 1171 | } |
1167 | else { | 1172 | else { |
1168 | bool ok; | 1173 | bool ok; |
1169 | dt = incidence->getNextOccurence( cur, &ok ); | 1174 | dt = incidence->getNextOccurence( cur, &ok ); |
1170 | if ( !ok ) | 1175 | if ( !ok ) |
1171 | dt = cur.addSecs( -62 ); | 1176 | dt = cur.addSecs( -62 ); |
1172 | } | 1177 | } |
1173 | if ( dt < cur || dt > end ) { | 1178 | if ( dt < cur || dt > end ) { |
1174 | add = false; | 1179 | add = false; |
1175 | } | 1180 | } |
1176 | } | 1181 | } |
1177 | if ( add ) { | 1182 | if ( add ) { |
1178 | Incidence *in = incidence->clone(); | 1183 | Incidence *in = incidence->clone(); |
1179 | cal->addIncidence( in ); | 1184 | cal->addIncidence( in ); |
1180 | } | 1185 | } |
1181 | } | 1186 | } |
1182 | incidence = delSel.next(); | 1187 | incidence = delSel.next(); |
1183 | } | 1188 | } |
1184 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 1189 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
1185 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 1190 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
1186 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1191 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1187 | 1192 | ||
1188 | setCaption( i18n("Writing to phone...")); | 1193 | setCaption( i18n("Writing to phone...")); |
1189 | if ( PhoneFormat::writeToPhone( cal ) ) | 1194 | if ( PhoneFormat::writeToPhone( cal ) ) |
1190 | setCaption( i18n("Export to phone successful!")); | 1195 | setCaption( i18n("Export to phone successful!")); |
1191 | else | 1196 | else |
1192 | setCaption( i18n("Error exporting to phone!")); | 1197 | setCaption( i18n("Error exporting to phone!")); |
1193 | delete cal; | 1198 | delete cal; |
1194 | } | 1199 | } |
1195 | 1200 | ||
1196 | 1201 | ||
1197 | void MainWindow::setDefaultPreferences() | 1202 | void MainWindow::setDefaultPreferences() |
1198 | { | 1203 | { |
1199 | KOPrefs *p = KOPrefs::instance(); | 1204 | KOPrefs *p = KOPrefs::instance(); |
1200 | 1205 | ||
1201 | p->mCompactDialogs = true; | 1206 | p->mCompactDialogs = true; |
1202 | p->mConfirm = true; | 1207 | p->mConfirm = true; |
1203 | // p->mEnableQuickTodo = false; | 1208 | // p->mEnableQuickTodo = false; |
1204 | 1209 | ||
1205 | } | 1210 | } |
1206 | 1211 | ||
1207 | QString MainWindow::resourcePath() | 1212 | QString MainWindow::resourcePath() |
1208 | { | 1213 | { |
1209 | return KGlobal::iconLoader()->iconPath(); | 1214 | return KGlobal::iconLoader()->iconPath(); |
1210 | } | 1215 | } |
1211 | 1216 | ||
1212 | void MainWindow::displayText( QString text ,QString cap ) | 1217 | void MainWindow::displayText( QString text ,QString cap ) |
1213 | { | 1218 | { |
1214 | QDialog dia( this, "name", true ); ; | 1219 | QDialog dia( this, "name", true ); ; |
1215 | dia.setCaption( cap ); | 1220 | dia.setCaption( cap ); |
1216 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 1221 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
1217 | lay->setSpacing( 3 ); | 1222 | lay->setSpacing( 3 ); |
1218 | lay->setMargin( 3 ); | 1223 | lay->setMargin( 3 ); |
1219 | QTextBrowser tb ( &dia ); | 1224 | QTextBrowser tb ( &dia ); |
1220 | lay->addWidget( &tb ); | 1225 | lay->addWidget( &tb ); |
1221 | tb.setText( text ); | 1226 | tb.setText( text ); |
1222 | #ifdef DESKTOP_VERSION | 1227 | #ifdef DESKTOP_VERSION |
1223 | dia.resize( 640, 480); | 1228 | dia.resize( 640, 480); |
1224 | #else | 1229 | #else |
1225 | dia.showMaximized(); | 1230 | dia.showMaximized(); |
1226 | #endif | 1231 | #endif |
1227 | dia.exec(); | 1232 | dia.exec(); |
1228 | } | 1233 | } |
1229 | 1234 | ||
1230 | void MainWindow::features() | 1235 | void MainWindow::features() |
1231 | { | 1236 | { |
1232 | 1237 | ||
1233 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); | 1238 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); |
1234 | } | 1239 | } |
1235 | 1240 | ||
1236 | void MainWindow::usertrans() | 1241 | void MainWindow::usertrans() |
1237 | { | 1242 | { |
1238 | 1243 | ||
1239 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); | 1244 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); |
1240 | } | 1245 | } |
1241 | 1246 | ||
1242 | void MainWindow::kdesynchowto() | 1247 | void MainWindow::kdesynchowto() |
1243 | { | 1248 | { |
1244 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 1249 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
1245 | } | 1250 | } |
1246 | void MainWindow::multisynchowto() | 1251 | void MainWindow::multisynchowto() |
1247 | { | 1252 | { |
1248 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 1253 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
1249 | } | 1254 | } |
1250 | void MainWindow::synchowto() | 1255 | void MainWindow::synchowto() |
1251 | { | 1256 | { |
1252 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 1257 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
1253 | } | 1258 | } |
1254 | void MainWindow::faq() | 1259 | void MainWindow::faq() |
1255 | { | 1260 | { |
1256 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); | 1261 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); |
1257 | 1262 | ||
1258 | } | 1263 | } |
1259 | void MainWindow::whatsNew() | 1264 | void MainWindow::whatsNew() |
1260 | { | 1265 | { |
1261 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 1266 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
1262 | 1267 | ||
1263 | } | 1268 | } |
1264 | void MainWindow::licence() | 1269 | void MainWindow::licence() |
1265 | { | 1270 | { |
1266 | KApplication::showLicence(); | 1271 | KApplication::showLicence(); |
1267 | 1272 | ||
1268 | } | 1273 | } |
1269 | void MainWindow::about() | 1274 | void MainWindow::about() |
1270 | { | 1275 | { |
1271 | QString version; | 1276 | QString version; |
1272 | #include <../version> | 1277 | #include <../version> |
1273 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), | 1278 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), |
1274 | i18n("KOrganizer/Platform-independent\n") + | 1279 | i18n("KOrganizer/Platform-independent\n") + |
1275 | "(KO/Pi) " + version + " - " + | 1280 | "(KO/Pi) " + version + " - " + |
1276 | 1281 | ||
1277 | #ifdef DESKTOP_VERSION | 1282 | #ifdef DESKTOP_VERSION |
1278 | i18n("Desktop Edition\n") + | 1283 | i18n("Desktop Edition\n") + |
1279 | #else | 1284 | #else |
1280 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + | 1285 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + |
1281 | #endif | 1286 | #endif |
1282 | i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); | 1287 | i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); |
1283 | } | 1288 | } |
1284 | void MainWindow::keyBindings() | 1289 | void MainWindow::keyBindings() |
1285 | { | 1290 | { |
1286 | QString cap = i18n("KO/Pi Keys + Colors"); | 1291 | QString cap = i18n("KO/Pi Keys + Colors"); |
1287 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1292 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1288 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1293 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1289 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1294 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1290 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1295 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1291 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1296 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ |
1292 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1297 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1293 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1298 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1294 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ | 1299 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ |
1295 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1300 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1296 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1301 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1297 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1302 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1298 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ | 1303 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ |
1299 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1304 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1300 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1305 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1301 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ | 1306 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ |
1302 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1307 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1303 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1308 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1304 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1309 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1305 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1310 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1306 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1311 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1307 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1312 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1308 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1313 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1309 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1314 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1310 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1315 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1311 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1316 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1312 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | 1317 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ |
1313 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | 1318 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ |
1314 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | 1319 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ |
1315 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1320 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1316 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1321 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1317 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1322 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1318 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1323 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1319 | i18n("<p><h3>In list view:</h3></p>\n") + | 1324 | i18n("<p><h3>In list view:</h3></p>\n") + |
1320 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1325 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1321 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1326 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1322 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1327 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1323 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1328 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1324 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1329 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1325 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1330 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1326 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1331 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1327 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1332 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1328 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1333 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1329 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1334 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1330 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1335 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
1331 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1336 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1332 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1337 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1333 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1338 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1334 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1339 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1335 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1340 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
1336 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ | 1341 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ |
1337 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + | 1342 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + |
1338 | i18n("<p><b>White</b>: Item readonly</p>\n"); | 1343 | i18n("<p><b>White</b>: Item readonly</p>\n"); |
1339 | displayText( text, cap); | 1344 | displayText( text, cap); |
1340 | } | 1345 | } |
1341 | void MainWindow::aboutAutoSaving() | 1346 | void MainWindow::aboutAutoSaving() |
1342 | { | 1347 | { |
1343 | QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); | 1348 | QString text = i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configurable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"); |
1344 | 1349 | ||
1345 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); | 1350 | KApplication::showText( i18n("Auto Saving in KOrganizer/Pi"), text); |
1346 | 1351 | ||
1347 | } | 1352 | } |
1348 | void MainWindow::aboutKnownBugs() | 1353 | void MainWindow::aboutKnownBugs() |
1349 | { | 1354 | { |
1350 | QMessageBox* msg; | 1355 | QMessageBox* msg; |
1351 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), | 1356 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), |
1352 | 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")+ | 1357 | 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")+ |
1353 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1358 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1354 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + | 1359 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.info\n") + |
1355 | i18n("\nor report them in the bugtracker on\n") + | 1360 | i18n("\nor report them in the bugtracker on\n") + |
1356 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), | 1361 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), |
1357 | QMessageBox::NoIcon, | 1362 | QMessageBox::NoIcon, |
1358 | QMessageBox::Ok, | 1363 | QMessageBox::Ok, |
1359 | QMessageBox::NoButton, | 1364 | QMessageBox::NoButton, |
1360 | QMessageBox::NoButton); | 1365 | QMessageBox::NoButton); |
1361 | msg->exec(); | 1366 | msg->exec(); |
1362 | delete msg; | 1367 | delete msg; |
1363 | 1368 | ||
1364 | } | 1369 | } |
1365 | 1370 | ||
1366 | QString MainWindow::defaultFileName() | 1371 | QString MainWindow::defaultFileName() |
1367 | { | 1372 | { |
1368 | return locateLocal( "data", "korganizer/mycalendar.ics" ); | 1373 | return locateLocal( "data", "korganizer/mycalendar.ics" ); |
1369 | } | 1374 | } |
1370 | QString MainWindow::syncFileName() | 1375 | QString MainWindow::syncFileName() |
1371 | { | 1376 | { |
1372 | #ifdef DESKTOP_VERSION | 1377 | #ifdef DESKTOP_VERSION |
1373 | return locateLocal( "tmp", "synccalendar.ics" ); | 1378 | return locateLocal( "tmp", "synccalendar.ics" ); |
1374 | #else | 1379 | #else |
1375 | return QString( "/tmp/synccalendar.ics" ); | 1380 | return QString( "/tmp/synccalendar.ics" ); |
1376 | #endif | 1381 | #endif |
1377 | } | 1382 | } |
1378 | void MainWindow::updateWeek(QDate seda) | 1383 | void MainWindow::updateWeek(QDate seda) |
1379 | { | 1384 | { |
1380 | int weekNum = 0; | 1385 | int weekNum = 0; |
1381 | QDate d = QDate ( seda.year(), 1,1); | 1386 | QDate d = QDate ( seda.year(), 1,1); |
1382 | seda = seda.addDays( 1-seda.dayOfWeek() );//we are on monday | 1387 | seda = seda.addDays( 1-seda.dayOfWeek() );//we are on monday |
1383 | if ( seda.addDays(6).year() != seda.year() ) { | 1388 | if ( seda.addDays(6).year() != seda.year() ) { |
1384 | if ( seda.year() != d.year() ) { | 1389 | if ( seda.year() != d.year() ) { |
1385 | if ( d.dayOfWeek() > 4 ) | 1390 | if ( d.dayOfWeek() > 4 ) |
1386 | d = QDate ( seda.year(), 1,1); | 1391 | d = QDate ( seda.year(), 1,1); |
1387 | else | 1392 | else |
1388 | weekNum = 1; | 1393 | weekNum = 1; |
1389 | } else { | 1394 | } else { |
1390 | QDate dd( seda.year()+1, 1,1); | 1395 | QDate dd( seda.year()+1, 1,1); |
1391 | if ( dd.dayOfWeek() <= 4 ) | 1396 | if ( dd.dayOfWeek() <= 4 ) |
1392 | weekNum = 1; | 1397 | weekNum = 1; |
1393 | } | 1398 | } |
1394 | } | 1399 | } |
1395 | if ( weekNum == 0 ){ | 1400 | if ( weekNum == 0 ){ |
1396 | int dow = d.dayOfWeek(); | 1401 | int dow = d.dayOfWeek(); |
1397 | if ( dow <= 4 ) | 1402 | if ( dow <= 4 ) |
1398 | d = d.addDays( 1-dow ); | 1403 | d = d.addDays( 1-dow ); |
1399 | else // 5,6,7 | 1404 | else // 5,6,7 |
1400 | d = d.addDays( 8-dow ); | 1405 | d = d.addDays( 8-dow ); |
1401 | // we have the first week of the year.we are on monday | 1406 | // we have the first week of the year.we are on monday |
1402 | weekNum = d.daysTo( seda ) / 7 +1; | 1407 | weekNum = d.daysTo( seda ) / 7 +1; |
1403 | } | 1408 | } |
1404 | 1409 | ||
1405 | mWeekPixmap.fill( mWeekBgColor ); | 1410 | mWeekPixmap.fill( mWeekBgColor ); |
1406 | QPainter p ( &mWeekPixmap ); | 1411 | QPainter p ( &mWeekPixmap ); |
1407 | p.setFont( mWeekFont ); | 1412 | p.setFont( mWeekFont ); |
1408 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); | 1413 | p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); |
1409 | p.end(); | 1414 | p.end(); |
1410 | QIconSet icon3 ( mWeekPixmap ); | 1415 | QIconSet icon3 ( mWeekPixmap ); |
1411 | mWeekAction->setIconSet ( icon3 ); | 1416 | mWeekAction->setIconSet ( icon3 ); |
1412 | 1417 | ||
1413 | } | 1418 | } |
1414 | void MainWindow::updateWeekNum(const DateList &selectedDates) | 1419 | void MainWindow::updateWeekNum(const DateList &selectedDates) |
1415 | { | 1420 | { |
1416 | updateWeek( selectedDates.first() ); | 1421 | updateWeek( selectedDates.first() ); |
1417 | } | 1422 | } |
1418 | void MainWindow::processIncidenceSelection( Incidence *incidence ) | 1423 | void MainWindow::processIncidenceSelection( Incidence *incidence ) |
1419 | { | 1424 | { |
1420 | 1425 | ||
1421 | if ( !incidence ) { | 1426 | if ( !incidence ) { |
1422 | enableIncidenceActions( false ); | 1427 | enableIncidenceActions( false ); |
1423 | 1428 | ||
1424 | mNewSubTodoAction->setEnabled( false ); | 1429 | mNewSubTodoAction->setEnabled( false ); |
1425 | setCaptionToDates(); | 1430 | setCaptionToDates(); |
1426 | return; | 1431 | return; |
1427 | 1432 | ||
1428 | } | 1433 | } |
1429 | 1434 | ||
1430 | //KGlobal::locale()->formatDateTime(nextA, true); | 1435 | //KGlobal::locale()->formatDateTime(nextA, true); |
1431 | QString startString = ""; | 1436 | QString startString = ""; |
1432 | if ( incidence->type() != "Todo" ) { | 1437 | if ( incidence->type() != "Todo" ) { |
1433 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { | 1438 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { |
1434 | if ( incidence->doesFloat() ) { | 1439 | if ( incidence->doesFloat() ) { |
1435 | startString += ": "+incidence->dtStartDateStr( true ); | 1440 | startString += ": "+incidence->dtStartDateStr( true ); |
1436 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); | 1441 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); |
1437 | 1442 | ||
1438 | } else { | 1443 | } else { |
1439 | startString = ": "+incidence->dtStartStr(true); | 1444 | startString = ": "+incidence->dtStartStr(true); |
1440 | startString += " --- "+((Event*)incidence)->dtEndStr(true); | 1445 | startString += " --- "+((Event*)incidence)->dtEndStr(true); |
1441 | 1446 | ||
1442 | } | 1447 | } |
1443 | 1448 | ||
1444 | } else { | 1449 | } else { |
1445 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) | 1450 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) |
1446 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ | 1451 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ |
1447 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); | 1452 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); |
1448 | if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) { | 1453 | if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) { |
1449 | bool ok; | 1454 | bool ok; |
1450 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); | 1455 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); |
1451 | if ( ok ) { | 1456 | if ( ok ) { |