summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp14
-rw-r--r--korganizer/kolistview.cpp4
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/searchdialog.cpp4
5 files changed, 23 insertions, 1 deletions
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()
2667} 2667}
2668void CalendarView::updateView() 2668void CalendarView::updateView()
2669{ 2669{
2670 static bool clearallviews = false;
2671 if ( KOPrefs::instance()->mGlobalUpdateDisabled ) {
2672 if ( clearallviews ) {
2673 clearAllViews();
2674 clearallviews = false;
2675 }
2676 return;
2677 }
2678 clearallviews = true;
2670 DateList tmpList = mNavigator->selectedDates(); 2679 DateList tmpList = mNavigator->selectedDates();
2671 2680
2672 if ( KOPrefs::instance()->mHideNonStartedTodos ) 2681 if ( KOPrefs::instance()->mHideNonStartedTodos )
@@ -4411,6 +4420,11 @@ void CalendarView::editIncidence(Incidence *incidence)
4411void CalendarView::deleteIncidence(Incidence *incidence) 4420void CalendarView::deleteIncidence(Incidence *incidence)
4412{ 4421{
4413 //qDebug(" CalendarView::deleteIncidence "); 4422 //qDebug(" CalendarView::deleteIncidence ");
4423 if ( incidence == 0 ) {
4424 updateView();
4425 emit updateSearchDialog();
4426 return;
4427 }
4414 if ( incidence ) { 4428 if ( incidence ) {
4415 DeleteIncidenceVisitor v; 4429 DeleteIncidenceVisitor v;
4416 v.act( incidence, this ); 4430 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()
865 dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 865 dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
866 //dia.resize( 240,50 ); 866 //dia.resize( 240,50 );
867 dia.show(); 867 dia.show();
868 868 KOPrefs::instance()->mGlobalUpdateDisabled = true;
869 while ( incidence ) { 869 while ( incidence ) {
870 bar.setProgress( delCounter ); 870 bar.setProgress( delCounter );
871 mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter ); 871 mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter );
@@ -878,6 +878,8 @@ void KOListView::deleteAll()
878 break; 878 break;
879 879
880 } 880 }
881 KOPrefs::instance()->mGlobalUpdateDisabled = false;
882 emit deleteIncidenceSignal( 0 );
881 mess = mess.sprintf( i18n("%d items remaining in list."), count() ); 883 mess = mess.sprintf( i18n("%d items remaining in list."), count() );
882 topLevelWidget ()->setCaption( mess ); 884 topLevelWidget ()->setCaption( mess );
883 p->mConfirm = confirm; 885 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<KOPrefs> insd;
53KOPrefs::KOPrefs() : 53KOPrefs::KOPrefs() :
54 KPimPrefs("korganizerrc") 54 KPimPrefs("korganizerrc")
55{ 55{
56 mGlobalUpdateDisabled = false;
56 mCategoryColors.setAutoDelete(true); 57 mCategoryColors.setAutoDelete(true);
57 fillMailDefaults(); 58 fillMailDefaults();
58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196); 59 mDefaultCategoryColor = QColor(175,210,255);//196,196,196);
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
345 int mCurrentDisplayedView; 345 int mCurrentDisplayedView;
346 QPtrList<KopiCalendarFile> mCalendars; 346 QPtrList<KopiCalendarFile> mCalendars;
347 int mNextAvailableCalendar; 347 int mNextAvailableCalendar;
348 bool mGlobalUpdateDisabled;
348 349
349 private: 350 private:
350 QDict<QColor> mCategoryColors; 351 QDict<QColor> 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()
254} 254}
255void SearchDialog::updateList() 255void SearchDialog::updateList()
256{ 256{
257 if ( KOPrefs::instance()->mGlobalUpdateDisabled ) {
258 listView->clear();
259 return;
260 }
257 //listView->updateList(); 261 //listView->updateList();
258 if ( isVisible() ) { 262 if ( isVisible() ) {
259 updateView(); 263 updateView();