-rw-r--r-- | korganizer/mainwindow.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 9ad0694..eed023c 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1762,20 +1762,19 @@ void MainWindow::saveOnClose() | |||
1762 | if ( filterToolBar ) { | 1762 | if ( filterToolBar ) { |
1763 | if ( p->mToolBarHorF ) | 1763 | if ( p->mToolBarHorF ) |
1764 | p->mToolBarUpF = filterToolBar->y() > height()/2; | 1764 | p->mToolBarUpF = filterToolBar->y() > height()/2; |
1765 | else | 1765 | else |
1766 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; | 1766 | p->mToolBarUpF = filterToolBar->x() > width()/2 ; |
1767 | } | 1767 | } |
1768 | #endif | 1768 | #endif |
1769 | 1769 | ||
1770 | |||
1771 | mView->writeSettings(); | ||
1772 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) | 1770 | if ( mCalendarModifiedFlag || mView->checkFileChanged( defaultFileName())) |
1773 | save(); | 1771 | save(); |
1772 | mView->writeSettings(); | ||
1774 | } | 1773 | } |
1775 | void MainWindow::slotModifiedChanged( bool changed ) | 1774 | void MainWindow::slotModifiedChanged( bool changed ) |
1776 | { | 1775 | { |
1777 | if ( mBlockAtStartup ) | 1776 | if ( mBlockAtStartup ) |
1778 | return; | 1777 | return; |
1779 | 1778 | ||
1780 | int msec; | 1779 | int msec; |
1781 | // we store the changes after 1 minute, | 1780 | // we store the changes after 1 minute, |
@@ -1807,17 +1806,17 @@ void MainWindow::save() | |||
1807 | int daysTo = reference.daysTo ( QDate::currentDate() ); | 1806 | int daysTo = reference.daysTo ( QDate::currentDate() ); |
1808 | if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { | 1807 | if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { |
1809 | setCaption(i18n("KO/Pi:Creating backup ... please wait ..." )); | 1808 | setCaption(i18n("KO/Pi:Creating backup ... please wait ..." )); |
1810 | qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); | 1809 | qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); |
1811 | // we need the file path, the backup dir and the number of bups as param | 1810 | // we need the file path, the backup dir and the number of bups as param |
1812 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; | 1811 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; |
1813 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) | 1812 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) |
1814 | bupDir = KGlobalSettings::backupDataDir(); | 1813 | bupDir = KGlobalSettings::backupDataDir(); |
1815 | int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );//55;//call backup | 1814 | int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); |
1816 | if ( retval == 0 ) { | 1815 | if ( retval == 0 ) { |
1817 | qDebug("KO: Backup cancelled. Will try again tomorrow "); | 1816 | qDebug("KO: Backup cancelled. Will try again tomorrow "); |
1818 | // retval == 0 : backup skipped for today, try again tomorrow | 1817 | // retval == 0 : backup skipped for today, try again tomorrow |
1819 | KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; | 1818 | KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; |
1820 | } else if ( retval == 1 ){ | 1819 | } else if ( retval == 1 ){ |
1821 | qDebug("KO: Backup created."); | 1820 | qDebug("KO: Backup created."); |
1822 | // backup ok | 1821 | // backup ok |
1823 | KOPrefs::instance()->mLastBackupDate = daysTo; | 1822 | KOPrefs::instance()->mLastBackupDate = daysTo; |