Diffstat (limited to 'core/pim/addressbook/contacteditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 218 |
1 files changed, 156 insertions, 62 deletions
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index fa60f98..d419142 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -105,42 +105,73 @@ void ContactEditor::init() { | |||
105 | QStringList::ConstIterator it = slOrdered.begin(); | 105 | QStringList::ConstIterator it = slOrdered.begin(); |
106 | for ( i = 0; it != slOrdered.end(); i++, ++it ) { | 106 | for ( i = 0; it != slOrdered.end(); i++, ++it ) { |
107 | 107 | ||
108 | if ( (*it).right( 3 ) == tr( "Fax" ) ) { | 108 | if ( (*it) == tr( "Business Fax" ) ) { |
109 | slChooserNames.append( *it ); | 109 | slChooserNames.append( *it ); |
110 | slChooserValues.append("" ); | 110 | slChooserValues.append("" ); |
111 | //slDynamicEntries->remove( it ); | 111 | //slDynamicEntries->remove( it ); |
112 | continue; | 112 | continue; |
113 | } | 113 | } |
114 | |||
115 | if ( (*it) == tr( "Home Fax" ) ) { | ||
116 | slChooserNames.append( *it ); | ||
117 | slChooserValues.append("" ); | ||
118 | //slDynamicEntries->remove( it ); | ||
119 | continue; | ||
120 | } | ||
121 | |||
114 | 122 | ||
115 | if ( (*it).right( 5 ) == tr( "Phone" ) ) { | 123 | if ( (*it) == tr( "Business Phone" ) ) { |
116 | slChooserNames.append( *it ); | 124 | slChooserNames.append( *it ); |
117 | slChooserValues.append( "" ); | 125 | slChooserValues.append( "" ); |
118 | //slDynamicEntries->remove( it ); | 126 | //slDynamicEntries->remove( it ); |
119 | continue; | 127 | continue; |
120 | } | 128 | } |
121 | 129 | ||
130 | if ( (*it) == tr( "Home Phone" ) ) { | ||
131 | slChooserNames.append( *it ); | ||
132 | slChooserValues.append( "" ); | ||
133 | //slDynamicEntries->remove( it ); | ||
134 | continue; | ||
135 | } | ||
136 | |||
137 | /* | ||
122 | if ( (*it).right( 2 ) == tr( "IM" ) ) { | 138 | if ( (*it).right( 2 ) == tr( "IM" ) ) { |
123 | slChooserNames.append( *it ); | 139 | slChooserNames.append( *it ); |
124 | slChooserValues.append( "" ); | 140 | slChooserValues.append( "" ); |
125 | //slDynamicEntries->remove( it ); | 141 | //slDynamicEntries->remove( it ); |
126 | continue; | 142 | continue; |
143 | } */ | ||
144 | |||
145 | if ( (*it) == tr( "Business Mobile" ) ) { | ||
146 | slChooserNames.append( *it ); | ||
147 | slChooserValues.append( "" ); | ||
148 | //slDynamicEntries->remove( it ); | ||
149 | continue; | ||
150 | } | ||
151 | |||
152 | if ( (*it) == tr( "Home Mobile" ) ) { | ||
153 | slChooserNames.append( *it ); | ||
154 | slChooserValues.append( "" ); | ||
155 | //slDynamicEntries->remove( it ); | ||
156 | continue; | ||
127 | } | 157 | } |
128 | 158 | ||
129 | if ( (*it).right( 6 ) == tr( "Mobile" ) ) { | 159 | |
160 | if ( (*it) == tr( "Business WebPage" ) ) { | ||
130 | slChooserNames.append( *it ); | 161 | slChooserNames.append( *it ); |
131 | slChooserValues.append( "" ); | 162 | slChooserValues.append( "" ); |
132 | //slDynamicEntries->remove( it ); | 163 | //slDynamicEntries->remove( it ); |
133 | continue; | 164 | continue; |
134 | } | 165 | } |
135 | 166 | ||
136 | if ( (*it).right( 4 ) == tr( "Page" ) ) { | 167 | if ( (*it) == tr( "Home Web Page" ) ) { |
137 | slChooserNames.append( *it ); | 168 | slChooserNames.append( *it ); |
138 | slChooserValues.append( "" ); | 169 | slChooserValues.append( "" ); |
139 | //slDynamicEntries->remove( it ); | 170 | //slDynamicEntries->remove( it ); |
140 | continue; | 171 | continue; |
141 | } | 172 | } |
142 | 173 | ||
143 | if ( (*it).right( 5 ) == tr( "Pager" ) ) { | 174 | if ( (*it) == tr( "Business Pager" ) ) { |
144 | slChooserNames.append( *it ); | 175 | slChooserNames.append( *it ); |
145 | slChooserValues.append( "" ); | 176 | slChooserValues.append( "" ); |
146 | //slDynamicEntries->remove( it ); | 177 | //slDynamicEntries->remove( it ); |
@@ -160,6 +191,9 @@ void ContactEditor::init() { | |||
160 | //slDynamicEntries->remove( it ); | 191 | //slDynamicEntries->remove( it ); |
161 | continue; | 192 | continue; |
162 | } | 193 | } |
194 | |||
195 | if ( *it == "Name Title" || *it == "First Name" || *it == "Middle Name" || *it == "Last Name" || *it == "File As" || *it == "Default Email" || *it == "Emails" || *it == "Groups" ) | ||
196 | continue; | ||
163 | 197 | ||
164 | if ( *it == tr( "Name Title" ) ) { | 198 | if ( *it == tr( "Name Title" ) ) { |
165 | //slDynamicEntries->remove( it ); | 199 | //slDynamicEntries->remove( it ); |
@@ -203,7 +237,7 @@ void ContactEditor::init() { | |||
203 | continue; | 237 | continue; |
204 | } | 238 | } |
205 | 239 | ||
206 | if ( *it == tr( "Company" ) ) { | 240 | if ( *it == tr( "Company") || *it == tr( "Organization" ) ) { |
207 | hasCompany = TRUE; | 241 | hasCompany = TRUE; |
208 | //slDynamicEntries->remove( it ); | 242 | //slDynamicEntries->remove( it ); |
209 | continue; | 243 | continue; |
@@ -220,48 +254,79 @@ void ContactEditor::init() { | |||
220 | continue; | 254 | continue; |
221 | } | 255 | } |
222 | 256 | ||
223 | if ( (*it).right( 6 ) == tr( "Street" ) ) { | 257 | if ( (*it) == tr( "Business Street" ) ) { |
224 | hasStreet = TRUE; | 258 | hasStreet = TRUE; |
225 | //slDynamicEntries->remove( it ); | 259 | //slDynamicEntries->remove( it ); |
226 | continue; | 260 | continue; |
227 | } | 261 | } |
228 | 262 | ||
263 | if ( (*it) == tr( "Home Street" ) ) { | ||
264 | hasStreet = TRUE; | ||
265 | //slDynamicEntries->remove( it ); | ||
266 | continue; | ||
267 | } | ||
268 | /* | ||
229 | if ( (*it).right( 8 ) == tr( "Street 2" ) ) { | 269 | if ( (*it).right( 8 ) == tr( "Street 2" ) ) { |
230 | hasStreet2 = TRUE; | 270 | hasStreet2 = TRUE; |
231 | //slDynamicEntries->remove( it ); | 271 | //slDynamicEntries->remove( it ); |
232 | continue; | 272 | continue; |
233 | } | 273 | } |
234 | 274 | ||
235 | if ( (*it).right( 8 ) == tr( "P.O. Box" ) ) { | 275 | if ( (*it).right( 8 ) == tr( "P.O. Box" ) ) { |
236 | hasPOBox = TRUE; | 276 | hasPOBox = TRUE; |
237 | //slDynamicEntries->remove( it ); | 277 | //slDynamicEntries->remove( it ); |
238 | continue; | 278 | continue; |
279 | } */ | ||
280 | |||
281 | if ( (*it) == tr( "Business City" ) ) { | ||
282 | hasCity = TRUE; | ||
283 | //slDynamicEntries->remove( it ); | ||
284 | continue; | ||
285 | } | ||
286 | |||
287 | if ( (*it) == tr( "Business State" ) ) { | ||
288 | hasState = TRUE; | ||
289 | //slDynamicEntries->remove( it ); | ||
290 | continue; | ||
291 | } | ||
292 | |||
293 | if ( (*it) == tr( "Business Zip" ) ) { | ||
294 | hasZip = TRUE; | ||
295 | //slDynamicEntries->remove( it ); | ||
296 | continue; | ||
297 | } | ||
298 | |||
299 | if ( (*it) == tr( "Business Country" ) ) { | ||
300 | hasCountry = TRUE; | ||
301 | //slDynamicEntries->remove( it ); | ||
302 | continue; | ||
239 | } | 303 | } |
240 | 304 | ||
241 | if ( (*it).right( 4 ) == tr( "City" ) ) { | 305 | if ( (*it) == tr( "Home City" ) ) { |
242 | hasCity = TRUE; | 306 | hasCity = TRUE; |
243 | //slDynamicEntries->remove( it ); | 307 | //slDynamicEntries->remove( it ); |
244 | continue; | 308 | continue; |
245 | } | 309 | } |
246 | 310 | ||
247 | if ( (*it).right( 5 ) == tr( "State" ) ) { | 311 | if ( (*it) == tr( "Home State" ) ) { |
248 | hasState = TRUE; | 312 | hasState = TRUE; |
249 | //slDynamicEntries->remove( it ); | 313 | //slDynamicEntries->remove( it ); |
250 | continue; | 314 | continue; |
251 | } | 315 | } |
252 | 316 | ||
253 | if ( (*it).right( 3 ) == tr( "Zip" ) ) { | 317 | if ( (*it) == tr( "Home Zip" ) ) { |
254 | hasZip = TRUE; | 318 | hasZip = TRUE; |
255 | //slDynamicEntries->remove( it ); | 319 | //slDynamicEntries->remove( it ); |
256 | continue; | 320 | continue; |
257 | } | 321 | } |
258 | 322 | ||
259 | if ( (*it).right( 7 ) == tr( "Country" ) ) { | 323 | if ( (*it) == tr( "Home Country" ) ) { |
260 | hasCountry = TRUE; | 324 | hasCountry = TRUE; |
261 | //slDynamicEntries->remove( it ); | 325 | //slDynamicEntries->remove( it ); |
262 | continue; | 326 | continue; |
263 | } | 327 | } |
264 | 328 | ||
329 | |||
265 | slDynamicEntries.append( *it ); | 330 | slDynamicEntries.append( *it ); |
266 | } | 331 | } |
267 | } | 332 | } |
@@ -960,16 +1025,18 @@ void ContactEditor::slotNote() { | |||
960 | 1025 | ||
961 | void ContactEditor::slotName() { | 1026 | void ContactEditor::slotName() { |
962 | 1027 | ||
963 | if (useFullName = TRUE) { | 1028 | QString tmpName; |
1029 | if (useFullName == TRUE) { | ||
964 | txtFirstName->setText( parseName(txtFullName->text(), NAME_F) ); | 1030 | txtFirstName->setText( parseName(txtFullName->text(), NAME_F) ); |
965 | txtMiddleName->setText( parseName(txtFullName->text(), NAME_M) ); | 1031 | txtMiddleName->setText( parseName(txtFullName->text(), NAME_M) ); |
966 | txtLastName->setText( parseName(txtFullName->text(), NAME_L) ); | 1032 | txtLastName->setText( parseName(txtFullName->text(), NAME_L) ); |
967 | txtSuffix->setText( parseName(txtFullName->text(), NAME_S) ); | 1033 | txtSuffix->setText( parseName(txtFullName->text(), NAME_S) ); |
968 | } | 1034 | } |
969 | |||
970 | dlgName->showMaximized(); | 1035 | dlgName->showMaximized(); |
971 | if ( dlgName->exec() ) { | 1036 | if ( dlgName->exec() ) { |
972 | txtFullName->setText( txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text() + " " + txtSuffix->text() ); | 1037 | |
1038 | tmpName = txtFirstName->text() + " " + txtMiddleName->text() + " " + txtLastName->text() + " " + txtSuffix->text(); | ||
1039 | txtFullName->setText( tmpName.simplifyWhiteSpace() ); | ||
973 | slotFullNameChange( txtFullName->text() ); | 1040 | slotFullNameChange( txtFullName->text() ); |
974 | useFullName = FALSE; | 1041 | useFullName = FALSE; |
975 | } | 1042 | } |
@@ -1019,7 +1086,21 @@ QString ContactEditor::parseName( const QString fullName, int type ) { | |||
1019 | 1086 | ||
1020 | switch (spCount) { | 1087 | switch (spCount) { |
1021 | case 0: | 1088 | case 0: |
1022 | return simplifiedName; | 1089 | //return simplifiedName; |
1090 | if (txtLastName->text() != "") { | ||
1091 | strLastName = simplifiedName; | ||
1092 | break; | ||
1093 | } | ||
1094 | if (txtMiddleName->text() != "") { | ||
1095 | strMiddleName = simplifiedName; | ||
1096 | break; | ||
1097 | } | ||
1098 | if (txtSuffix->text() != "") { | ||
1099 | strSuffix = simplifiedName; | ||
1100 | break; | ||
1101 | } | ||
1102 | strFirstName = simplifiedName; | ||
1103 | break; | ||
1023 | 1104 | ||
1024 | case 1: | 1105 | case 1: |
1025 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1106 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
@@ -1075,7 +1156,21 @@ QString ContactEditor::parseName( const QString fullName, int type ) { | |||
1075 | 1156 | ||
1076 | switch (spCount) { | 1157 | switch (spCount) { |
1077 | case 0: | 1158 | case 0: |
1078 | return simplifiedName; | 1159 | //return simplifiedName; |
1160 | if (txtLastName->text() != "") { | ||
1161 | strLastName = simplifiedName; | ||
1162 | break; | ||
1163 | } | ||
1164 | if (txtMiddleName->text() != "") { | ||
1165 | strMiddleName = simplifiedName; | ||
1166 | break; | ||
1167 | } | ||
1168 | if (txtSuffix->text() != "") { | ||
1169 | strSuffix = simplifiedName; | ||
1170 | break; | ||
1171 | } | ||
1172 | strFirstName = simplifiedName; | ||
1173 | break; | ||
1079 | 1174 | ||
1080 | case 1: | 1175 | case 1: |
1081 | spPos = simplifiedName.find( ' ', 0, TRUE ); | 1176 | spPos = simplifiedName.find( ' ', 0, TRUE ); |
@@ -1126,7 +1221,6 @@ QString ContactEditor::parseName( const QString fullName, int type ) { | |||
1126 | break; | 1221 | break; |
1127 | } | 1222 | } |
1128 | } | 1223 | } |
1129 | |||
1130 | switch (type) { | 1224 | switch (type) { |
1131 | case NAME_FL: | 1225 | case NAME_FL: |
1132 | return strFirstName + " " + strLastName; | 1226 | return strFirstName + " " + strLastName; |
@@ -1266,37 +1360,37 @@ void ContactEditor::setEntry( const Contact &entry ) { | |||
1266 | QStringList::ConstIterator it; | 1360 | QStringList::ConstIterator it; |
1267 | QListIterator<QLineEdit> itLE( listValue ); | 1361 | QListIterator<QLineEdit> itLE( listValue ); |
1268 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { | 1362 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { |
1269 | if ( *it == "Department" ) | 1363 | if ( *it == tr("Department") ) |
1270 | (*itLE)->setText( ent.department() ); | 1364 | (*itLE)->setText( ent.department() ); |
1271 | 1365 | ||
1272 | if ( *it == "Company" ) | 1366 | if ( *it == tr("Company" )) |
1273 | (*itLE)->setText( ent.company() ); | 1367 | (*itLE)->setText( ent.company() ); |
1274 | 1368 | ||
1275 | if ( *it == "Office" ) | 1369 | if ( *it == tr("Office" )) |
1276 | (*itLE)->setText( ent.office() ); | 1370 | (*itLE)->setText( ent.office() ); |
1277 | 1371 | ||
1278 | if ( *it == "Profession" ) | 1372 | if ( *it == tr("Profession" )) |
1279 | (*itLE)->setText( ent.profession() ); | 1373 | (*itLE)->setText( ent.profession() ); |
1280 | 1374 | ||
1281 | if ( *it == "Assistant" ) | 1375 | if ( *it == tr("Assistant" )) |
1282 | (*itLE)->setText( ent.assistant() ); | 1376 | (*itLE)->setText( ent.assistant() ); |
1283 | 1377 | ||
1284 | if ( *it == "Manager" ) | 1378 | if ( *it == tr("Manager" )) |
1285 | (*itLE)->setText( ent.manager() ); | 1379 | (*itLE)->setText( ent.manager() ); |
1286 | 1380 | ||
1287 | if ( *it == "Spouse" ) | 1381 | if ( *it == tr("Spouse" )) |
1288 | (*itLE)->setText( ent.spouse() ); | 1382 | (*itLE)->setText( ent.spouse() ); |
1289 | 1383 | ||
1290 | if ( *it == "Birthday" ) | 1384 | if ( *it == tr("Birthday" )) |
1291 | (*itLE)->setText( ent.birthday() ); | 1385 | (*itLE)->setText( ent.birthday() ); |
1292 | 1386 | ||
1293 | if ( *it == "Anniversary" ) | 1387 | if ( *it == tr("Anniversary" )) |
1294 | (*itLE)->setText( ent.anniversary() ); | 1388 | (*itLE)->setText( ent.anniversary() ); |
1295 | 1389 | ||
1296 | if ( *it == "Nickname" ) | 1390 | if ( *it == tr("Nickname" )) |
1297 | (*itLE)->setText( ent.nickname() ); | 1391 | (*itLE)->setText( ent.nickname() ); |
1298 | 1392 | ||
1299 | if ( *it == "Children" ) | 1393 | if ( *it == tr("Children" )) |
1300 | (*itLE)->setText( ent.children() ); | 1394 | (*itLE)->setText( ent.children() ); |
1301 | 1395 | ||
1302 | } | 1396 | } |
@@ -1304,37 +1398,37 @@ void ContactEditor::setEntry( const Contact &entry ) { | |||
1304 | QStringList::Iterator itV; | 1398 | QStringList::Iterator itV; |
1305 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { | 1399 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { |
1306 | 1400 | ||
1307 | if ( *it == "Business Phone" || *it == "Work Phone" ) | 1401 | if ( *it == tr("Business Phone") || *it == tr("Work Phone" )) |
1308 | *itV = ent.businessPhone(); | 1402 | *itV = ent.businessPhone(); |
1309 | /* | 1403 | /* |
1310 | if ( *it == "Business 2 Phone" ) | 1404 | if ( *it == "Business 2 Phone" ) |
1311 | *itV = ent.business2Phone(); | 1405 | *itV = ent.business2Phone(); |
1312 | */ | 1406 | */ |
1313 | if ( *it == "Business Fax" || *it == "Work Fax" ) | 1407 | if ( *it == tr("Business Fax") || *it == tr("Work Fax" )) |
1314 | *itV = ent.businessFax(); | 1408 | *itV = ent.businessFax(); |
1315 | 1409 | ||
1316 | if ( *it == "Business Mobile" || *it == "work Mobile" ) | 1410 | if ( *it == tr("Business Mobile") || *it == tr("work Mobile" )) |
1317 | *itV = ent.businessMobile(); | 1411 | *itV = ent.businessMobile(); |
1318 | /* | 1412 | /* |
1319 | if ( *it == "Company Phone" ) | 1413 | if ( *it == "Company Phone" ) |
1320 | *itV = ent.companyPhone(); | 1414 | *itV = ent.companyPhone(); |
1321 | */ | 1415 | */ |
1322 | if ( *it == "Default Email" ) | 1416 | if ( *it == tr("Default Email" )) |
1323 | *itV = ent.defaultEmail(); | 1417 | *itV = ent.defaultEmail(); |
1324 | 1418 | ||
1325 | if ( *it == "Emails" ) | 1419 | if ( *it == tr("Emails" )) |
1326 | *itV = ent.emails(); | 1420 | *itV = ent.emails(); |
1327 | 1421 | ||
1328 | if ( *it == "Home Phone" ) | 1422 | if ( *it == tr("Home Phone" )) |
1329 | *itV = ent.homePhone(); | 1423 | *itV = ent.homePhone(); |
1330 | /* | 1424 | /* |
1331 | if ( *it == "Home 2 Phone" ) | 1425 | if ( *it == "Home 2 Phone" ) |
1332 | *itV = ent.home2Phone(); | 1426 | *itV = ent.home2Phone(); |
1333 | */ | 1427 | */ |
1334 | if ( *it == "Home Fax" ) | 1428 | if ( *it == tr("Home Fax" )) |
1335 | *itV = ent.homeFax(); | 1429 | *itV = ent.homeFax(); |
1336 | 1430 | ||
1337 | if ( *it == "Home Mobile" ) | 1431 | if ( *it == tr("Home Mobile" )) |
1338 | *itV = ent.homeMobile(); | 1432 | *itV = ent.homeMobile(); |
1339 | /* | 1433 | /* |
1340 | if ( *it == "Car Phone" ) | 1434 | if ( *it == "Car Phone" ) |
@@ -1346,7 +1440,7 @@ void ContactEditor::setEntry( const Contact &entry ) { | |||
1346 | if ( *it == "Other Phone" ) | 1440 | if ( *it == "Other Phone" ) |
1347 | *itV = ent.otherPhone(); | 1441 | *itV = ent.otherPhone(); |
1348 | */ | 1442 | */ |
1349 | if ( *it == "Business Pager" || *it == "Work Pager" ) | 1443 | if ( *it == tr("Business Pager") || *it == tr("Work Pager" )) |
1350 | *itV = ent.businessPager(); | 1444 | *itV = ent.businessPager(); |
1351 | /* | 1445 | /* |
1352 | if ( *it == "Home Pager") | 1446 | if ( *it == "Home Pager") |
@@ -1367,9 +1461,9 @@ void ContactEditor::setEntry( const Contact &entry ) { | |||
1367 | if ( *it == "Yahoo IM" ) | 1461 | if ( *it == "Yahoo IM" ) |
1368 | *itV = ent.yahooIM(); | 1462 | *itV = ent.yahooIM(); |
1369 | */ | 1463 | */ |
1370 | if ( *it == "Home Web Page" ) | 1464 | if ( *it == tr("Home Web Page") ) |
1371 | *itV = ent.homeWebpage(); | 1465 | *itV = ent.homeWebpage(); |
1372 | if ( *it == "Business Web Page" || *it == "Work Web Page" ) | 1466 | if ( *it == tr("Business WebPage") || *it == tr("Work Web Page") ) |
1373 | *itV = ent.businessWebpage(); | 1467 | *itV = ent.businessWebpage(); |
1374 | 1468 | ||
1375 | 1469 | ||
@@ -1463,37 +1557,37 @@ void ContactEditor::saveEntry() { | |||
1463 | QStringList::ConstIterator it; | 1557 | QStringList::ConstIterator it; |
1464 | QListIterator<QLineEdit> itLE( listValue ); | 1558 | QListIterator<QLineEdit> itLE( listValue ); |
1465 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { | 1559 | for ( it = slDynamicEntries.begin(); it != slDynamicEntries.end(); ++it, ++itLE) { |
1466 | if ( *it == "Department" ) | 1560 | if ( *it == tr("Department" )) |
1467 | ent.setDepartment( (*itLE)->text() ); | 1561 | ent.setDepartment( (*itLE)->text() ); |
1468 | 1562 | ||
1469 | if ( *it == "Company" ) | 1563 | if ( *it == tr("Company" )) |
1470 | ent.setCompany( (*itLE)->text() ); | 1564 | ent.setCompany( (*itLE)->text() ); |
1471 | 1565 | ||
1472 | if ( *it == "Office" ) | 1566 | if ( *it == tr("Office" )) |
1473 | ent.setOffice( (*itLE)->text() ); | 1567 | ent.setOffice( (*itLE)->text() ); |
1474 | 1568 | ||
1475 | if ( *it == "Profession" ) | 1569 | if ( *it == tr("Profession" )) |
1476 | ent.setProfession( (*itLE)->text() ); | 1570 | ent.setProfession( (*itLE)->text() ); |
1477 | 1571 | ||
1478 | if ( *it == "Assistant" ) | 1572 | if ( *it == tr("Assistant" )) |
1479 | ent.setAssistant( (*itLE)->text() ); | 1573 | ent.setAssistant( (*itLE)->text() ); |
1480 | 1574 | ||
1481 | if ( *it == "Manager" ) | 1575 | if ( *it == tr("Manager" )) |
1482 | ent.setManager( (*itLE)->text() ); | 1576 | ent.setManager( (*itLE)->text() ); |
1483 | 1577 | ||
1484 | if ( *it == "Spouse" ) | 1578 | if ( *it == tr("Spouse" )) |
1485 | ent.setSpouse( (*itLE)->text() ); | 1579 | ent.setSpouse( (*itLE)->text() ); |
1486 | 1580 | ||
1487 | if ( *it == "Birthday" ) | 1581 | if ( *it == tr("Birthday" )) |
1488 | ent.setBirthday( (*itLE)->text() ); | 1582 | ent.setBirthday( (*itLE)->text() ); |
1489 | 1583 | ||
1490 | if ( *it == "Anniversary" ) | 1584 | if ( *it == tr("Anniversary" )) |
1491 | ent.setAnniversary( (*itLE)->text() ); | 1585 | ent.setAnniversary( (*itLE)->text() ); |
1492 | 1586 | ||
1493 | if ( *it == "Nickname" ) | 1587 | if ( *it == tr("Nickname" )) |
1494 | ent.setNickname( (*itLE)->text() ); | 1588 | ent.setNickname( (*itLE)->text() ); |
1495 | 1589 | ||
1496 | if ( *it == "Children" ) | 1590 | if ( *it == tr("Children" )) |
1497 | ent.setChildren( (*itLE)->text() ); | 1591 | ent.setChildren( (*itLE)->text() ); |
1498 | 1592 | ||
1499 | } | 1593 | } |
@@ -1501,16 +1595,16 @@ void ContactEditor::saveEntry() { | |||
1501 | QStringList::ConstIterator itV; | 1595 | QStringList::ConstIterator itV; |
1502 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { | 1596 | for ( it = slChooserNames.begin(), itV = slChooserValues.begin(); it != slChooserNames.end(); ++it, ++itV ) { |
1503 | 1597 | ||
1504 | if ( *it == "Business Phone" || *it == "Work Phone" ) | 1598 | if ( *it == tr("Business Phone") || *it == tr("Work Phone" )) |
1505 | ent.setBusinessPhone( *itV ); | 1599 | ent.setBusinessPhone( *itV ); |
1506 | /* | 1600 | /* |
1507 | if ( *it == "Business 2 Phone" ) | 1601 | if ( *it == tr("Business 2 Phone" ) |
1508 | ent.setBusiness2Phone( *itV ); | 1602 | ent.setBusiness2Phone( *itV ); |
1509 | */ | 1603 | */ |
1510 | if ( *it == "Business Fax" || *it == "Work Fax" ) | 1604 | if ( *it == tr("Business Fax") || *it == tr("Work Fax" )) |
1511 | ent.setBusinessFax( *itV ); | 1605 | ent.setBusinessFax( *itV ); |
1512 | 1606 | ||
1513 | if ( *it == "Business Mobile" || *it == "Work Mobile" ) | 1607 | if ( *it == tr("Business Mobile") || *it == tr("Work Mobile" )) |
1514 | ent.setBusinessMobile( *itV ); | 1608 | ent.setBusinessMobile( *itV ); |
1515 | /* | 1609 | /* |
1516 | if ( *it == "Company Phone" ) | 1610 | if ( *it == "Company Phone" ) |
@@ -1519,7 +1613,7 @@ void ContactEditor::saveEntry() { | |||
1519 | //if ( *it == "Default Email" ) | 1613 | //if ( *it == "Default Email" ) |
1520 | //ent.setDefaultEmail( *itV ); | 1614 | //ent.setDefaultEmail( *itV ); |
1521 | 1615 | ||
1522 | if ( *it == "Emails" ) { | 1616 | if ( *it == tr("Emails" )) { |
1523 | QString allemail; | 1617 | QString allemail; |
1524 | QString defaultmail; | 1618 | QString defaultmail; |
1525 | parseEmailFrom( *itV, defaultmail, allemail ); | 1619 | parseEmailFrom( *itV, defaultmail, allemail ); |
@@ -1527,16 +1621,16 @@ void ContactEditor::saveEntry() { | |||
1527 | ent.setEmails( *itV ); | 1621 | ent.setEmails( *itV ); |
1528 | } | 1622 | } |
1529 | 1623 | ||
1530 | if ( *it == "Home Phone" ) | 1624 | if ( *it == tr("Home Phone" )) |
1531 | ent.setHomePhone( *itV ); | 1625 | ent.setHomePhone( *itV ); |
1532 | /* | 1626 | /* |
1533 | if ( *it == "Home 2 Phone" ) | 1627 | if ( *it == "Home 2 Phone" ) |
1534 | ent.setHome2Phone( *itV ); | 1628 | ent.setHome2Phone( *itV ); |
1535 | */ | 1629 | */ |
1536 | if ( *it == "Home Fax" ) | 1630 | if ( *it == tr("Home Fax" )) |
1537 | ent.setHomeFax( *itV ); | 1631 | ent.setHomeFax( *itV ); |
1538 | 1632 | ||
1539 | if ( *it == "Home Mobile" ) | 1633 | if ( *it == tr("Home Mobile" )) |
1540 | ent.setHomeMobile( *itV ); | 1634 | ent.setHomeMobile( *itV ); |
1541 | /* | 1635 | /* |
1542 | if ( *it == "Car Phone" ) | 1636 | if ( *it == "Car Phone" ) |
@@ -1548,7 +1642,7 @@ void ContactEditor::saveEntry() { | |||
1548 | if ( *it == "Other Phone" ) | 1642 | if ( *it == "Other Phone" ) |
1549 | ent.setOtherPhone( *itV ); | 1643 | ent.setOtherPhone( *itV ); |
1550 | */ | 1644 | */ |
1551 | if ( *it == "Business Pager" || *it == "Work Pager" ) | 1645 | if ( *it == tr("Business Pager") || *it == tr("Work Pager") ) |
1552 | ent.setBusinessPager( *itV ); | 1646 | ent.setBusinessPager( *itV ); |
1553 | /* | 1647 | /* |
1554 | if ( *it == "Home Pager" ) | 1648 | if ( *it == "Home Pager" ) |
@@ -1569,9 +1663,9 @@ void ContactEditor::saveEntry() { | |||
1569 | if ( *it == "Yahoo IM" ) | 1663 | if ( *it == "Yahoo IM" ) |
1570 | ent.setYahooIM( *itV ); | 1664 | ent.setYahooIM( *itV ); |
1571 | */ | 1665 | */ |
1572 | if ( *it == "Home Web Page" ) | 1666 | if ( *it == tr("Home Web Page") ) |
1573 | ent.setHomeWebpage( *itV ); | 1667 | ent.setHomeWebpage( *itV ); |
1574 | if ( *it == "Business Web Page" || *it == "Work Web Page" ) | 1668 | if ( *it == tr("Business WebPage") || *it == tr("Work Web Page" )) |
1575 | ent.setBusinessWebpage( *itV ); | 1669 | ent.setBusinessWebpage( *itV ); |
1576 | 1670 | ||
1577 | 1671 | ||