photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp
branchRCL_3
changeset 24 ea65f74e6de4
parent 23 b023a8d2866a
equal deleted inserted replaced
23:b023a8d2866a 24:ea65f74e6de4
   125 		TUid /* aCustomMessageId */,
   125 		TUid /* aCustomMessageId */,
   126 		const TDesC8& aCustomMessage)
   126 		const TDesC8& aCustomMessage)
   127 	{
   127 	{
   128 	TRACER("CGlxGridViewImp::DoMLViewActivateL()");
   128 	TRACER("CGlxGridViewImp::DoMLViewActivateL()");
   129 
   129 
   130     TUint transitionID = (iUiUtility->ViewNavigationDirection()==
       
   131           EGlxNavigationForwards)?KActivateTransitionId:KFSDeActivateTransitionId; 
       
   132     
       
   133     HBufC8* activationParam = HBufC8::NewLC(KMaxUidName);
   130     HBufC8* activationParam = HBufC8::NewLC(KMaxUidName);
   134     activationParam->Des().AppendNum(KGlxActivationCmdShowAll);    
   131     activationParam->Des().AppendNum(KGlxActivationCmdShowAll);    
   135 
   132 
   136     // Start Animating the view when launched from other views 
   133     if (aCustomMessage.Compare(activationParam->Des()) == 0) 
   137     // except if launched from Camera App.
       
   138     if (aCustomMessage.Compare(activationParam->Des()) != 0) 
       
   139         {
       
   140         GfxTransEffect::BeginFullScreen( transitionID, TRect(),
       
   141                                     AknTransEffect::EParameterType, 
       
   142                                     AknTransEffect::GfxTransParam( KPhotosUid,
       
   143                                     AknTransEffect::TParameter::EEnableEffects) );	
       
   144         GfxTransEffect::EndFullScreen();
       
   145         }
       
   146     else
       
   147     	{
   134     	{
   148 		// Launched from Camera App, Check if there is any existing filter
   135 		// Launched from Camera App, Check if there is any existing filter
   149     	// and clear the 'MaxCount' filter, if supported to show all images.
   136     	// and clear the 'MaxCount' filter, if supported to show all images.
   150 		GLX_DEBUG1("CGlxGridViewImp::DoMLViewActivateL() - "
   137 		GLX_DEBUG1("CGlxGridViewImp::DoMLViewActivateL() - "
   151 				"Launched From Camera");
   138 				"Launched From Camera");
   157 			filter->SetTObjectValueL<TInt> (KGlxFilterGeneralMaxCount, 0);
   144 			filter->SetTObjectValueL<TInt> (KGlxFilterGeneralMaxCount, 0);
   158 			iMediaList->SetFilterL(filter);
   145 			iMediaList->SetFilterL(filter);
   159 			}
   146 			}
   160     	}
   147     	}
   161     
   148     
   162 	CleanupStack::PopAndDestroy(activationParam);
       
   163 	
   149 	
   164 	if(StatusPane())
   150 	if(StatusPane())
   165 		{
   151 		{
   166 		StatusPane()->MakeVisible(ETrue);
   152 		StatusPane()->MakeVisible(ETrue);
   167 		CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
   153 		CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
   189 	if(!iToolbar)
   175 	if(!iToolbar)
   190         {
   176         {
   191         iToolbar = CAknToolbar::NewL(R_GLX_GRID_VIEW_TOOLBAR);
   177         iToolbar = CAknToolbar::NewL(R_GLX_GRID_VIEW_TOOLBAR);
   192         SetGridToolBar(iToolbar);
   178         SetGridToolBar(iToolbar);
   193         SetToolbarObserver(this);
   179         SetToolbarObserver(this);
   194         //Make the toolbar visible only when the medialist is populated
   180         iToolbar->SetDimmed(ETrue);
   195         iToolbar->SetToolbarVisibility(iMediaList->IsPopulated());
   181         iToolbar->SetToolbarVisibility(ETrue);
   196         }
   182         }
   197 	//Create gridview container
   183 	//Create gridview container
   198 	iGlxGridViewContainer = CGlxGridViewContainer::NewL(iMediaList,
   184 	iGlxGridViewContainer = CGlxGridViewContainer::NewL(iMediaList,
   199             iUiUtility, *this, iToolbar);
   185             iUiUtility, *this, iToolbar);
   200 	iEikonEnv->AppUi()->AddToStackL(*this,iGlxGridViewContainer);
   186 	iEikonEnv->AppUi()->AddToStackL(*this,iGlxGridViewContainer);
   201 	iUiUtility->DestroyScreenClearer();
   187 	iUiUtility->DestroyScreenClearer();
       
   188 	
       
   189     // Start Animating the view when launched from other views 
       
   190     // except if launched from Camera App.
       
   191     if (aCustomMessage.Compare(activationParam->Des()) != 0) 
       
   192         {
       
   193 		TUint transitionID = (iUiUtility->ViewNavigationDirection()
       
   194 				== EGlxNavigationForwards) ? KActivateTransitionId
       
   195 				: KFSDeActivateTransitionId;
       
   196         GfxTransEffect::BeginFullScreen( transitionID, TRect(),
       
   197                                     AknTransEffect::EParameterType, 
       
   198                                     AknTransEffect::GfxTransParam( KPhotosUid,
       
   199                                     AknTransEffect::TParameter::EEnableEffects) );
       
   200         iIsTransEffectStarted = ETrue;
       
   201         }	
       
   202 	CleanupStack::PopAndDestroy(activationParam);
   202 	}
   203 	}
   203 
   204 
   204 // ---------------------------------------------------------------------------
   205 // ---------------------------------------------------------------------------
   205 // From CAknView
   206 // From CAknView
   206 // View deactivation function.
   207 // View deactivation function.
   332     TRACER("CGlxGridViewImp::HandleLatchToolbarL()");
   333     TRACER("CGlxGridViewImp::HandleLatchToolbarL()");
   333     CAknButton* markButton =
   334     CAknButton* markButton =
   334             static_cast<CAknButton*> (iToolbar->ControlOrNull(
   335             static_cast<CAknButton*> (iToolbar->ControlOrNull(
   335                     EGlxCmdStartMultipleMarking));
   336                     EGlxCmdStartMultipleMarking));
   336 
   337 
   337     if (markButton && !markButton->IsDimmed())
   338 	if(markButton)
   338         {
   339         {
   339         GLX_DEBUG1("CGlxGridViewImp::HandleLatchToolbar() - UnLatch");
   340         GLX_DEBUG1("CGlxGridViewImp::HandleLatchToolbar() - UnLatch");
   340         markButton->SetCurrentState(KGlxToolbarButtonUnLatched, ETrue);
   341 		markButton->SetCurrentState( KGlxToolbarButtonUnLatched, ETrue );
   341         // Force to update the frame IDs 
       
   342         markButton->SetDimmed(EFalse);
       
   343         }
   342         }
   344     }
   343     }
   345 //  End of File
   344 //  End of File