summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
authorzautrix <zautrix>2005-07-06 11:17:00 (UTC)
committer zautrix <zautrix>2005-07-06 11:17:00 (UTC)
commit7e22293b1ec1ee190ca8db6c8ecd079bafdae520 (patch) (unidiff)
treeaed67fbbd844480e3dc0a7b5587edca766b51a5f /korganizer/mainwindow.cpp
parent3b77a857e17e04e47d22ba6017dd723ed922e3fc (diff)
downloadkdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.zip
kdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.tar.gz
kdepimpi-7e22293b1ec1ee190ca8db6c8ecd079bafdae520.tar.bz2
fixes
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 88dbd4f..cbf6096 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1673,26 +1673,30 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
1673 if ( incidence->isBirthday() || incidence->isAnniversary() ) { 1673 if ( incidence->isBirthday() || incidence->isAnniversary() ) {
1674 bool ok; 1674 bool ok;
1675 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); 1675 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok );
1676 if ( ok ) { 1676 if ( ok ) {
1677 int years = noc.date().year() - incidence->dtStart().date().year(); 1677 int years = noc.date().year() - incidence->dtStart().date().year();
1678 startString += i18n(" (%1 y.)"). arg( years ); 1678 startString += i18n(" (%1 y.)"). arg( years );
1679 } 1679 }
1680 } 1680 }
1681 else 1681 else
1682 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); 1682 startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
1683 } 1683 }
1684 } 1684 }
1685 else {
1686 if ( (( KCal::Todo*)incidence)->percentComplete() == 100 )
1687 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+i18n("completed on %1").arg( (( KCal::Todo*)incidence)->completedStr(true) );
1685 else 1688 else
1686 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); 1689 startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
1690 }
1687 if ( !incidence->location().isEmpty() ) 1691 if ( !incidence->location().isEmpty() )
1688 startString += " (" +incidence->location()+")"; 1692 startString += " (" +incidence->location()+")";
1689 setCaption( incidence->summary()+startString); 1693 setCaption( incidence->summary()+startString);
1690 enableIncidenceActions( true ); 1694 enableIncidenceActions( true );
1691 if ( incidence->typeID() == eventID ) { 1695 if ( incidence->typeID() == eventID ) {
1692 mShowAction->setMenuText( i18n("Show Event") ); 1696 mShowAction->setMenuText( i18n("Show Event") );
1693 mNewSubTodoAction->setEnabled( false ); 1697 mNewSubTodoAction->setEnabled( false );
1694 } else if ( incidence->typeID() == todoID ) { 1698 } else if ( incidence->typeID() == todoID ) {
1695 mShowAction->setMenuText( i18n("Show Todo") ); 1699 mShowAction->setMenuText( i18n("Show Todo") );
1696 mNewSubTodoAction->setEnabled( true ); 1700 mNewSubTodoAction->setEnabled( true );
1697 } else { 1701 } else {
1698 mShowAction->setMenuText( i18n("Show") ); 1702 mShowAction->setMenuText( i18n("Show") );