photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwedit.cpp
branchRCL_3
changeset 14 ce1c7ad1f18b
parent 9 6b87b143d312
child 18 bcb43dc84c44
equal deleted inserted replaced
13:71da52165949 14:ce1c7ad1f18b
    36 #include <glxtracer.h>
    36 #include <glxtracer.h>
    37 #include <glxlog.h>
    37 #include <glxlog.h>
    38 #include <AiwGenericParam.h>                // for passing data between applications
    38 #include <AiwGenericParam.h>                // for passing data between applications
    39 #include "AiwServiceHandler.h"                  // AIW service handler
    39 #include "AiwServiceHandler.h"                  // AIW service handler
    40 #include "glxmedia.h"
    40 #include "glxmedia.h"
    41 
    41 #include <featdiscovery.h>
    42 
       
    43 // -----------------------------------------------------------------------------
    42 // -----------------------------------------------------------------------------
    44 // NewL
    43 // NewL
    45 // -----------------------------------------------------------------------------
    44 // -----------------------------------------------------------------------------
    46 //	
    45 //	
    47 EXPORT_C CGlxCommandHandlerAiwEdit* CGlxCommandHandlerAiwEdit::NewL(
    46 EXPORT_C CGlxCommandHandlerAiwEdit* CGlxCommandHandlerAiwEdit::NewL(
    59 // ~CGlxCommandHandlerAiwEdit
    58 // ~CGlxCommandHandlerAiwEdit
    60 // -----------------------------------------------------------------------------
    59 // -----------------------------------------------------------------------------
    61 //
    60 //
    62 EXPORT_C CGlxCommandHandlerAiwEdit::~CGlxCommandHandlerAiwEdit()
    61 EXPORT_C CGlxCommandHandlerAiwEdit::~CGlxCommandHandlerAiwEdit()
    63     {
    62     {
       
    63     delete iFeatManager;
    64     delete iServiceHandler;
    64     delete iServiceHandler;
    65 
    65 
    66     if (NULL != iImageViewerInstance)
    66     if (NULL != iImageViewerInstance)
    67         {
    67         {
    68         iImageViewerInstance->DeleteInstance();
    68         iImageViewerInstance->DeleteInstance();
    92         TCommandInfo info(EGlxCmdAiwEdit);
    92         TCommandInfo info(EGlxCmdAiwEdit);
    93         AddCommandL(info);
    93         AddCommandL(info);
    94         }
    94         }
    95 
    95 
    96     iImageViewerInstance = CGlxImageViewerManager::InstanceL();
    96     iImageViewerInstance = CGlxImageViewerManager::InstanceL();
       
    97     iFeatManager = CFeatureDiscovery::NewL();
    97     }
    98     }
    98 
    99 
    99 // -----------------------------------------------------------------------------
   100 // -----------------------------------------------------------------------------
   100 // CGlxCommandHandlerAiwEdit
   101 // CGlxCommandHandlerAiwEdit
   101 // -----------------------------------------------------------------------------
   102 // -----------------------------------------------------------------------------
   130     if (aMenuPane)
   131     if (aMenuPane)
   131         {
   132         {
   132         //If stylus menu is present, hide it for multiple selection
   133         //If stylus menu is present, hide it for multiple selection
   133         if (iCommandSingleClick && aMenuPane->MenuItemExists(
   134         if (iCommandSingleClick && aMenuPane->MenuItemExists(
   134                 EGlxCmdAiwSingleClickEdit, pos)
   135                 EGlxCmdAiwSingleClickEdit, pos)
   135                 && (mediaList.SelectionCount() > 1))
   136 
       
   137                 && ((mediaList.SelectionCount() > 1)
       
   138                         || (!iFeatManager->IsFeatureSupportedL(
       
   139                                 KFeatureIdFfImageEditor)
       
   140                                 && !iFeatManager->IsFeatureSupportedL(
       
   141                                         KFeatureIdFfVideoEditor))))
   136             {
   142             {
   137             aMenuPane->SetItemDimmed(EGlxCmdAiwSingleClickEdit, ETrue);
   143             aMenuPane->SetItemDimmed(EGlxCmdAiwSingleClickEdit, ETrue);
   138             }
   144             }
   139         //For Edit menu item present in Options CBA 
   145         //For Edit menu item present in Options CBA 
   140         else if (aMenuPane->MenuItemExists(EGlxCmdAiwEdit, pos))
   146         else if (aMenuPane->MenuItemExists(EGlxCmdAiwEdit, pos))
   141             {
   147             {
   142             // If the image path is private or view is in grid & 
   148             // If the image path is private or view is in grid & 
   143             // selection is not equal to 1, we should hide Edit menu item 
   149             // selection is not equal to 1, we should hide Edit menu item 
   144             if (iImageViewerInstance->IsPrivate() || 
   150             if ((iImageViewerInstance->IsPrivate()
   145                     (mediaList.SelectionCount() != 1 
   151                     || (mediaList.SelectionCount() != 1
   146                             && !IsInFullScreenViewingModeL()))
   152                             && !IsInFullScreenViewingModeL()))
       
   153                     || (!iFeatManager->IsFeatureSupportedL(
       
   154                             KFeatureIdFfImageEditor)
       
   155                             && !iFeatManager->IsFeatureSupportedL(
       
   156                                     KFeatureIdFfVideoEditor)))
   147                 {
   157                 {
   148                 aMenuPane->SetItemDimmed(EGlxCmdAiwEdit, ETrue);
   158                 aMenuPane->SetItemDimmed(EGlxCmdAiwEdit, ETrue);
   149                 }
   159                 }
   150             }
   160             }
   151         }
   161         }