author | zautrix <zautrix> | 2005-01-23 15:44:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-23 15:44:48 (UTC) |
commit | abe5f73892c123110faec5648b484628b3265fd6 (patch) (unidiff) | |
tree | 8619e09ffbeb3b5ef9302a8bcb39092b426d3e43 | |
parent | 6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452 (diff) | |
download | kdepimpi-abe5f73892c123110faec5648b484628b3265fd6.zip kdepimpi-abe5f73892c123110faec5648b484628b3265fd6.tar.gz kdepimpi-abe5f73892c123110faec5648b484628b3265fd6.tar.bz2 |
bter today
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 7 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 18 |
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,48 +1,49 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 1.9.20 ************ | 3 | ********** VERSION 1.9.20 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Added for the "dislplay one day" agenda mode | ||
7 | info in the caption and in the day lables: | ||
8 | Now it is displayed, if the selected day is from "day before yesterday" | ||
9 | to "day after tomorrow". | ||
6 | Made it possible to delete a Todo, which has sub-todos. | 10 | Made it possible to delete a Todo, which has sub-todos. |
7 | Fixed two small problems in the todo view. | 11 | Fixed two small problems in the todo view. |
8 | Added missing German translation for filter edit and print dialog. | 12 | Added missing German translation for filter edit and print dialog. |
9 | Made search dialog closeable by cancel key. | 13 | Made search dialog closeable by cancel key. |
10 | 14 | ||
11 | Made it possible to select in the date picker the (ligt grey ) | 15 | Made it possible to select in the date picker the (ligt grey ) |
12 | dates of the prev./next month with the mouse. | 16 | dates of the prev./next month with the mouse. |
13 | 17 | ||
14 | Added for the "dislplay one day" agenda mode info in the caption: | ||
15 | Now it is displayed, if the selected day is from "day before yesterday" | ||
16 | to "day after tomorrow". | ||
17 | 18 | ||
18 | 19 | ||
19 | 20 | ||
20 | ********** VERSION 1.9.19 ************ | 21 | ********** VERSION 1.9.19 ************ |
21 | 22 | ||
22 | Added a lot of missing translations to KA/Pi, | 23 | Added a lot of missing translations to KA/Pi, |
23 | Added some missing translations to KO/Pi and OM/Pi. | 24 | Added some missing translations to KO/Pi and OM/Pi. |
24 | 25 | ||
25 | Fixed some minor problems in KA/Pi + KO/Pi. | 26 | Fixed some minor problems in KA/Pi + KO/Pi. |
26 | 27 | ||
27 | Fixed a crash when closing PwM/Pi. | 28 | Fixed a crash when closing PwM/Pi. |
28 | Added German translation for PwM/Pi. | 29 | Added German translation for PwM/Pi. |
29 | 30 | ||
30 | Made view change and Month View update faster in KO/Pi. | 31 | Made view change and Month View update faster in KO/Pi. |
31 | 32 | ||
32 | 33 | ||
33 | ********** VERSION 1.9.18 ************ | 34 | ********** VERSION 1.9.18 ************ |
34 | 35 | ||
35 | FYI: The VERSION 1.9.17 was a testing release only. | 36 | FYI: The VERSION 1.9.17 was a testing release only. |
36 | Please read the changelog of VERSION 1.9.17 as well. | 37 | Please read the changelog of VERSION 1.9.17 as well. |
37 | 38 | ||
38 | Cleaned up the syncing config dialog. | 39 | Cleaned up the syncing config dialog. |
39 | Added sync config options for date range for events. | 40 | Added sync config options for date range for events. |
40 | Added sync config options for filters on incoming data. | 41 | Added sync config options for filters on incoming data. |
41 | Added sync config options for filters on outgoing data. | 42 | Added sync config options for filters on outgoing data. |
42 | Please read the updated SyncHowTo about the new filter settings. | 43 | Please read the updated SyncHowTo about the new filter settings. |
43 | These filter settings make it now possible to sync with shared | 44 | These filter settings make it now possible to sync with shared |
44 | calendars without writing back private or confidential data | 45 | calendars without writing back private or confidential data |
45 | (via the outgoing filters). | 46 | (via the outgoing filters). |
46 | To sync only with particular parts of a shared calendar, | 47 | To sync only with particular parts of a shared calendar, |
47 | the incoming filter settings can be used. | 48 | the incoming filter settings can be used. |
48 | An example can be found in the SyncHowTo. | 49 | An example can be found in the SyncHowTo. |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index c5acafd..6428757 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -609,109 +609,125 @@ void KOAgendaView::createDayLabels() | |||
609 | QFontMetrics f( dlf ); | 609 | QFontMetrics f( dlf ); |
610 | wid = f.width( "20" ); | 610 | wid = f.width( "20" ); |
611 | needWid = wid * selCount; | 611 | needWid = wid * selCount; |
612 | if ( needWid < maxWid ) | 612 | if ( needWid < maxWid ) |
613 | break; | 613 | break; |
614 | } | 614 | } |
615 | maxLen = 2; | 615 | maxLen = 2; |
616 | } | 616 | } |
617 | //qDebug("Max len %d ", dayTest.length() ); | 617 | //qDebug("Max len %d ", dayTest.length() ); |
618 | 618 | ||
619 | QFontMetrics tempF( dlf ); | 619 | QFontMetrics tempF( dlf ); |
620 | newHight = tempF.height(); | 620 | newHight = tempF.height(); |
621 | mDayLabels->setFont( dlf ); | 621 | mDayLabels->setFont( dlf ); |
622 | // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; | 622 | // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; |
623 | // mLayoutDayLabels->addSpacing(mTimeLabels->width()); | 623 | // mLayoutDayLabels->addSpacing(mTimeLabels->width()); |
624 | //mLayoutDayLabels->addSpacing( 2 ); | 624 | //mLayoutDayLabels->addSpacing( 2 ); |
625 | // QFont lFont = dlf; | 625 | // QFont lFont = dlf; |
626 | bool appendLabels = false; | 626 | bool appendLabels = false; |
627 | QLabel *dayLabel; | 627 | QLabel *dayLabel; |
628 | dayLabel = mDayLabelsList.first(); | 628 | dayLabel = mDayLabelsList.first(); |
629 | if ( !dayLabel ) { | 629 | if ( !dayLabel ) { |
630 | appendLabels = true; | 630 | appendLabels = true; |
631 | dayLabel = new QLabel(mDayLabels); | 631 | dayLabel = new QLabel(mDayLabels); |
632 | mDayLabelsList.append( dayLabel ); | 632 | mDayLabelsList.append( dayLabel ); |
633 | mLayoutDayLabels->addWidget(dayLabel); | 633 | mLayoutDayLabels->addWidget(dayLabel); |
634 | } | 634 | } |
635 | dayLabel->setFixedWidth( mTimeLabels->width()+2 ); | 635 | dayLabel->setFixedWidth( mTimeLabels->width()+2 ); |
636 | dayLabel->setFont( dlf ); | 636 | dayLabel->setFont( dlf ); |
637 | dayLabel->setAlignment(QLabel::AlignHCenter); | 637 | dayLabel->setAlignment(QLabel::AlignHCenter); |
638 | dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); | 638 | dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); |
639 | dayLabel->show(); | 639 | dayLabel->show(); |
640 | DateList::ConstIterator dit; | 640 | DateList::ConstIterator dit; |
641 | bool oneday = (mSelectedDates.first() == mSelectedDates.last() ); | ||
641 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { | 642 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { |
642 | QDate date = *dit; | 643 | QDate date = *dit; |
643 | // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); | 644 | // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); |
644 | if ( ! appendLabels ) { | 645 | if ( ! appendLabels ) { |
645 | dayLabel = mDayLabelsList.next(); | 646 | dayLabel = mDayLabelsList.next(); |
646 | if ( !dayLabel ) | 647 | if ( !dayLabel ) |
647 | appendLabels = true; | 648 | appendLabels = true; |
648 | } | 649 | } |
649 | if ( appendLabels ) { | 650 | if ( appendLabels ) { |
650 | dayLabel = new QLabel(mDayLabels); | 651 | dayLabel = new QLabel(mDayLabels); |
651 | mDayLabelsList.append( dayLabel ); | 652 | mDayLabelsList.append( dayLabel ); |
652 | mLayoutDayLabels->addWidget(dayLabel); | 653 | mLayoutDayLabels->addWidget(dayLabel); |
653 | } | 654 | } |
654 | dayLabel->setMinimumWidth( 1 ); | 655 | dayLabel->setMinimumWidth( 1 ); |
655 | dayLabel->setMaximumWidth( 2048 ); | 656 | dayLabel->setMaximumWidth( 2048 ); |
656 | dayLabel->setFont( dlf ); | 657 | dayLabel->setFont( dlf ); |
657 | dayLabel->show(); | 658 | dayLabel->show(); |
658 | QString str; | 659 | QString str; |
659 | int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); | 660 | int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); |
660 | QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); | 661 | QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); |
661 | switch ( maxLen ) { | 662 | switch ( maxLen ) { |
662 | case 2: | 663 | case 2: |
663 | str = QString::number( date.day() ); | 664 | str = QString::number( date.day() ); |
664 | break; | 665 | break; |
665 | 666 | ||
666 | case 3: | 667 | case 3: |
667 | str = dayName.left( 1 ) +QString::number( date.day()); | 668 | str = dayName.left( 1 ) +QString::number( date.day()); |
668 | 669 | ||
669 | break; | 670 | break; |
670 | case 4: | 671 | case 4: |
671 | str = dayName.left( 1 ) + " " +QString::number( date.day()); | 672 | str = dayName.left( 1 ) + " " +QString::number( date.day()); |
672 | 673 | ||
673 | break; | 674 | break; |
674 | case 5: | 675 | case 5: |
675 | str = dayName.left( 2 ) + " " +QString::number( date.day()); | 676 | str = dayName.left( 2 ) + " " +QString::number( date.day()); |
676 | 677 | ||
677 | break; | 678 | break; |
678 | case 6: | 679 | case 6: |
679 | str = dayName.left( 3 ) + " " +QString::number( date.day()); | 680 | str = dayName.left( 3 ) + " " +QString::number( date.day()); |
680 | break; | 681 | break; |
681 | 682 | ||
682 | default: | 683 | default: |
683 | break; | 684 | break; |
684 | } | 685 | } |
685 | 686 | if ( oneday ) { | |
687 | QString addString; | ||
688 | if ( mSelectedDates.first() == QDateTime::currentDateTime().date() ) | ||
689 | addString = i18n("Today"); | ||
690 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) ) | ||
691 | addString = i18n("Tomorrow"); | ||
692 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) ) | ||
693 | addString = i18n("Yesterday"); | ||
694 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) ) | ||
695 | addString = i18n("Day before yesterday"); | ||
696 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) | ||
697 | addString = i18n("Day after tomorrow"); | ||
698 | if ( !addString.isEmpty() ) { | ||
699 | str = addString+", " + str; | ||
700 | } | ||
701 | } | ||
686 | dayLabel->setText(str); | 702 | dayLabel->setText(str); |
687 | dayLabel->setAlignment(QLabel::AlignHCenter); | 703 | dayLabel->setAlignment(QLabel::AlignHCenter); |
688 | if (date == QDate::currentDate()) { | 704 | if (date == QDate::currentDate()) { |
689 | QFont bFont = dlf; | 705 | QFont bFont = dlf; |
690 | bFont.setBold( true ); | 706 | bFont.setBold( true ); |
691 | dayLabel->setFont(bFont); | 707 | dayLabel->setFont(bFont); |
692 | } | 708 | } |
693 | //dayLayout->addWidget(dayLabel); | 709 | //dayLayout->addWidget(dayLabel); |
694 | 710 | ||
695 | #ifndef KORG_NOPLUGINS | 711 | #ifndef KORG_NOPLUGINS |
696 | CalendarDecoration::List cds = KOCore::self()->calendarDecorations(); | 712 | CalendarDecoration::List cds = KOCore::self()->calendarDecorations(); |
697 | CalendarDecoration *it; | 713 | CalendarDecoration *it; |
698 | for(it = cds.first(); it; it = cds.next()) { | 714 | for(it = cds.first(); it; it = cds.next()) { |
699 | QString text = it->shortText( date ); | 715 | QString text = it->shortText( date ); |
700 | if ( !text.isEmpty() ) { | 716 | if ( !text.isEmpty() ) { |
701 | QLabel *label = new QLabel(text,mDayLabels); | 717 | QLabel *label = new QLabel(text,mDayLabels); |
702 | label->setAlignment(AlignCenter); | 718 | label->setAlignment(AlignCenter); |
703 | dayLayout->addWidget(label); | 719 | dayLayout->addWidget(label); |
704 | } | 720 | } |
705 | } | 721 | } |
706 | 722 | ||
707 | for(it = cds.first(); it; it = cds.next()) { | 723 | for(it = cds.first(); it; it = cds.next()) { |
708 | QWidget *wid = it->smallWidget(mDayLabels,date); | 724 | QWidget *wid = it->smallWidget(mDayLabels,date); |
709 | if ( wid ) { | 725 | if ( wid ) { |
710 | // wid->setHeight(20); | 726 | // wid->setHeight(20); |
711 | dayLayout->addWidget(wid); | 727 | dayLayout->addWidget(wid); |
712 | } | 728 | } |
713 | } | 729 | } |
714 | #endif | 730 | #endif |
715 | } | 731 | } |
716 | if ( ! appendLabels ) { | 732 | if ( ! appendLabels ) { |
717 | dayLabel = mDayLabelsList.next(); | 733 | dayLabel = mDayLabelsList.next(); |