summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-22 22:28:12 (UTC)
committer zautrix <zautrix>2005-02-22 22:28:12 (UTC)
commit87a2f1a301beae2a8550c340348741c69f0ac1dd (patch) (side-by-side diff)
tree5fd29a75f50da5ef37a01097c12997a18c56543d
parent688723b6cd545ad1fa390d98a74680e912578fe8 (diff)
downloadkdepimpi-87a2f1a301beae2a8550c340348741c69f0ac1dd.zip
kdepimpi-87a2f1a301beae2a8550c340348741c69f0ac1dd.tar.gz
kdepimpi-87a2f1a301beae2a8550c340348741c69f0ac1dd.tar.bz2
todo fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--desktop/rpm/kdepim_rpm2
-rw-r--r--korganizer/koagendaview.cpp10
-rw-r--r--korganizer/kotodoeditor.cpp35
-rw-r--r--version2
5 files changed, 17 insertions, 37 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index beeaf60..05c1afd 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,8 +1,13 @@
Info about the changes in new versions of KDE-Pim/Pi
+********** VERSION 2.0.12 ************
+
+Fixed a bug in todo start/due date handling for non recurring todos with a start and due date.
+
+
********** VERSION 2.0.11 ************
Fixed some problems in pi-sync mode
(e.g. details of events were not synced properly)
********** VERSION 2.0.10 ************
diff --git a/desktop/rpm/kdepim_rpm b/desktop/rpm/kdepim_rpm
index b6a8491..0d4c9d6 100644
--- a/desktop/rpm/kdepim_rpm
+++ b/desktop/rpm/kdepim_rpm
@@ -1,9 +1,9 @@
Summary: A collection of PIM programs
Name: KDE-Pim-Pi
-Version: 2.0.11
+Version: 2.0.12
Release: SuSE_9.2
Copyright:GPL
Group: Productivity/Pim
Source:http://sourceforge.net/projects/kdepimpi/
URL:http://sourceforge.net/projects/kdepimpi/
Packager: zautrix
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 4ff6899..db66413 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -998,22 +998,16 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
if ( item->incidence()->type() == "Event" ) {
item->incidence()->setDtStart(startDt);
(static_cast<Event*>(item->incidence()))->setDtEnd(endDt);
} else if ( item->incidence()->type() == "Todo" ) {
Todo* to = static_cast<Todo*>(item->incidence());
- int len = 0;
- if ( to->hasStartDate() && to->hasDueDate() )
- len = to->dtStart().secsTo( to->dtDue());
to->setDtDue(endDt);
if ( to->hasStartDate() ) {
- if ( len>0 )
- to->setDtStart(to->dtDue().addSecs( -len ));
- else
- if (to->dtStart() > to->dtDue() )
- to->setDtStart(to->dtDue().addDays( -3 ));
+ if (to->dtStart() >= to->dtDue() )
+ to->setDtStart(to->dtDue().addDays( -2 ));
}
}
//qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() );
item->incidence()->setRevision(item->incidence()->revision()+1);
item->setItemDate(startDt.date());
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index f9f037a..51e2524 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -349,41 +349,22 @@ void KOTodoEditor::writeTodo(Todo *event)
// set related event, i.e. parent to-do in this case.
if (mRelatedTodo) {
event->setRelatedTo(mRelatedTodo);
}
if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) {
mRecurrence->writeEvent(event);
- event->setRecurrenceID( event->dtStart().addSecs(-1) );
- event->setRecurDates();
-#if 0
- bool ok;
- QDateTime next = event->getNextOccurence( event->dtStart().addSecs(-1), &ok );
- if ( ok ) {
- QDateTime from,to;
- bool time = mGeneral->mTimeButton->isChecked();
- if ( time ) {
- to = QDateTime( mGeneral->mDueDateEdit->date(), mGeneral->mDueTimeEdit->getTime() ) ;
- from = QDateTime( mGeneral->mStartDateEdit->date(),mGeneral->mStartTimeEdit->getTime( )) ;
- } else {
- to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ;
- from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ;
- }
- if ( to < from )
- to = from;
- int secs = from.secsTo( to );
- event->setRecurrenceID( next );
- event->setDtStart( next );
- event->setDtDue( next.addSecs( secs ) );
- }
- else {
+ if ( event->doesRecur() ) {
+ event->setRecurrenceID( event->dtStart().addSecs(-1) );
+ event->setRecurDates();
+ } else {
event->setHasRecurrenceID( false );
- event->recurrence()->unsetRecurs();
}
-#endif
- } else
- event->recurrence()->unsetRecurs();
+ } else {
+ event->setHasRecurrenceID( false );
+ event->recurrence()->unsetRecurs();
+ }
}
bool KOTodoEditor::validateInput()
{
if (!mGeneral->validateInput()) return false;
if (!mDetails->validateInput()) return false;
diff --git a/version b/version
index 3a336e3..e90e80d 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-version = "2.0.11";
+version = "2.0.12";