author | zautrix <zautrix> | 2004-10-05 12:28:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-05 12:28:46 (UTC) |
commit | 6406e08703d51eae5fad7cf11618c502831b692b (patch) (unidiff) | |
tree | ff867dd573a9359cfba6c08663e3ee78ca6c0844 /korganizer | |
parent | 4c877944b4e7bb7f74b4c8db07a99fd8133e8b86 (diff) | |
download | kdepimpi-6406e08703d51eae5fad7cf11618c502831b692b.zip kdepimpi-6406e08703d51eae5fad7cf11618c502831b692b.tar.gz kdepimpi-6406e08703d51eae5fad7cf11618c502831b692b.tar.bz2 |
bugfix show last sync events
-rw-r--r-- | korganizer/koagendaview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 77a3164..947bb66 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -981,65 +981,65 @@ void KOAgendaView::fillAgenda() | |||
981 | // mAgenda->blockNextRepaint( false ); | 981 | // mAgenda->blockNextRepaint( false ); |
982 | // mAgenda->viewport()->repaint(); | 982 | // mAgenda->viewport()->repaint(); |
983 | // mAgenda->blockNextRepaint( true ); | 983 | // mAgenda->blockNextRepaint( true ); |
984 | mMinY.resize(mSelectedDates.count()); | 984 | mMinY.resize(mSelectedDates.count()); |
985 | mMaxY.resize(mSelectedDates.count()); | 985 | mMaxY.resize(mSelectedDates.count()); |
986 | 986 | ||
987 | QPtrList<Event> dayEvents; | 987 | QPtrList<Event> dayEvents; |
988 | 988 | ||
989 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. | 989 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. |
990 | // Therefore, get all of them. | 990 | // Therefore, get all of them. |
991 | QPtrList<Todo> todos = calendar()->todos(); | 991 | QPtrList<Todo> todos = calendar()->todos(); |
992 | 992 | ||
993 | mAgenda->setDateList(mSelectedDates); | 993 | mAgenda->setDateList(mSelectedDates); |
994 | 994 | ||
995 | QDate today = QDate::currentDate(); | 995 | QDate today = QDate::currentDate(); |
996 | 996 | ||
997 | DateList::ConstIterator dit; | 997 | DateList::ConstIterator dit; |
998 | int curCol = 0; | 998 | int curCol = 0; |
999 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { | 999 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { |
1000 | QDate currentDate = *dit; | 1000 | QDate currentDate = *dit; |
1001 | // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString() | 1001 | // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString() |
1002 | // << endl; | 1002 | // << endl; |
1003 | 1003 | ||
1004 | dayEvents = calendar()->events(currentDate,true); | 1004 | dayEvents = calendar()->events(currentDate,true); |
1005 | 1005 | ||
1006 | // Default values, which can never be reached | 1006 | // Default values, which can never be reached |
1007 | mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1; | 1007 | mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1; |
1008 | mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; | 1008 | mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; |
1009 | 1009 | ||
1010 | unsigned int numEvent; | 1010 | unsigned int numEvent; |
1011 | for(numEvent=0;numEvent<dayEvents.count();++numEvent) { | 1011 | for(numEvent=0;numEvent<dayEvents.count();++numEvent) { |
1012 | Event *event = dayEvents.at(numEvent); | 1012 | Event *event = dayEvents.at(numEvent); |
1013 | if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(21) == QString("last-syncEvent-device") ) | 1013 | if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(15) == QString("last-syncEvent-") ) |
1014 | continue; | 1014 | continue; |
1015 | // kdDebug() << " Event: " << event->summary() << endl; | 1015 | // kdDebug() << " Event: " << event->summary() << endl; |
1016 | 1016 | ||
1017 | int beginX = currentDate.daysTo(event->dtStart().date()) + curCol; | 1017 | int beginX = currentDate.daysTo(event->dtStart().date()) + curCol; |
1018 | int endX = currentDate.daysTo(event->dtEnd().date()) + curCol; | 1018 | int endX = currentDate.daysTo(event->dtEnd().date()) + curCol; |
1019 | 1019 | ||
1020 | // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl; | 1020 | // kdDebug() << " beginX: " << beginX << " endX: " << endX << endl; |
1021 | 1021 | ||
1022 | if (event->doesFloat()) { | 1022 | if (event->doesFloat()) { |
1023 | if (event->recurrence()->doesRecur()) { | 1023 | if (event->recurrence()->doesRecur()) { |
1024 | mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); | 1024 | mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); |
1025 | } else { | 1025 | } else { |
1026 | if (beginX <= 0 && curCol == 0) { | 1026 | if (beginX <= 0 && curCol == 0) { |
1027 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | 1027 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); |
1028 | } else if (beginX == curCol) { | 1028 | } else if (beginX == curCol) { |
1029 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); | 1029 | mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); |
1030 | } | 1030 | } |
1031 | } | 1031 | } |
1032 | } else if (event->isMultiDay()) { | 1032 | } else if (event->isMultiDay()) { |
1033 | if ( event->doesRecur () ) { | 1033 | if ( event->doesRecur () ) { |
1034 | QDate dateit = currentDate; | 1034 | QDate dateit = currentDate; |
1035 | int count = 0; | 1035 | int count = 0; |
1036 | int max = event->dtStart().daysTo( event->dtEnd() ) +2; | 1036 | int max = event->dtStart().daysTo( event->dtEnd() ) +2; |
1037 | while (! event->recursOn( dateit ) && count <= max ) { | 1037 | while (! event->recursOn( dateit ) && count <= max ) { |
1038 | ++count; | 1038 | ++count; |
1039 | dateit = dateit.addDays( -1 ); | 1039 | dateit = dateit.addDays( -1 ); |
1040 | } | 1040 | } |
1041 | bool ok; | 1041 | bool ok; |
1042 | QDateTime nextOcstart = event->getNextOccurence( QDateTime(dateit) ,&ok ); | 1042 | QDateTime nextOcstart = event->getNextOccurence( QDateTime(dateit) ,&ok ); |
1043 | if ( ok ) | 1043 | if ( ok ) |
1044 | { | 1044 | { |
1045 | int secs = event->dtStart().secsTo( event->dtEnd() ); | 1045 | int secs = event->dtStart().secsTo( event->dtEnd() ); |