author | zautrix <zautrix> | 2005-11-25 17:41:25 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-11-25 17:41:25 (UTC) |
commit | 279e183c0325cd9565605f60af0215bb9bfdc825 (patch) (side-by-side diff) | |
tree | 43ab776cd108874819e7c6e73070a7d989a9078f /korganizer/mainwindow.cpp | |
parent | 794a5204686ad9bfc16172b01db35f1f3b7683e5 (diff) | |
download | kdepimpi-279e183c0325cd9565605f60af0215bb9bfdc825.zip kdepimpi-279e183c0325cd9565605f60af0215bb9bfdc825.tar.gz kdepimpi-279e183c0325cd9565605f60af0215bb9bfdc825.tar.bz2 |
sync
-rw-r--r-- | korganizer/mainwindow.cpp | 14 |
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 @@ -361,34 +361,36 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : connect( mView, SIGNAL( tempDisableBR(bool) ), SLOT( disableBR(bool) ) ); connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); setCentralWidget( mView ); globalFlagBlockStartup = 0; //mView->show(); //delete splash; if ( newFile ) mView->updateConfig(); // qApp->processEvents(); //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); //fillSyncMenu(); 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(); mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); if ( showWarning ) { KMessageBox::information( this, "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); //qApp->processEvents(); mView->dialogManager()->showSyncOptions(); } //US listen for result adressed from Ka/Pi @@ -2691,56 +2693,56 @@ void MainWindow::exportICalendar() { exportCalendar( true ); } void MainWindow::exportVCalendar() { exportCalendar( false ); } QString MainWindow::sentSyncFile() { #ifdef DESKTOP_VERSION return QDir::convertSeparators( locateLocal( "tmp", "copysynccal.ics" ) ); #else return QString( "/tmp/copysynccal.ics" ); #endif } -void MainWindow::syncFileRequest() +void MainWindow::syncFileRequest(const QString& resource) { while ( mSyncManager->blockSave() ) { qApp->processEvents(); } mSyncManager->setBlockSave(true); if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { mSyncManager->slotSyncMenu( 999 ); } 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 ); } setCaption( i18n("Pi-Sync successful!") ); } void MainWindow::printListView() { QString message = i18n("You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items."); KMessageBox::information( this, message); } void MainWindow::printSel( ) { mView->viewManager()->agendaView()->agenda()->printSelection(); } |