summaryrefslogtreecommitdiffabout
path: root/korganizer/kowhatsnextview.cpp
Unidiff
Diffstat (limited to 'korganizer/kowhatsnextview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kowhatsnextview.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 7166a01..4111c5d 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -597,12 +597,20 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
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() +"]";
@@ -652,13 +660,16 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
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 );