uifw/EikStd/coctlsrc/eikcba.cpp
branchRCL_3
changeset 6 9f56a4e1b8ab
parent 5 aabf2c525e0f
child 8 71dd06cfe933
--- a/uifw/EikStd/coctlsrc/eikcba.cpp	Fri Mar 12 15:43:43 2010 +0200
+++ b/uifw/EikStd/coctlsrc/eikcba.cpp	Mon Mar 15 12:41:34 2010 +0200
@@ -56,7 +56,7 @@
 #include <aknitemactionmenu.h>
 #include "akncollectionobserver.h"
 #include "aknitemactionmenuregister.h"
-
+#include "akntrace.h"
 /**
  * Color value for transparent pixel (ARGB format).
  */
@@ -76,12 +76,16 @@
 inline TAknWindowComponentLayout DoCompose(TAknWindowComponentLayout aLine1, 
     TAknWindowComponentLayout aLine2) 
     { 
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return TAknWindowComponentLayout::Compose(aLine1, aLine2); 
     }
 
 inline TAknTextComponentLayout DoComposeText(TAknWindowComponentLayout aLine1, 
     TAknTextComponentLayout aLine2) 
     { 
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return TAknWindowComponentLayout::ComposeText(aLine1, aLine2); 
     }
     
@@ -91,6 +95,8 @@
 */
 static TBool IsAreaSideRightPaneActive()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return EFalse;
     }
 
@@ -100,6 +106,7 @@
 */
 static TBool IsMskEnabledLayoutActive()
     {
+    _AKNTRACE_FUNC_ENTER;
     TBool result( EFalse );
     
     if ( Layout_Meta_Data::IsMSKEnabled() )
@@ -125,6 +132,7 @@
             }
         }
     
+    _AKNTRACE_FUNC_EXIT;
     return result;
     }
 
@@ -135,6 +143,8 @@
  */
 static TBool IsBitmapUpdateNeeded( CFbsBitmap* aOldBitmap, const TSize& aSize )
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return !aOldBitmap || ( aOldBitmap->SizeInPixels() != aSize );
     }
 
@@ -240,19 +250,24 @@
                                           iRightFrameMask( NULL ),
                                           iItemActionMenu( NULL )
         {
+        _AKNTRACE_FUNC_ENTER;
+        _AKNTRACE_FUNC_EXIT;
         };
     
     static CEikCbaExtension* NewL( CEikCba& aOwner )
         {
+        _AKNTRACE_FUNC_ENTER;
         CEikCbaExtension* self = new (ELeave) CEikCbaExtension( aOwner );
         CleanupStack::PushL( self );
         self->ConstructL();
         CleanupStack::Pop( self );
+        _AKNTRACE_FUNC_EXIT;
         return self;
         }
     
     void ConstructL() 
         {
+        _AKNTRACE_FUNC_ENTER;
         // Wallpaper is not drawn by embedded CBA.
         if ( !iOwner.Flags().IsSet( ECbaEmbedded ) )
             {
@@ -276,10 +291,12 @@
             AknItemActionMenuRegister::RegisterCollectionObserverL(
                     *this );
             }
+        _AKNTRACE_FUNC_EXIT;
         }
     
     ~CEikCbaExtension() 
         {
+        _AKNTRACE_FUNC_ENTER;
         if ( iOwner.Flags().IsSet( ECbaSingleClickEnabled ) )
             {
             AknItemActionMenuRegister::UnregisterCollectionObserver( *this );
@@ -297,19 +314,24 @@
         delete iLskPostingOverlayBitmap;
         delete iRskPostingOverlayBitmap;
         delete iBmpFile;
+        _AKNTRACE_FUNC_EXIT;
         }
     
     /** From base class MCenRepNotifyHandlerCallback */
     void HandleNotifyInt( TUint32 /*aId*/, TInt aNewValue )
         {
+        _AKNTRACE_FUNC_ENTER;
         iWallpaperInUse = aNewValue;
         iOwner.SetSkinBackgroundId( KAknsIIDNone );
+        _AKNTRACE_FUNC_EXIT;
         }
         
     void UpdateSoftkeyFrameL( TBool aForcedUpdate )
         {
+        _AKNTRACE_FUNC_ENTER;
         if ( !AknLayoutUtils::PenEnabled() )
             {
+            _AKNTRACE_FUNC_EXIT;
             return;
             }
         TAknLayoutRect cbarect;
@@ -439,6 +461,7 @@
         iUpdateFrameInnerRect = innerRect;
         iUpdateMSKFrameOuterRect = mskOuterRect;
         iUpdateMskFrameInnerRect = mskInnerRect;
+        _AKNTRACE_FUNC_EXIT;
         }
 
 
@@ -453,6 +476,7 @@
      */
     static void MergeMaskInto16MA( CFbsBitmap* aMask, CFbsBitmap* aDestBitmap )
         {
+        _AKNTRACE_FUNC_ENTER;
         // aMask display mode must be EGray256.
         // aMask must not be compressed in RAM.
         // aDestBitmap display mode must be EColor16MA.
@@ -490,6 +514,7 @@
             }
         aDestBitmap->UnlockHeap();
         aMask->UnlockHeap();
+        _AKNTRACE_FUNC_EXIT;
         }
 
     /**
@@ -506,6 +531,7 @@
             const TRect& aRect,
             CEikCbaButton* aButton )
         {
+        _AKNTRACE_FUNC_ENTER;
         delete aBitmap;
         aBitmap = NULL;
 
@@ -559,6 +585,7 @@
         CleanupStack::PopAndDestroy( 2, bitmapDevice );
         CleanupStack::Pop( bitmap );
         aBitmap = bitmap;
+        _AKNTRACE_FUNC_EXIT;
         }
     
     /**
@@ -573,6 +600,7 @@
             CEikCbaButton* aRightButton,
             TInt aAknLayoutFlags )
         {
+        _AKNTRACE_FUNC_ENTER;
         TRect rightSoftKeyButtonRect;
         TRect leftSoftKeyButtonRect;
         if( aAknLayoutFlags & EAknLayoutCbaInRightPane )
@@ -685,6 +713,7 @@
                 iRskPostingOverlayBitmap,
                 rightSoftKeyButtonRect,
                 aRightButton );
+        _AKNTRACE_FUNC_EXIT;
         }
 
     /**
@@ -695,7 +724,9 @@
      */
     void SetItemActionMenu( CAknItemActionMenu* aItemActionMenu )
         {
+        _AKNTRACE_FUNC_ENTER;
         iItemActionMenu = aItemActionMenu;
+        _AKNTRACE_FUNC_EXIT;
         }
 
     /**
@@ -707,12 +738,14 @@
      */
     void CollectionChanged( TBool aCollectionVisible )
         {
+        _AKNTRACE_FUNC_ENTER;
         // Do not update state if invisible collection tries to enable sk
         if ( aCollectionVisible
                 || iOwner.Flags().IsClear( ECbaItemSoftkeyDisabled ) )
             {
             iOwner.UpdateItemSpecificSoftkey();
             }
+        _AKNTRACE_FUNC_EXIT;
         }
 
     /**
@@ -723,15 +756,18 @@
      */
     TBool Active() const
         {
+        _AKNTRACE_FUNC_ENTER;
+        _AKNTRACE_FUNC_EXIT;
         return iOwner.IsVisible() && !iOwner.IsEmpty();
         }
     
     /*
      * Using the special theme Id draw background
      */
-    void DrawSemiTransparencyL(CWindowGc& aGc, 
-            const TRect& aRect)
-    	{
+    void DrawSemiTransparency( CWindowGc& aGc, 
+            const TRect& aRect )
+        {
+        _AKNTRACE_FUNC_ENTER;
         aGc.SetBrushStyle( CGraphicsContext::ESolidBrush );
         aGc.SetBrushColor( TRgb(128, 128, 128, 64) );
         aGc.Clear();
@@ -810,7 +846,8 @@
                     SemiButtonID,
                     SemiButtonCenterID);
             }                    
-    	}
+        _AKNTRACE_FUNC_EXIT;
+        }
 public:
     
     CEikCba&               iOwner;
@@ -891,22 +928,28 @@
 CEikCba* CEikCba::NewL(const CEikCba* aPrevious, MEikCommandObserver* aCommandObserver, 
     RWindowGroup* aParentWg)
     { 
+    _AKNTRACE_FUNC_ENTER; 
     CEikCba* self = CEikCba::NewLC(aPrevious, aCommandObserver, aParentWg); // static
     CleanupStack::Pop( self );
+    _AKNTRACE_FUNC_EXIT;
     return self;
     }
 
 CEikCba* CEikCba::NewL(TInt aResourceId, const CEikCba* aPrevious, 
     MEikCommandObserver* aCommandObserver, RWindowGroup* aParentWg)
     { 
+    _AKNTRACE_FUNC_ENTER; 
     CEikCba* self = CEikCba::NewLC(aResourceId, aPrevious, aCommandObserver, aParentWg); // static
     CleanupStack::Pop( self );
+    _AKNTRACE_FUNC_EXIT;
     return self;
     }
 
 CEikCba* CEikCba::NewLC(const CEikCba* aPrevious, MEikCommandObserver* aCommandObserver, 
     RWindowGroup* aParentWg)
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return CEikCba::NewLC(KNoResource, aPrevious, aCommandObserver, aParentWg); // static
     }
 
@@ -914,6 +957,8 @@
     MEikCommandObserver* aCommandObserver, RWindowGroup* aParentWg,
     TUint aFlags)
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return CEikCba::NewLC(KNoResource, aPrevious, aCommandObserver,
         aParentWg, aFlags);
     }
@@ -921,10 +966,12 @@
 CEikCba* CEikCba::NewLC(TInt aResourceId, const CEikCba* aPrevious,
     MEikCommandObserver* aCommandObserver, RWindowGroup* aParentWg)
     { 
+    _AKNTRACE_FUNC_ENTER; 
     CEikCba* self = new(ELeave) CEikCba(aPrevious, aCommandObserver, aParentWg); // static
     CleanupStack::PushL(self);
     self->ConstructL(aResourceId);
     AKNTASHOOK_ADDL( self, "CEikCba" );
+    _AKNTRACE_FUNC_EXIT;
     return self;
     }
 
