summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 66bb19b..69ccde1 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -374,8 +374,10 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
- connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
- connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
+ connect(mSyncManager , SIGNAL( request_file(const QString &) ), this, SLOT( syncFileRequest(const QString &) ) );
+ connect(mSyncManager , SIGNAL( getFile( bool, const QString &)), this, SLOT(getFile( bool,const QString & ) ) );
+ connect(mSyncManager , SIGNAL( multiResourceSyncStart( bool )), mView, SLOT( multiResourceSyncStart( bool ) ) );
+
mSyncManager->setDefaultFileName( sentSyncFile());
connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
mSyncManager->fillSyncMenu();
@@ -2704,7 +2706,7 @@ QString MainWindow::sentSyncFile()
#endif
}
-void MainWindow::syncFileRequest()
+void MainWindow::syncFileRequest(const QString& resource)
{
while ( mSyncManager->blockSave() ) {
qApp->processEvents();
@@ -2716,18 +2718,18 @@ void MainWindow::syncFileRequest()
}
setCaption(i18n("Saving Data to temp file ..." ));
- mView->saveCalendar( sentSyncFile() );
+ mView->saveCalendarResource( sentSyncFile(), resource );
setCaption(i18n("Data saved to temp file!" ));
mSyncManager->setBlockSave( false );
}
-void MainWindow::getFile( bool success )
+void MainWindow::getFile( bool success ,const QString& resource)
{
if ( ! success ) {
setCaption( i18n("Error receiving file. Nothing changed!") );
return;
}
- mView->mergeFile( sentSyncFile() );
+ mView->mergeFileResource( sentSyncFile(), resource);
if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
mSyncManager->slotSyncMenu( 999 );
}