photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp
branchRCL_3
changeset 32 78ad99c24f08
parent 30 a60acebbbd9d
child 35 420f6808bf21
equal deleted inserted replaced
30:a60acebbbd9d 32:78ad99c24f08
    43 #include <akntranseffect.h>                             
    43 #include <akntranseffect.h>                             
    44 #include <gfxtranseffect/gfxtranseffect.h>
    44 #include <gfxtranseffect/gfxtranseffect.h>
    45 #include "glxgfxtranseffect.h"  // For transition effects
    45 #include "glxgfxtranseffect.h"  // For transition effects
    46 
    46 
    47 const TInt KGlxToolbarButtonUnLatched = 0;              // Toolbar mark button's unlatched state defined in the rss file
    47 const TInt KGlxToolbarButtonUnLatched = 0;              // Toolbar mark button's unlatched state defined in the rss file
    48 
       
    49 //Video playback view uid
       
    50 #define KMPXVIDEOPLAYBACKVIEWUID 0x200159B4
       
    51 const TUid KVideoPlayBackUid = TUid::Uid(KMPXVIDEOPLAYBACKVIEWUID);
       
    52 
    48 
    53 // ======== MEMBER FUNCTIONS ========
    49 // ======== MEMBER FUNCTIONS ========
    54 
    50 
    55 // ---------------------------------------------------------------------------
    51 // ---------------------------------------------------------------------------
    56 // Two-phased constructor.
    52 // Two-phased constructor.
   177 	if(!iToolbar)
   173 	if(!iToolbar)
   178         {
   174         {
   179         iToolbar = CAknToolbar::NewL(R_GLX_GRID_VIEW_TOOLBAR);
   175         iToolbar = CAknToolbar::NewL(R_GLX_GRID_VIEW_TOOLBAR);
   180         SetGridToolBar(iToolbar);
   176         SetGridToolBar(iToolbar);
   181         SetToolbarObserver(this);
   177         SetToolbarObserver(this);
   182         TBool visibility = iUiUtility->ViewNavigationDirection()
   178         //Make the toolbar visible only when the medialist is populated
   183                 == EGlxNavigationBackwards ? ETrue : EFalse;
   179         iToolbar->SetToolbarVisibility(iMediaList->IsPopulated());
   184         if (aPrevViewId.iViewUid == KVideoPlayBackUid)
       
   185             {
       
   186             GLX_DEBUG1( "CGlxGridViewImp::DoMLViewActivateL() "
       
   187                     "- Coming from video playback!");        
       
   188             visibility = ETrue;
       
   189             }
       
   190         iToolbar->SetToolbarVisibility(visibility);
       
   191         }
   180         }
   192 	//Create HG Grid, medialist observer, FS thumbnailcontext
   181 	//Create gridview container
   193 	iGlxGridViewContainer = CGlxGridViewContainer::NewL(iMediaList,iUiUtility,*this,iToolbar);
   182 	iGlxGridViewContainer = CGlxGridViewContainer::NewL(iMediaList,
       
   183             iUiUtility, *this, iToolbar);
   194 	iEikonEnv->AppUi()->AddToStackL(*this,iGlxGridViewContainer);
   184 	iEikonEnv->AppUi()->AddToStackL(*this,iGlxGridViewContainer);
   195 	iUiUtility->DestroyScreenClearer();
   185 	iUiUtility->DestroyScreenClearer();
   196 	}
   186 	}
   197 
   187 
   198 // ---------------------------------------------------------------------------
   188 // ---------------------------------------------------------------------------