@@ -932,11 +979,13 @@
     MEikCommandObserver* aCommandObserver, RWindowGroup* aParentWg,
     TUint aFlags)
     {
+    _AKNTRACE_FUNC_ENTER;
     CEikCba* self = new(ELeave) CEikCba(aPrevious, aCommandObserver,
         aParentWg, aFlags);
     CleanupStack::PushL(self);
     self->ConstructL(aResourceId);
     AKNTASHOOK_ADDL( self, "CEikCba" );
+    _AKNTRACE_FUNC_EXIT;
     return self;
     }
 
@@ -946,6 +995,7 @@
 */
 CEikCba::~CEikCba()
     {
+    _AKNTRACE_FUNC_ENTER;
     AKNTASHOOK_REMOVE();
     // Revert the clock and indicator pane area of status pane
     // to use the previous skin background.
@@ -990,6 +1040,7 @@
 #endif // RD_ENHANCED_CBA
 
     delete iExtension;
+    _AKNTRACE_FUNC_EXIT;
     }
 
 /**
@@ -1000,6 +1051,7 @@
     TUint aFlags)
     : iLink(aPrevious), iCommandObserver(aCommandObserver), iParentWg(aParentWg)
     {
+    _AKNTRACE_FUNC_ENTER;
     if (aFlags & CEikButtonGroupContainer::EIsEmbedded)
         {
         // CBA is embedded in another component (eg. dialog/popup/setting page
@@ -1011,7 +1063,7 @@
         iFlags.Set( ECbaParentAsControl );
         }
     
-	if ( aFlags & CEikButtonGroupContainer::EDelayActivation )
+    if ( aFlags & CEikButtonGroupContainer::EDelayActivation )
         {
         iFlags.Set( ECbaActivationDelayed );
         }    
@@ -1024,11 +1076,13 @@
         }
 
     SetNonFocusing();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::SetContainerWindowL( const CCoeControl& aContainer )
     {
+    _AKNTRACE_FUNC_ENTER;
     // CCoeControl::SetContainerWindowL closes the previously own window and
     // deactivates control. Therefore store the activation status and re-set
     // it after the container window has been set.
@@ -1212,15 +1266,19 @@
         {
         CCoeControl::SetContainerWindowL( aContainer );            
         }        
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::ActivateL()
     {
+    _AKNTRACE_FUNC_ENTER;
     CCoeControl::ActivateL();
+    _AKNTRACE_FUNC_EXIT;
     }
     
 void CEikCba::BaseConstructL()
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( iFlags.IsSet( ECbaEmbedded ) && iFlags.IsSet( ECbaParentAsControl ) )
         {
         __ASSERT_DEBUG( iParentWg, User::Invariant() );
@@ -1383,27 +1441,18 @@
                 }
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::ConstructL(TInt aResourceId)
     {
+    _AKNTRACE_FUNC_ENTER;
     if (aResourceId != KNoResource)
         {
         TResourceReader reader;
         iCoeEnv->CreateResourceReaderLC(reader, aResourceId);
         iCbaFlags = reader.ReadInt32();        // flags resource
-        
-        const TUid KActiveIdle2Uid = {0x102750F0};
-        CEikApplication* app = CEikonEnv::Static()->EikAppUi()->Application();
-        if ( app && app->AppDllUid() == KActiveIdle2Uid )
-            {
-            //it's intereting that the transparent can't not be set after the CBA was created for a while.
-            //it just can be done in the CBA constructor, maybe some defect in Window server, but I'm not sure
-            //about that, in order to fix the defect I have hardcode the transparent flag for homescreen the only usercase.
-            //it should be fixed later.  
-            iCbaFlags |= EEikCbaFlagSemiTransparent;
-            }
-    
+            
         // If using enhanced cba.
         if ( (iCbaFlags & EEikEnhancedButtonGroup) == EEikEnhancedButtonGroup ) 
             { 
@@ -1559,11 +1608,13 @@
 
     // Set CBA faded in case the softkeys are empty.
     SetFadeState();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::ConstructFromResourceL(TResourceReader& aReader)
     {
+    _AKNTRACE_FUNC_ENTER;
     BaseConstructL();
     CreateScrollBarFrameL();
     TGulAlignmentValue anAlignment[3] = {EHLeftVCenter, EHRightVCenter, EHCenterVCenter};
@@ -1654,16 +1705,21 @@
 
     // Set CBA faded in case the softkeys are empty.
     SetFadeState();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 TInt CEikCba::MaxCommands() const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return KMaxSeries60Softkeys;
     }
 
 TInt CEikCba::MSKEnabledInPlatform() const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return iMSKEnabledInPlatform;
     }
 
@@ -1674,32 +1730,38 @@
 //
 void CEikCba::SetMSKIconL()
     {
+    _AKNTRACE_FUNC_ENTER;
     // MSK is not supported by dialog-embedded CBAs.
     if ( iFlags.IsSet( ECbaInsideDialog ) || iFlags.IsSet( ECbaEmbedded ) )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
         
     if ( !MskAllowed() )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;         
         }
         
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
     if ( !skin )
         { 
+        _AKNTRACE_FUNC_EXIT;        
         return;
         }
     if( iExtension->iIfMskIconSet )
         {
-    //	UpdateIconL();
-    	return;
+    //    UpdateIconL();
+        _AKNTRACE_FUNC_EXIT;
+        return;
         }
     TEikGroupControl &gCtrl = iControlArray->At( KControlArrayCBAButtonMSKPosn );
 
     CEikCbaButton *button = static_cast<CEikCbaButton*>( gCtrl.iControl );
     if ( !button )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
    
@@ -1836,6 +1898,7 @@
         }
     
     button->SetContainerWindowL( *this );
+    _AKNTRACE_FUNC_EXIT;
     }
 
 EXPORT_C TBool CEikCba::UpdateMSKIconL( const TAknsItemID& aId,
@@ -1844,13 +1907,15 @@
     const TInt32 aBmpM,
     TBool aEnable )
     {
+    _AKNTRACE_FUNC_ENTER;
     iExtension->iIfMskIconSet = EFalse;
 
     // MSK is not supported by dialog-embedded CBAs.
     if (!aEnable)
         {
-    	SetMSKIconL();
-    	return ETrue;
+        SetMSKIconL();
+        _AKNTRACE_FUNC_EXIT;
+        return ETrue;
         }
 
     delete iExtension->iBmpFile;
@@ -1863,6 +1928,7 @@
     iExtension->iBmp = aBmp;
     iExtension->iBmpM = aBmpM;
     
+    _AKNTRACE_FUNC_EXIT;
     return UpdateIconL();
     }
 
@@ -1873,6 +1939,7 @@
 //
 EXPORT_C void CEikCba::EnableItemSpecificSoftkey( TBool aEnable )
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( iFlags.IsSet( ECbaSingleClickEnabled ) )
         {
         iFlags.Assign( ECbaItemSpecificSoftkeyInUse, aEnable );
@@ -1897,21 +1964,26 @@
                 }
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::SetMSKCommandObserver(MEikCommandObserver* aCommandObserver)
     {
+    _AKNTRACE_FUNC_ENTER;
     // aCommandObserver set to NULL when removing observer.
     iMSKCommandObserver = aCommandObserver;
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::UpdateCbaLabels(TBool aScrollerOn)
     {
+    _AKNTRACE_FUNC_ENTER;
     // This method is called only from scrollbar that has nothing to do with
     // dialog-embedded CBAs -> ignore the call.
     if ( iFlags.IsSet( ECbaInsideDialog ) )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
         
@@ -1928,37 +2000,48 @@
     // Change of text may affect layout.
     SizeChanged();
     DrawDeferred() ;
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::SetSBFrameObserver(MEikScrollBarObserver* aObserver)
     {
+    _AKNTRACE_FUNC_ENTER;
     if(iSBFrame)
         {
         iSBFrame->SetScrollBarFrameObserver(aObserver);
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::SetScrollBarModelL(TEikScrollBarModel* aModel)
     {
+    _AKNTRACE_FUNC_ENTER;
     if(iSBFrame)
         {
         VScrollBarAsControl()->SetModelL(aModel);
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 const CEikCbaScrollBarFrame* CEikCba::ScrollBarFrame() const
     { 
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;    
     return STATIC_CAST(const CEikCbaScrollBarFrame*, iSBFrame); 
     }
 
 CAknScrollBar* CEikCba::VScrollBarAsControl()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return STATIC_CAST(CAknScrollBar*, VScrollBarAsGroupControl().iControl);
     }
 
 void CEikCba::InsertControlL(TEikGroupControl& aGroupControl,TInt aIndex)
     {
+    _AKNTRACE_FUNC_ENTER;
     iControlArray->InsertL(aIndex,aGroupControl); // Takes ownership at this point.
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -1968,6 +2051,7 @@
                            const CFbsBitmap* /*aBitmap*/,
                            const CFbsBitmap* /*aMask*/ )
     {
+    _AKNTRACE_FUNC_ENTER;
     // We need to check if this call changes the softkeys from being
     // empty to having a command or vice versa to be able to maintain
     // correct fade state.
@@ -2010,11 +2094,13 @@
         }
 
     ReportContentChangedEvent();      
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::SetCommandL(TInt aPosition,TInt aResourceId)
     {
+    _AKNTRACE_FUNC_ENTER;
     TResourceReader reader;
     iCoeEnv->CreateResourceReaderLC(reader,aResourceId);
     TInt version = reader.ReadInt8(); // version
@@ -2053,6 +2139,7 @@
     CleanupStack::PopAndDestroy(); // reader
     
     ReportContentChangedEvent();
+    _AKNTRACE_FUNC_EXIT;
     }
     
 /**
@@ -2062,6 +2149,7 @@
 */
 void CEikCba::SetCommandSetL(TInt aResourceId)
     {
+    _AKNTRACE_FUNC_ENTER;
     TResourceReader reader;
     iCoeEnv->CreateResourceReaderLC(reader, aResourceId);
 
@@ -2071,6 +2159,7 @@
         { 
         CleanupStack::PopAndDestroy(); // reader
         OfferCommandListL( aResourceId );
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
     
@@ -2172,12 +2261,15 @@
     // Force labels to be re-formatted...
     SizeChanged();
     ReportContentChangedEvent();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::AddCommandL(TInt /*aPosition*/, TInt /*aCommandId*/, const TDesC* /*aText*/, 
     const CFbsBitmap* /*aBitmap*/, const CFbsBitmap* /*aMask*/)
     {
+    _AKNTRACE_FUNC_ENTER;
     User::Leave(KErrNotSupported);
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -2185,6 +2277,7 @@
                                                TInt aCommandId,
                                                const TDesC* aText)
     {
+    _AKNTRACE_FUNC_ENTER;
     // We need to check if this call changes the softkeys from being
     // empty to having a command or vice versa to be able to maintain
     // correct fade state.
@@ -2232,6 +2325,7 @@
         }
 
     ReportContentChangedEvent();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::AddCommandToStackL( TInt aPosition,
@@ -2240,15 +2334,18 @@
                                   const CFbsBitmap* /*aBitmap*/,
                                   const CFbsBitmap* /*aMask*/ )
     {
+    _AKNTRACE_FUNC_ENTER;
 
     AddCommandToStackWithoutSizeChangedL( aPosition, aCommandId, aText);
     // Force labels to be re-formatted...
     SizeChanged();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::AddCommandToStackL(TInt aPosition, TInt aResourceId)
     {
+    _AKNTRACE_FUNC_ENTER;
     TResourceReader reader;
     iCoeEnv->CreateResourceReaderLC(reader,aResourceId);
     TUint8 version = (TUint8)reader.ReadInt8();
@@ -2267,10 +2364,12 @@
     CleanupStack::PopAndDestroy(); // reader
       
     ReportContentChangedEvent();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::AddCommandSetToStackL(TInt aResourceId)
     {
+    _AKNTRACE_FUNC_ENTER;
     TResourceReader reader;
     iCoeEnv->CreateResourceReaderLC(reader,aResourceId);
 
@@ -2340,20 +2439,26 @@
     // Force labels to be re-formatted...
     SizeChanged();
     ReportContentChangedEvent();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::SetDefaultCommand(TInt /*aCommandId*/)
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TSize CEikCba::CalcMinimumSizeL(TInt /*aResourceId*/)
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return MinimumSize();
     }
 
 
 void CEikCba::RemoveCommandFromStack( TInt aPosition, TInt aCommandId )
     {
+    _AKNTRACE_FUNC_ENTER;
     // We need to check if this call changes the softkeys from being
     // empty to having a command or vice versa to be able to maintain
     // correct fade state.
@@ -2406,16 +2511,20 @@
 
     DrawDeferred();
     ReportContentChangedEvent();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::RemovePreviousCommandWithoutSizeChanged(TInt aPosition)
     {
+    _AKNTRACE_FUNC_ENTER;
     TEikGroupControl& groupCtrl = (*iControlArray)[aPosition];
     STATIC_CAST(CEikCbaButton*, groupCtrl.iControl)->RemovePreviousCommand();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::RemovePreviousCommand(TInt aPosition)
     {
+    _AKNTRACE_FUNC_ENTER;
     RemovePreviousCommandWithoutSizeChanged( aPosition );
     // If MSK or left CBA was changed, this sets MSK icon accordingly.
     TRAP_IGNORE( SetMSKIconL() ); 
@@ -2423,16 +2532,20 @@
     // Force labels to be re-formatted...
     SizeChanged();
     ReportContentChangedEvent();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 TInt CEikCba::CommandPos(TInt aCommandId) const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return IndexById(aCommandId);
     }
 
 void CEikCba::DimCommand(TInt aCommandId,TBool aDimmed)
     {
+    _AKNTRACE_FUNC_ENTER;
     CCoeControl* control( ButtonById( aCommandId ) );
     if ( control )
         {
@@ -2441,19 +2554,24 @@
             control->SetDimmed( aDimmed );
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TBool CEikCba::IsCommandDimmed(TInt aCommandId) const
     {
+    _AKNTRACE_FUNC_ENTER;
     if( ButtonById(aCommandId) )
         {
+        _AKNTRACE_FUNC_EXIT;
         return ButtonById(aCommandId)->IsDimmed();
         }
+    _AKNTRACE_FUNC_EXIT;
     return EFalse;
     }
 
 void CEikCba::MakeCommandVisible(TInt aCommandId, TBool aVisible)
     {
+    _AKNTRACE_FUNC_ENTER;
     CCoeControl* control( ButtonById( aCommandId ) );
     if ( control )
         {
@@ -2462,19 +2580,25 @@
             control->MakeVisible( aVisible );
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TBool CEikCba::IsCommandVisible(TInt aCommandId) const
     {
+    _AKNTRACE_FUNC_ENTER;
     if( ButtonById(aCommandId) )
         {
+        _AKNTRACE_FUNC_EXIT;
         return ButtonById(aCommandId)->IsVisible();
         }
+    _AKNTRACE_FUNC_EXIT;
     return EFalse;        
     }
 
 void CEikCba::AnimateCommand(TInt /*aCommandId*/)
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -2484,8 +2608,10 @@
 //
 void CEikCba::DimCommandByPosition( TInt aPosition, TBool aDimmed )
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( aPosition >= iControlArray->Count() )
         { 
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
 
@@ -2494,6 +2620,7 @@
         TEikGroupControl& groupCtrl = ( *iControlArray )[ aPosition ];
         groupCtrl.iControl->SetDimmed( aDimmed );
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -2503,12 +2630,15 @@
 //
 TBool CEikCba::IsCommandDimmedByPosition( TInt aPosition ) const
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( aPosition >= iControlArray->Count() ) 
         {
+        _AKNTRACE_FUNC_EXIT;
         return EFalse;    
         }
 
     TEikGroupControl& groupCtrl = (*iControlArray)[aPosition];
+    _AKNTRACE_FUNC_EXIT;
     return groupCtrl.iControl->IsDimmed();
     }
 
@@ -2519,8 +2649,10 @@
 //
 void CEikCba::MakeCommandVisibleByPosition( TInt aPosition, TBool aVisible )
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( aPosition >= iControlArray->Count() )
         { 
+        _AKNTRACE_FUNC_EXIT;
         return;    
         }
 
@@ -2539,27 +2671,34 @@
             groupCtrl.iControl->DrawDeferred();
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 TBool CEikCba::IsCommandVisibleByPosition(TInt aPosition) const
     {
+    _AKNTRACE_FUNC_ENTER;
     if (aPosition >= iControlArray->Count()) 
         {
+        _AKNTRACE_FUNC_EXIT;
         return EFalse;    
         }
     TEikGroupControl& groupCtrl = (*iControlArray)[aPosition];
 
     if ( !iFlags.IsSet( ECbaInsideDialog ) )
         {
+        _AKNTRACE_FUNC_EXIT;
         return STATIC_CAST(CEikCbaButton*, groupCtrl.iControl)->IsVisible();
         }
         
+    _AKNTRACE_FUNC_EXIT;    
     return !groupCtrl.iControl->IsDimmed();
     }
 
 void CEikCba::AnimateCommandByPosition(TInt /*aPosition*/)
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     }
     
 /*CCoeControl* CEikCba::GroupControlByPosition(TInt aPosition) const
@@ -2580,10 +2719,12 @@
 //
 TRect CEikCba::ButtonRectByPosition( TInt aPosition, TBool aRelativeToScreen )
     {
+    _AKNTRACE_FUNC_ENTER;
     TRect rect( 0, 0, 0, 0 );
     
     if ( aPosition >= iControlArray->Count() || aPosition < 0 )
         {
+        _AKNTRACE_FUNC_EXIT;
         return rect;
         }
 
@@ -2753,25 +2894,32 @@
             }
         }
         
+    _AKNTRACE_FUNC_EXIT;
     return rect;
     }
 
 
 CCoeControl* CEikCba::AsControl()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return this;
     }
 
 const CCoeControl* CEikCba::AsControl() const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return this;
     }
 
 
 void CEikCba::SetBoundingRect( const TRect& /*aBoundingRect*/ )
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( iFlags.IsSet( ECbaEmbedded ) )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
 
@@ -2788,6 +2936,7 @@
     // query control. 
     if ( iFlags.IsSet( ECbaInsideDialog ) )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
 
@@ -3062,6 +3211,7 @@
         
         DrawDeferred();
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -3072,14 +3222,17 @@
 //
 void CEikCba::ReduceRect( TRect& aBoundingRect ) const
     {
+    _AKNTRACE_FUNC_ENTER;
     // CBA inside Popup/Query Input does not reduce bounding rect
     if ( iFlags.IsSet( ECbaEmbedded ) || iFlags.IsSet( ECbaInsideDialog ) )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
     
     if ( !IsVisible() )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
 
@@ -3201,49 +3354,68 @@
                 }
             }   
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 CCoeControl* CEikCba::GroupControlById(TInt aCommandId)
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return ButtonById(aCommandId);
     }
 
 
 CCoeControl* CEikCba::GroupControlById(TInt aCommandId) const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return ButtonById(aCommandId);
     }
 
 TInt CEikCba::CommandId(TInt aCommandPos) const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return (*iControlArray)[aCommandPos].iId;
     }
 
 TInt CEikCba::ButtonCount() const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return (iControlArray->Count()-1); // -1 for scroll bar;
     }
 
 CEikCommandButton* CEikCba::GroupControlAsButton(TInt /*aCommandId*/) const 
     {
+    _AKNTRACE_FUNC_ENTER;
     // It is not possible to convert a CBA button to a CEikCommandButton.
     // Please use an interface that does not use a CEikCommandButton conversion,
     // e.g. CEikButtonGroupContainer::SetCommandL().
 #if defined(_DEBUG)
     Panic(EEikPanicCBACannotConvertToCEikCommandButton);
 #endif
+    _AKNTRACE_FUNC_EXIT;
     return NULL;
     }
 
 TUint CEikCba::ButtonGroupFlags() const 
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return iCbaFlags ;
     }
 
 EXPORT_C void CEikCba::SetButtonGroupFlags(TInt aFlags)
     {
+    _AKNTRACE_FUNC_ENTER;
     iCbaFlags = aFlags;
+    
+    //has not supported semi-transparent, ignore the flag at this moment.
+    //TODO: if the tranparent style CBA is approved and the new icon was delivered, open it again.
+    iCbaFlags &= ~EEikCbaFlagSemiTransparent;
+    
     if (( iCbaFlags & EEikCbaFlagTransparent || iCbaFlags & EEikCbaFlagSemiTransparent ) && 
             CAknEnv::Static()->TransparencyEnabled() )
         {
@@ -3254,13 +3426,13 @@
             Window().SetBackgroundColor( ~0 );
             if ( iExtension && iExtension->iEnablePostingTransparency )
                 {
-               	iExtension->iEnablePostingTransparency = EFalse;        	
-               	delete iExtension->iLskPostingOverlayBitmap;
-               	iExtension->iLskPostingOverlayBitmap = NULL;
-               	delete iExtension->iRskPostingOverlayBitmap;
-               	iExtension->iRskPostingOverlayBitmap = NULL;
-               	BroadcastPostingTransparency( EFalse );
-               	}           
+                   iExtension->iEnablePostingTransparency = EFalse;            
+                   delete iExtension->iLskPostingOverlayBitmap;
+                   iExtension->iLskPostingOverlayBitmap = NULL;
+                   delete iExtension->iRskPostingOverlayBitmap;
+                   iExtension->iRskPostingOverlayBitmap = NULL;
+                   BroadcastPostingTransparency( EFalse );
+                   }           
             }
         else
             {
@@ -3273,6 +3445,7 @@
         }
     
     UpdateFonts();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // -----------------------------------------------------------------------------
@@ -3282,11 +3455,18 @@
 //
 EXPORT_C void CEikCba::SetSkinBackgroundId( const TAknsItemID& aIID )
     {
+    _AKNTRACE_FUNC_ENTER;
     // Skin background is not drawn by embedded CBA.
     if ( iFlags.IsSet( ECbaEmbedded ) )
         {
+    	iPopupVisible = ETrue;
+    	_AKNTRACE_FUNC_EXIT;
         return;
         }
+    else
+        {
+        iPopupVisible = EFalse;
+        }
 
     if ( iBgIID != KAknsIIDNone )
         {
@@ -3337,18 +3517,22 @@
             iBgIID,
             CEikStatusPaneBase::EDrawDeferred );
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TKeyResponse CEikCba::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
     {
+    _AKNTRACE_FUNC_ENTER;
     if (aType != EEventKey)
         {
+        _AKNTRACE_FUNC_EXIT;
         return EKeyWasNotConsumed;
         }
 
     // Return immediately if the control is invisible.
     if (!IsVisible() && !(iCbaFlags&EAknCBAFlagRespondWhenInvisible))
         {
+        _AKNTRACE_FUNC_EXIT;
         return EKeyWasNotConsumed;
         }
 
@@ -3390,6 +3574,7 @@
                  !(*iControlArray)[KControlArrayCBAButton1Posn].iControl->IsVisible() && 
                  !(iCbaFlags & EAknCBAFlagRespondWhenInvisible) )
                 {
+                _AKNTRACE_FUNC_EXIT;
                 return EKeyWasConsumed;
                 }
             TInt shortCommand = (*iControlArray)[KControlArrayCBAButton1Posn].iId;
@@ -3398,6 +3583,7 @@
             // This will pass key event to application - no softkey command is processed.
             if (shortCommand == EAknSoftkeyForwardKeyEvent)
                 {
+                _AKNTRACE_FUNC_EXIT;
                 return EKeyWasNotConsumed;
                 }
 
@@ -3425,6 +3611,7 @@
                  !(*iControlArray)[KControlArrayCBAButton2Posn].iControl->IsVisible() && 
                  !(iCbaFlags&EAknCBAFlagRespondWhenInvisible) )
                 {
+                _AKNTRACE_FUNC_EXIT;
                 return EKeyWasConsumed;
                 }
             TInt shortCommand = (*iControlArray)[KControlArrayCBAButton2Posn].iId;
@@ -3439,6 +3626,7 @@
             // This will pass key event to application - no softkey command is processed.
             if (shortCommand == EAknSoftkeyForwardKeyEvent)
                 {
+                _AKNTRACE_FUNC_EXIT;
                 return EKeyWasNotConsumed;
                 }
 
@@ -3474,6 +3662,7 @@
                  !(*iControlArray)[KControlArrayCBAButtonMSKPosn].iControl->IsVisible() && 
                  !(iCbaFlags&EAknCBAFlagRespondWhenInvisible) )
                 {
+                _AKNTRACE_FUNC_EXIT;
                 return EKeyWasConsumed;
                 }
 
@@ -3483,6 +3672,7 @@
             // This will pass key event to application - no softkey command is processed.
             if (shortCommand == EAknSoftkeyForwardKeyEvent)
                 {
+                _AKNTRACE_FUNC_EXIT;
                 return EKeyWasNotConsumed;
                 }
 
@@ -3530,6 +3720,7 @@
                 !(*iControlArray)[KControlArrayCBAButton1Posn].iControl->IsVisible() && 
                 !(iCbaFlags&EAknCBAFlagRespondWhenInvisible) )
                 {
+                _AKNTRACE_FUNC_EXIT;
                 return EKeyWasConsumed;
                 }
 
