messagingappbase/mce/src/MceOneRowMessageListContainer.cpp
branchRCL_3
changeset 21 c6838af47512
parent 17 caea42e26caa
child 22 52d61119153d
equal deleted inserted replaced
18:a9c7e5670d17 21:c6838af47512
    57 #include <commonphoneparser.h>
    57 #include <commonphoneparser.h>
    58 
    58 
    59 #include <muiumsvuiserviceutilitiesinternal.h>
    59 #include <muiumsvuiserviceutilitiesinternal.h>
    60 
    60 
    61 #include <mce.rsg>
    61 #include <mce.rsg>
    62 
    62 #include <mtudreg.h> 
    63 // CONSTANTS
    63 // CONSTANTS
    64 
    64 
    65 const TInt KMceListContainerGranuality = 4;
    65 const TInt KMceListContainerGranuality = 4;
    66 const TInt KMceTextBufferLength        = 10;    // text buffer length
    66 const TInt KMceTextBufferLength        = 10;    // text buffer length
    67 const TInt KMceFocusOffsetTopView      = 0;     // Set focused item top of view
    67 const TInt KMceFocusOffsetTopView      = 0;     // Set focused item top of view
    77 const TInt KMSKPosition = 3;
    77 const TInt KMSKPosition = 3;
    78 const TInt KMSKLabel    = 20;
    78 const TInt KMSKLabel    = 20;
    79 
    79 
    80 //cmail update
    80 //cmail update
    81 #define KUidMsgTypeCmailMtmVal               0x2001F406
    81 #define KUidMsgTypeCmailMtmVal               0x2001F406
    82 
    82 const TUid KMailTechnologyTypeUid = { 0x10001671 };
    83 // ================= MEMBER FUNCTIONS =======================
    83 // ================= MEMBER FUNCTIONS =======================
    84 
    84 
    85 // ----------------------------------------------------
    85 // ----------------------------------------------------
    86 // Constructor
    86 // Constructor
    87 // ----------------------------------------------------
    87 // ----------------------------------------------------
   104     delete iListItems;
   104     delete iListItems;
   105     delete iBitmapResolver;
   105     delete iBitmapResolver;
   106     delete iBgContext;
   106     delete iBgContext;
   107     delete iSelectedEntries;
   107     delete iSelectedEntries;
   108     delete iTreeListBox;
   108     delete iTreeListBox;
       
   109     delete iUiRegistry;
   109     }
   110     }
   110 
   111 
   111 
   112 
   112 // ----------------------------------------------------
   113 // ----------------------------------------------------
   113 // CMceOneRowMessageListContainer::NewL
   114 // CMceOneRowMessageListContainer::NewL
   205     SetRect( aRect );
   206     SetRect( aRect );
   206     
   207     
   207     TLocale locale;
   208     TLocale locale;
   208     iStartOfWeek = locale.StartOfWeek();
   209     iStartOfWeek = locale.StartOfWeek();
   209     iDialerEvent = EFalse ;
   210     iDialerEvent = EFalse ;
       
   211     iUiRegistry = CMtmUiDataRegistry::NewL(*aSession); 
   210     }
   212     }
   211 
   213 
   212 
   214 
   213 // ----------------------------------------------------
   215 // ----------------------------------------------------
   214 // CMceMessageListContainer::MceListId
   216 // CMceMessageListContainer::MceListId
   568             CAknSingleColumnStyleTreeList::ELeaf,
   570             CAknSingleColumnStyleTreeList::ELeaf,
   569             foundIcon,
   571             foundIcon,
   570             EFalse );
   572             EFalse );
   571 
   573 
   572         TBool attachmentIcon = EFalse; 
   574         TBool attachmentIcon = EFalse; 
   573         if ( entry.Attachment() && entry.iMtm != KSenduiMtmMmsUid )
   575          
       
   576         if ( entry.Attachment() && entry.iMtm != KSenduiMtmMmsUid 
       
   577              && IsMailMtmTechnology(entry.iMtm ))
   574             {
   578             {
   575             iTreeListBox->SetIcon(
   579             iTreeListBox->SetIcon(
   576                 itemId,
   580                 itemId,
   577                 CAknSingleColumnStyleTreeList::EOptionalIcon1,
   581                 CAknSingleColumnStyleTreeList::EOptionalIcon1,
   578                 iBitmapResolver->TreeIconId( EMceBitmapIndexAttachment ),
   582                 iBitmapResolver->TreeIconId( EMceBitmapIndexAttachment ),
  2073             treeItemId,
  2077             treeItemId,
  2074             CAknSingleColumnStyleTreeList::ELeaf,
  2078             CAknSingleColumnStyleTreeList::ELeaf,
  2075             foundIcon,
  2079             foundIcon,
  2076             EFalse );
  2080             EFalse );
  2077         TBool attachmentIcon = EFalse;
  2081         TBool attachmentIcon = EFalse;
  2078         if ( entry.Attachment() && entry.iMtm != KSenduiMtmMmsUid )
  2082  
       
  2083         if ( entry.Attachment() && entry.iMtm != KSenduiMtmMmsUid  
       
  2084              && IsMailMtmTechnology(entry.iMtm ))
  2079             {
  2085             {
  2080             iTreeListBox->SetIcon(
  2086             iTreeListBox->SetIcon(
  2081                 treeItemId,
  2087                 treeItemId,
  2082                 CAknSingleColumnStyleTreeList::EOptionalIcon1,
  2088                 CAknSingleColumnStyleTreeList::EOptionalIcon1,
  2083                 iBitmapResolver->TreeIconId( EMceBitmapIndexAttachment ),
  2089                 iBitmapResolver->TreeIconId( EMceBitmapIndexAttachment ),
  2532          iAnchorItemId = iListItems->ItemId( iAnchorItemIndex );
  2538          iAnchorItemId = iListItems->ItemId( iAnchorItemIndex );
  2533          SetCurrentItemIdL( iAnchorItemId );
  2539          SetCurrentItemIdL( iAnchorItemId );
  2534          }
  2540          }
  2535     }
  2541     }
  2536 
  2542 
       
  2543 // ----------------------------------------------------
       
  2544 // CMceOneRowMessageListContainer::IsMailMtmTechnology
       
  2545 // ----------------------------------------------------
       
  2546 TBool CMceOneRowMessageListContainer::IsMailMtmTechnology( TUid aMtm )const
       
  2547     {
       
  2548     TBool isMailMtm = EFalse;
       
  2549     if ( aMtm.iUid != 0 && aMtm != KUidMsvLocalServiceMtm &&
       
  2550             iUiRegistry->IsPresent( aMtm) )
       
  2551         {
       
  2552         // get MTM technology type
       
  2553         TUid technologyType = iUiRegistry->TechnologyTypeUid( aMtm);
       
  2554         isMailMtm = ( KMailTechnologyTypeUid == technologyType );
       
  2555         }
       
  2556     return isMailMtm;
       
  2557     }
  2537 //  End of File
  2558 //  End of File