summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp3
-rw-r--r--core/pim/addressbook/contacteditor.cpp88
2 files changed, 53 insertions, 38 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 472b13e..2eb9ddf 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -31,7 +31,7 @@
31#include <opie/ofiledialog.h> 31#include <opie/ofiledialog.h>
32#include <qpe/qpeapplication.h> 32#include <qpe/qpeapplication.h>
33#include <qpe/config.h> 33#include <qpe/config.h>
34#include <qpe/contact.h> 34#include <opie/ocontact.h>
35 35
36#ifndef MAKE_FOR_SHARP_ROM 36#ifndef MAKE_FOR_SHARP_ROM
37#include <qpe/finddialog.h> 37#include <qpe/finddialog.h>
@@ -857,6 +857,7 @@ void AddressbookWindow::initFields()
857 str += "/Settings/AddressBook.conf"; 857 str += "/Settings/AddressBook.conf";
858 QFile::remove( str ); 858 QFile::remove( str );
859 } 859 }
860
860 if ( slOrderedFields.count() > 0 ) { 861 if ( slOrderedFields.count() > 0 ) {
861 for( QStringList::ConstIterator it = slOrderedFields.begin(); 862 for( QStringList::ConstIterator it = slOrderedFields.begin();
862 it != slOrderedFields.end(); ++it ) { 863 it != slOrderedFields.end(); ++it ) {
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index b01583f..bae3a2b 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -84,6 +84,8 @@ void ContactEditor::init() {
84*/ 84*/
85 //*slDynamicEntries = *slOrdered; 85 //*slDynamicEntries = *slOrdered;
86 86
87 QStringList trlChooserNames;
88
87 for (i = 0; i <= 6; i++) { 89 for (i = 0; i <= 6; i++) {
88 slHomeAddress.append( "" ); 90 slHomeAddress.append( "" );
89 slBusinessAddress.append( "" ); 91 slBusinessAddress.append( "" );
@@ -103,17 +105,20 @@ void ContactEditor::init() {
103 hasCountry = FALSE; 105 hasCountry = FALSE;
104 106
105 QStringList::ConstIterator it = slOrdered.begin(); 107 QStringList::ConstIterator it = slOrdered.begin();
108
106 for ( i = 0; it != slOrdered.end(); i++, ++it ) { 109 for ( i = 0; it != slOrdered.end(); i++, ++it ) {
107 110
108 if ( (*it) == "Business Fax" ) { 111 if ( (*it) == "Business Fax" ) {
109 slChooserNames.append( tr( "Business Fax" ) ); 112 trlChooserNames.append( tr( "Business Fax" ) );
113 slChooserNames.append( *it );
110 slChooserValues.append("" ); 114 slChooserValues.append("" );
111 //slDynamicEntries->remove( it ); 115 //slDynamicEntries->remove( it );
112 continue; 116 continue;
113 } 117 }
114 118
115 if ( (*it) == "Home Fax" ) { 119 if ( (*it) == "Home Fax" ) {
116 slChooserNames.append( tr( "Home Fax" ) ); 120 trlChooserNames.append( tr( "Home Fax" ) );
121 slChooserNames.append( *it );
117 slChooserValues.append("" ); 122 slChooserValues.append("" );
118 //slDynamicEntries->remove( it ); 123 //slDynamicEntries->remove( it );
119 continue; 124 continue;
@@ -121,14 +126,16 @@ void ContactEditor::init() {
121 126
122 127
123 if ( (*it) == "Business Phone" ) { 128 if ( (*it) == "Business Phone" ) {
124 slChooserNames.append( tr( "Business Phone" ) ); 129 trlChooserNames.append( tr( "Business Phone" ) );
130 slChooserNames.append( *it );
125 slChooserValues.append( "" ); 131 slChooserValues.append( "" );
126 //slDynamicEntries->remove( it ); 132 //slDynamicEntries->remove( it );
127 continue; 133 continue;
128 } 134 }
129 135
130 if ( (*it) == "Home Phone" ) { 136 if ( (*it) == "Home Phone" ) {
131 slChooserNames.append( tr( "Home Phone" ) ); 137 trlChooserNames.append( tr( "Home Phone" ) );
138 slChooserNames.append( *it );
132 slChooserValues.append( "" ); 139 slChooserValues.append( "" );
133 //slDynamicEntries->remove( it ); 140 //slDynamicEntries->remove( it );
134 continue; 141 continue;
@@ -143,14 +150,16 @@ void ContactEditor::init() {
143 } */ 150 } */
144 151
145 if ( (*it) == "Business Mobile" ) { 152 if ( (*it) == "Business Mobile" ) {
146 slChooserNames.append( tr( "Business Mobile" ) ); 153 trlChooserNames.append( tr( "Business Mobile" ) );
154 slChooserNames.append( *it );
147 slChooserValues.append( "" ); 155 slChooserValues.append( "" );
148 //slDynamicEntries->remove( it ); 156 //slDynamicEntries->remove( it );
149 continue; 157 continue;
150 } 158 }
151 159
152 if ( (*it) == "Home Mobile" ) { 160 if ( (*it) == "Home Mobile" ) {
153 slChooserNames.append( tr( "Home Mobile" ) ); 161 trlChooserNames.append( tr( "Home Mobile" ) );
162 slChooserNames.append( *it );
154 slChooserValues.append( "" ); 163 slChooserValues.append( "" );
155 //slDynamicEntries->remove( it ); 164 //slDynamicEntries->remove( it );
156 continue; 165 continue;
@@ -158,35 +167,40 @@ void ContactEditor::init() {
158 167
159 168
160 if ( (*it) == "Business WebPage" ) { 169 if ( (*it) == "Business WebPage" ) {
161 slChooserNames.append( tr( "Business WebPage" ) ); 170 trlChooserNames.append( tr( "Business WebPage" ) );
171 slChooserNames.append( *it );
162 slChooserValues.append( "" ); 172 slChooserValues.append( "" );
163 //slDynamicEntries->remove( it ); 173 //slDynamicEntries->remove( it );
164 continue; 174 continue;
165 } 175 }
166 176
167 if ( (*it) == "Home Web Page" ) { 177 if ( (*it) == "Home Web Page" ) {
168 slChooserNames.append( tr( "Home Web Page" ) ); 178 trlChooserNames.append( tr( "Home Web Page" ) );
179 slChooserNames.append( *it );
169 slChooserValues.append( "" ); 180 slChooserValues.append( "" );
170 //slDynamicEntries->remove( it ); 181 //slDynamicEntries->remove( it );
171 continue; 182 continue;
172 } 183 }
173 184
174 if ( (*it) == "Business Pager" ) { 185 if ( (*it) == "Business Pager" ) {
175 slChooserNames.append( tr( "Business Pager" ) ); 186 trlChooserNames.append( tr( "Business Pager" ) );
187 slChooserNames.append( *it );
176 slChooserValues.append( "" ); 188 slChooserValues.append( "" );
177 //slDynamicEntries->remove( it ); 189 //slDynamicEntries->remove( it );
178 continue; 190 continue;
179 } 191 }
180 192
181 if ( *it == "Default Email" ) { 193 if ( *it == "Default Email" ) {
182 slChooserNames.append( tr( "Default Email" ) ); 194 trlChooserNames.append( tr( "Default Email" ) );
195 slChooserNames.append( *it );
183 slChooserValues.append( "" ); 196 slChooserValues.append( "" );
184 //slDynamicEntries->remove( it ); 197 //slDynamicEntries->remove( it );
185 continue; 198 continue;
186 } 199 }
187 200
188 if ( *it == "Emails" ) { 201 if ( *it == "Emails" ) {
189 slChooserNames.append( tr( "Emails" ) ); 202 trlChooserNames.append( tr( "Emails" ) );
203 slChooserNames.append( *it );
190 slChooserValues.append( "" ); 204 slChooserValues.append( "" );
191 //slDynamicEntries->remove( it ); 205 //slDynamicEntries->remove( it );
192 continue; 206 continue;
@@ -749,10 +763,10 @@ void ContactEditor::init() {
749 QSizePolicy::MinimumExpanding ); 763 QSizePolicy::MinimumExpanding );
750 gl->addItem( space, 4, 0 ); 764 gl->addItem( space, 4, 0 );
751 765
752 cmbChooserField1->insertStringList( slChooserNames ); 766 cmbChooserField1->insertStringList( trlChooserNames );
753 cmbChooserField2->insertStringList( slChooserNames ); 767 cmbChooserField2->insertStringList( trlChooserNames );
754 cmbChooserField3->insertStringList( slChooserNames ); 768 cmbChooserField3->insertStringList( trlChooserNames );
755 cmbChooserField4->insertStringList( slChooserNames ); 769 cmbChooserField4->insertStringList( trlChooserNames );
756 770
757 cmbChooserField1->setCurrentItem( 0 ); 771 cmbChooserField1->setCurrentItem( 0 );
758 cmbChooserField2->setCurrentItem( 1 ); 772 cmbChooserField2->setCurrentItem( 1 );
@@ -1360,37 +1374,37 @@ void ContactEditor::setEntry( const OContact &entry ) {
1360 QStringList::ConstIterator it; 1374 QStringList::ConstIterator it;
1361 QListIterator<QLineEdit> itLE( listValue ); 1375 QListIterator<QLineEdit> itLE( listValue );
1362 for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { 1376 for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) {
1363 if ( *it =="Department" ) 1377 if ( *it == tr( "Department" ) )
1364 (*itLE)->setText( ent.department() ); 1378 (*itLE)->setText( ent.department() );
1365 1379
1366 if ( *it == "Company" ) 1380 if ( *it == tr( "Company" ) )
1367 (*itLE)->setText( ent.company() ); 1381 (*itLE)->setText( ent.company() );
1368 1382
1369 if ( *it == "Office" ) 1383 if ( *it == tr( "Office" ) )
1370 (*itLE)->setText( ent.office() ); 1384 (*itLE)->setText( ent.office() );
1371 1385
1372 if ( *it == "Profession" ) 1386 if ( *it == tr( "Profession" ) )
1373 (*itLE)->setText( ent.profession() ); 1387 (*itLE)->setText( ent.profession() );
1374 1388
1375 if ( *it == "Assistant" ) 1389 if ( *it == tr( "Assistant" ) )
1376 (*itLE)->setText( ent.assistant() ); 1390 (*itLE)->setText( ent.assistant() );
1377 1391
1378 if ( *it == "Manager" ) 1392 if ( *it == tr( "Manager" ) )
1379 (*itLE)->setText( ent.manager() ); 1393 (*itLE)->setText( ent.manager() );
1380 1394
1381 if ( *it == "Spouse" ) 1395 if ( *it == tr( "Spouse" ) )
1382 (*itLE)->setText( ent.spouse() ); 1396 (*itLE)->setText( ent.spouse() );
1383 1397
1384 if ( *it == "Birthday" ) 1398 if ( *it == tr( "Birthday" ) )
1385 (*itLE)->setText( ent.birthday() ); 1399 (*itLE)->setText( ent.birthday() );
1386 1400
1387 if ( *it == "Anniversary" ) 1401 if ( *it == tr( "Anniversary" ) )
1388 (*itLE)->setText( ent.anniversary() ); 1402 (*itLE)->setText( ent.anniversary() );
1389 1403
1390 if ( *it == "Nickname" ) 1404 if ( *it == tr( "Nickname" ) )
1391 (*itLE)->setText( ent.nickname() ); 1405 (*itLE)->setText( ent.nickname() );
1392 1406
1393 if ( *it == "Children" ) 1407 if ( *it == tr( "Children" ) )
1394 (*itLE)->setText( ent.children() ); 1408 (*itLE)->setText( ent.children() );
1395 1409
1396 } 1410 }
@@ -1558,37 +1572,37 @@ void ContactEditor::saveEntry() {
1558 QStringList::ConstIterator it; 1572 QStringList::ConstIterator it;
1559 QListIterator<QLineEdit> itLE( listValue ); 1573 QListIterator<QLineEdit> itLE( listValue );
1560 for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { 1574 for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) {
1561 if ( *it == "Department" ) 1575 if ( *it == tr( "Department" ) )
1562 ent.setDepartment( (*itLE)->text() ); 1576 ent.setDepartment( (*itLE)->text() );
1563 1577
1564 if ( *it == "Company" ) 1578 if ( *it == tr( "Company" ) )
1565 ent.setCompany( (*itLE)->text() ); 1579 ent.setCompany( (*itLE)->text() );
1566 1580
1567 if ( *it == "Office" ) 1581 if ( *it == tr( "Office" ) )
1568 ent.setOffice( (*itLE)->text() ); 1582 ent.setOffice( (*itLE)->text() );
1569 1583
1570 if ( *it == "Profession" ) 1584 if ( *it == tr( "Profession" ) )
1571 ent.setProfession( (*itLE)->text() ); 1585 ent.setProfession( (*itLE)->text() );
1572 1586
1573 if ( *it == "Assistant" ) 1587 if ( *it == tr( "Assistant" ) )
1574 ent.setAssistant( (*itLE)->text() ); 1588 ent.setAssistant( (*itLE)->text() );
1575 1589
1576 if ( *it == "Manager" ) 1590 if ( *it == tr( "Manager" ) )
1577 ent.setManager( (*itLE)->text() ); 1591 ent.setManager( (*itLE)->text() );
1578 1592
1579 if ( *it == "Spouse" ) 1593 if ( *it == tr( "Spouse" ) )
1580 ent.setSpouse( (*itLE)->text() ); 1594 ent.setSpouse( (*itLE)->text() );
1581 1595
1582 if ( *it == "Birthday" ) 1596 if ( *it == tr( "Birthday" ) )
1583 ent.setBirthday( (*itLE)->text() ); 1597 ent.setBirthday( (*itLE)->text() );
1584 1598
1585 if ( *it == "Anniversary" ) 1599 if ( *it == tr( "Anniversary" ) )
1586 ent.setAnniversary( (*itLE)->text() ); 1600 ent.setAnniversary( (*itLE)->text() );
1587 1601
1588 if ( *it == "Nickname" ) 1602 if ( *it == tr( "Nickname" ) )
1589 ent.setNickname( (*itLE)->text() ); 1603 ent.setNickname( (*itLE)->text() );
1590 1604
1591 if ( *it == "Children" ) 1605 if ( *it == tr( "Children" ) )
1592 ent.setChildren( (*itLE)->text() ); 1606 ent.setChildren( (*itLE)->text() );
1593 1607
1594 } 1608 }