author | zautrix <zautrix> | 2005-10-26 09:10:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-26 09:10:50 (UTC) |
commit | 15b9123c6c1f9096a4b1a7729c323433d408c8d7 (patch) (side-by-side diff) | |
tree | 3d9a8a521df355641642172ab1200a0f75529910 /korganizer | |
parent | f696b904526567d45cd01a5b607644f8aa3bfe6b (diff) | |
download | kdepimpi-15b9123c6c1f9096a4b1a7729c323433d408c8d7.zip kdepimpi-15b9123c6c1f9096a4b1a7729c323433d408c8d7.tar.gz kdepimpi-15b9123c6c1f9096a4b1a7729c323433d408c8d7.tar.bz2 |
fix
-rw-r--r-- | korganizer/calendarview.cpp | 42 | ||||
-rw-r--r-- | korganizer/calendarview.h | 5 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 8 | ||||
-rw-r--r-- | korganizer/koagendaview.h | 1 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 6 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 16 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 7 |
8 files changed, 52 insertions, 34 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 28b17a5..31e103d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -368,2 +368,7 @@ void CalendarView::init() { + flag_blockConflict = false; + flag_blockScrollBar = false; + flag_checkFileFirsttime = true; + flag_clearallviewsEventDisplay = false; + flag_clearallviewsupdateView = false; mNextAlarmDateTime = QDateTime::currentDateTime(); @@ -663,5 +668,4 @@ void CalendarView::nextConflict( bool all, bool allday ) { - static bool block = false; - if ( block ) return; - block = true; + if ( flag_blockConflict ) return; + flag_blockConflict = true; QPtrList<Event> testlist = mCalendar->events(); @@ -742,3 +746,3 @@ void CalendarView::nextConflict( bool all, bool allday ) topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( cE->summary().left( 20 ) ).arg( cE2->summary().left( 20 ) ) ); - block = false; + flag_blockConflict = false; return; @@ -748,3 +752,3 @@ void CalendarView::nextConflict( bool all, bool allday ) //qDebug("No conflict found "); - block = false; + flag_blockConflict = false; return; @@ -782,5 +786,4 @@ void CalendarView::scrollBarValue(int val ) if ( QApplication::desktop()->width() < 800 ) return; - static bool block = false; - if ( block ) return; - block = true; + if ( flag_blockScrollBar ) return; + flag_blockScrollBar = true; int count = mNavigator->selectedDates().count(); @@ -796,3 +799,3 @@ void CalendarView::scrollBarValue(int val ) if ( stepdays == day ) { - block = false; + flag_blockScrollBar = false; return; @@ -802,3 +805,3 @@ void CalendarView::scrollBarValue(int val ) mNavigator->selectDates( d.addDays( stepdays-1) , count ); - block = false; + flag_blockScrollBar = false; #endif @@ -841,5 +844,4 @@ void CalendarView::checkFiles() } - static bool firstTime = true; - if ( firstTime ) { - firstTime = false; + if ( flag_checkFileFirsttime ) { + flag_checkFileFirsttime = false; QTimer::singleShot( 2000, this, SLOT ( checkAlarms() )); @@ -3018,7 +3020,6 @@ void CalendarView::changeEventDisplay(Event *which, int action) changeIncidenceDisplay((Incidence *)which, action); - static bool clearallviews = false; if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { - if ( clearallviews ) { + if ( flag_clearallviewsEventDisplay ) { clearAllViews(); - clearallviews = false; + flag_clearallviewsEventDisplay = false; } @@ -3026,3 +3027,3 @@ void CalendarView::changeEventDisplay(Event *which, int action) } - clearallviews = true; + flag_clearallviewsEventDisplay = true; mDateNavigator->updateView(); @@ -3179,7 +3180,6 @@ void CalendarView::updateView() { - static bool clearallviews = false; if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { - if ( clearallviews ) { + if ( flag_clearallviewsupdateView ) { clearAllViews(); - clearallviews = false; + flag_clearallviewsupdateView = false; } @@ -3187,3 +3187,3 @@ void CalendarView::updateView() } - clearallviews = true; + flag_clearallviewsupdateView = true; DateList tmpList = mNavigator->selectedDates(); diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 0924f07..80f7ed4 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -553,2 +553,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser #endif + bool flag_blockConflict; + bool flag_blockScrollBar; + bool flag_checkFileFirsttime; + bool flag_clearallviewsEventDisplay; + bool flag_clearallviewsupdateView; QDateTime mNextAlarmDateTime; diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index c1b149f..6e65a03 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -379,2 +379,3 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : { + flag_blockfillAgenda = false; mBlockUpdating = true; @@ -1144,6 +1145,5 @@ void KOAgendaView::fillAgenda() return; - static bool onlyOne = false; - if ( onlyOne ) + if ( flag_blockfillAgenda ) return; - onlyOne = true; + flag_blockfillAgenda = true; //if ( globalFlagBlockAgenda == 2 ) @@ -1356,3 +1356,3 @@ void KOAgendaView::fillAgenda() startIdleTimeout(); - onlyOne = false; + flag_blockfillAgenda = false; } diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 4b7ef5b..5e68146 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h @@ -258,2 +258,3 @@ class KOAgendaView : public KOEventView { private: + bool flag_blockfillAgenda; QTimer* mIdleTimer; diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index a12c43e..d79a9b9 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -515,3 +515,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : { - + mIsActiveWindow = false; mCurItem = 0; @@ -952,2 +952,3 @@ void KOTodoView::storeCurrentItem() mCurItemAbove = 0; + mIsActiveWindow = topLevelWidget()->isActiveWindow(); mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); @@ -1020,3 +1021,4 @@ void KOTodoView::resetFocusToList() { - topLevelWidget()->setActiveWindow(); + if ( mIsActiveWindow ) + topLevelWidget()->setActiveWindow(); mTodoListView->setFocus(); diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index ecd0ad9..161ecb0 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -257,2 +257,3 @@ class KOTodoView : public KOrg::BaseView private: + bool mIsActiveWindow; void addQuickTodoPar( Todo * parentTodo); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index ba3bc05..4057ae0 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -62,2 +62,9 @@ KOViewManager::KOViewManager( CalendarView *mainView ) : { + + lastMode = 0; + lastCount = 0; + lastNDMode = false; + selecteddatescount = 0; + selecteddate = QDate ( 2000, 1, 1 ); + baseCycleDate = QDate ( 2000, 1, 1 ); mCurrentView = 0; @@ -115,6 +122,3 @@ void KOViewManager::showDateView( int view, QDate date) { - static int lastMode = 0; - static int lastCount = 0; - static bool lastNDMode = false; - static QDate lastDate; + //qDebug("date %d %s", view, date.toString().latin1()); @@ -203,5 +207,3 @@ void KOViewManager::showNextView() { - static int selecteddatescount = 0; - static QDate selecteddate = QDate ( 2000, 1, 1 ); - static QDate baseCycleDate = QDate ( 2000, 1, 1 ); + int newCount = mMainView->dateNavigator()->selectedDates().count(); diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 2e6aaed..2aa46d0 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h @@ -106,2 +106,9 @@ class KOViewManager : public QObject private: + int lastMode; + int lastCount; + bool lastNDMode; + QDate lastDate; + int selecteddatescount; + QDate selecteddate; + QDate baseCycleDate; void resetDateSilent( QDate date , int days ); |