photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerslideshow.cpp
--- 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