summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/kowhatsnextview.cpp15
2 files changed, 14 insertions, 3 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
@@ -1189,15 +1189,15 @@
{ "\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
@@ -471,16 +471,19 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
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) +": ";
@@ -525,17 +528,25 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
else if ( st < cdt )
tempText += "<font color=\"#008000\">" + dateText + "</font>";
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:");
if (reply) {
tempText += " ";
@@ -595,17 +606,17 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
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>";