-rw-r--r-- | korganizer/komonthview.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 5926abe..ffb2e1e 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -553,13 +553,14 @@ void MonthViewCell::insertEvent(Event *event) void MonthViewCell::insertTodo(Todo *todo) { QString text; + mItemList->setFocusPolicy(WheelFocus); if (todo->hasDueDate()) { if (!todo->doesFloat()) { text += KGlobal::locale()->formatTime(todo->dtDue().time()); text += " "; } } - text += i18n("Td: %1").arg(todo->summary()); + text += i18n("T: %1").arg(todo->summary()); MonthViewItem *item = new MonthViewItem( todo, mDate, text ); //item->setPalette( mStandardPalette ); @@ -782,7 +783,6 @@ void MonthViewCell::contextMenu( QListBoxItem *item ) void MonthViewCell::selection( QListBoxItem *item ) { if ( !item ) return; - mMonthView->setSelectedCell( this ); } @@ -1265,10 +1265,16 @@ void KOMonthView::resizeEvent(QResizeEvent * e) { qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); if ( ignoreResizeEvent ) { + int diff = e->size().height() - e->oldSize().height(); + if ( diff < 0 ) + diff = diff * (-1); + if ( diff == ignoreResizeEventHeight ) { qDebug("KOMonthView::resizeEvent ignored "); --ignoreResizeEvent; return; } + ignoreResizeEvent = 0; + } if ( e->size().width()+ e->size().height() < 240 ) return; computeLayout(); @@ -1511,7 +1517,7 @@ MonthViewCell * KOMonthView::selectedCell( ) } void KOMonthView::setSelectedCell( MonthViewCell *cell ) { - // qDebug("KOMonthView::setSelectedCell "); + //qDebug("KOMonthView::setSelectedCell %x ", cell); if ( mSelectedCell && mSelectedCell != cell ) { MonthViewCell * mvc = mSelectedCell; mSelectedCell = cell; @@ -1550,6 +1556,9 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) case Key_Up: { emit prevMonth(); + if ( mShowWeekView ) + mCellsW[0]->setFocus(); + else mCells[0]->setFocus(); } e->accept(); @@ -1557,6 +1566,9 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) case Key_Down: { emit nextMonth(); + if ( mShowWeekView ) + mCellsW[0]->setFocus(); + else mCells[0]->setFocus(); } |