-rw-r--r-- | korganizer/mainwindow.cpp | 23 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 |
2 files changed, 19 insertions, 5 deletions
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 ); diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index c9817c3..a4d0523 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -52,6 +52,7 @@ class MainWindow : public QMainWindow void configureAgenda( int ); void recieve( const QCString& msg, const QByteArray& data ); protected slots: + void startMultiSync(); void setCaptionToDates(); void weekAction(); void about(); |