@@ -3539,6 +3730,7 @@
             // This will pass key event to application - no softkey command is processed.
             if (shortCommand == EAknSoftkeyForwardKeyEvent)
                 {
+                _AKNTRACE_FUNC_EXIT;
                 return EKeyWasNotConsumed;
                 }
 
@@ -3570,11 +3762,14 @@
             }
         }
         
+    _AKNTRACE_FUNC_EXIT;
     return response;
     }
 
 EXPORT_C void* CEikCba::ExtensionInterface( TUid /*aInterface*/ )
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return NULL;
     }
 
@@ -3587,13 +3782,16 @@
 //
 void CEikCba::HandlePointerEventL( const TPointerEvent& aPointerEvent )
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( !AknLayoutUtils::PenEnabled() )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
     else if ( iFlags.IsSet( ECbaInsideDialog ) )
         {
         CCoeControl::HandlePointerEventL( aPointerEvent );
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
 
@@ -3681,8 +3879,8 @@
         {
         if( button1->IsDimmed() )
             {
-        	CCoeControl::HandlePointerEventL( aPointerEvent );
-        	return;
+            CCoeControl::HandlePointerEventL( aPointerEvent );
+            return;
             }
         if ( button1->IsVisible() )
             {
@@ -3745,8 +3943,8 @@
         {              
         if( button2->IsDimmed() )
             {
-        	CCoeControl::HandlePointerEventL( aPointerEvent );
-        	return;
+            CCoeControl::HandlePointerEventL( aPointerEvent );
+            return;
             }             
         if ( button2->IsVisible() )
             {
@@ -3811,8 +4009,8 @@
         {
         if( buttonMSK->IsDimmed() )
             {
-        	CCoeControl::HandlePointerEventL( aPointerEvent );
-        	return;
+            CCoeControl::HandlePointerEventL( aPointerEvent );
+            return;
             }
         if  ( buttonMSK->IsVisible() )
             {
@@ -3963,8 +4161,10 @@
                 if ( (*iControlArray)[i].iControl == grabber )
                     {
                     if ( !IsVisible() )
+                        {
+                        _AKNTRACE_FUNC_EXIT;
                         return;
-                    
+                        }
                     // Send the button command to command observer.
                     TInt shortCommand = (*iControlArray)[i].iId;
                     if ( shortCommand &&
@@ -3984,11 +4184,13 @@
                 }
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 TSize CEikCba::MinimumSize()
     {
+    _AKNTRACE_FUNC_ENTER;
     TSize size = CEikControlGroup::MinimumSize();
     size.iWidth = iAvkonAppUi->ApplicationRect().Width();
     const TInt count = iControlArray->Count();
@@ -4000,6 +4202,7 @@
         {
         size.iHeight = Max(size.iHeight, iLink->Size().iHeight);
         }
+    _AKNTRACE_FUNC_EXIT;
     // Add a standard margin from the laf.
     return size;
     }
@@ -4012,6 +4215,7 @@
 */
 void CEikCba::GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const
     {
+    _AKNTRACE_FUNC_ENTER;
     CEikControlGroup::GetColorUseListL(aColorUseList);
         
     TInt commonAttributes = TCoeColorUse::ESurrounds|TCoeColorUse::EActive|TCoeColorUse::ENormal|
@@ -4026,6 +4230,7 @@
     colorUse.SetLogicalColor(EColorToolbarBackground);
     colorUse.SetUse(TCoeColorUse::EBack|commonAttributes);
     aColorUseList.AppendL(colorUse);
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -4036,6 +4241,7 @@
 //
 void CEikCba::HandleResourceChange( TInt aType )
     {
+    _AKNTRACE_FUNC_ENTER;
     CEikControlGroup::HandleResourceChange( aType );
     
     switch ( aType )
@@ -4097,6 +4303,7 @@
             {
             if ( iFlags.IsSet( ECbaInsideDialog ) )
                 {
+                _AKNTRACE_FUNC_EXIT;
                 return;
                 }
 
@@ -4193,11 +4400,13 @@
             break;
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::DoSkinChange()
     {
+    _AKNTRACE_FUNC_ENTER;
     iExtension->iIfSkinChanged = ETrue;
     DoSetLayers( KAknsIIDNone );
     iExtension->iIfSkinChanged = EFalse;
@@ -4214,10 +4423,12 @@
     //Skin change uses DrawNow to flus draw cache before layoutchange.
     DrawNow();
     iFlags.Clear(ECbaChangeRecordedSkin);
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::DoColorChange()
     {
+    _AKNTRACE_FUNC_ENTER;
     iBrushAndPenContext->SetBrushColor(iEikonEnv->ControlColor(EColorToolbarBackground, *this));
     iBrushAndPenContext->SetPenColor(iEikonEnv->ControlColor(EColorToolbarText, *this));
     Window().SetBackgroundColor(iEikonEnv->ControlColor(EColorToolbarBackground, *this));
@@ -4226,11 +4437,13 @@
     TRAP_IGNORE( SetMSKIconL() );
     SizeChanged();
     iFlags.Clear(ECbaChangeRecordedColor);
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::DoLayoutChange()
     {
+    _AKNTRACE_FUNC_ENTER;
     SetBoundingRect( TRect() );
 
     UpdateFonts();
@@ -4274,21 +4487,26 @@
         }
         
     iFlags.Clear( ECbaChangeRecordedLayout );
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::HandleScrollEventL(CEikScrollBar* /*aScrollBar*/, TEikScrollEvent /*aEventType*/)
     {
+    _AKNTRACE_FUNC_ENTER;
     User::Leave(KErrNotSupported);
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TTypeUid::Ptr CEikCba::MopSupplyObject(TTypeUid aId)
     {
+    _AKNTRACE_FUNC_ENTER;
     if (aId.iUid == MAknsControlContext::ETypeId)
         {
         if ( AknLayoutFlags() & EAknLayoutCbaInControlPane ||
              AknLayoutFlags() & EAknLayoutCbaInRightPane )
             {
+            _AKNTRACE_FUNC_EXIT;
             return MAknsControlContext::SupplyMopObject( aId, iMLBgContext );
             }
         else
@@ -4296,34 +4514,38 @@
             // Always provide top object to mop-chain.
             // Bottom is parent of Top, so bottom is re-drawn
             // automatically when top is drawn.
+            _AKNTRACE_FUNC_EXIT;
             return MAknsControlContext::SupplyMopObject( aId, iStaconBgContextTop );
             }
         }
         
     if ( aId.iUid == CEikCba::ETypeId )
         {
+        _AKNTRACE_FUNC_EXIT;
         return aId.MakePtr( this );
         }
         
+    _AKNTRACE_FUNC_EXIT;
     return CEikControlGroup::MopSupplyObject(aId);
     }
 
 
 void CEikCba::Draw( const TRect& aRect ) const
     {
+    _AKNTRACE_FUNC_ENTER;
     // Embedded CBA doesn't draw anything
     if ( iFlags.IsSet( ECbaInsideDialog ) )
         {
         return;
         }
     
-    if ( iCbaFlags & EEikCbaFlagSemiTransparent )
-        {
-        CWindowGc &gc = SystemGc();
-
-        iExtension->DrawSemiTransparencyL( gc, Rect() );
-        return;
-        }
+//    if ( iCbaFlags & EEikCbaFlagSemiTransparent )
+//        {
+//        CWindowGc &gc = SystemGc();
+//
+//        iExtension->DrawSemiTransparency( gc, Rect() );
+//        return;
+//        }
 
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
     
@@ -4399,14 +4621,18 @@
                     CEikCbaButton* button2 = static_cast<CEikCbaButton*>(
                         (*iControlArray)[KControlArrayCBAButton2Posn].iControl );
                     
-    		        if ( IsMskEnabledLayoutActive() )
+                    if ( IsMskEnabledLayoutActive() )
                         {
                         CEikCbaButton* buttonMSK = static_cast<CEikCbaButton*>(
                             (*iControlArray)[KControlArrayCBAButtonMSKPosn].iControl );
                         
                         CFbsBitmap* middleMask =
                             AknsUtils::GetCachedBitmap( skin, KAknsIIDQgnIndiSctrlSkMaskMiddlePrt );
-                        AknIconUtils::SetSize( middleMask, middleSKSize, EAspectRatioNotPreserved );
+                        if ( middleMask )
+                            {
+                            AknIconUtils::SetSize( middleMask, 
+                                    middleSKSize, EAspectRatioNotPreserved );
+                            }                        
 
                         if( buttonMSK && buttonMSK->PressedDown() )
                             {
@@ -4724,6 +4950,7 @@
             }
         }
     gc.SetOpaque( EFalse );        
+    _AKNTRACE_FUNC_EXIT;    
     }
 
 
@@ -4733,6 +4960,8 @@
 //
 CCoeControl* CEikCba::ButtonById( TInt aCommandId ) const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return ControlById( aCommandId );
     }
 
@@ -4743,27 +4972,33 @@
 //
 void CEikCba::CreateScrollBarFrameL()
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( !iSBFrame )
         {
         iSBFrame = new (ELeave) CEikCbaScrollBarFrame( this, this, ETrue );
         }
     iSBFrame->ConstructL();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 TEikGroupControl CEikCba::VScrollBarAsGroupControl()
     {
+    _AKNTRACE_FUNC_ENTER;
     // Extracts vertical scroll bar from the scroll bar frame.       
     TEikGroupControl groupCtrl(iSBFrame->VerticalScrollBar(), 0, 
         KCbaScrollBarButtonWidth,TEikGroupControl::ESetLength);
+    _AKNTRACE_FUNC_EXIT;
     return groupCtrl;
     }
 
 void CEikCba::InsertScrollBarL()
     {
+    _AKNTRACE_FUNC_ENTER;
     TEikGroupControl SBGroupCtrl = VScrollBarAsGroupControl();
     // Insert vertical scroll bar into cba control group.
     InsertControlL(SBGroupCtrl, KControlArrayScrollBarPosn);
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -4773,6 +5008,7 @@
 //
 void CEikCba::CreateArrowHeadScrollBarL()
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( iSBFrame )
         {
         iSBFrame->SwitchToArrowHeadScrollBarL();
@@ -4783,21 +5019,25 @@
             }
         InsertScrollBarL();
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::SizeChanged()
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( iFlags.IsSet( ECbaInsideDialog ) )
         {
         Window().SetNonFading( EFalse );
         SizeChangedInsideDialog();
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
     else if ( iFlags.IsSet( ECbaEmbedded ) )
         {
         Window().SetNonFading( EFalse );
         SizeChangedInPopup();
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
         
@@ -4862,6 +5102,7 @@
         // Broadcast current state to CEikCbaButtons
         BroadcastPostingTransparency( enabled );
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // -----------------------------------------------------------------------------
@@ -4871,6 +5112,7 @@
 //
 void CEikCba::CheckSkinAndUpdateContext()
     {
+    _AKNTRACE_FUNC_ENTER;
     if (AknsUtils::SkinInstance())
         {
         // Use ENullBrush if there is skin background available.
@@ -4880,18 +5122,24 @@
         {
         iBrushAndPenContext->SetBrushStyle(CGraphicsContext::ESolidBrush);
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::Reserved_MtsmPosition()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::Reserved_MtsmObject()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TInt CEikCba::AknLayoutFlags() const
     {
+    _AKNTRACE_FUNC_ENTER;
     TInt flags = 0;
 
     TBool controlPane = ETrue;
@@ -4960,6 +5208,7 @@
         flags |= EAknLayoutCbaInRightPane;
         }
 
+    _AKNTRACE_FUNC_EXIT;
     return flags;
     }
 
@@ -4970,6 +5219,7 @@
 //
 void CEikCba::SizeChangedInControlPane()
     {
+    _AKNTRACE_FUNC_ENTER;
     TRect screen;
     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screen );
     
@@ -5051,7 +5301,7 @@
                     rect,
                     AknLayoutScalable_Avkon::bg_sctrl_sk_pane_cp1().LayoutLine() );
                 frameSizeChanged = layoutRect.Rect() != iExtension->iRightFrameOuterRect;
-				iExtension->iRightFrameOuterRect = layoutRect.Rect();
+                iExtension->iRightFrameOuterRect = layoutRect.Rect();
                 layoutRect.LayoutRect( iExtension->iRightFrameOuterRect,
                          AknLayoutScalable_Avkon::bg_sctrl_sk_pane_g1()
                             .LayoutLine() );
@@ -5446,11 +5696,13 @@
         }
 
     AknsUtils::RegisterControlPosition( this, posInScreen.iTl );
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::SizeChangedInStaconPane()
     {  
+    _AKNTRACE_FUNC_ENTER;  
     TRect screen( iAvkonAppUi->ApplicationRect() );
     TBool softKeysUpAndDownMirrored = EFalse;
 
@@ -5799,6 +6051,7 @@
         }
 
     AknsUtils::RegisterControlPosition( this, TPoint(0,0) );
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -5808,6 +6061,7 @@
 //
 void CEikCba::SizeChangedInRightPane()
     {
+    _AKNTRACE_FUNC_ENTER;
     TRect screen;
     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screen );
            
@@ -6072,12 +6326,14 @@
         }
 
     AknsUtils::RegisterControlPosition( this, TPoint( 0, 0 ) );   
+    _AKNTRACE_FUNC_EXIT;
     }
     
     
     
 void CEikCba::SizeChangedInsideDialog()
     {
+    _AKNTRACE_FUNC_ENTER;
     // Give both LSK and RSK buttons half of the available space.
     //
     if ( iControlArray )
@@ -6100,11 +6356,13 @@
             (*iControlArray)[KControlArrayCBAButton2Posn].iControl->SetRect( buttonRect2 );
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
     
     
 void CEikCba::SizeChangedInPopup()
     {
+    _AKNTRACE_FUNC_ENTER;
     TRAP_IGNORE( iExtension->UpdateSoftkeyFrameL( EFalse ) );
     
     TAknLayoutRect layoutRect;
@@ -6132,7 +6390,6 @@
                  AknLayoutScalable_Avkon::bg_sctrl_sk_pane_g1()
                      .LayoutLine() );
     iExtension->iLeftFrameInnerRect = layoutRect.Rect();
-    UpdateLabels( ETrue );
     
     layoutRect.LayoutRect( iExtension->iRightFrameOuterRect,
                  AknLayoutScalable_Avkon::bg_sctrl_sk_pane_g1()
@@ -6150,11 +6407,13 @@
             msk->SetRect( TRect() );
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
     
 
 void CEikCba::UpdateFonts()
     {
+    _AKNTRACE_FUNC_ENTER;
     // Control pane:
     // Use the layout dll to get the right font for the CBA.
     TAknTextLineLayout layout(
@@ -6203,6 +6462,7 @@
     iRightPaneLabelFont = 
         AknLayoutUtils::FontFromId( 
             rightPaneTextLayout.FontId(), rightPaneCustomFont );
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // Enhanced CBA
@@ -6215,6 +6475,7 @@
 #ifdef RD_ENHANCED_CBA
 EXPORT_C void CEikCba::OfferCommandListL(const RArray<TInt>& aCommandList)
     {   
+    _AKNTRACE_FUNC_ENTER;   
     if( !iCommandTable )
         {        
         iCommandTable = CEikCommandTable::NewL();  
@@ -6351,11 +6612,14 @@
         }
         
     CleanupStack::PopAndDestroy(); // previousIds    
+    _AKNTRACE_FUNC_EXIT;
     }
 #else // !RD_ENHANCED_CBA
 EXPORT_C void CEikCba::OfferCommandListL(const RArray<TInt>& /*aCommandList*/)
     {
+    _AKNTRACE_FUNC_ENTER;
     User::Leave( KErrNotSupported );
+    _AKNTRACE_FUNC_EXIT;
     }
 #endif // RD_ENHANCED_CBA
 
@@ -6367,6 +6631,7 @@
 #ifdef RD_ENHANCED_CBA
 EXPORT_C void CEikCba::OfferCommandListL(const TInt aResourceId)
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( !iCommandTable ) // This is needed if cba was not constructed with enhanced cba.
         {
         iCommandTable = CEikCommandTable::NewL();
@@ -6512,11 +6777,14 @@
         }
     
     CleanupStack::PopAndDestroy(); // previousIds 
+    _AKNTRACE_FUNC_EXIT;
     }
 #else // !RD_ENHANCED_CBA   
 EXPORT_C void CEikCba::OfferCommandListL(const TInt /*aResourceId*/)
     {
+    _AKNTRACE_FUNC_ENTER;
     User::Leave( KErrNotSupported );
+    _AKNTRACE_FUNC_EXIT;
     }
 #endif // RD_ENHANCED_CBA
     
@@ -6528,11 +6796,15 @@
 #ifdef RD_ENHANCED_CBA  
 EXPORT_C TBool CEikCba::IsCommandInGroup(const TInt aCommandId) const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return ButtonById(aCommandId) ? ETrue : EFalse; // check the iControlArray
     }
 #else // !RD_ENHANCED_CBA
 EXPORT_C TBool CEikCba::IsCommandInGroup(const TInt /*aCommandId*/) const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return EFalse;
     }
 #endif // RD_ENHANCED_CBA
@@ -6546,20 +6818,26 @@
 #ifdef RD_ENHANCED_CBA  
 EXPORT_C void CEikCba::ReplaceCommand(const TInt aReplaceCommandId, const TInt aResourceId)
     {
+    _AKNTRACE_FUNC_ENTER;
     TInt index = IndexById( aReplaceCommandId );
     TRAPD(err, SetCommandL( index, aResourceId ) );     
+    _AKNTRACE_FUNC_EXIT;
     }
 #else
 EXPORT_C void CEikCba::ReplaceCommand(const TInt /*aReplaceCommandId*/, const TInt /*aResourceId*/)
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     }
 #endif // RD_ENHANCED_CBA
 
 void CEikCba::HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType )
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( !iFlags.IsSet( ECbaInsideDialog ) )
         {
         //User::Panic( _L( "CBA inside dialog" ), KErrNotSupported );
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
         
@@ -6594,11 +6872,13 @@
             iCommandObserver->ProcessCommandL( command );
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::MakeVisible( TBool aVisible )
     {    
+    _AKNTRACE_FUNC_ENTER;    
     if ( aVisible )
         {
         TBool redrawNeeded( EFalse );
@@ -6680,6 +6960,7 @@
         }
 
     ReportContentChangedEvent();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -6689,9 +6970,11 @@
 // -----------------------------------------------------------------------------
 void CEikCba::DoSetLayers( const TAknsItemID& aIID )
     {
+    _AKNTRACE_FUNC_ENTER;
     // Skin background is not drawn by embedded CBA.
     if ( iFlags.IsSet( ECbaEmbedded ) )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
 
@@ -6910,11 +7193,13 @@
         }
         
     DrawDeferred();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCba::LayoutControl( CCoeControl* aControl, const TRect& aRect )
     {   
+    _AKNTRACE_FUNC_ENTER;   
     if ( !iFlags.IsSet( ECbaInsideDialog ) )
         {
         TRect rect( aRect );        
@@ -6929,10 +7214,12 @@
         aControl->SetRect( rect );
         aControl->ComponentControl( 0 )->SetRect( rect );            
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCba::BroadcastPostingTransparency( TBool aEnable )
     {
+    _AKNTRACE_FUNC_ENTER;
     // Communicate change to CBA buttons.
     for ( TInt i = 0; i < iControlArray->Count(); i++ ) 
         {
@@ -6946,6 +7233,7 @@
                 }
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -6956,6 +7244,7 @@
 //
 void CEikCba::SetFadeState()
     {
+    _AKNTRACE_FUNC_ENTER;
     TBool canBeFaded =
         IsEmpty() && !( ( iCbaFlags & EEikCbaFlagTransparent )
         || ( iExtension && iExtension->iEnablePostingTransparency ) );
@@ -6966,6 +7255,7 @@
         {
         Window().SetFaded( canBeFaded, RWindowTreeNode::EFadeIncludeChildren );
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -6976,6 +7266,7 @@
 //
 void CEikCba::UpdateLabels( TBool aDrawDeferred )
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( iControlArray->Count() != 0)
         {
         CCoeControl *leftSoftkey = ( *iControlArray )
@@ -7098,6 +7389,7 @@
             DrawDeferred();
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
     
 
@@ -7109,6 +7401,7 @@
     CEikButtonGroupContainer& aButtonGroupContainer,
     TBool aEnable )
     {
+    _AKNTRACE_FUNC_ENTER;
     CEikCba* cba = dynamic_cast<CEikCba*>( aButtonGroupContainer.ButtonGroup() );
     TInt ret = KErrNone;
     if ( cba )
@@ -7124,6 +7417,7 @@
             cba->EnablePostingTransparency( aEnable );
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     return ret;
     }
 
@@ -7134,6 +7428,7 @@
 //
 void CEikCba::EnablePostingTransparency( TBool aEnable )
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( iExtension )
         {
         if ( iExtension->iEnablePostingTransparency != aEnable )
@@ -7166,6 +7461,7 @@
             DrawDeferred();
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -7176,6 +7472,7 @@
 //
 EXPORT_C TBool CEikCba::IsEmpty() const
     {
+    _AKNTRACE_FUNC_ENTER;
     TBool isEmpty( ETrue );
 
     if ( iFlags.IsSet( ECbaInsideDialog ) )
@@ -7210,6 +7507,7 @@
             }
         }
 
+    _AKNTRACE_FUNC_EXIT;
     return isEmpty;
     }
     
@@ -7221,6 +7519,8 @@
 //
 TBitFlags CEikCba::Flags() 
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return iFlags;
     }
 
@@ -7232,10 +7532,12 @@
 //
 void CEikCba::SetContentObserver( TCallBack aCallBack )
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( iExtension )
         {
         iExtension->iContentObserver = aCallBack;
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -7247,6 +7549,7 @@
 //     
 void CEikCba::ReportContentChangedEvent()
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( ItemSpecificSoftkey() )
         {
         UpdateItemSpecificSoftkey(
@@ -7255,6 +7558,7 @@
 
     if ( !iFlags.IsSet( ECbaEmbedded ) )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
 
@@ -7282,6 +7586,7 @@
             iExtension->iContentObserver.CallBack(); // return value ignored
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // ---------------------------------------------------------------------------
@@ -7294,6 +7599,7 @@
                                    CWindowGc& aGc,
                                    CFbsBitmap* /*aMask*/ ) const
     {
+    _AKNTRACE_FUNC_ENTER;
     CEikCbaButton* button = 
         static_cast<CEikCbaButton*>( aGroupControl.iControl );
     
@@ -7323,24 +7629,29 @@
                                   KAknsIIDQgnFrSctrlSkButton,
                                   KAknsIIDQgnFrSctrlSkButtonCenter);
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TBool CEikCba::UpdateIconL()
         {
+        _AKNTRACE_FUNC_ENTER;
         if ( iFlags.IsSet( ECbaInsideDialog ) )
             {
+            _AKNTRACE_FUNC_EXIT;
             return EFalse;
             }
         
         if ( !iExtension->iIfMskIconSet ||
              !MskAllowed() )
             {
+            _AKNTRACE_FUNC_EXIT;
             return EFalse;         
             }
         
         MAknsSkinInstance* skin = AknsUtils::SkinInstance();
         if ( !skin )
             { 
+            _AKNTRACE_FUNC_EXIT;
             return EFalse;
             }
     
@@ -7349,6 +7660,7 @@
         CEikCbaButton *button = static_cast<CEikCbaButton*>( gCtrl.iControl );
         if ( !button )
             {
+            _AKNTRACE_FUNC_EXIT;
             return EFalse;
             }
    
@@ -7395,8 +7707,9 @@
     
         button->SetContainerWindowL( *this );
     
+        _AKNTRACE_FUNC_EXIT;
         return ETrue;
-    	
+        
         }
 
 
@@ -7408,6 +7721,8 @@
 //     
 TBool CEikCba::MskAllowed() const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return ( iMSKEnabledInPlatform &&
              AknLayoutUtils::MSKEnabled() &&
              IsMskEnabledLayoutActive() );
@@ -7422,6 +7737,7 @@
 TBool CEikCba::SoftkeyStatusChangeAllowed(
         TInt aSoftkeyPosition, TBool aDisabled )
     {
+    _AKNTRACE_FUNC_ENTER;
     TBool allowChange( ETrue );
     if ( aSoftkeyPosition == KControlArrayCBAButton1Posn )
         {
@@ -7439,6 +7755,7 @@
                 }
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     return allowChange;
     }
 
@@ -7450,6 +7767,7 @@
 //
 TEikGroupControl* CEikCba::ItemSpecificSoftkey() const
     {
+    _AKNTRACE_FUNC_ENTER;
     TEikGroupControl* lsk( NULL );
     if ( iFlags.IsSet( ECbaItemSpecificSoftkeyInUse ) )
         {
@@ -7461,6 +7779,7 @@
             lsk = &leftSoftkey;
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     return lsk;
     }
 
@@ -7472,6 +7791,7 @@
 //     
 void CEikCba::UpdateItemSpecificSoftkey( TBool aVisibleCollection )
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( iFlags.IsSet( ECbaSingleClickEnabled )
             && iExtension && iExtension->iItemActionMenu )
         {
@@ -7484,6 +7804,7 @@
             UpdateItemSpecificSoftkey( *leftSk->iControl, enableSk );
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -7494,6 +7815,7 @@
 //
 void CEikCba::UpdateItemSpecificSoftkey( CCoeControl& aControl, TBool aEnable )
     {
+    _AKNTRACE_FUNC_ENTER;
     TBool skEnabled( aControl.IsVisible() && !aControl.IsDimmed() );
     TBool changeState( EFalse );
     if ( !aEnable )
@@ -7525,6 +7847,7 @@
             aControl.DrawDeferred();
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -7534,6 +7857,7 @@
 
 CEikCbaButton::~CEikCbaButton()
     {
+    _AKNTRACE_FUNC_ENTER;
     AKNTASHOOK_REMOVE();
     delete iLabel;
     if ( iImage )
@@ -7545,10 +7869,12 @@
     delete iButtonOptions;
     delete iText;
 
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCbaButton::ConstructL(TGulAlignmentValue aAlignment)
     {
+    _AKNTRACE_FUNC_ENTER;
     iLabel = new(ELeave) CEikLabel;    
     iPressedDown = EFalse;    
     iLabel->SetBufferReserveLengthL(KMaxCbaLabelLength);
@@ -7563,11 +7889,14 @@
         iLabel->MakeVisible( EFalse );
         }
     AKNTASHOOK_ADDL( this, "CEikCbaButton" );
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCbaButton::AddCommandL(const TDesC& aText)
     {
+    _AKNTRACE_FUNC_ENTER;
     UpdateLabelText(aText);
+    _AKNTRACE_FUNC_EXIT;
     }
 
 struct STempCleanup
@@ -7578,6 +7907,7 @@
 
 LOCAL_C void CleanupTemp(TAny* aPtr)
     {
+    _AKNTRACE_FUNC_ENTER;
     STempCleanup& temp = *(STempCleanup*)aPtr;
     const TInt count = temp.iText->Count();
     if (temp.iButtonOptions->Count() == count)
@@ -7585,10 +7915,12 @@
         temp.iButtonOptions->Delete(count - 1);
         }
     temp.iText->Delete(count - 1);
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCbaButton::PushCommandL(TInt aCommandId,const TDesC& aText)
     {
+    _AKNTRACE_FUNC_ENTER;
     if (!iButtonOptions)
         {
         iButtonOptions = new(ELeave) CArrayFixFlat<SButtonOptions>(1);
@@ -7611,12 +7943,15 @@
     iButtonOptions->AppendL(options);
     UpdateLabelText(aText);
     CleanupStack::Pop(); // temp
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TInt CEikCbaButton::PopCommand()
     {
+    _AKNTRACE_FUNC_ENTER;
     if (!iButtonOptions)
         {
+        _AKNTRACE_FUNC_EXIT;
         return -1; 
         }
 
@@ -7625,6 +7960,7 @@
         
     if (count < 0)
         {
+        _AKNTRACE_FUNC_EXIT;
         return -1;
         }
 
@@ -7649,13 +7985,16 @@
         {
         iImage->DrawNow();
         }
+    _AKNTRACE_FUNC_EXIT;
     return buttonOptions.iCommandId;
     }
 
 void CEikCbaButton::RemoveCommand(TInt aCommandId)
     {
+    _AKNTRACE_FUNC_ENTER;
     if (!iButtonOptions)
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
     TInt index = IndexFromCommandId(aCommandId);
@@ -7671,12 +8010,15 @@
             iText = NULL;
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCbaButton::RemovePreviousCommand()
     {
+    _AKNTRACE_FUNC_ENTER;
     if (!iButtonOptions)
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
     TInt index = iButtonOptions->Count() - 2;
@@ -7685,26 +8027,31 @@
         iButtonOptions->Delete(index);
         iText->Delete(index);
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TInt CEikCbaButton::IndexFromCommandId(TInt aCommandId)
     {
+    _AKNTRACE_FUNC_ENTER;
     TInt index;
     TKeyArrayFix key(0, ECmpTInt);
     SButtonOptions options;
     options.iCommandId = aCommandId;
     if (iButtonOptions->Find(options, key, index) == KErrNone)
         {
+        _AKNTRACE_FUNC_EXIT;
         return index;
         }
     else
         {
+        _AKNTRACE_FUNC_EXIT;
         return KErrNotFound;
-        }
+        }    
     }
 
 void CEikCbaButton::SetContainerWindowL(const CCoeControl& aContainer)
     {
+    _AKNTRACE_FUNC_ENTER;
     CCoeControl::SetContainerWindowL(aContainer);
     if (!iDoImage)
         {
@@ -7714,40 +8061,50 @@
         {
         iImage->SetContainerWindowL(aContainer);
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCbaButton::ConstructFromResourceL(TResourceReader& aReader, TGulAlignmentValue anAlignment)
     {
+    _AKNTRACE_FUNC_ENTER;
     ConstructL(anAlignment);
     UpdateLabelText(aReader.ReadTPtrC());
     aReader.ReadTPtrC(); // bmp filename
     aReader.ReadInt16(); // bmp id
     aReader.ReadInt16(); // bmp mask id
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TSize CEikCbaButton::MinimumSize()
     {
+    _AKNTRACE_FUNC_ENTER;
     if (!iDoImage)
         {
+        _AKNTRACE_FUNC_EXIT;
         return iLabel->MinimumSize();
         }
     else
         {
+        _AKNTRACE_FUNC_EXIT;
         return iImage->MinimumSize();
         }
     }
 
 TInt CEikCbaButton::CountComponentControls() const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return 1;
     }
 
 CCoeControl* CEikCbaButton::ComponentControl(TInt aIndex) const
     {
+    _AKNTRACE_FUNC_ENTER;
     if (aIndex==0)
         {
         if (!iDoImage)
             {
+            _AKNTRACE_FUNC_EXIT;
             return iLabel;
             }
         else
@@ -7767,6 +8124,7 @@
             return iImage;
             }
         }
+    _AKNTRACE_FUNC_EXIT;
     return 0;
     }
 
@@ -7777,25 +8135,31 @@
 //
 void CEikCbaButton::SizeChanged()
     {
+    _AKNTRACE_FUNC_ENTER;
     // Resizing is done at CEikCba::SizeChanged().
     // We cannot resize here because this control has wrong
     // coordinate system available.
-
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 EXPORT_C void CEikCbaButton::HandlePointerEventL(const TPointerEvent& aPointerEvent) 
     { 
+    _AKNTRACE_FUNC_ENTER; 
     CCoeControl::HandlePointerEventL(aPointerEvent); 
+    _AKNTRACE_FUNC_EXIT;
     }    
 
 EXPORT_C void* CEikCbaButton::ExtensionInterface( TUid /*aInterface*/ )
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return NULL;
     }
 
 void CEikCbaButton::SetDimmed(TBool aDimmed)
     {
+    _AKNTRACE_FUNC_ENTER;
     CCoeControl::SetDimmed(aDimmed);
     if (!iDoImage)
         {
@@ -7806,6 +8170,7 @@
         // Drawing dimmed CEikImages don't work (problem in uiklaf).
         //iImage->SetDimmed(aDimmed);
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
@@ -7815,6 +8180,7 @@
 //
 void CEikCbaButton::UpdateLabelText( TPtrC aLabelText )
     {
+    _AKNTRACE_FUNC_ENTER;
     // Updates the label text with the given label, using tab delimited
     // label text to identify normal / alternative labels.
     if ( aLabelText.Length() > KMaxCbaLabelLength )
@@ -7847,20 +8213,24 @@
         {
         TruncateLabelText();
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 
 void CEikCbaButton::SetTextBitmapMode( TBool aEnableBitmap )
     {
+    _AKNTRACE_FUNC_ENTER;
     iUseTextBitmap = aEnableBitmap;
     if ( iLabel )
         {
         iLabel->MakeVisible( !aEnableBitmap );
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCbaButton::DrawToContext( CBitmapContext& aContext, CBitmapContext& aMaskContext, const TPoint& aOffset ) const
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( iLabel )
         {
         // Draw text into EColor16MA bitmap
@@ -7873,10 +8243,12 @@
         aMaskContext.SetOrigin( -aOffset );
         iLabel->DrawToContext( aMaskContext, &maskColor );
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCbaButton::SwitchToShortTextL(TBool aShortText)
     {
+    _AKNTRACE_FUNC_ENTER;
     if (aShortText)
         {
         iLabel->SetTextL(iShortLabelText);
@@ -7899,24 +8271,31 @@
         {
         iImage->DrawDeferred();
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCbaButton::SetLabelFont(const CFont* aLabelFont)
     {    
+    _AKNTRACE_FUNC_ENTER;    
     iLabel->SetFont(aLabelFont);
+    _AKNTRACE_FUNC_EXIT;
     }
 
 void CEikCbaButton::TruncateLabelText()
     {
+    _AKNTRACE_FUNC_ENTER;
     // Truncation removed from here, as it was not bidi-text compatible.
     // Let CEikLabel handle truncation instead.
     iLabel->CropText();
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TBool CEikCbaButton::IsEmptyText() const
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( iDoImage )
         {
+        _AKNTRACE_FUNC_EXIT;
         return EFalse;
         }
         
@@ -7932,25 +8311,32 @@
             }
         }
         
+    _AKNTRACE_FUNC_EXIT;
     return allSpaces;
     }
 
 void CEikCbaButton::ConstructEmptyButtonL()
     {
+    _AKNTRACE_FUNC_ENTER;
     ConstructL( EHRightVCenter ); // creates label
     _LIT(KEmptyText, "");
     TPtrC16 ptr(KEmptyText);
     UpdateLabelText( ptr );
+    _AKNTRACE_FUNC_EXIT;
     }
 
 TBool CEikCbaButton::PressedDown() const
     {    
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return iPressedDown;
     }
     
 void CEikCbaButton::SetPressedDown( const TBool aPressedDown )
     {
+    _AKNTRACE_FUNC_ENTER;
     iPressedDown = aPressedDown;
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // -----------------------------------------------------------------------------
@@ -7963,6 +8349,7 @@
     CEikImage& aImage, 
     TBool aLeft)
     { // static
+    _AKNTRACE_FUNC_ENTER;
     TInt commandPos = aLeft ? 0 : 2;
     TInt commandId = aButtonGroupContainer->ButtonGroup()->CommandId(commandPos);
     CEikCbaButton* cbaButton = (CEikCbaButton*) aButtonGroupContainer->ControlOrNull(commandId);
@@ -7977,6 +8364,7 @@
         cbaButton->DrawNow();
         aButtonGroupContainer->DrawNow();       
         }    
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // -----------------------------------------------------------------------------
@@ -7988,6 +8376,7 @@
     CEikButtonGroupContainer* aButtonGroupContainer, 
     TBool aLeft)
     { // static
+    _AKNTRACE_FUNC_ENTER; 
     TInt commandPos = aLeft ? 0 : 2;
     TInt commandId = aButtonGroupContainer->ButtonGroup()->CommandId(commandPos);
     CEikCbaButton* cbaButton = (CEikCbaButton*) aButtonGroupContainer->ControlOrNull(commandId);
@@ -8003,6 +8392,7 @@
         cbaButton->DrawNow();
         aButtonGroupContainer->DrawNow();      
         }    
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // -----------------------------------------------------------------------------
@@ -8012,6 +8402,7 @@
 //
 void CEikCbaButton::SetImage(CEikImage &aImage)
     {
+    _AKNTRACE_FUNC_ENTER;
     iDoImage = ETrue;
    
     if ( iImage )
@@ -8030,6 +8421,7 @@
         {
         ReplaceImageByLabel();          
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // -----------------------------------------------------------------------------
@@ -8040,6 +8432,7 @@
 //
 void CEikCbaButton::PrepareImageL()
     {
+    _AKNTRACE_FUNC_ENTER;
     // 50% transparent pressed down image is made with a alternative mask
     // which is created when a image is set to CEikCbaButton. 
     // Original mask is copied and each of its pixels color components is 
@@ -8050,6 +8443,7 @@
     
     if ( !iMask )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }
 
@@ -8085,6 +8479,7 @@
     CleanupStack::PopAndDestroy( device ); // device        
     
     delete gc;      
+    _AKNTRACE_FUNC_EXIT;
     }
 // -----------------------------------------------------------------------------
 // CEikCbaButton::ReplaceImageByLabel
@@ -8093,6 +8488,7 @@
 //
 void CEikCbaButton::ReplaceImageByLabel()
     {
+    _AKNTRACE_FUNC_ENTER;
     iDoImage = EFalse;
     if ( iImage )
         {
@@ -8103,6 +8499,7 @@
         delete iSfeMask;
         iSfeMask = NULL;
         }    
+    _AKNTRACE_FUNC_EXIT;
     }
 
 //
@@ -8114,6 +8511,8 @@
 // -----------------------------------------------------------------------------
 CEikEnhancedCbaButton::CEikEnhancedCbaButton()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // -----------------------------------------------------------------------------
@@ -8121,6 +8520,8 @@
 // -----------------------------------------------------------------------------
 CEikEnhancedCbaButton::~CEikEnhancedCbaButton()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // -----------------------------------------------------------------------------
@@ -8130,11 +8531,15 @@
 #ifdef RD_ENHANCED_CBA
 void CEikEnhancedCbaButton::SetCommandType( const TInt aCommandType )
     {
+    _AKNTRACE_FUNC_ENTER;
     iCommandType = aCommandType; 
+    _AKNTRACE_FUNC_EXIT;
     }
 #else    
 void CEikEnhancedCbaButton::SetCommandType( const TInt /*aCommandType*/ )
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     }
 #endif // RD_ENHANCED_CBA
 // -----------------------------------------------------------------------------
@@ -8144,6 +8549,8 @@
 
 TInt CEikEnhancedCbaButton::CommandType() const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
 #ifdef RD_ENHANCED_CBA    
     return iCommandType;
 #else
@@ -8157,6 +8564,8 @@
 // -----------------------------------------------------------------------------
 TInt CEikEnhancedCbaButton::CommandId() const
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
 #ifdef RD_ENHANCED_CBA    
     return iCommandId;
 #else
@@ -8171,6 +8580,7 @@
 #ifdef RD_ENHANCED_CBA
 void CEikEnhancedCbaButton::ConstructFromResourceL(TResourceReader& aReader)
     {   
+    _AKNTRACE_FUNC_ENTER   
     // Alignment set to right.
     ConstructL( EHRightVCenter ); // creates label
     iCommandType = aReader.ReadUint8();
@@ -8181,10 +8591,13 @@
     aReader.ReadTPtrC(); // bmp filename
     aReader.ReadInt16(); // bmp id
     aReader.ReadInt16(); // bmp mask id
+    _AKNTRACE_FUNC_EXIT;
     }
 #else    
 void CEikEnhancedCbaButton::ConstructFromResourceL(TResourceReader&)
     {   
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;    
     }
 #endif // RD_ENHANCED_CBA    
     
@@ -8193,6 +8606,8 @@
 // -----------------------------------------------------------------------------
 void CEikEnhancedCbaButton::ConstructEmptyButtonL()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
 #ifdef RD_ENHANCED_CBA    
     ConstructL( EHRightVCenter ); // creates label
     iCommandType = EEikCommandTypeAnyCommand;
@@ -8209,6 +8624,8 @@
 // -----------------------------------------------------------------------------    
 TPtrC* CEikEnhancedCbaButton::LabelText()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
 #ifdef RD_ENHANCED_CBA    
     return &iLongLabelText; 
 #else
@@ -8222,6 +8639,8 @@
 
 CEikCommandTable* CEikCommandTable::NewL()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
 #ifdef RD_ENHANCED_CBA    
     CEikCommandTable* self = CEikCommandTable::NewLC();
     CleanupStack::Pop( self );
@@ -8233,6 +8652,8 @@
     
 CEikCommandTable* CEikCommandTable::NewLC()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
 #ifdef RD_ENHANCED_CBA    
     CEikCommandTable* self = new (ELeave) CEikCommandTable;
     CleanupStack::PushL( self );
@@ -8249,6 +8670,7 @@
 // -----------------------------------------------------------------------------
 void CEikCommandTable::ConstructL()
     {
+    _AKNTRACE_FUNC_ENTER;
 #ifdef RD_ENHANCED_CBA    
     // Get the cba priority configuration
     TResourceReader reader;
@@ -8274,6 +8696,7 @@
     
     CleanupStack::PopAndDestroy(); // reader
 #endif    
+    _AKNTRACE_FUNC_EXIT;
     }
     
 #ifdef RD_ENHANCED_CBA
@@ -8287,6 +8710,7 @@
     
 CEikCommandTable::~CEikCommandTable()
     {
+    _AKNTRACE_FUNC_ENTER;
 #ifdef RD_ENHANCED_CBA    
     iCommandButtons.Reset(); // Reset array
     for(TInt i = 0; i < iPriorities.Count(); i++)
@@ -8295,6 +8719,7 @@
         }
     iPriorities.Reset();
 #endif    
+    _AKNTRACE_FUNC_EXIT;
     }
     
 // -----------------------------------------------------------------------------
@@ -8304,11 +8729,14 @@
 #ifndef RD_ENHANCED_CBA    
 TInt CEikCommandTable::AddCommandL(CEikEnhancedCbaButton* /*aButton*/) 
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return KErrNone;
     }
 #else     
 TInt CEikCommandTable::AddCommandL(CEikEnhancedCbaButton* aButton) 
     {
+    _AKNTRACE_FUNC_ENTER;
     // CommandType tells in which button this command should be placed
     TInt commandType( aButton->CommandType() );
     TInt index( KErrNotFound );
@@ -8349,6 +8777,7 @@
         delete aButton;
         aButton = NULL;
         }       
+    _AKNTRACE_FUNC_EXIT;
     return KErrNone;
     }
 #endif // RD_ENHANCED_CBA    
@@ -8360,9 +8789,11 @@
 #ifndef RD_ENHANCED_CBA
 TBool CEikCommandTable::IsCommandPlaced(const TInt /*aCommandId*/) const
     {
+    _AKNTRACE_FUNC_ENTER;
 #else // !RD_ENHANCED_CBA  
 TBool CEikCommandTable::IsCommandPlaced(const TInt aCommandId) const
     {
+    _AKNTRACE_FUNC_ENTER;
     TInt count( iCommandButtons.Count() );
     
     for ( TInt i = 0; i < count; i++ )
@@ -8371,11 +8802,13 @@
             {
             if ( iCommandButtons[i]->CommandId() == aCommandId )
                 {
+                _AKNTRACE_FUNC_EXIT;
                 return ETrue;
                 }              
             }
         }
 #endif // RD_ENHANCED_CBA
+    _AKNTRACE_FUNC_EXIT;
     return EFalse; // if no match for command id
     }
     
@@ -8387,12 +8820,15 @@
 #ifndef RD_ENHANCED_CBA    
 void CEikCommandTable::ReplaceCommandL( const TInt /*aCommandId*/, const TInt /*aResourceId*/ )
     {
+    _AKNTRACE_FUNC_ENTER;
 #else // !RD_ENHANCED_CBA    
 void CEikCommandTable::ReplaceCommandL( const TInt aCommandId, const TInt aResourceId )
     {
+    _AKNTRACE_FUNC_ENTER;
     // If the command is not in the command table, return.
     if( !IsCommandPlaced( aCommandId ) )
         {
+        _AKNTRACE_FUNC_EXIT;
         return;
         }   
     
@@ -8431,6 +8867,7 @@
     // Delete old button.
     delete oldButton;
 #endif // !RD_ENHANCED_CBA    
+    _AKNTRACE_FUNC_EXIT;
     }
     
 // -----------------------------------------------------------------------------
@@ -8441,11 +8878,15 @@
 #ifdef RD_ENHANCED_CBA
 CEikEnhancedCbaButton* CEikCommandTable::Command( const TInt aCommandIndex )
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return iCommandButtons[aCommandIndex]; 
     }
 #else // RD_ENHANCED_CBA
 CEikEnhancedCbaButton* CEikCommandTable::Command( const TInt /*aCommandIndex*/ )
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
     return NULL;
     }
 #endif // RD_ENHANCED_CBA
@@ -8455,6 +8896,8 @@
 // -----------------------------------------------------------------------------    
 void CEikCommandTable::Reset()
     {
+    _AKNTRACE_FUNC_ENTER;
+    _AKNTRACE_FUNC_EXIT;
 #ifdef RD_ENHANCED_CBA 
     iCommandButtons.Reset();
 #endif // RD_ENHANCED_CBA
@@ -8467,10 +8910,12 @@
         CEikCba* aCba, 
         TCallBack aCallBack )
     {
+    _AKNTRACE_FUNC_ENTER;
     if ( aCba )
         {
         aCba->SetContentObserver( aCallBack );
         }
+    _AKNTRACE_FUNC_EXIT;
     }
 
 // End of file