photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerslideshow.cpp
branchRCL_3
changeset 47 f9e827349359
parent 25 191387a8b767
equal deleted inserted replaced
35:420f6808bf21 47:f9e827349359
   339 void CGlxCommandHandlerSlideshow::HandleFocusChangedL(
   339 void CGlxCommandHandlerSlideshow::HandleFocusChangedL(
   340                 NGlxListDefs::TFocusChangeType /*aType*/,
   340                 NGlxListDefs::TFocusChangeType /*aType*/,
   341                 TInt /*aNewIndex*/, TInt /*aOldIndex*/, MGlxMediaList* aList)
   341                 TInt /*aNewIndex*/, TInt /*aOldIndex*/, MGlxMediaList* aList)
   342     {
   342     {
   343     TRACER("CGlxCommandHandlerSlideshow::HandleFocusChangedL");
   343     TRACER("CGlxCommandHandlerSlideshow::HandleFocusChangedL");
   344     if (aList->Count() <= 0 && iUiUtility->GetGridToolBar())
   344     // Check if toolbar is available.
   345         {
   345     CAknToolbar* toolbar = iUiUtility->GetGridToolBar();
   346         iUiUtility->GetGridToolBar()->SetItemDimmed(
   346     if (aList->Count() <= 0 && toolbar)
   347                 EGlxCmdStartMultipleMarking, ETrue, ETrue);
   347         {
       
   348         toolbar->SetItemDimmed(EGlxCmdSlideshowPlay, ETrue, ETrue);
   348         }
   349         }
   349     }
   350     }
   350 
   351 
   351 // ---------------------------------------------------------------------------
   352 // ---------------------------------------------------------------------------
   352 // HandleItemAddedL
   353 // HandleItemAddedL
   353 // ---------------------------------------------------------------------------
   354 // ---------------------------------------------------------------------------
   354 //
   355 //
   355 void CGlxCommandHandlerSlideshow::HandleItemAddedL(TInt /*aStartIndex*/,
   356 void CGlxCommandHandlerSlideshow::HandleItemAddedL(TInt /*aStartIndex*/,
   356             TInt /*aEndIndex*/, MGlxMediaList* aList)
   357             TInt /*aEndIndex*/, MGlxMediaList* aList)
   357     {
   358     {
   358     if (aList->Count() > 0 && iUiUtility->GetGridToolBar())
   359     TRACER("CGlxCommandHandlerSlideshow::HandleItemAddedL");
   359         {
   360     // Check if toolbar is available.
   360         iUiUtility->GetGridToolBar()->SetItemDimmed(EGlxCmdSlideshowPlay,
   361     CAknToolbar* toolbar = iUiUtility->GetGridToolBar();
   361                 EFalse, ETrue);
   362     if (aList->Count() > 0 && toolbar)
       
   363         {
       
   364         toolbar->SetItemDimmed(EGlxCmdSlideshowPlay, EFalse, ETrue);
   362         }
   365         }
   363     }
   366     }
   364 
   367 
   365 // ---------------------------------------------------------------------------
   368 // ---------------------------------------------------------------------------
   366 // HandleMediaL
   369 // HandleMediaL
   376 // ---------------------------------------------------------------------------
   379 // ---------------------------------------------------------------------------
   377 //
   380 //
   378 void CGlxCommandHandlerSlideshow::HandleItemRemovedL(TInt /*aStartIndex*/,
   381 void CGlxCommandHandlerSlideshow::HandleItemRemovedL(TInt /*aStartIndex*/,
   379             TInt /*aEndIndex*/, MGlxMediaList* aList)
   382             TInt /*aEndIndex*/, MGlxMediaList* aList)
   380     {
   383     {
   381     if (aList->Count() <= 0 && iUiUtility->GetGridToolBar())
   384     TRACER("CGlxCommandHandlerSlideshow::HandleItemRemovedL");
   382         {
   385     // Check if toolbar is available.
   383         iUiUtility->GetGridToolBar()->SetItemDimmed(EGlxCmdSlideshowPlay,
   386     CAknToolbar* toolbar = iUiUtility->GetGridToolBar();
   384                 ETrue, ETrue);
   387     if (aList->Count() <= 0 && toolbar)
       
   388         {
       
   389         toolbar->SetItemDimmed(EGlxCmdSlideshowPlay, ETrue, ETrue);
   385         }
   390         }
   386     }
   391     }
   387 
   392 
   388 // ---------------------------------------------------------------------------
   393 // ---------------------------------------------------------------------------
   389 // HandleItemModifiedL
   394 // HandleItemModifiedL
   527 // ----------------------------------------------------------------------------
   532 // ----------------------------------------------------------------------------
   528 //
   533 //
   529 void CGlxCommandHandlerSlideshow::HandlePopulatedL( MGlxMediaList* aList )
   534 void CGlxCommandHandlerSlideshow::HandlePopulatedL( MGlxMediaList* aList )
   530     {
   535     {
   531     TRACER("CGlxCommandHandlerSlideshow::HandlePopulatedL()");
   536     TRACER("CGlxCommandHandlerSlideshow::HandlePopulatedL()");
   532     if (aList->Count() == 0 && iUiUtility->GetGridToolBar())
   537     // Check if toolbar is available.
   533         {
   538     CAknToolbar* toolbar = iUiUtility->GetGridToolBar();
   534         iUiUtility->GetGridToolBar()->SetItemDimmed(
   539     if (aList->Count() == 0 && toolbar)
   535                 EGlxCmdSlideshowPlay, ETrue, ETrue);
   540         {
       
   541         toolbar->SetItemDimmed(EGlxCmdSlideshowPlay, ETrue, ETrue);
   536         }
   542         }
   537     }
   543     }
   538 
   544 
   539 // ---------------------------------------------------------------------------
   545 // ---------------------------------------------------------------------------
   540 // PopulateToolbar
   546 // PopulateToolbar