-rw-r--r-- | korganizer/mainwindow.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index c7ce8cb..2d17986 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1379,21 +1379,19 @@ void MainWindow::save() | |||
1379 | if ( mSyncManager->blockSave() ) | 1379 | if ( mSyncManager->blockSave() ) |
1380 | return; | 1380 | return; |
1381 | mSyncManager->setBlockSave(true); | 1381 | mSyncManager->setBlockSave(true); |
1382 | if ( mView->checkFileVersion( defaultFileName()) ) { | 1382 | if ( mView->checkFileVersion( defaultFileName()) ) { |
1383 | 1383 | ||
1384 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 1384 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
1385 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); | 1385 | setCaption(i18n("KO/Pi:Saving Data to File ..." )); |
1386 | qDebug("KO: Start saving data to file!"); | 1386 | qDebug("KO: Start saving data to file!"); |
1387 | mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); | ||
1388 | mView->saveCalendar( defaultFileName() ); | 1387 | mView->saveCalendar( defaultFileName() ); |
1389 | 1388 | ||
1390 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 1389 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
1391 | mView->watchSavedFile(); | ||
1392 | qDebug("KO: Needed %d ms for saving.",msNeeded ); | 1390 | qDebug("KO: Needed %d ms for saving.",msNeeded ); |
1393 | QString savemes; | 1391 | QString savemes; |
1394 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); | 1392 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); |
1395 | setCaption(savemes); | 1393 | setCaption(savemes); |
1396 | } else | 1394 | } else |
1397 | setCaption(i18n("Saving cancelled!")); | 1395 | setCaption(i18n("Saving cancelled!")); |
1398 | mCalendarModifiedFlag = false; | 1396 | mCalendarModifiedFlag = false; |
1399 | mSyncManager->setBlockSave( false ); | 1397 | mSyncManager->setBlockSave( false ); |
@@ -1816,20 +1814,18 @@ void MainWindow::syncFileRequest() | |||
1816 | save(); | 1814 | save(); |
1817 | } | 1815 | } |
1818 | void MainWindow::getFile( bool success ) | 1816 | void MainWindow::getFile( bool success ) |
1819 | { | 1817 | { |
1820 | if ( ! success ) { | 1818 | if ( ! success ) { |
1821 | setCaption( i18n("Error receiving file. Nothing changed!") ); | 1819 | setCaption( i18n("Error receiving file. Nothing changed!") ); |
1822 | return; | 1820 | return; |
1823 | } | 1821 | } |
1824 | mView->watchSavedFile(); | ||
1825 | mView->openCalendar( defaultFileName() ); | 1822 | mView->openCalendar( defaultFileName() ); |
1826 | setCaption( i18n("Pi-Sync successful!") ); | 1823 | setCaption( i18n("Pi-Sync successful!") ); |
1827 | |||
1828 | } | 1824 | } |
1829 | 1825 | ||
1830 | void MainWindow::printSel( ) | 1826 | void MainWindow::printSel( ) |
1831 | { | 1827 | { |
1832 | mView->viewManager()->agendaView()->agenda()->printSelection(); | 1828 | mView->viewManager()->agendaView()->agenda()->printSelection(); |
1833 | } | 1829 | } |
1834 | 1830 | ||
1835 | void MainWindow::printCal() | 1831 | void MainWindow::printCal() |