summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp33
-rw-r--r--korganizer/komonthview.h2
-rw-r--r--korganizer/koviewmanager.cpp4
-rw-r--r--korganizer/mainwindow.cpp2
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)
case Key_Up:
- if(!count()) break;
+ if(count() < 2) {
+ e->ignore();
+ break;
+ }
setCurrentItem((currentItem()+count()-1)%count());
@@ -128,3 +131,6 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
case Key_Down:
- if(!count()) break;
+ if(count() < 2) {
+ e->ignore();
+ break;
+ }
setCurrentItem((currentItem()+1)%count());
@@ -951,2 +957,3 @@ void KOMonthView::updateView()
{
+
if ( !updatePossible )
@@ -962,2 +969,3 @@ void KOMonthView::updateView()
// qDebug("---------------------------------------------------------------------+ ");
+ setFocus();
}
@@ -1125,5 +1133,22 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
{
-
+ switch(e->key()) {
+ break;
+ case Key_Up:
+ {
+ emit prevMonth();
+ setFocus();
+ }
+ e->accept();
+ break;
+ case Key_Down:
+ {
+ emit nextMonth();
+ setFocus();
+ }
+ e->accept();
+ break;
+ default:
e->ignore();
-
+ break;
+ }
}
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
signals:
+ void nextMonth();
+ void prevMonth();
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()
connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig()));
+ connect( mMonthView, SIGNAL(nextMonth() ),
+ mMainView->navigatorBar(), SIGNAL(goNextMonth() ) );
+ connect( mMonthView, SIGNAL(prevMonth() ),
+ mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) );
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( )
}
- configureAgendaMenu->setItemChecked( KOPrefs::instance()->mHourSize, true );
+ configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true );
}