using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
using namespace Tizen::Graphics;
+using namespace Tizen::System;
using namespace Tizen::Ui;
using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Scenes;
+
SettingForm::SettingForm(void)
-: __fontValue(0),__pResetPopup(null),__pWindowInfo(null) , __pConfirmationPopup(null)
+: __fontValue(0),__pResetPopup(null),__pWindowInfo(null) , __pConfirmationPopup(null),__pNotification(null)
{
__currentURL = L"";
__pList = null;
settingInfo[SETTING_RUN_JAVASCRIPT].itemType = ITEM_TYPE_TOGGLE;
settingInfo[SETTING_RUN_JAVASCRIPT].isSelected = SettingPresentationModel::GetInstance()->IsRunJavascriptEnabled();
- settingInfo[SETTING_DISPLAY_IMAGES].titleText = CommonUtil::GetString(L"IDS_BR_BODY_SHOW_IMAGES");
+ settingInfo[SETTING_DISPLAY_IMAGES].titleText = CommonUtil::GetString(L"IDS_BR_OPT_LOAD_IMAGES");
settingInfo[SETTING_DISPLAY_IMAGES].subText = L"";
settingInfo[SETTING_DISPLAY_IMAGES].itemType = ITEM_TYPE_TOGGLE;
settingInfo[SETTING_DISPLAY_IMAGES].isSelected = SettingPresentationModel::GetInstance()->IsDisplayImagesEnabled();
settingInfo[SETTING_SEARCH_ENGINE_NAVER].itemType = ITEM_TYPE_RADIO;
settingInfo[SETTING_SEARCH_ENGINE_NAVER].isSelected = !(String::Compare(settingInfo[SETTING_SEARCH_ENGINE_NAVER].titleText, settingInfo[SETTING_SEARCH_ENGINE_TITLE].subText));
- settingInfo[SETTING_SEARCH_ENGINE_GOOGLE].titleText = CommonUtil::GetString(L"IDS_COM_BODY_GOOGLE");
+ settingInfo[SETTING_SEARCH_ENGINE_GOOGLE].titleText = L"Google";//CommonUtil::GetString(L"IDS_COM_BODY_GOOGLE");
settingInfo[SETTING_SEARCH_ENGINE_GOOGLE].subText = L"";
settingInfo[SETTING_SEARCH_ENGINE_GOOGLE].itemType = ITEM_TYPE_RADIO;
settingInfo[SETTING_SEARCH_ENGINE_GOOGLE].isSelected = !(String::Compare(settingInfo[SETTING_SEARCH_ENGINE_GOOGLE].titleText, settingInfo[SETTING_SEARCH_ENGINE_TITLE].subText));
SceneManager* pSceneManager = NULL;
__fontSize = CommonUtil::GetFontSize();
- InternetApp* pInternet = static_cast<InternetApp*> (Application::GetInstance());
bool isHwKeySupported = false;
- if(pInternet)
- {
- isHwKeySupported = pInternet->IsHwBackKeyExists();
- }
- if(isHwKeySupported)
- {
- SetFormStyle(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR);
- }
+ //SetFormStyle(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR);
__pList = static_cast< GroupedListView* >(GetControl(L"IDC_SETTING_LIST"));
if ( __pList != NULL )
{
__pList->AddGroupedListViewItemEventListener(*this);
}
- pFooter = GetFooter();
- if (pFooter)
- {
- AppLogDebug("setting back button");
- pFooter->SetBackButtonEnabled(true);
- }
+// pFooter = GetFooter();
+// if (pFooter)
+// {
+// AppLogDebug("setting back button");
+// pFooter->SetBackButtonEnabled(true);
+// }
SetFormBackEventListener(this);
AppLog("SetFormBackEventListener result %s",GetErrorMessage(GetLastResult()));
pSceneManager = SceneManager::GetInstance();
else
break;
}
+/*
+ listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
+ for(int iter = 0; iter < settingInfo[effectiveIndex].childCount; iter++)
+ {
+ listView.RefreshList(groupIndex, itemIndex + iter + 1, LIST_REFRESH_TYPE_ITEM_MODIFY);
+ }
+*/
listView.UpdateList();
}
else
{
settingInfo[effectiveIndex].isOpen = false;
+/*
+ listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
+ for(int iter = 0; iter < settingInfo[effectiveIndex].childCount; iter++)
+ {
+ listView.RefreshList(groupIndex, itemIndex + iter + 1, LIST_REFRESH_TYPE_ITEM_MODIFY);
+ }
+*/
listView.UpdateList();
}
}
}
settingInfo[parentIndex].subText = settingInfo[effectiveIndex].titleText;
+// listView.RefreshList(groupIndex, itemIndex - (effectiveIndex - parentIndex), LIST_REFRESH_TYPE_ITEM_MODIFY);
+// listView.RefreshList(groupIndex, parentIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
for (int iter = 0; iter < settingInfo[parentIndex].childCount; iter++)
{
if (parentIndex + iter + 1 != effectiveIndex)
settingInfo[SETTING_CURRENT_PAGE].isSelected = false;
settingInfo[SETTING_FAVORITE_URL].isSelected = true;
}
- //listView.RefreshList(groupIndex, itemIndex - (effectiveIndex - parentIndex) + iter + 1, LIST_REFRESH_TYPE_ITEM_MODIFY);
+// listView.RefreshList(groupIndex, itemIndex - (effectiveIndex - parentIndex) + iter + 1, LIST_REFRESH_TYPE_ITEM_MODIFY);
}
// listView.UpdateList();
//listView.ScrollToItem(groupIndex, itemIndex, LIST_SCROLL_ITEM_ALIGNMENT_TOP);
SettingPresentationModel::GetInstance()->SetFavoriteValue(__currentURL);
settingInfo[SETTING_FAVORITE_URL].titleText = __currentURL;
// listView.RefreshList(groupIndex, effectiveIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
+// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
listView.UpdateList();
}
break;
//SettingPresentationModel::GetInstance()->SetHomepage(settingInfo[SETTING_BLANK_PAGE].titleText);
SettingPresentationModel::GetInstance()->SetHomepage((L"IDS_BR_BODY_BLANK_PAGE"));
AppLog("GetHomepage() %ls",SettingPresentationModel::GetInstance()->GetHomepage().GetPointer());
+// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
listView.UpdateList();
break;
case SETTING_MOST_VISITED_SITE:
SettingPresentationModel::GetInstance()->SetHomepage(L"IDS_BR_BODY_MOST_VISITED_SITES");
+// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
listView.UpdateList();
break;
case SETTING_FIT_TO_WIDTH:
SettingPresentationModel::GetInstance()->SetDefaultView(L"IDS_BR_BODY_FIT_TO_WIDTH");
+// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
listView.UpdateList();
break;
case SETTING_READABLE:
SettingPresentationModel::GetInstance()->SetDefaultView(L"IDS_BR_BODY_READABLE");
+// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
listView.UpdateList();
break;
case SETTING_SEARCH_ENGINE_YAHOO:
SettingPresentationModel::GetInstance()->SetSearchEngine(settingInfo[SETTING_SEARCH_ENGINE_YAHOO].titleText);
+// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
listView.UpdateList();
break;
case SETTING_SEARCH_ENGINE_NAVER:
SettingPresentationModel::GetInstance()->SetSearchEngine(settingInfo[SETTING_SEARCH_ENGINE_NAVER].titleText);
+// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
listView.UpdateList();
break;
case SETTING_SEARCH_ENGINE_GOOGLE:
SettingPresentationModel::GetInstance()->SetSearchEngine(settingInfo[SETTING_SEARCH_ENGINE_GOOGLE].titleText);
+// listView.RefreshList(groupIndex, itemIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
listView.UpdateList();
break;
{
return null;
}
- r = pItem->Construct(Dimension(itemWidth, 46));
+ r = pItem->Construct(Dimension(itemWidth, 76));
if (IsFailed(r))
{
delete pItem;
break;
case 4:
- text = L"";
+ text = L" ";
break;
default:
}
else if (settingInfo[effectiveIndex].itemType == ITEM_TYPE_RADIO)
{
-
-
RadioCustomItem* pItem = new(std::nothrow) RadioCustomItem();
int parentIndex = 0;
for (parentIndex = effectiveIndex; parentIndex > SETTING_INVALID; parentIndex--)
if (settingInfo[parentIndex].isOpen == false || (__isCurrentPageDisable == true && groupIndex == 0 && itemIndex == 1))
{
r = pItem->Construct(itemWidth, 0);
+ __pList->SetItemEnabled(groupIndex,itemIndex,false);
AppLogDebug("construct with height 0 %s", GetErrorMessage(r));
return pItem;
}
else
{
+ __pList->SetItemEnabled(groupIndex,itemIndex,true);
pItem->Construct(itemWidth, 112 + (__fontSize - 44));
}
/*
//if (pBitmap != null)
// pItem->AddElement(Rectangle(0, 0, 10, 112), IDA_LIST_LEFT_SIDE_MARGIN, *pBitmap, null);
- pItem->SetSelected(settingInfo[effectiveIndex].isSelected);
+// pItem->SetSelected(settingInfo[effectiveIndex].isSelected);
+ __pList->SetItemChecked(groupIndex,itemIndex,settingInfo[effectiveIndex].isSelected);
pItem->Make();
return pItem;
pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL,ITEM_BACKGROUND_COLOR);
pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_PRESSED,ITEM_BACKGROUND_COLOR_HIGHLIGHTED);
+
pItem->SetText(settingInfo[effectiveIndex].titleText);
//if (pBitmap != null)
delete __pConfirmationPopup;
__pConfirmationPopup = null;
- NotificationPanel* pNotification = new (std::nothrow) NotificationPanel(*this);
- pNotification->SetText(message);
- pNotification->SetPositionDiff(0);
- pNotification->ShowNotification();
+ if (__pNotification != null)
+ {
+ RemoveControl(__pNotification);
+ __pNotification = null;
+ }
+ __pNotification = new (std::nothrow) NotificationPanel(*this);
+
+ //NotificationPanel* pNotification = new (std::nothrow) NotificationPanel(*this);
+ __pNotification->SetText(message);
+ __pNotification->SetPositionDiff(0);
+ __pNotification->ShowNotification();
}
break;
SettingForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
{
Rectangle rect = GetClientAreaBounds();
- if(__pList == null)
+
+ if (__pNotification != null && __pNotification->GetShowState() == true)
+ {
+ __pNotification->OrientationChanged();
+ }
+
+ if (__pList == null)
{
return;
}
__pList->SetBounds(rect.x,rect.y,rect.width-16,rect.height);
- __pList->UpdateList();
+// __pList->UpdateList();//removed for issue 53768
}
SettingForm::SettingItemInfo::SettingItemInfo(void)
{
__isCurrentPageDisable = false;
AppLog("set item enabled is true");
- __pList->SetItemEnabled(0, 1, true);
+ if (settingInfo[0].isOpen == false)
+ {
+ __pList->SetItemEnabled(0,1,false);
+ }
+ else
+ {
+ __pList->SetItemEnabled(0,1,true);
+ }
}
for(int grpindex = 0; grpindex < groupCount; grpindex++)
{
void
SettingForm::ClearHistory(void)
{
+ if(__pConfirmationPopup)
+ {
+ __pConfirmationPopup->SetShowState(false);
+ __pConfirmationPopup->Show();
+ delete __pConfirmationPopup;
+ __pConfirmationPopup = null;
+ }
String message = CommonUtil::GetString(L"IDS_BR_BODY_DELETE_BROWSER_HISTORY_Q");
if(!__pConfirmationPopup)
{
void
SettingForm::ClearCache(void)
{
+ if(__pConfirmationPopup)
+ {
+ __pConfirmationPopup->SetShowState(false);
+ __pConfirmationPopup->Show();
+ delete __pConfirmationPopup;
+ __pConfirmationPopup = null;
+ }
String message = CommonUtil::GetString(L"IDS_BR_POP_DELETE_LOCALLY_CACHED_CONTENT_AND_DATABASES_Q");
if(!__pConfirmationPopup)
{
void
SettingForm::ClearCookie(void)
{
+ if(__pConfirmationPopup)
+ {
+ __pConfirmationPopup->SetShowState(false);
+ __pConfirmationPopup->Show();
+ delete __pConfirmationPopup;
+ __pConfirmationPopup = null;
+ }
String message = CommonUtil::GetString(L"IDS_BR_POP_EMPTY_COOKIE_POPUP_BNO");
if(!__pConfirmationPopup)
{
void
SettingForm::ClearFormData(void)
{
+ if(__pConfirmationPopup)
+ {
+ __pConfirmationPopup->SetShowState(false);
+ __pConfirmationPopup->Show();
+ delete __pConfirmationPopup;
+ __pConfirmationPopup = null;
+ }
String message = CommonUtil::GetString(L"IDS_BR_POP_DELETE_ALL_SAVED_FORM_DATA_Q");
if(!__pConfirmationPopup)
{
void
SettingForm::ClearPasswords(void)
{
+ if(__pConfirmationPopup)
+ {
+ __pConfirmationPopup->SetShowState(false);
+ __pConfirmationPopup->Show();
+ delete __pConfirmationPopup;
+ __pConfirmationPopup = null;
+ }
String message = CommonUtil::GetString(L"IDS_BR_POP_DELETE_ALL_SAVED_PASSWORDS_Q");
if(!__pConfirmationPopup)
{
void
SettingForm::ResetToDefault()
{
+ if(__pConfirmationPopup)
+ {
+ __pConfirmationPopup->SetShowState(false);
+ __pConfirmationPopup->Show();
+ delete __pConfirmationPopup;
+ __pConfirmationPopup = null;
+ }
String message = CommonUtil::GetString(L"IDS_BR_POP_ALL_SETTINGS_TO_DEFAULT_CONTINUE_Q");
if(!__pConfirmationPopup)
{
__pConfirmationPopup->Show();
}
}
+
+void
+SettingForm::OnUserEventReceivedN (RequestId requestId, Tizen::Base::Collection::IList *pArgs)
+{
+ AppLog("receiving userevent for appcontrol %d",requestId);
+ if (requestId == APPCONTROL_LAUNCH_MAX_LIMIT_REACHED)
+ {
+ AppLog("receiving userevent for appcontrol %d ",requestId);
+ if(__pConfirmationPopup)
+ {
+ __pConfirmationPopup->SetShowState(false);
+ delete __pConfirmationPopup;
+ __pConfirmationPopup = null;
+ }
+ }
+}