-rw-r--r-- | korganizer/calendarview.cpp | 8 | ||||
-rw-r--r-- | korganizer/filtereditdialog.cpp | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 8258c74..02c5e45 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1078,4 +1078,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int ++deletedEventR; } else { + if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ inR->setLastModified( modifiedCalendar ); inL = inR->clone(); @@ -1086,6 +1087,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int ++addedEvent; } + } } else { if ( inR->lastModified() > mLastCalendarSync || mode == 5 ) { + if ( !filterIN || filterIN->filterCalendarItem( inR ) ){ inR->setLastModified( modifiedCalendar ); inL = inR->clone(); @@ -1093,4 +1096,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int local->addIncidence( inL ); ++addedEvent; + } } else { checkExternSyncEvent(eventRSyncSharp, inR); @@ -1135,4 +1139,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } else { if ( ! mSyncManager->mWriteBackExistingOnly ) { + if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ inL->removeID(mCurrentSyncDevice ); ++addedEventR; @@ -1145,4 +1150,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } } + } } else { if ( inL->lastModified() < mLastCalendarSync && mode != 4 ) { @@ -1152,4 +1158,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } else { if ( ! mSyncManager->mWriteBackExistingOnly ) { + if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){ ++addedEventR; inL->setLastModified( modifiedCalendar ); @@ -1162,4 +1169,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } } + } inL = el.next(); } diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp index ca09844..df84911 100644 --- a/korganizer/filtereditdialog.cpp +++ b/korganizer/filtereditdialog.cpp @@ -237,4 +237,8 @@ void FilterEditDialog::readFilter(CalFilter *filter) mEditor->mConfidentialCheck->setChecked(c & CalFilter::ShowConfidential); + mEditor->mEventCheck->setChecked(c & CalFilter::HideEvents); + mEditor->mTodoCheck->setChecked(c & CalFilter::HideTodos); + mEditor->mJournalCheck->setChecked(c & CalFilter::HideJournals); + if (c & CalFilter::ShowCategories) { mEditor->mCatShowCheck->setChecked(true); @@ -260,4 +264,7 @@ void FilterEditDialog::writeFilter(CalFilter *filter) if (mEditor->mPrivateCheck->isChecked()) c |= CalFilter::ShowPrivate; if (mEditor->mConfidentialCheck->isChecked()) c |= CalFilter::ShowConfidential; + if (mEditor->mEventCheck->isChecked()) c |= CalFilter::HideEvents; + if (mEditor->mTodoCheck->isChecked()) c |= CalFilter::HideTodos; + if (mEditor->mJournalCheck->isChecked()) c |= CalFilter::HideJournals; filter->setCriteria(c); |