-rw-r--r-- | korganizer/mainwindow.cpp | 18 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 |
2 files changed, 16 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 @@ -265,7 +265,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); 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(); @@ -1992,13 +1992,25 @@ void MainWindow::exportVCalendar() } } +QString MainWindow::sentSyncFile() +{ +#ifdef DESKTOP_VERSION + return locateLocal( "tmp", "copysynccal.ics" ); +#else + return QString( "/tmp/copysynccal.ics" ); +#endif +} void MainWindow::syncFileRequest() { if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 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 ) { @@ -2006,7 +2018,7 @@ void MainWindow::getFile( bool success ) setCaption( i18n("Error receiving file. Nothing changed!") ); return; } - mView->openCalendar( defaultFileName() ); + mView->openCalendar( sentSyncFile() ); if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { mSyncManager->slotSyncMenu( 999 ); } diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 5b9f903..5808700 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -103,6 +103,7 @@ class MainWindow : public QMainWindow void syncFileRequest(); protected: + QString sentSyncFile(); void displayText( QString, QString); void enableIncidenceActions( bool ); |