1092 |
1092 |
1093 if ( !iIsWaitNoteCanceled ) |
1093 if ( !iIsWaitNoteCanceled ) |
1094 { |
1094 { |
1095 iIsDeleting = ETrue; |
1095 iIsDeleting = ETrue; |
1096 iCollectionUiHelper->DeleteL( *path, this ); |
1096 iCollectionUiHelper->DeleteL( *path, this ); |
|
1097 iFirstIndexOnScreen = iContainer->FirstIndexOnScreen(); |
1097 } |
1098 } |
1098 else if( iContainer ) |
1099 else if( iContainer ) |
1099 { |
1100 { |
1100 // delete was canceled before it even began, clear marked items |
1101 // delete was canceled before it even began, clear marked items |
1101 iContainer->ClearLbxSelection(); |
1102 iContainer->ClearLbxSelection(); |
1268 iCurrentHighlightedIndex = KErrNotFound; |
1269 iCurrentHighlightedIndex = KErrNotFound; |
1269 } |
1270 } |
1270 else if ( ( aIndex > 0 ) |
1271 else if ( ( aIndex > 0 ) |
1271 && ( aIndex < iContainer->CurrentListItemCount() ) ) |
1272 && ( aIndex < iContainer->CurrentListItemCount() ) ) |
1272 { |
1273 { |
1273 // No need to do anything here |
1274 iContainer->SetLbxCurrentItemIndexAndDraw( aIndex ); |
1274 } |
1275 } |
1275 else |
1276 else |
1276 { |
1277 { |
1277 iContainer->SetLbxCurrentItemIndexAndDraw( 0 ); |
1278 iContainer->SetLbxCurrentItemIndexAndDraw( 0 ); |
1278 } |
1279 } |
4285 UpdateListBoxL( aEntries, KMusicMenuPodcastMenuItemIndex, aComplete ); |
4286 UpdateListBoxL( aEntries, KMusicMenuPodcastMenuItemIndex, aComplete ); |
4286 ( void ) aIndex; |
4287 ( void ) aIndex; |
4287 } |
4288 } |
4288 else |
4289 else |
4289 { |
4290 { |
4290 UpdateListBoxL( aEntries, aIndex, aComplete ); |
4291 TInt topIndex = aIndex; |
|
4292 if ( iFirstIndexOnScreen > 0 ) |
|
4293 { |
|
4294 topIndex = iFirstIndexOnScreen; |
|
4295 if ( aComplete ) |
|
4296 { |
|
4297 iFirstIndexOnScreen = 0; |
|
4298 } |
|
4299 } |
|
4300 UpdateListBoxL( aEntries, topIndex, aComplete ); |
4291 } |
4301 } |
4292 #else |
4302 #else |
4293 UpdateListBoxL( aEntries, aIndex, aComplete ); |
4303 UpdateListBoxL( aEntries, aIndex, aComplete ); |
4294 #endif // __ENABLE_PODCAST_IN_MUSIC_MENU |
4304 #endif // __ENABLE_PODCAST_IN_MUSIC_MENU |
4295 if ( iContainer ) |
4305 if ( iContainer ) |
6972 |
6982 |
6973 CMPXCollectionViewListBoxArray* array = |
6983 CMPXCollectionViewListBoxArray* array = |
6974 static_cast<CMPXCollectionViewListBoxArray*>( |
6984 static_cast<CMPXCollectionViewListBoxArray*>( |
6975 iContainer->ListBoxArray() ); |
6985 iContainer->ListBoxArray() ); |
6976 const CMPXMedia& containerMedia = array->ContainerMedia(); |
6986 const CMPXMedia& containerMedia = array->ContainerMedia(); |
|
6987 |
|
6988 if ( &containerMedia == NULL ) |
|
6989 { |
|
6990 // If containerMedia is NULL, Dim all options |
|
6991 DimAllOptions(aResourceId, aMenuPane); |
|
6992 return; |
|
6993 } |
|
6994 |
6977 TMPXGeneralType containerType( |
6995 TMPXGeneralType containerType( |
6978 containerMedia.ValueTObjectL<TMPXGeneralType>( KMPXMediaGeneralType ) ); |
6996 containerMedia.ValueTObjectL<TMPXGeneralType>( KMPXMediaGeneralType ) ); |
6979 TMPXGeneralCategory containerCategory( |
6997 TMPXGeneralCategory containerCategory( |
6980 containerMedia.ValueTObjectL<TMPXGeneralCategory>( |
6998 containerMedia.ValueTObjectL<TMPXGeneralCategory>( |
6981 KMPXMediaGeneralCategory ) ); |
6999 KMPXMediaGeneralCategory ) ); |
8474 return ETrue; |
8492 return ETrue; |
8475 } |
8493 } |
8476 else |
8494 else |
8477 return EFalse; |
8495 return EFalse; |
8478 } |
8496 } |
|
8497 |
|
8498 void CMPXCollectionViewHgImp::DimAllOptions(TInt aResourceId, CEikMenuPane* aMenuPane) |
|
8499 { |
|
8500 switch ( aResourceId ) |
|
8501 { |
|
8502 case R_MPX_COLLECTION_VIEW_MENU_1: |
|
8503 { |
|
8504 aMenuPane->SetItemDimmed( EMPXCmdGoToNowPlaying, ETrue ); |
|
8505 aMenuPane->SetItemDimmed( EMPXCmdGoToArtistAlbums, ETrue ); |
|
8506 aMenuPane->SetItemDimmed( EMPXCmdGoToAllSongs, ETrue ); |
|
8507 aMenuPane->SetItemDimmed( EMPXCmdGoToPlaylists, ETrue ); |
|
8508 aMenuPane->SetItemDimmed( EMPXCmdGoToGenre, ETrue ); |
|
8509 aMenuPane->SetItemDimmed( EMPXCmdGoToPodcasts, ETrue ); |
|
8510 aMenuPane->SetItemDimmed( EMPXCmdGoToMusicShop, ETrue ); |
|
8511 aMenuPane->SetItemDimmed( EMPXCmdGoToMultipleMusicShop, ETrue ); |
|
8512 aMenuPane->SetItemDimmed( EMPXCmdMusicLibraryDetails, ETrue ); |
|
8513 aMenuPane->SetItemDimmed( EMPXCmdRefreshLibrary, ETrue ); |
|
8514 aMenuPane->SetItemDimmed( EMPXCmdAbout, ETrue ); |
|
8515 aMenuPane->SetItemDimmed( EMPXCmdFind, ETrue ); |
|
8516 aMenuPane->SetItemDimmed( EMPXCmdUpnpPlayVia, ETrue ); |
|
8517 aMenuPane->SetItemDimmed( EMPXCmdUPnPAiwCmdCopyToExternalCriteria, ETrue ); |
|
8518 aMenuPane->SetItemDimmed( EMPXCmdCreatePlaylist, ETrue ); |
|
8519 aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue ); |
|
8520 aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue ); |
|
8521 aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue ); |
|
8522 aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue ); |
|
8523 aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); |
|
8524 aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue ); |
|
8525 aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); |
|
8526 break; |
|
8527 } |
|
8528 case R_MPX_COLLECTION_VIEW_MENU_2: |
|
8529 { |
|
8530 aMenuPane->SetItemDimmed( EMPXCmdRename, ETrue ); |
|
8531 aMenuPane->SetItemDimmed( EMPXCmdAlbumArt, ETrue ); |
|
8532 aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, ETrue ); |
|
8533 aMenuPane->SetItemDimmed( EMPXCmdSongDetails, ETrue ); |
|
8534 aMenuPane->SetItemDimmed( EMPXCmdPlaylistDetails, ETrue ); |
|
8535 break; |
|
8536 } |
|
8537 case R_AVKON_MENUPANE_MARKABLE_LIST: |
|
8538 { |
|
8539 aMenuPane->SetItemDimmed(EAknCmdEditListMenu, ETrue); |
|
8540 break; |
|
8541 } |
|
8542 } |
|
8543 } |
8479 // End of File |
8544 // End of File |