summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/contacteditor.cpp56
1 files changed, 39 insertions, 17 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 66e94ef..6d92ac3 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -450,7 +450,7 @@ void ContactEditor::init() {
450 cmbChooserField3->insertStringList( *slChooserNames ); 450 cmbChooserField3->insertStringList( *slChooserNames );
451 451
452 cmbChooserField1->setCurrentItem( 1 ); 452 cmbChooserField1->setCurrentItem( 0 );
453 cmbChooserField2->setCurrentItem( 2 ); 453 cmbChooserField2->setCurrentItem( 1 );
454 cmbChooserField3->setCurrentItem( 3 ); 454 cmbChooserField3->setCurrentItem( 2 );
455 455
456 connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) ); 456 connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) );
@@ -960,4 +960,5 @@ void ContactEditor::setEntry( const Contact &entry ) {
960 cleanupFields(); 960 cleanupFields();
961 961
962
962 ent = entry; 963 ent = entry;
963 964
@@ -1015,4 +1016,9 @@ void ContactEditor::setEntry( const Contact &entry ) {
1015 } 1016 }
1016 1017
1018 if (hasCountry) {
1019 (*slHomeAddress)[6] = ent.homeCountry();
1020 (*slBusinessAddress)[6] = ent.businessCountry();
1021 }
1022
1017 QStringList::ConstIterator it; 1023 QStringList::ConstIterator it;
1018 QListIterator<QLineEdit> itLE( listValue ); 1024 QListIterator<QLineEdit> itLE( listValue );
@@ -1056,5 +1062,5 @@ void ContactEditor::setEntry( const Contact &entry ) {
1056 for ( it = slChooserNames->begin(), itV = slChooserValues->begin(); it != slChooserNames->end(); ++it, ++itV ) { 1062 for ( it = slChooserNames->begin(), itV = slChooserValues->begin(); it != slChooserNames->end(); ++it, ++itV ) {
1057 1063
1058 if ( *it == "Business Phone" ) 1064 if ( *it == "Business Phone" || *it == "Work Phone" )
1059 *itV = ent.businessPhone(); 1065 *itV = ent.businessPhone();
1060/* 1066/*
@@ -1062,8 +1068,8 @@ void ContactEditor::setEntry( const Contact &entry ) {
1062 *itV = ent.business2Phone(); 1068 *itV = ent.business2Phone();
1063*/ 1069*/
1064 if ( *it == "Business Fax" ) 1070 if ( *it == "Business Fax" || *it == "Work Fax" )
1065 *itV = ent.businessFax(); 1071 *itV = ent.businessFax();
1066 1072
1067 if ( *it == "Business Mobile" ) 1073 if ( *it == "Business Mobile" || *it == "work Mobile" )
1068 *itV = ent.businessMobile(); 1074 *itV = ent.businessMobile();
1069/* 1075/*
@@ -1098,5 +1104,5 @@ void ContactEditor::setEntry( const Contact &entry ) {
1098 *itV = ent.otherPhone(); 1104 *itV = ent.otherPhone();
1099*/ 1105*/
1100 if ( *it == "Business Pager" ) 1106 if ( *it == "Business Pager" || *it == "Work Pager" )
1101 *itV = ent.businessPager(); 1107 *itV = ent.businessPager();
1102/* 1108/*
@@ -1121,5 +1127,5 @@ void ContactEditor::setEntry( const Contact &entry ) {
1121 if ( *it == "Home Web Page" ) 1127 if ( *it == "Home Web Page" )
1122 *itV = ent.homeWebpage(); 1128 *itV = ent.homeWebpage();
1123 if ( *it == "Business Web Page" ) 1129 if ( *it == "Business Web Page" || *it == "Work Web Page" )
1124 *itV = ent.businessWebpage(); 1130 *itV = ent.businessWebpage();
1125 1131
@@ -1134,4 +1140,10 @@ void ContactEditor::setEntry( const Contact &entry ) {
1134 txtNote->setText( ent.notes() ); 1140 txtNote->setText( ent.notes() );
1135 1141
1142 slotCmbChooser1Change( cmbChooserField1->currentItem() );
1143 slotCmbChooser2Change( cmbChooserField2->currentItem() );
1144 slotCmbChooser3Change( cmbChooserField3->currentItem() );
1145
1146 slotAddressTypeChange( cmbAddress->currentItem() );
1147
1136} 1148}
1137 1149
@@ -1199,4 +1211,9 @@ void ContactEditor::saveEntry() {
1199 ent.setBusinessZip( (*slBusinessAddress)[5] ); 1211 ent.setBusinessZip( (*slBusinessAddress)[5] );
1200 } 1212 }
1213
1214 if (hasCountry) {
1215 ent.setHomeCountry( (*slHomeAddress)[6] );
1216 ent.setBusinessCountry( (*slBusinessAddress)[6] );
1217 }
1201 1218
1202 QStringList::ConstIterator it; 1219 QStringList::ConstIterator it;
@@ -1241,5 +1258,5 @@ void ContactEditor::saveEntry() {
1241 for ( it = slChooserNames->begin(), itV = slChooserValues->begin(); it != slChooserNames->end(); ++it, ++itV ) { 1258 for ( it = slChooserNames->begin(), itV = slChooserValues->begin(); it != slChooserNames->end(); ++it, ++itV ) {
1242 1259
1243 if ( *it == "Business Phone" ) 1260 if ( *it == "Business Phone" || *it == "Work Phone" )
1244 ent.setBusinessPhone( *itV ); 1261 ent.setBusinessPhone( *itV );
1245/* 1262/*
@@ -1247,8 +1264,8 @@ void ContactEditor::saveEntry() {
1247 ent.setBusiness2Phone( *itV ); 1264 ent.setBusiness2Phone( *itV );
1248*/ 1265*/
1249 if ( *it == "Business Fax" ) 1266 if ( *it == "Business Fax" || *it == "Work Fax" )
1250 ent.setBusinessFax( *itV ); 1267 ent.setBusinessFax( *itV );
1251 1268
1252 if ( *it == "Business Mobile" ) 1269 if ( *it == "Business Mobile" || *it == "Work Mobile" )
1253 ent.setBusinessMobile( *itV ); 1270 ent.setBusinessMobile( *itV );
1254/* 1271/*
@@ -1256,9 +1273,14 @@ void ContactEditor::saveEntry() {
1256 ent.setCompanyPhone( *itV ); 1273 ent.setCompanyPhone( *itV );
1257*/ 1274*/
1258 if ( *it == "Default Email" ) 1275 //if ( *it == "Default Email" )
1259 ent.setDefaultEmail( *itV ); 1276 //ent.setDefaultEmail( *itV );
1260 1277
1261 if ( *it == "Emails" ) 1278 if ( *it == "Emails" ) {
1279 QString allemail;
1280 QString defaultmail;
1281 parseEmailFrom( *itV, defaultmail, allemail );
1282 ent.setDefaultEmail( defaultmail );
1262 ent.setEmails( *itV ); 1283 ent.setEmails( *itV );
1284 }
1263 1285
1264 if ( *it == "Home Phone" ) 1286 if ( *it == "Home Phone" )
@@ -1283,5 +1305,5 @@ void ContactEditor::saveEntry() {
1283 ent.setOtherPhone( *itV ); 1305 ent.setOtherPhone( *itV );
1284*/ 1306*/
1285 if ( *it == "Business Pager" ) 1307 if ( *it == "Business Pager" || *it == "Work Pager" )
1286 ent.setBusinessPager( *itV ); 1308 ent.setBusinessPager( *itV );
1287/* 1309/*
@@ -1306,5 +1328,5 @@ void ContactEditor::saveEntry() {
1306 if ( *it == "Home Web Page" ) 1328 if ( *it == "Home Web Page" )
1307 ent.setHomeWebpage( *itV ); 1329 ent.setHomeWebpage( *itV );
1308 if ( *it == "Business Web Page" ) 1330 if ( *it == "Business Web Page" || *it == "Work Web Page" )
1309 ent.setBusinessWebpage( *itV ); 1331 ent.setBusinessWebpage( *itV );
1310 1332