summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt1
-rw-r--r--korganizer/komonthview.cpp14
-rw-r--r--libkdepim/kdatepicker.cpp8
-rw-r--r--microkde/kdatetbl.cpp32
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,4 +1,9 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.2.6 ************
4
5KO/Pi:
6Made navigation in datepicker more userfriendly when using keyboard for scrolling.
7
3********** VERSION 2.2.5 ************ 8********** VERSION 2.2.5 ************
4 9
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
@@ -1579,3 +1579,2 @@
1579{ "","" }, 1579{ "","" },
1580{ "","" }, 1580{ "","" },
1581{ "","" },
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 610aae6..85e9166 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -738,11 +738,19 @@ int MonthViewCell::insertEvent(Event *event)
738 } 738 }
739 text = time + event->summary(); 739 text = time + event->summary();
740
741 int dur = 0;
742 if ( event->doesFloat() ) {
743 dur = event->dtStart().daysTo(event->dtEnd())+1;
744
745 }
740 if ( useToolTips ) { 746 if ( useToolTips ) {
741 mToolTipText += prefix + text; 747 mToolTipText += prefix + text;
742 if ( event->doesFloat() ) { 748 if ( dur ) {
743 mToolTipText += i18n(" (Duration: %1 days)" ).arg ( event->dtStart().daysTo(event->dtEnd())+1); 749 mToolTipText += i18n(" (Duration: %1 days)" ).arg ( dur );
744
745 } 750 }
746 } 751 }
752 if ( dur ) {
753 text += " ("+ QString::number( dur ) + i18n(" days" ) + ")";
754 }
747 } else { 755 } else {
748 if (event->doesFloat()) { 756 if (event->doesFloat()) {
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp
index 25b4e81..68ef943 100644
--- a/libkdepim/kdatepicker.cpp
+++ b/libkdepim/kdatepicker.cpp
@@ -153,4 +153,8 @@ KDatePicker::dateChangedSlot(QDate date)
153 lineDate->setDate( date );//(KGlobal::locale()->formatDate(date, true)); 153 lineDate->setDate( date );//(KGlobal::locale()->formatDate(date, true));
154 //line->setText(KGlobal::locale()->formatDate(date, true)); 154 //line->setText(KGlobal::locale()->formatDate(date, true));
155 QString temp;
156 selectMonth->setText(KGlobal::locale()->monthName(date.month(), false));
157 temp.setNum(date.year());
158 selectYear->setText(temp);
155 emit(dateChanged(date)); 159 emit(dateChanged(date));
156} 160}
@@ -476,4 +480,8 @@ void KDatePicker::keyPressEvent ( QKeyEvent * e )
476 break; 480 break;
477 481
482 case Qt::Key_T:
483 goToday();
484 break;
485
478 case Qt::Key_Return: 486 case Qt::Key_Return:
479 case Qt::Key_Enter: 487 case Qt::Key_Enter:
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp
index 4271b55..353f78d 100644
--- a/microkde/kdatetbl.cpp
+++ b/microkde/kdatetbl.cpp
@@ -241,45 +241,33 @@ KDateTable::keyPressEvent( QKeyEvent *e )
241 int pos = temp; 241 int pos = temp;
242 bool irgnore = true; 242 bool irgnore = true;
243 int add = 0;
243 if ( e->state() != Qt::ControlButton ) { 244 if ( e->state() != Qt::ControlButton ) {
244 if ( e->key() == Qt::Key_Up ) { 245 if ( e->key() == Qt::Key_Up ) {
245 pos -= 7; 246 add -= 7;
246 irgnore = false; 247 irgnore = false;
247 } 248 }
248 if ( e->key() == Qt::Key_Down ) { 249 if ( e->key() == Qt::Key_Down ) {
249 pos += 7; 250 add += 7;
250 irgnore = false; 251 irgnore = false;
251 } 252 }
252 if ( e->key() == Qt::Key_Left ) { 253 if ( e->key() == Qt::Key_Left ) {
253 pos--; 254 --add;
254 irgnore = false; 255 irgnore = false;
255 } 256 }
256 if ( e->key() == Qt::Key_Right ) { 257 if ( e->key() == Qt::Key_Right ) {
257 pos++; 258 ++add;
258 irgnore = false; 259 irgnore = false;
259 } 260 }
260 } 261 }
261 if ( irgnore ) 262 if ( irgnore ) {
262 e->ignore(); 263 e->ignore();
263
264 if(pos+dayoff<=firstday)
265 { // this day is in the previous month
266 KNotifyClient::beep();
267 return;
268 }
269 if(firstday+numdays<pos+dayoff)
270 { // this date is in the next month
271 KNotifyClient::beep(i18n( "Month not long enough" ));
272 return;
273 }
274
275 if ( pos == temp )
276 return; 264 return;
265 }
277 266
278 setDate(QDate(date.year(), date.month(), pos-firstday+dayoff)); 267 pos += add;
268 setDate(date.addDays( add ));
279 updateCell(temp/7+1, temp%7); // Update the previously selected cell 269 updateCell(temp/7+1, temp%7); // Update the previously selected cell
280 updateCell(pos/7+1, pos%7); // Update the selected cell 270 updateCell(pos/7+1, pos%7); // Update the selected cell
281 assert(QDate(date.year(), date.month(), pos-firstday+dayoff).isValid()); 271
282
283
284} 272}
285 273