-rw-r--r-- | korganizer/kowhatsnextview.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 4111c5d..57623e6 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -473,12 +473,15 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a bool ok = true; if ( reply ) { noc = ev->getNextOccurence( cdt, &ok ); if (! ok && ev->type() == "Event") return false; } + bool bDay = false; + if ( ev->categories().contains( i18n("Birthday") ) || ev->categories().contains( i18n("Anniversary") ) ) + bDay = true; tempText += "<tr><td><b>"; if (ev->type()=="Event") { if (reply) { if (!ev->doesFloat()) tempText += KGlobal::locale()->formatDateTime( noc , KOPrefs::instance()->mShortDateInViewer) +": "; else @@ -527,13 +530,21 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a else tempText += dateText; } } else { - tempText += i18n("Allday:"); + if ( bDay ) { + + if ( ev->categories().contains( i18n("Birthday") )) + tempText += "<font color=\"#F00000\">" + i18n("Birthday") +":</font>"; + else + tempText += "<font color=\"#F00000\">" + i18n("Anniversary")+":</font>"; + } else { + tempText += i18n("Allday:"); + } } } } else { mTodos.append( ev ); tempText += i18n("ToDo:"); @@ -597,13 +608,13 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a if (ev->type()=="Todo") tempText += "href=\"todo:"; tempText += ev->uid() + "\">"; if ( ev->summary().length() > 0 ) tempText += ev->summary(); else tempText += i18n("-no summary-"); - if ( ev->categories().contains( i18n("Birthday") ) || ev->categories().contains( i18n("Anniversary") ) ) { + if ( bDay ) { noc = ev->getNextOccurence( cdt, &ok ); if ( ok ) { int years = noc.date().year() - ev->dtStart().date().year(); tempText += i18n(" (%1 y.)"). arg( years ); } } |