180 parse.Set( KMPXCommonPlaybackRscPath, &KDC_APP_RESOURCE_DIR, NULL ); |
180 parse.Set( KMPXCommonPlaybackRscPath, &KDC_APP_RESOURCE_DIR, NULL ); |
181 TFileName resourceFile( parse.FullName() ); |
181 TFileName resourceFile( parse.FullName() ); |
182 User::LeaveIfError( MPXUser::CompleteWithDllPath( resourceFile ) ); |
182 User::LeaveIfError( MPXUser::CompleteWithDllPath( resourceFile ) ); |
183 BaflUtils::NearestLanguageFile( coeEnv->FsSession(), resourceFile ); |
183 BaflUtils::NearestLanguageFile( coeEnv->FsSession(), resourceFile ); |
184 iResourceOffset = coeEnv->AddResourceFileL( resourceFile ); |
184 iResourceOffset = coeEnv->AddResourceFileL( resourceFile ); |
185 |
185 iTvOutConfig = CTvOutConfig::NewL() ; |
186 if ( FeatureManager::FeatureSupported( KFeatureIdFmtx ) ) |
186 if ( FeatureManager::FeatureSupported( KFeatureIdFmtx ) ) |
187 { |
187 { |
188 parse.Set( KMPXFMTXRscPath, &KDC_APP_RESOURCE_DIR, NULL ); |
188 parse.Set( KMPXFMTXRscPath, &KDC_APP_RESOURCE_DIR, NULL ); |
189 TFileName fmtxResourceFile( parse.FullName() ); |
189 TFileName fmtxResourceFile( parse.FullName() ); |
190 User::LeaveIfError( MPXUser::CompleteWithDllPath( fmtxResourceFile ) ); |
190 User::LeaveIfError( MPXUser::CompleteWithDllPath( fmtxResourceFile ) ); |
481 if ( iTNRequestTimer ) |
481 if ( iTNRequestTimer ) |
482 { |
482 { |
483 iTNRequestTimer->Cancel(); |
483 iTNRequestTimer->Cancel(); |
484 delete iTNRequestTimer; |
484 delete iTNRequestTimer; |
485 } |
485 } |
|
486 if(iTvOutConfig) |
|
487 { |
|
488 delete iTvOutConfig; |
|
489 } |
486 |
490 |
487 MPX_DEBUG1( "CMPXCommonPlaybackViewImp::~CMPXCommonPlaybackViewImp exiting" ); |
491 MPX_DEBUG1( "CMPXCommonPlaybackViewImp::~CMPXCommonPlaybackViewImp exiting" ); |
488 } |
492 } |
489 |
493 |
490 // --------------------------------------------------------------------------- |
494 // --------------------------------------------------------------------------- |
2162 // Make sure status pane layout is usual when going |
2166 // Make sure status pane layout is usual when going |
2163 // directly to music menu |
2167 // directly to music menu |
2164 // Status pane has to be modified before view gets deactivated |
2168 // Status pane has to be modified before view gets deactivated |
2165 break; |
2169 break; |
2166 } |
2170 } |
|
2171 case EMPXPbvCmdSongDetails: |
|
2172 { |
|
2173 LaunchFileDetailsDialogL(); |
|
2174 break; |
|
2175 } |
2167 case EMPXPbvCmdPlay: |
2176 case EMPXPbvCmdPlay: |
2168 { |
2177 { |
2169 if ( iEmbedded ) |
2178 if ( iEmbedded ) |
2170 { |
2179 { |
2171 iPlaybackUtility->CommandL( EPbCmdDisableEffect ); |
2180 iPlaybackUtility->CommandL( EPbCmdDisableEffect ); |
2778 ETrue ); |
2789 ETrue ); |
2779 aMenuPane->SetItemDimmed( |
2790 aMenuPane->SetItemDimmed( |
2780 EMPXPbvCmdOpenMusicSettings, |
2791 EMPXPbvCmdOpenMusicSettings, |
2781 ETrue ); |
2792 ETrue ); |
2782 aMenuPane->SetItemDimmed( |
2793 aMenuPane->SetItemDimmed( |
2783 EMPXPbvCmdAddToPlaylist, |
|
2784 ETrue ); |
|
2785 aMenuPane->SetItemDimmed( |
|
2786 EMPXPbvCmdUseAsCascade, |
2794 EMPXPbvCmdUseAsCascade, |
2787 ETrue ); |
2795 ETrue ); |
2788 } |
2796 } |
2789 else |
2797 else |
2790 { |
2798 { |
2815 addToPlDimmed = EFalse; |
2823 addToPlDimmed = EFalse; |
2816 } |
2824 } |
2817 CleanupStack::PopAndDestroy( playlist ); |
2825 CleanupStack::PopAndDestroy( playlist ); |
2818 } |
2826 } |
2819 } |
2827 } |
2820 if ( usbUnblockingStatus == EMPXUSBUnblockingPSStatusActive ) |
|
2821 { |
|
2822 aMenuPane->SetItemDimmed( EMPXPbvCmdAddToPlaylist, ETrue ); |
|
2823 } |
|
2824 else |
|
2825 { |
|
2826 aMenuPane->SetItemDimmed( EMPXPbvCmdAddToPlaylist, addToPlDimmed ); |
|
2827 } |
|
2828 TBool isOfflineMode( EFalse ); |
2828 TBool isOfflineMode( EFalse ); |
2829 TBool isFormatNotSupported( EFalse ); |
2829 TBool isFormatNotSupported( EFalse ); |
2830 if ( !isOfflineMode && iMedia ) |
2830 if ( !isOfflineMode && iMedia ) |
2831 { |
2831 { |
2832 if ( iMedia->IsSupported( KMPXMediaDrmProtected ) ) |
2832 if ( iMedia->IsSupported( KMPXMediaDrmProtected ) ) |
4051 pv->iTNRequestTimer->Cancel(); |
4052 pv->iTNRequestTimer->Cancel(); |
4052 } |
4053 } |
4053 |
4054 |
4054 return KErrNone; |
4055 return KErrNone; |
4055 } |
4056 } |
|
4057 |
|
4058 // --------------------------------------------------------------------------- |
|
4059 // Launch Metadata Dialog to show the file details |
|
4060 // --------------------------------------------------------------------------- |
|
4061 // |
|
4062 EXPORT_C void CMPXCommonPlaybackViewImp::LaunchFileDetailsDialogL() |
|
4063 { |
|
4064 MMPXSource* s = iPlaybackUtility->Source(); |
|
4065 TInt count (0); |
|
4066 TInt index (0); |
|
4067 if ( s ) |
|
4068 { |
|
4069 CMPXCollectionPlaylist* playlist = s->PlaylistL(); |
|
4070 if ( playlist ) |
|
4071 { |
|
4072 count = playlist->Count(); |
|
4073 index = playlist->PathIndex( playlist->Index() ); |
|
4074 delete playlist; |
|
4075 playlist = NULL; |
|
4076 } |
|
4077 } |
|
4078 HBufC* buf = HBufC::NewLC( 5 ); // magic number, array granularity |
|
4079 buf->Des().AppendNum( index); |
|
4080 |
|
4081 // Activate Metadata dialog via View Framework |
|
4082 iViewUtility->ActivateViewL( TUid::Uid(KMPXPluginTypeMetadataEditorUid), buf ); |
|
4083 CleanupStack::PopAndDestroy(buf); |
|
4084 } |
4056 |
4085 |
4057 // End of File |
4086 // End of File |