diff -r a289dde0a1d6 -r 415ff50d2eca camerauis/cameraxui/cxui/src/cxuiview.cpp --- a/camerauis/cameraxui/cxui/src/cxuiview.cpp Fri Sep 17 08:27:13 2010 +0300 +++ b/camerauis/cameraxui/cxui/src/cxuiview.cpp Mon Oct 04 00:05:08 2010 +0300 @@ -66,8 +66,7 @@ */ void CxuiView::construct(HbMainWindow *mainWindow, CxeEngine *engine, CxuiDocumentLoader *documentLoader, - CxuiCaptureKeyHandler * keyHandler, - HbActivityManager *activityManager) + CxuiCaptureKeyHandler * keyHandler) { CX_DEBUG_ENTER_FUNCTION(); @@ -75,13 +74,11 @@ CX_ASSERT_ALWAYS(mainWindow); CX_ASSERT_ALWAYS(engine); CX_ASSERT_ALWAYS(documentLoader); - CX_ASSERT_ALWAYS(activityManager); mMainWindow = mainWindow; mDocumentLoader = documentLoader; mCaptureKeyHandler = keyHandler; mEngine = engine; - mActivityManager = activityManager; // adjust the timer, and connect it to correct slot connect(&mHideControlsTimeout, SIGNAL(timeout()), this, SLOT(hideControls())); @@ -147,7 +144,7 @@ } /*! - * Clear activity from activity manager. Default implementation does nothing. + * Clear activity from activity storage. Default implementation does nothing. */ void CxuiView::clearActivity() { @@ -194,9 +191,9 @@ */ void CxuiView::enterStandby() { - CX_DEBUG_IN_FUNCTION(); + CX_DEBUG_ENTER_FUNCTION(); releaseCamera(); - CX_DEBUG_IN_FUNCTION(); + CX_DEBUG_EXIT_FUNCTION(); } /*! @@ -268,26 +265,28 @@ { CX_DEBUG_ENTER_FUNCTION(); - if (mHideControlsTimeout.isActive()) { - mHideControlsTimeout.stop(); - } + if (mMainWindow->currentView() == this) { + if (mHideControlsTimeout.isActive()) { + mHideControlsTimeout.stop(); + } - setTitleBarVisible(false); - setStatusBarVisible(false); + setTitleBarVisible(false); + setStatusBarVisible(false); - hideZoom(); + hideZoom(); - hideToolbar(); + hideToolbar(); - // show indicators when controls are hidden - showIndicators(); + // show indicators when controls are hidden + showIndicators(); - mControlsVisible = false; + mControlsVisible = false; - // give the keyboard focus back to the view - // for the view to receive key events - setFocus(); + // give the keyboard focus back to the view + // for the view to receive key events + setFocus(); + } CX_DEBUG_EXIT_FUNCTION(); } @@ -296,7 +295,7 @@ */ void CxuiView::showControls() { - if (allowShowControls()) { + if (mMainWindow->currentView() == this && allowShowControls()) { // show toolbar showToolbar();