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)
{
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();
break;
case 4:
- text = L"";
+ text = L" ";
break;
default:
if (settingInfo[effectiveIndex].itemType == ITEM_TYPE_TOGGLE)
{
SettingToggleCustomItem* pItem = new(std::nothrow) SettingToggleCustomItem();
- r = pItem->Construct(itemWidth, 112);
+ r = pItem->Construct(itemWidth, 112 + (__fontSize - 44));
if (IsFailed(r))
{
delete pItem;
}
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
{
- pItem->Construct(itemWidth, 112);
+ __pList->SetItemEnabled(groupIndex,itemIndex,true);
+ pItem->Construct(itemWidth, 112 + (__fontSize - 44));
}
/*
Bitmap* pNormalBackgroundBitmap = CommonUtil::GetNinepatchedBitmapN(IDB_LIST_GROUP_BG9,itemWidth,112);
//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;
{
DefaultCustomItem* pItem = new(std::nothrow) DefaultCustomItem();
- r = pItem->Construct(itemWidth, 112);
+ r = pItem->Construct(itemWidth, 112 + (__fontSize - 44));
if (IsFailed(r))
{
delete 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)
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)
{