summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-08 11:56:30 (UTC)
committer zautrix <zautrix>2005-04-08 11:56:30 (UTC)
commitafb896709be49326ca9d9ad1656153cc27a60ffe (patch) (side-by-side diff)
treed9dc3976e60435b4c8116fff596358e97f100996 /korganizer
parentba04f6a4b6b651dcff11ca17103cba42330e52be (diff)
downloadkdepimpi-afb896709be49326ca9d9ad1656153cc27a60ffe.zip
kdepimpi-afb896709be49326ca9d9ad1656153cc27a60ffe.tar.gz
kdepimpi-afb896709be49326ca9d9ad1656153cc27a60ffe.tar.bz2
wn fix
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kowhatsnextview.cpp4
-rw-r--r--korganizer/kowhatsnextview.h1
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
@@ -187,12 +187,13 @@ void KOWhatsNextView::restartTimer()
}
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";
@@ -315,12 +316,13 @@ void KOWhatsNextView::updateView()
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 ) {
@@ -722,13 +724,13 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
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;
}
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h
index 715037f..d6727ac 100644
--- a/korganizer/kowhatsnextview.h
+++ b/korganizer/kowhatsnextview.h
@@ -84,12 +84,13 @@ class KOWhatsNextView : public KOrg::BaseView
private slots:
void showIncidence(const QString &);
void restartTimer();
private:
+ int mCurrentMaxPrio;
//void createEventViewer();
QTimer* mTimer;
WhatsNextTextBrowser *mView;
QString mText;
// QLabel *mDateLabel;
KOEventViewerDialog *mEventViewer;