-rw-r--r-- | korganizer/mainwindow.cpp | 71 |
1 files changed, 49 insertions, 22 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 9c2ac82..bfae1b5 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -659,6 +659,7 @@ void MainWindow::initActions() | |||
659 | QPopupMenu *viewMenu = new QPopupMenu( this ); | 659 | QPopupMenu *viewMenu = new QPopupMenu( this ); |
660 | QPopupMenu *actionMenu = new QPopupMenu( this ); | 660 | QPopupMenu *actionMenu = new QPopupMenu( this ); |
661 | mCurrentItemMenu = new QPopupMenu ( this ); | 661 | mCurrentItemMenu = new QPopupMenu ( this ); |
662 | QPopupMenu *nextConflictMenu = new QPopupMenu ( this ); | ||
662 | QPopupMenu *importMenu = new QPopupMenu( this ); | 663 | QPopupMenu *importMenu = new QPopupMenu( this ); |
663 | QPopupMenu *importMenu_X = new QPopupMenu( this ); | 664 | QPopupMenu *importMenu_X = new QPopupMenu( this ); |
664 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); | 665 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); |
@@ -789,15 +790,42 @@ void MainWindow::initActions() | |||
789 | search_action->addTo( actionMenu ); | 790 | search_action->addTo( actionMenu ); |
790 | connect( search_action, SIGNAL( activated() ), | 791 | connect( search_action, SIGNAL( activated() ), |
791 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 792 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
793 | actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu ); | ||
792 | 794 | ||
795 | action = new QAction( "Undo Delete", i18n("All events"), 0, this ); | ||
796 | action->addTo( nextConflictMenu ); | ||
797 | connect( action, SIGNAL( activated() ), | ||
798 | mView, SLOT( conflictAll() ) ); | ||
799 | |||
800 | action = new QAction( "Undo Delete", i18n("Allday events"), 0, this ); | ||
801 | action->addTo( nextConflictMenu ); | ||
802 | connect( action, SIGNAL( activated() ), | ||
803 | mView, SLOT( conflictAllday() ) ); | ||
804 | |||
805 | action = new QAction( "Undo Delete", i18n("Events with time"), 0, this ); | ||
806 | action->addTo( nextConflictMenu ); | ||
807 | connect( action, SIGNAL( activated() ), | ||
808 | mView, SLOT( conflictNotAll() ) ); | ||
809 | |||
793 | actionMenu->insertSeparator(); | 810 | actionMenu->insertSeparator(); |
794 | 811 | ||
812 | icon = loadPixmap( pathString + "newevent" ); | ||
813 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | ||
814 | ne_action->addTo( mCurrentItemMenu ); | ||
815 | connect( ne_action, SIGNAL( activated() ), | ||
816 | mView, SLOT( newEvent() ) ); | ||
817 | icon = loadPixmap( pathString + "newtodo" ); | ||
818 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | ||
819 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | ||
820 | nt_action->addTo( mCurrentItemMenu ); | ||
821 | connect( nt_action, SIGNAL( activated() ), | ||
822 | mView, SLOT( newTodo() ) ); | ||
823 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | ||
824 | this ); | ||
825 | mNewSubTodoAction->addTo( mCurrentItemMenu ); | ||
826 | connect( mNewSubTodoAction, SIGNAL( activated() ), | ||
827 | mView, SLOT( newSubTodo() ) ); | ||
795 | 828 | ||
796 | |||
797 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | ||
798 | action->addTo( mCurrentItemMenu ); | ||
799 | connect( action, SIGNAL( activated() ), | ||
800 | mView, SLOT( undo_delete() ) ); | ||
801 | mCurrentItemMenu->insertSeparator(); | 829 | mCurrentItemMenu->insertSeparator(); |
802 | icon = loadPixmap( pathString + "newevent" ); | 830 | icon = loadPixmap( pathString + "newevent" ); |
803 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 831 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
@@ -844,18 +872,12 @@ void MainWindow::initActions() | |||
844 | connect( mCancelAction, SIGNAL( activated() ), | 872 | connect( mCancelAction, SIGNAL( activated() ), |
845 | mView, SLOT( toggleCancelIncidence() ) ); | 873 | mView, SLOT( toggleCancelIncidence() ) ); |
846 | 874 | ||
847 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 875 | |
848 | ne_action->addTo( actionMenu ); | 876 | mCurrentItemMenu->insertSeparator(); |
849 | connect( ne_action, SIGNAL( activated() ), | 877 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
850 | mView, SLOT( newEvent() ) ); | 878 | action->addTo( mCurrentItemMenu ); |
851 | icon = loadPixmap( pathString + "newtodo" ); | 879 | connect( action, SIGNAL( activated() ), |
852 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 880 | mView, SLOT( undo_delete() ) ); |
853 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | ||
854 | nt_action->addTo( actionMenu ); | ||
855 | connect( nt_action, SIGNAL( activated() ), | ||
856 | mView, SLOT( newTodo() ) ); | ||
857 | |||
858 | |||
859 | 881 | ||
860 | // *********************** | 882 | // *********************** |
861 | if ( KOPrefs::instance()->mVerticalScreen ) { | 883 | if ( KOPrefs::instance()->mVerticalScreen ) { |
@@ -996,11 +1018,7 @@ void MainWindow::initActions() | |||
996 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 1018 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
997 | #endif | 1019 | #endif |
998 | 1020 | ||
999 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 1021 | |
1000 | this ); | ||
1001 | mNewSubTodoAction->addTo( actionMenu ); | ||
1002 | connect( mNewSubTodoAction, SIGNAL( activated() ), | ||
1003 | mView, SLOT( newSubTodo() ) ); | ||
1004 | 1022 | ||
1005 | action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, | 1023 | action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, |
1006 | this ); | 1024 | this ); |
@@ -1565,6 +1583,7 @@ void MainWindow::keyBindings() | |||
1565 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1583 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1566 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1584 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1567 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ | 1585 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ |
1586 | i18n("<p><b>Q</b>: Show next date with conflicting events\n ")+ | ||
1568 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1587 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1569 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1588 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1570 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1589 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
@@ -2099,6 +2118,14 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
2099 | showSelectedDates = true; | 2118 | showSelectedDates = true; |
2100 | } | 2119 | } |
2101 | break; | 2120 | break; |
2121 | case Qt::Key_Q: | ||
2122 | if ( e->state() == Qt::ControlButton ) | ||
2123 | mView->conflictNotAll(); | ||
2124 | else if ( e->state() == Qt::ShiftButton ) | ||
2125 | mView->conflictAllday(); | ||
2126 | else | ||
2127 | mView->conflictAll(); | ||
2128 | break; | ||
2102 | case Qt::Key_J: | 2129 | case Qt::Key_J: |
2103 | mView->viewManager()->showJournalView(); | 2130 | mView->viewManager()->showJournalView(); |
2104 | break; | 2131 | break; |