951 // --------------------------------------------------------------------------- |
951 // --------------------------------------------------------------------------- |
952 // |
952 // |
953 void CCCAppCommLauncherLPadModel::Reset() |
953 void CCCAppCommLauncherLPadModel::Reset() |
954 { |
954 { |
955 iButtonDataArray.Reset(); |
955 iButtonDataArray.Reset(); |
|
956 iAddressFields.Close(); |
956 iButtonIconArray->ResetAndDestroy(); |
957 iButtonIconArray->ResetAndDestroy(); |
957 } |
958 } |
958 |
959 |
959 // --------------------------------------------------------------------------- |
960 // --------------------------------------------------------------------------- |
960 // CCCAppCommLauncherLPadModel::ContactPresenceChangedL |
961 // CCCAppCommLauncherLPadModel::ContactPresenceChangedL |
1246 tempText.Zero(); |
1247 tempText.Zero(); |
1247 |
1248 |
1248 HBufC* formattedText = NULL; |
1249 HBufC* formattedText = NULL; |
1249 TBool street = EFalse; |
1250 TBool street = EFalse; |
1250 TBool local = EFalse; |
1251 TBool local = EFalse; |
|
1252 TBool region = EFalse; |
|
1253 TBool country = EFalse; |
1251 |
1254 |
1252 TPtrC* text = iAddressFields.Find( EAddressStreet ); |
1255 TPtrC* text = iAddressFields.Find( EAddressStreet ); |
1253 if ( text ) |
1256 if ( text ) |
1254 { |
1257 { |
1255 fields->AppendL( *text ); |
1258 fields->AppendL( *text ); |
1260 { |
1263 { |
1261 fields->AppendL( *text ); |
1264 fields->AppendL( *text ); |
1262 local = ETrue; |
1265 local = ETrue; |
1263 } |
1266 } |
1264 |
1267 |
1265 if ( street && local ) |
1268 text = iAddressFields.Find( EAddressCountry ); |
|
1269 if( text ) |
|
1270 { |
|
1271 fields->AppendL( *text ); |
|
1272 country = ETrue; |
|
1273 } |
|
1274 else |
|
1275 { |
|
1276 country = EFalse; |
|
1277 fields->AppendL(KNullDesC16); |
|
1278 } |
|
1279 |
|
1280 text = iAddressFields.Find( EAddressRegion ); |
|
1281 if ( text ) |
|
1282 { |
|
1283 fields->AppendL( *text ); |
|
1284 region = ETrue; |
|
1285 } |
|
1286 else |
|
1287 { |
|
1288 region = EFalse; |
|
1289 fields->AppendL(KNullDesC16); |
|
1290 } |
|
1291 |
|
1292 |
|
1293 if ( street && local) |
1266 { |
1294 { |
1267 formattedText = StringLoader::LoadLC( |
1295 formattedText = StringLoader::LoadLC( |
1268 R_QTN_PHOB_COMMLAUNCHER_ONELINEPREVIEW, *fields ); |
1296 R_QTN_PHOB_COMMLAUNCHER_ONELINEPREVIEW, *fields ); |
1269 } |
1297 } |
|
1298 else if( street && country ) |
|
1299 { |
|
1300 formattedText = StringLoader::LoadLC( |
|
1301 R_QTN_PHOB_COMMLAUNCHER_ONELINEPREVIEW, *fields ); |
|
1302 } |
|
1303 else if( region || country ) |
|
1304 { |
|
1305 formattedText = StringLoader::LoadLC( |
|
1306 R_QTN_PHOB_COMMLAUNCHER_ONELINEPREVIEW, *fields ); |
|
1307 } |
1270 else |
1308 else |
1271 { |
1309 { |
1272 formattedText = StringLoader::LoadLC( |
1310 formattedText = KNullDesC16().AllocLC(); |
1273 R_QTN_PHOB_POPUP_INCOMPLETE_ADDRESS ); |
|
1274 } |
1311 } |
1275 |
1312 |
1276 tempText.Append( *formattedText ); |
1313 tempText.Append( *formattedText ); |
1277 CleanupStack::PopAndDestroy( formattedText ); |
1314 CleanupStack::PopAndDestroy( formattedText ); |
1278 CleanupStack::PopAndDestroy( fields ); |
1315 CleanupStack::PopAndDestroy( fields ); |