summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/koviewmanager.cpp6
-rw-r--r--korganizer/koviewmanager.h2
-rw-r--r--korganizer/kowhatsnextview.cpp45
-rw-r--r--libkcal/incidence.cpp4
-rw-r--r--libkcal/incidencebase.cpp4
6 files changed, 45 insertions, 18 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index ba0e6c6..bbed05b 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1938,3 +1938,3 @@ void CalendarView::changeTodoDisplay(Todo *which, int action)
if (which) {
- //mViewManager->currentView()->updateView();//LR
+ mViewManager->updateWNview();
//mTodoList->updateView();
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index fc2bc77..ba77b45 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -225,2 +225,8 @@ void KOViewManager::updateView(const QDate &start, const QDate &end)
+void KOViewManager::updateWNview()
+{
+ if ( mCurrentView == mWhatsNextView && mWhatsNextView )
+ mWhatsNextView->updateView();
+
+}
void KOViewManager::showWhatsNextView()
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index f814c36..26b22be 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -55,3 +55,3 @@ class KOViewManager : public QObject
void showView(KOrg::BaseView *, bool fullScreen = false );
-
+ void updateWNview();
void readSettings(KConfig *config);
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>";
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 56c9801..55ac6d4 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -592,2 +592,6 @@ QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const
incidenceStart = dtStart();
+ }
+ if ( type() =="Todo" ) {
+ if ( ((Todo*)this)->hasDueDate() )
+ incidenceStart = ((Todo*)this)->dtDue();
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index 64a343c..b36dc1a 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -273,3 +273,3 @@ Attendee *IncidenceBase::attendeeByMail(const QString &email)
while (qli) {
- if (qli.current()->email() == email)
+ if (qli.current()->email().lower() == email.lower())
return qli.current();
@@ -291,3 +291,3 @@ Attendee *IncidenceBase::attendeeByMails(const QStringList &emails, const QStrin
for ( QStringList::Iterator it = mails.begin(); it != mails.end(); ++it ) {
- if (qli.current()->email() == *it)
+ if (qli.current()->email().lower() == (*it).lower())
return qli.current();