messagingappbase/mce/src/MceOneRowMessageListContainer.cpp
branchRCL_3
changeset 14 c6838af47512
parent 12 caea42e26caa
child 15 52d61119153d
--- a/messagingappbase/mce/src/MceOneRowMessageListContainer.cpp	Mon Mar 15 12:40:06 2010 +0200
+++ b/messagingappbase/mce/src/MceOneRowMessageListContainer.cpp	Wed Mar 31 21:25:02 2010 +0300
@@ -59,7 +59,7 @@
 #include <muiumsvuiserviceutilitiesinternal.h>
 
 #include <mce.rsg>
-
+#include <mtudreg.h> 
 // CONSTANTS
 
 const TInt KMceListContainerGranuality = 4;
@@ -79,7 +79,7 @@
 
 //cmail update
 #define KUidMsgTypeCmailMtmVal               0x2001F406
-
+const TUid KMailTechnologyTypeUid = { 0x10001671 };
 // ================= MEMBER FUNCTIONS =======================
 
 // ----------------------------------------------------
@@ -106,6 +106,7 @@
     delete iBgContext;
     delete iSelectedEntries;
     delete iTreeListBox;
+    delete iUiRegistry;
     }
 
 
@@ -207,6 +208,7 @@
     TLocale locale;
     iStartOfWeek = locale.StartOfWeek();
     iDialerEvent = EFalse ;
+    iUiRegistry = CMtmUiDataRegistry::NewL(*aSession); 
     }
 
 
@@ -570,7 +572,9 @@
             EFalse );
 
         TBool attachmentIcon = EFalse; 
-        if ( entry.Attachment() && entry.iMtm != KSenduiMtmMmsUid )
+         
+        if ( entry.Attachment() && entry.iMtm != KSenduiMtmMmsUid 
+             && IsMailMtmTechnology(entry.iMtm ))
             {
             iTreeListBox->SetIcon(
                 itemId,
@@ -2075,7 +2079,9 @@
             foundIcon,
             EFalse );
         TBool attachmentIcon = EFalse;
-        if ( entry.Attachment() && entry.iMtm != KSenduiMtmMmsUid )
+ 
+        if ( entry.Attachment() && entry.iMtm != KSenduiMtmMmsUid  
+             && IsMailMtmTechnology(entry.iMtm ))
             {
             iTreeListBox->SetIcon(
                 treeItemId,
@@ -2534,4 +2540,19 @@
          }
     }
 
+// ----------------------------------------------------
+// CMceOneRowMessageListContainer::IsMailMtmTechnology
+// ----------------------------------------------------
+TBool CMceOneRowMessageListContainer::IsMailMtmTechnology( TUid aMtm )const
+    {
+    TBool isMailMtm = EFalse;
+    if ( aMtm.iUid != 0 && aMtm != KUidMsvLocalServiceMtm &&
+            iUiRegistry->IsPresent( aMtm) )
+        {
+        // get MTM technology type
+        TUid technologyType = iUiRegistry->TechnologyTypeUid( aMtm);
+        isMailMtm = ( KMailTechnologyTypeUid == technologyType );
+        }
+    return isMailMtm;
+    }
 //  End of File