Fixed Nabi Issues, Crash fix while back from Multiwindow
authorVinay Sachdeva <v.sachdeva@samsung.com>
Wed, 3 Jul 2013 17:45:23 +0000 (23:15 +0530)
committerVinay Sachdeva <v.sachdeva@samsung.com>
Wed, 3 Jul 2013 17:45:23 +0000 (23:15 +0530)
Change-Id: I742242aeae051c609f3fd01139d0a5527737b087
Signed-off-by: Vinay Sachdeva <v.sachdeva@samsung.com>
inc/IntMainForm.h
src/IntAddressbar.cpp
src/IntMainForm.cpp

index 5657e70..dcfed1e 100644 (file)
@@ -330,7 +330,7 @@ private:
 
        bool __isLoadingData;
        bool __isLoadingCompleted;
-       //bool __isLongPressedDone;
+       bool __isLongPressedDone;
        bool __isWebKeypadOpened;
        int __progressPercentage;
 
index 0dff6d6..b80c451 100644 (file)
@@ -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
index 611f135..6df4949 100644 (file)
@@ -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;
 
 }