uifw/AvKon/src/akndiscreetpopupdrawer.cpp
branchRCL_3
changeset 4 8ca85d2f0db7
parent 0 2f259fa3e83a
child 15 08e69e956a8c
equal deleted inserted replaced
0:2f259fa3e83a 4:8ca85d2f0db7
    23 #include <AknUtils.h>
    23 #include <AknUtils.h>
    24 #include <gulicon.h>
    24 #include <gulicon.h>
    25 
    25 
    26 
    26 
    27 #include "akndiscreetpopupdrawer.h"
    27 #include "akndiscreetpopupdrawer.h"
       
    28 #include "akntrace.h"
    28 
    29 
    29 const TInt KTextBufSize( 255 );
    30 const TInt KTextBufSize( 255 );
    30 const TInt KMaxNumOfLines( 2 );
    31 const TInt KMaxNumOfLines( 2 );
    31 
    32 
    32 // Help structure for layout data
    33 // Help structure for layout data
    74     const TDesC& aBitmapFile,
    75     const TDesC& aBitmapFile,
    75     const TInt& aBitmapId,
    76     const TInt& aBitmapId,
    76     const TInt& aMaskId,
    77     const TInt& aMaskId,
    77     const TBool& aAction )
    78     const TBool& aAction )
    78     {
    79     {
       
    80     _AKNTRACE_FUNC_ENTER;
    79     CAknDiscreetPopupDrawer* self = 
    81     CAknDiscreetPopupDrawer* self = 
    80         CAknDiscreetPopupDrawer::NewLC( aControl, 
    82         CAknDiscreetPopupDrawer::NewLC( aControl, 
    81                                         aTitleText, 
    83                                         aTitleText, 
    82                                         aBodyText, 
    84                                         aBodyText, 
    83                                         aIcon, 
    85                                         aIcon, 
    85                                         aBitmapFile, 
    87                                         aBitmapFile, 
    86                                         aBitmapId,
    88                                         aBitmapId,
    87                                         aMaskId,
    89                                         aMaskId,
    88                                         aAction );
    90                                         aAction );
    89     CleanupStack::Pop( self );
    91     CleanupStack::Pop( self );
       
    92     _AKNTRACE_FUNC_EXIT;
    90     return self;
    93     return self;
    91     }
    94     }
    92 
    95 
    93 
    96 
    94 // ---------------------------------------------------------------------------
    97 // ---------------------------------------------------------------------------
   290     {
   293     {
   291     // Body text to title text if title text is empty
   294     // Body text to title text if title text is empty
   292     if ( aTitleText == KNullDesC && aBodyText != KNullDesC )
   295     if ( aTitleText == KNullDesC && aBodyText != KNullDesC )
   293         {
   296         {
   294         iTitleText = aBodyText.AllocL();
   297         iTitleText = aBodyText.AllocL();
       
   298         _AKNTRACE( _L("CAknDiscreetPopupDrawer::ConstructL, iTitleText : %S"), iTitleText );       
   295         }
   299         }
   296     else
   300     else
   297         {
   301         {
   298         iTitleText = aTitleText.AllocL();
   302         iTitleText = aTitleText.AllocL();
   299         iBodyText = aBodyText.AllocL();
   303         iBodyText = aBodyText.AllocL();
       
   304         _AKNTRACE( _L("CAknDiscreetPopupDrawer::ConstructL, iTitleText : %S"), iTitleText );
       
   305         _AKNTRACE( _L("CAknDiscreetPopupDrawer::ConstructL, iBodyText : %S"), iBodyText );
   300         }
   306         }
   301 
   307 
   302     if ( !iIcon )
   308     if ( !iIcon )
   303         {
   309         {
   304         iIcon = CreatePopupIconL( aSkinId, 
   310         iIcon = CreatePopupIconL( aSkinId, 
   340         }
   346         }
   341     
   347     
   342     TBool withIcon( iIcon && iIcon->Bitmap() );
   348     TBool withIcon( iIcon && iIcon->Bitmap() );
   343     TBool twoRowsText( 
   349     TBool twoRowsText( 
   344         iTitleText->Des() != KNullDesC 
   350         iTitleText->Des() != KNullDesC 
   345         && iBodyText->Des() != KNullDesC );
   351         && iBodyText && iBodyText->Des() != KNullDesC );
   346 
   352 
   347     // Two rows of text
   353     // Two rows of text
   348     if ( twoRowsText )
   354     if ( twoRowsText )
   349         {
   355         {
   350         if ( withIcon )
   356         if ( withIcon )