author | zautrix <zautrix> | 2005-01-27 12:14:32 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-27 12:14:32 (UTC) |
commit | c8b484570a9cf8aacc070f92141c8bcfebbf3a93 (patch) (unidiff) | |
tree | af81a25ccc142582a60a5ed100dcd44956255b62 | |
parent | 9ff00e650e32d6f348a2333c9cf21da9c9a137ff (diff) | |
download | kdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.zip kdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.tar.gz kdepimpi-c8b484570a9cf8aacc070f92141c8bcfebbf3a93.tar.bz2 |
birthday fixes
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 11 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 13 |
4 files changed, 24 insertions, 5 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 6c4cb7b..4c00770 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,36 +1,39 @@ | |||
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.0 ************ | 3 | ********** VERSION 2.0.0 ************ |
4 | 4 | ||
5 | Stable release 2.0.0! | 5 | Stable release 2.0.0! |
6 | 6 | ||
7 | KO/Pi: | 7 | KO/Pi: |
8 | Fixed problem in edit dialog recreation at startup. | 8 | Fixed problem in edit dialog recreation at startup. |
9 | Made "toggle view*" menu items enabled context sensitive. | 9 | Made "toggle view*" menu items enabled context sensitive. |
10 | Changed agenda size menu to items 1-10. | 10 | Changed agenda size menu to items 1-10. |
11 | Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. | 11 | Made it possible to change agenda size quickly by pressing mouse on timelabels in agenda view and move mouse up/down. |
12 | Usebility enhancements in the KO/Pi menus. | 12 | Usebility enhancements in the KO/Pi menus. |
13 | Birthday import now adds year to summary. | ||
14 | What's Next view shows age in years for birthday. | ||
15 | |||
13 | OM/Pi: | 16 | OM/Pi: |
14 | Added three info lines to display subject, from and to of selected mails. | 17 | Added three info lines to display subject, from and to of selected mails. |
15 | 18 | ||
16 | ********** VERSION 1.9.20 ************ | 19 | ********** VERSION 1.9.20 ************ |
17 | 20 | ||
18 | KO/Pi: | 21 | KO/Pi: |
19 | Added for the "dislplay one day" agenda mode | 22 | Added for the "dislplay one day" agenda mode |
20 | info in the caption and in the day lables: | 23 | info in the caption and in the day lables: |
21 | Now it is displayed, if the selected day is from "day before yesterday" | 24 | Now it is displayed, if the selected day is from "day before yesterday" |
22 | to "day after tomorrow". | 25 | to "day after tomorrow". |
23 | Made it possible to delete a Todo, which has sub-todos. | 26 | Made it possible to delete a Todo, which has sub-todos. |
24 | Fixed two small problems in the todo view. | 27 | Fixed two small problems in the todo view. |
25 | Added missing German translation for filter edit and print dialog. | 28 | Added missing German translation for filter edit and print dialog. |
26 | Made search dialog closeable by cancel key. | 29 | Made search dialog closeable by cancel key. |
27 | 30 | ||
28 | Made it possible to select in the date picker the (ligt grey ) | 31 | Made it possible to select in the date picker the (ligt grey ) |
29 | dates of the prev./next month with the mouse. | 32 | dates of the prev./next month with the mouse. |
30 | 33 | ||
31 | OM/Pi: | 34 | OM/Pi: |
32 | "Delete mail" icon in main window now deletes all selected mails. | 35 | "Delete mail" icon in main window now deletes all selected mails. |
33 | Fixed the problem, that the state flag of imap mails was ignored. | 36 | Fixed the problem, that the state flag of imap mails was ignored. |
34 | Now mails with "FLAG_SEEN" on the imap server get no icon in the list view | 37 | Now mails with "FLAG_SEEN" on the imap server get no icon in the list view |
35 | to indecate that they are already seen. | 38 | to indecate that they are already seen. |
36 | Fixed the problem that the body of some mails was not displayed in the | 39 | Fixed the problem that the body of some mails was not displayed in the |
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index e55d17e..dce95cd 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1172,32 +1172,32 @@ | |||
1172 | { "Todo list","Todo Liste" }, | 1172 | { "Todo list","Todo Liste" }, |
1173 | { "&Print...","Drucke..." }, | 1173 | { "&Print...","Drucke..." }, |
1174 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, | 1174 | { "<qt>Printing on printer <b>%1</b></qt>","<qt>Drucke auf Drucker <b>%1</b></qt>" }, |
1175 | { "[Unconfigured]","[Unkonfiguriert]" }, | 1175 | { "[Unconfigured]","[Unkonfiguriert]" }, |
1176 | { "OK","OK" }, | 1176 | { "OK","OK" }, |
1177 | { "FilterEditor","FilterEditor" }, | 1177 | { "FilterEditor","FilterEditor" }, |
1178 | { "Include","Inclusive" }, | 1178 | { "Include","Inclusive" }, |
1179 | { "Exclude","Exclusive" }, | 1179 | { "Exclude","Exclusive" }, |
1180 | { "Edit Selection...","Editiere Selektion..." }, | 1180 | { "Edit Selection...","Editiere Selektion..." }, |
1181 | { "recurring events","wiederholende Ereignisse" }, | 1181 | { "recurring events","wiederholende Ereignisse" }, |
1182 | { "completed to-dos","erledigte Todos" }, | 1182 | { "completed to-dos","erledigte Todos" }, |
1183 | { "events","Ereignisse" }, | 1183 | { "events","Ereignisse" }, |
1184 | { "todos","Todos" }, | 1184 | { "todos","Todos" }, |
1185 | { "journals","Journale" }, | 1185 | { "journals","Journale" }, |
1186 | { "public","öffentlich" }, | 1186 | { "public","öffentlich" }, |
1187 | { "private","privat" }, | 1187 | { "private","privat" }, |
1188 | { "confidential","vertraulich" }, | 1188 | { "confidential","vertraulich" }, |
1189 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, | 1189 | { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, |
1190 | { "Yesterday","Gestern" }, | 1190 | { "Yesterday","Gestern" }, |
1191 | { "Day after tomorrow","Übermorgen" }, | 1191 | { "Day after tomorrow","Übermorgen" }, |
1192 | { "Tomorrow","Morgen" }, | 1192 | { "Tomorrow","Morgen" }, |
1193 | { "Day before yesterday","Vorgestern" }, | 1193 | { "Day before yesterday","Vorgestern" }, |
1194 | { "Size %1","Größe %1" }, | 1194 | { "Size %1","Größe %1" }, |
1195 | { "New Agendasize: %1","Neue Agendagröße: %1" }, | 1195 | { "New Agendasize: %1","Neue Agendagröße: %1" }, |
1196 | { "","" }, | 1196 | { " (%1 y.)"," (%1 J.)" }, |
1197 | { "","" }, | 1197 | { "","" }, |
1198 | { "","" }, | 1198 | { "","" }, |
1199 | { "","" }, | 1199 | { "","" }, |
1200 | { "","" }, | 1200 | { "","" }, |
1201 | { "","" }, | 1201 | { "","" }, |
1202 | { "","" }, | 1202 | { "","" }, |
1203 | { "","" }, | 1203 | { "","" }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 1d5a57e..257a4dd 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1502,53 +1502,56 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd | |||
1502 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, | 1502 | a = new KCal::Attendee( realName, email,false,KCal::Attendee::NeedsAction, |
1503 | KCal::Attendee::ReqParticipant,uid) ; | 1503 | KCal::Attendee::ReqParticipant,uid) ; |
1504 | if ( addAnniversary( anniversary, assembledName, a, false ) ) | 1504 | if ( addAnniversary( anniversary, assembledName, a, false ) ) |
1505 | ++addCount; | 1505 | ++addCount; |
1506 | } | 1506 | } |
1507 | } | 1507 | } |
1508 | 1508 | ||
1509 | updateView(); | 1509 | updateView(); |
1510 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); | 1510 | topLevelWidget()->setCaption(QString::number( addCount )+ i18n(" birthdays/anniversaries added!")); |
1511 | 1511 | ||
1512 | } | 1512 | } |
1513 | 1513 | ||
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | 1516 | ||
1517 | 1517 | ||
1518 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) | 1518 | bool CalendarView::addAnniversary( QDate date, QString name, KCal::Attendee* a, bool birthday) |
1519 | { | 1519 | { |
1520 | //qDebug("addAnni "); | 1520 | //qDebug("addAnni "); |
1521 | Event * ev = new Event(); | 1521 | Event * ev = new Event(); |
1522 | if ( a ) { | 1522 | if ( a ) { |
1523 | ev->addAttendee( a ); | 1523 | ev->addAttendee( a ); |
1524 | } | 1524 | } |
1525 | QString kind; | 1525 | QString kind; |
1526 | if ( birthday ) | 1526 | if ( birthday ) { |
1527 | kind = i18n( "Birthday" ); | 1527 | kind = i18n( "Birthday" ); |
1528 | else | 1528 | ev->setSummary( name + " (" + QString::number(date.year()) +")"); |
1529 | } | ||
1530 | else { | ||
1529 | kind = i18n( "Anniversary" ); | 1531 | kind = i18n( "Anniversary" ); |
1530 | ev->setSummary( name + " - " + kind ); | 1532 | ev->setSummary( name + " (" + QString::number(date.year()) +") " + kind ); |
1533 | } | ||
1531 | ev->setOrganizer(a->email()); | 1534 | ev->setOrganizer(a->email()); |
1532 | ev->setCategories( kind ); | 1535 | ev->setCategories( kind ); |
1533 | ev->setDtStart( QDateTime(date) ); | 1536 | ev->setDtStart( QDateTime(date) ); |
1534 | ev->setDtEnd( QDateTime(date) ); | 1537 | ev->setDtEnd( QDateTime(date) ); |
1535 | ev->setFloats( true ); | 1538 | ev->setFloats( true ); |
1536 | Recurrence * rec = ev->recurrence(); | 1539 | Recurrence * rec = ev->recurrence(); |
1537 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); | 1540 | rec->setYearly(Recurrence::rYearlyMonth,1,-1); |
1538 | rec->addYearlyNum( date.month() ); | 1541 | rec->addYearlyNum( date.month() ); |
1539 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { | 1542 | if ( !mCalendar->addAnniversaryNoDup( ev ) ) { |
1540 | delete ev; | 1543 | delete ev; |
1541 | return false; | 1544 | return false; |
1542 | } | 1545 | } |
1543 | return true; | 1546 | return true; |
1544 | 1547 | ||
1545 | } | 1548 | } |
1546 | bool CalendarView::importQtopia( const QString &categories, | 1549 | bool CalendarView::importQtopia( const QString &categories, |
1547 | const QString &datebook, | 1550 | const QString &datebook, |
1548 | const QString &todolist ) | 1551 | const QString &todolist ) |
1549 | { | 1552 | { |
1550 | 1553 | ||
1551 | QtopiaFormat qtopiaFormat; | 1554 | QtopiaFormat qtopiaFormat; |
1552 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); | 1555 | qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); |
1553 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); | 1556 | if ( !categories.isEmpty() ) qtopiaFormat.load( mCalendar, categories ); |
1554 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); | 1557 | if ( !datebook.isEmpty() ) qtopiaFormat.load( mCalendar, datebook ); |
@@ -2490,63 +2493,65 @@ void CalendarView::showDatePicker( ) | |||
2490 | { | 2493 | { |
2491 | //qDebug("CalendarView::showDatePicker( ) "); | 2494 | //qDebug("CalendarView::showDatePicker( ) "); |
2492 | if ( mDateFrame->isVisible() ) | 2495 | if ( mDateFrame->isVisible() ) |
2493 | mDateFrame->hide(); | 2496 | mDateFrame->hide(); |
2494 | else { | 2497 | else { |
2495 | int w =mDatePicker->sizeHint().width() ; | 2498 | int w =mDatePicker->sizeHint().width() ; |
2496 | int h = mDatePicker->sizeHint().height() ; | 2499 | int h = mDatePicker->sizeHint().height() ; |
2497 | int dw = QApplication::desktop()->width(); | 2500 | int dw = QApplication::desktop()->width(); |
2498 | int dh = QApplication::desktop()->height(); | 2501 | int dh = QApplication::desktop()->height(); |
2499 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2502 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2500 | mDateFrame->show(); | 2503 | mDateFrame->show(); |
2501 | } | 2504 | } |
2502 | mDatePickerMode = 1; | 2505 | mDatePickerMode = 1; |
2503 | mDatePicker->setDate( mNavigator->selectedDates().first() ); | 2506 | mDatePicker->setDate( mNavigator->selectedDates().first() ); |
2504 | } | 2507 | } |
2505 | 2508 | ||
2506 | void CalendarView::showEventEditor() | 2509 | void CalendarView::showEventEditor() |
2507 | { | 2510 | { |
2508 | #ifdef DESKTOP_VERSION | 2511 | #ifdef DESKTOP_VERSION |
2509 | mEventEditor->show(); | 2512 | mEventEditor->show(); |
2510 | #else | 2513 | #else |
2511 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { | 2514 | if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { |
2512 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 2515 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
2513 | qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); | 2516 | qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); |
2517 | qApp->processEvents(); | ||
2514 | delete mEventEditor; | 2518 | delete mEventEditor; |
2515 | mEventEditor = mDialogManager->getEventEditor(); | 2519 | mEventEditor = mDialogManager->getEventEditor(); |
2516 | topLevelWidget()->setCaption( i18n("") ); | 2520 | topLevelWidget()->setCaption( i18n("") ); |
2517 | } | 2521 | } |
2518 | mEventEditor->showMaximized(); | 2522 | mEventEditor->showMaximized(); |
2519 | #endif | 2523 | #endif |
2520 | } | 2524 | } |
2521 | void CalendarView::showTodoEditor() | 2525 | void CalendarView::showTodoEditor() |
2522 | { | 2526 | { |
2523 | #ifdef DESKTOP_VERSION | 2527 | #ifdef DESKTOP_VERSION |
2524 | mTodoEditor->show(); | 2528 | mTodoEditor->show(); |
2525 | #else | 2529 | #else |
2526 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { | 2530 | if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { |
2527 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); | 2531 | topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); |
2528 | qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); | 2532 | qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); |
2533 | qApp->processEvents(); | ||
2529 | delete mTodoEditor; | 2534 | delete mTodoEditor; |
2530 | mTodoEditor = mDialogManager->getTodoEditor(); | 2535 | mTodoEditor = mDialogManager->getTodoEditor(); |
2531 | topLevelWidget()->setCaption( i18n("") ); | 2536 | topLevelWidget()->setCaption( i18n("") ); |
2532 | } | 2537 | } |
2533 | mTodoEditor->showMaximized(); | 2538 | mTodoEditor->showMaximized(); |
2534 | #endif | 2539 | #endif |
2535 | } | 2540 | } |
2536 | 2541 | ||
2537 | void CalendarView::cloneIncidence() | 2542 | void CalendarView::cloneIncidence() |
2538 | { | 2543 | { |
2539 | Incidence *incidence = currentSelection(); | 2544 | Incidence *incidence = currentSelection(); |
2540 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2545 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2541 | if ( incidence ) { | 2546 | if ( incidence ) { |
2542 | cloneIncidence(incidence); | 2547 | cloneIncidence(incidence); |
2543 | } | 2548 | } |
2544 | } | 2549 | } |
2545 | void CalendarView::moveIncidence() | 2550 | void CalendarView::moveIncidence() |
2546 | { | 2551 | { |
2547 | Incidence *incidence = currentSelection(); | 2552 | Incidence *incidence = currentSelection(); |
2548 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2553 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2549 | if ( incidence ) { | 2554 | if ( incidence ) { |
2550 | moveIncidence(incidence); | 2555 | moveIncidence(incidence); |
2551 | } | 2556 | } |
2552 | } | 2557 | } |
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 7166a01..4111c5d 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp | |||
@@ -579,48 +579,56 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a | |||
579 | if ( !needClose) | 579 | if ( !needClose) |
580 | tempText +="["; | 580 | tempText +="["; |
581 | tempText += "i"; | 581 | tempText += "i"; |
582 | needClose =true; | 582 | needClose =true; |
583 | } | 583 | } |
584 | if ( ev->recurrence()->doesRecur() ) { | 584 | if ( ev->recurrence()->doesRecur() ) { |
585 | if ( !needClose) | 585 | if ( !needClose) |
586 | tempText +="["; | 586 | tempText +="["; |
587 | tempText += "r"; | 587 | tempText += "r"; |
588 | needClose =true; | 588 | needClose =true; |
589 | } | 589 | } |
590 | if ( needClose ) { | 590 | if ( needClose ) { |
591 | tempText += "] "; | 591 | tempText += "] "; |
592 | } | 592 | } |
593 | if ( ev->cancelled() ) | 593 | if ( ev->cancelled() ) |
594 | tempText += "</font>"; | 594 | tempText += "</font>"; |
595 | tempText += "<a "; | 595 | tempText += "<a "; |
596 | if (ev->type()=="Event") tempText += "href=\"event:"; | 596 | if (ev->type()=="Event") tempText += "href=\"event:"; |
597 | if (ev->type()=="Todo") tempText += "href=\"todo:"; | 597 | if (ev->type()=="Todo") tempText += "href=\"todo:"; |
598 | tempText += ev->uid() + "\">"; | 598 | tempText += ev->uid() + "\">"; |
599 | if ( ev->summary().length() > 0 ) | 599 | if ( ev->summary().length() > 0 ) |
600 | tempText += ev->summary(); | 600 | tempText += ev->summary(); |
601 | else | 601 | else |
602 | tempText += i18n("-no summary-"); | 602 | tempText += i18n("-no summary-"); |
603 | if ( ev->categories().contains( i18n("Birthday") ) || ev->categories().contains( i18n("Anniversary") ) ) { | ||
604 | noc = ev->getNextOccurence( cdt, &ok ); | ||
605 | if ( ok ) { | ||
606 | int years = noc.date().year() - ev->dtStart().date().year(); | ||
607 | tempText += i18n(" (%1 y.)"). arg( years ); | ||
608 | } | ||
609 | } | ||
610 | |||
603 | tempText += "</a>"; | 611 | tempText += "</a>"; |
604 | if ( KOPrefs::instance()->mWNViewShowLocation ) | 612 | if ( KOPrefs::instance()->mWNViewShowLocation ) |
605 | if ( !ev->location().isEmpty() ) | 613 | if ( !ev->location().isEmpty() ) |
606 | tempText += " ("+ev->location() +")"; | 614 | tempText += " ("+ev->location() +")"; |
607 | if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents) | 615 | if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents) |
608 | tempText += " ["+ev->relatedTo()->summary() +"]"; | 616 | tempText += " ["+ev->relatedTo()->summary() +"]"; |
609 | tempText += "</td></tr>\n"; | 617 | tempText += "</td></tr>\n"; |
610 | mText += tempText; | 618 | mText += tempText; |
611 | return true; | 619 | return true; |
612 | } | 620 | } |
613 | 621 | ||
614 | bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) | 622 | bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) |
615 | { | 623 | { |
616 | if ( mTodos.find( ev ) != mTodos.end() ) return false; | 624 | if ( mTodos.find( ev ) != mTodos.end() ) return false; |
617 | 625 | ||
618 | mTodos.append( ev ); | 626 | mTodos.append( ev ); |
619 | if ( !isSub ) | 627 | if ( !isSub ) |
620 | mText += "<p>"; | 628 | mText += "<p>"; |
621 | else | 629 | else |
622 | mText += "<li>"; | 630 | mText += "<li>"; |
623 | mText += "[" +QString::number(ev->priority()) + "/" + QString::number(((Todo*)ev)->percentComplete())+"%] "; | 631 | mText += "[" +QString::number(ev->priority()) + "/" + QString::number(((Todo*)ev)->percentComplete())+"%] "; |
624 | 632 | ||
625 | 633 | ||
626 | mText += ind; | 634 | mText += ind; |
@@ -634,49 +642,52 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) | |||
634 | if ( !needClose) | 642 | if ( !needClose) |
635 | mText +="["; | 643 | mText +="["; |
636 | mText += "a"; | 644 | mText += "a"; |
637 | needClose =true; | 645 | needClose =true; |
638 | 646 | ||
639 | } | 647 | } |
640 | 648 | ||
641 | if ( ev->description().length() > 0 ) { | 649 | if ( ev->description().length() > 0 ) { |
642 | if ( !needClose) | 650 | if ( !needClose) |
643 | mText +="["; | 651 | mText +="["; |
644 | mText += "i"; | 652 | mText += "i"; |
645 | needClose =true; | 653 | needClose =true; |
646 | } | 654 | } |
647 | // if ( ev->recurrence()->doesRecur() ) { | 655 | // if ( ev->recurrence()->doesRecur() ) { |
648 | // if ( !needClose) | 656 | // if ( !needClose) |
649 | // mText +="("; | 657 | // mText +="("; |
650 | // mText += "r"; | 658 | // mText += "r"; |
651 | // needClose =true; | 659 | // needClose =true; |
652 | // } | 660 | // } |
653 | if ( needClose ) | 661 | if ( needClose ) |
654 | mText += "] "; | 662 | mText += "] "; |
655 | if ( ev->cancelled() ) | 663 | if ( ev->cancelled() ) |
656 | mText += "</font>"; | 664 | mText += "</font>"; |
657 | mText += "<a href=\"todo:" + ev->uid() + "\">"; | 665 | mText += "<a href=\"todo:" + ev->uid() + "\">"; |
658 | mText += ev->summary(); | 666 | if ( ev->summary().length() > 0 ) |
667 | mText += ev->summary(); | ||
668 | else | ||
669 | mText += i18n("-no summary-"); | ||
659 | mText += "</a>"; | 670 | mText += "</a>"; |
660 | if ( ((Todo*)ev)->hasDueDate () ) { | 671 | if ( ((Todo*)ev)->hasDueDate () ) { |
661 | QString year = ""; | 672 | QString year = ""; |
662 | int ye = ((Todo*)ev)->dtDue().date().year(); | 673 | int ye = ((Todo*)ev)->dtDue().date().year(); |
663 | if ( QDateTime::currentDateTime().date().year() != ye ) | 674 | if ( QDateTime::currentDateTime().date().year() != ye ) |
664 | year = QString::number( ye ); | 675 | year = QString::number( ye ); |
665 | QString dfs = KGlobal::locale()->dateFormatShort(); | 676 | QString dfs = KGlobal::locale()->dateFormatShort(); |
666 | KGlobal::locale()->setDateFormatShort("%d.%b"); | 677 | KGlobal::locale()->setDateFormatShort("%d.%b"); |
667 | mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>"; | 678 | mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>"; |
668 | KGlobal::locale()->setDateFormatShort(dfs); | 679 | KGlobal::locale()->setDateFormatShort(dfs); |
669 | } | 680 | } |
670 | if ( KOPrefs::instance()->mWNViewShowLocation ) | 681 | if ( KOPrefs::instance()->mWNViewShowLocation ) |
671 | if ( !ev->location().isEmpty() ) | 682 | if ( !ev->location().isEmpty() ) |
672 | mText += " ("+ev->location() +")"; | 683 | mText += " ("+ev->location() +")"; |
673 | if ( !isSub ) { | 684 | if ( !isSub ) { |
674 | if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents) | 685 | if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents) |
675 | mText += " ["+ev->relatedTo()->summary() +"]"; | 686 | mText += " ["+ev->relatedTo()->summary() +"]"; |
676 | mText += "</p>\n"; | 687 | mText += "</p>\n"; |
677 | } | 688 | } |
678 | else { | 689 | else { |
679 | ind += "-"; | 690 | ind += "-"; |
680 | mText += "</li>\n"; | 691 | mText += "</li>\n"; |
681 | } | 692 | } |
682 | QPtrList<Incidence> Relations = ev->relations(); | 693 | QPtrList<Incidence> Relations = ev->relations(); |