summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt9
-rw-r--r--korganizer/koeventviewer.cpp2
2 files changed, 10 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 0dad1c1..54376a0 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,169 +1,178 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.1.11 ************
4
5KO/Pi:
6Because we can have many calendars now in KO/Pi we can have more than one journal entry per day.
7Added features to handle (and add ) more than one journal entry per day.
8Added option for a journal title.
9
10Added info about the calendar, the item belongs to, to the event/todo/journal viewer.
11
3********** VERSION 2.1.10 ************ 12********** VERSION 2.1.10 ************
4 13
5KO/Pi: 14KO/Pi:
6Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file. 15Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file.
7When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted. 16When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted.
8Fixed a bug in searching for a small timerange, i.e. one day. 17Fixed a bug in searching for a small timerange, i.e. one day.
9 18
10KA/Pi: 19KA/Pi:
11Fixed two problems in csv export. 20Fixed two problems in csv export.
12Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi. 21Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi.
13 22
14********** VERSION 2.1.9 ************ 23********** VERSION 2.1.9 ************
15 24
16KO/Pi: 25KO/Pi:
17Fixed some problems of the new search options in the search dialog. 26Fixed some problems of the new search options in the search dialog.
18Fixed some problems in the new resource config options. 27Fixed some problems in the new resource config options.
19Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page. 28Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page.
20Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown: 29Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown:
21Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup. 30Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup.
22 31
23Fixed a problem in recurrence range in syncing with DTM. 32Fixed a problem in recurrence range in syncing with DTM.
24 33
25KA/Pi: 34KA/Pi:
26Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...) 35Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...)
27 36
28PwM/Pi: 37PwM/Pi:
29Added "sec" to the timeout config settings to make it clear the timeout values are seconds. 38Added "sec" to the timeout config settings to make it clear the timeout values are seconds.
30 39
31********** VERSION 2.1.8 ************ 40********** VERSION 2.1.8 ************
32 41
33KO/Pi: 42KO/Pi:
34Added info about the completion state of a todo in the ListView/Searchdialog. 43Added info about the completion state of a todo in the ListView/Searchdialog.
35If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well. 44If in TodoView is selected "do not show compledted todos" then completed todos are not shown in the ListView as well.
36Fixed some updating problems when changing the filter. 45Fixed some updating problems when changing the filter.
37 46
38KA/Pi: 47KA/Pi:
39In the addressee selection dialog now the formatted name is shown, if not empty. 48In the addressee selection dialog now the formatted name is shown, if not empty.
40Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category. 49Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category.
41Now in the addressee selection dialog a selected contact is remove with a single click from the selected list. 50Now in the addressee selection dialog a selected contact is remove with a single click from the selected list.
42 51
43Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored. 52Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored.
44Fixed the sorting for size in the file selector on the Z. 53Fixed the sorting for size in the file selector on the Z.
45 54
46Changed the color selection dialog on the Zaurus to a more user friendly version. 55Changed the color selection dialog on the Zaurus to a more user friendly version.
47 56
48********** VERSION 2.1.7 ************ 57********** VERSION 2.1.7 ************
49 58
50KO/Pi: 59KO/Pi:
51Fixed several problems in the new Resource handling. 60Fixed several problems in the new Resource handling.
52Added more options to the search dialog. 61Added more options to the search dialog.
53Fixed a problem in the Month view. 62Fixed a problem in the Month view.
54Added more options to the dialog when setting a todo to stopped. 63Added more options to the dialog when setting a todo to stopped.
55 64
56Fixed two small problems in KO/Pi Alarm applet. 65Fixed two small problems in KO/Pi Alarm applet.
57 66
58********** VERSION 2.1.6 ************ 67********** VERSION 2.1.6 ************
59 68
60This release is for testing only. 69This release is for testing only.
61 70
62KO/Pi: 71KO/Pi:
63Added to the list view (the list view is used in search dialog as well) the possibility to print it. 72Added to the list view (the list view is used in search dialog as well) the possibility to print it.
64Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view. 73Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
65Added to the list view the possibility to add all subtodos of selected todos to an export/beam. 74Added to the list view the possibility to add all subtodos of selected todos to an export/beam.
66Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout. 75Added to the search dialog the possibility to make an additive search such that you can get a better list for export/printout.
67Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus. 76Added to the search dialog the possibility to hide the checkboxes such that there is more space for the list view on the Zaurus.
68Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly. 77Fixed a problem in the AlarmTimer Applet: Now utf8 messages are displayed properly.
69 78
70Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars. 79Added support for multiple calendar files in KO/Pi. Only local ical (*.ics) files are supported as calendars.
71In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later. 80In the sync profile config it is still missing to specify a particular calendar to sync with this profile. That setting will be added later.
72Now on every sync the set of calendars is synced which are enabled in the resource view. 81Now on every sync the set of calendars is synced which are enabled in the resource view.
73 82
74A calendar is enabled in the resource view if the "eye" column is checked. 83A calendar is enabled in the resource view if the "eye" column is checked.
75You can set a calendar to be the default for new items( "+" column ). 84You can set a calendar to be the default for new items( "+" column ).
76You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly. 85You can tell KO/Pi to ignore all alarm of a calendar ( "bell" column ) and you can set it readonly.
77To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ... 86To find out how to add a new calendar and how to remove a calendar is left as an exercise to the reader ...
78 87
79 88
80********** VERSION 2.1.5 ************ 89********** VERSION 2.1.5 ************
81 90
82This is the new stable version. 91This is the new stable version.
83Bugfix: 92Bugfix:
84Fixed a problem with agenda popup on the desktop in KO/Pi. 93Fixed a problem with agenda popup on the desktop in KO/Pi.
85Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. 94Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
86Added config option to not display completed todos in agenda view. 95Added config option to not display completed todos in agenda view.
87Addressee view is now using the formatted name, if defined. 96Addressee view is now using the formatted name, if defined.
88That makes it possible to display "lastname, firstname" in that view now. 97That makes it possible to display "lastname, firstname" in that view now.
89To set the formatted name for all contacts, please use menu: 98To set the formatted name for all contacts, please use menu:
90Edit->Change->Set formatted name. 99Edit->Change->Set formatted name.
91Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. 100Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
92 101
93********** VERSION 2.1.4 ************ 102********** VERSION 2.1.4 ************
94 103
95Fixed two more bugs in the KA/Pi CSV import dialog: 104Fixed two more bugs in the KA/Pi CSV import dialog:
96Made it possible to read multi-line fields and import it to the "Note" field. 105Made it possible to read multi-line fields and import it to the "Note" field.
97Fixed a problem in mapping custom fields, whatever a custem field is... 106Fixed a problem in mapping custom fields, whatever a custem field is...
98 107
99********** VERSION 2.1.3 ************ 108********** VERSION 2.1.3 ************
100 109
101Changed the menu structure of the alarm applet: 110Changed the menu structure of the alarm applet:
102Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". 111Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
103 112
104Fixed several problems in the KA/Pi CSV import dialog: 113Fixed several problems in the KA/Pi CSV import dialog:
105Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. 114Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
106 115
107 116
108********** VERSION 2.1.2 ************ 117********** VERSION 2.1.2 ************
109 118
110Fixed a problem closing the alarm dialog on Zaurus with "OK" button. 119Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
111 120
112Fixed a problem when importing data from Outlook with mutiple categories set. 121Fixed a problem when importing data from Outlook with mutiple categories set.
113 122
114Changed display of days in datenavigator: 123Changed display of days in datenavigator:
115Birthdays are now blue, not dark green. 124Birthdays are now blue, not dark green.
116When todo view is shown, no birtdays are shown and days with due todos are shown blue. 125When todo view is shown, no birtdays are shown and days with due todos are shown blue.
117When journal view is shown, only holidays are shown and days with journals are blue. 126When journal view is shown, only holidays are shown and days with journals are blue.
118 127
119Added Backup options to global config: 128Added Backup options to global config:
120You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ). 129You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ).
121It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again. 130It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again.
122The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups. 131The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups.
123 132
124********** VERSION 2.1.1 ************ 133********** VERSION 2.1.1 ************
125 134
126Stable release 2.1.1! 135Stable release 2.1.1!
127 136
128KO/Pi: 137KO/Pi:
129Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. 138Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
130 139
131********** VERSION 2.1.0 ************ 140********** VERSION 2.1.0 ************
132 141
133Stable release 2.1.0! 142Stable release 2.1.0!
134 143
135Summary of changes/fixes compared to version 2.0.6: 144Summary of changes/fixes compared to version 2.0.6:
136 145
137Many bugs of version 2.0.6 fixed. 146Many bugs of version 2.0.6 fixed.
138Most of them were small bugs, but some of them were important. 147Most of them were small bugs, but some of them were important.
139It is recommended to use version 2.1.0 and not version 2.0.6. 148It is recommended to use version 2.1.0 and not version 2.0.6.
140 149
141Important changes: 150Important changes:
142 151
143Added recurring todos to KO/Pi. 152Added recurring todos to KO/Pi.
144 153
145Added global application font settings (for all KDE-Pim/Pi apps) to the general settings. 154Added global application font settings (for all KDE-Pim/Pi apps) to the general settings.
146 155
147Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more. 156Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
148 157
149Datenavigator can now display many months. Very useful on the desktop. 158Datenavigator can now display many months. Very useful on the desktop.
150 159
151KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements. 160KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements.
152 161
153Made alarm sound working on Linux desktop. 162Made alarm sound working on Linux desktop.
154 163
155Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details. 164Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details.
156 165
157Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details. 166Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details.
158 167
159Many other usebility enhancements. 168Many other usebility enhancements.
160Special thanks to Ben for his suggestions! 169Special thanks to Ben for his suggestions!
161 170
162You can find the complete changelog 171You can find the complete changelog
163from version 1.7.7 to 2.1.0 172from version 1.7.7 to 2.1.0
164in the source package or on 173in the source package or on
165 174
166http://www.pi-sync.net/html/changelog.html 175http://www.pi-sync.net/html/changelog.html
167 176
168 177
169 178
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 8c1e5b2..52c5247 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -463,347 +463,347 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
463 463
464 if (event->cancelled ()) { 464 if (event->cancelled ()) {
465 mText +="<font color=\"#B00000\">"; 465 mText +="<font color=\"#B00000\">";
466 addTag("i",i18n("This todo has been cancelled!")); 466 addTag("i",i18n("This todo has been cancelled!"));
467 mText.append("<br>"); 467 mText.append("<br>");
468 mText += "</font>"; 468 mText += "</font>";
469 mMailSubject += i18n("(cancelled)"); 469 mMailSubject += i18n("(cancelled)");
470 } 470 }
471 471
472 472
473 473
474 if (event->recurrence()->doesRecur()) { 474 if (event->recurrence()->doesRecur()) {
475 475
476 QString recurText = event->recurrence()->recurrenceText(); 476 QString recurText = event->recurrence()->recurrenceText();
477 addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); 477 addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>");
478 478
479 } 479 }
480 if (event->hasStartDate()) { 480 if (event->hasStartDate()) {
481 mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); 481 mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer)));
482 } 482 }
483 if (event->hasDueDate()) { 483 if (event->hasDueDate()) {
484 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); 484 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer)));
485 mMailSubject += i18n(" - " )+event->dtDueStr( true ); 485 mMailSubject += i18n(" - " )+event->dtDueStr( true );
486 } 486 }
487 if (!event->location().isEmpty()) { 487 if (!event->location().isEmpty()) {
488 addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); 488 addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) );
489 mMailSubject += i18n(" at ") + event->location(); 489 mMailSubject += i18n(" at ") + event->location();
490 } 490 }
491 mText.append(i18n("<p><b>Priority:</b> %2</p>") 491 mText.append(i18n("<p><b>Priority:</b> %2</p>")
492 .arg(QString::number(event->priority()))); 492 .arg(QString::number(event->priority())));
493 493
494 if (event->isAlarmEnabled()) { 494 if (event->isAlarmEnabled()) {
495 Alarm *alarm =event->alarms().first() ; 495 Alarm *alarm =event->alarms().first() ;
496 QDateTime t = alarm->time(); 496 QDateTime t = alarm->time();
497 QString s =i18n("( %1 before )").arg( alarm->offsetText() ); 497 QString s =i18n("( %1 before )").arg( alarm->offsetText() );
498 if ( wideScreen ) { 498 if ( wideScreen ) {
499 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate )); 499 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate ));
500 } else { 500 } else {
501 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); 501 addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
502 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); 502 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
503 } 503 }
504 } 504 }
505 505
506 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); 506 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr());
507 507
508 formatCategories(event); 508 formatCategories(event);
509 509
510 formatAttendees(event); 510 formatAttendees(event);
511 511
512 if ( KOPrefs::instance()->mEVshowCreated ) { 512 if ( KOPrefs::instance()->mEVshowCreated ) {
513 if(wideScreen ){ 513 if(wideScreen ){
514 514
515 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); 515 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
516 516
517 } else { 517 } else {
518 addTag("p",i18n("<b>Created: ") +" </b>"); 518 addTag("p",i18n("<b>Created: ") +" </b>");
519 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); 519 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
520 } 520 }
521 } 521 }
522 if ( KOPrefs::instance()->mEVshowChanged ) { 522 if ( KOPrefs::instance()->mEVshowChanged ) {
523 if(wideScreen ){ 523 if(wideScreen ){
524 addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); 524 addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) );
525 525
526 } else { 526 } else {
527 addTag("p",i18n("<b>Last modified: ") +" </b>"); 527 addTag("p",i18n("<b>Last modified: ") +" </b>");
528 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); 528 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
529 } 529 }
530 } 530 }
531 if ( event->relatedTo() ) { 531 if ( event->relatedTo() ) {
532 addTag("b",i18n("Parent todo:<br>")); 532 addTag("b",i18n("Parent todo:<br>"));
533 mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); 533 mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>");
534 } 534 }
535 QPtrList<Incidence> Relations = event->relations(); 535 QPtrList<Incidence> Relations = event->relations();
536 Incidence *to; 536 Incidence *to;
537 if ( Relations.first() ) 537 if ( Relations.first() )
538 addTag("b",i18n("Sub todos:<br>")); 538 addTag("b",i18n("Sub todos:<br>"));
539 for (to=Relations.first();to;to=Relations.next()) { 539 for (to=Relations.first();to;to=Relations.next()) {
540 mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); 540 mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>");
541 541
542 } 542 }
543 543
544 if ( KOPrefs::instance()->mEVshowDetails ) { 544 if ( KOPrefs::instance()->mEVshowDetails ) {
545 if (!event->description().isEmpty()) { 545 if (!event->description().isEmpty()) {
546 addTag("p",i18n("<b>Details: </b>")); 546 addTag("p",i18n("<b>Details: </b>"));
547 addTag("p",deTag(event->description())); 547 addTag("p",deTag(event->description()));
548 } 548 }
549 } 549 }
550 setText(mText); 550 setText(mText);
551} 551}
552 552
553void KOEventViewer::formatCategories(Incidence *event) 553void KOEventViewer::formatCategories(Incidence *event)
554{ 554{
555 if (!event->categoriesStr().isEmpty()) { 555 if (!event->categoriesStr().isEmpty()) {
556 if (event->categories().count() == 1) { 556 if (event->categories().count() == 1) {
557 addTag("p","<b>"+i18n("Category") + ":</b> " + event->categoriesStrWithSpace()); 557 addTag("p","<b>"+i18n("Category") + ":</b> " + event->categoriesStrWithSpace());
558 } else { 558 } else {
559 addTag("p","<b>"+i18n("Categories")+":</b> " + event->categoriesStrWithSpace() ) ; 559 addTag("p","<b>"+i18n("Categories")+":</b> " + event->categoriesStrWithSpace() ) ;
560 } 560 }
561 } 561 }
562} 562}
563void KOEventViewer::formatAttendees(Incidence *event) 563void KOEventViewer::formatAttendees(Incidence *event)
564{ 564{
565 QPtrList<Attendee> attendees = event->attendees(); 565 QPtrList<Attendee> attendees = event->attendees();
566 if (attendees.count()) { 566 if (attendees.count()) {
567 567
568 568
569 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); 569 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
570 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); 570 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small);
571 addTag("h3",i18n("Organizer")); 571 addTag("h3",i18n("Organizer"));
572 mText.append("<ul><li>"); 572 mText.append("<ul><li>");
573#ifndef KORG_NOKABC 573#ifndef KORG_NOKABC
574 574
575#ifdef DESKTOP_VERSION 575#ifdef DESKTOP_VERSION
576 KABC::AddressBook *add_book = KABC::StdAddressBook::self(); 576 KABC::AddressBook *add_book = KABC::StdAddressBook::self();
577 KABC::Addressee::List addressList; 577 KABC::Addressee::List addressList;
578 addressList = add_book->findByEmail(event->organizer()); 578 addressList = add_book->findByEmail(event->organizer());
579 KABC::Addressee o = addressList.first(); 579 KABC::Addressee o = addressList.first();
580 if (!o.isEmpty() && addressList.size()<2) { 580 if (!o.isEmpty() && addressList.size()<2) {
581 mText += "<a href=\"uid:" + o.uid() + "\">"; 581 mText += "<a href=\"uid:" + o.uid() + "\">";
582 mText += o.formattedName(); 582 mText += o.formattedName();
583 mText += "</a>\n"; 583 mText += "</a>\n";
584 } else { 584 } else {
585 mText.append(event->organizer()); 585 mText.append(event->organizer());
586 } 586 }
587#else //DESKTOP_VERSION 587#else //DESKTOP_VERSION
588 mText += "<a href=\"uid:organizer\">"; 588 mText += "<a href=\"uid:organizer\">";
589 mText += event->organizer(); 589 mText += event->organizer();
590 mText += "</a>\n"; 590 mText += "</a>\n";
591#endif //DESKTOP_VERSION 591#endif //DESKTOP_VERSION
592 592
593 593
594#else 594#else
595 mText.append(event->organizer()); 595 mText.append(event->organizer());
596#endif 596#endif
597 597
598 if (iconPath) { 598 if (iconPath) {
599 mText += " <a href=\"mailto:" + event->organizer() + "\">"; 599 mText += " <a href=\"mailto:" + event->organizer() + "\">";
600 mText += "<IMG src=\"" + iconPath + "\">"; 600 mText += "<IMG src=\"" + iconPath + "\">";
601 mText += "</a>\n"; 601 mText += "</a>\n";
602 } 602 }
603 mText.append("</li></ul>"); 603 mText.append("</li></ul>");
604 604
605 addTag("h3",i18n("Attendees")); 605 addTag("h3",i18n("Attendees"));
606 Attendee *a; 606 Attendee *a;
607 mText.append("<ul>"); 607 mText.append("<ul>");
608 int a_count = 0; 608 int a_count = 0;
609 int a_count_nr = 0; 609 int a_count_nr = 0;
610 610
611 for(a=attendees.first();a;a=attendees.next()) { 611 for(a=attendees.first();a;a=attendees.next()) {
612#ifndef KORG_NOKABC 612#ifndef KORG_NOKABC
613#ifdef DESKTOP_VERSION 613#ifdef DESKTOP_VERSION
614 if (a->name().isEmpty()) { 614 if (a->name().isEmpty()) {
615 addressList = add_book->findByEmail(a->email()); 615 addressList = add_book->findByEmail(a->email());
616 KABC::Addressee o = addressList.first(); 616 KABC::Addressee o = addressList.first();
617 if (!o.isEmpty() && addressList.size()<2) { 617 if (!o.isEmpty() && addressList.size()<2) {
618 mText += "<a href=\"uid:" + o.uid() + "\">"; 618 mText += "<a href=\"uid:" + o.uid() + "\">";
619 mText += o.formattedName(); 619 mText += o.formattedName();
620 mText += "</a>\n"; 620 mText += "</a>\n";
621 } else { 621 } else {
622 mText += "<li>"; 622 mText += "<li>";
623 mText.append(a->email()); 623 mText.append(a->email());
624 mText += "\n"; 624 mText += "\n";
625 } 625 }
626 } else { 626 } else {
627 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 627 mText += "<li><a href=\"uid:" + a->uid() + "\">";
628 if (!a->name().isEmpty()) mText += a->name(); 628 if (!a->name().isEmpty()) mText += a->name();
629 else mText += a->email(); 629 else mText += a->email();
630 mText += "</a>\n"; 630 mText += "</a>\n";
631 } 631 }
632#else //DESKTOP_VERSION 632#else //DESKTOP_VERSION
633 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 633 mText += "<li><a href=\"uid:" + a->uid() + "\">";
634 if (!a->name().isEmpty()) mText += a->name(); 634 if (!a->name().isEmpty()) mText += a->name();
635 else mText += a->email(); 635 else mText += a->email();
636 mText += "</a>\n"; 636 mText += "</a>\n";
637#endif //DESKTOP_VERSION 637#endif //DESKTOP_VERSION
638#else 638#else
639 //qDebug("nokabc "); 639 //qDebug("nokabc ");
640 mText += "<li><a href=\"uid:" + a->uid() + "\">"; 640 mText += "<li><a href=\"uid:" + a->uid() + "\">";
641 if (!a->name().isEmpty()) mText += a->name(); 641 if (!a->name().isEmpty()) mText += a->name();
642 else mText += a->email(); 642 else mText += a->email();
643 mText += "</a>\n"; 643 mText += "</a>\n";
644#endif 644#endif
645 645
646 646
647 if (!a->email().isEmpty()) { 647 if (!a->email().isEmpty()) {
648 if (iconPath) { 648 if (iconPath) {
649 mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; 649 mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">";
650 if ( a->RSVP() ) { 650 if ( a->RSVP() ) {
651 ++a_count_nr; 651 ++a_count_nr;
652 mText += "<IMG src=\"" + iconPath + "\">"; 652 mText += "<IMG src=\"" + iconPath + "\">";
653 } 653 }
654 else { 654 else {
655 ++a_count; 655 ++a_count;
656 mText += "<IMG src=\"" + NOiconPath + "\">"; 656 mText += "<IMG src=\"" + NOiconPath + "\">";
657 } 657 }
658 mText += "</a>\n"; 658 mText += "</a>\n";
659 } 659 }
660 } 660 }
661 if (a->status() != Attendee::NeedsAction ) 661 if (a->status() != Attendee::NeedsAction )
662 mText +="[" + a->statusStr() + "] "; 662 mText +="[" + a->statusStr() + "] ";
663 if (a->role() == Attendee::Chair ) 663 if (a->role() == Attendee::Chair )
664 mText +="(" + a->roleStr().left(1) + ".)"; 664 mText +="(" + a->roleStr().left(1) + ".)";
665 } 665 }
666 mText.append("</li></ul>"); 666 mText.append("</li></ul>");
667 if ( (a_count+a_count_nr) > 1 ) { 667 if ( (a_count+a_count_nr) > 1 ) {
668 mText += "<a href=\"mailto:ALL\">"; 668 mText += "<a href=\"mailto:ALL\">";
669 mText += i18n( "Mail to all" ); 669 mText += i18n( "Mail to all" );
670 mText += "</a> ( "; 670 mText += "</a> ( ";
671 mText += "<IMG src=\"" + iconPath + "\">"; 671 mText += "<IMG src=\"" + iconPath + "\">";
672 mText += i18n( " and " ); 672 mText += i18n( " and " );
673 mText += "<IMG src=\"" + NOiconPath + "\"> )"; 673 mText += "<IMG src=\"" + NOiconPath + "\"> )";
674 mText += "<br>\n"; 674 mText += "<br>\n";
675 675
676 676
677 } 677 }
678 if ( a_count_nr > 1 ) { 678 if ( a_count_nr > 1 ) {
679 mText += "<a href=\"mailto:RSVP\">"; 679 mText += "<a href=\"mailto:RSVP\">";
680 mText += i18n( "Mail to selected" ); 680 mText += i18n( "Mail to selected" );
681 mText += "</a> ( "; 681 mText += "</a> ( ";
682 mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath ); 682 mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath );
683 mText += "<br>\n"; 683 mText += "<br>\n";
684 } 684 }
685 } 685 }
686 686
687} 687}
688void KOEventViewer::appendJournal(Journal *jour, int mode ) 688void KOEventViewer::appendJournal(Journal *jour, int mode )
689{ 689{
690 bool shortDate = KOPrefs::instance()->mShortDateInViewer; 690 bool shortDate = KOPrefs::instance()->mShortDateInViewer;
691 if (mode == 0 ) { 691 if (mode == 0 ) {
692 addTag("h2",i18n("Journal from: ")); 692 addTag("h2",i18n("Journal from: "));
693 } 693 }
694 else { 694 else {
695 if ( mode == 1 ) { 695 if ( mode == 1 ) {
696 addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); 696 addTag("h2",i18n( "Local: " ) +i18n("Journal from: "));
697 } else { 697 } else {
698 addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); 698 addTag("h2",i18n( "Remote: " ) +i18n("Journal from: "));
699 } 699 }
700 } 700 }
701 topLevelWidget()->setCaption("Journal Viewer"); 701 topLevelWidget()->setCaption("Journal Viewer");
702 mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); 702 mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer)));
703 if (!jour->summary().isEmpty()) { 703 if (!jour->summary().isEmpty()) {
704 addTag("b",i18n(" Title: ") + deTag(jour->summary())); 704 addTag("b",i18n(" Title: ") + deTag(jour->summary()));
705 } 705 }
706 formatReadOnly(jour); 706 formatReadOnly(jour);
707 addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); 707 addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) );
708 708
709 if (!jour->description().isEmpty()) { 709 if (!jour->description().isEmpty()) {
710 addTag("p",deTag(jour->description())); 710 addTag("p",deTag(jour->description()));
711 } 711 }
712 setText(mText); 712 setText(mText);
713} 713}
714 714
715void KOEventViewer::formatReadOnly(Incidence *event) 715void KOEventViewer::formatReadOnly(Incidence *event)
716{ 716{
717 int id = event->calID(); 717 int id = event->calID();
718 if ( id > 1 ) { 718 if ( id > 1 ) {
719 addTag("p", i18n("Calendar:")+" " + KOPrefs::instance()->getCalendar( id )->mName ); 719 addTag("p", "<em>("+i18n("Calendar:")+" " + KOPrefs::instance()->getCalendar( id )->mName + ")</em>");
720 } 720 }
721 if (event->isReadOnly()) { 721 if (event->isReadOnly()) {
722 addTag("p","<em>(" + i18n("read-only") + ")</em>"); 722 addTag("p","<em>(" + i18n("read-only") + ")</em>");
723 } 723 }
724} 724}
725void KOEventViewer::setSyncMode( bool b ) 725void KOEventViewer::setSyncMode( bool b )
726{ 726{
727 mSyncMode = b; 727 mSyncMode = b;
728} 728}
729 729
730void KOEventViewer::setTodo(Todo *event, bool clearV ) 730void KOEventViewer::setTodo(Todo *event, bool clearV )
731{ 731{
732 if ( clearV ) 732 if ( clearV )
733 clearEvents(); 733 clearEvents();
734 if ( mSyncMode ) { 734 if ( mSyncMode ) {
735 if ( clearV ) 735 if ( clearV )
736 appendTodo(event,1 ); 736 appendTodo(event,1 );
737 else 737 else
738 appendTodo(event,2); 738 appendTodo(event,2);
739 } else 739 } else
740 appendTodo(event); 740 appendTodo(event);
741} 741}
742void KOEventViewer::setJournal(Journal *event, bool clearV ) 742void KOEventViewer::setJournal(Journal *event, bool clearV )
743{ 743{
744 if ( clearV ) 744 if ( clearV )
745 clearEvents(); 745 clearEvents();
746 if ( mSyncMode ) { 746 if ( mSyncMode ) {
747 if ( clearV ) 747 if ( clearV )
748 appendJournal(event, 1); 748 appendJournal(event, 1);
749 else 749 else
750 appendJournal(event, 2); 750 appendJournal(event, 2);
751 } else 751 } else
752 appendJournal(event); 752 appendJournal(event);
753} 753}
754 754
755void KOEventViewer::setEvent(Event *event) 755void KOEventViewer::setEvent(Event *event)
756{ 756{
757 clearEvents(); 757 clearEvents();
758 if ( mSyncMode ) 758 if ( mSyncMode )
759 appendEvent(event, 1); 759 appendEvent(event, 1);
760 else 760 else
761 appendEvent(event); 761 appendEvent(event);
762} 762}
763 763
764void KOEventViewer::addEvent(Event *event) 764void KOEventViewer::addEvent(Event *event)
765{ 765{
766 if ( mSyncMode ) 766 if ( mSyncMode )
767 appendEvent(event, 2); 767 appendEvent(event, 2);
768 else 768 else
769 appendEvent(event); 769 appendEvent(event);
770} 770}
771 771
772void KOEventViewer::clearEvents(bool now) 772void KOEventViewer::clearEvents(bool now)
773{ 773{
774 mText = ""; 774 mText = "";
775 if (now) setText(mText); 775 if (now) setText(mText);
776} 776}
777 777
778void KOEventViewer::addText(QString text) 778void KOEventViewer::addText(QString text)
779{ 779{
780 mText.append(text); 780 mText.append(text);
781 setText(mText); 781 setText(mText);
782} 782}
783QString KOEventViewer::deTag(QString text) 783QString KOEventViewer::deTag(QString text)
784{ 784{
785#if QT_VERSION >= 0x030000 785#if QT_VERSION >= 0x030000
786 text.replace( '<' , "&lt;" ); 786 text.replace( '<' , "&lt;" );
787 text.replace( '>' , "&gt;" ); 787 text.replace( '>' , "&gt;" );
788#else 788#else
789 if ( text.find ('<') >= 0 ) { 789 if ( text.find ('<') >= 0 ) {
790 text.replace( QRegExp("<") , "&lt;" ); 790 text.replace( QRegExp("<") , "&lt;" );
791 } 791 }
792 if ( text.find ('>') >= 0 ) { 792 if ( text.find ('>') >= 0 ) {
793 text.replace( QRegExp(">") , "&gt;" ); 793 text.replace( QRegExp(">") , "&gt;" );
794 } 794 }
795#endif 795#endif
796 return text; 796 return text;
797} 797}
798void KOEventViewer::keyPressEvent ( QKeyEvent * e ) 798void KOEventViewer::keyPressEvent ( QKeyEvent * e )
799{ 799{
800 switch ( e->key() ) { 800 switch ( e->key() ) {
801 case Qt::Key_Return: 801 case Qt::Key_Return:
802 case Qt::Key_Enter : 802 case Qt::Key_Enter :
803 e->ignore(); 803 e->ignore();
804 break; 804 break;
805 default: 805 default:
806 QTextBrowser::keyPressEvent ( e ); 806 QTextBrowser::keyPressEvent ( e );
807 break; 807 break;
808 } 808 }
809} 809}