summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/koprefsdialog.cpp6
-rw-r--r--korganizer/kowhatsnextview.cpp16
6 files changed, 27 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 368f379..2032420 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -2,7 +2,10 @@ Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 2.1.17 ************
-
+KO/Pi:
+Added option to display times in What's Next View on two lines.
+Removed "Allday" for allday events of one day duration in What's Next View.
+Added date range for allday events of more than one day duration in What's Next View.
********** VERSION 2.1.16 ************
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 0b928ef..e699fe9 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1529,7 +1529,7 @@
{ "Created","Angelegt" },
{ "Last Modified Sub","Zuletzt geändertes Sub" },
{ "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" },
-{ "","" },
+{ "Show times on two lines","Zeige Zeiten auf zwei Zeilen" },
{ "","" },
{ "","" },
{ "","" },
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 6560877..eb997f5 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -117,6 +117,7 @@ KOPrefs::KOPrefs() :
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);
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 2ff03fa..9749ba3 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -208,6 +208,7 @@ class KOPrefs : public KPimPrefs
bool mMarcusBainsEnabled;
int mNextXDays;
int mWhatsNextDays;
+ bool mWhatsNextTime2Lines;
int mWhatsNextPrios;
bool mEnableQuickTodo;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 05bd73f..9e2378a 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -779,9 +779,13 @@ void KOPrefsDialog::setupViewsTab()
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);
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 221debc..fafcb58 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -529,6 +529,8 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
dateText = "++:++-";
else
dateText = event->dtStartTimeStr() + "-";
+ if ( KOPrefs::instance()->mWhatsNextTime2Lines )
+ dateText += " ";
if ( end.date() > mEventDate )
dateText += "++:++";
else
@@ -556,7 +558,17 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
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:");
+ }
}
}
@@ -564,6 +576,8 @@ bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool a
} else {
mTodos.append( ev );
tempText += i18n("ToDo:");
+ if ( KOPrefs::instance()->mWhatsNextTime2Lines )
+ tempText += " ";
if (reply) {
tempText += " ";
if ( noc != cdt ) {