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/mainwindow.cpp | |
parent | 3a822a4c4867acb28dc1b3b9557918d0971f732c (diff) | |
download | kdepimpi-86c0d35262454a31ed7d50d3e20cbdace954ebdf.zip kdepimpi-86c0d35262454a31ed7d50d3e20cbdace954ebdf.tar.gz kdepimpi-86c0d35262454a31ed7d50d3e20cbdace954ebdf.tar.bz2 |
another fixx
-rw-r--r-- | korganizer/mainwindow.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index a2c20a8..5bc8c00 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1325,48 +1325,57 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) | |||
1325 | mNewSubTodoAction->setEnabled( false ); | 1325 | mNewSubTodoAction->setEnabled( false ); |
1326 | setCaptionToDates(); | 1326 | setCaptionToDates(); |
1327 | return; | 1327 | return; |
1328 | 1328 | ||
1329 | } | 1329 | } |
1330 | 1330 | ||
1331 | //KGlobal::locale()->formatDateTime(nextA, true); | 1331 | //KGlobal::locale()->formatDateTime(nextA, true); |
1332 | QString startString = ""; | 1332 | QString startString = ""; |
1333 | if ( incidence->type() != "Todo" ) { | 1333 | if ( incidence->type() != "Todo" ) { |
1334 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { | 1334 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { |
1335 | if ( incidence->doesFloat() ) { | 1335 | if ( incidence->doesFloat() ) { |
1336 | startString += ": "+incidence->dtStartDateStr( true ); | 1336 | startString += ": "+incidence->dtStartDateStr( true ); |
1337 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); | 1337 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); |
1338 | 1338 | ||
1339 | } else { | 1339 | } else { |
1340 | startString = ": "+incidence->dtStartStr(true); | 1340 | startString = ": "+incidence->dtStartStr(true); |
1341 | startString += " --- "+((Event*)incidence)->dtEndStr(true); | 1341 | startString += " --- "+((Event*)incidence)->dtEndStr(true); |
1342 | 1342 | ||
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 | 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 | ||
1349 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); | 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() ) |
1356 | startString += " (" +incidence->location()+")"; | 1365 | startString += " (" +incidence->location()+")"; |
1357 | setCaption( incidence->summary()+startString); | 1366 | setCaption( incidence->summary()+startString); |
1358 | 1367 | ||
1359 | enableIncidenceActions( true ); | 1368 | enableIncidenceActions( true ); |
1360 | 1369 | ||
1361 | if ( incidence->type() == "Event" ) { | 1370 | if ( incidence->type() == "Event" ) { |
1362 | mShowAction->setText( i18n("Show Event...") ); | 1371 | mShowAction->setText( i18n("Show Event...") ); |
1363 | mEditAction->setText( i18n("Edit Event...") ); | 1372 | mEditAction->setText( i18n("Edit Event...") ); |
1364 | mDeleteAction->setText( i18n("Delete Event...") ); | 1373 | mDeleteAction->setText( i18n("Delete Event...") ); |
1365 | 1374 | ||
1366 | mNewSubTodoAction->setEnabled( false ); | 1375 | mNewSubTodoAction->setEnabled( false ); |
1367 | } else if ( incidence->type() == "Todo" ) { | 1376 | } else if ( incidence->type() == "Todo" ) { |
1368 | mShowAction->setText( i18n("Show Todo...") ); | 1377 | mShowAction->setText( i18n("Show Todo...") ); |
1369 | mEditAction->setText( i18n("Edit Todo...") ); | 1378 | mEditAction->setText( i18n("Edit Todo...") ); |
1370 | mDeleteAction->setText( i18n("Delete Todo...") ); | 1379 | mDeleteAction->setText( i18n("Delete Todo...") ); |
1371 | 1380 | ||
1372 | mNewSubTodoAction->setEnabled( true ); | 1381 | mNewSubTodoAction->setEnabled( true ); |