Fixed Nabi Issues 56486,56530,56525,56503,56498
authorVinay Sachdeva <v.sachdeva@samsung.com>
Mon, 28 Oct 2013 22:29:20 +0000 (03:59 +0530)
committerVinay Sachdeva <v.sachdeva@samsung.com>
Mon, 28 Oct 2013 22:29:20 +0000 (03:59 +0530)
Change-Id: Ic782f1c4a37377cef05660cf21743d54f65c6e4f
Signed-off-by: Vinay Sachdeva <v.sachdeva@samsung.com>
src/IntAddBookmarkForm.cpp
src/IntBrightnessForm.cpp
src/IntEditHomePageForm.cpp
src/IntInternetApp.cpp
src/IntMainForm.cpp

index bbf4968..d9c97db 100644 (file)
@@ -234,7 +234,7 @@ AddBookmarkForm::OnActionPerformed(const Control& source, int actionId)
                else
                {
                        String tempUrl;
-                       if(Url.Contains("http://") == true)
+                       if((Url.Contains("http://") == true) || (Url.Contains("https://") == true))
                        {
                                tempUrl.Append(Url);
                        }
index 85cfa3f..c382e3e 100644 (file)
@@ -347,7 +347,10 @@ BrightnessForm::OnUserEventReceivedN (RequestId requestId, Tizen::Base::Collecti
                String key = L"http://tizen.org/setting/screen.brightness" ;
                int sliderValue = 10;
                SettingInfo::GetValue(key,sliderValue);
-               __pBrightnessSlider->SetValue(sliderValue/10);
+               if( (sliderValue/10) + 1  > 10)
+                       __pBrightnessSlider->SetValue(10);
+               else
+                       __pBrightnessSlider->SetValue((sliderValue/10) + 1);
                __pBrightnessSlider->Invalidate(true);
        }
 }
index 800e50f..3d528b3 100644 (file)
@@ -177,7 +177,7 @@ EditHomePageForm::OnActionPerformed(const Control& source, int actionId)
                        if (flag == true)
                        {
                                String validUrl;
-                               if(urlText.Contains("http://") == true)
+                               if((urlText.Contains("http://") == true) || (urlText.Contains("https://") == true))
                                {
                                        validUrl.Append(urlText);
                                }
index 2e3fb39..cfa318a 100644 (file)
@@ -339,13 +339,16 @@ InternetApp::OnSettingChanged(Tizen::Base::String& key)
        else if (key == L"http://tizen.org/setting/screen.brightness" )
        {
                AppRegistry* pAppRegistry = App::GetInstance()->GetAppRegistry();
-
+               result r = E_SUCCESS;
 
                int sliderValue = 10;
                SettingInfo::GetValue(key,sliderValue);
                String sliderKey("SliderValue");
 
-               result r = pAppRegistry->Set(sliderKey, sliderValue/10);
+               if( (sliderValue/10) + 1  > 10)
+                       r = pAppRegistry->Set(sliderKey, 10);
+               else
+                       r = pAppRegistry->Set(sliderKey, (sliderValue/10) + 1);
                pAppRegistry->Save();
 
                Form* pCurrentForm = null;
@@ -357,7 +360,10 @@ InternetApp::OnSettingChanged(Tizen::Base::String& key)
                        pCurrentForm->SendUserEvent(DEVICE_BRIGHTNESS_CHANGE_EVENT, NULL);
                }
 
-               r = PowerManager::SetScreenBrightness(sliderValue/10);
+               if( (sliderValue/10) + 1  > 10)
+                       r = PowerManager::SetScreenBrightness(10);
+               else
+                       r = PowerManager::SetScreenBrightness((sliderValue/10) + 1);
                //      r = PowerManager::RestoreScreenBrightness();
 
        }
index f2f7e11..45839cc 100644 (file)
@@ -819,6 +819,7 @@ result MainForm::InitImageContextMenu(Tizen::Graphics::Point p)
 {
        result r = E_SUCCESS;
        ContextMenuAnchorDirection direction = CONTEXT_MENU_ANCHOR_DIRECTION_AUTO;
+       String srcUrl = __pHitElementResult->GetAttributeValue(L"src");
 
        AppLog("MainForm::InitImageContextMenu clicked on image");
        if (__pImageMenu != null)
@@ -835,8 +836,12 @@ result MainForm::InitImageContextMenu(Tizen::Graphics::Point p)
        r = __pImageMenu->Construct(p, CONTEXT_MENU_STYLE_LIST, direction);
        TryCatch(!IsFailed(r),, "Context image menu creation failed with%s",GetErrorMessage(r));
 
+
        r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_COPY_IMAGE"),IDA_COPY_IMAGE_CLICKED);
-       r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_VIEW_IMAGE"),IDA_VIEW_IMAGE_CLICKED);
+       AppLog("srcUrl %ls __pWebViewer->GetUrl() %ls",srcUrl.GetPointer(),__pWebViewer->GetUrl().GetPointer());
+
+       if(__pWebViewer && srcUrl.Equals(__pWebViewer->GetUrl(),false) == false)
+               r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_VIEW_IMAGE"),IDA_VIEW_IMAGE_CLICKED);
        r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_SAVE_IMAGE"),IDA_SAVE_IMAGE_CLICKED);
        r = __pImageMenu->AddItem(CommonUtil::GetString(L"IDS_BR_OPT_SHARE"),IDA_SHARE_IMAGE_CLICKED);
        __pImageMenu->SetMaxVisibleItemsCount(4);
@@ -2888,7 +2893,7 @@ MainForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
        {
                InitMostVisitedSitesView(GetOrientationStatus());
        }
-       else if (homePage.CompareTo((L"IDS_BR_BODY_BLANK_PAGE")) == 0)
+       else
        {
                if(__pMostVisitedListView != null)
                {
@@ -5466,6 +5471,7 @@ MainForm::InitMostVisitedSitesView(Tizen::Ui::OrientationStatus orientationStatu
 
        if (__pMostVisitedListView != null)
        {
+               __pMostVisitedListView->SetShowState(true);
                return E_SUCCESS;
        }