-rw-r--r-- | korganizer/calendarview.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index d6918d3..6eaac1c 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -3565,103 +3565,107 @@ void CalendarView::showDates(const DateList &selectedDates) } QPtrList<CalFilter> CalendarView::filters() { return mFilters; } void CalendarView::editFilters() { // kdDebug() << "CalendarView::editFilters()" << endl; CalFilter *filter = mFilters.first(); while(filter) { kdDebug() << " Filter: " << filter->name() << endl; filter = mFilters.next(); } mDialogManager->showFilterEditDialog(&mFilters); } void CalendarView::toggleFilter() { showFilter(! mFilterView->isVisible()); } KOFilterView *CalendarView::filterView() { return mFilterView; } void CalendarView::selectFilter( int fil ) { mFilterView->setSelectedFilter( fil ); } void CalendarView::showFilter(bool visible) { if (visible) mFilterView->show(); else mFilterView->hide(); } void CalendarView::toggleFilerEnabled( ) { mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); if ( !mFilterView->filtersEnabled() ) topLevelWidget()->setCaption( i18n("Filter disabled ") ); } void CalendarView::updateFilter() { CalFilter *filter = mFilterView->selectedFilter(); if (filter) { + QString mess; if (mFilterView->filtersEnabled()) { - topLevelWidget()->setCaption( i18n("Filter selected: ")+filter->name() ); + mess = i18n("Filter selected: ")+filter->name(); filter->setEnabled(true); } else filter->setEnabled(false); mCalendar->setFilter(filter); updateView(); + if ( !mess.isEmpty() ) + topLevelWidget()->setCaption( mess ); + } } void CalendarView::filterEdited() { mFilterView->updateFilters(); updateFilter(); writeSettings(); } void CalendarView::takeOverEvent() { Incidence *incidence = currentSelection(); if (!incidence) return; incidence->setOrganizer(KOPrefs::instance()->email()); incidence->recreate(); incidence->setReadOnly(false); updateView(); } void CalendarView::takeOverCalendar() { // TODO: Create Calendar::allIncidences() function and use it here QPtrList<Event> events = mCalendar->events(); for(uint i=0; i<events.count(); ++i) { events.at(i)->setOrganizer(KOPrefs::instance()->email()); events.at(i)->recreate(); events.at(i)->setReadOnly(false); } QPtrList<Todo> todos = mCalendar->todos(); for(uint i=0; i<todos.count(); ++i) { todos.at(i)->setOrganizer(KOPrefs::instance()->email()); todos.at(i)->recreate(); todos.at(i)->setReadOnly(false); } QPtrList<Journal> journals = mCalendar->journals(); for(uint i=0; i<journals.count(); ++i) { journals.at(i)->setOrganizer(KOPrefs::instance()->email()); journals.at(i)->recreate(); journals.at(i)->setReadOnly(false); } |