author | zautrix <zautrix> | 2005-03-17 20:00:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-17 20:00:15 (UTC) |
commit | de34f05c4545688dec24f8d75fc03e42f38b94d1 (patch) (side-by-side diff) | |
tree | 141a403ad18583748284b1aff745b4dcb30c67b5 | |
parent | 81295ee3a5e7e90fb4c6baf27ecbb65bee1de5b5 (diff) | |
download | kdepimpi-de34f05c4545688dec24f8d75fc03e42f38b94d1.zip kdepimpi-de34f05c4545688dec24f8d75fc03e42f38b94d1.tar.gz kdepimpi-de34f05c4545688dec24f8d75fc03e42f38b94d1.tar.bz2 |
filter fix
-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 @@ -3581,71 +3581,75 @@ void CalendarView::editFilters() 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(); |