From 5cf3dec50043710ab19912065365659cbb4d365b Mon Sep 17 00:00:00 2001 From: Vinay Sachdeva Date: Tue, 29 Oct 2013 03:59:20 +0530 Subject: [PATCH] Fixed Nabi Issues 56486,56530,56525,56503,56498 Change-Id: Ic782f1c4a37377cef05660cf21743d54f65c6e4f Signed-off-by: Vinay Sachdeva --- src/IntAddBookmarkForm.cpp | 2 +- src/IntBrightnessForm.cpp | 5 ++++- src/IntEditHomePageForm.cpp | 2 +- src/IntInternetApp.cpp | 12 +++++++++--- src/IntMainForm.cpp | 10 ++++++++-- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/IntAddBookmarkForm.cpp b/src/IntAddBookmarkForm.cpp index bbf4968..d9c97db 100644 --- a/src/IntAddBookmarkForm.cpp +++ b/src/IntAddBookmarkForm.cpp @@ -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); } diff --git a/src/IntBrightnessForm.cpp b/src/IntBrightnessForm.cpp index 85cfa3f..c382e3e 100644 --- a/src/IntBrightnessForm.cpp +++ b/src/IntBrightnessForm.cpp @@ -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); } } diff --git a/src/IntEditHomePageForm.cpp b/src/IntEditHomePageForm.cpp index 800e50f..3d528b3 100644 --- a/src/IntEditHomePageForm.cpp +++ b/src/IntEditHomePageForm.cpp @@ -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); } diff --git a/src/IntInternetApp.cpp b/src/IntInternetApp.cpp index 2e3fb39..cfa318a 100644 --- a/src/IntInternetApp.cpp +++ b/src/IntInternetApp.cpp @@ -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(); } diff --git a/src/IntMainForm.cpp b/src/IntMainForm.cpp index f2f7e11..45839cc 100644 --- a/src/IntMainForm.cpp +++ b/src/IntMainForm.cpp @@ -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; } -- 2.7.4