summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Unidiff
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 ) :
374 374
375 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); 375 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
376 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); 376 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
377 connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); 377 connect(mSyncManager , SIGNAL( request_file(const QString &) ), this, SLOT( syncFileRequest(const QString &) ) );
378 connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); 378 connect(mSyncManager , SIGNAL( getFile( bool, const QString &)), this, SLOT(getFile( bool,const QString & ) ) );
379 connect(mSyncManager , SIGNAL( multiResourceSyncStart( bool )), mView, SLOT( multiResourceSyncStart( bool ) ) );
380
379 mSyncManager->setDefaultFileName( sentSyncFile()); 381 mSyncManager->setDefaultFileName( sentSyncFile());
380 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); 382 connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
381 mSyncManager->fillSyncMenu(); 383 mSyncManager->fillSyncMenu();
@@ -2704,7 +2706,7 @@ QString MainWindow::sentSyncFile()
2704#endif 2706#endif
2705} 2707}
2706 2708
2707void MainWindow::syncFileRequest() 2709void MainWindow::syncFileRequest(const QString& resource)
2708{ 2710{
2709 while ( mSyncManager->blockSave() ) { 2711 while ( mSyncManager->blockSave() ) {
2710 qApp->processEvents(); 2712 qApp->processEvents();
@@ -2716,18 +2718,18 @@ void MainWindow::syncFileRequest()
2716 } 2718 }
2717 2719
2718 setCaption(i18n("Saving Data to temp file ..." )); 2720 setCaption(i18n("Saving Data to temp file ..." ));
2719 mView->saveCalendar( sentSyncFile() ); 2721 mView->saveCalendarResource( sentSyncFile(), resource );
2720 setCaption(i18n("Data saved to temp file!" )); 2722 setCaption(i18n("Data saved to temp file!" ));
2721 mSyncManager->setBlockSave( false ); 2723 mSyncManager->setBlockSave( false );
2722 2724
2723} 2725}
2724void MainWindow::getFile( bool success ) 2726void MainWindow::getFile( bool success ,const QString& resource)
2725{ 2727{
2726 if ( ! success ) { 2728 if ( ! success ) {
2727 setCaption( i18n("Error receiving file. Nothing changed!") ); 2729 setCaption( i18n("Error receiving file. Nothing changed!") );
2728 return; 2730 return;
2729 } 2731 }
2730 mView->mergeFile( sentSyncFile() ); 2732 mView->mergeFileResource( sentSyncFile(), resource);
2731 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2733 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2732 mSyncManager->slotSyncMenu( 999 ); 2734 mSyncManager->slotSyncMenu( 999 );
2733 } 2735 }