-rw-r--r-- | korganizer/calendarview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index d25f632..08909ed 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -4008,47 +4008,47 @@ void CalendarView::showDates(const DateList &selectedDates) | |||
4008 | 4008 | ||
4009 | QPtrList<CalFilter> CalendarView::filters() | 4009 | QPtrList<CalFilter> CalendarView::filters() |
4010 | { | 4010 | { |
4011 | return mFilters; | 4011 | return mFilters; |
4012 | 4012 | ||
4013 | } | 4013 | } |
4014 | void CalendarView::editFilters() | 4014 | void CalendarView::editFilters() |
4015 | { | 4015 | { |
4016 | // kdDebug() << "CalendarView::editFilters()" << endl; | 4016 | // kdDebug() << "CalendarView::editFilters()" << endl; |
4017 | 4017 | ||
4018 | CalFilter *filter = mFilters.first(); | 4018 | CalFilter *filter = mFilters.first(); |
4019 | while(filter) { | 4019 | while(filter) { |
4020 | kdDebug() << " Filter: " << filter->name() << endl; | ||
4021 | filter = mFilters.next(); | 4020 | filter = mFilters.next(); |
4022 | } | 4021 | } |
4023 | 4022 | ||
4024 | mDialogManager->showFilterEditDialog(&mFilters); | 4023 | mDialogManager->showFilterEditDialog(&mFilters); |
4025 | updateFilter(); | 4024 | updateFilter(); |
4026 | } | 4025 | } |
4027 | void CalendarView::toggleFilter() | 4026 | void CalendarView::toggleFilter() |
4028 | { | 4027 | { |
4029 | if ( mLeftFrame->isHidden() ) { | 4028 | if ( mLeftFrame->isHidden() ) { |
4030 | toggleExpand(); | 4029 | toggleExpand(); |
4031 | showFilter( true ); | 4030 | showFilter( true ); |
4032 | } else | 4031 | } else |
4033 | showFilter(! mCalEditView->isVisible()); | 4032 | showFilter(! mCalEditView->isVisible()); |
4034 | } | 4033 | } |
4035 | 4034 | ||
4036 | KOFilterView *CalendarView::filterView() | 4035 | KOFilterView *CalendarView::filterView() |
4037 | { | 4036 | { |
4038 | return mFilterView; | 4037 | return mFilterView; |
4039 | } | 4038 | } |
4040 | void CalendarView::selectFilter( int fil ) | 4039 | void CalendarView::selectFilter( int fil ) |
4041 | { | 4040 | { |
4042 | mFilterView->setSelectedFilter( fil ); | 4041 | mFilterView->setSelectedFilter( fil ); |
4042 | updateUnmanagedViews(); | ||
4043 | } | 4043 | } |
4044 | void CalendarView::showFilter(bool visible) | 4044 | void CalendarView::showFilter(bool visible) |
4045 | { | 4045 | { |
4046 | #if 1 | 4046 | #if 1 |
4047 | if (visible) { | 4047 | if (visible) { |
4048 | mCalEditView->readConfig(); | 4048 | mCalEditView->readConfig(); |
4049 | mCalEditView->show(); | 4049 | mCalEditView->show(); |
4050 | QValueList<int> sizes; | 4050 | QValueList<int> sizes; |
4051 | sizes = mLeftFrame->sizes(); | 4051 | sizes = mLeftFrame->sizes(); |
4052 | if ( sizes.count() == 4 && sizes[3] < 20 ) { | 4052 | if ( sizes.count() == 4 && sizes[3] < 20 ) { |
4053 | sizes.clear(); | 4053 | sizes.clear(); |
4054 | sizes << 100; | 4054 | sizes << 100; |
@@ -4071,24 +4071,25 @@ void CalendarView::showFilter(bool visible) | |||
4071 | mCalEditView->hide(); | 4071 | mCalEditView->hide(); |
4072 | } | 4072 | } |
4073 | #else | 4073 | #else |
4074 | if (visible) mFilterView->show(); | 4074 | if (visible) mFilterView->show(); |
4075 | else mFilterView->hide(); | 4075 | else mFilterView->hide(); |
4076 | #endif | 4076 | #endif |
4077 | } | 4077 | } |
4078 | void CalendarView::toggleFilerEnabled( ) | 4078 | void CalendarView::toggleFilerEnabled( ) |
4079 | { | 4079 | { |
4080 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); | 4080 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); |
4081 | if ( !mFilterView->filtersEnabled() ) | 4081 | if ( !mFilterView->filtersEnabled() ) |
4082 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); | 4082 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); |
4083 | updateUnmanagedViews(); | ||
4083 | 4084 | ||
4084 | } | 4085 | } |
4085 | void CalendarView::updateFilter() | 4086 | void CalendarView::updateFilter() |
4086 | { | 4087 | { |
4087 | CalFilter *filter = mFilterView->selectedFilter(); | 4088 | CalFilter *filter = mFilterView->selectedFilter(); |
4088 | if (filter) { | 4089 | if (filter) { |
4089 | QString mess; | 4090 | QString mess; |
4090 | if (mFilterView->filtersEnabled()) { | 4091 | if (mFilterView->filtersEnabled()) { |
4091 | mess = i18n("Filter selected: ")+filter->name(); | 4092 | mess = i18n("Filter selected: ")+filter->name(); |
4092 | filter->setEnabled(true); | 4093 | filter->setEnabled(true); |
4093 | } | 4094 | } |
4094 | else filter->setEnabled(false); | 4095 | else filter->setEnabled(false); |