summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-06-09 15:30:45 (UTC)
committer zautrix <zautrix>2005-06-09 15:30:45 (UTC)
commitad88eadf0bdb34cb4a93639b50a5566a06470c22 (patch) (unidiff)
tree194ed7da0894b1b0d96b8edcfb6c41b4a1f903b7 /korganizer
parenta9a6a8f4eb0200fb5fbf67091e6348a3859976f9 (diff)
downloadkdepimpi-ad88eadf0bdb34cb4a93639b50a5566a06470c22.zip
kdepimpi-ad88eadf0bdb34cb4a93639b50a5566a06470c22.tar.gz
kdepimpi-ad88eadf0bdb34cb4a93639b50a5566a06470c22.tar.bz2
print hint
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 20f8b57..25e76ee 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -870,394 +870,395 @@ void MainWindow::initActions()
870 icon = loadPixmap( pathString + "workweek2" ); 870 icon = loadPixmap( pathString + "workweek2" );
871 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); 871 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
872 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); 872 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
873 day6_action->addTo( viewMenu ); 873 day6_action->addTo( viewMenu );
874 connect( day6_action, SIGNAL( activated() ), 874 connect( day6_action, SIGNAL( activated() ),
875 mView->viewManager(), SLOT( showMonthViewWeek() ) ); 875 mView->viewManager(), SLOT( showMonthViewWeek() ) );
876 876
877 icon = loadPixmap( pathString + "month" ); 877 icon = loadPixmap( pathString + "month" );
878 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 878 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
879 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 879 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
880 month_action->addTo( viewMenu ); 880 month_action->addTo( viewMenu );
881 connect( month_action, SIGNAL( activated() ), 881 connect( month_action, SIGNAL( activated() ),
882 mView->viewManager(), SLOT( showMonthView() ) ); 882 mView->viewManager(), SLOT( showMonthView() ) );
883 883
884 icon = loadPixmap( pathString + "list" ); 884 icon = loadPixmap( pathString + "list" );
885 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 885 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
886 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 886 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
887 showlist_action->addTo( viewMenu ); 887 showlist_action->addTo( viewMenu );
888 connect( showlist_action, SIGNAL( activated() ), 888 connect( showlist_action, SIGNAL( activated() ),
889 mView->viewManager(), SLOT( showListView() ) ); 889 mView->viewManager(), SLOT( showListView() ) );
890 890
891 icon = loadPixmap( pathString + "todo" ); 891 icon = loadPixmap( pathString + "todo" );
892 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 892 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
893 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 893 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
894 todoview_action->addTo( viewMenu ); 894 todoview_action->addTo( viewMenu );
895 connect( todoview_action, SIGNAL( activated() ), 895 connect( todoview_action, SIGNAL( activated() ),
896 mView->viewManager(), SLOT( showTodoView() ) ); 896 mView->viewManager(), SLOT( showTodoView() ) );
897 897
898 898
899 899
900#if 0 900#if 0
901 action = new QAction( "view_timespan", "Time Span", 0, this ); 901 action = new QAction( "view_timespan", "Time Span", 0, this );
902 action->addTo( viewMenu ); 902 action->addTo( viewMenu );
903 connect( action, SIGNAL( activated() ), 903 connect( action, SIGNAL( activated() ),
904 mView->viewManager(), SLOT( showTimeSpanView() ) ); 904 mView->viewManager(), SLOT( showTimeSpanView() ) );
905#endif 905#endif
906 906
907 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 907 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0,
908 this ); 908 this );
909 mNewSubTodoAction->addTo( actionMenu ); 909 mNewSubTodoAction->addTo( actionMenu );
910 connect( mNewSubTodoAction, SIGNAL( activated() ), 910 connect( mNewSubTodoAction, SIGNAL( activated() ),
911 mView, SLOT( newSubTodo() ) ); 911 mView, SLOT( newSubTodo() ) );
912 912
913 actionMenu->insertSeparator(); 913 actionMenu->insertSeparator();
914 914
915 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); 915 mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this );
916 mShowAction->addTo( actionMenu ); 916 mShowAction->addTo( actionMenu );
917 connect( mShowAction, SIGNAL( activated() ), 917 connect( mShowAction, SIGNAL( activated() ),
918 mView, SLOT( showIncidence() ) ); 918 mView, SLOT( showIncidence() ) );
919 919
920 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 920 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this );
921 mEditAction->addTo( actionMenu ); 921 mEditAction->addTo( actionMenu );
922 connect( mEditAction, SIGNAL( activated() ), 922 connect( mEditAction, SIGNAL( activated() ),
923 mView, SLOT( editIncidence() ) ); 923 mView, SLOT( editIncidence() ) );
924 924
925 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 925 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this );
926 mDeleteAction->addTo( actionMenu ); 926 mDeleteAction->addTo( actionMenu );
927 connect( mDeleteAction, SIGNAL( activated() ), 927 connect( mDeleteAction, SIGNAL( activated() ),
928 mView, SLOT( deleteIncidence() ) ); 928 mView, SLOT( deleteIncidence() ) );
929 929
930 930
931 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 931 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this );
932 mCloneAction->addTo( actionMenu ); 932 mCloneAction->addTo( actionMenu );
933 connect( mCloneAction, SIGNAL( activated() ), 933 connect( mCloneAction, SIGNAL( activated() ),
934 mView, SLOT( cloneIncidence() ) ); 934 mView, SLOT( cloneIncidence() ) );
935 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 935 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this );
936 mMoveAction->addTo( actionMenu ); 936 mMoveAction->addTo( actionMenu );
937 connect( mMoveAction, SIGNAL( activated() ), 937 connect( mMoveAction, SIGNAL( activated() ),
938 mView, SLOT( moveIncidence() ) ); 938 mView, SLOT( moveIncidence() ) );
939 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 939 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this );
940 mBeamAction->addTo( actionMenu ); 940 mBeamAction->addTo( actionMenu );
941 connect( mBeamAction, SIGNAL( activated() ), 941 connect( mBeamAction, SIGNAL( activated() ),
942 mView, SLOT( beamIncidence() ) ); 942 mView, SLOT( beamIncidence() ) );
943 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 943 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
944 mCancelAction->addTo( actionMenu ); 944 mCancelAction->addTo( actionMenu );
945 connect( mCancelAction, SIGNAL( activated() ), 945 connect( mCancelAction, SIGNAL( activated() ),
946 mView, SLOT( toggleCancelIncidence() ) ); 946 mView, SLOT( toggleCancelIncidence() ) );
947 947
948 actionMenu->insertSeparator(); 948 actionMenu->insertSeparator();
949 949
950 action = new QAction( "purge_completed", i18n("Purge Completed"), 0, 950 action = new QAction( "purge_completed", i18n("Purge Completed"), 0,
951 this ); 951 this );
952 action->addTo( actionMenu ); 952 action->addTo( actionMenu );
953 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 953 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
954 954
955 icon = loadPixmap( pathString + "search" ); 955 icon = loadPixmap( pathString + "search" );
956 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 956 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
957 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5); 957 configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 5);
958 search_action->addTo( actionMenu ); 958 search_action->addTo( actionMenu );
959 connect( search_action, SIGNAL( activated() ), 959 connect( search_action, SIGNAL( activated() ),
960 mView->dialogManager(), SLOT( showSearchDialog() ) ); 960 mView->dialogManager(), SLOT( showSearchDialog() ) );
961 961
962 962
963 963
964 if ( KOPrefs::instance()->mShowFullMenu ) { 964 if ( KOPrefs::instance()->mShowFullMenu ) {
965 actionMenu->insertSeparator(); 965 actionMenu->insertSeparator();
966 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); 966 actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
967 967
968 } 968 }
969 // actionMenu->insertSeparator(); 969 // actionMenu->insertSeparator();
970 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 970 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
971 this ); 971 this );
972 action->addTo( importMenu_X ); 972 action->addTo( importMenu_X );
973 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); 973 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
974 action = new QAction( "import_quick", i18n("Import last file"), 0, 974 action = new QAction( "import_quick", i18n("Import last file"), 0,
975 this ); 975 this );
976 action->addTo( importMenu_X ); 976 action->addTo( importMenu_X );
977 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); 977 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
978 importMenu_X->insertSeparator(); 978 importMenu_X->insertSeparator();
979 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, 979 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
980 this ); 980 this );
981 action->addTo( importMenu_X ); 981 action->addTo( importMenu_X );
982 connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); 982 connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
983 //#ifndef DESKTOP_VERSION 983 //#ifndef DESKTOP_VERSION
984 importMenu_X->insertSeparator(); 984 importMenu_X->insertSeparator();
985 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, 985 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
986 this ); 986 this );
987 action->addTo( importMenu_X ); 987 action->addTo( importMenu_X );
988 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); 988 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
989 //#else 989 //#else
990#ifdef _OL_IMPORT_ 990#ifdef _OL_IMPORT_
991 importMenu_X->insertSeparator(); 991 importMenu_X->insertSeparator();
992 action = new QAction( "import_ol", i18n("Import from OL"), 0, 992 action = new QAction( "import_ol", i18n("Import from OL"), 0,
993 this ); 993 this );
994 action->addTo( importMenu_X ); 994 action->addTo( importMenu_X );
995 connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); 995 connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
996#endif 996#endif
997 //#endif 997 //#endif
998 998
999 //importMenu->insertSeparator(); 999 //importMenu->insertSeparator();
1000 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, 1000 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0,
1001 this ); 1001 this );
1002 action->addTo( importMenu ); 1002 action->addTo( importMenu );
1003 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); 1003 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
1004 1004
1005 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, 1005 action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0,
1006 this ); 1006 this );
1007 action->addTo( importMenu ); 1007 action->addTo( importMenu );
1008 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); 1008 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) );
1009 importMenu->insertSeparator(); 1009 importMenu->insertSeparator();
1010 importMenu->insertItem( i18n("Import"), importMenu_X ); 1010 importMenu->insertItem( i18n("Import"), importMenu_X );
1011 //importMenu->insertSeparator(); 1011 //importMenu->insertSeparator();
1012 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, 1012 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0,
1013 this ); 1013 this );
1014 action->addTo( exportMenu_X ); 1014 action->addTo( exportMenu_X );
1015 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); 1015 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) );
1016 1016
1017 1017
1018 //LR 1018 //LR
1019 QPopupMenu *ex2phone = new QPopupMenu( this ); 1019 QPopupMenu *ex2phone = new QPopupMenu( this );
1020 ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1020 ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1021 ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1021 ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1022 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); 1022 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) );
1023 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); 1023 exportMenu_X->insertItem( i18n("Export to phone"), ex2phone );
1024 1024
1025 importMenu->insertItem( i18n("Export"), exportMenu_X ); 1025 importMenu->insertItem( i18n("Export"), exportMenu_X );
1026#ifndef DESKTOP_VERSION 1026#ifndef DESKTOP_VERSION
1027 //importMenu->insertSeparator(); 1027 //importMenu->insertSeparator();
1028 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, 1028 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0,
1029 this ); 1029 this );
1030 brAction->addTo( beamMenu_X ); 1030 brAction->addTo( beamMenu_X );
1031 brAction->setToggleAction (true ) ; 1031 brAction->setToggleAction (true ) ;
1032 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); 1032 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) );
1033 1033
1034 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, 1034 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0,
1035 this ); 1035 this );
1036 action->addTo( beamMenu_X ); 1036 action->addTo( beamMenu_X );
1037 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); 1037 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
1038 1038
1039 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, 1039 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0,
1040 this ); 1040 this );
1041 action->addTo( beamMenu_X ); 1041 action->addTo( beamMenu_X );
1042 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); 1042 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
1043 importMenu->insertItem( i18n("Beam"), beamMenu_X ); 1043 importMenu->insertItem( i18n("Beam"), beamMenu_X );
1044#else 1044#else
1045 //importMenu->insertSeparator(); 1045 //importMenu->insertSeparator();
1046 icon = loadPixmap( pathString + "print" ); 1046 icon = loadPixmap( pathString + "print" );
1047 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); 1047 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
1048 action->addTo( beamMenu_X ); 1048 action->addTo( beamMenu_X );
1049 connect( action, SIGNAL( activated() ), 1049 connect( action, SIGNAL( activated() ),
1050 this, SLOT( printCal() ) ); 1050 this, SLOT( printCal() ) );
1051 1051
1052 icon = loadPixmap( pathString + "print" ); 1052 icon = loadPixmap( pathString + "print" );
1053 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 1053 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
1054 action->addTo( beamMenu_X ); 1054 action->addTo( beamMenu_X );
1055 connect( action, SIGNAL( activated() ), 1055 connect( action, SIGNAL( activated() ),
1056 this, SLOT( printSel() ) ); 1056 this, SLOT( printSel() ) );
1057 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 1057 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
1058 action->addTo( beamMenu_X ); 1058 action->addTo( beamMenu_X );
1059 connect( action, SIGNAL( activated() ), 1059 connect( action, SIGNAL( activated() ),
1060 mView->viewManager(), SLOT( slotprintWNV() ) ); 1060 mView->viewManager(), SLOT( slotprintWNV() ) );
1061 1061
1062 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); 1062
1063 icon = loadPixmap( pathString + "print" );
1064 action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this );
1063 action->addTo( beamMenu_X ); 1065 action->addTo( beamMenu_X );
1064 connect( action, SIGNAL( activated() ), 1066 connect( action, SIGNAL( activated() ),
1065 mView, SLOT( slotprintSelInc() ) ); 1067 this, SLOT( printListView() ) );
1066 1068
1067 icon = loadPixmap( pathString + "print" ); 1069 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
1068 action = new QAction( i18n("Print list view..."),icon,i18n("Print list view..."), 0, this );
1069 action->addTo( beamMenu_X ); 1070 action->addTo( beamMenu_X );
1070 connect( action, SIGNAL( activated() ), 1071 connect( action, SIGNAL( activated() ),
1071 this, SLOT( printListView() ) ); 1072 mView, SLOT( slotprintSelInc() ) );
1072 1073
1073 importMenu->insertItem( i18n("Print"), beamMenu_X ); 1074 importMenu->insertItem( i18n("Print"), beamMenu_X );
1074#endif 1075#endif
1075 importMenu->insertSeparator(); 1076 importMenu->insertSeparator();
1076 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 1077 action = new QAction( "manage cat", i18n("Manage new categories..."), 0,
1077 this ); 1078 this );
1078 action->addTo( importMenu ); 1079 action->addTo( importMenu );
1079 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 1080 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
1080 importMenu->insertSeparator(); 1081 importMenu->insertSeparator();
1081 action = new QAction( "beam all", i18n("Save"), 0, 1082 action = new QAction( "beam all", i18n("Save"), 0,
1082 this ); 1083 this );
1083 action->addTo( importMenu ); 1084 action->addTo( importMenu );
1084 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 1085 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
1085 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 1086 action = new QAction( "beam all", i18n("Exit (+save)"), 0,
1086 this ); 1087 this );
1087 action->addTo( importMenu ); 1088 action->addTo( importMenu );
1088 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 1089 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
1089 1090
1090 //menuBar->insertItem( "Configure",configureMenu ); 1091 //menuBar->insertItem( "Configure",configureMenu );
1091 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 1092 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
1092 icon = loadPixmap( "korganizer/korganizer" ); 1093 icon = loadPixmap( "korganizer/korganizer" );
1093 1094
1094 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 1095 action = new QAction( "Whats New", i18n("What's new?"), 0,this );
1095 action->addTo( helpMenu ); 1096 action->addTo( helpMenu );
1096 connect( action, SIGNAL( activated() ), 1097 connect( action, SIGNAL( activated() ),
1097 SLOT( whatsNew() ) ); 1098 SLOT( whatsNew() ) );
1098 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 1099 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
1099 action->addTo( helpMenu ); 1100 action->addTo( helpMenu );
1100 connect( action, SIGNAL( activated() ), 1101 connect( action, SIGNAL( activated() ),
1101 SLOT( features() ) ); 1102 SLOT( features() ) );
1102 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 1103 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
1103 action->addTo( helpMenu ); 1104 action->addTo( helpMenu );
1104 connect( action, SIGNAL( activated() ), 1105 connect( action, SIGNAL( activated() ),
1105 SLOT( keyBindings() ) ); 1106 SLOT( keyBindings() ) );
1106 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); 1107 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this );
1107 action->addTo( helpMenu ); 1108 action->addTo( helpMenu );
1108 connect( action, SIGNAL( activated() ), 1109 connect( action, SIGNAL( activated() ),
1109 SLOT( storagehowto() ) ); 1110 SLOT( storagehowto() ) );
1110 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); 1111 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this );
1111 action->addTo( helpMenu ); 1112 action->addTo( helpMenu );
1112 connect( action, SIGNAL( activated() ), 1113 connect( action, SIGNAL( activated() ),
1113 SLOT( timetrackinghowto() ) ); 1114 SLOT( timetrackinghowto() ) );
1114 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 1115 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
1115 action->addTo( helpMenu ); 1116 action->addTo( helpMenu );
1116 connect( action, SIGNAL( activated() ), 1117 connect( action, SIGNAL( activated() ),
1117 SLOT( synchowto() ) ); 1118 SLOT( synchowto() ) );
1118 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); 1119 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
1119 action->addTo( helpMenu ); 1120 action->addTo( helpMenu );
1120 connect( action, SIGNAL( activated() ), 1121 connect( action, SIGNAL( activated() ),
1121 SLOT( kdesynchowto() ) ); 1122 SLOT( kdesynchowto() ) );
1122 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); 1123 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
1123 action->addTo( helpMenu ); 1124 action->addTo( helpMenu );
1124 connect( action, SIGNAL( activated() ), 1125 connect( action, SIGNAL( activated() ),
1125 SLOT( multisynchowto() ) ); 1126 SLOT( multisynchowto() ) );
1126 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 1127 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
1127 action->addTo( helpMenu ); 1128 action->addTo( helpMenu );
1128 connect( action, SIGNAL( activated() ), 1129 connect( action, SIGNAL( activated() ),
1129 SLOT( aboutAutoSaving() ) ); 1130 SLOT( aboutAutoSaving() ) );
1130 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 1131 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
1131 action->addTo( helpMenu ); 1132 action->addTo( helpMenu );
1132 connect( action, SIGNAL( activated() ), 1133 connect( action, SIGNAL( activated() ),
1133 SLOT( aboutKnownBugs() ) ); 1134 SLOT( aboutKnownBugs() ) );
1134 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 1135 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
1135 action->addTo( helpMenu ); 1136 action->addTo( helpMenu );
1136 connect( action, SIGNAL( activated() ), 1137 connect( action, SIGNAL( activated() ),
1137 SLOT( usertrans() ) ); 1138 SLOT( usertrans() ) );
1138 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 1139 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this );
1139 action->addTo( helpMenu ); 1140 action->addTo( helpMenu );
1140 connect( action, SIGNAL( activated() ), 1141 connect( action, SIGNAL( activated() ),
1141 SLOT( faq() ) ); 1142 SLOT( faq() ) );
1142 action = new QAction( "licence", i18n("Licence..."), 0, this ); 1143 action = new QAction( "licence", i18n("Licence..."), 0, this );
1143 action->addTo( helpMenu ); 1144 action->addTo( helpMenu );
1144 connect( action, SIGNAL( activated() ), 1145 connect( action, SIGNAL( activated() ),
1145 SLOT( licence() ) ); 1146 SLOT( licence() ) );
1146 action = new QAction( "about", i18n("About..."), 0, this ); 1147 action = new QAction( "about", i18n("About..."), 0, this );
1147 action->addTo( helpMenu ); 1148 action->addTo( helpMenu );
1148 connect( action, SIGNAL( activated() ), 1149 connect( action, SIGNAL( activated() ),
1149 SLOT( about() ) ); 1150 SLOT( about() ) );
1150 //menuBar->insertSeparator(); 1151 //menuBar->insertSeparator();
1151 1152
1152 // ****************************************************** 1153 // ******************************************************
1153 // menubar icons 1154 // menubar icons
1154 1155
1155 1156
1156 1157
1157 //menuBar->insertItem( iconToolBar ); 1158 //menuBar->insertItem( iconToolBar );
1158 //xdays_action 1159 //xdays_action
1159 if (p-> mShowIconNewEvent) 1160 if (p-> mShowIconNewEvent)
1160 ne_action->addTo( iconToolBar ); 1161 ne_action->addTo( iconToolBar );
1161 if (p->mShowIconNewTodo ) 1162 if (p->mShowIconNewTodo )
1162 nt_action->addTo( iconToolBar ); 1163 nt_action->addTo( iconToolBar );
1163 if (p-> mShowIconSearch) 1164 if (p-> mShowIconSearch)
1164 search_action->addTo( iconToolBar ); 1165 search_action->addTo( iconToolBar );
1165 if (p-> mShowIconWhatsThis) 1166 if (p-> mShowIconWhatsThis)
1166 QWhatsThis::whatsThisButton ( iconToolBar ); 1167 QWhatsThis::whatsThisButton ( iconToolBar );
1167 if (p-> mShowIconNext) 1168 if (p-> mShowIconNext)
1168 whatsnext_action->addTo( viewToolBar ); 1169 whatsnext_action->addTo( viewToolBar );
1169 if (p-> mShowIconNextDays) 1170 if (p-> mShowIconNextDays)
1170 xdays_action->addTo( viewToolBar ); 1171 xdays_action->addTo( viewToolBar );
1171 if (p-> mShowIconJournal) 1172 if (p-> mShowIconJournal)
1172 viewjournal_action->addTo( viewToolBar ); 1173 viewjournal_action->addTo( viewToolBar );
1173 if (p-> mShowIconDay1) 1174 if (p-> mShowIconDay1)
1174 day1_action->addTo( viewToolBar ); 1175 day1_action->addTo( viewToolBar );
1175 if (p-> mShowIconDay5) 1176 if (p-> mShowIconDay5)
1176 day5_action->addTo( viewToolBar ); 1177 day5_action->addTo( viewToolBar );
1177 if (p-> mShowIconDay7) 1178 if (p-> mShowIconDay7)
1178 day7_action->addTo( viewToolBar ); 1179 day7_action->addTo( viewToolBar );
1179 if (p-> mShowIconDay6) 1180 if (p-> mShowIconDay6)
1180 day6_action->addTo( viewToolBar ); 1181 day6_action->addTo( viewToolBar );
1181 if (p-> mShowIconMonth) 1182 if (p-> mShowIconMonth)
1182 month_action->addTo( viewToolBar ); 1183 month_action->addTo( viewToolBar );
1183 if (p-> mShowIconList) 1184 if (p-> mShowIconList)
1184 showlist_action->addTo( viewToolBar ); 1185 showlist_action->addTo( viewToolBar );
1185 if (p-> mShowIconTodoview) 1186 if (p-> mShowIconTodoview)
1186 todoview_action->addTo( viewToolBar ); 1187 todoview_action->addTo( viewToolBar );
1187 1188
1188 icon = loadPixmap( pathString + "2leftarrowB" ); 1189 icon = loadPixmap( pathString + "2leftarrowB" );
1189 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); 1190 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200);
1190 if (p-> mShowIconBackFast) { 1191 if (p-> mShowIconBackFast) {
1191 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1192 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1192 connect( action, SIGNAL( activated() ), 1193 connect( action, SIGNAL( activated() ),
1193 mView, SLOT( goPreviousMonth() ) ); 1194 mView, SLOT( goPreviousMonth() ) );
1194 action->addTo( navigatorToolBar ); 1195 action->addTo( navigatorToolBar );
1195 } 1196 }
1196 icon = loadPixmap( pathString + "1leftarrowB" ); 1197 icon = loadPixmap( pathString + "1leftarrowB" );
1197 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); 1198 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210);
1198 if (p-> mShowIconBack) { 1199 if (p-> mShowIconBack) {
1199 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1200 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
1200 connect( action, SIGNAL( activated() ), 1201 connect( action, SIGNAL( activated() ),
1201 mView, SLOT( goPrevious() ) ); 1202 mView, SLOT( goPrevious() ) );
1202 action->addTo( navigatorToolBar ); 1203 action->addTo( navigatorToolBar );
1203 } 1204 }
1204 icon = loadPixmap( pathString + "today" ); 1205 icon = loadPixmap( pathString + "today" );
1205 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); 1206 configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
1206 if (p-> mShowIconToday) 1207 if (p-> mShowIconToday)
1207 today_action->addTo( navigatorToolBar ); 1208 today_action->addTo( navigatorToolBar );
1208 icon = loadPixmap( pathString + "1rightarrowB" ); 1209 icon = loadPixmap( pathString + "1rightarrowB" );
1209 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 1210 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
1210 if (p-> mShowIconForward) { 1211 if (p-> mShowIconForward) {
1211 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 1212 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
1212 connect( action, SIGNAL( activated() ), 1213 connect( action, SIGNAL( activated() ),
1213 mView, SLOT( goNext() ) ); 1214 mView, SLOT( goNext() ) );
1214 action->addTo( navigatorToolBar ); 1215 action->addTo( navigatorToolBar );
1215 } 1216 }
1216 icon = loadPixmap( pathString + "2rightarrowB" ); 1217 icon = loadPixmap( pathString + "2rightarrowB" );
1217 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 1218 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
1218 if (p-> mShowIconForwardFast) { 1219 if (p-> mShowIconForwardFast) {
1219 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 1220 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this );
1220 connect( action, SIGNAL( activated() ), 1221 connect( action, SIGNAL( activated() ),
1221 mView, SLOT( goNextMonth() ) ); 1222 mView, SLOT( goNextMonth() ) );
1222 action->addTo( navigatorToolBar ); 1223 action->addTo( navigatorToolBar );
1223 } 1224 }
1224 1225
1225 1226
1226 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); 1227 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6);
1227 1228
1228 1229
1229 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); 1230 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true);
1230 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); 1231 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true);
1231 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); 1232 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true);
1232 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); 1233 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true);
1233 1234
1234 if (p-> mShowIconNewEvent) 1235 if (p-> mShowIconNewEvent)
1235 configureToolBarMenu->setItemChecked( 10, true ); 1236 configureToolBarMenu->setItemChecked( 10, true );
1236 if (p->mShowIconNewTodo ) 1237 if (p->mShowIconNewTodo )
1237 configureToolBarMenu->setItemChecked( 20, true ); 1238 configureToolBarMenu->setItemChecked( 20, true );
1238 if (p-> mShowIconSearch) 1239 if (p-> mShowIconSearch)
1239 configureToolBarMenu->setItemChecked( 120, true ); 1240 configureToolBarMenu->setItemChecked( 120, true );
1240 if (p-> mShowIconList) 1241 if (p-> mShowIconList)
1241 configureToolBarMenu->setItemChecked( 30, true ); 1242 configureToolBarMenu->setItemChecked( 30, true );
1242 if (p-> mShowIconDay1) 1243 if (p-> mShowIconDay1)
1243 configureToolBarMenu->setItemChecked( 40, true ); 1244 configureToolBarMenu->setItemChecked( 40, true );
1244 if (p-> mShowIconDay5) 1245 if (p-> mShowIconDay5)
1245 configureToolBarMenu->setItemChecked( 50, true ); 1246 configureToolBarMenu->setItemChecked( 50, true );
1246 if (p-> mShowIconDay6) 1247 if (p-> mShowIconDay6)
1247 configureToolBarMenu->setItemChecked( 75, true ); 1248 configureToolBarMenu->setItemChecked( 75, true );
1248 if (p-> mShowIconDay7) 1249 if (p-> mShowIconDay7)
1249 configureToolBarMenu->setItemChecked( 60, true ); 1250 configureToolBarMenu->setItemChecked( 60, true );
1250 if (p-> mShowIconMonth) 1251 if (p-> mShowIconMonth)
1251 configureToolBarMenu->setItemChecked( 70, true ); 1252 configureToolBarMenu->setItemChecked( 70, true );
1252 if (p-> mShowIconTodoview) 1253 if (p-> mShowIconTodoview)
1253 configureToolBarMenu->setItemChecked( 80, true ); 1254 configureToolBarMenu->setItemChecked( 80, true );
1254 if (p-> mShowIconBackFast) 1255 if (p-> mShowIconBackFast)
1255 configureToolBarMenu->setItemChecked( 200, true ); 1256 configureToolBarMenu->setItemChecked( 200, true );
1256 if (p-> mShowIconBack) 1257 if (p-> mShowIconBack)
1257 configureToolBarMenu->setItemChecked( 210, true ); 1258 configureToolBarMenu->setItemChecked( 210, true );
1258 if (p-> mShowIconToday) 1259 if (p-> mShowIconToday)
1259 configureToolBarMenu->setItemChecked( 130, true ); 1260 configureToolBarMenu->setItemChecked( 130, true );
1260 if (p-> mShowIconForward) 1261 if (p-> mShowIconForward)
1261 configureToolBarMenu->setItemChecked( 220, true ); 1262 configureToolBarMenu->setItemChecked( 220, true );
1262 if (p-> mShowIconForwardFast) 1263 if (p-> mShowIconForwardFast)
1263 configureToolBarMenu->setItemChecked( 230, true ); 1264 configureToolBarMenu->setItemChecked( 230, true );
@@ -2238,271 +2239,274 @@ void MainWindow::setCaptionToDates()
2238 2239
2239} 2240}
2240void MainWindow::showConfigureAgenda( ) 2241void MainWindow::showConfigureAgenda( )
2241{ 2242{
2242 int iii; 2243 int iii;
2243 for ( iii = 1;iii<= 10 ;++iii ){ 2244 for ( iii = 1;iii<= 10 ;++iii ){
2244 configureAgendaMenu->setItemChecked( (iii+1)*2, false ); 2245 configureAgendaMenu->setItemChecked( (iii+1)*2, false );
2245 } 2246 }
2246 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); 2247 configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true );
2247} 2248}
2248void MainWindow::configureAgenda( int item ) 2249void MainWindow::configureAgenda( int item )
2249{ 2250{
2250 if ( KOPrefs::instance()->mHourSize == item ) 2251 if ( KOPrefs::instance()->mHourSize == item )
2251 return; 2252 return;
2252 KOPrefs::instance()->mHourSize=item; 2253 KOPrefs::instance()->mHourSize=item;
2253 mView->viewManager()->agendaView()->updateConfig(); 2254 mView->viewManager()->agendaView()->updateConfig();
2254} 2255}
2255 2256
2256void MainWindow::saveCalendar() 2257void MainWindow::saveCalendar()
2257{ 2258{
2258 QString fn = KOPrefs::instance()->mLastSaveFile; 2259 QString fn = KOPrefs::instance()->mLastSaveFile;
2259 fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this ); 2260 fn = KFileDialog::getSaveFileName( fn, i18n("Save backup filename"), this );
2260 2261
2261 if ( fn == "" ) 2262 if ( fn == "" )
2262 return; 2263 return;
2263 QFileInfo info; 2264 QFileInfo info;
2264 info.setFile( fn ); 2265 info.setFile( fn );
2265 QString mes; 2266 QString mes;
2266 bool createbup = true; 2267 bool createbup = true;
2267 if ( info. exists() ) { 2268 if ( info. exists() ) {
2268 mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; 2269 mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ;
2269 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 2270 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
2270 i18n("Overwrite!"), i18n("Cancel"), 0, 2271 i18n("Overwrite!"), i18n("Cancel"), 0,
2271 0, 1 ); 2272 0, 1 );
2272 if ( result != 0 ) { 2273 if ( result != 0 ) {
2273 createbup = false; 2274 createbup = false;
2274 } 2275 }
2275 } 2276 }
2276 if ( createbup ) { 2277 if ( createbup ) {
2277 mView->saveCalendar( fn ); 2278 mView->saveCalendar( fn );
2278 mes = i18n("KO/Pi:Saved %1").arg(fn); 2279 mes = i18n("KO/Pi:Saved %1").arg(fn);
2279 KOPrefs::instance()->mLastSaveFile = fn; 2280 KOPrefs::instance()->mLastSaveFile = fn;
2280 setCaption(mes); 2281 setCaption(mes);
2281 } 2282 }
2282} 2283}
2283void MainWindow::loadCalendar() 2284void MainWindow::loadCalendar()
2284{ 2285{
2285 2286
2286 QString fn = KOPrefs::instance()->mLastLoadFile; 2287 QString fn = KOPrefs::instance()->mLastLoadFile;
2287 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); 2288 fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this );
2288 2289
2289 if ( fn == "" ) 2290 if ( fn == "" )
2290 return; 2291 return;
2291 QFileInfo info; 2292 QFileInfo info;
2292 info.setFile( fn ); 2293 info.setFile( fn );
2293 QString mess; 2294 QString mess;
2294 bool loadbup = true; 2295 bool loadbup = true;
2295 if ( info. exists() ) { 2296 if ( info. exists() ) {
2296 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 2297 mess = i18n("Backup file from:\n%1\nLoading backup\nfile will delete\nyour current Data!\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
2297 int result = QMessageBox::warning( this, "KO/Pi: Warning!", 2298 int result = QMessageBox::warning( this, "KO/Pi: Warning!",
2298 mess, 2299 mess,
2299 i18n("Load!"), i18n("Cancel"), 0, 2300 i18n("Load!"), i18n("Cancel"), 0,
2300 0, 1 ); 2301 0, 1 );
2301 if ( result != 0 ) { 2302 if ( result != 0 ) {
2302 loadbup = false; 2303 loadbup = false;
2303 } 2304 }
2304 } else { 2305 } else {
2305 QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 2306 QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
2306 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0, 2307 i18n("Backup file\ndoes not exist!\nNothing loaded!"), 0, 0,
2307 0, 1 ); 2308 0, 1 );
2308 2309
2309 return; 2310 return;
2310 } 2311 }
2311 if ( loadbup ) { 2312 if ( loadbup ) {
2312 mView->openCalendar( fn ); 2313 mView->openCalendar( fn );
2313 KOPrefs::instance()->mLastLoadFile = fn; 2314 KOPrefs::instance()->mLastLoadFile = fn;
2314 mess = i18n("KO/Pi:Loaded %1").arg(fn) ; 2315 mess = i18n("KO/Pi:Loaded %1").arg(fn) ;
2315 setCaption(mess); 2316 setCaption(mess);
2316 } 2317 }
2317 2318
2318} 2319}
2319void MainWindow::quickImportIcal() 2320void MainWindow::quickImportIcal()
2320{ 2321{
2321 importFile( KOPrefs::instance()->mLastImportFile, false ); 2322 importFile( KOPrefs::instance()->mLastImportFile, false );
2322} 2323}
2323void MainWindow::importFile( QString fn, bool quick ) 2324void MainWindow::importFile( QString fn, bool quick )
2324{ 2325{
2325 QFileInfo info; 2326 QFileInfo info;
2326 info.setFile( fn ); 2327 info.setFile( fn );
2327 QString mess; 2328 QString mess;
2328 bool loadbup = true; 2329 bool loadbup = true;
2329 if ( !info. exists() ) { 2330 if ( !info. exists() ) {
2330 mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30)); 2331 mess = i18n("Import file \n...%1\ndoes not exist!\nNothing imported!\n").arg(fn.right( 30));
2331 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), 2332 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
2332 mess ); 2333 mess );
2333 return; 2334 return;
2334 } 2335 }
2335 int result = 0; 2336 int result = 0;
2336 if ( !quick ) { 2337 if ( !quick ) {
2337 mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); 2338 mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
2338 result = QMessageBox::warning( this, "KO/Pi: Warning!", 2339 result = QMessageBox::warning( this, "KO/Pi: Warning!",
2339 mess, 2340 mess,
2340 "Import", "Cancel", 0, 2341 "Import", "Cancel", 0,
2341 0, 1 ); 2342 0, 1 );
2342 } 2343 }
2343 if ( result == 0 ) { 2344 if ( result == 0 ) {
2344 if ( mView->openCalendar( fn, true )) { 2345 if ( mView->openCalendar( fn, true )) {
2345 KOPrefs::instance()->mLastImportFile = fn; 2346 KOPrefs::instance()->mLastImportFile = fn;
2346 setCaption(i18n("Imported file successfully")); 2347 setCaption(i18n("Imported file successfully"));
2347 } else { 2348 } else {
2348 setCaption(i18n("Error importing file")); 2349 setCaption(i18n("Error importing file"));
2349 } 2350 }
2350 } 2351 }
2351} 2352}
2352 2353
2353void MainWindow::importIcal() 2354void MainWindow::importIcal()
2354{ 2355{
2355 2356
2356 QString fn =KOPrefs::instance()->mLastImportFile; 2357 QString fn =KOPrefs::instance()->mLastImportFile;
2357 2358
2358 fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this ); 2359 fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this );
2359 if ( fn == "" ) 2360 if ( fn == "" )
2360 return; 2361 return;
2361 importFile( fn, true ); 2362 importFile( fn, true );
2362 2363
2363} 2364}
2364 2365
2365void MainWindow::exportVCalendar() 2366void MainWindow::exportVCalendar()
2366{ 2367{
2367 QString fn = KOPrefs::instance()->mLastVcalFile; 2368 QString fn = KOPrefs::instance()->mLastVcalFile;
2368 fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this ); 2369 fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this );
2369 if ( fn == "" ) 2370 if ( fn == "" )
2370 return; 2371 return;
2371 QFileInfo info; 2372 QFileInfo info;
2372 info.setFile( fn ); 2373 info.setFile( fn );
2373 QString mes; 2374 QString mes;
2374 bool createbup = true; 2375 bool createbup = true;
2375 if ( info. exists() ) { 2376 if ( info. exists() ) {
2376 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); 2377 mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) );
2377 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes, 2378 int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
2378 i18n("Overwrite!"), i18n("Cancel"), 0, 2379 i18n("Overwrite!"), i18n("Cancel"), 0,
2379 0, 1 ); 2380 0, 1 );
2380 if ( result != 0 ) { 2381 if ( result != 0 ) {
2381 createbup = false; 2382 createbup = false;
2382 } 2383 }
2383 } 2384 }
2384 if ( createbup ) { 2385 if ( createbup ) {
2385 if ( mView->exportVCalendar( fn ) ) { 2386 if ( mView->exportVCalendar( fn ) ) {
2386 KOPrefs::instance()->mLastVcalFile = fn; 2387 KOPrefs::instance()->mLastVcalFile = fn;
2387 if ( fn.length() > 20 ) 2388 if ( fn.length() > 20 )
2388 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; 2389 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ;
2389 else 2390 else
2390 mes = i18n("KO/Pi:Exported to %1").arg(fn ); 2391 mes = i18n("KO/Pi:Exported to %1").arg(fn );
2391 setCaption(mes); 2392 setCaption(mes);
2392 } 2393 }
2393 } 2394 }
2394 2395
2395} 2396}
2396QString MainWindow::sentSyncFile() 2397QString MainWindow::sentSyncFile()
2397{ 2398{
2398#ifdef DESKTOP_VERSION 2399#ifdef DESKTOP_VERSION
2399 return locateLocal( "tmp", "copysynccal.ics" ); 2400 return locateLocal( "tmp", "copysynccal.ics" );
2400#else 2401#else
2401 return QString( "/tmp/copysynccal.ics" ); 2402 return QString( "/tmp/copysynccal.ics" );
2402#endif 2403#endif
2403} 2404}
2404 2405
2405void MainWindow::syncFileRequest() 2406void MainWindow::syncFileRequest()
2406{ 2407{
2407 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2408 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2408 mSyncManager->slotSyncMenu( 999 ); 2409 mSyncManager->slotSyncMenu( 999 );
2409 } 2410 }
2410 2411
2411 setCaption(i18n("Saving Data to temp file ..." )); 2412 setCaption(i18n("Saving Data to temp file ..." ));
2412 mView->saveCalendar( sentSyncFile() ); 2413 mView->saveCalendar( sentSyncFile() );
2413 setCaption(i18n("Data saved to temp file!" )); 2414 setCaption(i18n("Data saved to temp file!" ));
2414 2415
2415} 2416}
2416void MainWindow::getFile( bool success ) 2417void MainWindow::getFile( bool success )
2417{ 2418{
2418 if ( ! success ) { 2419 if ( ! success ) {
2419 setCaption( i18n("Error receiving file. Nothing changed!") ); 2420 setCaption( i18n("Error receiving file. Nothing changed!") );
2420 return; 2421 return;
2421 } 2422 }
2422 mView->openCalendar( sentSyncFile() ); 2423 mView->openCalendar( sentSyncFile() );
2423 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2424 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2424 mSyncManager->slotSyncMenu( 999 ); 2425 mSyncManager->slotSyncMenu( 999 );
2425 } 2426 }
2426 setCaption( i18n("Pi-Sync successful!") ); 2427 setCaption( i18n("Pi-Sync successful!") );
2427} 2428}
2428void MainWindow::printListView() 2429void MainWindow::printListView()
2429{ 2430{
2430 qDebug("MainWindow::printListView() "); 2431
2432 QString message = i18n("You can make a printout of the <b>List View</b> and the list view in the <b>Search Dialog</b>! To do this, please go to the <b>List View/Search Dialog</b>. Right click on the list. Select in the popup menu the entry <b>Print complete list</b>. That prints the list as you see it. You can remove items from the list before printing without deleting the corresponding event/todo! Simply select all items you do not want to print out. Then right click on one of the items and choose <b>Hide selected items</b>. After that you can print the list without these items.");
2433
2434 KMessageBox::information( this, message);
2431} 2435}
2432void MainWindow::printSel( ) 2436void MainWindow::printSel( )
2433{ 2437{
2434 mView->viewManager()->agendaView()->agenda()->printSelection(); 2438 mView->viewManager()->agendaView()->agenda()->printSelection();
2435} 2439}
2436 2440
2437void MainWindow::printCal() 2441void MainWindow::printCal()
2438{ 2442{
2439 mView->print();//mCp->showDialog(); 2443 mView->print();//mCp->showDialog();
2440} 2444}
2441 2445
2442 2446
2443#include "libkdepim/kdatepicker.h" 2447#include "libkdepim/kdatepicker.h"
2444#include <kdatetbl.h> 2448#include <kdatetbl.h>
2445 2449
2446void MainWindow::weekAction() 2450void MainWindow::weekAction()
2447{ 2451{
2448 int month; 2452 int month;
2449 KPopupFrame* popup = new KPopupFrame(this); 2453 KPopupFrame* popup = new KPopupFrame(this);
2450 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup); 2454 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup);
2451 // ----- 2455 // -----
2452 picker->resize(picker->sizeHint()); 2456 picker->resize(picker->sizeHint());
2453 popup->setMainWidget(picker); 2457 popup->setMainWidget(picker);
2454 picker->setFocus(); 2458 picker->setFocus();
2455 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); 2459 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
2456 int x = 0; 2460 int x = 0;
2457 int y = iconToolBar->height(); 2461 int y = iconToolBar->height();
2458 int dX = 0; 2462 int dX = 0;
2459 int dY = 0; 2463 int dY = 0;
2460 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 2464 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2461 if ( iconToolBar->y() > height()/2 ) { 2465 if ( iconToolBar->y() > height()/2 ) {
2462 dY = picker->sizeHint().height()+8; 2466 dY = picker->sizeHint().height()+8;
2463 y = 0; 2467 y = 0;
2464 } 2468 }
2465 } else { 2469 } else {
2466 if ( iconToolBar->x() > width()/2 ) { // right side 2470 if ( iconToolBar->x() > width()/2 ) { // right side
2467 x=0; 2471 x=0;
2468 dX= picker->sizeHint().width()+8; 2472 dX= picker->sizeHint().width()+8;
2469 y = 0; 2473 y = 0;
2470 } else { 2474 } else {
2471 x= iconToolBar->width(); 2475 x= iconToolBar->width();
2472 y = 0; 2476 y = 0;
2473 } 2477 }
2474 } 2478 }
2475 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); 2479 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2476 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) 2480 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))))
2477 { 2481 {
2478 month = picker->getResult(); 2482 month = picker->getResult();
2479 emit selectWeek ( month ); 2483 emit selectWeek ( month );
2480 //qDebug("weekSelected %d ", month); 2484 //qDebug("weekSelected %d ", month);
2481 } 2485 }
2482 delete popup; 2486 delete popup;
2483} 2487}
2484 2488
2485void MainWindow::hideEvent ( QHideEvent * ) 2489void MainWindow::hideEvent ( QHideEvent * )
2486{ 2490{
2487 QString message; 2491 QString message;
2488 QDateTime nextA = mCalendar->nextAlarmEventDateTime(); 2492 QDateTime nextA = mCalendar->nextAlarmEventDateTime();
2489 if ( nextA.isValid() ) { 2493 if ( nextA.isValid() ) {
2490 QString sum = mCalendar->nextSummary(); 2494 QString sum = mCalendar->nextSummary();
2491 2495
2492 message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false)); 2496 message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false));
2493 setCaption( message ); 2497 setCaption( message );
2494 } 2498 }
2495} 2499}
2496 2500
2497void MainWindow::resizeEvent( QResizeEvent* e) 2501void MainWindow::resizeEvent( QResizeEvent* e)
2498{ 2502{
2499#ifndef DESKTOP_VERSION 2503#ifndef DESKTOP_VERSION
2500 if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) { 2504 if ( !KOPrefs::instance()->mShowIconFilter && !KOPrefs::instance()->mShowIconOnetoolbar && QApplication::desktop()->width() > 320) {
2501 if (QApplication::desktop()->width() > QApplication::desktop()->height() ) 2505 if (QApplication::desktop()->width() > QApplication::desktop()->height() )
2502 filterToolBar->hide(); 2506 filterToolBar->hide();
2503 else 2507 else
2504 filterToolBar->show(); 2508 filterToolBar->show();
2505 } 2509 }
2506#endif 2510#endif
2507 QMainWindow::resizeEvent( e); 2511 QMainWindow::resizeEvent( e);
2508} 2512}