summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoeditor.cpp
authorzautrix <zautrix>2005-04-18 10:41:31 (UTC)
committer zautrix <zautrix>2005-04-18 10:41:31 (UTC)
commit409e329447a7d00a93a56855fcddadbb0f793163 (patch) (side-by-side diff)
tree1c92498d2dfb4c89358c64a6944aca1300a27d11 /korganizer/kotodoeditor.cpp
parent0ff0dca7ccb94ebb1381351e4e4081fe0bac500a (diff)
downloadkdepimpi-409e329447a7d00a93a56855fcddadbb0f793163.zip
kdepimpi-409e329447a7d00a93a56855fcddadbb0f793163.tar.gz
kdepimpi-409e329447a7d00a93a56855fcddadbb0f793163.tar.bz2
morefixes
Diffstat (limited to 'korganizer/kotodoeditor.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kotodoeditor.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 6a05cc8..5513e8b 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -110,11 +110,11 @@ void KOTodoEditor::setupGeneral()
QBoxLayout *topLayout = new QVBoxLayout(topFrame);
if ( QApplication::desktop()->width() < 480 ) {
- topLayout->setMargin(1);
- topLayout->setSpacing(1);
+ topLayout->setMargin(marginHintSmall());
+ topLayout->setSpacing(spacingHintSmall());
} else {
- topLayout->setMargin(marginHint()-1);
- topLayout->setSpacing(spacingHint()-1);
+ topLayout->setMargin(marginHint());
+ topLayout->setSpacing(spacingHint());
}
mGeneral->initHeader(topFrame,topLayout);
mGeneral->initTime(topFrame,topLayout);
@@ -344,6 +344,10 @@ void KOTodoEditor::readTodo(Todo *todo)
void KOTodoEditor::writeTodo(Todo *event)
{
+ bool maybeComputeRecurrenceTime = false;
+ if( event->hasRecurrenceID() && event->percentComplete() < 100)
+ maybeComputeRecurrenceTime = true;
+ event->setHasRecurrenceID( false );
mGeneral->writeTodo(event);
mDetails->writeEvent(event);
@@ -354,7 +358,10 @@ void KOTodoEditor::writeTodo(Todo *event)
if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) {
mRecurrence->writeEvent(event);
if ( event->doesRecur() ) {
- event->setRecurrenceID( event->dtStart().addSecs(-1) );
+ int addSec = -1 ;
+ if ( maybeComputeRecurrenceTime && event->percentComplete() == 100 )
+ addSec = 1;
+ event->setRecurrenceID( event->dtStart().addSecs( addSec ) );
event->setRecurDates();
} else {
event->setHasRecurrenceID( false );