summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-27 10:15:45 (UTC)
committer zautrix <zautrix>2005-01-27 10:15:45 (UTC)
commit1501a5d8a25e3474fb450d7e0b272feb14821d1c (patch) (unidiff)
tree70a8fcafed89f6dc8225af9908e845c0feecd7d9
parente4beb835276376646307bea74430008c332bd387 (diff)
downloadkdepimpi-1501a5d8a25e3474fb450d7e0b272feb14821d1c.zip
kdepimpi-1501a5d8a25e3474fb450d7e0b272feb14821d1c.tar.gz
kdepimpi-1501a5d8a25e3474fb450d7e0b272feb14821d1c.tar.bz2
fix
Diffstat (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
@@ -115,7 +115,10 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
115 scrollBy(-4,0); 115 scrollBy(-4,0);
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())) {
121 if((unsigned int) currentItem() == (count()-1)) { 124 if((unsigned int) currentItem() == (count()-1)) {
@@ -126,7 +129,10 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
126 } 129 }
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())) {
132 if(currentItem() == 0) { 138 if(currentItem() == 0) {
@@ -949,6 +955,7 @@ void KOMonthView::changeEventDisplay(Event *, int)
949 955
950void KOMonthView::updateView() 956void KOMonthView::updateView()
951{ 957{
958
952 if ( !updatePossible ) 959 if ( !updatePossible )
953 return; 960 return;
954 //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "); 961 //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ");
@@ -960,6 +967,7 @@ void KOMonthView::updateView()
960 //qDebug("KOMonthView::updateView() "); 967 //qDebug("KOMonthView::updateView() ");
961 processSelectionChange(); 968 processSelectionChange();
962 // qDebug("---------------------------------------------------------------------+ "); 969 // qDebug("---------------------------------------------------------------------+ ");
970 setFocus();
963} 971}
964 972
965void KOMonthView::resizeEvent(QResizeEvent * e) 973void KOMonthView::resizeEvent(QResizeEvent * e)
@@ -1123,7 +1131,24 @@ void KOMonthView::clearSelection()
1123} 1131}
1124void KOMonthView::keyPressEvent ( QKeyEvent * e ) 1132void 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
@@ -237,6 +237,8 @@ class KOMonthView: public KOEventView
237 protected slots: 237 protected slots:
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 );
242 protected: 244 protected:
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 94c459b..e8d5ab1 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -457,6 +457,10 @@ void KOViewManager::showMonthView()
457 connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), 457 connect( mMonthView, SIGNAL( showDaySignal( QDate ) ),
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 }
462 466
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 145b36c..950d2ec 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1736,7 +1736,7 @@ void MainWindow::showConfigureAgenda( )
1736 for ( iii = 1;iii<= 10 ;++iii ){ 1736 for ( iii = 1;iii<= 10 ;++iii ){
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}
1741void MainWindow::configureAgenda( int item ) 1741void MainWindow::configureAgenda( int item )
1742{ 1742{