From a9eff860d8399a198a9fdc04e09ed369097fc745 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 09 Feb 2005 19:31:50 +0000 Subject: fixes --- (limited to 'korganizer/mainwindow.cpp') 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 ); } -- cgit v0.9.0.2