Fixed Nabi issues N_SE-49218, N_SE-49706
authorrahul dutt <rahul.dutt@samsung.com>
Wed, 28 Aug 2013 21:33:58 +0000 (03:03 +0530)
committerrahul dutt <rahul.dutt@samsung.com>
Wed, 28 Aug 2013 21:33:58 +0000 (03:03 +0530)
Change-Id: I032db04c2c945dc016686a72966c621627a235f4

inc/IntMainForm.h
src/IntBookmarkListForm.cpp
src/IntHistoryListForm.cpp
src/IntMainForm.cpp

index 2ca197c..60e22d7 100644 (file)
@@ -224,7 +224,7 @@ public:
        virtual void OnWebPageBlockSelected(Tizen::Web::Controls::Web& source, Tizen::Graphics::FloatPoint& startPoint, Tizen::Graphics::FloatPoint& endPoint);
        virtual void OnWebPageShowRequested(Tizen::Web::Controls::Web& source);
        virtual Tizen::Web::Controls::Web* OnWebWindowCreateRequested(void);
-       virtual void OnWebWindowCloseRequested(Tizen::Web::Controls::Web& source) {AppLog("acdaqsc");}
+       virtual void OnWebWindowCloseRequested(Tizen::Web::Controls::Web& source);
 
        //IWebKeypadEventListener
        virtual void OnWebKeypadClosed(Tizen::Web::Controls::Web& source);
index 3f5b29a..8d92657 100644 (file)
@@ -1184,7 +1184,6 @@ BookmarkListForm::OnOrientationChanged (const Tizen::Ui::Control &source, Tizen:
                {
                        __pListview->SetBounds(__pListview->GetX(),0,GetClientAreaBounds().width ,GetClientAreaBounds().height);
                }
-               __pListview->UpdateList();
        }
 
        if (__pSearchListView && __pListview)
index fdd1a01..58cf0ae 100644 (file)
@@ -1241,8 +1241,6 @@ HistoryListForm::OnOrientationChanged(const Control& source, OrientationStatus o
                {
                        return;
                }
-               __pGroupedListView->UpdateList();
-
                if (__pSearchListView != null)
                {
                        r = __pSearchListView->SetBounds(Rectangle(0,  0, GetClientAreaBounds().width, __pGroupedListView->GetHeight()));
index 406a99c..5cc4010 100644 (file)
@@ -4104,6 +4104,97 @@ MainForm::OnWebWindowCreateRequested(void)
        return pNewWindowInfo->pCurrentWeb;
 }
 
+void MainForm::OnWebWindowCloseRequested(Tizen::Web::Controls::Web& source)
+{
+       AppLog("OnWebWindowCloseRequested");
+       ArrayList* pAllWindowList = MultipleWindowPresentationModel::GetInstance()->GetAllWindowArrayList();
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       WindowInfo* pWindowInfo = null;
+       WindowInfo* pNewWindowInfo = null;
+       int totalCount = 0;
+       UiApp* pApp = null;
+       result r = E_FAILURE;
+
+       if (pAllWindowList != null)
+       {
+               totalCount = pAllWindowList->GetCount();
+       }
+
+       for (int count = 0; count < totalCount; count++)
+       {
+               pWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(count));
+               if (pSceneManager != null && pWindowInfo != null && pSceneManager->GetCurrentSceneId() == pWindowInfo->sceneID)
+               {
+                       r = SceneRegister::DestroyAndUnRegisterScene(pWindowInfo->sceneID);
+                       if (IsFailed(r))
+                       {
+                               AppLogException("OnActionPerformed failed with %s", GetErrorMessage(r));
+                               return;
+                       }
+
+                       r = pAllWindowList->RemoveAt(count, true);
+
+                       if(count > 0)
+                       {
+                               pNewWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(count - 1));
+                       }
+                       else if(pAllWindowList->GetCount() > 0)
+                       {
+                               pNewWindowInfo = dynamic_cast< WindowInfo* >(pAllWindowList->GetAt(pAllWindowList->GetCount() - 1));
+                       }
+                       else
+                       {
+                               WindowInfo* pNewWindowInfo = MultipleWindowPresentationModel::GetInstance()->CreateNewMainViewSceneN();
+
+                               if (pNewWindowInfo == null)
+                               {
+                                       return;
+                               }
+                               result r = E_SUCCESS;
+                               SceneManager* pSceneManager = SceneManager::GetInstance();
+                               if (pSceneManager == NULL)
+                               {
+                                       return;
+                               }
+                               ArrayList* pArgList = new(std::nothrow) ArrayList();
+                               if (pArgList == NULL)
+                               {
+                                       return;
+                               }
+                               r = pArgList->Construct();
+                               if (r == E_SUCCESS)
+                               {
+                                       pArgList->Add(*pNewWindowInfo);
+                                       result r = pSceneManager->GoForward(ForwardSceneTransition(pNewWindowInfo->sceneID, SCENE_TRANSITION_ANIMATION_TYPE_NONE),pArgList);
+                                       if (pArgList != null)
+                                       {
+                                               delete pArgList;
+                                               pArgList = null;
+                                       }
+                                       if(IsFailed(r))
+                                       {
+                                               AppLogDebug("MultipleWindowForm::OnActionPerformed GoForward failed %s",GetErrorMessage(r));
+                                               return;
+                                       }
+                               }
+
+                               pApp = UiApp::GetInstance();
+                               if (pApp != null)
+                               {
+                                       r = pApp->GetFrameAt(0)->SetShowMode(FRAME_SHOW_MODE_MINIMIZED);
+                                       return;
+                               }
+
+                       }
+                       r = pSceneManager->GoForward(ForwardSceneTransition(pNewWindowInfo->sceneID ,SCENE_TRANSITION_ANIMATION_TYPE_NONE,SCENE_HISTORY_OPTION_ADD_HISTORY,SCENE_DESTROY_OPTION_DESTROY));
+
+                       __pWindowInfo = null;
+                       break;
+               }
+       }
+
+}
+
 void
 MainForm::RelayoutControls(bool showAddressbar,bool relayoutFooter)
 {