From 47dd896212ba7711ff69e33701f1b2d1c929d918 Mon Sep 17 00:00:00 2001 From: Vinay Sachdeva Date: Wed, 3 Jul 2013 23:15:23 +0530 Subject: [PATCH] Fixed Nabi Issues, Crash fix while back from Multiwindow Change-Id: I742242aeae051c609f3fd01139d0a5527737b087 Signed-off-by: Vinay Sachdeva --- inc/IntMainForm.h | 2 +- src/IntAddressbar.cpp | 9 +++++---- src/IntMainForm.cpp | 26 +++++++++++--------------- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/inc/IntMainForm.h b/inc/IntMainForm.h index 5657e70..dcfed1e 100644 --- a/inc/IntMainForm.h +++ b/inc/IntMainForm.h @@ -330,7 +330,7 @@ private: bool __isLoadingData; bool __isLoadingCompleted; - //bool __isLongPressedDone; + bool __isLongPressedDone; bool __isWebKeypadOpened; int __progressPercentage; diff --git a/src/IntAddressbar.cpp b/src/IntAddressbar.cpp index 0dff6d6..b80c451 100644 --- a/src/IntAddressbar.cpp +++ b/src/IntAddressbar.cpp @@ -552,11 +552,12 @@ Addressbar::OnKeypadWillOpen(Tizen::Ui::Control& source) void Addressbar::OnKeypadBoundsChanged(Tizen::Ui::Control &source) { - AppLog("Coming here"); + AppLog("XYZ::KeypadBoundsChanged"); + if(__pListener != null) - { - __pListener->OnAddressBarKeypadBoundsChanged(*this); - } + { + __pListener->OnAddressBarKeypadBoundsChanged(*this); + } } void diff --git a/src/IntMainForm.cpp b/src/IntMainForm.cpp index 611f135..6df4949 100644 --- a/src/IntMainForm.cpp +++ b/src/IntMainForm.cpp @@ -146,7 +146,7 @@ static const int HEIGHT_CONTEXT_MENU_BUTTON = 72; MainForm::MainForm(void) { - //__isLongPressedDone = false; + __isLongPressedDone = false; __pHistory = null; __pAddressbar = null; // __pMostVisitedSitesPanel = null; @@ -2745,11 +2745,10 @@ MainForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, MultipleWindowPresentationModel::GetInstance()->GetValue(SELECTED_SCENE_ID, &pValue); pSelectedScene = (String*) pValue; - // removed because some times crash is happening here - /*if (pSelectedScene != null) + if (pSelectedScene != null) { delete pSelectedScene; - }*/ + } MultipleWindowPresentationModel::GetInstance()->SetValue(SELECTED_SCENE_ID, null); String* selectedSceneID = new(std::nothrow) String(currentSceneId); AppLogDebug("current scene id is %ls", currentSceneId.GetPointer()); @@ -2775,12 +2774,6 @@ MainForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, __pWindowInfo = dynamic_cast< WindowInfo* >(pArgs->GetAt(0)); } - if (selectedSceneID) - { - delete selectedSceneID; - selectedSceneID = null; - } - InitFooter(); InitAddressbar(); @@ -3417,6 +3410,7 @@ MainForm::OnFocusGained(const Tizen::Ui::Control& source) if(__pAddressbar) { __pAddressbar->SetShowState(true); + __pAddressbar->SetAddressbarURLFocus(); } RelayoutControls(false); } @@ -3976,6 +3970,8 @@ MainForm::OnWebDataReceived(const Tizen::Base::String& mime, void MainForm::OnWebPageBlockSelected(Web& source, FloatPoint& startPoint, FloatPoint& endPoint) { + if(__isLongPressedDone == false) + return; AppLog("MainForm::OnWebPageBlockSelected"); if (__pHitElementResult != null) { @@ -4566,7 +4562,7 @@ void MainForm::OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen: - //__isLongPressedDone = true; + __isLongPressedDone = true; result r =__pWebViewer->SetBlockSelectionPosition(currentPosition); if (((tagName.CompareTo(L"INPUT") == 0) || tagName.CompareTo(L"TEXTAREA") == 0) && innerHtml.GetLength() == 0 /*&& __isWebKeypadOpened == true*/ && __currentSelectedStr.CompareTo(L"") == 0 && r == E_INVALID_ARG) { @@ -4742,8 +4738,8 @@ MainForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen::Ui::Ori } - if(__pOptionMenu != null) - __pOptionMenu->SetShowState(false); +// if(__pOptionMenu != null) +// __pOptionMenu->SetShowState(false); if( GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE) { @@ -5031,7 +5027,7 @@ MainForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics AppLog("MainForm::OnTouchPressed %d",__pFindWordControl->GetShowState()); // ShowFindWordPanel(__pFindWordControl->GetShowState(), true); } - //__isLongPressedDone = false; + __isLongPressedDone = false; @@ -5100,7 +5096,7 @@ void MainForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) { // __currentWordIndex = 0; - //__isLongPressedDone = false; + __isLongPressedDone = false; } -- 2.7.4