-rw-r--r-- | korganizer/koagenda.cpp | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 2 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 1 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 19 |
6 files changed, 19 insertions, 8 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index cdeeac5..2a2acb1 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -1583,8 +1583,10 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) if ( remove ) { //qDebug("remove****************************************** "); return; } + if ( todo->hasCompletedDate() && !KOPrefs::instance()->mShowCompletedTodoInAgenda ) + return; //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); bool overdue = (!todo->isCompleted()) && (todo->dtDue() < QDate::currentDate())&& ( KOPrefs::instance()->mShowTodoInAgenda ); QDate currentDate; QDateTime dt; diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index b5a4199..fd9bf29 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -1235,9 +1235,9 @@ void KOAgendaView::fillAgenda() for (numTodo = 0; numTodo < todos.count(); ++numTodo) { Todo *todo = todos.at(numTodo); if ( ! todo->hasDueDate() && !todo->hasCompletedDate()) continue; // todo shall not be displayed if it has no date - + if ( todo->hasCompletedDate() && !KOPrefs::instance()->mShowCompletedTodoInAgenda ) continue; // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. // Already completed items can be displayed on their original due date //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda; diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 02247c8..5f32e79 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -434,9 +434,9 @@ void KOListView::setAlarm() ListItemVisitor v(item, mStartDate ); inc->accept(v); item = sel.next(); } - topLevelWidget()->setCaption( i18n("Canged alarm for %1 items").arg( count ) ); + topLevelWidget()->setCaption( i18n("Changed alarm for %1 items").arg( count ) ); qDebug("KO: Set alarm for %d items", count); calendar()->reInitAlarmSettings(); QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); } diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 34044ab..8f951ee 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -119,8 +119,9 @@ KOPrefs::KOPrefs() : addItemInt("Whats Next Days",&mWhatsNextDays,3); addItemInt("Whats Next Prios",&mWhatsNextPrios,1); addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); + addItemBool("ShowCompletedTodoInAgenda",&mShowCompletedTodoInAgenda,true); addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); addItemInt("AllDay Size",&mAllDaySize,28); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index e06df1c..864cf1b 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -218,8 +218,9 @@ class KOPrefs : public KPimPrefs bool mAskForQuit; bool mUsePassWd; bool mShowSyncEvents; bool mShowTodoInAgenda; + bool mShowCompletedTodoInAgenda; bool mShowTimeInAgenda; bool mHideNonStartedTodos; bool mBlockPopupMenu; diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index e4bee63..c9477e3 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -715,8 +715,19 @@ void KOPrefsDialog::setupViewsTab() &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); + dummy = + addWidBool(i18n("Allday Agenda view shows todos"), + &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); + + + + dummy = + addWidBool(i18n("Agenda view shows completed todos"), + &(KOPrefs::instance()->mShowCompletedTodoInAgenda),topFrame); + topLayout->addWidget(dummy->checkBox(),ii++,0); @@ -789,9 +800,9 @@ void KOPrefsDialog::setupViewsTab() &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); dummy = - addWidBool(i18n("Categorie colors are applied to text"), + addWidBool(i18n("Category colors are applied to text"), &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); coloredCategoriesInMonthView = addWidBool(i18n("Month view uses day colors"), @@ -842,9 +853,9 @@ void KOPrefsDialog::setupViewsTab() mPrioSpin->setFixedWidth( 40 ); KPrefsDialogWidBool *passwdk = - addWidBool(i18n("Show events, that are done"), + addWidBool(i18n("Show events that are done"), &(KOPrefs::instance()->mWNViewShowsPast),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); passwdk = addWidBool(i18n("Show parent To-Do's"), @@ -937,12 +948,8 @@ dummy = addWidBool(i18n("Colors are applied to text"), &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); topLayout->addWidget(dummy->checkBox(),ii++,0); - dummy = - addWidBool(i18n("Allday Agenda view shows todos"), - &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); - topLayout->addWidget(dummy->checkBox(),ii++,0); topFrame = addPage(i18n("View Options"),0,0); |