author | zautrix <zautrix> | 2005-07-26 15:43:00 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-26 15:43:00 (UTC) |
commit | d0fe94073aa3209532952c944b41bccfb4341a8d (patch) (side-by-side diff) | |
tree | abab8e118a2661847c65715b9c68e5d3b9ac97e6 | |
parent | e1d72bb77c51ff7313b390f263bc1f10d20123b0 (diff) | |
download | kdepimpi-d0fe94073aa3209532952c944b41bccfb4341a8d.zip kdepimpi-d0fe94073aa3209532952c944b41bccfb4341a8d.tar.gz kdepimpi-d0fe94073aa3209532952c944b41bccfb4341a8d.tar.bz2 |
fixxx
-rw-r--r-- | korganizer/calendarview.cpp | 19 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 12 |
2 files changed, 20 insertions, 11 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 3ab4bb4..a76f2ed 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -371,5 +371,5 @@ void CalendarView::init() mViewerCallerIsSearchDialog = false; mBlockShowDates = false; - + mConflictingEvent = 0; mDatePickerMode = 0; mCurrentSyncDevice = ""; @@ -2794,7 +2794,8 @@ void CalendarView::checkConflictForEvent() return; if ( ! mConflictingEvent ) return; - QDateTime current = QDateTime::currentDateTime(); - if ( ! mConflictingEvent->matchTime( ¤t, 0 ) ) { + Event * conflictingEvent = mConflictingEvent; mConflictingEvent = 0; + QDateTime current = QDateTime::currentDateTime(); + if ( ! conflictingEvent->matchTime( ¤t, 0 ) ) { return; } @@ -2814,5 +2815,5 @@ void CalendarView::checkConflictForEvent() skip = !test->matchTime( ¤t, 0 ); if ( !skip && !test->doesFloat() ) { - if ( mConflictingEvent->isOverlapping ( test, &retVal, ¤t ) ) { + if ( conflictingEvent->isOverlapping ( test, &retVal, ¤t ) ) { if ( ! found ) { conflict = retVal; @@ -2831,5 +2832,5 @@ void CalendarView::checkConflictForEvent() topLevelWidget()->setCaption( i18n("KO/Pi") ); if ( found ) { - QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( mConflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ; + QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( conflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ; qApp->processEvents(); int km = KMessageBox::warningContinueCancel(this,mess, @@ -2843,8 +2844,7 @@ void CalendarView::checkConflictForEvent() int hour = conflict.time().hour(); mViewManager->agendaView()->setStartHour( hour ); - topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( mConflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) ); + topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( conflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) ); } else topLevelWidget()->setCaption( i18n("No conflict found") ); - mConflictingEvent = 0; return; @@ -4093,10 +4093,11 @@ void CalendarView::openAddressbook() void CalendarView::setModified(bool modified) { + //qDebug("CalendarView::setModified %d ", modified); if ( modified ) emit signalmodified(); - if (mModified != modified) { mModified = modified; + if ( mModified ) emit modifiedChanged(mModified); - } + } diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 279955f..77d0ac8 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1915,4 +1915,8 @@ void MainWindow::slotModifiedChanged( bool ) int msec; + if ( mCalendarModifiedFlag ) { + //qDebug(" MainWindow timer is running "); + return; + } // we store the changes after 1 minute, // and for safety reasons after 10 minutes again @@ -1976,6 +1980,7 @@ void MainWindow::save() return; } - if ( mSyncManager->blockSave() ) + if ( mSyncManager->blockSave() ) { return; + } mSyncManager->setBlockSave(true); if ( mView->checkAllFileVersions() ) { @@ -2002,6 +2007,9 @@ void MainWindow::save() else qDebug(savemes); - } else + } else { setCaption(i18n("Saving cancelled!")); + mCalendarModifiedFlag = false; + slotModifiedChanged( true ); + } mSyncManager->setBlockSave( false ); } |