-rw-r--r-- | korganizer/mainwindow.cpp | 23 |
1 files changed, 18 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 | |||
@@ -560,21 +560,20 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
560 | msg = allmsg; | 560 | msg = allmsg; |
561 | allmsg = ""; | 561 | allmsg = ""; |
562 | } else{ | 562 | } else{ |
563 | msg = allmsg.left( nextC ); | 563 | msg = allmsg.left( nextC ); |
564 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); | 564 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); |
565 | } | 565 | } |
566 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); | 566 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); |
567 | if ( msg == "-newEvent" ) { | 567 | if ( msg == "-newEvent" ) { |
568 | mView->newEvent(); | 568 | QTimer::singleShot( 0, mView, SLOT ( newEvent())); |
569 | } | 569 | } |
570 | if ( msg == "-newTodo" ) { | 570 | if ( msg == "-newTodo" ) { |
571 | mView->newTodo(); | 571 | QTimer::singleShot( 0, mView, SLOT ( newTodo())); |
572 | |||
573 | } | 572 | } |
574 | if ( msg == "-showWN" ) { | 573 | if ( msg == "-showWN" ) { |
575 | mView->viewManager()->showWhatsNextView(); | 574 | mView->viewManager()->showWhatsNextView(); |
576 | } | 575 | } |
577 | if ( msg == "-showTodo" ) { | 576 | if ( msg == "-showTodo" ) { |
578 | mView->viewManager()->showTodoView(); | 577 | mView->viewManager()->showTodoView(); |
579 | } | 578 | } |
580 | if ( msg == "-showList" ) { | 579 | if ( msg == "-showList" ) { |
@@ -582,17 +581,17 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
582 | } | 581 | } |
583 | else if ( msg == "-showDay" ) { | 582 | else if ( msg == "-showDay" ) { |
584 | mView->viewManager()->showDayView(); | 583 | mView->viewManager()->showDayView(); |
585 | } | 584 | } |
586 | else if ( msg == "-showWWeek" ) { | 585 | else if ( msg == "-showWWeek" ) { |
587 | mView->viewManager()->showWorkWeekView(); | 586 | mView->viewManager()->showWorkWeekView(); |
588 | } | 587 | } |
589 | else if ( msg == "-ringSync" ) { | 588 | else if ( msg == "-ringSync" ) { |
590 | mSyncManager->multiSync( false ); | 589 | QTimer::singleShot( 0, this, SLOT (startMultiSync())); |
591 | } | 590 | } |
592 | else if ( msg == "-showWeek" ) { | 591 | else if ( msg == "-showWeek" ) { |
593 | mView->viewManager()->showWeekView(); | 592 | mView->viewManager()->showWeekView(); |
594 | } | 593 | } |
595 | else if ( msg == "-showTodo" ) { | 594 | else if ( msg == "-showTodo" ) { |
596 | mView->viewManager()->showTodoView(); | 595 | mView->viewManager()->showTodoView(); |
597 | } | 596 | } |
598 | else if ( msg == "-showJournal" ) { | 597 | else if ( msg == "-showJournal" ) { |
@@ -614,17 +613,31 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
614 | } | 613 | } |
615 | 614 | ||
616 | 615 | ||
617 | } | 616 | } |
618 | 617 | ||
619 | showMaximized(); | 618 | showMaximized(); |
620 | raise(); | 619 | raise(); |
621 | } | 620 | } |
622 | 621 | void MainWindow::startMultiSync() | |
622 | { | ||
623 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); | ||
624 | if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), | ||
625 | question, | ||
626 | i18n("Yes"), i18n("No"), | ||
627 | 0, 0 ) != 0 ) { | ||
628 | setCaption(i18n("Aborted! Nothing synced!")); | ||
629 | return; | ||
630 | } | ||
631 | mSyncManager->multiSync( false ); | ||
632 | #ifndef DESKTOP_VERSION | ||
633 | QCopEnvelope e("QPE/Application/kapi", "doRingSync"); | ||
634 | #endif | ||
635 | } | ||
623 | QPixmap MainWindow::loadPixmap( QString name ) | 636 | QPixmap MainWindow::loadPixmap( QString name ) |
624 | { | 637 | { |
625 | return SmallIcon( name ); | 638 | return SmallIcon( name ); |
626 | 639 | ||
627 | } | 640 | } |
628 | void MainWindow::setUsesBigPixmaps ( bool b ) | 641 | void MainWindow::setUsesBigPixmaps ( bool b ) |
629 | { | 642 | { |
630 | qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); | 643 | qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); |