camerauis/cameraapp/generic/src/CamVideoPreCaptureContainer.cpp
branchRCL_3
changeset 18 51dda465e618
parent 16 d486e5e3cc9a
child 27 53c8aa5d97a3
--- a/camerauis/cameraapp/generic/src/CamVideoPreCaptureContainer.cpp	Wed Mar 31 21:06:44 2010 +0300
+++ b/camerauis/cameraapp/generic/src/CamVideoPreCaptureContainer.cpp	Wed Apr 14 15:41:04 2010 +0300
@@ -35,6 +35,7 @@
 #include <eikapp.h>		// For CEikApplication
 #include <AknIconUtils.h>
 #include <akntoolbar.h>
+#include <akntoolbarextension.h>
 #include <barsread.h>
 #include <cameraapp.rsg>
 #include <vgacamsettings.rsg>
@@ -477,10 +478,30 @@
 // Change the current capture state following shutter 
 // key events
 // ----------------------------------------------------
-//  
+//
 TKeyResponse CCamVideoPreCaptureContainer::HandleShutterKeyEventL( const TKeyEvent& /*aKeyEvent*/,
-                                                                   TEventCode /*aType*/ )
-    {    
+                                                                   TEventCode aType )
+    {
+    CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
+          
+    if ( appUi && 
+         appUi->CurrentViewState() == ECamViewStatePreCapture &&
+         aType == EEventKeyDown &&
+         iController.IsTouchScreenSupported() )
+        {
+        CAknToolbar* toolbar = appUi->CurrentFixedToolbar();
+        if ( toolbar )
+            {
+            CAknToolbarExtension* toolbarExtension =
+            toolbar->ToolbarExtension();
+            if ( toolbarExtension && toolbarExtension->IsShown() )
+                {
+                toolbarExtension->SetShown( EFalse );
+                return EKeyWasConsumed;
+                }
+            }
+        }
+      
     return EKeyWasNotConsumed;
     }