author | zautrix <zautrix> | 2005-02-05 11:26:35 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-05 11:26:35 (UTC) |
commit | 86c0d35262454a31ed7d50d3e20cbdace954ebdf (patch) (unidiff) | |
tree | 7ded091fe9111fe20014f8edbc5f338293e36386 /korganizer | |
parent | 3a822a4c4867acb28dc1b3b9557918d0971f732c (diff) | |
download | kdepimpi-86c0d35262454a31ed7d50d3e20cbdace954ebdf.zip kdepimpi-86c0d35262454a31ed7d50d3e20cbdace954ebdf.tar.gz kdepimpi-86c0d35262454a31ed7d50d3e20cbdace954ebdf.tar.bz2 |
another fixx
-rw-r--r-- | korganizer/komonthview.cpp | 2 | ||||
-rw-r--r-- | korganizer/kotodoviewitem.cpp | 26 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 11 |
3 files changed, 22 insertions, 17 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 31c5659..cb519b2 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -1199,13 +1199,13 @@ void KOMonthView::updateView() | |||
1199 | } | 1199 | } |
1200 | } else { | 1200 | } else { |
1201 | if ( invalid ) | 1201 | if ( invalid ) |
1202 | break; | 1202 | break; |
1203 | invalid = true; | 1203 | invalid = true; |
1204 | //qDebug("invalid %s", event->summary().latin1()); | 1204 | //qDebug("invalid %s", event->summary().latin1()); |
1205 | incidenceStart = QDateTime( mStartDate ); | 1205 | incidenceStart = QDateTime( mStartDate ).addSecs( -2 );; |
1206 | } | 1206 | } |
1207 | if ( last ) | 1207 | if ( last ) |
1208 | break; | 1208 | break; |
1209 | bool ok; | 1209 | bool ok; |
1210 | incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok ); | 1210 | incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok ); |
1211 | if ( ! ok ) | 1211 | if ( ! ok ) |
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 6bdee18..78d4027 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp | |||
@@ -325,27 +325,23 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i | |||
325 | QStringList categories = mTodo->categories(); | 325 | QStringList categories = mTodo->categories(); |
326 | QString cat = categories.first(); | 326 | QString cat = categories.first(); |
327 | if ( !cat.isEmpty()) { | 327 | if ( !cat.isEmpty()) { |
328 | colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); | 328 | colorToSet = *(KOPrefs::instance()->categoryColor(cat) ); |
329 | } else | 329 | } else |
330 | setColor = false; | 330 | setColor = false; |
331 | } | 331 | } |
332 | if (mTodo->hasDueDate()) { | 332 | |
333 | if (mTodo->dtDue().date()==QDate::currentDate() && | 333 | int odue = mTodo->hasDueSubTodo( !isOpen()); |
334 | !mTodo->isCompleted()) { | 334 | if (odue == 2) { |
335 | //_cg.setColor( role , KOPrefs::instance()->mTodoDueTodayColor); | 335 | colorToSet = KOPrefs::instance()->mTodoOverdueColor; |
336 | colorToSet = KOPrefs::instance()->mTodoDueTodayColor; | 336 | setColor = true; |
337 | setColor = true; | 337 | } else if ( odue == 1 ) { |
338 | } | 338 | colorToSet = KOPrefs::instance()->mTodoDueTodayColor; |
339 | if (mTodo->dtDue().date() < QDate::currentDate() && | 339 | setColor = true; |
340 | !mTodo->isCompleted()) { | 340 | } |
341 | //_cg.setColor( role, KOPrefs::instance()->mTodoOverdueColor); | 341 | |
342 | colorToSet = KOPrefs::instance()->mTodoOverdueColor; | ||
343 | setColor = true; | ||
344 | } | ||
345 | } | ||
346 | 342 | ||
347 | if ( setColor ) { | 343 | if ( setColor ) { |
348 | _cg.setColor(role,colorToSet ); | 344 | _cg.setColor(role,colorToSet ); |
349 | if ( role == QColorGroup::Base) { | 345 | if ( role == QColorGroup::Base) { |
350 | int rgb = colorToSet.red(); | 346 | int rgb = colorToSet.red(); |
351 | rgb += colorToSet.blue()/2; | 347 | rgb += colorToSet.blue()/2; |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index a2c20a8..5bc8c00 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1343,13 +1343,22 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) | |||
1343 | } | 1343 | } |
1344 | 1344 | ||
1345 | } else { | 1345 | } else { |
1346 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) | 1346 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) |
1347 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ | 1347 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ |
1348 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); | 1348 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); |
1349 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); | 1349 | if ( incidence->categories().contains( i18n("Birthday") ) || incidence->categories().contains( i18n("Anniversary") ) ) { |
1350 | bool ok; | ||
1351 | QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); | ||
1352 | if ( ok ) { | ||
1353 | int years = noc.date().year() - incidence->dtStart().date().year(); | ||
1354 | startString += i18n(" (%1 y.)"). arg( years ); | ||
1355 | } | ||
1356 | } | ||
1357 | else | ||
1358 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); | ||
1350 | } | 1359 | } |
1351 | 1360 | ||
1352 | } | 1361 | } |
1353 | else | 1362 | else |
1354 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); | 1363 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); |
1355 | if ( !incidence->location().isEmpty() ) | 1364 | if ( !incidence->location().isEmpty() ) |