-rw-r--r-- | bin/kdepim/WhatsNew.txt | 5 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 1 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 14 | ||||
-rw-r--r-- | libkdepim/kdatepicker.cpp | 8 | ||||
-rw-r--r-- | microkde/kdatetbl.cpp | 32 |
5 files changed, 34 insertions, 26 deletions
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,10 +1,15 @@ 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. Added possibility to disable auto saving in KO/Pi. How to disable it? Good question! Next question, please? Added info about count of events/todos/journals to calendar info. 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 @@ -1573,9 +1573,8 @@ { "<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>","<br>Der Kalender enthält<br><b>%1 Termine<br>%2 Todos<br>%3 Journale</b>" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, { "","" }, -{ "","" }, diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 610aae6..85e9166 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -732,23 +732,31 @@ int MonthViewCell::insertEvent(Event *event) if ( !event->doesFloat() ) { if ( mDate == event->dtStart().date () ) time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; else if ( mDate == event->dtEnd().date () ) time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; } 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(); if ( useToolTips ) mToolTipText += text; } else { text = KGlobal::locale()->formatTime(event->dtStart().time()); diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index 25b4e81..68ef943 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp @@ -147,16 +147,20 @@ todayBut->setGeometry(0, height()-sizes[0].height(),todaywid, sizes[0].height()) height()-buttonHeight-sizes[0].height()); } void 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)); } void KDatePicker::tableClickedSlot() { emit(dateSelected(table->getDate())); @@ -470,16 +474,20 @@ void KDatePicker::keyPressEvent ( QKeyEvent * e ) yearForwardClicked(); break; case Qt::Key_Up: yearBackwardClicked(); break; + case Qt::Key_T: + goToday(); + break; + case Qt::Key_Return: case Qt::Key_Enter: case Qt::Key_Space: tableClickedSlot(); break; case Qt::Key_Escape: e->ignore(); break; diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp index 4271b55..353f78d 100644 --- a/microkde/kdatetbl.cpp +++ b/microkde/kdatetbl.cpp @@ -235,57 +235,45 @@ KDateTable::keyPressEvent( QKeyEvent *e ) return; } */ int dayoff = KGlobal::locale()->weekStartsMonday() ? 1 : 0; 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<pos+dayoff) - { // this date is in the next month - KNotifyClient::beep(i18n( "Month not long enough" )); - return; - } - - if ( pos == temp ) return; + } - setDate(QDate(date.year(), date.month(), pos-firstday+dayoff)); + pos += add; + setDate(date.addDays( add )); updateCell(temp/7+1, temp%7); // Update the previously selected cell updateCell(pos/7+1, pos%7); // Update the selected cell - assert(QDate(date.year(), date.month(), pos-firstday+dayoff).isValid()); - - + } void KDateTable::viewportResizeEvent(QResizeEvent * e) { QGridView::viewportResizeEvent(e); setCellWidth(viewport()->width()/7); |