summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp2
-rw-r--r--korganizer/koagendaview.cpp3
-rw-r--r--korganizer/koeditorgeneraltodo.h1
-rw-r--r--korganizer/kotodoeditor.cpp12
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
@@ -1469,7 +1469,7 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
else
currentDate = dt.date();
- if ( todo->doesFloat() || overdue ) {
+ if (( todo->doesFloat() || overdue) && !todo->hasCompletedDate() ) {
if ( ! mAllDayMode ) return;
// aldayagenda
globalFlagBlockAgendaItemPaint = 1;
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 42a6f7c..8b79788 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1507,7 +1507,6 @@ void KOAgendaView::setStartHour( int h )
void KOAgendaView::updateTodo( Todo * t, int )
{
-
bool remove = false;
bool removeAD = false;
QDate da;
@@ -1540,7 +1539,7 @@ void KOAgendaView::updateTodo( Todo * t, int )
}
}
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);
diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h
index f6c30f8..5f1c3cc 100644
--- a/korganizer/koeditorgeneraltodo.h
+++ b/korganizer/koeditorgeneraltodo.h
@@ -85,6 +85,7 @@ class KOEditorGeneralTodo : public KOEditorGeneral
void setCompletedDate();
private:
+ friend class KOTodoEditor;
KDateEdit *mStartDateEdit;
KOTimeEdit *mStartTimeEdit;
QCheckBox *mTimeButton;
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 16c19a4..ec5c2d1 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -45,6 +45,7 @@
#include <kresources/resourceselectdialog.h>
#include "koprefs.h"
+#include "kolocationbox.h"
#include "kotodoeditor.h"
extern int globalFlagBlockAgenda;
@@ -276,9 +277,16 @@ void KOTodoEditor::setDefaults(QDateTime due,Todo *relatedEvent,bool allDay)
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)