author | eilers <eilers> | 2002-10-14 09:26:18 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-10-14 09:26:18 (UTC) |
commit | 0bccef01b70fec98e744fab286f5ea443287cdad (patch) (unidiff) | |
tree | 3a602e633dcbe81eca22f490402d39467c4eb32a | |
parent | 59d6018e53537e15d27cd0174adefba2ec8b8f6e (diff) | |
download | opie-0bccef01b70fec98e744fab286f5ea443287cdad.zip opie-0bccef01b70fec98e744fab286f5ea443287cdad.tar.gz opie-0bccef01b70fec98e744fab286f5ea443287cdad.tar.bz2 |
Last patch for language bug. I am not really happy with it, but it should work now.
Please use the current release of libopie with this application. Otherwise the
app will fail !
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 3 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 88 |
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 | |||
@@ -28,13 +28,13 @@ | |||
28 | 28 | ||
29 | 29 | ||
30 | #include <opie/ofileselector.h> | 30 | #include <opie/ofileselector.h> |
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> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #include <qpe/global.h> | 40 | #include <qpe/global.h> |
@@ -854,12 +854,13 @@ void AddressbookWindow::initFields() | |||
854 | } else { | 854 | } else { |
855 | QString str; | 855 | QString str; |
856 | str = getenv("HOME"); | 856 | str = getenv("HOME"); |
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 ) { |
863 | QValueList<int>::ConstIterator itVl; | 864 | QValueList<int>::ConstIterator itVl; |
864 | QStringList::ConstIterator itVis; | 865 | QStringList::ConstIterator itVis; |
865 | itVl = allFields.begin(); | 866 | itVl = allFields.begin(); |
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 | |||
@@ -81,12 +81,14 @@ void ContactEditor::init() { | |||
81 | slChooserValues = new QStringList; | 81 | slChooserValues = new QStringList; |
82 | 82 | ||
83 | slDynamicEntries = new QStringList; | 83 | slDynamicEntries = new QStringList; |
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( "" ); |
90 | } | 92 | } |
91 | 93 | ||
92 | { | 94 | { |
@@ -100,38 +102,43 @@ void ContactEditor::init() { | |||
100 | hasCity = FALSE; | 102 | hasCity = FALSE; |
101 | hasState = FALSE; | 103 | hasState = FALSE; |
102 | hasZip = FALSE; | 104 | hasZip = FALSE; |
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; |
120 | } | 125 | } |
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; |
135 | } | 142 | } |
136 | 143 | ||
137 | /* | 144 | /* |
@@ -140,56 +147,63 @@ void ContactEditor::init() { | |||
140 | slChooserValues.append( "" ); | 147 | slChooserValues.append( "" ); |
141 | //slDynamicEntries->remove( it ); | 148 | //slDynamicEntries->remove( it ); |
142 | continue; | 149 | continue; |
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; |
157 | } | 166 | } |
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; |
193 | } | 207 | } |
194 | 208 | ||
195 | if ( *it == "Name Title" || *it == "First Name" || *it == "Middle Name" || *it == "Last Name" || *it == "File As" || *it == "Default Email" || *it == "Emails" || *it == "Groups" ) | 209 | if ( *it == "Name Title" || *it == "First Name" || *it == "Middle Name" || *it == "Last Name" || *it == "File As" || *it == "Default Email" || *it == "Emails" || *it == "Groups" ) |
@@ -746,16 +760,16 @@ void ContactEditor::init() { | |||
746 | gl->addWidget( txtSuffix, 3, 1 ); | 760 | gl->addWidget( txtSuffix, 3, 1 ); |
747 | space = new QSpacerItem(1,1, | 761 | space = new QSpacerItem(1,1, |
748 | QSizePolicy::Maximum, | 762 | QSizePolicy::Maximum, |
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 ); |
759 | cmbChooserField3->setCurrentItem( 2 ); | 773 | cmbChooserField3->setCurrentItem( 2 ); |
760 | 774 | ||
761 | connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) ); | 775 | connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) ); |
@@ -1357,43 +1371,43 @@ void ContactEditor::setEntry( const OContact &entry ) { | |||
1357 | slBusinessAddress[6] = ent.businessCountry(); | 1371 | slBusinessAddress[6] = ent.businessCountry(); |
1358 | } | 1372 | } |
1359 | 1373 | ||
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 | } |
1397 | 1411 | ||
1398 | QStringList::Iterator itV; | 1412 | QStringList::Iterator itV; |
1399 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { | 1413 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { |
@@ -1555,43 +1569,43 @@ void ContactEditor::saveEntry() { | |||
1555 | ent.setBusinessCountry( slBusinessAddress[6] ); | 1569 | ent.setBusinessCountry( slBusinessAddress[6] ); |
1556 | } | 1570 | } |
1557 | 1571 | ||
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 | } |
1595 | 1609 | ||
1596 | QStringList::ConstIterator itV; | 1610 | QStringList::ConstIterator itV; |
1597 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { | 1611 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { |