mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp
branchRCL_3
changeset 26 70a8526f03f2
parent 21 a1247965635c
child 28 56b11cf8addb
--- a/mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp	Tue Apr 27 16:34:37 2010 +0300
+++ b/mpxplugins/viewplugins/views/commonplaybackview/src/mpxcommonplaybackviewimp.cpp	Tue May 11 16:10:56 2010 +0300
@@ -162,10 +162,6 @@
 _LIT(KMPXRnRealAudioMimeType, "audio/vnd.rn-realaudio");
 #endif
 
-#define THUMBNAIL_CENREP_UID 0x102830B0 // from thumbnailmanageruids.hrh
-const TUint32 KSizeAudioFullscreenWidth = 0x16;
-const TUint32 KSizeAudioFullscreenHeight = 0x17;
-
 // ======== MEMBER FUNCTIONS ========
 
 
@@ -215,16 +211,6 @@
     CleanupStack::PopAndDestroy( repository );
     repository = NULL;
 
-    repository = CRepository::NewLC( TUid::Uid(THUMBNAIL_CENREP_UID));
-
-    TInt xSize( 0 );
-    TInt ySize( 0 );
-    User::LeaveIfError( repository->Get( KSizeAudioFullscreenWidth, xSize ));
-    User::LeaveIfError( repository->Get( KSizeAudioFullscreenHeight, ySize ));
-    iFullScreenImageSize.SetSize(xSize,ySize);
-    CleanupStack::PopAndDestroy( repository );
-    repository = NULL;
-
     iChangeRTForAllProfiles =
         static_cast<TBool>( flags & KMPXChangeRTForAll );
 
@@ -757,12 +743,13 @@
             const TDesC& album = aMedia->ValueText( KMPXMediaGeneralUri );
             if(!iOldUri || iOldUri->Compare(album)!= 0)
                 {
+				TRect albumArtRect( iLayout->IndicatorLayout( ClientRect(), EAlbumArtArea ));
                 // Request for pre-generated TN size
                 MPX_TRAP( err,
                     iMPXUtility->ExtractAlbumArtL(
                     *aMedia,
                     *iContainer,
-                    iFullScreenImageSize ); );
+                    albumArtRect.Size() ); );
 
                 // cancel timer
                 if ( iTNRequestTimer->IsActive())
@@ -968,6 +955,7 @@
                     TInt err = freqMHzStr.Num( freqMHz, realFormat );
                     if ( err > 0 )
                         {
+                        AknTextUtils::LanguageSpecificNumberConversion( freqMHzStr );
                         HBufC* labelFormatText = StringLoader::LoadL(
                             R_MPX_FM_FREQUENCY_LABEL,
                             freqMHzStr );
@@ -2566,28 +2554,20 @@
     // Set title
     // Ignore errors from updating title pane since if that is not
     // updated, still want to activate view
-    TRAP_IGNORE(
+    TRAP_IGNORE( UpdateTitlePaneL() );
+
+    if ( !AknLayoutUtils::PenEnabled() )
         {
-        UpdateTitlePaneL();
-        CAknNavigationControlContainer* naviPane(
-            static_cast<CAknNavigationControlContainer*>
-            ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ))));
-        if ( naviPane )
+        CEikButtonGroupContainer* cba = Cba();
+        if ( cba )
             {
-            naviPane->PushDefaultL();
+#ifdef __ENABLE_MSK
+            iCommonUiHelper->SetMiddleSoftKeyLabelL(
+                *cba,
+                R_TEXT_SOFTKEY_EMPTY,
+                EAknSoftkeyForwardKeyEvent );
+#endif // __ENABLE_MSK
             }
-        } );
-
-    CEikButtonGroupContainer* cba = Cba();
-    if ( cba )
-        {
-
-#ifdef __ENABLE_MSK
-        iCommonUiHelper->SetMiddleSoftKeyLabelL(
-            *cba,
-            R_TEXT_SOFTKEY_EMPTY,
-            EAknSoftkeyForwardKeyEvent );
-#endif // __ENABLE_MSK
         }
 
     iPlaybackState = iPlaybackUtility->StateL();
@@ -3039,11 +3019,6 @@
             }
 
         iContainer->SetRect( ClientRect() );
-        delete iOldUri;
-        iOldUri = NULL;
-        // Update album art
-        TRAP_IGNORE( UpdateAlbumArtL( iMedia ));
-        TRAP_IGNORE( UpdateTrackInfoL( iMedia ));
         iContainer->DrawDeferred();
         }
     }
@@ -3878,7 +3853,7 @@
     {
     MPX_FUNC("CMPXCommonPlaybackViewImp::UpdateMiddleSoftKeyDisplayL");
 
-    if (iContainer)
+    if (iContainer && !AknLayoutUtils::PenEnabled() )
             {
         CEikButtonGroupContainer* cba = Cba();
         if (cba)
@@ -3997,6 +3972,7 @@
 TInt CMPXCommonPlaybackViewImp::HandleDelayedError( TAny* aPtr )
     {
 	TInt ret( KErrNone );
+	TInt index( KErrNotFound );
     CMPXCommonPlaybackViewImp* pv = reinterpret_cast<CMPXCommonPlaybackViewImp*>( aPtr );
     pv->iDelayedErrorTimer->Cancel();
     // compare index
@@ -4011,8 +3987,11 @@
             	{
                 return ret;
             	}
-
-			if ( pv->iErrIndex == pl->Index() )
+            if ( pl )
+                {
+                index = pl->Index();  
+                }  
+			if ( pv->iErrIndex == index )
 				{
 				MPX_TRAP( ret, pv->HandleErrorL( pv->iLastDelayedErr ) );
 				}
@@ -4056,7 +4035,8 @@
                     pv->iMPXUtility->ExtractAlbumArtL(
                     *pv->iMedia,
                     *pv->iContainer,
-                    albumArtRect.Size() ); );                
+                    albumArtRect.Size(),
+                    EFalse ); );
                 }
             }