-rw-r--r-- | korganizer/mainwindow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 6bc5b3a..def8431 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -657,384 +657,388 @@ void MainWindow::initActions() | |||
657 | 657 | ||
658 | icon = loadPixmap( pathString + "todo" ); | 658 | icon = loadPixmap( pathString + "todo" ); |
659 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 659 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
660 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 660 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
661 | todoview_action->addTo( viewMenu ); | 661 | todoview_action->addTo( viewMenu ); |
662 | connect( todoview_action, SIGNAL( activated() ), | 662 | connect( todoview_action, SIGNAL( activated() ), |
663 | mView->viewManager(), SLOT( showTodoView() ) ); | 663 | mView->viewManager(), SLOT( showTodoView() ) ); |
664 | 664 | ||
665 | icon = loadPixmap( pathString + "journal" ); | 665 | icon = loadPixmap( pathString + "journal" ); |
666 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 666 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
667 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 667 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
668 | viewjournal_action->addTo( viewMenu ); | 668 | viewjournal_action->addTo( viewMenu ); |
669 | connect( viewjournal_action, SIGNAL( activated() ), | 669 | connect( viewjournal_action, SIGNAL( activated() ), |
670 | mView->viewManager(), SLOT( showJournalView() ) ); | 670 | mView->viewManager(), SLOT( showJournalView() ) ); |
671 | 671 | ||
672 | icon = loadPixmap( pathString + "xdays" ); | 672 | icon = loadPixmap( pathString + "xdays" ); |
673 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); | 673 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); |
674 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 674 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
675 | xdays_action->addTo( viewMenu ); | 675 | xdays_action->addTo( viewMenu ); |
676 | connect( xdays_action, SIGNAL( activated() ), | 676 | connect( xdays_action, SIGNAL( activated() ), |
677 | mView->viewManager(), SLOT( showNextXView() ) ); | 677 | mView->viewManager(), SLOT( showNextXView() ) ); |
678 | 678 | ||
679 | icon = loadPixmap( pathString + "whatsnext" ); | 679 | icon = loadPixmap( pathString + "whatsnext" ); |
680 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); | 680 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); |
681 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 681 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
682 | whatsnext_action->addTo( viewMenu ); | 682 | whatsnext_action->addTo( viewMenu ); |
683 | connect( whatsnext_action, SIGNAL( activated() ), | 683 | connect( whatsnext_action, SIGNAL( activated() ), |
684 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 684 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
685 | 685 | ||
686 | #if 0 | 686 | #if 0 |
687 | action = new QAction( "view_timespan", "Time Span", 0, this ); | 687 | action = new QAction( "view_timespan", "Time Span", 0, this ); |
688 | action->addTo( viewMenu ); | 688 | action->addTo( viewMenu ); |
689 | connect( action, SIGNAL( activated() ), | 689 | connect( action, SIGNAL( activated() ), |
690 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 690 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
691 | #endif | 691 | #endif |
692 | 692 | ||
693 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 693 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, |
694 | this ); | 694 | this ); |
695 | mNewSubTodoAction->addTo( actionMenu ); | 695 | mNewSubTodoAction->addTo( actionMenu ); |
696 | connect( mNewSubTodoAction, SIGNAL( activated() ), | 696 | connect( mNewSubTodoAction, SIGNAL( activated() ), |
697 | mView, SLOT( newSubTodo() ) ); | 697 | mView, SLOT( newSubTodo() ) ); |
698 | 698 | ||
699 | actionMenu->insertSeparator(); | 699 | actionMenu->insertSeparator(); |
700 | 700 | ||
701 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); | 701 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); |
702 | mShowAction->addTo( actionMenu ); | 702 | mShowAction->addTo( actionMenu ); |
703 | connect( mShowAction, SIGNAL( activated() ), | 703 | connect( mShowAction, SIGNAL( activated() ), |
704 | mView, SLOT( showIncidence() ) ); | 704 | mView, SLOT( showIncidence() ) ); |
705 | 705 | ||
706 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); | 706 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); |
707 | mEditAction->addTo( actionMenu ); | 707 | mEditAction->addTo( actionMenu ); |
708 | connect( mEditAction, SIGNAL( activated() ), | 708 | connect( mEditAction, SIGNAL( activated() ), |
709 | mView, SLOT( editIncidence() ) ); | 709 | mView, SLOT( editIncidence() ) ); |
710 | 710 | ||
711 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); | 711 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); |
712 | mDeleteAction->addTo( actionMenu ); | 712 | mDeleteAction->addTo( actionMenu ); |
713 | connect( mDeleteAction, SIGNAL( activated() ), | 713 | connect( mDeleteAction, SIGNAL( activated() ), |
714 | mView, SLOT( deleteIncidence() ) ); | 714 | mView, SLOT( deleteIncidence() ) ); |
715 | 715 | ||
716 | 716 | ||
717 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); | 717 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); |
718 | mCloneAction->addTo( actionMenu ); | 718 | mCloneAction->addTo( actionMenu ); |
719 | connect( mCloneAction, SIGNAL( activated() ), | 719 | connect( mCloneAction, SIGNAL( activated() ), |
720 | mView, SLOT( cloneIncidence() ) ); | 720 | mView, SLOT( cloneIncidence() ) ); |
721 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); | 721 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); |
722 | mMoveAction->addTo( actionMenu ); | 722 | mMoveAction->addTo( actionMenu ); |
723 | connect( mMoveAction, SIGNAL( activated() ), | 723 | connect( mMoveAction, SIGNAL( activated() ), |
724 | mView, SLOT( moveIncidence() ) ); | 724 | mView, SLOT( moveIncidence() ) ); |
725 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); | 725 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); |
726 | mBeamAction->addTo( actionMenu ); | 726 | mBeamAction->addTo( actionMenu ); |
727 | connect( mBeamAction, SIGNAL( activated() ), | 727 | connect( mBeamAction, SIGNAL( activated() ), |
728 | mView, SLOT( beamIncidence() ) ); | 728 | mView, SLOT( beamIncidence() ) ); |
729 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); | 729 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); |
730 | mCancelAction->addTo( actionMenu ); | 730 | mCancelAction->addTo( actionMenu ); |
731 | connect( mCancelAction, SIGNAL( activated() ), | 731 | connect( mCancelAction, SIGNAL( activated() ), |
732 | mView, SLOT( toggleCancelIncidence() ) ); | 732 | mView, SLOT( toggleCancelIncidence() ) ); |
733 | 733 | ||
734 | actionMenu->insertSeparator(); | 734 | actionMenu->insertSeparator(); |
735 | 735 | ||
736 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, | 736 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, |
737 | this ); | 737 | this ); |
738 | action->addTo( actionMenu ); | 738 | action->addTo( actionMenu ); |
739 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); | 739 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); |
740 | 740 | ||
741 | icon = loadPixmap( pathString + "search" ); | 741 | icon = loadPixmap( pathString + "search" ); |
742 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 742 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); |
743 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); | 743 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); |
744 | search_action->addTo( actionMenu ); | 744 | search_action->addTo( actionMenu ); |
745 | connect( search_action, SIGNAL( activated() ), | 745 | connect( search_action, SIGNAL( activated() ), |
746 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 746 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
747 | 747 | ||
748 | icon = loadPixmap( pathString + "today" ); | 748 | icon = loadPixmap( pathString + "today" ); |
749 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 749 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
750 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 750 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
751 | today_action->addTo( actionMenu ); | 751 | today_action->addTo( actionMenu ); |
752 | connect( today_action, SIGNAL( activated() ), | 752 | connect( today_action, SIGNAL( activated() ), |
753 | mView, SLOT( goToday() ) ); | 753 | mView, SLOT( goToday() ) ); |
754 | 754 | ||
755 | if ( KOPrefs::instance()->mShowFullMenu ) { | 755 | if ( KOPrefs::instance()->mShowFullMenu ) { |
756 | actionMenu->insertSeparator(); | 756 | actionMenu->insertSeparator(); |
757 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); | 757 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); |
758 | 758 | ||
759 | } | 759 | } |
760 | // actionMenu->insertSeparator(); | 760 | // actionMenu->insertSeparator(); |
761 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, | 761 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, |
762 | this ); | 762 | this ); |
763 | action->addTo( importMenu ); | 763 | action->addTo( importMenu ); |
764 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); | 764 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); |
765 | action = new QAction( "import_quick", i18n("Import last file"), 0, | 765 | action = new QAction( "import_quick", i18n("Import last file"), 0, |
766 | this ); | 766 | this ); |
767 | action->addTo( importMenu ); | 767 | action->addTo( importMenu ); |
768 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); | 768 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); |
769 | importMenu->insertSeparator(); | 769 | importMenu->insertSeparator(); |
770 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, | 770 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, |
771 | this ); | 771 | this ); |
772 | action->addTo( importMenu ); | 772 | action->addTo( importMenu ); |
773 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); | 773 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); |
774 | #ifndef DESKTOP_VERSION | 774 | #ifndef DESKTOP_VERSION |
775 | importMenu->insertSeparator(); | 775 | importMenu->insertSeparator(); |
776 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, | 776 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, |
777 | this ); | 777 | this ); |
778 | action->addTo( importMenu ); | 778 | action->addTo( importMenu ); |
779 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); | 779 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); |
780 | #else | 780 | #else |
781 | #ifdef _WIN32_ | 781 | #ifdef _WIN32_ |
782 | importMenu->insertSeparator(); | 782 | importMenu->insertSeparator(); |
783 | action = new QAction( "import_ol", i18n("Import from OL"), 0, | 783 | action = new QAction( "import_ol", i18n("Import from OL"), 0, |
784 | this ); | 784 | this ); |
785 | action->addTo( importMenu ); | 785 | action->addTo( importMenu ); |
786 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); | 786 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); |
787 | #endif | 787 | #endif |
788 | #endif | 788 | #endif |
789 | 789 | ||
790 | importMenu->insertSeparator(); | 790 | importMenu->insertSeparator(); |
791 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, | 791 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, |
792 | this ); | 792 | this ); |
793 | action->addTo( importMenu ); | 793 | action->addTo( importMenu ); |
794 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); | 794 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); |
795 | 795 | ||
796 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, | 796 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, |
797 | this ); | 797 | this ); |
798 | action->addTo( importMenu ); | 798 | action->addTo( importMenu ); |
799 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 799 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
800 | 800 | ||
801 | importMenu->insertSeparator(); | 801 | importMenu->insertSeparator(); |
802 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 802 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, |
803 | this ); | 803 | this ); |
804 | action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 804 | action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
805 | 805 | ||
806 | 806 | ||
807 | //LR | 807 | //LR |
808 | QPopupMenu *ex2phone = new QPopupMenu( this ); | 808 | QPopupMenu *ex2phone = new QPopupMenu( this ); |
809 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 809 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
810 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 810 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
811 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); | 811 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); |
812 | importMenu->insertItem( i18n("Export to phone"), ex2phone ); | 812 | importMenu->insertItem( i18n("Export to phone"), ex2phone ); |
813 | 813 | ||
814 | importMenu->insertSeparator(); | 814 | importMenu->insertSeparator(); |
815 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 815 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
816 | this ); | 816 | this ); |
817 | action->addTo( importMenu ); | 817 | action->addTo( importMenu ); |
818 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 818 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
819 | #ifndef DESKTOP_VERSION | 819 | #ifndef DESKTOP_VERSION |
820 | importMenu->insertSeparator(); | 820 | importMenu->insertSeparator(); |
821 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, | 821 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, |
822 | this ); | 822 | this ); |
823 | brAction->addTo( importMenu ); | 823 | brAction->addTo( importMenu ); |
824 | brAction->setToggleAction (true ) ; | 824 | brAction->setToggleAction (true ) ; |
825 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 825 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
826 | 826 | ||
827 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 827 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
828 | this ); | 828 | this ); |
829 | action->addTo( importMenu ); | 829 | action->addTo( importMenu ); |
830 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 830 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
831 | 831 | ||
832 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 832 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
833 | this ); | 833 | this ); |
834 | action->addTo( importMenu ); | 834 | action->addTo( importMenu ); |
835 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 835 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
836 | #else | 836 | #else |
837 | importMenu->insertSeparator(); | 837 | importMenu->insertSeparator(); |
838 | icon = loadPixmap( pathString + "print" ); | 838 | icon = loadPixmap( pathString + "print" ); |
839 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 839 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
840 | action->addTo( importMenu ); | 840 | action->addTo( importMenu ); |
841 | connect( action, SIGNAL( activated() ), | 841 | connect( action, SIGNAL( activated() ), |
842 | this, SLOT( printCal() ) ); | 842 | this, SLOT( printCal() ) ); |
843 | 843 | ||
844 | icon = loadPixmap( pathString + "print" ); | 844 | icon = loadPixmap( pathString + "print" ); |
845 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 845 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
846 | action->addTo( importMenu ); | 846 | action->addTo( importMenu ); |
847 | connect( action, SIGNAL( activated() ), | 847 | connect( action, SIGNAL( activated() ), |
848 | this, SLOT( printSel() ) ); | 848 | this, SLOT( printSel() ) ); |
849 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); | ||
850 | action->addTo( importMenu ); | ||
851 | connect( action, SIGNAL( activated() ), | ||
852 | mView->viewManager(), SIGNAL( printWNV() ) ); | ||
849 | #endif | 853 | #endif |
850 | importMenu->insertSeparator(); | 854 | importMenu->insertSeparator(); |
851 | action = new QAction( "beam all", i18n("Save"), 0, | 855 | action = new QAction( "beam all", i18n("Save"), 0, |
852 | this ); | 856 | this ); |
853 | action->addTo( importMenu ); | 857 | action->addTo( importMenu ); |
854 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 858 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
855 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 859 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
856 | this ); | 860 | this ); |
857 | action->addTo( importMenu ); | 861 | action->addTo( importMenu ); |
858 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 862 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
859 | 863 | ||
860 | //menuBar->insertItem( "Configure",configureMenu ); | 864 | //menuBar->insertItem( "Configure",configureMenu ); |
861 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 865 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
862 | icon = loadPixmap( "korganizer/korganizer" ); | 866 | icon = loadPixmap( "korganizer/korganizer" ); |
863 | 867 | ||
864 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 868 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
865 | action->addTo( helpMenu ); | 869 | action->addTo( helpMenu ); |
866 | connect( action, SIGNAL( activated() ), | 870 | connect( action, SIGNAL( activated() ), |
867 | SLOT( whatsNew() ) ); | 871 | SLOT( whatsNew() ) ); |
868 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 872 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
869 | action->addTo( helpMenu ); | 873 | action->addTo( helpMenu ); |
870 | connect( action, SIGNAL( activated() ), | 874 | connect( action, SIGNAL( activated() ), |
871 | SLOT( features() ) ); | 875 | SLOT( features() ) ); |
872 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 876 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
873 | action->addTo( helpMenu ); | 877 | action->addTo( helpMenu ); |
874 | connect( action, SIGNAL( activated() ), | 878 | connect( action, SIGNAL( activated() ), |
875 | SLOT( keyBindings() ) ); | 879 | SLOT( keyBindings() ) ); |
876 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 880 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
877 | action->addTo( helpMenu ); | 881 | action->addTo( helpMenu ); |
878 | connect( action, SIGNAL( activated() ), | 882 | connect( action, SIGNAL( activated() ), |
879 | SLOT( synchowto() ) ); | 883 | SLOT( synchowto() ) ); |
880 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); | 884 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); |
881 | action->addTo( helpMenu ); | 885 | action->addTo( helpMenu ); |
882 | connect( action, SIGNAL( activated() ), | 886 | connect( action, SIGNAL( activated() ), |
883 | SLOT( kdesynchowto() ) ); | 887 | SLOT( kdesynchowto() ) ); |
884 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); | 888 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); |
885 | action->addTo( helpMenu ); | 889 | action->addTo( helpMenu ); |
886 | connect( action, SIGNAL( activated() ), | 890 | connect( action, SIGNAL( activated() ), |
887 | SLOT( multisynchowto() ) ); | 891 | SLOT( multisynchowto() ) ); |
888 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 892 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
889 | action->addTo( helpMenu ); | 893 | action->addTo( helpMenu ); |
890 | connect( action, SIGNAL( activated() ), | 894 | connect( action, SIGNAL( activated() ), |
891 | SLOT( aboutAutoSaving() ) ); | 895 | SLOT( aboutAutoSaving() ) ); |
892 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 896 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
893 | action->addTo( helpMenu ); | 897 | action->addTo( helpMenu ); |
894 | connect( action, SIGNAL( activated() ), | 898 | connect( action, SIGNAL( activated() ), |
895 | SLOT( aboutKnownBugs() ) ); | 899 | SLOT( aboutKnownBugs() ) ); |
896 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 900 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
897 | action->addTo( helpMenu ); | 901 | action->addTo( helpMenu ); |
898 | connect( action, SIGNAL( activated() ), | 902 | connect( action, SIGNAL( activated() ), |
899 | SLOT( usertrans() ) ); | 903 | SLOT( usertrans() ) ); |
900 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 904 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
901 | action->addTo( helpMenu ); | 905 | action->addTo( helpMenu ); |
902 | connect( action, SIGNAL( activated() ), | 906 | connect( action, SIGNAL( activated() ), |
903 | SLOT( faq() ) ); | 907 | SLOT( faq() ) ); |
904 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | 908 | action = new QAction( "licence", i18n("Licence..."), 0, this ); |
905 | action->addTo( helpMenu ); | 909 | action->addTo( helpMenu ); |
906 | connect( action, SIGNAL( activated() ), | 910 | connect( action, SIGNAL( activated() ), |
907 | SLOT( licence() ) ); | 911 | SLOT( licence() ) ); |
908 | action = new QAction( "about", i18n("About..."), 0, this ); | 912 | action = new QAction( "about", i18n("About..."), 0, this ); |
909 | action->addTo( helpMenu ); | 913 | action->addTo( helpMenu ); |
910 | connect( action, SIGNAL( activated() ), | 914 | connect( action, SIGNAL( activated() ), |
911 | SLOT( about() ) ); | 915 | SLOT( about() ) ); |
912 | //menuBar->insertSeparator(); | 916 | //menuBar->insertSeparator(); |
913 | 917 | ||
914 | // ****************************************************** | 918 | // ****************************************************** |
915 | // menubar icons | 919 | // menubar icons |
916 | 920 | ||
917 | 921 | ||
918 | iconToolBar->setHorizontalStretchable (true ); | 922 | iconToolBar->setHorizontalStretchable (true ); |
919 | //menuBar->insertItem( iconToolBar ); | 923 | //menuBar->insertItem( iconToolBar ); |
920 | //xdays_action | 924 | //xdays_action |
921 | if (p-> mShowIconNewEvent) | 925 | if (p-> mShowIconNewEvent) |
922 | ne_action->addTo( iconToolBar ); | 926 | ne_action->addTo( iconToolBar ); |
923 | if (p->mShowIconNewTodo ) | 927 | if (p->mShowIconNewTodo ) |
924 | nt_action->addTo( iconToolBar ); | 928 | nt_action->addTo( iconToolBar ); |
925 | if (p-> mShowIconSearch) | 929 | if (p-> mShowIconSearch) |
926 | search_action->addTo( iconToolBar ); | 930 | search_action->addTo( iconToolBar ); |
927 | if (p-> mShowIconNext) | 931 | if (p-> mShowIconNext) |
928 | whatsnext_action->addTo( iconToolBar ); | 932 | whatsnext_action->addTo( iconToolBar ); |
929 | if (p-> mShowIconNextDays) | 933 | if (p-> mShowIconNextDays) |
930 | xdays_action->addTo( iconToolBar ); | 934 | xdays_action->addTo( iconToolBar ); |
931 | if (p-> mShowIconList) | 935 | if (p-> mShowIconList) |
932 | showlist_action->addTo( iconToolBar ); | 936 | showlist_action->addTo( iconToolBar ); |
933 | if (p-> mShowIconDay1) | 937 | if (p-> mShowIconDay1) |
934 | day1_action->addTo( iconToolBar ); | 938 | day1_action->addTo( iconToolBar ); |
935 | if (p-> mShowIconDay5) | 939 | if (p-> mShowIconDay5) |
936 | day5_action->addTo( iconToolBar ); | 940 | day5_action->addTo( iconToolBar ); |
937 | if (p-> mShowIconDay7) | 941 | if (p-> mShowIconDay7) |
938 | day7_action->addTo( iconToolBar ); | 942 | day7_action->addTo( iconToolBar ); |
939 | if (p-> mShowIconMonth) | 943 | if (p-> mShowIconMonth) |
940 | month_action->addTo( iconToolBar ); | 944 | month_action->addTo( iconToolBar ); |
941 | if (p-> mShowIconTodoview) | 945 | if (p-> mShowIconTodoview) |
942 | todoview_action->addTo( iconToolBar ); | 946 | todoview_action->addTo( iconToolBar ); |
943 | if (p-> mShowIconJournal) | 947 | if (p-> mShowIconJournal) |
944 | viewjournal_action->addTo( iconToolBar ); | 948 | viewjournal_action->addTo( iconToolBar ); |
945 | icon = loadPixmap( pathString + "2leftarrowB" ); | 949 | icon = loadPixmap( pathString + "2leftarrowB" ); |
946 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); | 950 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); |
947 | if (p-> mShowIconBackFast) { | 951 | if (p-> mShowIconBackFast) { |
948 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 952 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
949 | connect( action, SIGNAL( activated() ), | 953 | connect( action, SIGNAL( activated() ), |
950 | mView, SLOT( goPreviousMonth() ) ); | 954 | mView, SLOT( goPreviousMonth() ) ); |
951 | action->addTo( iconToolBar ); | 955 | action->addTo( iconToolBar ); |
952 | } | 956 | } |
953 | icon = loadPixmap( pathString + "1leftarrowB" ); | 957 | icon = loadPixmap( pathString + "1leftarrowB" ); |
954 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); | 958 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); |
955 | if (p-> mShowIconBack) { | 959 | if (p-> mShowIconBack) { |
956 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 960 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
957 | connect( action, SIGNAL( activated() ), | 961 | connect( action, SIGNAL( activated() ), |
958 | mView, SLOT( goPrevious() ) ); | 962 | mView, SLOT( goPrevious() ) ); |
959 | action->addTo( iconToolBar ); | 963 | action->addTo( iconToolBar ); |
960 | } | 964 | } |
961 | if (p-> mShowIconToday) | 965 | if (p-> mShowIconToday) |
962 | today_action->addTo( iconToolBar ); | 966 | today_action->addTo( iconToolBar ); |
963 | icon = loadPixmap( pathString + "1rightarrowB" ); | 967 | icon = loadPixmap( pathString + "1rightarrowB" ); |
964 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 968 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
965 | if (p-> mShowIconForward) { | 969 | if (p-> mShowIconForward) { |
966 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 970 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
967 | connect( action, SIGNAL( activated() ), | 971 | connect( action, SIGNAL( activated() ), |
968 | mView, SLOT( goNext() ) ); | 972 | mView, SLOT( goNext() ) ); |
969 | action->addTo( iconToolBar ); | 973 | action->addTo( iconToolBar ); |
970 | } | 974 | } |
971 | icon = loadPixmap( pathString + "2rightarrowB" ); | 975 | icon = loadPixmap( pathString + "2rightarrowB" ); |
972 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 976 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
973 | if (p-> mShowIconForwardFast) { | 977 | if (p-> mShowIconForwardFast) { |
974 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); | 978 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); |
975 | connect( action, SIGNAL( activated() ), | 979 | connect( action, SIGNAL( activated() ), |
976 | mView, SLOT( goNextMonth() ) ); | 980 | mView, SLOT( goNextMonth() ) ); |
977 | action->addTo( iconToolBar ); | 981 | action->addTo( iconToolBar ); |
978 | } | 982 | } |
979 | 983 | ||
980 | 984 | ||
981 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); | 985 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); |
982 | 986 | ||
983 | if (p-> mShowIconNewEvent) | 987 | if (p-> mShowIconNewEvent) |
984 | configureToolBarMenu->setItemChecked( 10, true ); | 988 | configureToolBarMenu->setItemChecked( 10, true ); |
985 | if (p->mShowIconNewTodo ) | 989 | if (p->mShowIconNewTodo ) |
986 | configureToolBarMenu->setItemChecked( 20, true ); | 990 | configureToolBarMenu->setItemChecked( 20, true ); |
987 | if (p-> mShowIconSearch) | 991 | if (p-> mShowIconSearch) |
988 | configureToolBarMenu->setItemChecked( 120, true ); | 992 | configureToolBarMenu->setItemChecked( 120, true ); |
989 | if (p-> mShowIconList) | 993 | if (p-> mShowIconList) |
990 | configureToolBarMenu->setItemChecked( 30, true ); | 994 | configureToolBarMenu->setItemChecked( 30, true ); |
991 | if (p-> mShowIconDay1) | 995 | if (p-> mShowIconDay1) |
992 | configureToolBarMenu->setItemChecked( 40, true ); | 996 | configureToolBarMenu->setItemChecked( 40, true ); |
993 | if (p-> mShowIconDay5) | 997 | if (p-> mShowIconDay5) |
994 | configureToolBarMenu->setItemChecked( 50, true ); | 998 | configureToolBarMenu->setItemChecked( 50, true ); |
995 | if (p-> mShowIconDay7) | 999 | if (p-> mShowIconDay7) |
996 | configureToolBarMenu->setItemChecked( 60, true ); | 1000 | configureToolBarMenu->setItemChecked( 60, true ); |
997 | if (p-> mShowIconMonth) | 1001 | if (p-> mShowIconMonth) |
998 | configureToolBarMenu->setItemChecked( 70, true ); | 1002 | configureToolBarMenu->setItemChecked( 70, true ); |
999 | if (p-> mShowIconTodoview) | 1003 | if (p-> mShowIconTodoview) |
1000 | configureToolBarMenu->setItemChecked( 80, true ); | 1004 | configureToolBarMenu->setItemChecked( 80, true ); |
1001 | if (p-> mShowIconBackFast) | 1005 | if (p-> mShowIconBackFast) |
1002 | configureToolBarMenu->setItemChecked( 200, true ); | 1006 | configureToolBarMenu->setItemChecked( 200, true ); |
1003 | if (p-> mShowIconBack) | 1007 | if (p-> mShowIconBack) |
1004 | configureToolBarMenu->setItemChecked( 210, true ); | 1008 | configureToolBarMenu->setItemChecked( 210, true ); |
1005 | if (p-> mShowIconToday) | 1009 | if (p-> mShowIconToday) |
1006 | configureToolBarMenu->setItemChecked( 130, true ); | 1010 | configureToolBarMenu->setItemChecked( 130, true ); |
1007 | if (p-> mShowIconForward) | 1011 | if (p-> mShowIconForward) |
1008 | configureToolBarMenu->setItemChecked( 220, true ); | 1012 | configureToolBarMenu->setItemChecked( 220, true ); |
1009 | if (p-> mShowIconForwardFast) | 1013 | if (p-> mShowIconForwardFast) |
1010 | configureToolBarMenu->setItemChecked( 230, true ); | 1014 | configureToolBarMenu->setItemChecked( 230, true ); |
1011 | if (p-> mShowIconNextDays) | 1015 | if (p-> mShowIconNextDays) |
1012 | configureToolBarMenu->setItemChecked( 100, true ); | 1016 | configureToolBarMenu->setItemChecked( 100, true ); |
1013 | if (p-> mShowIconNext) | 1017 | if (p-> mShowIconNext) |
1014 | configureToolBarMenu->setItemChecked( 110, true ); | 1018 | configureToolBarMenu->setItemChecked( 110, true ); |
1015 | if (p-> mShowIconJournal) | 1019 | if (p-> mShowIconJournal) |
1016 | configureToolBarMenu->setItemChecked( 90, true ); | 1020 | configureToolBarMenu->setItemChecked( 90, true ); |
1017 | if (p-> mShowIconWhatsThis) | 1021 | if (p-> mShowIconWhatsThis) |
1018 | configureToolBarMenu->setItemChecked( 300, true ); | 1022 | configureToolBarMenu->setItemChecked( 300, true ); |
1019 | 1023 | ||
1020 | QLabel* dummy = new QLabel( iconToolBar ); | 1024 | QLabel* dummy = new QLabel( iconToolBar ); |
1021 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 1025 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
1022 | if (!p-> mShowIconStretch) | 1026 | if (!p-> mShowIconStretch) |
1023 | iconToolBar->setStretchableWidget ( dummy ) ; | 1027 | iconToolBar->setStretchableWidget ( dummy ) ; |
1024 | else | 1028 | else |
1025 | configureToolBarMenu->setItemChecked( 5, true ); | 1029 | configureToolBarMenu->setItemChecked( 5, true ); |
1026 | if (p-> mShowIconWhatsThis) | 1030 | if (p-> mShowIconWhatsThis) |
1027 | QWhatsThis::whatsThisButton ( iconToolBar ); | 1031 | QWhatsThis::whatsThisButton ( iconToolBar ); |
1028 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 1032 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
1029 | configureAgenda( p->mHourSize ); | 1033 | configureAgenda( p->mHourSize ); |
1030 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 1034 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
1031 | } | 1035 | } |
1032 | 1036 | ||
1033 | void MainWindow::exportToPhone( int mode ) | 1037 | void MainWindow::exportToPhone( int mode ) |
1034 | { | 1038 | { |
1035 | 1039 | ||
1036 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1040 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1037 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1041 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1038 | KOex2phonePrefs ex2phone; | 1042 | KOex2phonePrefs ex2phone; |
1039 | 1043 | ||
1040 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 1044 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |