-rw-r--r-- | korganizer/komonthview.cpp | 33 | ||||
-rw-r--r-- | korganizer/komonthview.h | 2 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 2 |
4 files changed, 36 insertions, 5 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 437debe..10e4f1d 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -117,3 +117,6 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | |||
117 | case Key_Up: | 117 | case Key_Up: |
118 | if(!count()) break; | 118 | if(count() < 2) { |
119 | e->ignore(); | ||
120 | break; | ||
121 | } | ||
119 | setCurrentItem((currentItem()+count()-1)%count()); | 122 | setCurrentItem((currentItem()+count()-1)%count()); |
@@ -128,3 +131,6 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | |||
128 | case Key_Down: | 131 | case Key_Down: |
129 | if(!count()) break; | 132 | if(count() < 2) { |
133 | e->ignore(); | ||
134 | break; | ||
135 | } | ||
130 | setCurrentItem((currentItem()+1)%count()); | 136 | setCurrentItem((currentItem()+1)%count()); |
@@ -951,2 +957,3 @@ void KOMonthView::updateView() | |||
951 | { | 957 | { |
958 | |||
952 | if ( !updatePossible ) | 959 | if ( !updatePossible ) |
@@ -962,2 +969,3 @@ void KOMonthView::updateView() | |||
962 | // qDebug("---------------------------------------------------------------------+ "); | 969 | // qDebug("---------------------------------------------------------------------+ "); |
970 | setFocus(); | ||
963 | } | 971 | } |
@@ -1125,5 +1133,22 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) | |||
1125 | { | 1133 | { |
1126 | 1134 | switch(e->key()) { | |
1135 | break; | ||
1136 | case Key_Up: | ||
1137 | { | ||
1138 | emit prevMonth(); | ||
1139 | setFocus(); | ||
1140 | } | ||
1141 | e->accept(); | ||
1142 | break; | ||
1143 | case Key_Down: | ||
1144 | { | ||
1145 | emit nextMonth(); | ||
1146 | setFocus(); | ||
1147 | } | ||
1148 | e->accept(); | ||
1149 | break; | ||
1150 | default: | ||
1127 | e->ignore(); | 1151 | e->ignore(); |
1128 | 1152 | break; | |
1153 | } | ||
1129 | } | 1154 | } |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index a965bf3..50903b3 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -239,2 +239,4 @@ class KOMonthView: public KOEventView | |||
239 | signals: | 239 | signals: |
240 | void nextMonth(); | ||
241 | void prevMonth(); | ||
240 | void selectWeekNum ( int ); | 242 | void selectWeekNum ( int ); |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 94c459b..e8d5ab1 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -459,2 +459,6 @@ void KOViewManager::showMonthView() | |||
459 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); | 459 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); |
460 | connect( mMonthView, SIGNAL(nextMonth() ), | ||
461 | mMainView->navigatorBar(), SIGNAL(goNextMonth() ) ); | ||
462 | connect( mMonthView, SIGNAL(prevMonth() ), | ||
463 | mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) ); | ||
460 | mMonthView->updateConfig(); | 464 | mMonthView->updateConfig(); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 145b36c..950d2ec 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1738,3 +1738,3 @@ void MainWindow::showConfigureAgenda( ) | |||
1738 | } | 1738 | } |
1739 | configureAgendaMenu->setItemChecked( KOPrefs::instance()->mHourSize, true ); | 1739 | configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); |
1740 | } | 1740 | } |