author | zautrix <zautrix> | 2005-01-27 12:25:55 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-27 12:25:55 (UTC) |
commit | 32ad6c6cc658d952c9dfa1fcf5857662bcf01c22 (patch) (side-by-side diff) | |
tree | 6d25535ba67a579fd1560e6f87ceb4fef0ad8fc9 | |
parent | c8b484570a9cf8aacc070f92141c8bcfebbf3a93 (diff) | |
download | kdepimpi-32ad6c6cc658d952c9dfa1fcf5857662bcf01c22.zip kdepimpi-32ad6c6cc658d952c9dfa1fcf5857662bcf01c22.tar.gz kdepimpi-32ad6c6cc658d952c9dfa1fcf5857662bcf01c22.tar.bz2 |
birthday fixes
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index dce95cd..3d16c1a 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1185,19 +1185,19 @@ { "journals","Journale" }, { "public","öffentlich" }, { "private","privat" }, { "confidential","vertraulich" }, { "\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!","\nhat Unter-Todos.\nAlle erledigten Unter-Todos\nwerden auch gelöscht!" }, { "Yesterday","Gestern" }, { "Day after tomorrow","Übermorgen" }, { "Tomorrow","Morgen" }, { "Day before yesterday","Vorgestern" }, { "Size %1","Größe %1" }, { "New Agendasize: %1","Neue Agendagröße: %1" }, { " (%1 y.)"," (%1 J.)" }, -{ "","" }, +{ "Allday:","Ganztägig:" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 4111c5d..57623e6 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -467,24 +467,27 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a QDateTime cdt = QDateTime::currentDateTime(); QDateTime noc; QString tempText; if ( appendTable && !notRed ) { tempText = "<table>"; } 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 tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; } else { if (!ev->doesFloat()) { Event *event = static_cast<Event *>(ev); QDateTime st,end; @@ -521,25 +524,33 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a if ( !KOPrefs::instance()->mWNViewShowsPast ) return false; tempText += "<font color=\"#F00000\">" + dateText + "</font>"; } else if ( st < cdt ) tempText += "<font color=\"#008000\">" + dateText + "</font>"; else tempText += dateText; } } else { + 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:"); if (reply) { tempText += " "; if ( noc != cdt ) { tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; } } else { @@ -591,25 +602,25 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a tempText += "] "; } if ( ev->cancelled() ) tempText += "</font>"; tempText += "<a "; if (ev->type()=="Event") tempText += "href=\"event:"; 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 ); } } tempText += "</a>"; if ( KOPrefs::instance()->mWNViewShowLocation ) if ( !ev->location().isEmpty() ) tempText += " ("+ev->location() +")"; if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents) |