photosgallery/viewframework/views/viewbase/src/glxmedialistviewbase.cpp
branchRCL_3
changeset 64 34937ec34dac
parent 60 5b3385a43d68
child 75 01504893d9cb
equal deleted inserted replaced
60:5b3385a43d68 64:34937ec34dac
   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             iPreloadContextForCommandHandlers
   172 			if (!iPreloadContextForCommandHandlers)
   173                     = new (ELeave) CGlxAttributeContext(&iSelectionIterator);
   173 				{
       
   174 				iPreloadContextForCommandHandlers
       
   175 						= new (ELeave) CGlxAttributeContext(&iSelectionIterator);
       
   176 				}
   174             TInt commandHandlerCount = iCommandHandlerList.Count();
   177             TInt commandHandlerCount = iCommandHandlerList.Count();
   175             for (TInt i = 0; i < commandHandlerCount; i++)
   178             for (TInt i = 0; i < commandHandlerCount; i++)
   176                 {
   179                 {
   177                 DoPrepareCommandHandlerL(iCommandHandlerList[i]);
   180                 DoPrepareCommandHandlerL(iCommandHandlerList[i]);
   178                 }
   181                 }
   388     if (iMediaList)
   391     if (iMediaList)
   389         {
   392         {
   390         if (iPreloadContextForCommandHandlers)
   393         if (iPreloadContextForCommandHandlers)
   391             {
   394             {
   392             iMediaList->RemoveContext(iPreloadContextForCommandHandlers);
   395             iMediaList->RemoveContext(iPreloadContextForCommandHandlers);
       
   396             delete iPreloadContextForCommandHandlers;
       
   397             iPreloadContextForCommandHandlers = NULL;
   393             }
   398             }
   394         iMediaList->Close();
   399         iMediaList->Close();
   395         iMediaList = NULL;
   400         iMediaList = NULL;
   396         }
   401         }
   397 	}
   402 	}