Diffstat (limited to 'korganizer/kowhatsnextview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index b2001ec..2a8a7c1 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -265,3 +265,3 @@ void KOWhatsNextView::updateView() // kil.loadIcon("reply",KIcon::NoGroup,22,KIcon::DefaultState,&ipath); - mText += "<h2>"; + //mText += "<h2>"; //<img src=\""; @@ -269,3 +269,4 @@ void KOWhatsNextView::updateView() // mText += "\">"; - mText += i18n("Events and To-Dos that need a reply:") + "</h2>\n"; + //mText += i18n("Events and To-Dos that need a reply:") + "</h2>\n"; + mText +="<big><big><strong><em><font color=\"#000080\">" + i18n("Events and To-Dos that need a reply:") + "</font></em></strong></big></big>\n"; mText += "<table>\n"; @@ -283,2 +284,3 @@ void KOWhatsNextView::updateView() while(to) { + if ( !to->isCompleted() ){ Attendee *me = to->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); @@ -287,9 +289,3 @@ void KOWhatsNextView::updateView() if (replys == 0) { - mText += "<p></p>"; - // kil.loadIcon("reply",KIcon::NoGroup,22,KIcon::DefaultState,&ipath); - mText += "<h2>"; - //<img src=\""; - // mText += ipath; - // mText += "\">"; - mText += i18n("Events and To-Dos that need a reply:") + "</h2>\n"; + mText +="<big><big><strong><em><font color=\"#000080\">" + i18n("Events and To-Dos that need a reply:") + "</font></em></strong></big></big>\n"; mText += "<table>\n"; @@ -297,6 +293,6 @@ void KOWhatsNextView::updateView() replys++; - appendEvent(to); + appendEvent(to, true); + } } } - kdDebug () << "check for todo-replys..." << endl; to = todos.next(); @@ -309,3 +305,2 @@ void KOWhatsNextView::updateView() - kdDebug() << "KOWhatsNextView::updateView: text: " << mText << endl; mView->setText(mText); @@ -396,8 +391,21 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) { - if ( !KOPrefs::instance()->mShowSyncEvents && ev->uid().left(21) == QString("last-syncEvent-device") ) + if ( !KOPrefs::instance()->mShowSyncEvents && ev->uid().left(15) == QString("last-syncEvent-") ) return; QDateTime cdt = QDateTime::currentDateTime(); + QDateTime noc; + bool ok = true; + if ( reply ) { + noc = ev->getNextOccurence( cdt, &ok ); + if (! ok && ev->type() == "Event") + return; + } mText += "<tr><td><b>"; if (ev->type()=="Event") { + if (reply) { + if (!ev->doesFloat()) + mText += KGlobal::locale()->formatDateTime( noc , KOPrefs::instance()->mShortDateInViewer) +": "; + else + mText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; + } else { if (!ev->doesFloat()) { @@ -420,3 +428,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) - if (reply) mText += "on " + event->dtStartDateStr() + ": "; + QString dateText; @@ -440,2 +448,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) mText += dateText; + } @@ -446,2 +455,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) } + } } else { @@ -449,2 +459,8 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) mText += i18n("ToDo:"); + if (reply) { + mText += " "; + if ( noc != cdt ) { + mText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; + } + } else { if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) { @@ -466,2 +482,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) } + } mText += "</b></td><td>"; |