add patch
[framework/osp/uifw.git] / src / ui / controls / FUiCtrl_MessageBoxPresenter.cpp
index f79c10e..625e76f 100644 (file)
@@ -164,7 +164,6 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
 
        __textBounds.width = defaultWidth - GetLeftRightLabelMargin();
        __titleBgBounds.width = defaultWidth - (transLeftMargin + transRightMargin);
-       __buttonBgBounds.width = defaultWidth - (transLeftMargin + transRightMargin);
 
        // TitleText
        if (__pMessageBox->HasTitle() == true)
@@ -199,6 +198,8 @@ _MessageBoxPresenter::OnChangeLayout(_ControlOrientation orientation)
                __pLabel->SetBounds(FloatRectangle(0.0f, 0.0f, __textBounds.width, labelHeight));
        }
 
+       __buttonBgBounds = FloatRectangle(transLeftMargin, __pMessageBox->GetTotalHeight() - bottomHeight - transBottomMargin, defaultWidth- (transLeftMargin + transRightMargin), bottomHeight);
+
        for (int i = 0; i < __buttonNum; i++)
        {
                r = __pButtons[i]->SetBounds(CalculateButtonPositionAndSize(i));
@@ -654,7 +655,7 @@ _MessageBoxPresenter::GetButtonString(void)
 
        case MSGBOX_STYLE_OK:
                __buttonNum = 1;
-               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_OK, __buttonText[0]);
+               GET_STRING_CONFIG(IDS_COM_SK_OK, __buttonText[0]);
                break;
 
        case MSGBOX_STYLE_CANCEL:
@@ -664,7 +665,7 @@ _MessageBoxPresenter::GetButtonString(void)
 
        case MSGBOX_STYLE_OKCANCEL:
                __buttonNum = 2;
-               GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_OK, __buttonText[1]);
+               GET_STRING_CONFIG(IDS_COM_SK_OK, __buttonText[1]);
                GET_STRING_CONFIG(IDS_TPLATFORM_BUTTON_CANCEL_ABB, __buttonText[0]);
                break;
 
@@ -1245,7 +1246,7 @@ _MessageBoxPresenter::InitializeAccessibilityElement(void)
                        if (pLabelElement != null)
                        {
                                pLabelElement->SetName(L"MessageBoxText");
-                               pLabelElement->SetTrait(L"Popup body text");
+                               pLabelElement->SetTraitWithStringId("IDS_TPLATFORM_BODY_TEXT_IN_BODY_OF_POP_UP_T_TALKBACK");
                        }
 
                        // Add Container
@@ -1365,22 +1366,6 @@ _MessageBoxPresenter::OnTouchReleased(const _Control& source, const _TouchInfo&
        return true;
 }
 
-void
-_MessageBoxPresenter::OnDrawFocus(void)
-{
-       _ControlImpl* pImpl = null;
-       _Button* pButtonCore = null;
-
-       if (__pButtons[0] != null)
-       {
-               pImpl = _ControlImpl::GetInstance(*__pButtons[0]);
-               pButtonCore = dynamic_cast<_Button*>(&pImpl->GetCore());
-               __pButtons[0]->SetFocus();
-               __pMessageBox->SetFocusTraversalControl(pButtonCore, true);
-       }
-
-       return;
-}
 
 bool
 _MessageBoxPresenter::OnAccessibilityActionPerformed(const _AccessibilityContainer& control, const _AccessibilityElement& element)
@@ -1473,41 +1458,22 @@ _MessageBoxPresenter::OnKeyReleased(const _Control& source, const _KeyInfo& keyI
 
                if ((__pButtonListener->GetBeginModal() == true) || (__beginModal == true))
                {
-                       if (__pMessageBox->GetTimeout() != 0)
-                       {
-                               switch (style)
-                               {
-                               case MSGBOX_STYLE_NONE:
-                                       // fall through
-                               case MSGBOX_STYLE_OK:
-                                       // fall through
-                               case MSGBOX_STYLE_YESNO:
-                                       // fall through
-                               case MSGBOX_STYLE_ABORTRETRYIGNORE:
-                                       _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_BUTTON_CLOSE, false);
-                                       __beginModal = false;
-
-                                       break;
-                               case MSGBOX_STYLE_CANCEL:
-                                       // fall through
-                               case MSGBOX_STYLE_OKCANCEL:
-                                       // fall through
-                               case MSGBOX_STYLE_YESNOCANCEL:
-                                       // fall through
-                               case MSGBOX_STYLE_CANCELTRYCONTINUE:
-                                       // fall through
-                               case MSGBOX_STYLE_RETRYCANCEL:
-                                       _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_BUTTON_CANCEL, false);
-                                       __beginModal = false;
-                                       break;
-                               }
-
-                       }
-                       else if (style == MSGBOX_STYLE_CANCEL || style == MSGBOX_STYLE_OKCANCEL || style == MSGBOX_STYLE_YESNOCANCEL
-                                       || style == MSGBOX_STYLE_CANCELTRYCONTINUE || style == MSGBOX_STYLE_RETRYCANCEL)
+                       switch (style)
                        {
+                       case MSGBOX_STYLE_CANCEL:
+                               // fall through
+                       case MSGBOX_STYLE_OKCANCEL:
+                               // fall through
+                       case MSGBOX_STYLE_YESNOCANCEL:
+                               // fall through
+                       case MSGBOX_STYLE_CANCELTRYCONTINUE:
+                               // fall through
+                       case MSGBOX_STYLE_RETRYCANCEL:
                                _ModalLoopManager::GetInstance()->EndMainLoop(MSGBOX_BUTTON_CANCEL, false);
                                __beginModal = false;
+                               break;
+                       default:
+                               break;
                        }
                }
                return true;