summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Unidiff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 279955f..77d0ac8 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1913,8 +1913,12 @@ void MainWindow::slotModifiedChanged( bool )
1913 if ( mBlockAtStartup ) 1913 if ( mBlockAtStartup )
1914 return; 1914 return;
1915 1915
1916 int msec; 1916 int msec;
1917 if ( mCalendarModifiedFlag ) {
1918 //qDebug(" MainWindow timer is running ");
1919 return;
1920 }
1917 // we store the changes after 1 minute, 1921 // we store the changes after 1 minute,
1918 // and for safety reasons after 10 minutes again 1922 // and for safety reasons after 10 minutes again
1919 if ( !mSyncManager->blockSave() ) 1923 if ( !mSyncManager->blockSave() )
1920 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; 1924 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000;
@@ -1974,10 +1978,11 @@ void MainWindow::save()
1974 if ( !mCalendarModifiedFlag ) { 1978 if ( !mCalendarModifiedFlag ) {
1975 qDebug("KO: Calendar not modified. Nothing saved."); 1979 qDebug("KO: Calendar not modified. Nothing saved.");
1976 return; 1980 return;
1977 } 1981 }
1978 if ( mSyncManager->blockSave() ) 1982 if ( mSyncManager->blockSave() ) {
1979 return; 1983 return;
1984 }
1980 mSyncManager->setBlockSave(true); 1985 mSyncManager->setBlockSave(true);
1981 if ( mView->checkAllFileVersions() ) { 1986 if ( mView->checkAllFileVersions() ) {
1982 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ 1987 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){
1983 QDate reference ( 2000,1,1); 1988 QDate reference ( 2000,1,1);
@@ -2000,10 +2005,13 @@ void MainWindow::save()
2000 if ( !isMinimized () ) 2005 if ( !isMinimized () )
2001 setCaption(savemes); 2006 setCaption(savemes);
2002 else 2007 else
2003 qDebug(savemes); 2008 qDebug(savemes);
2004 } else 2009 } else {
2005 setCaption(i18n("Saving cancelled!")); 2010 setCaption(i18n("Saving cancelled!"));
2011 mCalendarModifiedFlag = false;
2012 slotModifiedChanged( true );
2013 }
2006 mSyncManager->setBlockSave( false ); 2014 mSyncManager->setBlockSave( false );
2007} 2015}
2008 2016
2009void MainWindow::keyReleaseEvent ( QKeyEvent * e) 2017void MainWindow::keyReleaseEvent ( QKeyEvent * e)