author | zautrix <zautrix> | 2005-01-27 10:15:45 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-27 10:15:45 (UTC) |
commit | 1501a5d8a25e3474fb450d7e0b272feb14821d1c (patch) (unidiff) | |
tree | 70a8fcafed89f6dc8225af9908e845c0feecd7d9 | |
parent | e4beb835276376646307bea74430008c332bd387 (diff) | |
download | kdepimpi-1501a5d8a25e3474fb450d7e0b272feb14821d1c.zip kdepimpi-1501a5d8a25e3474fb450d7e0b272feb14821d1c.tar.gz kdepimpi-1501a5d8a25e3474fb450d7e0b272feb14821d1c.tar.bz2 |
fix
-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 | |||
@@ -116,5 +116,8 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | |||
116 | break; | 116 | break; |
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()); |
120 | if(!itemVisible(currentItem())) { | 123 | if(!itemVisible(currentItem())) { |
@@ -127,5 +130,8 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) | |||
127 | break; | 130 | break; |
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()); |
131 | if(!itemVisible(currentItem())) { | 137 | if(!itemVisible(currentItem())) { |
@@ -950,4 +956,5 @@ void KOMonthView::changeEventDisplay(Event *, int) | |||
950 | void KOMonthView::updateView() | 956 | void KOMonthView::updateView() |
951 | { | 957 | { |
958 | |||
952 | if ( !updatePossible ) | 959 | if ( !updatePossible ) |
953 | return; | 960 | return; |
@@ -961,4 +968,5 @@ void KOMonthView::updateView() | |||
961 | processSelectionChange(); | 968 | processSelectionChange(); |
962 | // qDebug("---------------------------------------------------------------------+ "); | 969 | // qDebug("---------------------------------------------------------------------+ "); |
970 | setFocus(); | ||
963 | } | 971 | } |
964 | 972 | ||
@@ -1124,6 +1132,23 @@ void KOMonthView::clearSelection() | |||
1124 | void KOMonthView::keyPressEvent ( QKeyEvent * e ) | 1132 | 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 | |||
@@ -238,4 +238,6 @@ class KOMonthView: public KOEventView | |||
238 | void processSelectionChange(); | 238 | void processSelectionChange(); |
239 | signals: | 239 | signals: |
240 | void nextMonth(); | ||
241 | void prevMonth(); | ||
240 | void selectWeekNum ( int ); | 242 | void selectWeekNum ( int ); |
241 | void showDaySignal( QDate ); | 243 | void showDaySignal( QDate ); |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 94c459b..e8d5ab1 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -458,4 +458,8 @@ void KOViewManager::showMonthView() | |||
458 | mMainView, SLOT ( showDay( QDate ) ) ); | 458 | mMainView, SLOT ( showDay( QDate ) ) ); |
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(); |
461 | } | 465 | } |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 145b36c..950d2ec 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1737,5 +1737,5 @@ void MainWindow::showConfigureAgenda( ) | |||
1737 | configureAgendaMenu->setItemChecked( (iii+1)*2, false ); | 1737 | configureAgendaMenu->setItemChecked( (iii+1)*2, false ); |
1738 | } | 1738 | } |
1739 | configureAgendaMenu->setItemChecked( KOPrefs::instance()->mHourSize, true ); | 1739 | configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); |
1740 | } | 1740 | } |
1741 | void MainWindow::configureAgenda( int item ) | 1741 | void MainWindow::configureAgenda( int item ) |