From b3b5a171f88ebbcffc6b113eb08c7ccd49dc203b Mon Sep 17 00:00:00 2001 From: Vinay Sachdeva Date: Wed, 30 Oct 2013 04:15:55 +0530 Subject: [PATCH] Fixed Nabi Issues N_SE-56606,N_SE-56568 Change-Id: I221a1bd9ea9df0253128875d4b512ae2a1138b18 Signed-off-by: Vinay Sachdeva --- src/IntAddBookmarkForm.cpp | 27 +++++++++++++++++++++++++++ src/IntMainForm.cpp | 25 ++++++++++++++++++++++++- src/IntSharePopup.cpp | 1 + 3 files changed, 52 insertions(+), 1 deletion(-) diff --git a/src/IntAddBookmarkForm.cpp b/src/IntAddBookmarkForm.cpp index d9c97db..bb5f785 100644 --- a/src/IntAddBookmarkForm.cpp +++ b/src/IntAddBookmarkForm.cpp @@ -312,6 +312,33 @@ AddBookmarkForm::OnActionPerformed(const Control& source, int actionId) urlWithSlash.Append(L"/"); } + if(urlWithSlash.Contains("http://") == true) + { + urlWithSlash.SubString(7,urlWithSlash.GetLength()-7,urlWithSlash); + } + else if(urlWithSlash.Contains("https://") == true) + { + urlWithSlash.SubString(8,urlWithSlash.GetLength()-8,urlWithSlash); + } + + if(urlWithoutSlash.Contains("http://") == true) + { + urlWithoutSlash.SubString(7,urlWithoutSlash.GetLength()-7,urlWithoutSlash); + } + else if(urlWithoutSlash.Contains("https://") == true) + { + urlWithoutSlash.SubString(8,urlWithoutSlash.GetLength()-8,urlWithoutSlash); + } + + + if((tempUrl.Contains("http://") == true) ) + { + tempUrl.SubString(7,tempUrl.GetLength()-7,tempUrl); + } + else if (tempUrl.Contains("https://") == true) + { + tempUrl.SubString(8,tempUrl.GetLength()-8,tempUrl); + } if (bookMarkID.CompareTo(tempParentId) == 0 && (urlWithSlash.CompareTo(tempUrl) == 0 || urlWithoutSlash.CompareTo(tempUrl) == 0 )&& __pEditFieldTitle->GetText().CompareTo(tempTitle) == 0) { pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT)); diff --git a/src/IntMainForm.cpp b/src/IntMainForm.cpp index 45839cc..167720c 100644 --- a/src/IntMainForm.cpp +++ b/src/IntMainForm.cpp @@ -2197,8 +2197,22 @@ MainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) { String srcUrl = __pHitElementResult->GetAttributeValue(L"src"); AppLog("MainForm::OnTouchLongPressed srcUrl is %ls",srcUrl.GetPointer()); - LoadUrl(srcUrl); + Uri currentUri; + currentUri.SetUri(__pWebViewer->GetUrl()); + + String newUrl; + Uri newUri; + newUri.SetUri(srcUrl); + AppLog("newuri gethost %ls",newUri.GetHost().GetPointer()); + if(newUri.GetHost().GetLength() == 0) + { + newUrl = currentUri.GetHost(); + newUrl.Append(srcUrl); + srcUrl = newUrl; + } + + LoadUrl(srcUrl); } } break; @@ -2969,7 +2983,10 @@ MainForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, RelayoutControls(false); AppLog("ABC: OnSceneActivatedN started exit"); if(__pWebViewer) + { AppLog("WebControl's width height %d %d,",__pWebViewer->GetWidth(),__pWebViewer->GetHeight()); + __pWebViewer->Resume(); + } } @@ -3018,6 +3035,10 @@ MainForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, delete pWebCanvas; if(__pAddressbar) __pAddressbar->SetShowState(false); + if(__pWebViewer) + { + __pWebViewer->Pause(); + } AppLog("Coming here"); } @@ -3470,6 +3491,8 @@ MainForm::LoadUrl(String& url) ret = firstRegex.Match(url, false); // This returns true value flag = secondRegex.Match(url, false); // Checks whether URL typed is of type abc.com (i.e without protocol in front of it) + + if (ret == true && __pWebViewer != null) { SetUrl(url); diff --git a/src/IntSharePopup.cpp b/src/IntSharePopup.cpp index c694d9a..d969776 100644 --- a/src/IntSharePopup.cpp +++ b/src/IntSharePopup.cpp @@ -478,6 +478,7 @@ SharePopup::StartAppControl(int index) if (pControl) { r = pControl->Start(null, null, &extraData, this); + AppLog("AppControl Start %s",GetErrorMessage(r)); // delete pControl; } -- 2.7.4