photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp
branchRCL_3
changeset 68 5b238bc8ffb6
parent 64 34937ec34dac
child 75 01504893d9cb
--- a/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp	Tue Sep 14 21:19:17 2010 +0300
+++ b/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp	Wed Sep 15 12:13:06 2010 +0300
@@ -554,6 +554,12 @@
     //Since the toolbar should not be present for ImageViewer.
     if(!iImgViewerMode)
         {
+		TInt focusIndex = iMediaList->FocusIndex();
+		if (focusIndex >= 0 && focusIndex < iMediaList->Count())
+			{
+			TBool dimmed = (EMPXVideo == iMediaList->Item(focusIndex).Category());
+			Toolbar()->SetItemDimmed(EGlxCmdSlideshowPlay, dimmed, ETrue);
+			}
         //show the toolbar
         EnableFSToolbar(ETrue);
         }
@@ -1031,6 +1037,7 @@
     TRACER("CGlxFullScreenViewImp::offerEventL");
     if ( aEvent.IsKeyEvent())
         {
+		GLX_LOG_INFO1("CGlxFullScreenViewImp::OfferEventL aEvent.KeyEvent().iScanCode: %d",aEvent.KeyEvent().iScanCode); 
         switch ( aEvent.KeyEvent().iScanCode )
             {
             case EStdKeyNkpAsterisk :
@@ -1043,12 +1050,19 @@
                 //EKeyApplicationC for which TStdScancode is EStdKeyApplicatoinC
             case EStdKeyApplicationC: 
                 {
-                if(EEventKeyDown == aEvent.Code())
+                TInt focusIndex = iMediaList->FocusIndex();
+                if (focusIndex >= 0 && focusIndex < iMediaList->Count())
                     {
-                    HideUi(EFalse);
-                    TRAP_IGNORE( ActivateZoomControlL(EZoomStartKey));
-                    return EEventConsumed;
+                    if (EEventKey == aEvent.Code() && (EMPXImage 
+                            == iMediaList->Item(focusIndex).Category()))
+                        {
+                        HideUi(EFalse);
+                        SetSliderToMin();
+                        TRAP_IGNORE(ActivateZoomControlL(EZoomStartKey));
+                        return EEventHandled;
+                        }
                     }
+				// Fall through to show the UI in case of EMPXVideo
                 }
             case EStdKeyUpArrow:            
             case EStdKeyDownArrow:
@@ -2122,13 +2136,16 @@
         DeactivateZoomControlL();
         }
     SetItemToHDMIL();
-    if (focusIndex != KErrNotFound && EUiOn == GetUiState())
+    if (focusIndex != KErrNotFound && focusIndex < iMediaList->Count() && EUiOn
+            == GetUiState())
         {
         // show/hide the slider
         if (iSliderWidget)
             {
             iSliderWidget->ShowWidget(CheckIfSliderToBeShownL());
             }
+        TBool dimmed = (EMPXVideo == iMediaList->Item(focusIndex).Category());
+        Toolbar()->SetItemDimmed(EGlxCmdSlideshowPlay, dimmed, ETrue);
         }
     /** if this is the last image deleted when Photo is in foreground, go back to the previous view*/
     if (mlCount == 0 && IsForeground() && iNaviState->ViewingMode()