Remove context menu - Back key pressed
authorHyukSoon Choi <hs619.choi@samsung.com>
Fri, 28 Jun 2013 04:37:21 +0000 (13:37 +0900)
committerHyukSoon Choi <hs619.choi@samsung.com>
Fri, 28 Jun 2013 04:37:21 +0000 (13:37 +0900)
Change-Id: I2bf72c6977f2ba66640404380158ca9b97ab77cd
Signed-off-by: HyukSoon Choi <hs619.choi@samsung.com>
inc/VpVideoPlayerForm.h
src/VpVideoPlayerForm.cpp

index b3f1c7e..3e18076 100755 (executable)
@@ -183,7 +183,7 @@ private:
        Tizen::Ui::Controls::Label* __pCurrenTimeLabel;
        Tizen::Ui::Controls::Label* __pTotalTimeLabel;
        Tizen::Ui::Controls::Slider* __pSlider;
-       Tizen::Ui::Controls::ContextMenu* __pContextMenuShare;
+       Tizen::Ui::Controls::ContextMenu* __pShareContextMenu;
        bool __actionTouchLongPressed;
        bool __setPauseState;
        bool __isControlVisibleState;
index db970c0..fbb5fab 100644 (file)
@@ -99,7 +99,7 @@ VideoPlayerForm::VideoPlayerForm(void)
        , __pCurrenTimeLabel(null)
        , __pTotalTimeLabel(null)
        , __pSlider(null)
-       , __pContextMenuShare(null)
+       , __pShareContextMenu(null)
        , __actionTouchLongPressed(false)
        , __setPauseState(false)
        , __isControlVisibleState(true)
@@ -518,8 +518,8 @@ VideoPlayerForm::OnTerminating(void)
        delete __pSoundPathPopup;
        __pSoundPathPopup = null;
 
-       delete __pContextMenuShare;
-       __pContextMenuShare = null;
+       delete __pShareContextMenu;
+       __pShareContextMenu = null;
 
        return E_SUCCESS;
 }
@@ -953,24 +953,25 @@ VideoPlayerForm::OnActionPerformed(const Control& source, int actionId)
                                        + (__pShareButton->GetBounds().width / DIVIDE_BY_TWO)),
                                        __pFunctionPanel->GetBounds().y + __pFunctionPanel->GetBounds().height);
 
-                       if (__pContextMenuShare != null)
+                       if (__pShareContextMenu != null)
                        {
-                               delete __pContextMenuShare;
-                               __pContextMenuShare = null;
+                               delete __pShareContextMenu;
+                               __pShareContextMenu = null;
                        }
 
-                       __pContextMenuShare = new (std::nothrow) ContextMenu();
-                       r = __pContextMenuShare->Construct(point, CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD);
-                       TryReturnVoid(r == E_SUCCESS, "__pContextMenuShare->Construct() failed:%s", GetErrorMessage(r));
+                       __pShareContextMenu = new (std::nothrow) ContextMenu();
+                       r = __pShareContextMenu->Construct(point, CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_DOWNWARD);
+                       TryReturnVoid(r == E_SUCCESS, "__pShareContextMenu->Construct() failed:%s", GetErrorMessage(r));
 
                        String str;
                        Application::GetInstance()->GetAppResource()->GetString(L"IDS_COM_BODY_MESSAGE", str);
-                       __pContextMenuShare->AddItem(str, IDA_CONTEXTMENU_MESSAGE);
+                       __pShareContextMenu->AddItem(str, IDA_CONTEXTMENU_MESSAGE);
                        Application::GetInstance()->GetAppResource()->GetString(L"IDS_COM_BODY_EMAIL", str);
-                       __pContextMenuShare->AddItem(str, IDA_CONTEXTMENU_EMAIL);
-                       __pContextMenuShare->AddActionEventListener(*this);
-                       __pContextMenuShare->SetShowState(true);
-                       __pContextMenuShare->Show();
+                       __pShareContextMenu->AddItem(str, IDA_CONTEXTMENU_EMAIL);
+                       __pShareContextMenu->SetFocusable(true);
+                       __pShareContextMenu->AddActionEventListener(*this);
+                       __pShareContextMenu->SetShowState(true);
+                       __pShareContextMenu->Show();
 
                        if (playState == PLAYER_STATE_PLAYING)
                        {
@@ -1526,11 +1527,11 @@ VideoPlayerForm::ShowControl(bool setShow)
                __pFunctionPanel->SetShowState(false);
                __pControllerPanel->SetShowState(false);
 
-               if (__pContextMenuShare != null)
+               if (__pShareContextMenu != null)
                {
-                       if (__pContextMenuShare->GetShowState() == true)
+                       if (__pShareContextMenu->GetShowState() == true)
                        {
-                               __pContextMenuShare->SetShowState(false);
+                               __pShareContextMenu->SetShowState(false);
                        }
                }