photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp
branchRCL_3
changeset 32 78ad99c24f08
parent 30 a60acebbbd9d
child 35 420f6808bf21
--- a/photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp	Tue May 11 16:13:40 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp	Tue May 25 12:42:31 2010 +0300
@@ -46,10 +46,6 @@
 
 const TInt KGlxToolbarButtonUnLatched = 0;              // Toolbar mark button's unlatched state defined in the rss file
 
-//Video playback view uid
-#define KMPXVIDEOPLAYBACKVIEWUID 0x200159B4
-const TUid KVideoPlayBackUid = TUid::Uid(KMPXVIDEOPLAYBACKVIEWUID);
-
 // ======== MEMBER FUNCTIONS ========
 
 // ---------------------------------------------------------------------------
@@ -179,18 +175,12 @@
         iToolbar = CAknToolbar::NewL(R_GLX_GRID_VIEW_TOOLBAR);
         SetGridToolBar(iToolbar);
         SetToolbarObserver(this);
-        TBool visibility = iUiUtility->ViewNavigationDirection()
-                == EGlxNavigationBackwards ? ETrue : EFalse;
-        if (aPrevViewId.iViewUid == KVideoPlayBackUid)
-            {
-            GLX_DEBUG1( "CGlxGridViewImp::DoMLViewActivateL() "
-                    "- Coming from video playback!");        
-            visibility = ETrue;
-            }
-        iToolbar->SetToolbarVisibility(visibility);
+        //Make the toolbar visible only when the medialist is populated
+        iToolbar->SetToolbarVisibility(iMediaList->IsPopulated());
         }
-	//Create HG Grid, medialist observer, FS thumbnailcontext
-	iGlxGridViewContainer = CGlxGridViewContainer::NewL(iMediaList,iUiUtility,*this,iToolbar);
+	//Create gridview container
+	iGlxGridViewContainer = CGlxGridViewContainer::NewL(iMediaList,
+            iUiUtility, *this, iToolbar);
 	iEikonEnv->AppUi()->AddToStackL(*this,iGlxGridViewContainer);
 	iUiUtility->DestroyScreenClearer();
 	}