photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerslideshow.cpp
branchRCL_3
changeset 22 2dac0fdba72b
parent 18 bcb43dc84c44
child 25 191387a8b767
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerslideshow.cpp	Wed Mar 31 21:31:03 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerslideshow.cpp	Wed Apr 14 15:57:24 2010 +0300
@@ -339,10 +339,14 @@
 // ----------------------------------------------------------------------------
 void CGlxCommandHandlerSlideshow::HandleFocusChangedL(
                 NGlxListDefs::TFocusChangeType /*aType*/,
-                TInt /*aNewIndex*/, TInt /*aOldIndex*/, MGlxMediaList* /*aList*/ )
+                TInt /*aNewIndex*/, TInt /*aOldIndex*/, MGlxMediaList* aList)
     {
     TRACER("CGlxCommandHandlerSlideshow::HandleFocusChangedL");
-
+    if (aList->Count() <= 0 && iUiUtility->GetGridToolBar())
+        {
+        iUiUtility->GetGridToolBar()->SetItemDimmed(
+                EGlxCmdStartMultipleMarking, ETrue, ETrue);
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -350,8 +354,13 @@
 // ---------------------------------------------------------------------------
 //
 void CGlxCommandHandlerSlideshow::HandleItemAddedL(TInt /*aStartIndex*/,
-            TInt /*aEndIndex*/, MGlxMediaList* /*aList*/)
+            TInt /*aEndIndex*/, MGlxMediaList* aList)
     {
+    if (aList->Count() > 0 && iUiUtility->GetGridToolBar())
+        {
+        iUiUtility->GetGridToolBar()->SetItemDimmed(EGlxCmdSlideshowPlay,
+                EFalse, ETrue);
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -368,8 +377,13 @@
 // ---------------------------------------------------------------------------
 //
 void CGlxCommandHandlerSlideshow::HandleItemRemovedL(TInt /*aStartIndex*/,
-            TInt /*aEndIndex*/, MGlxMediaList* /*aList*/)
+            TInt /*aEndIndex*/, MGlxMediaList* aList)
     {
+    if (aList->Count() <= 0 && iUiUtility->GetGridToolBar())
+        {
+        iUiUtility->GetGridToolBar()->SetItemDimmed(EGlxCmdSlideshowPlay,
+                ETrue, ETrue);
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -509,6 +523,19 @@
             EGlxCmdSlideshowPlay, visible );
     }    
     
+// ----------------------------------------------------------------------------
+// HandlePopulatedL
+// ----------------------------------------------------------------------------
+//
+void CGlxCommandHandlerSlideshow::HandlePopulatedL( MGlxMediaList* aList )
+    {
+    TRACER("CGlxCommandHandlerSlideshow::HandlePopulatedL()");
+    if (aList->Count() == 0 && iUiUtility->GetGridToolBar())
+        {
+        iUiUtility->GetGridToolBar()->SetItemDimmed(
+                EGlxCmdSlideshowPlay, ETrue, ETrue);
+        }
+    }
 
 // ---------------------------------------------------------------------------
 // PopulateToolbar
@@ -517,7 +544,8 @@
 void CGlxCommandHandlerSlideshow::PopulateToolbarL()
 	{
     TRACER("CGlxCommandHandlerSlideshow::PopulateToolbarL");
-	iUiUtility->ScreenFurniture()->SetTooltipL( EGlxCmdSlideshowPlay, CAknButton::EPositionLeft );
+    iUiUtility->ScreenFurniture()->SetTooltipL(EGlxCmdSlideshowPlay,
+            CAknButton::EPositionLeft);
 	}
 
 // End of File