photosgallery/viewframework/views/gridview/src/glxgridviewcontainer.cpp
branchRCL_3
changeset 75 01504893d9cb
parent 60 5b3385a43d68
equal deleted inserted replaced
68:5b238bc8ffb6 75:01504893d9cb
    42 
    42 
    43 #include "glxgridviewcontainer.h"
    43 #include "glxgridviewcontainer.h"
    44 #include "glxgridviewimp.h"
    44 #include "glxgridviewimp.h"
    45 #include "glxgridviewmlobserver.h"                      // medialist observer for Hg Grid
    45 #include "glxgridviewmlobserver.h"                      // medialist observer for Hg Grid
    46 
    46 
       
    47 const TInt KNoOfPages(3);
       
    48 const TInt KBufferTresholdSize(3); 						// in rows
       
    49 
    47 // ======== MEMBER FUNCTIONS ========
    50 // ======== MEMBER FUNCTIONS ========
    48 
    51 
    49 // ---------------------------------------------------------------------------
    52 // ---------------------------------------------------------------------------
    50 // Two-phased constructor.
    53 // Two-phased constructor.
    51 // ---------------------------------------------------------------------------
    54 // ---------------------------------------------------------------------------
   338 //
   341 //
   339 void CGlxGridViewContainer::HandleOpenL( TInt aIndex )
   342 void CGlxGridViewContainer::HandleOpenL( TInt aIndex )
   340 	{
   343 	{
   341     TRACER("CGlxGridViewContainer::HandleOpenL()");
   344     TRACER("CGlxGridViewContainer::HandleOpenL()");
   342 	// Make sure that the Selection Index is inside medialist count
   345 	// Make sure that the Selection Index is inside medialist count
   343 	if (!iIsDialogLaunched && aIndex <iMediaList->Count() && aIndex >=0)
   346 	if (aIndex <iMediaList->Count() && aIndex >=0)
   344 		{
   347 		{
   345 		if (!(iHgGrid->Flags() && CHgScroller::EHgScrollerSelectionMode))
   348 		if (!(iHgGrid->Flags() && CHgScroller::EHgScrollerSelectionMode))
   346 			{
   349 			{
   347 			// If not in marking mode, then open FS view
   350 			// If not in marking mode, then open FS view
   348 			iUiUtility->SetViewNavigationDirection(EGlxNavigationForwards);
   351 			iUiUtility->SetViewNavigationDirection(EGlxNavigationForwards);
   521 //
   524 //
   522 void CGlxGridViewContainer::CreateGridMediaListObserverL()
   525 void CGlxGridViewContainer::CreateGridMediaListObserverL()
   523 	{
   526 	{
   524 	TRACER("CGlxGridViewContainer::CreateGridMediaListObserverL()");
   527 	TRACER("CGlxGridViewContainer::CreateGridMediaListObserverL()");
   525 	// Creating the Medialist observer for HG Grid
   528 	// Creating the Medialist observer for HG Grid
   526 	iGlxGridMLObserver = CGlxGridViewMLObserver::NewL(*this, *iMediaList,
   529 	iGlxGridMLObserver = CGlxGridViewMLObserver::NewL(*iMediaList, iHgGrid);
   527             iHgGrid);
       
   528 	}
   530 	}
   529     
   531     
   530 // ---------------------------------------------------------------------------
   532 // ---------------------------------------------------------------------------
   531 // CreateGridAfterFSDeactivatedL
   533 // CreateGridAfterFSDeactivatedL
   532 // On Returning from the FS View, There is no calls to the handle attribut available,
   534 // On Returning from the FS View, There is no calls to the handle attribut available,
   958 		case EGlxCmdDialogLaunched:
   960 		case EGlxCmdDialogLaunched:
   959 		    {
   961 		    {
   960 		    iIsDialogLaunched = ETrue;
   962 		    iIsDialogLaunched = ETrue;
   961             break;
   963             break;
   962    		    }
   964    		    }
   963 		case EGlxCmdDialogDismissed:
       
   964 		    {
       
   965             if (iIsDialogLaunched && iIsMMCRemoved)
       
   966                 {
       
   967                 iGlxGridViewObserver.HandleGridEventsL(EAknSoftkeyExit);
       
   968                 }
       
   969 
       
   970             iIsDialogLaunched = EFalse;
       
   971             retVal = ETrue;
       
   972             break;
       
   973             }
       
   974 		default:
   965 		default:
   975 			break;
   966 			break;
   976 		}
   967 		}
   977 	GLX_LOG_INFO("CGlxGridViewContainer::HandleViewCommandL() exiting");
   968 	GLX_LOG_INFO("CGlxGridViewContainer::HandleViewCommandL() exiting");
   978 	return retVal;
   969 	return retVal;