-rw-r--r-- | korganizer/koprefs.cpp | 1 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 6 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 16 |
4 files changed, 22 insertions, 2 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 6560877..eb997f5 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -116,8 +116,9 @@ KOPrefs::KOPrefs() : addItemBool("ToolBarUpN",&mToolBarUpN, false ); addItemBool("ToolBarHorF",&mToolBarHorF, true ); addItemBool("ToolBarUpF",&mToolBarUpF, false ); addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); + addItemBool("WhatsNextTime2Lines",&mWhatsNextTime2Lines, false ); addItemInt("Whats Next Days",&mWhatsNextDays,3); addItemInt("Whats Next Prios",&mWhatsNextPrios,1); addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 2ff03fa..9749ba3 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -207,8 +207,9 @@ class KOPrefs : public KPimPrefs bool mShowCompletedTodo; bool mMarcusBainsEnabled; int mNextXDays; int mWhatsNextDays; + bool mWhatsNextTime2Lines; int mWhatsNextPrios; bool mEnableQuickTodo; bool mCompactDialogs; diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 05bd73f..9e2378a 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -778,11 +778,15 @@ void KOPrefsDialog::setupViewsTab() QLabel *prioLabel = new QLabel(i18n("Number of max.displayed todo prios:"), prioBox); mPrioSpin = new QSpinBox(0,5,1,prioBox); if ( QApplication::desktop()->width() < 300 ) mPrioSpin->setFixedWidth( 40 ); - KPrefsDialogWidBool *passwdk = + addWidBool(i18n("Show times on two lines"), + &(KOPrefs::instance()->mWhatsNextTime2Lines),topFrame); + topLayout->addWidget(passwdk->checkBox(), ii++,0); + passwdk = + addWidBool(i18n("Show events that are done"), &(KOPrefs::instance()->mWNViewShowsPast),topFrame); topLayout->addWidget(passwdk->checkBox(), ii++,0); passwdk = diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 221debc..fafcb58 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -528,8 +528,10 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a if ( st.date() < mEventDate ) dateText = "++:++-"; else dateText = event->dtStartTimeStr() + "-"; + if ( KOPrefs::instance()->mWhatsNextTime2Lines ) + dateText += " "; if ( end.date() > mEventDate ) dateText += "++:++"; else dateText += event->dtEndTimeStr(); @@ -555,16 +557,28 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a tempText += "<font color=\"#00B000\">" + i18n("Birthday") +":</font>"; else tempText += "<font color=\"#00B0000\">" + i18n("Anniversary")+":</font>"; } else { - tempText += i18n("Allday:"); + if ( ((Event*)ev)->isMultiDay() ) { + QString dfs = KGlobal::locale()->dateFormatShort(); + KGlobal::locale()->setDateFormatShort("%d.%b"); + tempText +=KGlobal::locale()->formatDate(((Event*)ev)->dtStart().date(), true, KLocale::Userdefined) + "-"; + if ( KOPrefs::instance()->mWhatsNextTime2Lines ) + tempText += " "; + tempText +=KGlobal::locale()->formatDate(((Event*)ev)->dtEnd().date(), true, KLocale::Userdefined); + KGlobal::locale()->setDateFormatShort(dfs); + } else { + tempText += " " ;//i18n("Allday:"); + } } } } } else { mTodos.append( ev ); tempText += i18n("ToDo:"); + if ( KOPrefs::instance()->mWhatsNextTime2Lines ) + tempText += " "; if (reply) { tempText += " "; if ( noc != cdt ) { tempText += KGlobal::locale()->formatDate( noc.date() , KOPrefs::instance()->mShortDateInViewer) +": "; |