summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-06 14:24:16 (UTC)
committer zautrix <zautrix>2005-07-06 14:24:16 (UTC)
commit2e8199c8aa82c018d24d67c299a09b2aa6a786f1 (patch) (unidiff)
tree3883f4d664b632d4107333ca27ff47ef1abdb70a
parentfeb7b5c7dbc5f9de44993330dee654ad0a38b8d9 (diff)
downloadkdepimpi-2e8199c8aa82c018d24d67c299a09b2aa6a786f1.zip
kdepimpi-2e8199c8aa82c018d24d67c299a09b2aa6a786f1.tar.gz
kdepimpi-2e8199c8aa82c018d24d67c299a09b2aa6a786f1.tar.bz2
fixxx
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
@@ -2658,24 +2658,33 @@ void CalendarView::clearAllViews()
2658{ 2658{
2659 mTodoList->clearList(); 2659 mTodoList->clearList();
2660 mViewManager->clearAllViews(); 2660 mViewManager->clearAllViews();
2661 SearchDialog * sd = mDialogManager->getSearchDialog(); 2661 SearchDialog * sd = mDialogManager->getSearchDialog();
2662 if ( sd ) { 2662 if ( sd ) {
2663 KOListView* kol = sd->listview(); 2663 KOListView* kol = sd->listview();
2664 if ( kol ) 2664 if ( kol )
2665 kol->clearList(); 2665 kol->clearList();
2666 } 2666 }
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 )
2673 mTodoList->updateView(); 2682 mTodoList->updateView();
2674 // We assume that the navigator only selects consecutive days. 2683 // We assume that the navigator only selects consecutive days.
2675 updateView( tmpList.first(), tmpList.last() ); 2684 updateView( tmpList.first(), tmpList.last() );
2676} 2685}
2677 2686
2678void CalendarView::updateUnmanagedViews() 2687void CalendarView::updateUnmanagedViews()
2679{ 2688{
2680 mDateNavigator->updateDayMatrix(); 2689 mDateNavigator->updateDayMatrix();
2681} 2690}
@@ -4402,24 +4411,29 @@ void CalendarView::editIncidence(Incidence *incidence)
4402{ 4411{
4403 if ( incidence ) { 4412 if ( incidence ) {
4404 4413
4405 EditIncidenceVisitor v; 4414 EditIncidenceVisitor v;
4406 v.act( incidence, this ); 4415 v.act( incidence, this );
4407 4416
4408 } 4417 }
4409} 4418}
4410 4419
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 );
4417 } 4431 }
4418} 4432}
4419 4433
4420 4434
4421void CalendarView::lookForOutgoingMessages() 4435void CalendarView::lookForOutgoingMessages()
4422{ 4436{
4423 OutgoingDialog *ogd = mDialogManager->outgoingDialog(); 4437 OutgoingDialog *ogd = mDialogManager->outgoingDialog();
4424 ogd->loadMessages(); 4438 ogd->loadMessages();
4425} 4439}
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 25e599d..5690bdb 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -856,37 +856,39 @@ void KOListView::deleteAll()
856 lay.setMargin(7); 856 lay.setMargin(7);
857 lay.setSpacing(7); 857 lay.setSpacing(7);
858 lay.addWidget( &lab); 858 lay.addWidget( &lab);
859 QProgressBar bar( icount, &dia ); 859 QProgressBar bar( icount, &dia );
860 lay.addWidget( &bar); 860 lay.addWidget( &bar);
861 int w = 220; 861 int w = 220;
862 int h = 50; 862 int h = 50;
863 int dw = QApplication::desktop()->width(); 863 int dw = QApplication::desktop()->width();
864 int dh = QApplication::desktop()->height(); 864 int dh = QApplication::desktop()->height();
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 );
872 dia.setCaption( mess ); 872 dia.setCaption( mess );
873 qApp->processEvents(); 873 qApp->processEvents();
874 toDelete = (incidence); 874 toDelete = (incidence);
875 incidence = delSel.next(); 875 incidence = delSel.next();
876 emit deleteIncidenceSignal(toDelete ); 876 emit deleteIncidenceSignal(toDelete );
877 if ( dia.result() != 0 ) 877 if ( dia.result() != 0 )
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;
884 } 886 }
885 } 887 }
886 888
887 889
888} 890}
889int KOListView::maxDatesHint() 891int KOListView::maxDatesHint()
890{ 892{
891 return 0; 893 return 0;
892} 894}
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 138028d..a63297e 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -44,24 +44,25 @@
44#include <kstaticdeleter.h> 44#include <kstaticdeleter.h>
45#include <libkdepim/kpimglobalprefs.h> 45#include <libkdepim/kpimglobalprefs.h>
46 46
47#include "koprefs.h" 47#include "koprefs.h"
48#include "mainwindow.h" 48#include "mainwindow.h"
49 49
50KOPrefs *KOPrefs::mInstance = 0; 50KOPrefs *KOPrefs::mInstance = 0;
51static KStaticDeleter<KOPrefs> insd; 51static KStaticDeleter<KOPrefs> insd;
52 52
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);
59 QColor defaultHolidayColor = QColor(255,0,0); 60 QColor defaultHolidayColor = QColor(255,0,0);
60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); 61 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255);
61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); 62 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128);
62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); 63 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160);
63 QColor defaultTodoDueTodayColor = QColor(255,220,100); 64 QColor defaultTodoDueTodayColor = QColor(255,220,100);
64 QColor defaultTodoOverdueColor = QColor(255,153,125); 65 QColor defaultTodoOverdueColor = QColor(255,153,125);
65 QColor defaultTodoRunColor = QColor(99,194,30); 66 QColor defaultTodoRunColor = QColor(99,194,30);
66 KPrefs::setCurrentGroup("General"); 67 KPrefs::setCurrentGroup("General");
67 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 68 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 0779e27..392360d 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -336,24 +336,25 @@ class KOPrefs : public KPimPrefs
336 336
337 // settings for eventviewer 337 // settings for eventviewer
338 bool mEVshowDetails; 338 bool mEVshowDetails;
339 bool mEVshowCreated; 339 bool mEVshowCreated;
340 bool mEVshowChanged; 340 bool mEVshowChanged;
341 bool mWTshowDetails; 341 bool mWTshowDetails;
342 bool mWTshowCreated; 342 bool mWTshowCreated;
343 bool mWTshowChanged; 343 bool mWTshowChanged;
344 344
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;
351 QArray<KopiCalendarFile*> mDefCalColors; 352 QArray<KopiCalendarFile*> mDefCalColors;
352 QColor mDefaultCategoryColor; 353 QColor mDefaultCategoryColor;
353 354
354 QFont mDefaultTimeBarFont; 355 QFont mDefaultTimeBarFont;
355 QFont mDefaultViewFont; 356 QFont mDefaultViewFont;
356 QFont mDefaultMonthViewFont; 357 QFont mDefaultMonthViewFont;
357 358
358 QString mName; 359 QString mName;
359 QString mEmail; 360 QString mEmail;
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 2e32ac2..9cfdc35 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -245,24 +245,28 @@ void SearchDialog::raiseAndSelect()
245 raise(); 245 raise();
246} 246}
247void SearchDialog::setFocusToList() 247void SearchDialog::setFocusToList()
248{ 248{
249 listView->resetFocus(); 249 listView->resetFocus();
250} 250}
251void SearchDialog::accept() 251void SearchDialog::accept()
252{ 252{
253 doSearch(); 253 doSearch();
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();
260 //qDebug("SearchDialog::updated "); 264 //qDebug("SearchDialog::updated ");
261 } 265 }
262 else { 266 else {
263 listView->clear(); 267 listView->clear();
264 //qDebug("SearchDialog::cleared "); 268 //qDebug("SearchDialog::cleared ");
265 269
266 } 270 }
267} 271}
268void SearchDialog::searchTextChanged( const QString &_text ) 272void SearchDialog::searchTextChanged( const QString &_text )