summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Unidiff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index a32333c..fa6b951 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -741,48 +741,50 @@ void KOAgendaView::createDayLabels()
741 str = dayName.left( 2 ) + " " +QString::number( date.day()); 741 str = dayName.left( 2 ) + " " +QString::number( date.day());
742 742
743 break; 743 break;
744 case 6: 744 case 6:
745 str = dayName.left( 3 ) + " " +QString::number( date.day()); 745 str = dayName.left( 3 ) + " " +QString::number( date.day());
746 break; 746 break;
747 747
748 default: 748 default:
749 break; 749 break;
750 } 750 }
751 if ( oneday ) { 751 if ( oneday ) {
752 QString addString; 752 QString addString;
753 if ( mSelectedDates.first() == QDateTime::currentDateTime().date() ) 753 if ( mSelectedDates.first() == QDateTime::currentDateTime().date() )
754 addString = i18n("Today"); 754 addString = i18n("Today");
755 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) ) 755 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) )
756 addString = i18n("Tomorrow"); 756 addString = i18n("Tomorrow");
757 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) ) 757 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) )
758 addString = i18n("Yesterday"); 758 addString = i18n("Yesterday");
759 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) ) 759 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) )
760 addString = i18n("Day before yesterday"); 760 addString = i18n("Day before yesterday");
761 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) 761 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) )
762 addString = i18n("Day after tomorrow"); 762 addString = i18n("Day after tomorrow");
763 if ( !addString.isEmpty() ) { 763 if ( !addString.isEmpty() ) {
764 str = addString+", " + str; 764 str = addString+", " + str;
765 } else {
766 str = KGlobal::locale()->formatDate( date, KOPrefs::instance()->mShortDateInViewer);
765 } 767 }
766 } 768 }
767 dayLabel->setText(str); 769 dayLabel->setText(str);
768 //dayLabel->setAlignment(QLabel::AlignHCenter); 770 //dayLabel->setAlignment(QLabel::AlignHCenter);
769 if (date == QDate::currentDate()) { 771 if (date == QDate::currentDate()) {
770 QFont bFont = dlf; 772 QFont bFont = dlf;
771 bFont.setBold( true ); 773 bFont.setBold( true );
772 dayLabel->setFont(bFont); 774 dayLabel->setFont(bFont);
773 } 775 }
774 //dayLayout->addWidget(dayLabel); 776 //dayLayout->addWidget(dayLabel);
775 777
776#ifndef KORG_NOPLUGINS 778#ifndef KORG_NOPLUGINS
777 CalendarDecoration::List cds = KOCore::self()->calendarDecorations(); 779 CalendarDecoration::List cds = KOCore::self()->calendarDecorations();
778 CalendarDecoration *it; 780 CalendarDecoration *it;
779 for(it = cds.first(); it; it = cds.next()) { 781 for(it = cds.first(); it; it = cds.next()) {
780 QString text = it->shortText( date ); 782 QString text = it->shortText( date );
781 if ( !text.isEmpty() ) { 783 if ( !text.isEmpty() ) {
782 QLabel *label = new QLabel(text,mDayLabels); 784 QLabel *label = new QLabel(text,mDayLabels);
783 label->setAlignment(AlignCenter); 785 label->setAlignment(AlignCenter);
784 dayLayout->addWidget(label); 786 dayLayout->addWidget(label);
785 } 787 }
786 } 788 }
787 789
788 for(it = cds.first(); it; it = cds.next()) { 790 for(it = cds.first(); it; it = cds.next()) {