remove back,option while existing HW key
authorMyung Jin Kim <critical.kim@samsung.com>
Mon, 3 Jun 2013 14:23:28 +0000 (23:23 +0900)
committerMyung Jin Kim <critical.kim@samsung.com>
Mon, 3 Jun 2013 14:23:28 +0000 (23:23 +0900)
Change-Id: I2954f1449c689454014e90fe24509fede9c89c5e

src/ui/controls/FUiCtrl_FooterImpl.cpp
src/ui/controls/FUiCtrl_Toolbar.cpp
src/ui/inc/FUiCtrl_FooterImpl.h
src/ui/inc/FUiCtrl_Toolbar.h

index 5eee1c2..c583145 100644 (file)
@@ -447,6 +447,15 @@ _FooterImpl::SetButtonTextColor(ButtonItemStatus status, const Color& color)
 result
 _FooterImpl::SetBackButton(void)
 {
+       bool isBackButton = false;
+
+       Tizen::System::SystemInfo::GetValue(L"http://tizen.org/feature/input.back_key", isBackButton);
+
+       if(isBackButton)
+       {
+               SysTryReturnResult(NID_UI_CTRL, 0, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] HW BackButton exist");
+       }
+
        SysTryReturnResult(NID_UI_CTRL, (__style != FOOTER_STYLE_TAB), E_UNSUPPORTED_OPERATION,
                           "[E_UNSUPPORTED_OPERATION] The current Footer style does not support the operation.");
 
@@ -917,13 +926,6 @@ _FooterImpl::RemoveActionEventListener(IActionEventListener& listener)
 void
 _FooterImpl::OnActionPerformed(const _Control& source, int actionId)
 {
-       _Button* pButton = dynamic_cast<_Button*>(const_cast<_Control*>(&source));
-
-       if (pButton == GetCore().GetButton(BACK_BUTTON))
-       {
-               return ;
-       }
-
        if (GetCore().IsInitialDraw() == true && GetCore().GetSelectedItemIndex() == 0)
        {
                return;
@@ -1620,6 +1622,15 @@ _FooterImpl::SetOptionButtonEnabled(bool enable)
 result
 _FooterImpl::SetOptionButton(void)
 {
+       bool isOptionButton = false;
+
+       Tizen::System::SystemInfo::GetValue(L"http://tizen.org/feature/input.option_key", isOptionButton);
+
+       if(isOptionButton)
+       {
+               SysTryReturnResult(NID_UI_CTRL, 0, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] HW OptionButton exist");
+       }
+
        SysTryReturnResult(NID_UI_CTRL, (__style != FOOTER_STYLE_TAB), E_UNSUPPORTED_OPERATION,
                           "[E_UNSUPPORTED_OPERATION] The current Footer style does not support the operation.");
 
index 410e1e8..02a4ded 100644 (file)
@@ -4404,7 +4404,7 @@ _Toolbar::AddActionEventListener(const Controls::_IActionEventListener& listener
                __pItems.at(i)->AddActionEventListener(listener);
        }
 
-       for (int j = 0; j < BUTTON_MAX; j++)
+       for (int j = 0; j <= MIDDLE_BUTTON; j++)
        {
                if (__pButtonItems[j])
                {
index 4f45436..ad02ca7 100644 (file)
@@ -25,6 +25,7 @@
 #define _FUI_CTRL_INTERNAL_FOOTER_IMPL_H_
 
 #include <climits>
+#include <FSysSystemInfo.h>
 #include <FUiCtrlFooter.h>
 #include "FUi_ControlImpl.h"
 #include "FUiCtrl_Button.h"
index b2fcc87..60af50b 100644 (file)
@@ -79,8 +79,8 @@ enum ToolbarButton
 {
        LEFT_BUTTON = 0,
        RIGHT_BUTTON,
-       BACK_BUTTON,
        MIDDLE_BUTTON,
+       BACK_BUTTON,
        OPTION_BUTTON,
        BUTTON_MAX
 };