-rw-r--r-- | korganizer/mainwindow.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 7a5f3e5..5d26d35 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -737,196 +737,192 @@ void MainWindow::initActions() | |||
737 | if ( p->mShowIconFilterview ) { | 737 | if ( p->mShowIconFilterview ) { |
738 | icon = loadPixmap( pathString + "filter" ); | 738 | icon = loadPixmap( pathString + "filter" ); |
739 | actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); | 739 | actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); |
740 | connect( actionFilterMenuTB, SIGNAL( activated() ), | 740 | connect( actionFilterMenuTB, SIGNAL( activated() ), |
741 | this, SLOT( fillFilterMenuTB() ) ); | 741 | this, SLOT( fillFilterMenuTB() ) ); |
742 | actionFilterMenuTB->addTo( iconToolBar ); | 742 | actionFilterMenuTB->addTo( iconToolBar ); |
743 | selectFilterMenuTB = new QPopupMenu( this ); | 743 | selectFilterMenuTB = new QPopupMenu( this ); |
744 | selectFilterMenuTB->setCheckable( true ); | 744 | selectFilterMenuTB->setCheckable( true ); |
745 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 745 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
746 | } | 746 | } |
747 | 747 | ||
748 | //#endif | 748 | //#endif |
749 | // ****************** | 749 | // ****************** |
750 | QAction *action; | 750 | QAction *action; |
751 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 751 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
752 | configureToolBarMenu->setCheckable( true ); | 752 | configureToolBarMenu->setCheckable( true ); |
753 | 753 | ||
754 | 754 | ||
755 | configureAgendaMenu->setCheckable( true ); | 755 | configureAgendaMenu->setCheckable( true ); |
756 | int iii ; | 756 | int iii ; |
757 | for ( iii = 1;iii<= 10 ;++iii ){ | 757 | for ( iii = 1;iii<= 10 ;++iii ){ |
758 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); | 758 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); |
759 | } | 759 | } |
760 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 760 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
761 | 761 | ||
762 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), | 762 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), |
763 | this, SLOT( showConfigureAgenda( ) ) ); | 763 | this, SLOT( showConfigureAgenda( ) ) ); |
764 | icon = loadPixmap( pathString + "today" ); | 764 | icon = loadPixmap( pathString + "today" ); |
765 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 765 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
766 | today_action->addTo( actionMenu ); | 766 | today_action->addTo( actionMenu ); |
767 | connect( today_action, SIGNAL( activated() ), | 767 | connect( today_action, SIGNAL( activated() ), |
768 | mView, SLOT( goToday() ) ); | 768 | mView, SLOT( goToday() ) ); |
769 | 769 | ||
770 | icon = loadPixmap( pathString + "picker" ); | 770 | icon = loadPixmap( pathString + "picker" ); |
771 | QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); | 771 | QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); |
772 | dPickerAction->addTo( actionMenu ); | 772 | dPickerAction->addTo( actionMenu ); |
773 | connect( dPickerAction, SIGNAL( activated() ), | 773 | connect( dPickerAction, SIGNAL( activated() ), |
774 | mView, SLOT( showDatePicker() ) ); | 774 | mView, SLOT( showDatePicker() ) ); |
775 | 775 | ||
776 | icon = loadPixmap( pathString + "search" ); | 776 | icon = loadPixmap( pathString + "search" ); |
777 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 777 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); |
778 | search_action->addTo( actionMenu ); | 778 | search_action->addTo( actionMenu ); |
779 | connect( search_action, SIGNAL( activated() ), | 779 | connect( search_action, SIGNAL( activated() ), |
780 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 780 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
781 | 781 | ||
782 | actionMenu->insertSeparator(); | 782 | actionMenu->insertSeparator(); |
783 | 783 | ||
784 | 784 | ||
785 | 785 | ||
786 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | 786 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
787 | action->addTo( mCurrentItemMenu ); | 787 | action->addTo( mCurrentItemMenu ); |
788 | connect( action, SIGNAL( activated() ), | 788 | connect( action, SIGNAL( activated() ), |
789 | mView, SLOT( undo_delete() ) ); | 789 | mView, SLOT( undo_delete() ) ); |
790 | mCurrentItemMenu->insertSeparator(); | 790 | mCurrentItemMenu->insertSeparator(); |
791 | icon = loadPixmap( pathString + "newevent" ); | 791 | icon = loadPixmap( pathString + "newevent" ); |
792 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 792 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
793 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); | 793 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); |
794 | configureToolBarMenu->insertSeparator(); | 794 | configureToolBarMenu->insertSeparator(); |
795 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); | 795 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); |
796 | configureToolBarMenu->insertSeparator(); | 796 | configureToolBarMenu->insertSeparator(); |
797 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); | 797 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); |
798 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 798 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
799 | 799 | ||
800 | //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); | 800 | //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); |
801 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); | 801 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); |
802 | mShowAction->addTo( mCurrentItemMenu ); | 802 | mShowAction->addTo( mCurrentItemMenu ); |
803 | connect( mShowAction, SIGNAL( activated() ), | 803 | connect( mShowAction, SIGNAL( activated() ), |
804 | mView, SLOT( showIncidence() ) ); | 804 | mView, SLOT( showIncidence() ) ); |
805 | 805 | ||
806 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); | 806 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); |
807 | mEditAction->addTo( mCurrentItemMenu ); | 807 | mEditAction->addTo( mCurrentItemMenu ); |
808 | connect( mEditAction, SIGNAL( activated() ), | 808 | connect( mEditAction, SIGNAL( activated() ), |
809 | mView, SLOT( editIncidence() ) ); | 809 | mView, SLOT( editIncidence() ) ); |
810 | 810 | ||
811 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); | 811 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); |
812 | mDeleteAction->addTo( mCurrentItemMenu ); | 812 | mDeleteAction->addTo( mCurrentItemMenu ); |
813 | connect( mDeleteAction, SIGNAL( activated() ), | 813 | connect( mDeleteAction, SIGNAL( activated() ), |
814 | mView, SLOT( deleteIncidence() ) ); | 814 | mView, SLOT( deleteIncidence() ) ); |
815 | 815 | ||
816 | 816 | ||
817 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); | 817 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); |
818 | mCloneAction->addTo( mCurrentItemMenu ); | 818 | mCloneAction->addTo( mCurrentItemMenu ); |
819 | connect( mCloneAction, SIGNAL( activated() ), | 819 | connect( mCloneAction, SIGNAL( activated() ), |
820 | mView, SLOT( cloneIncidence() ) ); | 820 | mView, SLOT( cloneIncidence() ) ); |
821 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); | 821 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); |
822 | mMoveAction->addTo( mCurrentItemMenu ); | 822 | mMoveAction->addTo( mCurrentItemMenu ); |
823 | connect( mMoveAction, SIGNAL( activated() ), | 823 | connect( mMoveAction, SIGNAL( activated() ), |
824 | mView, SLOT( moveIncidence() ) ); | 824 | mView, SLOT( moveIncidence() ) ); |
825 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); | 825 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); |
826 | mBeamAction->addTo(mCurrentItemMenu ); | 826 | mBeamAction->addTo(mCurrentItemMenu ); |
827 | connect( mBeamAction, SIGNAL( activated() ), | 827 | connect( mBeamAction, SIGNAL( activated() ), |
828 | mView, SLOT( beamIncidence() ) ); | 828 | mView, SLOT( beamIncidence() ) ); |
829 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); | 829 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); |
830 | mCancelAction->addTo( mCurrentItemMenu ); | 830 | mCancelAction->addTo( mCurrentItemMenu ); |
831 | connect( mCancelAction, SIGNAL( activated() ), | 831 | connect( mCancelAction, SIGNAL( activated() ), |
832 | mView, SLOT( toggleCancelIncidence() ) ); | 832 | mView, SLOT( toggleCancelIncidence() ) ); |
833 | #ifdef DESKTOP_VERSION | ||
834 | actionMenu->insertSeparator(); | ||
835 | #endif | ||
836 | |||
837 | 833 | ||
838 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 834 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
839 | ne_action->addTo( actionMenu ); | 835 | ne_action->addTo( actionMenu ); |
840 | connect( ne_action, SIGNAL( activated() ), | 836 | connect( ne_action, SIGNAL( activated() ), |
841 | mView, SLOT( newEvent() ) ); | 837 | mView, SLOT( newEvent() ) ); |
842 | icon = loadPixmap( pathString + "newtodo" ); | 838 | icon = loadPixmap( pathString + "newtodo" ); |
843 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 839 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
844 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 840 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
845 | nt_action->addTo( actionMenu ); | 841 | nt_action->addTo( actionMenu ); |
846 | connect( nt_action, SIGNAL( activated() ), | 842 | connect( nt_action, SIGNAL( activated() ), |
847 | mView, SLOT( newTodo() ) ); | 843 | mView, SLOT( newTodo() ) ); |
848 | 844 | ||
849 | 845 | ||
850 | 846 | ||
851 | // *********************** | 847 | // *********************** |
852 | if ( KOPrefs::instance()->mVerticalScreen ) { | 848 | if ( KOPrefs::instance()->mVerticalScreen ) { |
853 | icon = SmallIcon( "1updownarrow" ); | 849 | icon = SmallIcon( "1updownarrow" ); |
854 | } else { | 850 | } else { |
855 | icon = SmallIcon("1leftrightarrow" ); | 851 | icon = SmallIcon("1leftrightarrow" ); |
856 | } | 852 | } |
857 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); | 853 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); |
858 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); | 854 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); |
859 | FSaction->addTo( viewMenu ); | 855 | FSaction->addTo( viewMenu ); |
860 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); | 856 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); |
861 | 857 | ||
862 | 858 | ||
863 | icon = loadPixmap( pathString + "filter" ); | 859 | icon = loadPixmap( pathString + "filter" ); |
864 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); | 860 | configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); |
865 | icon = loadPixmap( pathString + "configure" ); | 861 | icon = loadPixmap( pathString + "configure" ); |
866 | action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); | 862 | action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); |
867 | action->addTo( viewMenu ); | 863 | action->addTo( viewMenu ); |
868 | connect( action, SIGNAL( activated() ), | 864 | connect( action, SIGNAL( activated() ), |
869 | mView, SLOT( toggleFilter() ) ); | 865 | mView, SLOT( toggleFilter() ) ); |
870 | mToggleFilter = action; | 866 | mToggleFilter = action; |
871 | icon = loadPixmap( pathString + "navi" ); | 867 | icon = loadPixmap( pathString + "navi" ); |
872 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); | 868 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); |
873 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 869 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
874 | action->addTo( viewMenu ); | 870 | action->addTo( viewMenu ); |
875 | connect( action, SIGNAL( activated() ), | 871 | connect( action, SIGNAL( activated() ), |
876 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 872 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
877 | mToggleNav = action ; | 873 | mToggleNav = action ; |
878 | icon = loadPixmap( pathString + "allday" ); | 874 | icon = loadPixmap( pathString + "allday" ); |
879 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); | 875 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); |
880 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); | 876 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); |
881 | action->addTo( viewMenu ); | 877 | action->addTo( viewMenu ); |
882 | connect( action, SIGNAL( activated() ), | 878 | connect( action, SIGNAL( activated() ), |
883 | mView, SLOT( toggleAllDaySize() ) ); | 879 | mView, SLOT( toggleAllDaySize() ) ); |
884 | mToggleAllday = action; | 880 | mToggleAllday = action; |
885 | 881 | ||
886 | 882 | ||
887 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 883 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
888 | mToggleNav, SLOT( setEnabled ( bool ) ) ); | 884 | mToggleNav, SLOT( setEnabled ( bool ) ) ); |
889 | //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 885 | //connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
890 | // mToggleFilter, SLOT( setEnabled ( bool ) ) ); | 886 | // mToggleFilter, SLOT( setEnabled ( bool ) ) ); |
891 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 887 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
892 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); | 888 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); |
893 | // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 889 | // connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
894 | // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); | 890 | // configureAgendaMenu, SLOT( setEnabled ( bool ) ) ); |
895 | 891 | ||
896 | 892 | ||
897 | dPickerAction->addTo( iconToolBar ); | 893 | dPickerAction->addTo( iconToolBar ); |
898 | viewMenu->insertSeparator(); | 894 | viewMenu->insertSeparator(); |
899 | 895 | ||
900 | if ( p-> mShowIconToggleFull ) | 896 | if ( p-> mShowIconToggleFull ) |
901 | FSaction->addTo( iconToolBar ); | 897 | FSaction->addTo( iconToolBar ); |
902 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); | 898 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); |
903 | 899 | ||
904 | //******************** | 900 | //******************** |
905 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); | 901 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); |
906 | 902 | ||
907 | 903 | ||
908 | icon = loadPixmap( pathString + "whatsnext" ); | 904 | icon = loadPixmap( pathString + "whatsnext" ); |
909 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); | 905 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); |
910 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 906 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
911 | whatsnext_action->addTo( viewMenu ); | 907 | whatsnext_action->addTo( viewMenu ); |
912 | connect( whatsnext_action, SIGNAL( activated() ), | 908 | connect( whatsnext_action, SIGNAL( activated() ), |
913 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 909 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
914 | 910 | ||
915 | icon = loadPixmap( pathString + "xdays" ); | 911 | icon = loadPixmap( pathString + "xdays" ); |
916 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); | 912 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); |
917 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 913 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
918 | xdays_action->addTo( viewMenu ); | 914 | xdays_action->addTo( viewMenu ); |
919 | connect( xdays_action, SIGNAL( activated() ), | 915 | connect( xdays_action, SIGNAL( activated() ), |
920 | mView->viewManager(), SLOT( showNextXView() ) ); | 916 | mView->viewManager(), SLOT( showNextXView() ) ); |
921 | 917 | ||
922 | 918 | ||
923 | icon = loadPixmap( pathString + "journal" ); | 919 | icon = loadPixmap( pathString + "journal" ); |
924 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 920 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
925 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 921 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
926 | viewjournal_action->addTo( viewMenu ); | 922 | viewjournal_action->addTo( viewMenu ); |
927 | connect( viewjournal_action, SIGNAL( activated() ), | 923 | connect( viewjournal_action, SIGNAL( activated() ), |
928 | mView->viewManager(), SLOT( showJournalView() ) ); | 924 | mView->viewManager(), SLOT( showJournalView() ) ); |
929 | 925 | ||
930 | 926 | ||
931 | icon = loadPixmap( pathString + "day" ); | 927 | icon = loadPixmap( pathString + "day" ); |
932 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 928 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |