From: Ayush Date: Wed, 5 Jun 2013 17:23:33 +0000 (+0530) Subject: Fix for JIRA 40541, 40539, 40517, 40511, 40502 and UTs X-Git-Tag: submit/tizen_2.2/20130714.153149~616^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b4f29abbae5a0a567deed327dc9e19efab0444e;p=framework%2Fosp%2Fuifw.git Fix for JIRA 40541, 40539, 40517, 40511, 40502 and UTs Change-Id: Ic5495a538ae3f52a69cb2f6b038015207f5534d9 Signed-off-by: Ayush --- diff --git a/src/ui/controls/FUiCtrl_SearchBar.cpp b/src/ui/controls/FUiCtrl_SearchBar.cpp index 4f5c3f7..44cb192 100644 --- a/src/ui/controls/FUiCtrl_SearchBar.cpp +++ b/src/ui/controls/FUiCtrl_SearchBar.cpp @@ -671,7 +671,6 @@ _SearchBar::GetButtonStatus(void) const result _SearchBar::SetButtonText(const String& text) { - __isButtonTextChangedByApp = true; SysTryReturn(NID_UI_CTRL, __pCancelButton, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. The cancel button instance is null."); @@ -681,6 +680,8 @@ _SearchBar::SetButtonText(const String& text) SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to set text."); + __isButtonTextChangedByApp = true; + return r; } @@ -1815,7 +1816,6 @@ _SearchBar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) return true; } - __pCancelButton->SetButtonStatus(_BUTTON_STATUS_HIGHLIGHTED); SetFocusCallBackParameter(false); __pCancelButton->SetFocused(); __pCancelButton->Invalidate(true); @@ -1827,15 +1827,12 @@ _SearchBar::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo) { if (__pCancelButton->GetButtonStatus() == _BUTTON_STATUS_HIGHLIGHTED) { - __pCancelButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); __pCancelButton->Invalidate(); __pEdit->SetFocused(); } if (__pCancelButton->GetButtonStatus() == _BUTTON_STATUS_DISABLED) //Searchbar Button is disabled, left arrow key is pressed { - __pCancelButton->SetButtonStatus(_BUTTON_STATUS_NORMAL); - SetButtonEnabled(false); __pEdit->SetFocused(); } diff --git a/src/ui/controls/FUiCtrl_SearchBarImpl.cpp b/src/ui/controls/FUiCtrl_SearchBarImpl.cpp index e501ddf..992597d 100644 --- a/src/ui/controls/FUiCtrl_SearchBarImpl.cpp +++ b/src/ui/controls/FUiCtrl_SearchBarImpl.cpp @@ -100,6 +100,15 @@ _SearchBarImpl::~_SearchBarImpl(void) __pPublicSearchBarEvent = null; } + if (__pSearchBar) + { + if (__pSearchBar->GetClippedGroupControl()) + { + _Control* pControl = __pSearchBar->GetClippedGroupControl(); + pControl->DetachAllChildren(); + } + } + if (__pEditField) { delete __pEditField; @@ -1117,7 +1126,6 @@ _SearchBarImpl::AddKeypadEventListener(IKeypadEventListener& listener) return r; } - result _SearchBarImpl::RemoveKeypadEventListener(IKeypadEventListener& listener) { @@ -1512,20 +1520,6 @@ _SearchBarImpl::OnFocusGained(const Tizen::Ui::Control& source) void _SearchBarImpl::OnFocusLost(const Tizen::Ui::Control& source) { - if (&source == __pEditField && __pButtonImpl->GetCore().GetButtonStatus() != _BUTTON_STATUS_HIGHLIGHTED) //Focus is lost from Edit, and button state is not Highlighted - { - SetMode(SEARCH_BAR_MODE_NORMAL); - } - - if (&source == __pButton) //Button is highlighted and a touch is performed on Edit. - { - if (__pButtonImpl->GetCore().GetButtonStatus() == _BUTTON_STATUS_HIGHLIGHTED) - { - __pButtonImpl->GetCore().SetButtonStatus(_BUTTON_STATUS_NORMAL); - __pButtonImpl->GetCore().Invalidate(); - } - } - if (!__pSearchBar->IsFocusCallBackToBeFired()) { return;