From 1de2be8cf1a57efdf91b73d82c54878fc4faeb60 Mon Sep 17 00:00:00 2001 From: rahul dutt Date: Thu, 29 Aug 2013 03:03:58 +0530 Subject: [PATCH] Fixed Nabi issues N_SE-49218, N_SE-49706 Change-Id: I032db04c2c945dc016686a72966c621627a235f4 --- inc/IntMainForm.h | 2 +- src/IntBookmarkListForm.cpp | 1 - src/IntHistoryListForm.cpp | 2 - src/IntMainForm.cpp | 91 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 4 deletions(-) diff --git a/inc/IntMainForm.h b/inc/IntMainForm.h index 2ca197c..60e22d7 100644 --- a/inc/IntMainForm.h +++ b/inc/IntMainForm.h @@ -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); diff --git a/src/IntBookmarkListForm.cpp b/src/IntBookmarkListForm.cpp index 3f5b29a..8d92657 100644 --- a/src/IntBookmarkListForm.cpp +++ b/src/IntBookmarkListForm.cpp @@ -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) diff --git a/src/IntHistoryListForm.cpp b/src/IntHistoryListForm.cpp index fdd1a01..58cf0ae 100644 --- a/src/IntHistoryListForm.cpp +++ b/src/IntHistoryListForm.cpp @@ -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())); diff --git a/src/IntMainForm.cpp b/src/IntMainForm.cpp index 406a99c..5cc4010 100644 --- a/src/IntMainForm.cpp +++ b/src/IntMainForm.cpp @@ -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) { -- 2.7.4