mpxplugins/viewplugins/views/collectionviewhg/src/mpxcollectionviewhgcontainer.cpp
equal
deleted
inserted
replaced
4357 |
4357 |
4358 if ( iFindOp == EMPXOpenAlbum ) |
4358 if ( iFindOp == EMPXOpenAlbum ) |
4359 { |
4359 { |
4360 if( iCurrentViewType == EMPXViewMediawall ) |
4360 if( iCurrentViewType == EMPXViewMediawall ) |
4361 { |
4361 { |
4362 ShowAlbumSongsDialogL( aResults ); |
4362 // do not call ShowAlbumSongsDialogL if song count = 0 |
|
4363 // otherwise panic occurs |
|
4364 if( songArray->Count() ) |
|
4365 { |
|
4366 ShowAlbumSongsDialogL( aResults ); |
|
4367 } |
|
4368 else |
|
4369 { |
|
4370 iMediaWall->StartOpeningAnimationL( EFalse ); |
|
4371 } |
4363 } |
4372 } |
4364 else |
4373 else |
4365 { |
4374 { |
4366 ShowAlbumSongsL( aResults ); |
4375 ShowAlbumSongsL( aResults ); |
4367 } |
4376 } |
4476 KMPXMediaArrayContents ) ) ); |
4485 KMPXMediaArrayContents ) ) ); |
4477 User::LeaveIfNull( songArray ); |
4486 User::LeaveIfNull( songArray ); |
4478 TInt songCount = songArray->Count(); |
4487 TInt songCount = songArray->Count(); |
4479 |
4488 |
4480 CDesC16ArrayFlat* songList = new (ELeave) CDesC16ArrayFlat(songCount); |
4489 CDesC16ArrayFlat* songList = new (ELeave) CDesC16ArrayFlat(songCount); |
4481 |
4490 CleanupStack::PushL(songList); |
|
4491 |
4482 if ( songCount > 1 ) |
4492 if ( songCount > 1 ) |
4483 { |
4493 { |
4484 HBufC* shuffleText = StringLoader::LoadLC( |
4494 HBufC* shuffleText = StringLoader::LoadLC( |
4485 R_MPX_MEDIAWALL_DIALOG_SHUFFLE ); |
4495 R_MPX_MEDIAWALL_DIALOG_SHUFFLE ); |
4486 // Make room for 3 more formatting characters. |
4496 // Make room for 3 more formatting characters. |
4526 } |
4536 } |
4527 } |
4537 } |
4528 |
4538 |
4529 CTextListBoxModel* model = listBox->Model(); |
4539 CTextListBoxModel* model = listBox->Model(); |
4530 model->SetItemTextArray( songList ); |
4540 model->SetItemTextArray( songList ); |
|
4541 CleanupStack::Pop(); // songList |
4531 model->SetOwnershipType( ELbmOwnsItemArray ); |
4542 model->SetOwnershipType( ELbmOwnsItemArray ); |
4532 CleanupStack::Pop( dialog ); |
4543 CleanupStack::Pop( dialog ); |
4533 iDialog = dialog; |
4544 iDialog = dialog; |
4534 TBool play( EFalse ); |
4545 TBool play( EFalse ); |
4535 GfxTransEffect::Deregister( iDialog ); |
4546 GfxTransEffect::Deregister( iDialog ); |