-rw-r--r-- | core/pim/addressbook/abtable.cpp | 5 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 34 |
2 files changed, 20 insertions, 19 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 4feadeb..5222f16 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <qpe/config.h> | 24 | #include <qpe/config.h> |
25 | #include <qpe/stringutil.h> | 25 | #include <qpe/stringutil.h> |
26 | #include <qpe/qcopenvelope_qws.h> | 26 | #include <qpe/qcopenvelope_qws.h> |
27 | #include <qpe/timestring.h> | ||
27 | 28 | ||
28 | #include <opie/orecordlist.h> | 29 | #include <opie/orecordlist.h> |
29 | 30 | ||
@@ -450,10 +451,10 @@ QString AbTable::findContactContact( const OContact &entry, int /* row */ ) | |||
450 | value = entry.gender(); | 451 | value = entry.gender(); |
451 | break; | 452 | break; |
452 | case Qtopia::Birthday: | 453 | case Qtopia::Birthday: |
453 | value = entry.birthday(); | 454 | value = TimeString::numberDateString( entry.birthday() ); |
454 | break; | 455 | break; |
455 | case Qtopia::Anniversary: | 456 | case Qtopia::Anniversary: |
456 | value = entry.anniversary(); | 457 | value = TimeString::numberDateString( entry.anniversary() ); |
457 | break; | 458 | break; |
458 | case Qtopia::Nickname: | 459 | case Qtopia::Nickname: |
459 | value = entry.nickname(); | 460 | value = entry.nickname(); |
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 52ab0f2..e034b35 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -1,5 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org> | 2 | * Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org> |
3 | * Copyright (C) 2002 by Stefan Eilers (eilers.stefan@epost.de) | ||
3 | * | 4 | * |
4 | * This file is an add-on for the OPIE Palmtop Environment | 5 | * This file is an add-on for the OPIE Palmtop Environment |
5 | * | 6 | * |
@@ -1108,20 +1109,6 @@ void ContactEditor::loadFields() { | |||
1108 | if ( *it == "Children" ) | 1109 | if ( *it == "Children" ) |
1109 | (*lit)->setText( tr( "Children" ) ); | 1110 | (*lit)->setText( tr( "Children" ) ); |
1110 | } | 1111 | } |
1111 | // Set DatePicker | ||
1112 | qWarning ("**Info: %s", ent.birthday().latin1() ); | ||
1113 | if ( !ent.birthday().isEmpty() ){ | ||
1114 | birthdayButton->setText( ent.birthday() ); | ||
1115 | birthdayPicker->setDate( TimeConversion::fromString ( ent.birthday() ) ); | ||
1116 | } else | ||
1117 | birthdayButton->setText( tr ("Unknown") ); | ||
1118 | |||
1119 | qWarning ("**Info: %s", ent.anniversary().latin1() ); | ||
1120 | if ( !ent.anniversary().isEmpty() ){ | ||
1121 | anniversaryButton->setText( ent.anniversary() ); | ||
1122 | anniversaryPicker->setDate( TimeConversion::fromString ( ent.birthday() ) ); | ||
1123 | } else | ||
1124 | anniversaryButton->setText( tr ("Unknown") ); | ||
1125 | 1112 | ||
1126 | } | 1113 | } |
1127 | 1114 | ||
@@ -1601,7 +1588,20 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1601 | 1588 | ||
1602 | slotAddressTypeChange( cmbAddress->currentItem() ); | 1589 | slotAddressTypeChange( cmbAddress->currentItem() ); |
1603 | 1590 | ||
1604 | loadFields(); | 1591 | // loadFields(); :SX |
1592 | |||
1593 | // Set DatePicker | ||
1594 | if ( !ent.birthday().isNull() ){ | ||
1595 | birthdayButton->setText( TimeString::numberDateString( ent.birthday() ) ); | ||
1596 | birthdayPicker->setDate( ent.birthday() ); | ||
1597 | } else | ||
1598 | birthdayButton->setText( tr ("Unknown") ); | ||
1599 | |||
1600 | if ( !ent.anniversary().isNull() ){ | ||
1601 | anniversaryButton->setText( TimeString::numberDateString( ent.anniversary() ) ); | ||
1602 | anniversaryPicker->setDate( ent.anniversary() ); | ||
1603 | } else | ||
1604 | anniversaryButton->setText( tr ("Unknown") ); | ||
1605 | 1605 | ||
1606 | } | 1606 | } |
1607 | 1607 | ||
@@ -1891,7 +1891,7 @@ void ContactEditor::slotAnniversaryDateChanged( int year, int month, int day) | |||
1891 | date.setYMD( year, month, day ); | 1891 | date.setYMD( year, month, day ); |
1892 | QString dateString = TimeString::numberDateString( date ); | 1892 | QString dateString = TimeString::numberDateString( date ); |
1893 | anniversaryButton->setText( dateString ); | 1893 | anniversaryButton->setText( dateString ); |
1894 | ent.setAnniversary ( dateString ); | 1894 | ent.setAnniversary ( date ); |
1895 | } | 1895 | } |
1896 | 1896 | ||
1897 | void ContactEditor::slotBirthdayDateChanged( int year, int month, int day) | 1897 | void ContactEditor::slotBirthdayDateChanged( int year, int month, int day) |
@@ -1900,5 +1900,5 @@ void ContactEditor::slotBirthdayDateChanged( int year, int month, int day) | |||
1900 | date.setYMD( year, month, day ); | 1900 | date.setYMD( year, month, day ); |
1901 | QString dateString = TimeString::numberDateString( date ); | 1901 | QString dateString = TimeString::numberDateString( date ); |
1902 | birthdayButton->setText( dateString ); | 1902 | birthdayButton->setText( dateString ); |
1903 | ent.setBirthday ( dateString ); | 1903 | ent.setBirthday ( date ); |
1904 | } | 1904 | } |