summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
authorzautrix <zautrix>2005-10-26 09:10:50 (UTC)
committer zautrix <zautrix>2005-10-26 09:10:50 (UTC)
commit15b9123c6c1f9096a4b1a7729c323433d408c8d7 (patch) (side-by-side diff)
tree3d9a8a521df355641642172ab1200a0f75529910 /korganizer/calendarview.cpp
parentf696b904526567d45cd01a5b607644f8aa3bfe6b (diff)
downloadkdepimpi-15b9123c6c1f9096a4b1a7729c323433d408c8d7.zip
kdepimpi-15b9123c6c1f9096a4b1a7729c323433d408c8d7.tar.gz
kdepimpi-15b9123c6c1f9096a4b1a7729c323433d408c8d7.tar.bz2
fix
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 28b17a5..31e103d 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -366,6 +366,11 @@ CalendarView::CalendarView( Calendar *calendar,
void CalendarView::init()
{
+ flag_blockConflict = false;
+ flag_blockScrollBar = false;
+ flag_checkFileFirsttime = true;
+ flag_clearallviewsEventDisplay = false;
+ flag_clearallviewsupdateView = false;
mNextAlarmDateTime = QDateTime::currentDateTime();
setFocusPolicy (NoFocus );
mViewerCallerIsSearchDialog = false;
@@ -661,9 +666,8 @@ CalendarView::~CalendarView()
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();
Event * test = testlist.first();
while ( test ) {
@@ -740,13 +744,13 @@ void CalendarView::nextConflict( bool all, bool allday )
int hour = conflict.time().hour();
mViewManager->agendaView()->setStartHour( hour );
topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( cE->summary().left( 20 ) ).arg( cE2->summary().left( 20 ) ) );
- block = false;
+ flag_blockConflict = false;
return;
}
topLevelWidget()->setCaption( i18n("No conflict found") );
//qDebug("No conflict found ");
- block = false;
+ flag_blockConflict = false;
return;
}
@@ -780,9 +784,8 @@ void CalendarView::scrollBarValue(int val )
{
#ifdef DESKTOP_VERSION
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();
int day = mNavigator->selectedDates().first().dayOfYear();
int stepdays = val;
@@ -794,13 +797,13 @@ void CalendarView::scrollBarValue(int val )
if ( stepdays < 0 ) stepdays = 0;
}
if ( stepdays == day ) {
- block = false;
+ flag_blockScrollBar = false;
return;
}
int year = mNavigator->selectedDates().first().year();
QDate d ( year,1,1 );
mNavigator->selectDates( d.addDays( stepdays-1) , count );
- block = false;
+ flag_blockScrollBar = false;
#endif
}
@@ -839,9 +842,8 @@ void CalendarView::checkFiles()
message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0);
KMessageBox::error(this,message, i18n("Loading of calendar(s) failed"));
}
- static bool firstTime = true;
- if ( firstTime ) {
- firstTime = false;
+ if ( flag_checkFileFirsttime ) {
+ flag_checkFileFirsttime = false;
QTimer::singleShot( 2000, this, SLOT ( checkAlarms() ));
}
}
@@ -3016,15 +3018,14 @@ void CalendarView::changeEventDisplay(Event *which, int action)
{
// kdDebug() << "CalendarView::changeEventDisplay" << endl;
changeIncidenceDisplay((Incidence *)which, action);
- static bool clearallviews = false;
if ( KOPrefs::instance()->mGlobalUpdateDisabled ) {
- if ( clearallviews ) {
+ if ( flag_clearallviewsEventDisplay ) {
clearAllViews();
- clearallviews = false;
+ flag_clearallviewsEventDisplay = false;
}
return;
}
- clearallviews = true;
+ flag_clearallviewsEventDisplay = true;
mDateNavigator->updateView();
//mDialogManager->updateSearchDialog();
if (which) {
@@ -3177,15 +3178,14 @@ void CalendarView::clearAllViews()
}
void CalendarView::updateView()
{
- static bool clearallviews = false;
if ( KOPrefs::instance()->mGlobalUpdateDisabled ) {
- if ( clearallviews ) {
+ if ( flag_clearallviewsupdateView ) {
clearAllViews();
- clearallviews = false;
+ flag_clearallviewsupdateView = false;
}
return;
}
- clearallviews = true;
+ flag_clearallviewsupdateView = true;
DateList tmpList = mNavigator->selectedDates();
if ( KOPrefs::instance()->mHideNonStartedTodos )