-rw-r--r-- | korganizer/kowhatsnextview.cpp | 4 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.h | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 53fe7d0..8473db9 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp | |||
@@ -190,6 +190,7 @@ void KOWhatsNextView::updateView() | |||
190 | //qDebug("KOWhatsNextView::updateView() "); | 190 | //qDebug("KOWhatsNextView::updateView() "); |
191 | if ( mTimer->isActive() ) | 191 | if ( mTimer->isActive() ) |
192 | restartTimer(); | 192 | restartTimer(); |
193 | mCurrentMaxPrio = 5; | ||
193 | //qDebug("KOWhatsNextView::updateView() "); | 194 | //qDebug("KOWhatsNextView::updateView() "); |
194 | // mDateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate())); | 195 | // mDateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate())); |
195 | KIconLoader kil("korganizer"); | 196 | KIconLoader kil("korganizer"); |
@@ -318,6 +319,7 @@ void KOWhatsNextView::updateView() | |||
318 | todo = todos.first(); | 319 | todo = todos.first(); |
319 | while(todo) { | 320 | while(todo) { |
320 | if (!todo->isCompleted() && (todo->priority() == priority) ) { | 321 | if (!todo->isCompleted() && (todo->priority() == priority) ) { |
322 | mCurrentMaxPrio = priority - priosFound + topmostPrios -1; | ||
321 | if ( appendTodo(todo) ) | 323 | if ( appendTodo(todo) ) |
322 | gotone = true; | 324 | gotone = true; |
323 | } | 325 | } |
@@ -725,7 +727,7 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) | |||
725 | QPtrList<Incidence> Relations = ev->relations(); | 727 | QPtrList<Incidence> Relations = ev->relations(); |
726 | Incidence *to; | 728 | Incidence *to; |
727 | for (to=Relations.first();to;to=Relations.next()) { | 729 | for (to=Relations.first();to;to=Relations.next()) { |
728 | if (!((Todo*)to)->isCompleted()) | 730 | if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio ) |
729 | appendTodo( to, ind , true ); | 731 | appendTodo( to, ind , true ); |
730 | } | 732 | } |
731 | 733 | ||
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h index 715037f..d6727ac 100644 --- a/korganizer/kowhatsnextview.h +++ b/korganizer/kowhatsnextview.h | |||
@@ -87,6 +87,7 @@ class KOWhatsNextView : public KOrg::BaseView | |||
87 | 87 | ||
88 | 88 | ||
89 | private: | 89 | private: |
90 | int mCurrentMaxPrio; | ||
90 | //void createEventViewer(); | 91 | //void createEventViewer(); |
91 | QTimer* mTimer; | 92 | QTimer* mTimer; |
92 | WhatsNextTextBrowser *mView; | 93 | WhatsNextTextBrowser *mView; |