author | zautrix <zautrix> | 2005-07-29 21:08:59 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-29 21:08:59 (UTC) |
commit | 9cbd19485635dc0edacd14403e4c63d6d469bfce (patch) (side-by-side diff) | |
tree | b3d5a580428ac4ed0b0a7b92149438baf8a66846 | |
parent | e287df45507793e2e5ad16085a858153f3798941 (diff) | |
download | kdepimpi-9cbd19485635dc0edacd14403e4c63d6d469bfce.zip kdepimpi-9cbd19485635dc0edacd14403e4c63d6d469bfce.tar.gz kdepimpi-9cbd19485635dc0edacd14403e4c63d6d469bfce.tar.bz2 |
fixx
-rw-r--r-- | korganizer/mainwindow.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 7ce0251..45775c5 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1970,32 +1970,33 @@ void MainWindow::backupAllFiles() qDebug("KO: Backup globally cancelled."); // backup globally cancelled KPimGlobalPrefs::instance()->mBackupEnabled = false; } // retval == 3: do nothing, try again later } void MainWindow::save() { if ( mView->viewManager()->journalView() ) mView->viewManager()->journalView()->checkModified(); if ( !mCalendarModifiedFlag ) { qDebug("KO: Calendar not modified. Nothing saved."); return; } if ( mSyncManager->blockSave() ) { + slotModifiedChanged( true ); return; } mSyncManager->setBlockSave(true); if ( mView->checkAllFileVersions() ) { if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ QDate reference ( 2000,1,1); int daysTo = reference.daysTo ( QDate::currentDate() ); if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { backupAllFiles(); } ; // KPimGlobalPrefs::instance()->mLastBackupDate } QTime neededSaveTime = QDateTime::currentDateTime().time(); if ( !isMinimized () ) setCaption(i18n("KO/Pi:Saving Data to File ..." )); qDebug("KO: Start saving data to file!"); @@ -2546,39 +2547,45 @@ void MainWindow::exportVCalendar() setCaption(mes); } } } QString MainWindow::sentSyncFile() { #ifdef DESKTOP_VERSION return locateLocal( "tmp", "copysynccal.ics" ); #else return QString( "/tmp/copysynccal.ics" ); #endif } void MainWindow::syncFileRequest() { + while ( mSyncManager->blockSave() ) { + qApp->processEvents(); + } + mSyncManager->setBlockSave(true); + if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { mSyncManager->slotSyncMenu( 999 ); } setCaption(i18n("Saving Data to temp file ..." )); mView->saveCalendar( sentSyncFile() ); setCaption(i18n("Data saved to temp file!" )); + mSyncManager->setBlockSave( false ); } void MainWindow::getFile( bool success ) { if ( ! success ) { setCaption( i18n("Error receiving file. Nothing changed!") ); return; } mView->mergeFile( sentSyncFile() ); if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { mSyncManager->slotSyncMenu( 999 ); } setCaption( i18n("Pi-Sync successful!") ); } void MainWindow::printListView() { |