-rw-r--r-- | kaddressbook/addresseeeditorwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 4db0a20..012780b 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp | |||
@@ -1041,65 +1041,65 @@ void AddresseeEditorWidget::load() | |||
1041 | mAssistantEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-AssistantsName" ) ); | 1041 | mAssistantEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-AssistantsName" ) ); |
1042 | mDepartmentEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Department" ) ); | 1042 | mDepartmentEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Department" ) ); |
1043 | mOfficeEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Office" ) ); | 1043 | mOfficeEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Office" ) ); |
1044 | mProfessionEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Profession" ) ); | 1044 | mProfessionEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Profession" ) ); |
1045 | QString gen = mAddressee.custom( "KADDRESSBOOK", "X-Gender" ); | 1045 | QString gen = mAddressee.custom( "KADDRESSBOOK", "X-Gender" ); |
1046 | if ( gen == "female" ) | 1046 | if ( gen == "female" ) |
1047 | mGenderBox->setCurrentItem ( 1 ); | 1047 | mGenderBox->setCurrentItem ( 1 ); |
1048 | else if ( gen == "male" ) | 1048 | else if ( gen == "male" ) |
1049 | mGenderBox->setCurrentItem ( 2 ); | 1049 | mGenderBox->setCurrentItem ( 2 ); |
1050 | else | 1050 | else |
1051 | mGenderBox->setCurrentItem ( 0 ); | 1051 | mGenderBox->setCurrentItem ( 0 ); |
1052 | blockSignals( block ); | 1052 | blockSignals( block ); |
1053 | mBlockSignals = false; | 1053 | mBlockSignals = false; |
1054 | 1054 | ||
1055 | mDirty = false; | 1055 | mDirty = false; |
1056 | } | 1056 | } |
1057 | 1057 | ||
1058 | void AddresseeEditorWidget::save() | 1058 | void AddresseeEditorWidget::save() |
1059 | { | 1059 | { |
1060 | if ( !dirty() ) { | 1060 | if ( !dirty() ) { |
1061 | return; | 1061 | return; |
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | mAddressee.setRole( mRoleEdit->text() ); | 1064 | mAddressee.setRole( mRoleEdit->text() ); |
1065 | mAddressee.setOrganization( mOrgEdit->text() ); | 1065 | mAddressee.setOrganization( mOrgEdit->text() ); |
1066 | mAddressee.setUrl( KURL( mURLEdit->text() ) ); | 1066 | mAddressee.setUrl( KURL( mURLEdit->text() ) ); |
1067 | mAddressee.setNote( mNoteEdit->text() ); | 1067 | mAddressee.setNote( mNoteEdit->text() ); |
1068 | if ( mBirthdayPicker->inputIsValid() ) { | 1068 | if ( mBirthdayPicker->inputIsValid() ) { |
1069 | QDate da = mBirthdayPicker->date(); | 1069 | QDate da = mBirthdayPicker->date(); |
1070 | if ( da > QDate::currentDate() ) | 1070 | if ( da > QDate::currentDate() ) |
1071 | da.setYMD(da.year()-100, da.month(), da.day() ); | 1071 | da.setYMD(da.year()-100, da.month(), da.day() ); |
1072 | mAddressee.setBirthday( QDateTime( da ) ); | 1072 | mAddressee.setBirthday( QDateTime( da ) ); |
1073 | qDebug("bday %s ",da.toString().latin1()); | 1073 | //qDebug("bday %s ",da.toString().latin1()); |
1074 | } | 1074 | } |
1075 | else { | 1075 | else { |
1076 | mAddressee.setBirthday( QDateTime() ); | 1076 | mAddressee.setBirthday( QDateTime() ); |
1077 | mBirthdayPicker->clear(); | 1077 | mBirthdayPicker->clear(); |
1078 | } | 1078 | } |
1079 | mAddressee.setNickName( mNicknameEdit->text() ); | 1079 | mAddressee.setNickName( mNicknameEdit->text() ); |
1080 | mAddressee.setCategories( QStringList::split( ",", mCategoryEdit->text() ) ); | 1080 | mAddressee.setCategories( QStringList::split( ",", mCategoryEdit->text() ) ); |
1081 | 1081 | ||
1082 | mAddressee.setGeo( mGeoWidget->geo() ); | 1082 | mAddressee.setGeo( mGeoWidget->geo() ); |
1083 | mAddressee.setPhoto( mImageWidget->photo() ); | 1083 | mAddressee.setPhoto( mImageWidget->photo() ); |
1084 | mAddressee.setLogo( mImageWidget->logo() ); | 1084 | mAddressee.setLogo( mImageWidget->logo() ); |
1085 | mAddressee.setKeys( mKeyWidget->keys() ); | 1085 | mAddressee.setKeys( mKeyWidget->keys() ); |
1086 | #ifndef KAB_EMBEDDED | 1086 | #ifndef KAB_EMBEDDED |
1087 | mAddressee.setSound( mSoundWidget->sound() ); | 1087 | mAddressee.setSound( mSoundWidget->sound() ); |
1088 | #else //KAB_EMBEDDED | 1088 | #else //KAB_EMBEDDED |
1089 | //US qDebug("AddresseeEditorWidget::save sound not supported"); | 1089 | //US qDebug("AddresseeEditorWidget::save sound not supported"); |
1090 | #endif //KAB_EMBEDDED | 1090 | #endif //KAB_EMBEDDED |
1091 | mAddressee.setSecrecy( mSecrecyWidget->secrecy() ); | 1091 | mAddressee.setSecrecy( mSecrecyWidget->secrecy() ); |
1092 | 1092 | ||
1093 | // save custom fields | 1093 | // save custom fields |
1094 | mAddressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", mIMAddressEdit->text() ); | 1094 | mAddressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", mIMAddressEdit->text() ); |
1095 | mAddressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", mSpouseEdit->text() ); | 1095 | mAddressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", mSpouseEdit->text() ); |
1096 | mAddressee.insertCustom( "KADDRESSBOOK", "X-Children", mChildEdit->text() ); | 1096 | mAddressee.insertCustom( "KADDRESSBOOK", "X-Children", mChildEdit->text() ); |
1097 | mAddressee.insertCustom( "KADDRESSBOOK", "X-ManagersName", mManagerEdit->text() ); | 1097 | mAddressee.insertCustom( "KADDRESSBOOK", "X-ManagersName", mManagerEdit->text() ); |
1098 | mAddressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName", mAssistantEdit->text() ); | 1098 | mAddressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName", mAssistantEdit->text() ); |
1099 | mAddressee.insertCustom( "KADDRESSBOOK", "X-Department", mDepartmentEdit->text() ); | 1099 | mAddressee.insertCustom( "KADDRESSBOOK", "X-Department", mDepartmentEdit->text() ); |
1100 | mAddressee.insertCustom( "KADDRESSBOOK", "X-Office", mOfficeEdit->text() ); | 1100 | mAddressee.insertCustom( "KADDRESSBOOK", "X-Office", mOfficeEdit->text() ); |
1101 | mAddressee.insertCustom( "KADDRESSBOOK", "X-Profession", mProfessionEdit->text() ); | 1101 | mAddressee.insertCustom( "KADDRESSBOOK", "X-Profession", mProfessionEdit->text() ); |
1102 | if ( mAnniversaryPicker->inputIsValid() ) { | 1102 | if ( mAnniversaryPicker->inputIsValid() ) { |
1103 | QString dt = KGlobal::locale()->formatDate(mAnniversaryPicker->date(), true, KLocale::ISODate); | 1103 | QString dt = KGlobal::locale()->formatDate(mAnniversaryPicker->date(), true, KLocale::ISODate); |
1104 | mAddressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt); | 1104 | mAddressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt); |
1105 | } | 1105 | } |