89 #include <mpxcollectionopenutility.h> |
89 #include <mpxcollectionopenutility.h> |
90 |
90 |
91 #include <mpxfindinmusicshop.h> |
91 #include <mpxfindinmusicshop.h> |
92 #include <mpxfindinmusicshopcommon.h> // KFindInMShopKeyInValid |
92 #include <mpxfindinmusicshopcommon.h> // KFindInMShopKeyInValid |
93 |
93 |
94 // cenrep key need to be checked whether USB cable is connected in MTP/Combined Mode |
94 // cenrep key need to be checked whether Mass Storage or MTP is connected |
95 #include <UsbWatcherInternalPSKeys.h> |
95 #include <UsbWatcherInternalPSKeys.h> |
96 #include <usbpersonalityids.h> |
96 #include <usbpersonalityids.h> |
|
97 #include <mtpprivatepskeys.h> |
97 #include <mpxappui.hrh> |
98 #include <mpxappui.hrh> |
98 #include <mpxinternalcrkeys.h> |
99 #include <mpxinternalcrkeys.h> |
99 #include <mpxtlshelper.h> |
100 #include <mpxtlshelper.h> |
100 #include <mpxuser.h> |
101 #include <mpxuser.h> |
101 #include "mpxcollectionviewhglistboxarray.h" |
102 #include "mpxcollectionviewhglistboxarray.h" |
614 KMPlayerRemoteWritePolicy ); |
615 KMPlayerRemoteWritePolicy ); |
615 |
616 |
616 TInt usbStatus; |
617 TInt usbStatus; |
617 RProperty::Get(KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, usbStatus); |
618 RProperty::Get(KPSUidUsbWatcher, KUsbWatcherSelectedPersonality, usbStatus); |
618 |
619 |
619 |
620 TInt mtpStatus = EMtpPSStatusUninitialized; |
620 // Whenever usb is connected |
621 RProperty::Get( KMtpPSUid, KMtpPSStatus, mtpStatus); |
621 if ( usbStatus == KUsbPersonalityIdMTP |
622 |
622 || usbStatus == KUsbPersonalityIdMS |
623 MPX_DEBUG2("CMPXCollectionViewHgImp::ConstructL, mtpstatus = %d", mtpStatus); |
623 || usbStatus == KUsbPersonalityIdPTP |
624 |
624 || usbStatus == KUsbPersonalityIdPCSuiteMTP |
625 // Whenever usb/mtp is connected |
625 || usbStatus == KUsbPersonalityIdPCSuite ) |
626 if ( usbStatus == KUsbPersonalityIdMS |
|
627 || usbStatus == KUsbPersonalityIdPTP |
|
628 || usbStatus == KUsbPersonalityIdPCSuite |
|
629 || mtpStatus != EMtpPSStatusUninitialized ) |
626 { |
630 { |
627 RProperty::Set( KMPXViewPSUid, |
631 RProperty::Set( KMPXViewPSUid, |
628 KMPXUSBUnblockingPSStatus, |
632 KMPXUSBUnblockingPSStatus, |
629 EMPXUSBUnblockingPSStatusActive); |
633 EMPXUSBUnblockingPSStatusActive); |
630 } |
634 } |
752 |
756 |
753 if(iContainer->FindBoxVisibility()) |
757 if(iContainer->FindBoxVisibility()) |
754 { |
758 { |
755 iContainer->EnableFindBox(EFalse); |
759 iContainer->EnableFindBox(EFalse); |
756 } |
760 } |
|
761 |
|
762 // delete songs list to update T-bone view after deleting a song |
|
763 album->Delete( KMPXMediaArrayContents ); |
757 } |
764 } |
758 iConfirmationDlg = NULL; |
765 iConfirmationDlg = NULL; |
759 CleanupStack::PopAndDestroy( waitNoteText ); |
766 CleanupStack::PopAndDestroy( waitNoteText ); |
760 |
|
761 // delete songs list to update T-bone view after deleting a song |
|
762 album->Delete( KMPXMediaArrayContents ); |
|
763 } |
767 } |
764 } |
768 } |
765 CleanupStack::PopAndDestroy( path ); |
769 CleanupStack::PopAndDestroy( path ); |
766 } |
770 } |
767 } |
771 } |
1267 iCurrentHighlightedIndex = KErrNotFound; |
1271 iCurrentHighlightedIndex = KErrNotFound; |
1268 } |
1272 } |
1269 else if ( ( aIndex > 0 ) |
1273 else if ( ( aIndex > 0 ) |
1270 && ( aIndex < iContainer->CurrentListItemCount() ) ) |
1274 && ( aIndex < iContainer->CurrentListItemCount() ) ) |
1271 { |
1275 { |
1272 iContainer->SetLbxCurrentItemIndexAndDraw( aIndex ); |
1276 // No need to do anything here |
1273 } |
1277 } |
1274 else |
1278 else |
1275 { |
1279 { |
1276 iContainer->SetLbxCurrentItemIndexAndDraw( 0 ); |
1280 iContainer->SetLbxCurrentItemIndexAndDraw( 0 ); |
1277 } |
1281 } |
3668 // |
3672 // |
3669 void CMPXCollectionViewHgImp::UpdateMiddleSoftKeyDisplayL( TInt aMskId ) |
3673 void CMPXCollectionViewHgImp::UpdateMiddleSoftKeyDisplayL( TInt aMskId ) |
3670 { |
3674 { |
3671 MPX_FUNC( "CMPXCollectionViewHgImp::UpdateMiddleSoftKeyDisplayL" ); |
3675 MPX_FUNC( "CMPXCollectionViewHgImp::UpdateMiddleSoftKeyDisplayL" ); |
3672 CEikButtonGroupContainer* cba = Cba(); |
3676 CEikButtonGroupContainer* cba = Cba(); |
3673 if ( cba ) |
3677 // We only update middle softkey for non-touch UI |
|
3678 if ( cba && !AknLayoutUtils::PenEnabled() ) |
3674 { |
3679 { |
3675 if ( !iContainer->CurrentListItemCount() ) // list is empty |
3680 if ( !iContainer->CurrentListItemCount() ) // list is empty |
3676 { |
3681 { |
3677 // remove middle softkey label |
3682 // remove middle softkey label |
3678 iCommonUiHelper->RemoveMiddleSoftKeyLabel( *cba ); |
3683 iCommonUiHelper->RemoveMiddleSoftKeyLabel( *cba ); |
4071 iPopuponRefresh = EFalse; |
4076 iPopuponRefresh = EFalse; |
4072 } |
4077 } |
4073 } |
4078 } |
4074 // USB flags |
4079 // USB flags |
4075 // |
4080 // |
4076 CEikMenuBar* menuBar( MenuBar() ); |
4081 CEikMenuBar* menuBar( MenuBar() ); |
4077 if(iContainer) |
|
4078 { |
|
4079 iContainer->EnableMarking( EFalse ); |
|
4080 } |
|
4081 if(menuBar) |
|
4082 { |
|
4083 menuBar->SetMenuTitleResourceId( R_MPX_COLLECTION_VIEW_MENUBAR_NO_MARKING ); |
|
4084 } |
|
4085 TBool IsUSBEvent( EFalse ); |
4082 TBool IsUSBEvent( EFalse ); |
4086 if( type == EMcMsgUSBMassStorageStart || type == EMcMsgUSBMTPStart ) |
4083 if( type == EMcMsgUSBMassStorageStart || type == EMcMsgUSBMTPStart ) |
4087 { |
4084 { |
4088 iUSBOnGoing = ETrue; |
4085 iUSBOnGoing = ETrue; |
4089 IsUSBEvent = ETrue; |
4086 IsUSBEvent = ETrue; |
5949 MPX_FUNC( "CMPXCollectionViewHgImp::DoActivateL()" ); |
5946 MPX_FUNC( "CMPXCollectionViewHgImp::DoActivateL()" ); |
5950 |
5947 |
5951 // Add view deactivation observer |
5948 // Add view deactivation observer |
5952 AppUi()->AddViewDeactivationObserverL( this ); |
5949 AppUi()->AddViewDeactivationObserverL( this ); |
5953 |
5950 |
5954 #ifdef __ENABLE_PODCAST_IN_MUSIC_MENU |
5951 CMPXCollectionPath* cpath( iCollectionUtility->Collection().PathL() ); |
|
5952 CleanupStack::PushL( cpath ); |
5955 // media is not valid until the first HandleOpenL call |
5953 // media is not valid until the first HandleOpenL call |
5956 CEikButtonGroupContainer* cba = Cba(); |
5954 CEikButtonGroupContainer* cba = Cba(); |
5957 if ( cba ) |
5955 if ( cba ) |
5958 { |
5956 { |
5959 cba->SetCommandSetL(R_MPX_OPTIONS_BACK_CBA_NO_ACTION); |
5957 cba->SetCommandSetL(( cpath->Levels() == 3 && !iIsEmbedded ) ? |
5960 cba->DrawNow(); |
5958 R_MPX_OPTIONS_HIDE_CBA: R_MPX_OPTIONS_BACK_CBA_NO_ACTION ); |
5961 } |
5959 cba->DrawDeferred(); |
5962 #else |
5960 } |
5963 // media is not valid until the first HandleOpenL call |
|
5964 CEikButtonGroupContainer* cba = Cba(); |
|
5965 if ( cba ) |
|
5966 { |
|
5967 cba->SetCommandSetL( |
|
5968 ( iViewUtility->ViewHistoryDepth() == 1 && !iIsEmbedded ) ? |
|
5969 R_MPX_OPTIONS_EXIT_CBA_NO_ACTION : R_MPX_OPTIONS_BACK_CBA_NO_ACTION ); |
|
5970 cba->DrawDeferred(); |
|
5971 } |
|
5972 #endif |
|
5973 |
5961 |
5974 // Set status pane layout if switched here directly from another view, |
5962 // Set status pane layout if switched here directly from another view, |
5975 // such as when using the AnyKey |
5963 // such as when using the AnyKey |
5976 StatusPane()->MakeVisible( ETrue ); |
5964 StatusPane()->MakeVisible( ETrue ); |
5977 StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT); |
5965 StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT); |
5982 iContainer->SetCbaHandler( this ); |
5970 iContainer->SetCbaHandler( this ); |
5983 } |
5971 } |
5984 iContainer->SetMopParent( this ); |
5972 iContainer->SetMopParent( this ); |
5985 AppUi()->AddToStackL( *this, iContainer ); |
5973 AppUi()->AddToStackL( *this, iContainer ); |
5986 iContainer->SetRect( ClientRect() ); |
5974 iContainer->SetRect( ClientRect() ); |
5987 |
|
5988 CMPXCollectionPath* cpath( iCollectionUtility->Collection().PathL() ); |
|
5989 CleanupStack::PushL( cpath ); |
|
5990 |
|
5991 |
5975 |
5992 |
5976 |
5993 UpdateTitlePaneL(); |
5977 UpdateTitlePaneL(); |
5994 |
5978 |
5995 |
5979 |
6040 // If previous view is Collection view, it can only be podcast view |
6023 // If previous view is Collection view, it can only be podcast view |
6041 if ( iViewUtility->PreviousViewType().iUid == KMPXPluginTypeCollectionUid ) |
6024 if ( iViewUtility->PreviousViewType().iUid == KMPXPluginTypeCollectionUid ) |
6042 { |
6025 { |
6043 iPodcast = ETrue; |
6026 iPodcast = ETrue; |
6044 } |
6027 } |
6045 // don't bother getting duration if at plugin list |
|
6046 if ( cpath->Levels() > 1 ) |
|
6047 #endif |
6028 #endif |
6048 { |
6029 |
6049 GetDurationL(); |
|
6050 } |
|
6051 MPX_DEBUG_PATH(*cpath); |
6030 MPX_DEBUG_PATH(*cpath); |
6052 |
6031 |
6053 DoIncrementalOpenL( cpath->Levels()>KMusicCollectionMenuLevel ? ETrue:EFalse ); |
6032 DoIncrementalOpenL( cpath->Levels()>KMusicCollectionMenuLevel ? ETrue:EFalse ); |
6054 |
6033 |
6055 iUpCount = 0; |
6034 iUpCount = 0; |
6208 { |
6187 { |
6209 case EMPXPlaylist: |
6188 case EMPXPlaylist: |
6210 { |
6189 { |
6211 // playlist view |
6190 // playlist view |
6212 aMenuPane->SetItemDimmed( EMPXCmdGoToPlaylists, ETrue ); |
6191 aMenuPane->SetItemDimmed( EMPXCmdGoToPlaylists, ETrue ); |
6213 aMenuPane->SetItemDimmed(EMPXCmdGoToMusicShop, iGoToMusicShopOptionHidden ); |
6192 if(usbUnblockingStatus) |
|
6193 { |
|
6194 aMenuPane->SetItemDimmed( EMPXCmdGoToMusicShop, ETrue ); |
|
6195 } |
|
6196 else |
|
6197 { |
|
6198 aMenuPane->SetItemDimmed(EMPXCmdGoToMusicShop, iGoToMusicShopOptionHidden ); |
|
6199 } |
6214 if (containerType != EMPXGroup ) // EMPXItem -> playlist tracks level |
6200 if (containerType != EMPXGroup ) // EMPXItem -> playlist tracks level |
6215 { |
6201 { |
6216 aMenuPane->SetItemDimmed( EMPXCmdGoToArtistAlbums, ETrue ); |
6202 aMenuPane->SetItemDimmed( EMPXCmdGoToArtistAlbums, ETrue ); |
6217 aMenuPane->SetItemDimmed( EMPXCmdGoToAllSongs, ETrue ); |
6203 aMenuPane->SetItemDimmed( EMPXCmdGoToAllSongs, ETrue ); |
6218 aMenuPane->SetItemDimmed( EMPXCmdGoToPodcasts, ETrue ); |
6204 aMenuPane->SetItemDimmed( EMPXCmdGoToPodcasts, ETrue ); |
6228 case EMPXAlbum: |
6214 case EMPXAlbum: |
6229 case EMPXArtist: |
6215 case EMPXArtist: |
6230 { |
6216 { |
6231 // Artists & Albums view |
6217 // Artists & Albums view |
6232 aMenuPane->SetItemDimmed( EMPXCmdGoToArtistAlbums, ETrue ); |
6218 aMenuPane->SetItemDimmed( EMPXCmdGoToArtistAlbums, ETrue ); |
6233 aMenuPane->SetItemDimmed(EMPXCmdGoToMusicShop, iGoToMusicShopOptionHidden ); |
6219 if(usbUnblockingStatus) |
|
6220 { |
|
6221 aMenuPane->SetItemDimmed( EMPXCmdGoToMusicShop, ETrue ); |
|
6222 } |
|
6223 else |
|
6224 { |
|
6225 aMenuPane->SetItemDimmed(EMPXCmdGoToMusicShop, iGoToMusicShopOptionHidden ); |
|
6226 } |
6234 if ( iContainer->IsTBoneView() ) //TBone View |
6227 if ( iContainer->IsTBoneView() ) //TBone View |
6235 { |
6228 { |
6236 aMenuPane->SetItemDimmed( EMPXCmdGoToAllSongs, ETrue ); |
6229 aMenuPane->SetItemDimmed( EMPXCmdGoToAllSongs, ETrue ); |
6237 aMenuPane->SetItemDimmed( EMPXCmdGoToPlaylists, ETrue ); |
6230 aMenuPane->SetItemDimmed( EMPXCmdGoToPlaylists, ETrue ); |
6238 aMenuPane->SetItemDimmed( EMPXCmdGoToPodcasts, ETrue ); |
6231 aMenuPane->SetItemDimmed( EMPXCmdGoToPodcasts, ETrue ); |
6245 } |
6238 } |
6246 case EMPXGenre: |
6239 case EMPXGenre: |
6247 { |
6240 { |
6248 // Genre view |
6241 // Genre view |
6249 aMenuPane->SetItemDimmed( EMPXCmdGoToGenre, ETrue ); |
6242 aMenuPane->SetItemDimmed( EMPXCmdGoToGenre, ETrue ); |
6250 aMenuPane->SetItemDimmed(EMPXCmdGoToMusicShop, iGoToMusicShopOptionHidden ); |
6243 if(usbUnblockingStatus) |
|
6244 { |
|
6245 aMenuPane->SetItemDimmed( EMPXCmdGoToMusicShop, ETrue ); |
|
6246 } |
|
6247 else |
|
6248 { |
|
6249 aMenuPane->SetItemDimmed(EMPXCmdGoToMusicShop, iGoToMusicShopOptionHidden ); |
|
6250 } |
6251 if ( containerType != EMPXGroup ) // EMPXItem -> tracks level |
6251 if ( containerType != EMPXGroup ) // EMPXItem -> tracks level |
6252 { |
6252 { |
6253 aMenuPane->SetItemDimmed( EMPXCmdGoToAllSongs, ETrue ); |
6253 aMenuPane->SetItemDimmed( EMPXCmdGoToAllSongs, ETrue ); |
6254 aMenuPane->SetItemDimmed( EMPXCmdGoToArtistAlbums, ETrue ); |
6254 aMenuPane->SetItemDimmed( EMPXCmdGoToArtistAlbums, ETrue ); |
6255 aMenuPane->SetItemDimmed( EMPXCmdGoToPlaylists, ETrue ); |
6255 aMenuPane->SetItemDimmed( EMPXCmdGoToPlaylists, ETrue ); |
6265 } |
6265 } |
6266 case EMPXSong: |
6266 case EMPXSong: |
6267 { |
6267 { |
6268 // Song view and Genre Track view |
6268 // Song view and Genre Track view |
6269 aMenuPane->SetItemDimmed( EMPXCmdGoToAllSongs, ETrue ); |
6269 aMenuPane->SetItemDimmed( EMPXCmdGoToAllSongs, ETrue ); |
6270 aMenuPane->SetItemDimmed(EMPXCmdGoToMusicShop, iGoToMusicShopOptionHidden ); |
6270 if(usbUnblockingStatus) |
|
6271 { |
|
6272 aMenuPane->SetItemDimmed( EMPXCmdGoToMusicShop, ETrue ); |
|
6273 } |
|
6274 else |
|
6275 { |
|
6276 aMenuPane->SetItemDimmed(EMPXCmdGoToMusicShop, iGoToMusicShopOptionHidden ); |
|
6277 } |
6271 break; |
6278 break; |
6272 } |
6279 } |
6273 default: |
6280 default: |
6274 { |
6281 { |
6275 break; |
6282 break; |
6311 KMPXUSBUnblockingPSStatus, |
6318 KMPXUSBUnblockingPSStatus, |
6312 usbUnblockingStatus); |
6319 usbUnblockingStatus); |
6313 |
6320 |
6314 if ( iContainer->CurrentLbxItemIndex() > KErrNotFound && !iContainer->IsTBoneView()) |
6321 if ( iContainer->CurrentLbxItemIndex() > KErrNotFound && !iContainer->IsTBoneView()) |
6315 { |
6322 { |
|
6323 aMenuPane->SetItemDimmed( EMPXCmdPlayItem, EFalse ); |
6316 if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive ) |
6324 if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive ) |
6317 { |
6325 { |
6318 aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue ); |
6326 aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, ETrue ); |
6319 aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); |
6327 aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); |
6320 } |
6328 } |
6321 else |
6329 else |
6322 { |
6330 { |
6323 aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, EFalse ); |
6331 aMenuPane->SetItemDimmed( EMPXCmdAddToPlaylist, EFalse ); |
6324 aMenuPane->SetItemDimmed( EMPXCmdDelete, EFalse ); |
6332 aMenuPane->SetItemDimmed( EMPXCmdDelete, EFalse ); |
6325 aMenuPane->SetItemDimmed( EMPXCmdPlayItem, EFalse ); |
|
6326 } |
6333 } |
6327 } |
6334 } |
6328 if ( iContainer->IsSelectedItemASong() && iContainer->IsTBoneView() ) |
6335 if ( iContainer->IsSelectedItemASong() && iContainer->IsTBoneView() ) |
6329 { |
6336 { |
6330 if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive ) |
6337 if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive ) |
6362 aMenuPane->SetItemDimmed( EMPXCmdSongDetails, ETrue ); |
6369 aMenuPane->SetItemDimmed( EMPXCmdSongDetails, ETrue ); |
6363 aMenuPane->SetItemDimmed( EMPXCmdUseAsCascade, ETrue ); |
6370 aMenuPane->SetItemDimmed( EMPXCmdUseAsCascade, ETrue ); |
6364 aMenuPane->SetItemDimmed( EMPXCmdPlaylistDetails, ETrue ); |
6371 aMenuPane->SetItemDimmed( EMPXCmdPlaylistDetails, ETrue ); |
6365 if ( !Layout_Meta_Data::IsLandscapeOrientation() ) |
6372 if ( !Layout_Meta_Data::IsLandscapeOrientation() ) |
6366 { |
6373 { |
6367 if( !iContainer->IsTBoneView()&& (iContainer->CurrentLbxItemIndex() > KErrNotFound)) |
6374 TInt usbUnblockingStatus; |
|
6375 RProperty::Get( KMPXViewPSUid, |
|
6376 KMPXUSBUnblockingPSStatus, |
|
6377 usbUnblockingStatus); |
|
6378 |
|
6379 if (usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive) |
|
6380 { |
|
6381 aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, ETrue); |
|
6382 } |
|
6383 else if( !iContainer->IsTBoneView()&& (iContainer->CurrentLbxItemIndex() > KErrNotFound)) |
6368 { |
6384 { |
6369 CMPXCollectionViewListBoxArray* array = |
6385 CMPXCollectionViewListBoxArray* array = |
6370 static_cast<CMPXCollectionViewListBoxArray*>( |
6386 static_cast<CMPXCollectionViewListBoxArray*>( |
6371 iContainer->ListBoxArray() ); |
6387 iContainer->ListBoxArray() ); |
6372 const CMPXMedia& media = array->MediaL( iContainer->CurrentLbxItemIndex() ); |
6388 const CMPXMedia& media = array->MediaL( iContainer->CurrentLbxItemIndex() ); |
6569 aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); |
6585 aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); |
6570 aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); |
6586 aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); |
6571 |
6587 |
6572 if ( iContainer->CurrentLbxItemIndex() > KErrNotFound ) |
6588 if ( iContainer->CurrentLbxItemIndex() > KErrNotFound ) |
6573 { |
6589 { |
|
6590 aMenuPane->SetItemDimmed( EMPXCmdPlayItem, EFalse ); |
6574 TInt usbUnblockingStatus; |
6591 TInt usbUnblockingStatus; |
6575 RProperty::Get( KMPXViewPSUid, |
6592 RProperty::Get( KMPXViewPSUid, |
6576 KMPXUSBUnblockingPSStatus, |
6593 KMPXUSBUnblockingPSStatus, |
6577 usbUnblockingStatus); |
6594 usbUnblockingStatus); |
6578 if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive ) |
6595 if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive ) |
6718 aMenuPane->SetItemDimmed( EMPXCmdUseAsCascade, ETrue ); |
6734 aMenuPane->SetItemDimmed( EMPXCmdUseAsCascade, ETrue ); |
6719 aMenuPane->SetItemDimmed( EMPXCmdSongDetails, ETrue ); |
6735 aMenuPane->SetItemDimmed( EMPXCmdSongDetails, ETrue ); |
6720 aMenuPane->SetItemDimmed( EMPXCmdAlbumArt, ETrue ); |
6736 aMenuPane->SetItemDimmed( EMPXCmdAlbumArt, ETrue ); |
6721 aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, ETrue ); |
6737 aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, ETrue ); |
6722 } |
6738 } |
6723 aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, !iUsingNokiaService ); |
6739 |
|
6740 TInt usbUnblockingStatus; |
|
6741 RProperty::Get( KMPXViewPSUid, |
|
6742 KMPXUSBUnblockingPSStatus, |
|
6743 usbUnblockingStatus); |
|
6744 |
|
6745 if (usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive) |
|
6746 { |
|
6747 aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, ETrue); |
|
6748 } |
|
6749 else |
|
6750 { |
|
6751 aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, !iUsingNokiaService ); |
|
6752 } |
6724 } |
6753 } |
6725 } |
6754 } |
6726 aMenuPane->SetItemDimmed( EMPXCmdRename, ETrue ); |
6755 aMenuPane->SetItemDimmed( EMPXCmdRename, ETrue ); |
6727 aMenuPane->SetItemDimmed( EMPXCmdPlaylistDetails, ETrue ); |
6756 aMenuPane->SetItemDimmed( EMPXCmdPlaylistDetails, ETrue ); |
6728 if (iServiceHandler->HandleSubmenuL(*aMenuPane)) |
6757 if (iServiceHandler->HandleSubmenuL(*aMenuPane)) |
6761 |
6790 |
6762 switch ( aResourceId ) |
6791 switch ( aResourceId ) |
6763 { |
6792 { |
6764 case R_MPX_COLLECTION_VIEW_MENU_1: |
6793 case R_MPX_COLLECTION_VIEW_MENU_1: |
6765 { |
6794 { |
|
6795 TInt usbUnblockingStatus; |
|
6796 RProperty::Get( KMPXViewPSUid, |
|
6797 KMPXUSBUnblockingPSStatus, |
|
6798 usbUnblockingStatus); |
|
6799 |
6766 HandleInitMusicMenuPaneL(aMenuPane); |
6800 HandleInitMusicMenuPaneL(aMenuPane); |
6767 aMenuPane->SetItemDimmed( EMPXCmdGoToNowPlaying, NowPlayingOptionVisibilityL() ); |
6801 aMenuPane->SetItemDimmed( EMPXCmdGoToNowPlaying, NowPlayingOptionVisibilityL() ); |
6768 if ( isListEmpty ) |
6802 if ( isListEmpty ) |
6769 { |
6803 { |
6770 aMenuPane->SetItemDimmed( EMPXCmdFind, ETrue ); |
6804 aMenuPane->SetItemDimmed( EMPXCmdFind, ETrue ); |
6775 aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue ); |
6809 aMenuPane->SetItemDimmed( EMPXCmdReorder, ETrue ); |
6776 aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue ); |
6810 aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue ); |
6777 aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); |
6811 aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); |
6778 aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue ); |
6812 aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue ); |
6779 aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); |
6813 aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); |
6780 aMenuPane->SetItemDimmed( EMPXCmdAddSongs, EFalse ); |
6814 if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive ) |
|
6815 { |
|
6816 aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue ); |
|
6817 } |
|
6818 else |
|
6819 { |
|
6820 aMenuPane->SetItemDimmed( EMPXCmdAddSongs, EFalse ); |
|
6821 } |
6781 } |
6822 } |
6782 else |
6823 else |
6783 { |
6824 { |
6784 aMenuPane->SetItemDimmed( EMPXCmdUpnpPlayVia, ETrue ); |
6825 aMenuPane->SetItemDimmed( EMPXCmdUpnpPlayVia, ETrue ); |
6785 aMenuPane->SetItemDimmed( EMPXCmdUPnPAiwCmdCopyToExternalCriteria, ETrue ); |
6826 aMenuPane->SetItemDimmed( EMPXCmdUPnPAiwCmdCopyToExternalCriteria, ETrue ); |
6790 aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); |
6831 aMenuPane->SetItemDimmed( EMPXCmdDelete, ETrue ); |
6791 aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue ); |
6832 aMenuPane->SetItemDimmed( EMPXCmdSend, ETrue ); |
6792 aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue ); |
6833 aMenuPane->SetItemDimmed( EMPXCmdRemove, ETrue ); |
6793 aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); |
6834 aMenuPane->SetItemDimmed( EMPXCmdPlayItem, ETrue ); |
6794 |
6835 |
6795 TInt usbUnblockingStatus; |
6836 |
6796 RProperty::Get( KMPXViewPSUid, |
|
6797 KMPXUSBUnblockingPSStatus, |
|
6798 usbUnblockingStatus); |
|
6799 |
6837 |
6800 if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive ) |
6838 if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive ) |
6801 { |
6839 { |
6802 aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue ); |
6840 aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue ); |
6803 aMenuPane->SetItemDimmed( EMPXCmdSend, SendOptionVisibilityL() ); |
6841 aMenuPane->SetItemDimmed( EMPXCmdSend, SendOptionVisibilityL() ); |
6809 iSelectionIndexCache = iContainer->CurrentSelectionIndicesL(); // not owned |
6847 iSelectionIndexCache = iContainer->CurrentSelectionIndicesL(); // not owned |
6810 if ( iSelectionIndexCache) |
6848 if ( iSelectionIndexCache) |
6811 { |
6849 { |
6812 selectionCount = iSelectionIndexCache->Count(); |
6850 selectionCount = iSelectionIndexCache->Count(); |
6813 } |
6851 } |
6814 // do not display add songs option when marking is on |
6852 // do not display add songs option when marking is on or USB is connected |
6815 aMenuPane->SetItemDimmed( EMPXCmdAddSongs, selectionCount > 0 ); |
6853 if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive ) |
|
6854 { |
|
6855 aMenuPane->SetItemDimmed( EMPXCmdAddSongs, ETrue ); |
|
6856 } |
|
6857 else |
|
6858 { |
|
6859 aMenuPane->SetItemDimmed( EMPXCmdAddSongs, selectionCount > 0 ); |
|
6860 } |
6816 |
6861 |
6817 if ( iContainer->CurrentLbxItemIndex() > KErrNotFound ) |
6862 if ( iContainer->CurrentLbxItemIndex() > KErrNotFound ) |
6818 { |
6863 { |
6819 aMenuPane->SetItemDimmed( EMPXCmdSend, SendOptionVisibilityL() ); |
6864 aMenuPane->SetItemDimmed( EMPXCmdSend, SendOptionVisibilityL() ); |
6820 aMenuPane->SetItemDimmed( EMPXCmdRemove, EFalse ); |
6865 aMenuPane->SetItemDimmed( EMPXCmdRemove, EFalse ); |
6878 if ( array->IsItemBrokenLinkL( currentItem ) || |
6923 if ( array->IsItemBrokenLinkL( currentItem ) || |
6879 array->IsItemCorruptedL( currentItem ) ) |
6924 array->IsItemCorruptedL( currentItem ) ) |
6880 { |
6925 { |
6881 aMenuPane->SetItemDimmed( EMPXCmdSongDetails, ETrue ); |
6926 aMenuPane->SetItemDimmed( EMPXCmdSongDetails, ETrue ); |
6882 } |
6927 } |
6883 aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, !iUsingNokiaService ); |
6928 |
|
6929 TInt usbUnblockingStatus; |
|
6930 RProperty::Get( KMPXViewPSUid, |
|
6931 KMPXUSBUnblockingPSStatus, |
|
6932 usbUnblockingStatus); |
|
6933 |
|
6934 if (usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive) |
|
6935 { |
|
6936 aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, ETrue); |
|
6937 } |
|
6938 else |
|
6939 { |
|
6940 aMenuPane->SetItemDimmed( EMPXCmdFindInMusicShop, !iUsingNokiaService ); |
|
6941 } |
6884 } |
6942 } |
6885 } |
6943 } |
6886 if (iServiceHandler->HandleSubmenuL(*aMenuPane)) |
6944 if (iServiceHandler->HandleSubmenuL(*aMenuPane)) |
6887 { |
6945 { |
6888 return; |
6946 return; |