From 77aa480c9891a90c9b492618ebfd2b20f2d0727a Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 29 Jun 2005 16:14:46 +0000 Subject: many sync fixes --- (limited to 'korganizer/mainwindow.cpp') diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 68233e8..d8373a6 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -565,11 +565,10 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) } //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); if ( msg == "-newEvent" ) { - mView->newEvent(); + QTimer::singleShot( 0, mView, SLOT ( newEvent())); } if ( msg == "-newTodo" ) { - mView->newTodo(); - + QTimer::singleShot( 0, mView, SLOT ( newTodo())); } if ( msg == "-showWN" ) { mView->viewManager()->showWhatsNextView(); @@ -587,7 +586,7 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) mView->viewManager()->showWorkWeekView(); } else if ( msg == "-ringSync" ) { - mSyncManager->multiSync( false ); + QTimer::singleShot( 0, this, SLOT (startMultiSync())); } else if ( msg == "-showWeek" ) { mView->viewManager()->showWeekView(); @@ -619,7 +618,21 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) showMaximized(); raise(); } - +void MainWindow::startMultiSync() +{ + QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); + if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), + question, + i18n("Yes"), i18n("No"), + 0, 0 ) != 0 ) { + setCaption(i18n("Aborted! Nothing synced!")); + return; + } + mSyncManager->multiSync( false ); +#ifndef DESKTOP_VERSION + QCopEnvelope e("QPE/Application/kapi", "doRingSync"); +#endif +} QPixmap MainWindow::loadPixmap( QString name ) { return SmallIcon( name ); -- cgit v0.9.0.2