Diffstat (limited to 'core/pim/addressbook/contacteditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 97573af..b60f2dd 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -1446,100 +1446,100 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1446 | /* | 1446 | /* |
1447 | if ( *it == "Home Pager") | 1447 | if ( *it == "Home Pager") |
1448 | *itV = ent.homePager(); | 1448 | *itV = ent.homePager(); |
1449 | 1449 | ||
1450 | if ( *it == "AIM IM" ) | 1450 | if ( *it == "AIM IM" ) |
1451 | *itV = ent.AIMIM(); | 1451 | *itV = ent.AIMIM(); |
1452 | 1452 | ||
1453 | if ( *it == "ICQ IM" ) | 1453 | if ( *it == "ICQ IM" ) |
1454 | *itV = ent.ICQIM(); | 1454 | *itV = ent.ICQIM(); |
1455 | 1455 | ||
1456 | if ( *it == "Jabber IM" ) | 1456 | if ( *it == "Jabber IM" ) |
1457 | *itV = ent.jabberIM(); | 1457 | *itV = ent.jabberIM(); |
1458 | 1458 | ||
1459 | if ( *it == "MSN IM" ) | 1459 | if ( *it == "MSN IM" ) |
1460 | *itV = ent.MSNIM(); | 1460 | *itV = ent.MSNIM(); |
1461 | 1461 | ||
1462 | if ( *it == "Yahoo IM" ) | 1462 | if ( *it == "Yahoo IM" ) |
1463 | *itV = ent.yahooIM(); | 1463 | *itV = ent.yahooIM(); |
1464 | */ | 1464 | */ |
1465 | if ( *it == "Home Web Page" ) | 1465 | if ( *it == "Home Web Page" ) |
1466 | *itV = ent.homeWebpage(); | 1466 | *itV = ent.homeWebpage(); |
1467 | 1467 | ||
1468 | if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) ) | 1468 | if ( ( *it == "Business WebPage" ) || ( *it == "Work Web Page" ) ) |
1469 | *itV = ent.businessWebpage(); | 1469 | *itV = ent.businessWebpage(); |
1470 | 1470 | ||
1471 | 1471 | ||
1472 | } | 1472 | } |
1473 | 1473 | ||
1474 | 1474 | ||
1475 | cmbCat->setCategories( ent.categories(), "Contacts", tr("Contacts") ); | 1475 | cmbCat->setCategories( ent.categories(), "Contacts", tr("Contacts") ); |
1476 | 1476 | ||
1477 | QString gender = ent.gender(); | 1477 | QString gender = ent.gender(); |
1478 | cmbGender->setCurrentItem( gender.toInt() ); | 1478 | cmbGender->setCurrentItem( gender.toInt() ); |
1479 | 1479 | ||
1480 | txtNote->setText( ent.notes() ); | 1480 | txtNote->setText( ent.notes() ); |
1481 | 1481 | ||
1482 | slotAddressTypeChange( cmbAddress->currentItem() ); | 1482 | slotAddressTypeChange( cmbAddress->currentItem() ); |
1483 | 1483 | ||
1484 | // Calling "show()" to arrange all widgets. Otherwise we will get | 1484 | // Calling "show()" to arrange all widgets. Otherwise we will get |
1485 | // a wrong position of the textfields and are unable to put our | 1485 | // a wrong position of the textfields and are unable to put our |
1486 | // default-email combo over it.. This is very ugly ! | 1486 | // default-email combo over it.. This is very ugly ! |
1487 | // Does anybody has a better solution ? | 1487 | // Does anybody has a better solution ? |
1488 | // Basically we should rethink the strategy to hide | 1488 | // Basically we should rethink the strategy to hide |
1489 | // a textfield with overwriting.. (se) | 1489 | // a textfield with overwriting.. (se) |
1490 | show(); | 1490 | show(); |
1491 | 1491 | ||
1492 | // Get combo-settings from contact and set preset.. | 1492 | // Get combo-settings from contact and set preset.. |
1493 | contactfields.loadFromRecord( ent ); | 1493 | contactfields.loadFromRecord( ent ); |
1494 | cmbChooserField1->setCurrentItem( contactfields.getFieldOrder(0, 0) ); | 1494 | cmbChooserField1->setCurrentItem( contactfields.getFieldOrder(0, 7) ); |
1495 | cmbChooserField2->setCurrentItem( contactfields.getFieldOrder(1, 1) ); | 1495 | cmbChooserField2->setCurrentItem( contactfields.getFieldOrder(1, 9) ); |
1496 | cmbChooserField3->setCurrentItem( contactfields.getFieldOrder(2, 2) ); | 1496 | cmbChooserField3->setCurrentItem( contactfields.getFieldOrder(2, 0) ); |
1497 | cmbChooserField4->setCurrentItem( contactfields.getFieldOrder(3, 5) ); | 1497 | cmbChooserField4->setCurrentItem( contactfields.getFieldOrder(3, 6) ); |
1498 | cmbAddress->setCurrentItem( contactfields.getFieldOrder(4, 1) ); | 1498 | cmbAddress->setCurrentItem( contactfields.getFieldOrder(4, 1) ); |
1499 | slotCmbChooser1Change( cmbChooserField1->currentItem() ); | 1499 | slotCmbChooser1Change( cmbChooserField1->currentItem() ); |
1500 | slotCmbChooser2Change( cmbChooserField2->currentItem() ); | 1500 | slotCmbChooser2Change( cmbChooserField2->currentItem() ); |
1501 | slotCmbChooser3Change( cmbChooserField3->currentItem() ); | 1501 | slotCmbChooser3Change( cmbChooserField3->currentItem() ); |
1502 | slotCmbChooser4Change( cmbChooserField4->currentItem() ); | 1502 | slotCmbChooser4Change( cmbChooserField4->currentItem() ); |
1503 | slotAddressTypeChange( cmbAddress->currentItem() ); | 1503 | slotAddressTypeChange( cmbAddress->currentItem() ); |
1504 | 1504 | ||
1505 | updateDatePicker(); | 1505 | updateDatePicker(); |
1506 | 1506 | ||
1507 | initializing = false; | 1507 | initializing = false; |
1508 | } | 1508 | } |
1509 | void ContactEditor::updateDatePicker() | 1509 | void ContactEditor::updateDatePicker() |
1510 | { | 1510 | { |
1511 | // Set DatePicker | 1511 | // Set DatePicker |
1512 | if ( !ent.birthday().isNull() ){ | 1512 | if ( !ent.birthday().isNull() ){ |
1513 | birthdayButton->setText( TimeString::numberDateString( ent.birthday() ) ); | 1513 | birthdayButton->setText( TimeString::numberDateString( ent.birthday() ) ); |
1514 | birthdayPicker->setDate( ent.birthday() ); | 1514 | birthdayPicker->setDate( ent.birthday() ); |
1515 | } else | 1515 | } else |
1516 | birthdayButton->setText( tr ("Unknown") ); | 1516 | birthdayButton->setText( tr ("Unknown") ); |
1517 | 1517 | ||
1518 | if ( !ent.anniversary().isNull() ){ | 1518 | if ( !ent.anniversary().isNull() ){ |
1519 | anniversaryButton->setText( TimeString::numberDateString( ent.anniversary() ) ); | 1519 | anniversaryButton->setText( TimeString::numberDateString( ent.anniversary() ) ); |
1520 | anniversaryPicker->setDate( ent.anniversary() ); | 1520 | anniversaryPicker->setDate( ent.anniversary() ); |
1521 | } else | 1521 | } else |
1522 | anniversaryButton->setText( tr ("Unknown") ); | 1522 | anniversaryButton->setText( tr ("Unknown") ); |
1523 | 1523 | ||
1524 | } | 1524 | } |
1525 | 1525 | ||
1526 | void ContactEditor::saveEntry() { | 1526 | void ContactEditor::saveEntry() { |
1527 | 1527 | ||
1528 | // Store current combo into contact | 1528 | // Store current combo into contact |
1529 | contactfields.saveToRecord( ent ); | 1529 | contactfields.saveToRecord( ent ); |
1530 | 1530 | ||
1531 | if ( useFullName ) { | 1531 | if ( useFullName ) { |
1532 | txtFirstName->setText( parseName( txtFullName->text(), NAME_F ) ); | 1532 | txtFirstName->setText( parseName( txtFullName->text(), NAME_F ) ); |
1533 | txtMiddleName->setText( parseName( txtFullName->text(), NAME_M ) ); | 1533 | txtMiddleName->setText( parseName( txtFullName->text(), NAME_M ) ); |
1534 | txtLastName->setText( parseName( txtFullName->text(), NAME_L ) ); | 1534 | txtLastName->setText( parseName( txtFullName->text(), NAME_L ) ); |
1535 | txtSuffix->setText( parseName( txtFullName->text(), NAME_S ) ); | 1535 | txtSuffix->setText( parseName( txtFullName->text(), NAME_S ) ); |
1536 | 1536 | ||
1537 | useFullName = false; | 1537 | useFullName = false; |
1538 | } | 1538 | } |
1539 | 1539 | ||
1540 | ent.setFirstName( txtFirstName->text() ); | 1540 | ent.setFirstName( txtFirstName->text() ); |
1541 | ent.setLastName( txtLastName->text() ); | 1541 | ent.setLastName( txtLastName->text() ); |
1542 | ent.setMiddleName( txtMiddleName->text() ); | 1542 | ent.setMiddleName( txtMiddleName->text() ); |
1543 | ent.setSuffix( txtSuffix->text() ); | 1543 | ent.setSuffix( txtSuffix->text() ); |
1544 | 1544 | ||
1545 | ent.setFileAs( cmbFileAs->currentText() ); | 1545 | ent.setFileAs( cmbFileAs->currentText() ); |