author | zautrix <zautrix> | 2005-01-30 16:38:38 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-30 16:38:38 (UTC) |
commit | 23d345c877ae9de6a077af3705026d15bb04d1e3 (patch) (side-by-side diff) | |
tree | 1c90eaf14b5fe5daf97645bebed2eabbe66b8a89 | |
parent | a34c528fdd8d2cdec14bae9ccb0eee54c8e4e374 (diff) | |
download | kdepimpi-23d345c877ae9de6a077af3705026d15bb04d1e3.zip kdepimpi-23d345c877ae9de6a077af3705026d15bb04d1e3.tar.gz kdepimpi-23d345c877ae9de6a077af3705026d15bb04d1e3.tar.bz2 |
fix
-rw-r--r-- | korganizer/koagenda.cpp | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 3 | ||||
-rw-r--r-- | korganizer/koeditorgeneraltodo.h | 1 | ||||
-rw-r--r-- | korganizer/kotodoeditor.cpp | 12 |
4 files changed, 13 insertions, 5 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 7c41cab..0aef929 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -1460,25 +1460,25 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) QDateTime dt; if ( todo->hasCompletedDate() ) dt = todo->completed(); else dt = todo->dtDue(); if ( overdue ) { currentDate = QDate::currentDate(); days += todo->dtDue().date().daysTo( currentDate ); } else currentDate = dt.date(); - if ( todo->doesFloat() || overdue ) { + if (( todo->doesFloat() || overdue) && !todo->hasCompletedDate() ) { if ( ! mAllDayMode ) return; // aldayagenda globalFlagBlockAgendaItemPaint = 1; item = insertAllDayItem(todo, currentDate,days, days); item->show(); } else { if ( mAllDayMode ) return; // mAgenda globalFlagBlockAgendaItemPaint = 1; int endY = timeToY(dt.time()) - 1; diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 42a6f7c..8b79788 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -1498,25 +1498,24 @@ void KOAgendaView::scrollOneHourDown() { mAgenda->scrollBy ( 0, mAgenda->contentsHeight () / 24 ); } void KOAgendaView::setStartHour( int h ) { mAgenda->setStartHour( h ); } void KOAgendaView::updateTodo( Todo * t, int ) { - bool remove = false; bool removeAD = false; QDate da; if ( t->hasCompletedDate() ) da = t->completed().date(); else da = t->dtDue().date(); if ( ! t->hasDueDate() && !t->hasCompletedDate() ) { remove = true; removeAD = true; } else { @@ -1531,19 +1530,19 @@ void KOAgendaView::updateTodo( Todo * t, int ) if ( da < mSelectedDates.first() || da > mSelectedDates.last() ) { remove = true; removeAD = true; } else { remove = t->doesFloat() && !t->hasCompletedDate(); removeAD = !remove; } } } int days = mSelectedDates.first().daysTo( da ); - // qDebug("daysto %d ", days ); + //qDebug("daysto %d %d %d", days, remove,removeAD ); mAgenda->updateTodo( t , days, remove); if ( KOPrefs::instance()->mShowTodoInAgenda ) mAllDayAgenda->updateTodo( t , days, removeAD); //qDebug("KOAgendaView::updateTodo( Todo *, int ) "); } diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h index f6c30f8..5f1c3cc 100644 --- a/korganizer/koeditorgeneraltodo.h +++ b/korganizer/koeditorgeneraltodo.h @@ -76,24 +76,25 @@ class KOEditorGeneralTodo : public KOEditorGeneral protected slots: void completedChanged(int); void enableDueEdit( bool enable ); void enableStartEdit( bool enable ); void enableTimeEdits( bool enable ); void showAlarm(); protected: void setCompletedDate(); private: + friend class KOTodoEditor; KDateEdit *mStartDateEdit; KOTimeEdit *mStartTimeEdit; QCheckBox *mTimeButton; QCheckBox *mDueCheck; KDateEdit *mDueDateEdit; KOTimeEdit *mDueTimeEdit; QComboBox *mCompletedCombo; QLabel *mCompletedLabel; QLabel *mPriorityLabel; QComboBox *mPriorityCombo; QCheckBox *mStartCheck; diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index 16c19a4..ec5c2d1 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp @@ -36,24 +36,25 @@ #include <kfiledialog.h> #include <kstandarddirs.h> #include <kmessagebox.h> #include <libkdepim/categoryselectdialog.h> #include <libkcal/calendarlocal.h> #include <libkcal/calendarresources.h> #include <libkcal/resourcecalendar.h> #include <libkcal/icalformat.h> #include <kresources/resourceselectdialog.h> #include "koprefs.h" +#include "kolocationbox.h" #include "kotodoeditor.h" extern int globalFlagBlockAgenda; KOTodoEditor::KOTodoEditor( Calendar *calendar, QWidget *parent ) : KOIncidenceEditor( i18n("Edit To-Do"), calendar, parent ) { mTodo = 0; mRelatedTodo = 0; findButton(User1)->hide(); init(); } @@ -267,27 +268,34 @@ void KOTodoEditor::deleteTodo() } void KOTodoEditor::setDefaults(QDateTime due,Todo *relatedEvent,bool allDay) { mRelatedTodo = relatedEvent; mGeneral->setDefaults(due,allDay); mDetails->setDefaults(); showPage( 0 ); if ( mRelatedTodo ) { mGeneral->setCategories (mRelatedTodo->categoriesStr ()); mGeneral->setSecrecy (mRelatedTodo->secrecy ()); + if ( mRelatedTodo->priority() < 3 ) + mGeneral->mPriorityCombo->setCurrentItem(mRelatedTodo->priority()-1); + mGeneral->mSummaryEdit->lineEdit()->setText(mRelatedTodo->summary()+": "); + int len = mRelatedTodo->summary().length(); + mGeneral->mSummaryEdit->lineEdit()->setSelection ( 0, len+2 ); + mGeneral->mSummaryEdit->lineEdit()->setCursorPosition ( len+2 ); + mGeneral->mSummaryEdit->lineEdit()->setFocus(); - } - mGeneral->setFocusOn( 2 ); + } else + mGeneral->setFocusOn( 2 ); } void KOTodoEditor::readTodo(Todo *todo) { mGeneral->readTodo(todo); mDetails->readEvent(todo); mRelatedTodo = 0;//todo->relatedTo(); // categories // mCategoryDialog->setSelected(todo->categories()); // We should handle read-only events here. } |