summaryrefslogtreecommitdiff
authoreilers <eilers>2002-10-14 16:53:10 (UTC)
committer eilers <eilers>2002-10-14 16:53:10 (UTC)
commita2795a80a9421ae15cded191755dc8e4701f0c77 (patch) (unidiff)
treef556efc4a91786425c9a1597f22b9f77edc78237
parent03d355295dd4fd6c37e54d281280127c0cf8a068 (diff)
downloadopie-a2795a80a9421ae15cded191755dc8e4701f0c77.zip
opie-a2795a80a9421ae15cded191755dc8e4701f0c77.tar.gz
opie-a2795a80a9421ae15cded191755dc8e4701f0c77.tar.bz2
Some final language fixes
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
@@ -2,15 +2,18 @@ Stuff todo:
2 2
3Urgent: 3Urgent:
4- "Nonenglish" translation bug has to be fixed. 4- "Nonenglish" translation bug has to be fixed.
5 5
6Important: 6Important:
7 7
8- Finishing of new View functions (List, Phonebook...) 8- Finishing of new View functions (List, Phonebook...)
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
11Less important: 14Less important:
12 15
13- Find widget should be replaced by something like 16- Find widget should be replaced by something like
14 qpdf has. 17 qpdf has.
15- The picker (alphabetical sort widget) should be 18- The picker (alphabetical sort widget) should be
16 placed verticaly or horizontally (configurable) \ No newline at end of file 19 placed verticaly or horizontally (configurable) \ No newline at end of file
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
@@ -125,17 +125,17 @@ AbTable::AbTable( const QValueList<int> *order, QWidget *parent, const char *nam
125 // #else 125 // #else
126 : QTable( parent, name ), 126 : QTable( parent, name ),
127 // #endif 127 // #endif
128 lastSortCol( -1 ), 128 lastSortCol( -1 ),
129 asc( TRUE ), 129 asc( TRUE ),
130 intFields( order ), 130 intFields( order ),
131 currFindRow( -2 ), 131 currFindRow( -2 ),
132 mCat( 0 ), 132 mCat( 0 ),
133 m_contactdb ("addressbook") 133 m_contactdb ("addressbook", 0l, 0l, false) // Handle syncing myself.. !
134{ 134{
135 mCat.load( categoryFileName() ); 135 mCat.load( categoryFileName() );
136 setSelectionMode( NoSelection ); 136 setSelectionMode( NoSelection );
137 init(); 137 init();
138 setSorting( TRUE ); 138 setSorting( TRUE );
139 connect( this, SIGNAL(clicked(int,int,int,const QPoint &)), 139 connect( this, SIGNAL(clicked(int,int,int,const QPoint &)),
140 this, SLOT(itemClicked(int,int)) ); 140 this, SLOT(itemClicked(int,int)) );
141} 141}
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
@@ -335,17 +335,16 @@ void ContactEditor::init() {
335 } 335 }
336 336
337 if ( (*it) == "Home Country" ) { 337 if ( (*it) == "Home Country" ) {
338 hasCountry = TRUE; 338 hasCountry = TRUE;
339 //slDynamicEntries->remove( it ); 339 //slDynamicEntries->remove( it );
340 continue; 340 continue;
341 } 341 }
342 342
343
344 slDynamicEntries.append( *it ); 343 slDynamicEntries.append( *it );
345 } 344 }
346 } 345 }
347 346
348 QVBoxLayout *vb = new QVBoxLayout( this ); 347 QVBoxLayout *vb = new QVBoxLayout( this );
349 348
350 tabMain = new QTabWidget( this ); 349 tabMain = new QTabWidget( this );
351 vb->addWidget( tabMain ); 350 vb->addWidget( tabMain );
@@ -703,25 +702,28 @@ void ContactEditor::init() {
703 svDetails->setResizePolicy( QScrollView::AutoOneFit ); 702 svDetails->setResizePolicy( QScrollView::AutoOneFit );
704 svDetails->setFrameStyle( QFrame::NoFrame ); 703 svDetails->setFrameStyle( QFrame::NoFrame );
705 704
706 container = new QWidget( svDetails->viewport() ); 705 container = new QWidget( svDetails->viewport() );
707 svDetails->addChild( container ); 706 svDetails->addChild( container );
708 707
709 gl = new QGridLayout( container, 1, 2, 2, 4 ); 708 gl = new QGridLayout( container, 1, 2, 2, 4 );
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 );
715 gl->addWidget( l, i, 0 ); 715 gl->addWidget( l, i, 0 );
716 QLineEdit *e = new QLineEdit( container ); 716 QLineEdit *e = new QLineEdit( container );
717 listValue.append( e ); 717 listValue.append( e );
718 gl->addWidget( e, i, 1); 718 gl->addWidget( e, i, 1);
719 } 719 }
720 // Fill labels with names..
721 loadFields();
720 722
721 l = new QLabel( tr("Gender"), container ); 723 l = new QLabel( tr("Gender"), container );
722 gl->addWidget( l, slDynamicEntries.count(), 0 ); 724 gl->addWidget( l, slDynamicEntries.count(), 0 );
723 cmbGender = new QComboBox( container ); 725 cmbGender = new QComboBox( container );
724 cmbGender->insertItem( "", 0 ); 726 cmbGender->insertItem( "", 0 );
725 cmbGender->insertItem( tr("Male"), 1); 727 cmbGender->insertItem( tr("Male"), 1);
726 cmbGender->insertItem( tr("Female"), 2); 728 cmbGender->insertItem( tr("Female"), 2);
727 gl->addWidget( cmbGender, slDynamicEntries.count(), 1 ); 729 gl->addWidget( cmbGender, slDynamicEntries.count(), 1 );
@@ -1007,17 +1009,49 @@ void ContactEditor::slotFullNameChange( const QString &textChanged ) {
1007 1009
1008} 1010}
1009 1011
1010void ContactEditor::loadFields() { 1012void ContactEditor::loadFields() {
1011 1013
1012 QStringList::ConstIterator it; 1014 QStringList::ConstIterator it;
1013 QListIterator<QLabel> lit( listName ); 1015 QListIterator<QLabel> lit( listName );
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 }
1017} 1051}
1018 1052
1019void ContactEditor::accept() { 1053void ContactEditor::accept() {
1020 1054
1021 if ( isEmpty() ) { 1055 if ( isEmpty() ) {
1022 cleanupFields(); 1056 cleanupFields();
1023 reject(); 1057 reject();
@@ -1369,47 +1403,47 @@ void ContactEditor::setEntry( const OContact &entry ) {
1369 if (hasCountry) { 1403 if (hasCountry) {
1370 slHomeAddress[6] = ent.homeCountry(); 1404 slHomeAddress[6] = ent.homeCountry();
1371 slBusinessAddress[6] = ent.businessCountry(); 1405 slBusinessAddress[6] = ent.businessCountry();
1372 } 1406 }
1373 1407
1374 QStringList::ConstIterator it; 1408 QStringList::ConstIterator it;
1375 QListIterator<QLineEdit> itLE( listValue ); 1409 QListIterator<QLineEdit> itLE( listValue );
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() );
1409 1443
1410 } 1444 }
1411 1445
1412 QStringList::Iterator itV; 1446 QStringList::Iterator itV;
1413 for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { 1447 for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) {
1414 1448
1415 if ( ( *it == "Business Phone") || ( *it == "Work Phone" ) ) 1449 if ( ( *it == "Business Phone") || ( *it == "Work Phone" ) )
@@ -1567,47 +1601,47 @@ void ContactEditor::saveEntry() {
1567 if (hasCountry) { 1601 if (hasCountry) {
1568 ent.setHomeCountry( slHomeAddress[6] ); 1602 ent.setHomeCountry( slHomeAddress[6] );
1569 ent.setBusinessCountry( slBusinessAddress[6] ); 1603 ent.setBusinessCountry( slBusinessAddress[6] );
1570 } 1604 }
1571 1605
1572 QStringList::ConstIterator it; 1606 QStringList::ConstIterator it;
1573 QListIterator<QLineEdit> itLE( listValue ); 1607 QListIterator<QLineEdit> itLE( listValue );
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() );
1607 1641
1608 } 1642 }
1609 1643
1610 QStringList::ConstIterator itV; 1644 QStringList::ConstIterator itV;
1611 for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { 1645 for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) {
1612 1646
1613 if ( ( *it == "Business Phone" ) || ( *it == "Work Phone" ) ) 1647 if ( ( *it == "Business Phone" ) || ( *it == "Work Phone" ) )