summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/TODO3
-rw-r--r--core/pim/addressbook/abtable.cpp2
-rw-r--r--core/pim/addressbook/contacteditor.cpp84
3 files changed, 63 insertions, 26 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO
index 83e3c6b..a4fc29a 100644
--- a/core/pim/addressbook/TODO
+++ b/core/pim/addressbook/TODO
@@ -9,2 +9,5 @@ Important:
9- Reload if contacts were changed externally 9- Reload if contacts were changed externally
10- "What's this" should be added
11- The names of the countries are sorted by there english names, only..
12 Even if they are translated.. :S
10 13
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp
index 08c6d0a..70c070f 100644
--- a/core/pim/addressbook/abtable.cpp
+++ b/core/pim/addressbook/abtable.cpp
@@ -132,3 +132,3 @@ AbTable::AbTable( const QValueList<int> *order, QWidget *parent, const char *nam
132 mCat( 0 ), 132 mCat( 0 ),
133 m_contactdb ("addressbook") 133 m_contactdb ("addressbook", 0l, 0l, false) // Handle syncing myself.. !
134{ 134{
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index bae3a2b..e7f2ebd 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -342,3 +342,2 @@ void ContactEditor::init() {
342 342
343
344 slDynamicEntries.append( *it ); 343 slDynamicEntries.append( *it );
@@ -710,5 +709,6 @@ void ContactEditor::init() {
710 709
710 // Create Labels and lineedit fields for every dynamic entry
711 QStringList::ConstIterator it = slDynamicEntries.begin(); 711 QStringList::ConstIterator it = slDynamicEntries.begin();
712 for (i = 0; it != slDynamicEntries.end(); i++, ++it) { 712 for (i = 0; it != slDynamicEntries.end(); i++, ++it) {
713 l = new QLabel( *it, container ); 713 l = new QLabel( QString::null , container );
714 listName.append( l ); 714 listName.append( l );
@@ -719,2 +719,4 @@ void ContactEditor::init() {
719 } 719 }
720 // Fill labels with names..
721 loadFields();
720 722
@@ -1014,3 +1016,35 @@ void ContactEditor::loadFields() {
1014 for ( it = slDynamicEntries.begin(); *lit; ++lit, ++it) { 1016 for ( it = slDynamicEntries.begin(); *lit; ++lit, ++it) {
1015 (*lit)->setText( *it ); 1017
1018 if ( *it == "Department" )
1019 (*lit)->setText( tr( "Department" ) );
1020
1021 if ( *it == "Company" )
1022 (*lit)->setText( tr( "Company" ) );
1023
1024 if ( *it == "Office" )
1025 (*lit)->setText( tr( "Office" ) );
1026
1027 if ( *it == "Profession" )
1028 (*lit)->setText( tr( "Profession" ) );
1029
1030 if ( *it == "Assistant" )
1031 (*lit)->setText( tr( "Assistant" ) );
1032
1033 if ( *it == "Manager" )
1034 (*lit)->setText( tr( "Manager" ) );
1035
1036 if ( *it == "Spouse" )
1037 (*lit)->setText( tr( "Spouse" ) );
1038
1039 if ( *it == "Birthday" )
1040 (*lit)->setText( tr( "Birthday" ) );
1041
1042 if ( *it == "Anniversary" )
1043 (*lit)->setText( tr( "Anniversary" ) );
1044
1045 if ( *it == "Nickname" )
1046 (*lit)->setText( tr( "Nickname" ) );
1047
1048 if ( *it == "Children" )
1049 (*lit)->setText( tr( "Children" ) );
1016 } 1050 }
@@ -1376,33 +1410,33 @@ void ContactEditor::setEntry( const OContact &entry ) {
1376 for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { 1410 for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) {
1377 if ( *it == tr( "Department" ) ) 1411 if ( *it == "Department" )
1378 (*itLE)->setText( ent.department() ); 1412 (*itLE)->setText( ent.department() );
1379 1413
1380 if ( *it == tr( "Company" ) ) 1414 if ( *it == "Company" )
1381 (*itLE)->setText( ent.company() ); 1415 (*itLE)->setText( ent.company() );
1382 1416
1383 if ( *it == tr( "Office" ) ) 1417 if ( *it == "Office" )
1384 (*itLE)->setText( ent.office() ); 1418 (*itLE)->setText( ent.office() );
1385 1419
1386 if ( *it == tr( "Profession" ) ) 1420 if ( *it == "Profession" )
1387 (*itLE)->setText( ent.profession() ); 1421 (*itLE)->setText( ent.profession() );
1388 1422
1389 if ( *it == tr( "Assistant" ) ) 1423 if ( *it == "Assistant" )
1390 (*itLE)->setText( ent.assistant() ); 1424 (*itLE)->setText( ent.assistant() );
1391 1425
1392 if ( *it == tr( "Manager" ) ) 1426 if ( *it == "Manager" )
1393 (*itLE)->setText( ent.manager() ); 1427 (*itLE)->setText( ent.manager() );
1394 1428
1395 if ( *it == tr( "Spouse" ) ) 1429 if ( *it == "Spouse" )
1396 (*itLE)->setText( ent.spouse() ); 1430 (*itLE)->setText( ent.spouse() );
1397 1431
1398 if ( *it == tr( "Birthday" ) ) 1432 if ( *it == "Birthday" )
1399 (*itLE)->setText( ent.birthday() ); 1433 (*itLE)->setText( ent.birthday() );
1400 1434
1401 if ( *it == tr( "Anniversary" ) ) 1435 if ( *it == "Anniversary" )
1402 (*itLE)->setText( ent.anniversary() ); 1436 (*itLE)->setText( ent.anniversary() );
1403 1437
1404 if ( *it == tr( "Nickname" ) ) 1438 if ( *it == "Nickname" )
1405 (*itLE)->setText( ent.nickname() ); 1439 (*itLE)->setText( ent.nickname() );
1406 1440
1407 if ( *it == tr( "Children" ) ) 1441 if ( *it == "Children" )
1408 (*itLE)->setText( ent.children() ); 1442 (*itLE)->setText( ent.children() );
@@ -1574,33 +1608,33 @@ void ContactEditor::saveEntry() {
1574 for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { 1608 for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) {
1575 if ( *it == tr( "Department" ) ) 1609 if ( *it == "Department" )
1576 ent.setDepartment( (*itLE)->text() ); 1610 ent.setDepartment( (*itLE)->text() );
1577 1611
1578 if ( *it == tr( "Company" ) ) 1612 if ( *it == "Company" )
1579 ent.setCompany( (*itLE)->text() ); 1613 ent.setCompany( (*itLE)->text() );
1580 1614
1581 if ( *it == tr( "Office" ) ) 1615 if ( *it == "Office" )
1582 ent.setOffice( (*itLE)->text() ); 1616 ent.setOffice( (*itLE)->text() );
1583 1617
1584 if ( *it == tr( "Profession" ) ) 1618 if ( *it == "Profession" )
1585 ent.setProfession( (*itLE)->text() ); 1619 ent.setProfession( (*itLE)->text() );
1586 1620
1587 if ( *it == tr( "Assistant" ) ) 1621 if ( *it == "Assistant" )
1588 ent.setAssistant( (*itLE)->text() ); 1622 ent.setAssistant( (*itLE)->text() );
1589 1623
1590 if ( *it == tr( "Manager" ) ) 1624 if ( *it == "Manager" )
1591 ent.setManager( (*itLE)->text() ); 1625 ent.setManager( (*itLE)->text() );
1592 1626
1593 if ( *it == tr( "Spouse" ) ) 1627 if ( *it == "Spouse" )
1594 ent.setSpouse( (*itLE)->text() ); 1628 ent.setSpouse( (*itLE)->text() );
1595 1629
1596 if ( *it == tr( "Birthday" ) ) 1630 if ( *it == "Birthday" )
1597 ent.setBirthday( (*itLE)->text() ); 1631 ent.setBirthday( (*itLE)->text() );
1598 1632
1599 if ( *it == tr( "Anniversary" ) ) 1633 if ( *it == "Anniversary" )
1600 ent.setAnniversary( (*itLE)->text() ); 1634 ent.setAnniversary( (*itLE)->text() );
1601 1635
1602 if ( *it == tr( "Nickname" ) ) 1636 if ( *it == "Nickname" )
1603 ent.setNickname( (*itLE)->text() ); 1637 ent.setNickname( (*itLE)->text() );
1604 1638
1605 if ( *it == tr( "Children" ) ) 1639 if ( *it == "Children" )
1606 ent.setChildren( (*itLE)->text() ); 1640 ent.setChildren( (*itLE)->text() );