photosgallery/viewframework/views/viewbase/src/glxmedialistviewbase.cpp
branchRCL_3
changeset 75 01504893d9cb
parent 64 34937ec34dac
equal deleted inserted replaced
68:5b238bc8ffb6 75:01504893d9cb
   167                 = &iMediaListFactory->CreateMediaListL(*iCollectionUtility);
   167                 = &iMediaListFactory->CreateMediaListL(*iCollectionUtility);
   168 
   168 
   169         if ((navigationalState->Id() != TMPXItemId(
   169         if ((navigationalState->Id() != TMPXItemId(
   170 				KGlxCollectionPluginAlbumsImplementationUid)))
   170 				KGlxCollectionPluginAlbumsImplementationUid)))
   171             {
   171             {
   172 			if (!iPreloadContextForCommandHandlers)
   172             iPreloadContextForCommandHandlers
   173 				{
   173                     = new (ELeave) CGlxAttributeContext(&iSelectionIterator);
   174 				iPreloadContextForCommandHandlers
       
   175 						= new (ELeave) CGlxAttributeContext(&iSelectionIterator);
       
   176 				}
       
   177             TInt commandHandlerCount = iCommandHandlerList.Count();
   174             TInt commandHandlerCount = iCommandHandlerList.Count();
   178             for (TInt i = 0; i < commandHandlerCount; i++)
   175             for (TInt i = 0; i < commandHandlerCount; i++)
   179                 {
   176                 {
   180                 DoPrepareCommandHandlerL(iCommandHandlerList[i]);
   177                 DoPrepareCommandHandlerL(iCommandHandlerList[i]);
   181                 }
   178                 }
   391     if (iMediaList)
   388     if (iMediaList)
   392         {
   389         {
   393         if (iPreloadContextForCommandHandlers)
   390         if (iPreloadContextForCommandHandlers)
   394             {
   391             {
   395             iMediaList->RemoveContext(iPreloadContextForCommandHandlers);
   392             iMediaList->RemoveContext(iPreloadContextForCommandHandlers);
   396             delete iPreloadContextForCommandHandlers;
       
   397             iPreloadContextForCommandHandlers = NULL;
       
   398             }
   393             }
   399         iMediaList->Close();
   394         iMediaList->Close();
   400         iMediaList = NULL;
   395         iMediaList = NULL;
   401         }
   396         }
   402 	}
   397 	}