From 2e8199c8aa82c018d24d67c299a09b2aa6a786f1 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 06 Jul 2005 14:24:16 +0000 Subject: fixxx --- (limited to 'korganizer') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 4b3f806..558fc55 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -2667,6 +2667,15 @@ void CalendarView::clearAllViews() } void CalendarView::updateView() { + static bool clearallviews = false; + if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { + if ( clearallviews ) { + clearAllViews(); + clearallviews = false; + } + return; + } + clearallviews = true; DateList tmpList = mNavigator->selectedDates(); if ( KOPrefs::instance()->mHideNonStartedTodos ) @@ -4411,6 +4420,11 @@ void CalendarView::editIncidence(Incidence *incidence) void CalendarView::deleteIncidence(Incidence *incidence) { //qDebug(" CalendarView::deleteIncidence "); + if ( incidence == 0 ) { + updateView(); + emit updateSearchDialog(); + return; + } if ( incidence ) { DeleteIncidenceVisitor v; v.act( incidence, this ); diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 25e599d..5690bdb 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -865,7 +865,7 @@ void KOListView::deleteAll() dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); //dia.resize( 240,50 ); dia.show(); - + KOPrefs::instance()->mGlobalUpdateDisabled = true; while ( incidence ) { bar.setProgress( delCounter ); mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter ); @@ -878,6 +878,8 @@ void KOListView::deleteAll() break; } + KOPrefs::instance()->mGlobalUpdateDisabled = false; + emit deleteIncidenceSignal( 0 ); mess = mess.sprintf( i18n("%d items remaining in list."), count() ); topLevelWidget ()->setCaption( mess ); p->mConfirm = confirm; diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 138028d..a63297e 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -53,6 +53,7 @@ static KStaticDeleter insd; KOPrefs::KOPrefs() : KPimPrefs("korganizerrc") { + mGlobalUpdateDisabled = false; mCategoryColors.setAutoDelete(true); fillMailDefaults(); mDefaultCategoryColor = QColor(175,210,255);//196,196,196); @@ -319,7 +320,7 @@ KOPrefs::KOPrefs() : addItemBool("WTshowDetails",&mWTshowDetails,false); addItemBool("WTshowCreated",&mWTshowCreated,false); addItemBool("WTshowChanged",&mWTshowChanged,false); - mCalendars.setAutoDelete( true ); + mCalendars.setAutoDelete( true ); } diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 0779e27..392360d 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -345,6 +345,7 @@ class KOPrefs : public KPimPrefs int mCurrentDisplayedView; QPtrList mCalendars; int mNextAvailableCalendar; + bool mGlobalUpdateDisabled; private: QDict mCategoryColors; diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 2e32ac2..9cfdc35 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -254,6 +254,10 @@ void SearchDialog::accept() } void SearchDialog::updateList() { + if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { + listView->clear(); + return; + } //listView->updateList(); if ( isVisible() ) { updateView(); -- cgit v0.9.0.2