From cbda16d4966c7483d20d1b6b5a64c8af367ea732 Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 27 Oct 2005 23:22:36 +0000 Subject: us fix --- diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index edf7eb1..681e433 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -1,5 +1,10 @@ Info about the changes in new versions of KDE-Pim/Pi +********** VERSION 2.2.6 ************ + +KO/Pi: +Made navigation in datepicker more userfriendly when using keyboard for scrolling. + ********** VERSION 2.2.5 ************ Bugfixes in KO/Pi, KA/Pi and OM/Pi. diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 288ce4b..767e243 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1578,4 +1578,3 @@ { "","" }, { "","" }, { "","" }, -{ "","" }, diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 610aae6..85e9166 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -737,13 +737,21 @@ int MonthViewCell::insertEvent(Event *event) } text = time + event->summary(); + + int dur = 0; + if ( event->doesFloat() ) { + dur = event->dtStart().daysTo(event->dtEnd())+1; + + } if ( useToolTips ) { mToolTipText += prefix + text; - if ( event->doesFloat() ) { - mToolTipText += i18n(" (Duration: %1 days)" ).arg ( event->dtStart().daysTo(event->dtEnd())+1); - + if ( dur ) { + mToolTipText += i18n(" (Duration: %1 days)" ).arg ( dur ); } } + if ( dur ) { + text += " ("+ QString::number( dur ) + i18n(" days" ) + ")"; + } } else { if (event->doesFloat()) { text = event->summary(); diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index 25b4e81..68ef943 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp @@ -152,6 +152,10 @@ KDatePicker::dateChangedSlot(QDate date) { lineDate->setDate( date );//(KGlobal::locale()->formatDate(date, true)); //line->setText(KGlobal::locale()->formatDate(date, true)); + QString temp; + selectMonth->setText(KGlobal::locale()->monthName(date.month(), false)); + temp.setNum(date.year()); + selectYear->setText(temp); emit(dateChanged(date)); } @@ -475,6 +479,10 @@ void KDatePicker::keyPressEvent ( QKeyEvent * e ) yearBackwardClicked(); break; + case Qt::Key_T: + goToday(); + break; + case Qt::Key_Return: case Qt::Key_Enter: case Qt::Key_Space: diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp index 4271b55..353f78d 100644 --- a/microkde/kdatetbl.cpp +++ b/microkde/kdatetbl.cpp @@ -240,47 +240,35 @@ KDateTable::keyPressEvent( QKeyEvent *e ) int temp=firstday+date.day()-dayoff; int pos = temp; bool irgnore = true; + int add = 0; if ( e->state() != Qt::ControlButton ) { if ( e->key() == Qt::Key_Up ) { - pos -= 7; + add -= 7; irgnore = false; } if ( e->key() == Qt::Key_Down ) { - pos += 7; + add += 7; irgnore = false; } if ( e->key() == Qt::Key_Left ) { - pos--; + --add; irgnore = false; } if ( e->key() == Qt::Key_Right ) { - pos++; + ++add; irgnore = false; } } - if ( irgnore ) + if ( irgnore ) { e->ignore(); - - if(pos+dayoff<=firstday) - { // this day is in the previous month - KNotifyClient::beep(); - return; - } - if(firstday+numdays