NABI 36835
authorravi.n2 <ravi.n2@samsung.com>
Tue, 7 May 2013 11:40:13 +0000 (17:10 +0530)
committerravi.n2 <ravi.n2@samsung.com>
Tue, 7 May 2013 11:40:13 +0000 (17:10 +0530)
Change-Id: If0e24b9018d0d64f70bdde7b395ecc71ce3f1d8d

src/CmCamcorderForm.cpp
src/CmCameraForm.cpp
src/CmCameraPresentationModel.cpp

index bde9644..6c12d16 100644 (file)
@@ -7330,6 +7330,9 @@ CamcorderForm::SetSelfModeButton(void)
                {
                        AppLogDebug("SECONDARY -> PRIMARY");
 
+                       r = ToggleCameraDirection(CAMCORDER_FORM_PRIMARY_MODE);
+                       TryReturnVoid(r == E_SUCCESS, "ToggleCameraDirection() fail[%s]", GetErrorMessage(r));
+
                        r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
 
                        if (value == true && r == E_SUCCESS)
@@ -7345,8 +7348,6 @@ CamcorderForm::SetSelfModeButton(void)
                        r = __pCamcorderPresentationModel->SetValue(SELF_PORTRAIT_ENABLE, CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY);
                        TryReturnVoid(r == E_SUCCESS, "Reg setValue fail[%s]", GetErrorMessage(r));
 
-                       r = ToggleCameraDirection(CAMCORDER_FORM_PRIMARY_MODE);
-                       TryReturnVoid(r == E_SUCCESS, "ToggleCameraDirection() fail[%s]", GetErrorMessage(r));
 
                        r = UpdateUiPanelIcon();
                        //TryReturnVoid(r == E_SUCCESS, "UpdateUiPanelIcon() fail[%s]", GetErrorMessage(r));
index 55a53ee..1af9a3a 100644 (file)
@@ -3680,6 +3680,9 @@ CameraForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
 
                                __isToggleCameraDirection = true;
 
+                               r = ToggleCameraDirection(CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY);
+                               TryReturnVoid(r == E_SUCCESS, "ToggleCameraDirection() fail[%s]", GetErrorMessage(r));
+
                                r = __pCameraPresentationModel->SetValue(SELF_PORTRAIT_ENABLE, CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY);
                                TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
 
@@ -3690,9 +3693,6 @@ CameraForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
                                        r = __pCameraPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_ON);
                                        TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
                                }
-
-                               r = ToggleCameraDirection(CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY);
-                               TryReturnVoid(r == E_SUCCESS, "ToggleCameraDirection() fail[%s]", GetErrorMessage(r));
                        }
 
                        UpdateUiPanelIcon();
index 4b22f5d..265f1bb 100644 (file)
@@ -3143,6 +3143,12 @@ CameraPresentationModel::SetValue(const Tizen::Base::String& entryName, const in
        }
 
        r = __pCameraSettingsPresentationModel->SetValue(strSectionName, entryName, value);
+
+       if (entryName.CompareTo(L"FLASH_MODE") == 0)
+       {
+               AppLogDebug("flash mode is set to value %d",value);
+               SetFlashMode(CameraFlashMode(value));
+       }
        TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
 
        AppLogDebug("EXIT");