From: Keuckdo Bang Date: Tue, 2 Apr 2013 23:44:59 +0000 (+0900) Subject: logic that launching quickpanel in landscape mode was fixed. X-Git-Tag: accepted/tizen_2.1/20130425.033138~515 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e684e76d49b662a953a617732c154fbb2e5fbe78;p=platform%2Fframework%2Fnative%2Fuifw.git logic that launching quickpanel in landscape mode was fixed. Change-Id: Id54680dc79c74882f7b3cbdae4b27ae9ce61f058 --- diff --git a/src/ui/controls/FUiCtrl_Indicator.cpp b/src/ui/controls/FUiCtrl_Indicator.cpp index 662c321..863d8fa 100644 --- a/src/ui/controls/FUiCtrl_Indicator.cpp +++ b/src/ui/controls/FUiCtrl_Indicator.cpp @@ -264,15 +264,20 @@ _Indicator::AddIndicatorObject(_Form* pForm) r = ChangeCurrentVisualElement(__pLandscapeVisualElement); } - Ecore_Evas *pEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject); - SysTryReturn(NID_UI_CTRL, pEe, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); + Ecore_Evas *pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject); + SysTryReturn(NID_UI_CTRL, pPortraitEe, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); + Ecore_Evas *pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject); + SysTryReturn(NID_UI_CTRL, pLandscapeEe, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); - ecore_evas_data_set(pEe, pPortPublicKey, __pPortraitIndicatorEvasObject); - ecore_evas_data_set(pEe, pLandPublicKey, __pLandscapeIndicatorEvasObject); - ecore_evas_data_set(pEe, pIndicatorKey, this); - ecore_evas_callback_delete_request_set(pEe, _Indicator::OnDisconnected); + ecore_evas_data_set(pPortraitEe, pPortPublicKey, __pPortraitIndicatorEvasObject); + ecore_evas_data_set(pLandscapeEe, pLandPublicKey, __pLandscapeIndicatorEvasObject); + ecore_evas_data_set(pPortraitEe, pIndicatorKey, this); + ecore_evas_data_set(pLandscapeEe, pIndicatorKey, this); + ecore_evas_callback_delete_request_set(pPortraitEe, _Indicator::OnDisconnected); + ecore_evas_callback_delete_request_set(pLandscapeEe, _Indicator::OnDisconnected); - ecore_evas_callback_msg_handle_set(pEe, _Indicator::OnMessageHandle); + ecore_evas_callback_msg_handle_set(pPortraitEe, _Indicator::OnMessageHandle); + ecore_evas_callback_msg_handle_set(pLandscapeEe, _Indicator::OnMessageHandle); _ControlRotation controlRotation = _ControlManager::GetInstance()->GetOrientationStatus(); int rotation = 0; @@ -294,7 +299,14 @@ _Indicator::AddIndicatorObject(_Form* pForm) default : break; } - ecore_evas_msg_parent_send(pEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int)); + if(rotation == 0 || rotation == 180) + { + ecore_evas_msg_parent_send(pPortraitEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int)); + } + else + { + ecore_evas_msg_parent_send(pLandscapeEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int)); + } return r; } @@ -365,8 +377,10 @@ _Indicator::OnChangeLayout(_ControlOrientation orientation) _ControlRotation controlRotation = _ControlManager::GetInstance()->GetOrientationStatus(); int rotation = 0; - Ecore_Evas *pEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject); - SysTryReturnVoidResult(NID_UI_CTRL, pEe, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); + Ecore_Evas *pPortraitEe = ecore_evas_object_ecore_evas_get(__pPortraitIndicatorEvasObject); + SysTryReturnVoidResult(NID_UI_CTRL, pPortraitEe, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); + Ecore_Evas *pLandscapeEe = ecore_evas_object_ecore_evas_get(__pLandscapeIndicatorEvasObject); + SysTryReturnVoidResult(NID_UI_CTRL, pLandscapeEe, E_SYSTEM, "[E_SYSTEM] Unable to get evas."); switch(controlRotation) { @@ -385,7 +399,14 @@ _Indicator::OnChangeLayout(_ControlOrientation orientation) default : break; } - ecore_evas_msg_parent_send(pEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int)); + if(rotation == 0 || rotation == 180) + { + ecore_evas_msg_parent_send(pPortraitEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int)); + } + else + { + ecore_evas_msg_parent_send(pLandscapeEe, MSG_DOMAIN_CONTROL_INDICATOR, MSG_ID_INDICATOR_ROTATION, &rotation, sizeof(int)); + } } result