summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-08-17 18:03:56 (UTC)
committer zautrix <zautrix>2005-08-17 18:03:56 (UTC)
commit14f656fff72f1e7c2fedbb196fb97bbdd4fb1aac (patch) (side-by-side diff)
tree9ccd2676090560a0471fd72f6102a01d7a2e889a
parentb3de38d3c4c3935a3fa428eeb4ad97fa8c60c43a (diff)
downloadkdepimpi-14f656fff72f1e7c2fedbb196fb97bbdd4fb1aac.zip
kdepimpi-14f656fff72f1e7c2fedbb196fb97bbdd4fb1aac.tar.gz
kdepimpi-14f656fff72f1e7c2fedbb196fb97bbdd4fb1aac.tar.bz2
fix fox
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt1
-rw-r--r--korganizer/koeditorgeneraltodo.cpp12
-rw-r--r--libkcal/todo.cpp1
3 files changed, 7 insertions, 7 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 18e94a7..15caf9e 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,12 +1,13 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.2.1 ************
KO/Pi:
Fixed a problem displaying very long allday events in agenda view in single day mode.
+Fixed a problem with the default settings for new todos.
KA/Pi:
Added a config option to turn on asking before a contact is deleted.
Fixed a problem with the default view and view selection at startup.
********** VERSION 2.2.0 ************
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index 10d9a8c..d32d5a5 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -205,18 +205,13 @@ void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay)
mSummaryEdit->load(KOLocationBox::SUMMARYTODO);
mLocationEdit->load(KOLocationBox::LOCATION);
KOEditorGeneral::setDefaults(allDay);
mTimeButton->setChecked( !allDay );
- if(mTimeButton->isChecked()) {
- mTimeButton->setEnabled(true);
- }
- else {
- mTimeButton->setEnabled(false);
- }
+ mTimeButton->setEnabled( !allDay );
enableTimeEdits( !allDay );
if ( due.isValid() ) {
mDueCheck->setChecked(true);
enableDueEdit(true);
alarmDisable(false);
@@ -249,19 +244,22 @@ void KOEditorGeneralTodo::readTodo(Todo *todo)
mSummaryEdit->load(KOLocationBox::SUMMARYTODO);
mLocationEdit->load(KOLocationBox::LOCATION);
KOEditorGeneral::readIncidence(todo);
QDateTime dueDT;
+ mTimeButton->setChecked( !todo->doesFloat() );
+ mTimeButton->setEnabled( !todo->doesFloat() );
if (todo->hasDueDate()) {
enableAlarmEdit(true);
dueDT = todo->dtDue();
mDueDateEdit->setDate(todo->dtDue().date());
mDueTimeEdit->setTime(todo->dtDue().time());
mDueCheck->setChecked(true);
+ mTimeButton->setEnabled( true );
} else {
alarmDisable(true);
mDueDateEdit->setEnabled(false);
mDueTimeEdit->setEnabled(false);
mDueDateEdit->setDate(QDate::currentDate());
mDueTimeEdit->setTime(QTime::currentTime());
@@ -269,21 +267,21 @@ void KOEditorGeneralTodo::readTodo(Todo *todo)
}
if (todo->hasStartDate()) {
mStartDateEdit->setDate(todo->dtStart().date());
mStartTimeEdit->setTime(todo->dtStart().time());
mStartCheck->setChecked(true);
+ mTimeButton->setEnabled( true );
} else {
mStartDateEdit->setEnabled(false);
mStartTimeEdit->setEnabled(false);
mStartDateEdit->setDate(QDate::currentDate());
mStartTimeEdit->setTime(QTime::currentTime());
mStartCheck->setChecked(false);
}
- mTimeButton->setChecked( !todo->doesFloat() );
mCompletedCombo->setCurrentItem(todo->percentComplete() / 20);
if (todo->isCompleted() && todo->hasCompletedDate()) {
mCompleted = todo->completed();
}
setCompletedDate();
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index e4508a0..48d37d5 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -39,12 +39,13 @@ Todo::Todo(): QObject(), Incidence()
setHasStartDate( false );
mCompleted = getEvenTime(QDateTime::currentDateTime());
mHasCompletedDate = false;
mPercentComplete = 0;
mRunning = false;
mRunSaveTimer = 0;
+ setFloats( true );
}
Todo::Todo(const Todo &t) : QObject(),Incidence(t)
{
mDtDue = t.mDtDue;
mHasDueDate = t.mHasDueDate;