photosgallery/viewframework/views/cloudview/src/glxcloudviewimp.cpp
branchRCL_3
changeset 17 a60acebbbd9d
parent 15 191387a8b767
child 18 78ad99c24f08
equal deleted inserted replaced
15:191387a8b767 17:a60acebbbd9d
    29 #include <alf/ialfscrollbarmodel.h> // For CAlfScrollBarModel
    29 #include <alf/ialfscrollbarmodel.h> // For CAlfScrollBarModel
    30 #include <alf/ialfscrollbardefaultbaseelement.h> // For CAlfScrollBarDefaultBaseelement
    30 #include <alf/ialfscrollbardefaultbaseelement.h> // For CAlfScrollBarDefaultBaseelement
    31 #include <alf/alfwidgetenvextension.h>
    31 #include <alf/alfwidgetenvextension.h>
    32 #include <glxuiutility.h>
    32 #include <glxuiutility.h>
    33 #include <glxresourceutilities.h>  // for CGlxResourceUtilities
    33 #include <glxresourceutilities.h>  // for CGlxResourceUtilities
       
    34 #include <glxcollectionplugintags.hrh>
       
    35 #include <glxfiltergeneraldefs.h>
    34 
    36 
    35 #include <mpxcollectionutility.h>
    37 #include <mpxcollectionutility.h>
    36 #include <mpxcollectionpath.h>
    38 #include <mpxcollectionpath.h>
    37 #include <glxtracer.h>	
    39 #include <glxtracer.h>	
    38 #include <glxlog.h>					// For Logs
    40 #include <glxlog.h>					// For Logs
   169 	switch (aCommand)
   171 	switch (aCommand)
   170 		{
   172 		{
   171 		case EAknCmdOpen:
   173 		case EAknCmdOpen:
   172 		case EKeyEnter:
   174 		case EKeyEnter:
   173 			{
   175 			{
   174 			// Processing of this Command depends on Medialist Count ( > 0 tags Available) 
   176             // Processing of this Command depends on Medialist Count ( > 0 tags Available) 
   175 			if(iMediaList->Count())
   177             if (iMediaList->Count())
   176 			    {
   178                 {
   177 			// There can be no selection in cloud view, so assume that path contains focused item
   179                 // There can be no selection in cloud view, so assume that path contains focused item
   178 		        iUiUtility->SetViewNavigationDirection(EGlxNavigationForwards);
   180                 iUiUtility->SetViewNavigationDirection(EGlxNavigationForwards);
   179 			CMPXCollectionPath* path = iMediaList->PathLC( NGlxListDefs::EPathFocusOrSelection );
   181                 CMPXCollectionPath* path = iMediaList->PathLC(
   180 			iCollectionUtility->Collection().OpenL (*path);
   182                         NGlxListDefs::EPathFocusOrSelection);
   181 			CleanupStack::PopAndDestroy (path);
   183                 // When a collection is opened for browsing, 
   182 			consumed= ETrue;
   184                 // there are two queries executed with similar filter. 
   183 			    }
   185                 // First query to open the collection from list / cloud view.
   184 			break;
   186                 // Second one from grid view construction. To improve the grid opening
   185 			}
   187                 // performance, the first query will be completed with empty Id list.
       
   188                 RArray<TMPXAttribute> attributeArray;
       
   189                 CleanupClosePushL(attributeArray);
       
   190                 attributeArray.AppendL(KGlxFilterGeneralNavigationalStateOnly);
       
   191                 iCollectionUtility->Collection().OpenL(*path,
       
   192                         attributeArray.Array());
       
   193                 CleanupStack::PopAndDestroy(&attributeArray);
       
   194                 CleanupStack::PopAndDestroy(path);
       
   195                 consumed = ETrue;
       
   196                 }
       
   197             break;
       
   198             }
   186 		}
   199 		}
   187 		
   200 		
   188 	return consumed;
   201 	return consumed;
   189 	}
   202 	}
   190 
   203