author | zautrix <zautrix> | 2004-10-27 13:36:25 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-27 13:36:25 (UTC) |
commit | e099c37ac90e95c5a3110941aaae2be229bccb8e (patch) (unidiff) | |
tree | dad2ae54474767c4c5797e1780c4a3fee8c132e5 | |
parent | 2f3396d84d2f3c92e1e0e420d677892c1f9c0778 (diff) | |
download | kdepimpi-e099c37ac90e95c5a3110941aaae2be229bccb8e.zip kdepimpi-e099c37ac90e95c5a3110941aaae2be229bccb8e.tar.gz kdepimpi-e099c37ac90e95c5a3110941aaae2be229bccb8e.tar.bz2 |
wn view enhancements
-rw-r--r-- | kalarmd/simplealarmdaemonapplet.cpp | 1 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonapplet.h | 1 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 18 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 3 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 38 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 79 |
7 files changed, 78 insertions, 63 deletions
diff --git a/kalarmd/simplealarmdaemonapplet.cpp b/kalarmd/simplealarmdaemonapplet.cpp index 7e8125d..94d8428 100644 --- a/kalarmd/simplealarmdaemonapplet.cpp +++ b/kalarmd/simplealarmdaemonapplet.cpp | |||
@@ -17,2 +17,3 @@ SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet() | |||
17 | delete mApplet; | 17 | delete mApplet; |
18 | mApplet = 0; | ||
18 | } | 19 | } |
diff --git a/kalarmd/simplealarmdaemonapplet.h b/kalarmd/simplealarmdaemonapplet.h index a4cbee4..1787bf3 100644 --- a/kalarmd/simplealarmdaemonapplet.h +++ b/kalarmd/simplealarmdaemonapplet.h | |||
@@ -6,3 +6,2 @@ | |||
6 | class SimpleAlarmDaemonImpl; | 6 | class SimpleAlarmDaemonImpl; |
7 | class ScreenshotApplet; | ||
8 | 7 | ||
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 4ff6861..50c4605 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -50,3 +50,3 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) | |||
50 | mAlarmDialog = new AlarmDialog( 0 ); | 50 | mAlarmDialog = new AlarmDialog( 0 ); |
51 | mPopUp = new QPopupMenu( 0 ); | 51 | mPopUp = new QPopupMenu( this ); |
52 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); | 52 | mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); |
@@ -64,8 +64,8 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) | |||
64 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); | 64 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); |
65 | mTimerPopUp = new QPopupMenu( mPopUp ); | 65 | mTimerPopUp = new QPopupMenu( this ); |
66 | 66 | ||
67 | mBeepPopUp = new QPopupMenu( mPopUp ); | 67 | mBeepPopUp = new QPopupMenu( this ); |
68 | mSoundPopUp = new QPopupMenu( mBeepPopUp ); | 68 | mSoundPopUp = new QPopupMenu( this ); |
69 | mPausePopUp = new QPopupMenu( mBeepPopUp ); | 69 | mPausePopUp = new QPopupMenu( this ); |
70 | QPopupMenu* savePopUp = new QPopupMenu( mBeepPopUp ); | 70 | QPopupMenu* savePopUp = new QPopupMenu( this ); |
71 | savePopUp->insertItem( "Save", 0 ); | 71 | savePopUp->insertItem( "Save", 0 ); |
@@ -83,3 +83,3 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) | |||
83 | mPausePopUp->insertItem( "10 min", 600 ); | 83 | mPausePopUp->insertItem( "10 min", 600 ); |
84 | mSuspendPopUp = new QPopupMenu( mBeepPopUp ); | 84 | mSuspendPopUp = new QPopupMenu( this ); |
85 | mSuspendPopUp->insertItem( "Off", 0 ); | 85 | mSuspendPopUp->insertItem( "Off", 0 ); |
@@ -144,3 +144,3 @@ SimpleAlarmDaemonImpl::~SimpleAlarmDaemonImpl() | |||
144 | { | 144 | { |
145 | delete mPopUp; | 145 | //delete mPopUp; |
146 | delete mAlarmDialog; | 146 | delete mAlarmDialog; |
@@ -566,3 +566,3 @@ void SimpleAlarmDaemonImpl::showAdd() | |||
566 | { | 566 | { |
567 | QCopEnvelope e("QPE/Application/kapi", " "); | 567 | QCopEnvelope e("QPE/Application/kapi", "raise()"); |
568 | } | 568 | } |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 8dca3ae..1cdb2fb 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -231,3 +231,4 @@ KOPrefs::KOPrefs() : | |||
231 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); | 231 | addItemBool("HighlightCurrentDay",&mHighlightCurrentDay,true); |
232 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true); | 232 | addItemBool("WNViewShowsParents",&mWNViewShowsParents,true);; |
233 | addItemBool("WNViewShowsPast",&mWNViewShowsPast,true); | ||
233 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); | 234 | addItemBool("WNViewShowLocation",&mWNViewShowLocation,false); |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 0656644..f2fe77a 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -234,2 +234,3 @@ class KOPrefs : public KPimPrefs | |||
234 | bool mWNViewShowsParents; | 234 | bool mWNViewShowsParents; |
235 | bool mWNViewShowsPast; | ||
235 | bool mWNViewShowLocation; | 236 | bool mWNViewShowLocation; |
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 393e6e6..578c0e9 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -786,3 +786,3 @@ void KOPrefsDialog::setupViewsTab() | |||
786 | 786 | ||
787 | holidayColor = | 787 | holidayColor = |
788 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 788 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
@@ -799,21 +799,29 @@ void KOPrefsDialog::setupViewsTab() | |||
799 | ii = 0; | 799 | ii = 0; |
800 | KPrefsDialogWidBool *passwdk = | 800 | KPrefsDialogWidBool *passwdk = |
801 | addWidBool(i18n("Show parent To-Do's in What's Next view"), | 801 | |
802 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | 802 | addWidBool(i18n("Show events, that are done in \nWhat's Next view"), |
803 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 803 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); |
804 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | ||
805 | passwdk = | ||
806 | addWidBool(i18n("Show parent To-Do's in What's Next view"), | ||
807 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | ||
808 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | ||
804 | 809 | ||
805 | passwdk = | 810 | passwdk = |
806 | addWidBool(i18n("Show location in What's Next view"), | 811 | addWidBool(i18n("Show location in What's Next view"), |
807 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | 812 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); |
808 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 813 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
809 | 814 | ||
810 | passwdk = | 815 | passwdk = |
811 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), | 816 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), |
812 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 817 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
813 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 818 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
814 | passwdk = | 819 | passwdk = |
815 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), | 820 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), |
816 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 821 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
817 | topLayout->addMultiCellWidget(passwdk->checkBox(), ii,ii,0,1); | 822 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
818 | 823 | ||
824 | |||
825 | |||
826 | |||
819 | // *********************** Todo View | 827 | // *********************** Todo View |
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 0f0bf11..aa33588 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp | |||
@@ -359,3 +359,3 @@ void KOWhatsNextView::updateView() | |||
359 | // mView->setBackgroundPixmap ( bPix ); | 359 | // mView->setBackgroundPixmap ( bPix ); |
360 | qDebug("%s ",mText.latin1()); | 360 | // qDebug("%s ",mText.latin1()); |
361 | } | 361 | } |
@@ -438,2 +438,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
438 | QDateTime noc; | 438 | QDateTime noc; |
439 | QString tempText; | ||
439 | bool ok = true; | 440 | bool ok = true; |
@@ -444,3 +445,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
444 | } | 445 | } |
445 | mText += "<tr><td><b>"; | 446 | tempText += "<tr><td><b>"; |
446 | if (ev->type()=="Event") { | 447 | if (ev->type()=="Event") { |
@@ -448,5 +449,5 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
448 | if (!ev->doesFloat()) | 449 | if (!ev->doesFloat()) |
449 | mText += KGlobal::locale()->formatDateTime( noc , KOPrefs::instance()->mShortDateInViewer) +": "; | 450 | tempText += KGlobal::locale()->formatDateTime( noc , KOPrefs::instance()->mShortDateInViewer) +": "; |
450 | else | 451 | else |
451 | mText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; | 452 | tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; |
452 | 453 | ||
@@ -483,10 +484,13 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
483 | if ( notRed ) | 484 | if ( notRed ) |
484 | mText += dateText; | 485 | tempText += dateText; |
485 | else { | 486 | else { |
486 | if ( end < cdt ) | 487 | if ( end < cdt ) { |
487 | mText += "<font color=\"#F00000\">" + dateText + "</font>"; | 488 | if ( !KOPrefs::instance()->mWNViewShowsPast ) |
489 | return; | ||
490 | tempText += "<font color=\"#F00000\">" + dateText + "</font>"; | ||
491 | } | ||
488 | else if ( st < cdt ) | 492 | else if ( st < cdt ) |
489 | mText += "<font color=\"#008000\">" + dateText + "</font>"; | 493 | tempText += "<font color=\"#008000\">" + dateText + "</font>"; |
490 | else | 494 | else |
491 | mText += dateText; | 495 | tempText += dateText; |
492 | 496 | ||
@@ -495,3 +499,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
495 | } else { | 499 | } else { |
496 | mText += i18n("Allday:"); | 500 | tempText += i18n("Allday:"); |
497 | 501 | ||
@@ -501,7 +505,7 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
501 | mTodos.append( ev ); | 505 | mTodos.append( ev ); |
502 | mText += i18n("ToDo:"); | 506 | tempText += i18n("ToDo:"); |
503 | if (reply) { | 507 | if (reply) { |
504 | mText += " "; | 508 | tempText += " "; |
505 | if ( noc != cdt ) { | 509 | if ( noc != cdt ) { |
506 | mText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; | 510 | tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; |
507 | } | 511 | } |
@@ -509,6 +513,6 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
509 | if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) { | 513 | if ( ((Todo*)ev)->dtDue().date() < QDate::currentDate() ) { |
510 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; | 514 | // tempText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; |
511 | QString dfs = KGlobal::locale()->dateFormatShort(); | 515 | QString dfs = KGlobal::locale()->dateFormatShort(); |
512 | KGlobal::locale()->setDateFormatShort("%d.%b"); | 516 | KGlobal::locale()->setDateFormatShort("%d.%b"); |
513 | mText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "</font>"; | 517 | tempText +="<font color=\"#F00000\">" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "</font>"; |
514 | KGlobal::locale()->setDateFormatShort(dfs); | 518 | KGlobal::locale()->setDateFormatShort(dfs); |
@@ -517,3 +521,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
517 | if( ( (Todo*)ev)->dtDue() < cdt ) { | 521 | if( ( (Todo*)ev)->dtDue() < cdt ) { |
518 | mText +="<font color=\"#F00000\">" + ((Todo*)ev)->dtDueTimeStr() + "</font>"; | 522 | tempText +="<font color=\"#F00000\">" + ((Todo*)ev)->dtDueTimeStr() + "</font>"; |
519 | 523 | ||
@@ -521,3 +525,3 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
521 | } else | 525 | } else |
522 | mText +=((Todo*)ev)->dtDueTimeStr(); | 526 | tempText +=((Todo*)ev)->dtDueTimeStr(); |
523 | mTodos.append( ev ); | 527 | mTodos.append( ev ); |
@@ -526,6 +530,6 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
526 | } | 530 | } |
527 | mText += "</b></td><td>"; | 531 | tempText += "</b></td><td>"; |
528 | bool needClose = false; | 532 | bool needClose = false; |
529 | if ( ev->cancelled() ) { | 533 | if ( ev->cancelled() ) { |
530 | mText += "<font color=\"#F00000\">[c"; | 534 | tempText += "<font color=\"#F00000\">[c"; |
531 | needClose =true; | 535 | needClose =true; |
@@ -535,4 +539,4 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
535 | if ( !needClose) | 539 | if ( !needClose) |
536 | mText +="["; | 540 | tempText +="["; |
537 | mText += "a"; | 541 | tempText += "a"; |
538 | needClose =true; | 542 | needClose =true; |
@@ -542,4 +546,4 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
542 | if ( !needClose) | 546 | if ( !needClose) |
543 | mText +="["; | 547 | tempText +="["; |
544 | mText += "i"; | 548 | tempText += "i"; |
545 | needClose =true; | 549 | needClose =true; |
@@ -548,4 +552,4 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
548 | if ( !needClose) | 552 | if ( !needClose) |
549 | mText +="["; | 553 | tempText +="["; |
550 | mText += "r"; | 554 | tempText += "r"; |
551 | needClose =true; | 555 | needClose =true; |
@@ -553,21 +557,22 @@ void KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed ) | |||
553 | if ( needClose ) { | 557 | if ( needClose ) { |
554 | mText += "] "; | 558 | tempText += "] "; |
555 | } | 559 | } |
556 | if ( ev->cancelled() ) | 560 | if ( ev->cancelled() ) |
557 | mText += "</font>"; | 561 | tempText += "</font>"; |
558 | mText += "<a "; | 562 | tempText += "<a "; |
559 | if (ev->type()=="Event") mText += "href=\"event:"; | 563 | if (ev->type()=="Event") tempText += "href=\"event:"; |
560 | if (ev->type()=="Todo") mText += "href=\"todo:"; | 564 | if (ev->type()=="Todo") tempText += "href=\"todo:"; |
561 | mText += ev->uid() + "\">"; | 565 | tempText += ev->uid() + "\">"; |
562 | if ( ev->summary().length() > 0 ) | 566 | if ( ev->summary().length() > 0 ) |
563 | mText += ev->summary(); | 567 | tempText += ev->summary(); |
564 | else | 568 | else |
565 | mText += i18n("-no summary-"); | 569 | tempText += i18n("-no summary-"); |
566 | mText += "</a>"; | 570 | tempText += "</a>"; |
567 | if ( KOPrefs::instance()->mWNViewShowLocation ) | 571 | if ( KOPrefs::instance()->mWNViewShowLocation ) |
568 | if ( !ev->location().isEmpty() ) | 572 | if ( !ev->location().isEmpty() ) |
569 | mText += " ("+ev->location() +")"; | 573 | tempText += " ("+ev->location() +")"; |
570 | if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents) | 574 | if ( ev->relatedTo() && KOPrefs::instance()->mWNViewShowsParents) |
571 | mText += " ["+ev->relatedTo()->summary() +"]"; | 575 | tempText += " ["+ev->relatedTo()->summary() +"]"; |
572 | mText += "</td></tr>\n"; | 576 | tempText += "</td></tr>\n"; |
577 | mText += tempText; | ||
573 | } | 578 | } |