summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/contacteditor.cpp
Unidiff
Diffstat (limited to 'core/pim/addressbook/contacteditor.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/contacteditor.cpp34
1 files changed, 17 insertions, 17 deletions
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,8 +1,9 @@
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 *
6 * This file may be distributed and/or modified under the terms of the 7 * This file may be distributed and/or modified under the terms of the
7 * GNU General Public License version 2 as published by the Free Software 8 * GNU General Public License version 2 as published by the Free Software
8 * Foundation and appearing in the file LICENSE.GPL included in the pacakaging 9 * Foundation and appearing in the file LICENSE.GPL included in the pacakaging
@@ -1105,26 +1106,12 @@ void ContactEditor::loadFields() {
1105 if ( *it == "Nickname" ) 1106 if ( *it == "Nickname" )
1106 (*lit)->setText( tr( "Nickname" ) ); 1107 (*lit)->setText( tr( "Nickname" ) );
1107 1108
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
1128void ContactEditor::accept() { 1115void ContactEditor::accept() {
1129 1116
1130 if ( isEmpty() ) { 1117 if ( isEmpty() ) {
@@ -1598,13 +1585,26 @@ void ContactEditor::setEntry( const OContact &entry ) {
1598 slotCmbChooser1Change( cmbChooserField1->currentItem() ); 1585 slotCmbChooser1Change( cmbChooserField1->currentItem() );
1599 slotCmbChooser2Change( cmbChooserField2->currentItem() ); 1586 slotCmbChooser2Change( cmbChooserField2->currentItem() );
1600 slotCmbChooser3Change( cmbChooserField3->currentItem() ); 1587 slotCmbChooser3Change( cmbChooserField3->currentItem() );
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
1608void ContactEditor::saveEntry() { 1608void ContactEditor::saveEntry() {
1609 1609
1610 if ( useFullName == TRUE ) { 1610 if ( useFullName == TRUE ) {
@@ -1888,17 +1888,17 @@ void ContactEditor::setPersonalView( bool personal )
1888void ContactEditor::slotAnniversaryDateChanged( int year, int month, int day) 1888void ContactEditor::slotAnniversaryDateChanged( int year, int month, int day)
1889{ 1889{
1890 QDate date; 1890 QDate date;
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
1897void ContactEditor::slotBirthdayDateChanged( int year, int month, int day) 1897void ContactEditor::slotBirthdayDateChanged( int year, int month, int day)
1898{ 1898{
1899 QDate date; 1899 QDate date;
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}