-rw-r--r-- | korganizer/mainwindow.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 468fd5b..18a4b12 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -266,5 +266,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); - mSyncManager->setDefaultFileName( defaultFileName()); + mSyncManager->setDefaultFileName( sentSyncFile()); connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); mSyncManager->fillSyncMenu(); @@ -1993,4 +1993,12 @@ void MainWindow::exportVCalendar() } +QString MainWindow::sentSyncFile() +{ +#ifdef DESKTOP_VERSION + return locateLocal( "tmp", "copysynccal.ics" ); +#else + return QString( "/tmp/copysynccal.ics" ); +#endif +} void MainWindow::syncFileRequest() @@ -1999,5 +2007,9 @@ void MainWindow::syncFileRequest() mSyncManager->slotSyncMenu( 999 ); } - save(); + + setCaption(i18n("Saving Data to temp file ..." )); + mView->saveCalendar( sentSyncFile() ); + setCaption(i18n("Data saved to temp file!" )); + } void MainWindow::getFile( bool success ) @@ -2007,5 +2019,5 @@ void MainWindow::getFile( bool success ) return; } - mView->openCalendar( defaultFileName() ); + mView->openCalendar( sentSyncFile() ); if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { mSyncManager->slotSyncMenu( 999 ); |