summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-06 14:24:16 (UTC)
committer zautrix <zautrix>2005-07-06 14:24:16 (UTC)
commit2e8199c8aa82c018d24d67c299a09b2aa6a786f1 (patch) (side-by-side diff)
tree3883f4d664b632d4107333ca27ff47ef1abdb70a
parentfeb7b5c7dbc5f9de44993330dee654ad0a38b8d9 (diff)
downloadkdepimpi-2e8199c8aa82c018d24d67c299a09b2aa6a786f1.zip
kdepimpi-2e8199c8aa82c018d24d67c299a09b2aa6a786f1.tar.gz
kdepimpi-2e8199c8aa82c018d24d67c299a09b2aa6a786f1.tar.bz2
fixxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp14
-rw-r--r--korganizer/kolistview.cpp4
-rw-r--r--korganizer/koprefs.cpp3
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/searchdialog.cpp4
5 files changed, 24 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 4b3f806..558fc55 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2666,8 +2666,17 @@ 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 )
mTodoList->updateView();
@@ -4410,8 +4419,13 @@ 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
@@ -864,9 +864,9 @@ void KOListView::deleteAll()
int dh = QApplication::desktop()->height();
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 );
dia.setCaption( mess );
@@ -877,8 +877,10 @@ void KOListView::deleteAll()
if ( dia.result() != 0 )
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
@@ -52,8 +52,9 @@ static KStaticDeleter<KOPrefs> insd;
KOPrefs::KOPrefs() :
KPimPrefs("korganizerrc")
{
+ mGlobalUpdateDisabled = false;
mCategoryColors.setAutoDelete(true);
fillMailDefaults();
mDefaultCategoryColor = QColor(175,210,255);//196,196,196);
QColor defaultHolidayColor = QColor(255,0,0);
@@ -318,9 +319,9 @@ KOPrefs::KOPrefs() :
addItemBool("EVshowChanged",&mEVshowChanged,true);
addItemBool("WTshowDetails",&mWTshowDetails,false);
addItemBool("WTshowCreated",&mWTshowCreated,false);
addItemBool("WTshowChanged",&mWTshowChanged,false);
- mCalendars.setAutoDelete( true );
+ mCalendars.setAutoDelete( true );
}
KOPrefs::~KOPrefs()
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 0779e27..392360d 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -344,8 +344,9 @@ class KOPrefs : public KPimPrefs
int mCurrentDisplayedView;
QPtrList<KopiCalendarFile> mCalendars;
int mNextAvailableCalendar;
+ bool mGlobalUpdateDisabled;
private:
QDict<QColor> mCategoryColors;
QArray<KopiCalendarFile*> mDefCalColors;
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 2e32ac2..9cfdc35 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -253,8 +253,12 @@ void SearchDialog::accept()
doSearch();
}
void SearchDialog::updateList()
{
+ if ( KOPrefs::instance()->mGlobalUpdateDisabled ) {
+ listView->clear();
+ return;
+ }
//listView->updateList();
if ( isVisible() ) {
updateView();
//qDebug("SearchDialog::updated ");