-rw-r--r-- | korganizer/kolistview.cpp | 11 | ||||
-rw-r--r-- | korganizer/kolistview.h | 2 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 0b2f9a4..22d9ac0 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -249,2 +249,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mActiveItem = 0; + mForceShowCompletedTodos = false; mListView = new KOListViewListView(this); @@ -1049,2 +1050,6 @@ void KOListView::addJournals(QPtrList<Journal> eventList) +void KOListView::showCompletedTodos() +{ + mForceShowCompletedTodos = true; +} void KOListView::addIncidence(Incidence *incidence) @@ -1054,2 +1059,8 @@ void KOListView::addIncidence(Incidence *incidence) // mListView->setFont ( KOPrefs::instance()->mListViewFont ); + if ( incidence->typeID() == todoID ) { + if ( ! mForceShowCompletedTodos ) { + if ( !KOPrefs::instance()->mShowCompletedTodo && ((Todo*)incidence)->isCompleted() ) + return; + } + } mUidDict.insert( incidence->uid(), incidence ); diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h index d384af0..bcef0f0 100644 --- a/korganizer/kolistview.h +++ b/korganizer/kolistview.h @@ -265,2 +265,3 @@ class KOListView : public KOEventView QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false ); + void showCompletedTodos(); signals: @@ -310,2 +311,3 @@ class KOListView : public KOEventView private: + bool mForceShowCompletedTodos; QPopupMenu* mCalPopup; diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index bba49f0..a8de297 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -140,2 +140,3 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) layout->addWidget(listView); + listView->showCompletedTodos(); //layout->setStretchFactor( listView, 333 ); |