summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt7
-rw-r--r--korganizer/koagendaview.cpp18
2 files changed, 21 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index adbfd67..5bfe1c8 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,28 +1,29 @@
Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 1.9.20 ************
KO/Pi:
+Added for the "dislplay one day" agenda mode
+info in the caption and in the day lables:
+Now it is displayed, if the selected day is from "day before yesterday"
+to "day after tomorrow".
Made it possible to delete a Todo, which has sub-todos.
Fixed two small problems in the todo view.
Added missing German translation for filter edit and print dialog.
Made search dialog closeable by cancel key.
Made it possible to select in the date picker the (ligt grey )
dates of the prev./next month with the mouse.
-Added for the "dislplay one day" agenda mode info in the caption:
-Now it is displayed, if the selected day is from "day before yesterday"
-to "day after tomorrow".
********** VERSION 1.9.19 ************
Added a lot of missing translations to KA/Pi,
Added some missing translations to KO/Pi and OM/Pi.
Fixed some minor problems in KA/Pi + KO/Pi.
Fixed a crash when closing PwM/Pi.
Added German translation for PwM/Pi.
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index c5acafd..6428757 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -629,24 +629,25 @@ void KOAgendaView::createDayLabels()
if ( !dayLabel ) {
appendLabels = true;
dayLabel = new QLabel(mDayLabels);
mDayLabelsList.append( dayLabel );
mLayoutDayLabels->addWidget(dayLabel);
}
dayLabel->setFixedWidth( mTimeLabels->width()+2 );
dayLabel->setFont( dlf );
dayLabel->setAlignment(QLabel::AlignHCenter);
dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) );
dayLabel->show();
DateList::ConstIterator dit;
+ bool oneday = (mSelectedDates.first() == mSelectedDates.last() );
for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
QDate date = *dit;
// QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels);
if ( ! appendLabels ) {
dayLabel = mDayLabelsList.next();
if ( !dayLabel )
appendLabels = true;
}
if ( appendLabels ) {
dayLabel = new QLabel(mDayLabels);
mDayLabelsList.append( dayLabel );
mLayoutDayLabels->addWidget(dayLabel);
@@ -673,25 +674,40 @@ void KOAgendaView::createDayLabels()
break;
case 5:
str = dayName.left( 2 ) + " " +QString::number( date.day());
break;
case 6:
str = dayName.left( 3 ) + " " +QString::number( date.day());
break;
default:
break;
}
-
+ if ( oneday ) {
+ QString addString;
+ if ( mSelectedDates.first() == QDateTime::currentDateTime().date() )
+ addString = i18n("Today");
+ else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) )
+ addString = i18n("Tomorrow");
+ else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) )
+ addString = i18n("Yesterday");
+ else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) )
+ addString = i18n("Day before yesterday");
+ else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) )
+ addString = i18n("Day after tomorrow");
+ if ( !addString.isEmpty() ) {
+ str = addString+", " + str;
+ }
+ }
dayLabel->setText(str);
dayLabel->setAlignment(QLabel::AlignHCenter);
if (date == QDate::currentDate()) {
QFont bFont = dlf;
bFont.setBold( true );
dayLabel->setFont(bFont);
}
//dayLayout->addWidget(dayLabel);
#ifndef KORG_NOPLUGINS
CalendarDecoration::List cds = KOCore::self()->calendarDecorations();
CalendarDecoration *it;