summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-09-20 15:25:04 (UTC)
committer zautrix <zautrix>2004-09-20 15:25:04 (UTC)
commit6b6a28919908134ccbb3badcb24c2dcae0d426a5 (patch) (side-by-side diff)
tree72b3f69fa1f40bd4cfbd945d9f41699229604ae6 /korganizer
parentf222bd1339ac8323e3c99af84a6f83c21cacb8f8 (diff)
downloadkdepimpi-6b6a28919908134ccbb3badcb24c2dcae0d426a5.zip
kdepimpi-6b6a28919908134ccbb3badcb24c2dcae0d426a5.tar.gz
kdepimpi-6b6a28919908134ccbb3badcb24c2dcae0d426a5.tar.bz2
Several bugfixes
Diffstat (limited to 'korganizer') (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
4 files changed, 39 insertions, 16 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>";