summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp20
-rw-r--r--libkcal/kincidenceformatter.cpp16
2 files changed, 35 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 607e549..92d2a80 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -398,2 +398,12 @@ void KOEventViewer::appendEvent(Event *event, int mode )
QDateTime t = alarm->time();
+
+ if (event->doesRecur()) {
+ bool ok = false;
+ int offset = 0;
+ QDateTime next = event->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ;
+ if ( ok ) {
+ t = next;
+ }
+ }
+
QString s =i18n("( %1 before )").arg( alarm->offsetText() );
@@ -520,3 +530,11 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
QDateTime t = alarm->time();
- QString s =i18n("( %1 before )").arg( alarm->offsetText() );
+ if (event->doesRecur()) {
+ bool ok = false;
+ int offset = 0;
+ QDateTime next = event->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ;
+ if ( ok ) {
+ t = next;
+ }
+ }
+ QString s =i18n("( %1 before )").arg( alarm->offsetText() );
if ( wideScreen ) {
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index 4dfe16a..733b897 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -137,2 +137,10 @@ void KIncidenceFormatter::setEvent(Event *event)
QDateTime t = alarm->time();
+ if (event->doesRecur()) {
+ bool ok = false;
+ int offset = 0;
+ QDateTime next = event->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ;
+ if ( ok ) {
+ t = next;
+ }
+ }
QString s =i18n("( %1 before )").arg( alarm->offsetText() );
@@ -246,2 +254,10 @@ void KIncidenceFormatter::setTodo(Todo *event )
QDateTime t = alarm->time();
+ if (event->doesRecur()) {
+ bool ok = false;
+ int offset = 0;
+ QDateTime next = event->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ;
+ if ( ok ) {
+ t = next;
+ }
+ }
QString s =i18n("( %1 before )").arg( alarm->offsetText() );