author | zautrix <zautrix> | 2005-04-08 11:56:30 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-08 11:56:30 (UTC) |
commit | afb896709be49326ca9d9ad1656153cc27a60ffe (patch) (side-by-side diff) | |
tree | d9dc3976e60435b4c8116fff596358e97f100996 | |
parent | ba04f6a4b6b651dcff11ca17103cba42330e52be (diff) | |
download | kdepimpi-afb896709be49326ca9d9ad1656153cc27a60ffe.zip kdepimpi-afb896709be49326ca9d9ad1656153cc27a60ffe.tar.gz kdepimpi-afb896709be49326ca9d9ad1656153cc27a60ffe.tar.bz2 |
wn fix
-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 @@ -185,16 +185,17 @@ void KOWhatsNextView::restartTimer() mTimer->start( 300000 ); //mTimer->start( 5000 ); } void KOWhatsNextView::updateView() { //qDebug("KOWhatsNextView::updateView() "); if ( mTimer->isActive() ) restartTimer(); + mCurrentMaxPrio = 5; //qDebug("KOWhatsNextView::updateView() "); // mDateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate())); KIconLoader kil("korganizer"); QString ipath;// = new QString(); // kil.loadIcon("korganizer",KIcon::NoGroup,32,KIcon::DefaultState,&ipath); //<big><big><strong>" + date + "</strong></big></big>\n"; mText = "<table width=\"100%\">\n"; //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; @@ -313,16 +314,17 @@ void KOWhatsNextView::updateView() #endif mText +="<h2><em><font color=\"#000080\">" + i18n("Incomplete Todo:") + "</font></em></h2>\n"; mText += "<ul>\n"; while (!gotone && priority<6) { todo = todos.first(); while(todo) { if (!todo->isCompleted() && (todo->priority() == priority) ) { + mCurrentMaxPrio = priority - priosFound + topmostPrios -1; if ( appendTodo(todo) ) gotone = true; } todo = todos.next(); } if ( gotone ) { gotone = false; ++priosFound; @@ -720,17 +722,17 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) } else { ind += "-"; mText += "</li>\n"; } QPtrList<Incidence> Relations = ev->relations(); Incidence *to; for (to=Relations.first();to;to=Relations.next()) { - if (!((Todo*)to)->isCompleted()) + if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio ) appendTodo( to, ind , true ); } return true; } /* void KOWhatsNextView::createEventViewer() diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h index 715037f..d6727ac 100644 --- a/korganizer/kowhatsnextview.h +++ b/korganizer/kowhatsnextview.h @@ -82,16 +82,17 @@ class KOWhatsNextView : public KOrg::BaseView virtual void hideEvent ( QHideEvent * ); private slots: void showIncidence(const QString &); void restartTimer(); private: + int mCurrentMaxPrio; //void createEventViewer(); QTimer* mTimer; WhatsNextTextBrowser *mView; QString mText; // QLabel *mDateLabel; KOEventViewerDialog *mEventViewer; QValueList<Incidence *> mTodos; |