summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp2
-rw-r--r--korganizer/kotodoviewitem.cpp26
-rw-r--r--korganizer/mainwindow.cpp11
3 files changed, 22 insertions, 17 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 31c5659..cb519b2 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -1203,5 +1203,5 @@ void KOMonthView::updateView()
invalid = true;
//qDebug("invalid %s", event->summary().latin1());
- incidenceStart = QDateTime( mStartDate );
+ incidenceStart = QDateTime( mStartDate ).addSecs( -2 );;
}
if ( last )
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 6bdee18..78d4027 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -329,19 +329,15 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
} else
setColor = false;
- }
- if (mTodo->hasDueDate()) {
- if (mTodo->dtDue().date()==QDate::currentDate() &&
- !mTodo->isCompleted()) {
- //_cg.setColor( role , KOPrefs::instance()->mTodoDueTodayColor);
- colorToSet = KOPrefs::instance()->mTodoDueTodayColor;
- setColor = true;
- }
- if (mTodo->dtDue().date() < QDate::currentDate() &&
- !mTodo->isCompleted()) {
- //_cg.setColor( role, KOPrefs::instance()->mTodoOverdueColor);
- colorToSet = KOPrefs::instance()->mTodoOverdueColor;
- setColor = true;
- }
- }
+ }
+
+ int odue = mTodo->hasDueSubTodo( !isOpen());
+ if (odue == 2) {
+ colorToSet = KOPrefs::instance()->mTodoOverdueColor;
+ setColor = true;
+ } else if ( odue == 1 ) {
+ colorToSet = KOPrefs::instance()->mTodoDueTodayColor;
+ setColor = true;
+ }
+
if ( setColor ) {
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index a2c20a8..5bc8c00 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1347,5 +1347,14 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+
"-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
- startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
+ if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) {
+ bool ok;
+ QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
+ if ( ok ) {
+ int years = noc.date().year() - incidence->dtStart().date().year();
+ startString += i18n(" (%1 y.)"). arg( years );
+ }
+ }
+ else
+ startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
}