-rw-r--r-- | korganizer/mainwindow.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 1776dcc..883a9d1 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -575,127 +575,124 @@ void MainWindow::closeEvent( QCloseEvent* ce ) | |||
575 | 575 | ||
576 | default: | 576 | default: |
577 | break; | 577 | break; |
578 | } | 578 | } |
579 | 579 | ||
580 | 580 | ||
581 | } | 581 | } |
582 | void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) | 582 | void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) |
583 | { | 583 | { |
584 | qDebug("KO: QCOP start message received: %s ", cmsg.data() ); | 584 | qDebug("KO: QCOP start message received: %s ", cmsg.data() ); |
585 | mCStringMess = cmsg; | 585 | mCStringMess = cmsg; |
586 | mByteData = data; | 586 | mByteData = data; |
587 | } | 587 | } |
588 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | 588 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) |
589 | { | 589 | { |
590 | QDataStream stream( data, IO_ReadOnly ); | 590 | QDataStream stream( data, IO_ReadOnly ); |
591 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); | 591 | // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); |
592 | //QString datamess; | 592 | //QString datamess; |
593 | //qDebug("message "); | 593 | //qDebug("message "); |
594 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); | 594 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); |
595 | 595 | ||
596 | if ( cmsg == "setDocument(QString)" ) { | 596 | if ( cmsg == "setDocument(QString)" ) { |
597 | QDataStream stream( data, IO_ReadOnly ); | 597 | QDataStream stream( data, IO_ReadOnly ); |
598 | QString fileName; | 598 | QString fileName; |
599 | stream >> fileName; | 599 | stream >> fileName; |
600 | //qDebug("filename %s ", fileName.latin1()); | 600 | //qDebug("filename %s ", fileName.latin1()); |
601 | showMaximized(); | 601 | showMaximized(); |
602 | raise(); | 602 | raise(); |
603 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; | 603 | KOPrefs::instance()->mLastSyncedLocalFile = fileName ; |
604 | mSyncManager->slotSyncMenu( 1002 ); | 604 | mSyncManager->slotSyncMenu( 1002 ); |
605 | return; | 605 | return; |
606 | } | 606 | } |
607 | 607 | ||
608 | if ( cmsg == "-writeFile" ) { | 608 | if ( cmsg == "-writeFile" ) { |
609 | // I made from the "-writeFile" an "-writeAlarm" | 609 | // I made from the "-writeFile" an "-writeAlarm" |
610 | mView->viewManager()->showWhatsNextView(); | 610 | mView->viewManager()->showWhatsNextView(); |
611 | mCalendar->checkAlarmForIncidence( 0, true); | 611 | mCalendar->checkAlarmForIncidence( 0, true); |
612 | showMaximized(); | 612 | showMaximized(); |
613 | raise(); | 613 | raise(); |
614 | return; | 614 | return; |
615 | 615 | ||
616 | } | 616 | } |
617 | if ( cmsg == "-writeFileSilent" ) { | 617 | if ( cmsg == "-writeFileSilent" ) { |
618 | // I made from the "-writeFile" an "-writeAlarm" | 618 | // I made from the "-writeFile" an "-writeAlarm" |
619 | // mView->viewManager()->showWhatsNextView(); | 619 | // mView->viewManager()->showWhatsNextView(); |
620 | mCalendar->checkAlarmForIncidence( 0, true); | 620 | mCalendar->checkAlarmForIncidence( 0, true); |
621 | //showMaximized(); | 621 | //showMaximized(); |
622 | //raise(); | 622 | //raise(); |
623 | hide(); | 623 | //hide(); |
624 | return; | 624 | return; |
625 | } | 625 | } |
626 | if ( cmsg == "-newCountdown" ) { | 626 | if ( cmsg == "-newCountdown" ) { |
627 | qDebug("newCountdown "); | 627 | qDebug("newCountdown "); |
628 | 628 | ||
629 | } | 629 | } |
630 | QString msg ; | 630 | QString msg ; |
631 | QString allmsg = cmsg; | 631 | QString allmsg = cmsg; |
632 | while ( allmsg.length() > 0 ) { | 632 | while ( allmsg.length() > 0 ) { |
633 | int nextC = allmsg.find( "-", 1 ); | 633 | int nextC = allmsg.find( "-", 1 ); |
634 | if ( nextC == -1 ) { | 634 | if ( nextC == -1 ) { |
635 | msg = allmsg; | 635 | msg = allmsg; |
636 | allmsg = ""; | 636 | allmsg = ""; |
637 | } else{ | 637 | } else{ |
638 | msg = allmsg.left( nextC ); | 638 | msg = allmsg.left( nextC ); |
639 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); | 639 | allmsg = allmsg.mid( nextC, allmsg.length()-nextC ); |
640 | } | 640 | } |
641 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); | 641 | //qDebug("msg: %s all: %s ", msg.latin1(), allmsg.latin1() ); |
642 | if ( msg == "-newEvent" ) { | 642 | if ( msg == "-newEvent" ) { |
643 | QTimer::singleShot( 0, mView, SLOT ( newEvent())); | 643 | QTimer::singleShot( 0, mView, SLOT ( newEvent())); |
644 | } | 644 | } |
645 | if ( msg == "-newTodo" ) { | 645 | if ( msg == "-newTodo" ) { |
646 | QTimer::singleShot( 0, mView, SLOT ( newTodo())); | 646 | QTimer::singleShot( 0, mView, SLOT ( newTodo())); |
647 | } | 647 | } |
648 | if ( msg == "-showWN" ) { | 648 | if ( msg == "-showWN" ) { |
649 | mView->viewManager()->showWhatsNextView(); | 649 | mView->viewManager()->showWhatsNextView(); |
650 | } | 650 | } |
651 | if ( msg == "-showTodo" ) { | ||
652 | mView->viewManager()->showTodoView(); | ||
653 | } | ||
654 | if ( msg == "-showList" ) { | 651 | if ( msg == "-showList" ) { |
655 | mView->viewManager()->showListView(); | 652 | mView->viewManager()->showListView(); |
656 | } | 653 | } |
657 | else if ( msg == "-showDay" ) { | 654 | else if ( msg == "-showDay" ) { |
658 | mView->viewManager()->showDayView(); | 655 | mView->viewManager()->showDayView(); |
659 | } | 656 | } |
660 | else if ( msg == "-showWWeek" ) { | 657 | else if ( msg == "-showWWeek" ) { |
661 | mView->viewManager()->showWorkWeekView(); | 658 | mView->viewManager()->showWorkWeekView(); |
662 | } | 659 | } |
663 | else if ( msg == "-ringSync" ) { | 660 | else if ( msg == "-ringSync" ) { |
664 | QTimer::singleShot( 0, this, SLOT (startMultiSync())); | 661 | QTimer::singleShot( 0, this, SLOT (startMultiSync())); |
665 | } | 662 | } |
666 | else if ( msg == "-showWeek" ) { | 663 | else if ( msg == "-showWeek" ) { |
667 | mView->viewManager()->showWeekView(); | 664 | mView->viewManager()->showWeekView(); |
668 | } | 665 | } |
669 | else if ( msg == "-showTodo" ) { | 666 | else if ( msg == "-showTodo" ) { |
670 | mView->viewManager()->showTodoView(); | 667 | mView->viewManager()->showTodoView(); |
671 | } | 668 | } |
672 | else if ( msg == "-showJournal" ) { | 669 | else if ( msg == "-showJournal" ) { |
673 | mView->dateNavigator()->selectDates( 1 ); | 670 | mView->dateNavigator()->selectDates( 1 ); |
674 | mView->dateNavigator()->selectToday(); | 671 | mView->dateNavigator()->selectToday(); |
675 | mView->viewManager()->showJournalView(); | 672 | mView->viewManager()->showJournalView(); |
676 | } | 673 | } |
677 | else if ( msg == "-showKO" ) { | 674 | else if ( msg == "-showKO" ) { |
678 | mView->viewManager()->showNextXView(); | 675 | mView->viewManager()->showNextXView(); |
679 | } | 676 | } |
680 | else if ( msg == "-showWNext" ) { | 677 | else if ( msg == "-showWNext" ) { |
681 | mView->viewManager()->showWhatsNextView(); | 678 | mView->viewManager()->showWhatsNextView(); |
682 | } | 679 | } |
683 | else if ( msg == "nextView()" ) { | 680 | else if ( msg == "nextView()" ) { |
684 | mView->viewManager()->showNextView(); | 681 | mView->viewManager()->showNextView(); |
685 | } | 682 | } |
686 | else if ( msg == "-showNextXView" ) { | 683 | else if ( msg == "-showNextXView" ) { |
687 | mView->viewManager()->showNextXView(); | 684 | mView->viewManager()->showNextXView(); |
688 | } | 685 | } |
689 | 686 | ||
690 | 687 | ||
691 | } | 688 | } |
692 | 689 | ||
693 | showMaximized(); | 690 | showMaximized(); |
694 | raise(); | 691 | raise(); |
695 | } | 692 | } |
696 | void MainWindow::startMultiSync() | 693 | void MainWindow::startMultiSync() |
697 | { | 694 | { |
698 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); | 695 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); |
699 | if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), | 696 | if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), |
700 | question, | 697 | question, |
701 | i18n("Yes"), i18n("No"), | 698 | i18n("Yes"), i18n("No"), |