Diffstat (limited to 'korganizer/koeditorgeneraltodo.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index 158a7d3..b9a028b 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp | |||
@@ -190,30 +190,35 @@ void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay) | |||
190 | if(mTimeButton->isChecked()) { | 190 | if(mTimeButton->isChecked()) { |
191 | mTimeButton->setEnabled(true); | 191 | mTimeButton->setEnabled(true); |
192 | } | 192 | } |
193 | else { | 193 | else { |
194 | mTimeButton->setEnabled(false); | 194 | mTimeButton->setEnabled(false); |
195 | } | 195 | } |
196 | 196 | ||
197 | enableTimeEdits( !allDay ); | 197 | enableTimeEdits( !allDay ); |
198 | 198 | if ( due.isValid() ) { | |
199 | mDueCheck->setChecked(true); | ||
200 | enableDueEdit(true); | ||
201 | } else { | ||
199 | mDueCheck->setChecked(false); | 202 | mDueCheck->setChecked(false); |
200 | enableDueEdit(false); | 203 | enableDueEdit(false); |
204 | due = QDateTime::currentDateTime().addDays(7); | ||
205 | } | ||
201 | 206 | ||
202 | alarmDisable(true); | 207 | alarmDisable(true); |
203 | 208 | ||
204 | mStartCheck->setChecked(false); | 209 | mStartCheck->setChecked(false); |
205 | enableStartEdit(false); | 210 | enableStartEdit(false); |
206 | 211 | ||
207 | mDueDateEdit->setDate(due.date()); | 212 | mDueDateEdit->setDate(due.date()); |
208 | mDueTimeEdit->setTime(due.time()); | 213 | mDueTimeEdit->setTime(due.time()); |
209 | 214 | due = due.addDays(-7); | |
210 | mStartDateEdit->setDate(QDate::currentDate()); | 215 | mStartDateEdit->setDate(due.date()); |
211 | mStartTimeEdit->setTime(QTime::currentTime()); | 216 | mStartTimeEdit->setTime(due.time()); |
212 | 217 | ||
213 | mPriorityCombo->setCurrentItem(2); | 218 | mPriorityCombo->setCurrentItem(2); |
214 | mCompletedLabel->setText(i18n("completed"));; | 219 | mCompletedLabel->setText(i18n("completed"));; |
215 | mCompletedCombo->setCurrentItem(0); | 220 | mCompletedCombo->setCurrentItem(0); |
216 | } | 221 | } |
217 | 222 | ||
218 | void KOEditorGeneralTodo::readTodo(Todo *todo) | 223 | void KOEditorGeneralTodo::readTodo(Todo *todo) |
219 | { | 224 | { |