-rw-r--r-- | korganizer/mainwindow.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 151b55b..7b07a2e 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1701,13 +1701,22 @@ void MainWindow::configureToolBar( int item ) void MainWindow::setCaptionToDates() { QString selDates; selDates = KGlobal::locale()->formatDate(mView->startDate(), true); if (mView->startDate() < mView->endDate() ) - selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); + selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); + else { + QString addString; + if ( mView->startDate() == QDateTime::currentDateTime().date() ) + addString = i18n("Today"); + else if ( mView->startDate() == QDateTime::currentDateTime().date().addDays(1) ) + addString = i18n("Tomorrow"); + if ( !addString.isEmpty() ) + selDates = addString+", "+selDates ; + } setCaption( i18n("Dates: ") + selDates ); } // parameter item == 0: reinit void MainWindow::configureAgenda( int item ) { |