summaryrefslogtreecommitdiffabout
path: root/korganizer/kowhatsnextview.cpp
Unidiff
Diffstat (limited to 'korganizer/kowhatsnextview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kowhatsnextview.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 10665f4..391b3bb 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -594,49 +594,53 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
594 needClose =true; 594 needClose =true;
595 } 595 }
596 if ( ev->recurrence()->doesRecur() ) { 596 if ( ev->recurrence()->doesRecur() ) {
597 if ( !needClose) 597 if ( !needClose)
598 tempText +="["; 598 tempText +="[";
599 tempText += "r"; 599 tempText += "r";
600 needClose =true; 600 needClose =true;
601 } 601 }
602 if ( needClose ) { 602 if ( needClose ) {
603 tempText += "] "; 603 tempText += "] ";
604 } 604 }
605 if ( ev->cancelled() ) 605 if ( ev->cancelled() )
606 tempText += "</font>"; 606 tempText += "</font>";
607 tempText += "<a "; 607 tempText += "<a ";
608 if (ev->type()=="Event") tempText += "href=\"event:"; 608 if (ev->type()=="Event") tempText += "href=\"event:";
609 if (ev->type()=="Todo") tempText += "href=\"todo:"; 609 if (ev->type()=="Todo") tempText += "href=\"todo:";
610 tempText += ev->uid() + "\">"; 610 tempText += ev->uid() + "\">";
611 if ( ev->summary().length() > 0 ) 611 if ( ev->summary().length() > 0 )
612 tempText += ev->summary(); 612 tempText += ev->summary();
613 else 613 else
614 tempText += i18n("-no summary-"); 614 tempText += i18n("-no summary-");
615 if ( bDay ) { 615 if ( bDay ) {
616 noc = ev->getNextOccurence( cdt.addDays(-1), &ok ); 616 noc = ev->getNextOccurence( cdt.addDays(-1), &ok );
617 if ( ok ) { 617 if ( ok ) {
618 int years = noc.date().year() - ev->dtStart().date().year(); 618 int years = 0;
619 if ( ev->type() =="Todo" ) {
620 years = noc.date().year() -((Todo*)ev)->dtDue().date().year();
621 } else
622 years = noc.date().year() - ev->dtStart().date().year();
619 tempText += i18n(" (%1 y.)"). arg( years ); 623 tempText += i18n(" (%1 y.)"). arg( years );
620 } 624 }
621 } 625 }
622 626
623 tempText += "</a>"; 627 tempText += "</a>";
624 if ( KOPrefs::instance()->mWNViewShowLocation ) 628 if ( KOPrefs::instance()->mWNViewShowLocation )
625 if ( !ev->location().isEmpty() ) 629 if ( !ev->location().isEmpty() )
626 tempText += " ("+ev->location() +")"; 630 tempText += " ("+ev->location() +")";
627 if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents) 631 if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents)
628 tempText += " ["+ev->relatedTo()->summary() +"]"; 632 tempText += " ["+ev->relatedTo()->summary() +"]";
629 tempText += "</td></tr>\n"; 633 tempText += "</td></tr>\n";
630 mText += tempText; 634 mText += tempText;
631 return true; 635 return true;
632} 636}
633 637
634bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) 638bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
635{ 639{
636 if ( mTodos.find( ev ) != mTodos.end() ) return false; 640 if ( mTodos.find( ev ) != mTodos.end() ) return false;
637 641
638 mTodos.append( ev ); 642 mTodos.append( ev );
639 if ( !isSub ) 643 if ( !isSub )
640 mText += "<p>"; 644 mText += "<p>";
641 else 645 else
642 mText += "<li>"; 646 mText += "<li>";