photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwassign.cpp
branchRCL_3
changeset 14 ce1c7ad1f18b
parent 0 4e91876724a2
child 25 191387a8b767
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwassign.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwassign.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -32,6 +32,7 @@
 #include <mpxcollectionpath.h>
 #include <glxcollectionpluginimageviewer.hrh>
 #include "glxaiwservicehandler.h"
+#include <featdiscovery.h>
 
 const TInt KGlxAiwAssignCommandSpace = 0x00000100;
 
@@ -62,6 +63,19 @@
     TRACER("CGlxCommandHandlerAiwAssign::CGlxCommandHandlerAiwAssign");
     }
 
+CGlxCommandHandlerAiwAssign::~CGlxCommandHandlerAiwAssign()
+    {
+    delete iFeatManager;
+    }
+
+void CGlxCommandHandlerAiwAssign::ConstructL()
+    {
+    //Calling base class implementation
+    CGlxCommandHandlerAiwBase::ConstructL();
+    
+    iFeatManager = CFeatureDiscovery::NewL();
+    }
+
 // -----------------------------------------------------------------------------
 // CGlxCommandHandlerAiwAssign::DoGetRequiredAttributesL
 // -----------------------------------------------------------------------------
@@ -105,7 +119,13 @@
 //	
 TInt CGlxCommandHandlerAiwAssign::AiwInterestResource() const
     {
-    return R_GLX_AIW_ASSIGN_TO_CONTACT_INTEREST;
+    int resource = R_GLX_AIW_ASSIGN_TO_CONTACT_INTEREST;
+    if(iFeatManager->IsFeatureSupportedL(KFeatureIdFfImageEditor) || iFeatManager->IsFeatureSupportedL(KFeatureIdFfVideoEditor))
+        {
+        resource = R_GLX_AIW_ASSIGN_TO_CONTACT_INTEREST_MEDIAEDITOR;
+        }
+
+    return resource;
     }
         
 // -----------------------------------------------------------------------------