Fixed Nabi Issues N_SE-56606,N_SE-56568
authorVinay Sachdeva <v.sachdeva@samsung.com>
Tue, 29 Oct 2013 22:45:55 +0000 (04:15 +0530)
committerVinay Sachdeva <v.sachdeva@samsung.com>
Tue, 29 Oct 2013 22:45:55 +0000 (04:15 +0530)
Change-Id: I221a1bd9ea9df0253128875d4b512ae2a1138b18
Signed-off-by: Vinay Sachdeva <v.sachdeva@samsung.com>
src/IntAddBookmarkForm.cpp
src/IntMainForm.cpp
src/IntSharePopup.cpp

index d9c97db..bb5f785 100644 (file)
@@ -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));
index 45839cc..167720c 100644 (file)
@@ -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);
index c694d9a..d969776 100644 (file)
@@ -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;
    }