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, 6 insertions, 0 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 391b3bb..18dc656 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -638,64 +638,70 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
638bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) 638bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
639{ 639{
640 if ( mTodos.find( ev ) != mTodos.end() ) return false; 640 if ( mTodos.find( ev ) != mTodos.end() ) return false;
641 641
642 mTodos.append( ev ); 642 mTodos.append( ev );
643 if ( !isSub ) 643 if ( !isSub )
644 mText += "<p>"; 644 mText += "<p>";
645 else 645 else
646 mText += "<li>"; 646 mText += "<li>";
647 mText += "[" +QString::number(ev->priority()) + "/" + QString::number(((Todo*)ev)->percentComplete())+"%] "; 647 mText += "[" +QString::number(ev->priority()) + "/" + QString::number(((Todo*)ev)->percentComplete())+"%] ";
648 648
649 649
650 mText += ind; 650 mText += ind;
651 bool needClose = false; 651 bool needClose = false;
652 if ( ev->cancelled() ) { 652 if ( ev->cancelled() ) {
653 mText += "<font color=\"#F00000\">[c"; 653 mText += "<font color=\"#F00000\">[c";
654 needClose =true; 654 needClose =true;
655 655
656 } 656 }
657 if ( ev->isAlarmEnabled() ) { 657 if ( ev->isAlarmEnabled() ) {
658 if ( !needClose) 658 if ( !needClose)
659 mText +="["; 659 mText +="[";
660 mText += "a"; 660 mText += "a";
661 needClose =true; 661 needClose =true;
662 662
663 } 663 }
664 664
665 if ( ev->description().length() > 0 ) { 665 if ( ev->description().length() > 0 ) {
666 if ( !needClose) 666 if ( !needClose)
667 mText +="["; 667 mText +="[";
668 mText += "i"; 668 mText += "i";
669 needClose =true; 669 needClose =true;
670 }
671 if ( ev->doesRecur() ) {
672 if ( !needClose)
673 mText +="[";
674 mText += "r";
675 needClose =true;
670 } 676 }
671 // if ( ev->recurrence()->doesRecur() ) { 677 // if ( ev->recurrence()->doesRecur() ) {
672 // if ( !needClose) 678 // if ( !needClose)
673 // mText +="("; 679 // mText +="(";
674 // mText += "r"; 680 // mText += "r";
675 // needClose =true; 681 // needClose =true;
676 // } 682 // }
677 if ( needClose ) 683 if ( needClose )
678 mText += "] "; 684 mText += "] ";
679 if ( ev->cancelled() ) 685 if ( ev->cancelled() )
680 mText += "</font>"; 686 mText += "</font>";
681 mText += "<a href=\"todo:" + ev->uid() + "\">"; 687 mText += "<a href=\"todo:" + ev->uid() + "\">";
682 if ( ev->summary().length() > 0 ) 688 if ( ev->summary().length() > 0 )
683 mText += ev->summary(); 689 mText += ev->summary();
684 else 690 else
685 mText += i18n("-no summary-"); 691 mText += i18n("-no summary-");
686 mText += "</a>"; 692 mText += "</a>";
687 if ( ((Todo*)ev)->hasDueDate () ) { 693 if ( ((Todo*)ev)->hasDueDate () ) {
688 QString year = ""; 694 QString year = "";
689 int ye = ((Todo*)ev)->dtDue().date().year(); 695 int ye = ((Todo*)ev)->dtDue().date().year();
690 if ( QDateTime::currentDateTime().date().year() != ye ) 696 if ( QDateTime::currentDateTime().date().year() != ye )
691 year = QString::number( ye ); 697 year = QString::number( ye );
692 QString dfs = KGlobal::locale()->dateFormatShort(); 698 QString dfs = KGlobal::locale()->dateFormatShort();
693 KGlobal::locale()->setDateFormatShort("%d.%b"); 699 KGlobal::locale()->setDateFormatShort("%d.%b");
694 mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>"; 700 mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>";
695 KGlobal::locale()->setDateFormatShort(dfs); 701 KGlobal::locale()->setDateFormatShort(dfs);
696 } 702 }
697 if ( KOPrefs::instance()->mWNViewShowLocation ) 703 if ( KOPrefs::instance()->mWNViewShowLocation )
698 if ( !ev->location().isEmpty() ) 704 if ( !ev->location().isEmpty() )
699 mText += " ("+ev->location() +")"; 705 mText += " ("+ev->location() +")";
700 if ( !isSub ) { 706 if ( !isSub ) {
701 if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents) 707 if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents)