author | zautrix <zautrix> | 2005-02-22 22:28:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-22 22:28:12 (UTC) |
commit | 87a2f1a301beae2a8550c340348741c69f0ac1dd (patch) (unidiff) | |
tree | 5fd29a75f50da5ef37a01097c12997a18c56543d | |
parent | 688723b6cd545ad1fa390d98a74680e912578fe8 (diff) | |
download | kdepimpi-87a2f1a301beae2a8550c340348741c69f0ac1dd.zip kdepimpi-87a2f1a301beae2a8550c340348741c69f0ac1dd.tar.gz kdepimpi-87a2f1a301beae2a8550c340348741c69f0ac1dd.tar.bz2 |
todo fixes
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 5 | ||||
-rw-r--r-- | desktop/rpm/kdepim_rpm | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 10 | ||||
-rw-r--r-- | korganizer/kotodoeditor.cpp | 35 | ||||
-rw-r--r-- | version | 2 |
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,14 +1,19 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.0.12 ************ | ||
4 | |||
5 | Fixed a bug in todo start/due date handling for non recurring todos with a start and due date. | ||
6 | |||
7 | |||
3 | ********** VERSION 2.0.11 ************ | 8 | ********** VERSION 2.0.11 ************ |
4 | 9 | ||
5 | Fixed some problems in pi-sync mode | 10 | Fixed some problems in pi-sync mode |
6 | (e.g. details of events were not synced properly) | 11 | (e.g. details of events were not synced properly) |
7 | 12 | ||
8 | ********** VERSION 2.0.10 ************ | 13 | ********** VERSION 2.0.10 ************ |
9 | 14 | ||
10 | KO/Pi: | 15 | KO/Pi: |
11 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. | 16 | In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view. |
12 | This is fixed. | 17 | This is fixed. |
13 | Changed the search dialog a bit to make it more user friendly. | 18 | Changed the search dialog a bit to make it more user friendly. |
14 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). | 19 | (E.g.: Removed message box about "no items found" and set key focus to search line edit after search). |
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,15 +1,15 @@ | |||
1 | Summary: A collection of PIM programs | 1 | Summary: A collection of PIM programs |
2 | Name: KDE-Pim-Pi | 2 | Name: KDE-Pim-Pi |
3 | Version: 2.0.11 | 3 | Version: 2.0.12 |
4 | Release: SuSE_9.2 | 4 | Release: SuSE_9.2 |
5 | Copyright:GPL | 5 | Copyright:GPL |
6 | Group: Productivity/Pim | 6 | Group: Productivity/Pim |
7 | Source:http://sourceforge.net/projects/kdepimpi/ | 7 | Source:http://sourceforge.net/projects/kdepimpi/ |
8 | URL:http://sourceforge.net/projects/kdepimpi/ | 8 | URL:http://sourceforge.net/projects/kdepimpi/ |
9 | Packager: zautrix | 9 | Packager: zautrix |
10 | 10 | ||
11 | %description | 11 | %description |
12 | This package contains the platform-independent PIM programs from | 12 | This package contains the platform-independent PIM programs from |
13 | www.pi-sync.net, compiled for SuSE 9.2: | 13 | www.pi-sync.net, compiled for SuSE 9.2: |
14 | KTimeTacker/Pi | 14 | KTimeTacker/Pi |
15 | KPhone/Pi | 15 | KPhone/Pi |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 4ff6899..db66413 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -992,34 +992,28 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) | |||
992 | else | 992 | else |
993 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); | 993 | endDt.setTime((static_cast<Todo*>(item->incidence()))->dtDue().time()); |
994 | endDt.setDate(startDate); | 994 | endDt.setDate(startDate); |
995 | } | 995 | } |
996 | } | 996 | } |
997 | } | 997 | } |
998 | if ( item->incidence()->type() == "Event" ) { | 998 | if ( item->incidence()->type() == "Event" ) { |
999 | item->incidence()->setDtStart(startDt); | 999 | item->incidence()->setDtStart(startDt); |
1000 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); | 1000 | (static_cast<Event*>(item->incidence()))->setDtEnd(endDt); |
1001 | } else if ( item->incidence()->type() == "Todo" ) { | 1001 | } else if ( item->incidence()->type() == "Todo" ) { |
1002 | Todo* to = static_cast<Todo*>(item->incidence()); | 1002 | Todo* to = static_cast<Todo*>(item->incidence()); |
1003 | 1003 | ||
1004 | int len = 0; | ||
1005 | if ( to->hasStartDate() && to->hasDueDate() ) | ||
1006 | len = to->dtStart().secsTo( to->dtDue()); | ||
1007 | to->setDtDue(endDt); | 1004 | to->setDtDue(endDt); |
1008 | if ( to->hasStartDate() ) { | 1005 | if ( to->hasStartDate() ) { |
1009 | if ( len>0 ) | 1006 | if (to->dtStart() >= to->dtDue() ) |
1010 | to->setDtStart(to->dtDue().addSecs( -len )); | 1007 | to->setDtStart(to->dtDue().addDays( -2 )); |
1011 | else | ||
1012 | if (to->dtStart() > to->dtDue() ) | ||
1013 | to->setDtStart(to->dtDue().addDays( -3 )); | ||
1014 | } | 1008 | } |
1015 | 1009 | ||
1016 | } | 1010 | } |
1017 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); | 1011 | //qDebug("KOAgendaView::updateEventDates stsart %s end %s ", startDt.toString().latin1(), endDt.toString().latin1() ); |
1018 | item->incidence()->setRevision(item->incidence()->revision()+1); | 1012 | item->incidence()->setRevision(item->incidence()->revision()+1); |
1019 | item->setItemDate(startDt.date()); | 1013 | item->setItemDate(startDt.date()); |
1020 | //item->updateItem(); | 1014 | //item->updateItem(); |
1021 | if ( item->incidence()->type() == "Todo" ) { | 1015 | if ( item->incidence()->type() == "Todo" ) { |
1022 | emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); | 1016 | emit todoMoved((Todo*)item->incidence(), KOGlobals::EVENTEDITED ); |
1023 | 1017 | ||
1024 | } | 1018 | } |
1025 | else | 1019 | else |
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index f9f037a..51e2524 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp | |||
@@ -343,53 +343,34 @@ void KOTodoEditor::readTodo(Todo *todo) | |||
343 | 343 | ||
344 | void KOTodoEditor::writeTodo(Todo *event) | 344 | void KOTodoEditor::writeTodo(Todo *event) |
345 | { | 345 | { |
346 | mGeneral->writeTodo(event); | 346 | mGeneral->writeTodo(event); |
347 | mDetails->writeEvent(event); | 347 | mDetails->writeEvent(event); |
348 | 348 | ||
349 | // set related event, i.e. parent to-do in this case. | 349 | // set related event, i.e. parent to-do in this case. |
350 | if (mRelatedTodo) { | 350 | if (mRelatedTodo) { |
351 | event->setRelatedTo(mRelatedTodo); | 351 | event->setRelatedTo(mRelatedTodo); |
352 | } | 352 | } |
353 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { | 353 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { |
354 | mRecurrence->writeEvent(event); | 354 | mRecurrence->writeEvent(event); |
355 | event->setRecurrenceID( event->dtStart().addSecs(-1) ); | 355 | if ( event->doesRecur() ) { |
356 | event->setRecurDates(); | 356 | event->setRecurrenceID( event->dtStart().addSecs(-1) ); |
357 | #if 0 | 357 | event->setRecurDates(); |
358 | bool ok; | 358 | } else { |
359 | QDateTime next = event->getNextOccurence( event->dtStart().addSecs(-1), &ok ); | ||
360 | if ( ok ) { | ||
361 | QDateTime from,to; | ||
362 | bool time = mGeneral->mTimeButton->isChecked(); | ||
363 | if ( time ) { | ||
364 | to = QDateTime( mGeneral->mDueDateEdit->date(), mGeneral->mDueTimeEdit->getTime() ) ; | ||
365 | from = QDateTime( mGeneral->mStartDateEdit->date(),mGeneral->mStartTimeEdit->getTime( )) ; | ||
366 | } else { | ||
367 | to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ; | ||
368 | from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ; | ||
369 | } | ||
370 | if ( to < from ) | ||
371 | to = from; | ||
372 | int secs = from.secsTo( to ); | ||
373 | event->setRecurrenceID( next ); | ||
374 | event->setDtStart( next ); | ||
375 | event->setDtDue( next.addSecs( secs ) ); | ||
376 | } | ||
377 | else { | ||
378 | event->setHasRecurrenceID( false ); | 359 | event->setHasRecurrenceID( false ); |
379 | event->recurrence()->unsetRecurs(); | ||
380 | } | 360 | } |
381 | #endif | 361 | } else { |
382 | } else | 362 | event->setHasRecurrenceID( false ); |
383 | event->recurrence()->unsetRecurs(); | 363 | event->recurrence()->unsetRecurs(); |
364 | } | ||
384 | } | 365 | } |
385 | 366 | ||
386 | bool KOTodoEditor::validateInput() | 367 | bool KOTodoEditor::validateInput() |
387 | { | 368 | { |
388 | if (!mGeneral->validateInput()) return false; | 369 | if (!mGeneral->validateInput()) return false; |
389 | if (!mDetails->validateInput()) return false; | 370 | if (!mDetails->validateInput()) return false; |
390 | return true; | 371 | return true; |
391 | } | 372 | } |
392 | 373 | ||
393 | int KOTodoEditor::msgItemDelete() | 374 | int KOTodoEditor::msgItemDelete() |
394 | { | 375 | { |
395 | return KMessageBox::warningContinueCancel(this, | 376 | return KMessageBox::warningContinueCancel(this, |
@@ -1 +1 @@ | |||
version = "2.0.11"; | version = "2.0.12"; | ||