Diffstat (limited to 'korganizer/koeditorgeneraltodo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index 6370b54..a9d1ed3 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp | |||
@@ -340,83 +340,85 @@ void KOEditorGeneralTodo::writeTodo(Todo *todo) | |||
340 | todo->setPercentComplete(0); | 340 | todo->setPercentComplete(0); |
341 | todo->setPercentComplete(100); | 341 | todo->setPercentComplete(100); |
342 | todo->setCompleted(comp); | 342 | todo->setCompleted(comp); |
343 | } else { | 343 | } else { |
344 | todo->setPercentComplete( 100 ); | 344 | todo->setPercentComplete( 100 ); |
345 | if ( mCompleted.isValid() ) | 345 | if ( mCompleted.isValid() ) |
346 | todo->setCompleted(mCompleted); | 346 | todo->setCompleted(mCompleted); |
347 | } | 347 | } |
348 | } else { | 348 | } else { |
349 | todo->setPercentComplete(mCompletedCombo->currentItem() * 20); | 349 | todo->setPercentComplete(mCompletedCombo->currentItem() * 20); |
350 | } | 350 | } |
351 | 351 | ||
352 | mSummaryEdit->save(KOLocationBox::SUMMARYTODO); | 352 | mSummaryEdit->save(KOLocationBox::SUMMARYTODO); |
353 | } | 353 | } |
354 | 354 | ||
355 | void KOEditorGeneralTodo::enableDueEdit(bool enable) | 355 | void KOEditorGeneralTodo::enableDueEdit(bool enable) |
356 | { | 356 | { |
357 | mDueDateEdit->setEnabled( enable ); | 357 | mDueDateEdit->setEnabled( enable ); |
358 | 358 | ||
359 | if(mDueCheck->isChecked() || mStartCheck->isChecked()) { | 359 | if(mDueCheck->isChecked() || mStartCheck->isChecked()) { |
360 | mTimeButton->setEnabled(true); | 360 | mTimeButton->setEnabled(true); |
361 | } | 361 | } |
362 | else { | 362 | else { |
363 | mTimeButton->setEnabled(false); | 363 | mTimeButton->setEnabled(false); |
364 | mTimeButton->setChecked(false); | 364 | mTimeButton->setChecked(false); |
365 | } | 365 | } |
366 | 366 | ||
367 | if (enable) { | 367 | if (enable) { |
368 | mDueTimeEdit->setEnabled( mTimeButton->isChecked() ); | 368 | mDueTimeEdit->setEnabled( mTimeButton->isChecked() ); |
369 | } else { | 369 | } else { |
370 | mDueTimeEdit->setEnabled( false ); | 370 | mDueTimeEdit->setEnabled( false ); |
371 | } | 371 | } |
372 | emit datesChecked(); | ||
372 | } | 373 | } |
373 | 374 | ||
374 | void KOEditorGeneralTodo::enableStartEdit( bool enable ) | 375 | void KOEditorGeneralTodo::enableStartEdit( bool enable ) |
375 | { | 376 | { |
376 | mStartDateEdit->setEnabled( enable ); | 377 | mStartDateEdit->setEnabled( enable ); |
377 | 378 | ||
378 | if(mDueCheck->isChecked() || mStartCheck->isChecked()) { | 379 | if(mDueCheck->isChecked() || mStartCheck->isChecked()) { |
379 | mTimeButton->setEnabled(true); | 380 | mTimeButton->setEnabled(true); |
380 | } | 381 | } |
381 | else { | 382 | else { |
382 | mTimeButton->setEnabled(false); | 383 | mTimeButton->setEnabled(false); |
383 | mTimeButton->setChecked(false); | 384 | mTimeButton->setChecked(false); |
384 | } | 385 | } |
385 | 386 | ||
386 | if (enable) { | 387 | if (enable) { |
387 | mStartTimeEdit->setEnabled( mTimeButton->isChecked() ); | 388 | mStartTimeEdit->setEnabled( mTimeButton->isChecked() ); |
388 | } else { | 389 | } else { |
389 | mStartTimeEdit->setEnabled( false ); | 390 | mStartTimeEdit->setEnabled( false ); |
390 | } | 391 | } |
392 | emit datesChecked(); | ||
391 | } | 393 | } |
392 | 394 | ||
393 | void KOEditorGeneralTodo::enableTimeEdits(bool enable) | 395 | void KOEditorGeneralTodo::enableTimeEdits(bool enable) |
394 | { | 396 | { |
395 | if(mStartCheck->isChecked()) { | 397 | if(mStartCheck->isChecked()) { |
396 | mStartTimeEdit->setEnabled( enable ); | 398 | mStartTimeEdit->setEnabled( enable ); |
397 | } | 399 | } |
398 | if(mDueCheck->isChecked()) { | 400 | if(mDueCheck->isChecked()) { |
399 | mDueTimeEdit->setEnabled( enable ); | 401 | mDueTimeEdit->setEnabled( enable ); |
400 | } | 402 | } |
401 | } | 403 | } |
402 | 404 | ||
403 | void KOEditorGeneralTodo::showAlarm() | 405 | void KOEditorGeneralTodo::showAlarm() |
404 | { | 406 | { |
405 | if ( mDueCheck->isChecked() ) { | 407 | if ( mDueCheck->isChecked() ) { |
406 | alarmDisable(false); | 408 | alarmDisable(false); |
407 | } | 409 | } |
408 | else { | 410 | else { |
409 | alarmDisable(true); | 411 | alarmDisable(true); |
410 | } | 412 | } |
411 | } | 413 | } |
412 | 414 | ||
413 | bool KOEditorGeneralTodo::validateInput() | 415 | bool KOEditorGeneralTodo::validateInput() |
414 | { | 416 | { |
415 | if (mDueCheck->isChecked()) { | 417 | if (mDueCheck->isChecked()) { |
416 | if (!mDueDateEdit->inputIsValid()) { | 418 | if (!mDueDateEdit->inputIsValid()) { |
417 | KMessageBox::sorry(0,i18n("Please specify a valid due date.")); | 419 | KMessageBox::sorry(0,i18n("Please specify a valid due date.")); |
418 | return false; | 420 | return false; |
419 | } | 421 | } |
420 | } | 422 | } |
421 | 423 | ||
422 | if (mStartCheck->isChecked()) { | 424 | if (mStartCheck->isChecked()) { |