From 279e183c0325cd9565605f60af0215bb9bfdc825 Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 25 Nov 2005 17:41:25 +0000 Subject: sync --- (limited to 'korganizer/mainwindow.cpp') 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 ); } -- cgit v0.9.0.2