From 1d79da42b8f8a5afa2d5c76f3bf233108cd4d378 Mon Sep 17 00:00:00 2001 From: GAURAV JAIN Date: Wed, 4 Dec 2013 19:30:01 +0530 Subject: [PATCH] Code sync with Private branch Change-Id: I536e1f04a1960aca0abdddcded34cf4a0fef4f60 Signed-off-by: GAURAV JAIN --- inc/StBaseForm.h | 1 + inc/StMainMenuForm.h | 2 + inc/StManageApplicationInfoForm.h | 3 ++ inc/StPrivacyForm.h | 1 + inc/StTimeZoneForm.h | 3 ++ manifest.xml | 2 + src/StAppSettingForm.cpp | 5 ++- src/StBaseForm.cpp | 11 ++++++ src/StCertificateUserForm.cpp | 6 +-- src/StDateTimeForm.cpp | 3 +- src/StDisplayForm.cpp | 5 ++- src/StFontForm.cpp | 1 + src/StLocationHelpForm.cpp | 4 +- src/StMainMenuForm.cpp | 18 +++++++++ src/StManageApplicationForm.cpp | 1 + src/StManageApplicationInfoForm.cpp | 74 ++++++++++++++++++++++++++++++++++++- src/StNfcPredefinedItemForm.cpp | 19 +++++++++- src/StPrivacyForm.cpp | 42 +++++++++++---------- src/StRegionForm.cpp | 18 ++++----- src/StTimeZoneForm.cpp | 16 ++++++++ 20 files changed, 192 insertions(+), 43 deletions(-) diff --git a/inc/StBaseForm.h b/inc/StBaseForm.h index 4afd0a2..51ebb4b 100644 --- a/inc/StBaseForm.h +++ b/inc/StBaseForm.h @@ -50,6 +50,7 @@ protected: virtual void CreateTableView(void); virtual void ShowMessageBox(const Tizen::Base::String& title, const Tizen::Base::String& text); virtual void ItemTypeOneLine(Tizen::Graphics::Rectangle& main); + virtual void ItemTypeOneLine(Tizen::Graphics::FloatRectangle& main); virtual void ItemTypeTwoLine(Tizen::Graphics::Rectangle& main, Tizen::Graphics::Rectangle& sub, int fontSize); virtual void ItemTypeIconAndOneLine(Tizen::Graphics::Rectangle& icon, Tizen::Graphics::Rectangle& main); virtual void ItemTypeIconAndTwoLine(Tizen::Graphics::Rectangle& icon, Tizen::Graphics::Rectangle& main, Tizen::Graphics::Rectangle& sub, int fontSize); diff --git a/inc/StMainMenuForm.h b/inc/StMainMenuForm.h index 79f592d..3cbf3fe 100644 --- a/inc/StMainMenuForm.h +++ b/inc/StMainMenuForm.h @@ -41,6 +41,7 @@ private: class MainMenuForm : public BaseForm , public Tizen::Ui::IFocusEventListener + , public Tizen::System::ISettingEventListener { public: MainMenuForm(void); @@ -77,6 +78,7 @@ public: virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs); virtual void OnFocusLost(const Tizen::Ui::Control& source); virtual void OnFocusGained(const Tizen::Ui::Control& source); + virtual void OnSettingChanged(Tizen::Base::String& key); private: void FindAppControlScene(int itemIndex); diff --git a/inc/StManageApplicationInfoForm.h b/inc/StManageApplicationInfoForm.h index 56d8018..61c28fa 100644 --- a/inc/StManageApplicationInfoForm.h +++ b/inc/StManageApplicationInfoForm.h @@ -23,6 +23,7 @@ #define _ST_MANAGE_APPLICATION_INFO_FORM_H_ #include +#include #include "StBaseForm.h" class ManageApplicationInfoForm @@ -78,6 +79,8 @@ private: void DeleteUninstallPopup(void); void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs); + bool IsCurrentActiveImeApp(void); + result SetDefaultIme(void); private: Tizen::Base::Collection::ArrayList* __applicationData; Tizen::App::Package::PackageManager* __pPackageManager; diff --git a/inc/StPrivacyForm.h b/inc/StPrivacyForm.h index 42f45f9..b8db380 100644 --- a/inc/StPrivacyForm.h +++ b/inc/StPrivacyForm.h @@ -86,6 +86,7 @@ private: Tizen::Security::PrivacyManager* __pPrivacyManager; Tizen::Base::Collection::ArrayList* __privacyPackageList; Tizen::Base::Collection::ArrayList* __pLabelArrayList; + Tizen::Ui::Controls::Label* __pLabel[50]; }; #endif // _ST_PRIVACY_FORM_H_ \ No newline at end of file diff --git a/inc/StTimeZoneForm.h b/inc/StTimeZoneForm.h index 12031ed..504b2cc 100644 --- a/inc/StTimeZoneForm.h +++ b/inc/StTimeZoneForm.h @@ -70,6 +70,7 @@ private: class TimeZoneForm : public BaseForm , public Tizen::Ui::Controls::ISearchBarEventListener + , public Tizen::Ui::IFocusEventListener , public Tizen::Ui::IKeypadEventListener , public Tizen::Ui::ITextEventListener { @@ -116,6 +117,8 @@ public: virtual void OnKeypadBoundsChanged(Tizen::Ui::Control& source){} virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + virtual void OnFocusLost(const Tizen::Ui::Control& source); + virtual void OnFocusGained(const Tizen::Ui::Control& source); private: void ResetModeSizeChangedAtOrientationState(void); void ResizedInTableView(void); diff --git a/manifest.xml b/manifest.xml index 5e67aac..3c903e0 100644 --- a/manifest.xml +++ b/manifest.xml @@ -62,7 +62,9 @@ x86 + true vfpv3 + true Normal diff --git a/src/StAppSettingForm.cpp b/src/StAppSettingForm.cpp index 25aa560..9b597a9 100644 --- a/src/StAppSettingForm.cpp +++ b/src/StAppSettingForm.cpp @@ -1746,9 +1746,10 @@ AppSettingForm::UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGr { AppLog("Enter"); Node* pNode = null; + if (__pGroupItemNodeList) __pGroupItemNodeList->GetAt(groupIndex, pNode); - if (pNode->GetType().Equals(ID_APPSETTING_ITEM_TYPE_EXPAND_LIST, false)) + if (pNode && pNode->GetType().Equals(ID_APPSETTING_ITEM_TYPE_EXPAND_LIST, false)) { Label* pLabel = static_cast(pItem->GetControl(0)); String expandList; @@ -1946,7 +1947,7 @@ AppSettingForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui } if (__pTableView) { - __pTableView->RefreshAllItems(); + //__pTableView->RefreshAllItems(); } Invalidate(true); } diff --git a/src/StBaseForm.cpp b/src/StBaseForm.cpp index 6b242b6..cd99dd8 100644 --- a/src/StBaseForm.cpp +++ b/src/StBaseForm.cpp @@ -158,6 +158,17 @@ BaseForm::ItemTypeOneLine(Tizen::Graphics::Rectangle& main) } void +BaseForm::ItemTypeOneLine(Tizen::Graphics::FloatRectangle& main) +{ + Rectangle clientRect = GetClientAreaBounds(); + + main.x = X_ITEM_TYPE_1_LABEL; + main.y = Y_ITEM_TYPE_1_LABEL; + main.width = (clientRect.width - TWO_LINE_ITEM_WIDTH_GAP); + main.height = H_ITEM_TYPE_1_LABEL; +} + +void BaseForm::ItemTypeTwoLine(Tizen::Graphics::Rectangle& main, Tizen::Graphics::Rectangle& sub, int fontSize) { Rectangle clientRect = GetClientAreaBounds(); diff --git a/src/StCertificateUserForm.cpp b/src/StCertificateUserForm.cpp index 1485894..59e76af 100644 --- a/src/StCertificateUserForm.cpp +++ b/src/StCertificateUserForm.cpp @@ -1,4 +1,4 @@ -// +// // Copyright (c) 2012 Samsung Electronics Co., Ltd. // // Licensed under the Flora License, Version 1.1 (the License); @@ -46,7 +46,7 @@ static const int Y_ALERT_POPUP_CLIENT_RECT_DEFAULT = 50; static const int H_ALERT_POPUP_CLIENT_RECT_RESIZE = 470; static const int W_ALERT_POPUP_CLIENT_RECT_RESIZE = 720; static const int Y_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT = 20; -static const int H_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT = 340; +static const int H_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT = 300; static const int X_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT = 20; static const int Y_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT = 350; static const int W_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT = 310; @@ -493,7 +493,7 @@ CertificateUserForm::CreateAlertPopup(void) itemRectLabel.x = X_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT; itemRectLabel.y = Y_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT; - itemRectLabel.width = clientRect.width; + itemRectLabel.width = clientRect.width - (2 * X_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT); itemRectLabel.height = H_ALERT_POPUP_ITEM_RECT_LABEL_DEFAULT; itemRectLhsButton.x = X_ALERT_POPUP_ITEM_RECT_LHS_BUTTON_DEFAULT + itemRectLabel.x; diff --git a/src/StDateTimeForm.cpp b/src/StDateTimeForm.cpp index 0684c15..f5e0cec 100644 --- a/src/StDateTimeForm.cpp +++ b/src/StDateTimeForm.cpp @@ -133,6 +133,7 @@ DateTimeForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneI bool automaticUpdate = false; bool hourFormat = false; __pTableView->UpdateTableView(); + if (previousSceneId != IDSCN_TIME_ZONE) __pTableView->CollapseGroup(ID_GROUP_DATE_AND_TIME_FORMAT_LIST); __pTableView->RefreshItem(ID_GROUP_DATE_AND_TIME_FORMAT, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); __pTableView->RefreshItem(ID_GROUP_DATE_AND_TIME_LOCAL_TIME, ID_ITEM_DATE_AND_TIME_DATE_AND_TIME, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); @@ -837,7 +838,7 @@ DateTimeForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTab { if (itemIndex == ID_ITEM_DATE_AND_TIME_TIME_ZONE) { - __pTableView->CollapseGroup(ID_GROUP_DATE_AND_TIME_FORMAT_LIST); + //__pTableView->CollapseGroup(ID_GROUP_DATE_AND_TIME_FORMAT_LIST); pSceneManager->GoForward(ForwardSceneTransition(IDSCN_TIME_ZONE, SCENE_TRANSITION_ANIMATION_TYPE_LEFT)); } else if (itemIndex == ID_ITEM_DATE_AND_TIME_DATE_AND_TIME) diff --git a/src/StDisplayForm.cpp b/src/StDisplayForm.cpp index d3efae3..96d0571 100644 --- a/src/StDisplayForm.cpp +++ b/src/StDisplayForm.cpp @@ -126,6 +126,7 @@ DisplayForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId } __pTableView->SetItemChecked(ID_GROUP_BACKLIGHT_TIME_LIST, GetBackLightTimeIndex(), true); + if (previousSceneId != IDSCN_FONT) __pTableView->CollapseGroup(ID_GROUP_BACKLIGHT_TIME_LIST); } @@ -496,7 +497,7 @@ DisplayForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTabl SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); - __pTableView->CollapseGroup(ID_GROUP_BACKLIGHT_TIME_LIST); + //__pTableView->CollapseGroup(ID_GROUP_BACKLIGHT_TIME_LIST); pSceneManager->GoForward(ForwardSceneTransition(IDSCN_FONT, SCENE_TRANSITION_ANIMATION_TYPE_LEFT), null); } break; @@ -539,7 +540,7 @@ DisplayForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::O { AppLog("ENTER"); BaseForm::OnOrientationChanged(source, orientationStatus); - __pTableView->UpdateTableView(); + __pTableView->RefreshAllItems(); } void diff --git a/src/StFontForm.cpp b/src/StFontForm.cpp index 2c126fc..91af0e1 100644 --- a/src/StFontForm.cpp +++ b/src/StFontForm.cpp @@ -848,6 +848,7 @@ FontForm::OnSettingChanged (Tizen::Base::String &key) __pTableView->RefreshItem(i, j, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); } } + __pTableView->UpdateTableView(); } char diff --git a/src/StLocationHelpForm.cpp b/src/StLocationHelpForm.cpp index b1778f7..14ff2fa 100644 --- a/src/StLocationHelpForm.cpp +++ b/src/StLocationHelpForm.cpp @@ -109,7 +109,7 @@ LocationHelpForm::CreateHelpText(const Rectangle& bounds) } helpTitleRect.x = H_TEXT_GAP; - helpTitleRect.height = GetHeightForStringArea(itemTitle, helpTitleRect.width - helpTitleRect.x, fontSize) + H_TEXT_GAP; + helpTitleRect.height = H_ITEM_TYPE_1_LABEL; HelpContentsRect.x = H_TEXT_GAP; HelpContentsRect.y = (helpTitleRect.y + helpTitleRect.height); HelpContentsRect.height = GetHeightForStringArea(itemHelp, bounds.width - 4, fontSize) + H_TEXT_GAP; @@ -117,7 +117,7 @@ LocationHelpForm::CreateHelpText(const Rectangle& bounds) Label* pLabel = new (std::nothrow) Label(); pLabel->Construct(helpTitleRect, itemTitle); pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); - pLabel->SetTextVerticalAlignment(ALIGNMENT_TOP); + pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_BOLD); pLabel->SetTextColor(COLOR_MAIN_TEXT); diff --git a/src/StMainMenuForm.cpp b/src/StMainMenuForm.cpp index 8274b0a..bced54a 100644 --- a/src/StMainMenuForm.cpp +++ b/src/StMainMenuForm.cpp @@ -142,6 +142,7 @@ MainMenuForm::OnInitializing(void) __isNfcSupported = IsNfcSupported(); AddFocusEventListener(*this); + SettingInfo::AddSettingEventListener(*this); return E_SUCCESS; } @@ -151,6 +152,7 @@ MainMenuForm::OnTerminating(void) __pTableView = null; RemoveFocusEventListener(*this); SetFormBackEventListener(null); + SettingInfo::RemoveSettingEventListener(*this); return E_SUCCESS; } @@ -744,6 +746,7 @@ MainMenuForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTab if (pAppControl->Start(null, null, pExtraData, null) == E_SUCCESS) { + AppLog("__isRunningAppControl = true"); __isRunningAppControl = true; } @@ -1189,3 +1192,18 @@ MainMenuForm::OnFocusGained(const Tizen::Ui::Control& source) AppLog("Enter"); __isRunningAppControl = false; } + +void +MainMenuForm::OnSettingChanged (Tizen::Base::String &key) +{ + AppLogDebug("FontForm::key changed [%ls]", key.GetPointer()); + bool flightModeStatus = false; + if(key.CompareTo(SETTING_INFO_KEY_NETWORK_FLIGHTMODE) == 0) + { + SettingInfo::GetValue(SETTING_INFO_KEY_NETWORK_FLIGHTMODE, flightModeStatus); + AppLog("flightMode = %d", flightModeStatus); + + __pTableView->SetItemChecked(ID_GROUP_MODE, 0, flightModeStatus); + __pTableView->Invalidate(true); + } +} diff --git a/src/StManageApplicationForm.cpp b/src/StManageApplicationForm.cpp index e56872a..7453f34 100644 --- a/src/StManageApplicationForm.cpp +++ b/src/StManageApplicationForm.cpp @@ -236,6 +236,7 @@ ManageApplicationForm::OnTerminating(void) void ManageApplicationForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs) { + AppLog("Enter"); if (previousSceneId.Equals(IDSCN_MANAGE_APPLICATION_INFO, false)) { if (pArgs != null) diff --git a/src/StManageApplicationInfoForm.cpp b/src/StManageApplicationInfoForm.cpp index b471d69..265b542 100644 --- a/src/StManageApplicationInfoForm.cpp +++ b/src/StManageApplicationInfoForm.cpp @@ -31,6 +31,7 @@ using namespace Tizen::Graphics; using namespace Tizen::System; using namespace Tizen::Ui; using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Ime; using namespace Tizen::Ui::Scenes; static const int ID_GROUP_APPLICATION_NAME = 0; @@ -517,13 +518,16 @@ ManageApplicationInfoForm::CreateItem(int groupIndex, int itemIndex, int itemWid String uninstallable = *(static_cast(__applicationData->GetAt(DATA_TYPE_APPLICATION_UNINSTALLABLE))); + if (((pAppManager->IsRunning(appId) == false) && (uninstallable.Equals(L"0", true))) || appId == homeAppId || appId == lockAppId || !isMenuIconVisible) + { + pItem->SetEnabled(false); + } pUninstallButton = new (std::nothrow) Button(); pUninstallButton->Construct(uninstallButtonRect, ResourceManager::GetString(L"IDS_ST_BUTTON_UNINSTALL")); if (uninstallable.Equals(L"0", true) || appId == homeAppId || appId == lockAppId) { - pUninstallButton->SetEnabled(false); - pItem->SetEnabled(false); + pUninstallButton->SetEnabled(false); } pUninstallButton->SetActionId(IDA_UNINSTALL); pUninstallButton->AddActionEventListener(*this); @@ -625,6 +629,7 @@ ManageApplicationInfoForm::UpdateGroupItem(int groupIndex, Tizen::Ui::Controls:: void ManageApplicationInfoForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem) { + AppLog("Enter"); switch (groupIndex) { case ID_GROUP_APPLICATION_NAME: @@ -745,6 +750,10 @@ ManageApplicationInfoForm::OnActionPerformed(const Tizen::Ui::Control& source, i case IDA_UNINSTALL_CONFIRM_OK: { + if(IsCurrentActiveImeApp()) + { + SetDefaultIme(); + } String packageId = *(static_cast(__applicationData->GetAt(DATA_TYPE_APPLICATION_PACKAGE_ID))); __pPackageManager->UninstallPackage (packageId, null); @@ -780,7 +789,17 @@ ManageApplicationInfoForm::OnPackageUninstallationCompleted(const Tizen::App::Pa SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); + AppLog("PackageId = %S", packageId.GetPointer()); + String *pPackageID = static_cast(__applicationData->GetAt(DATA_TYPE_APPLICATION_PACKAGE_ID)); + if (pPackageID) + { + AppLog("PackageId = %S", pPackageID->GetPointer()); + if(pPackageID->CompareTo(packageId) != 0) + { + return; + } + } ArrayList* pUninstallationResult = new (std::nothrow) ArrayList(SingleObjectDeleter); pUninstallationResult->Construct(); String *pApplicationName = static_cast(__applicationData->GetAt(DATA_TYPE_APPLICATION_NAME)); @@ -970,3 +989,54 @@ ManageApplicationInfoForm::OnPreviewKeyReleased(Control& source, const KeyEventI { return false; } +bool +ManageApplicationInfoForm::IsCurrentActiveImeApp(void) +{ + App* pApp = App::GetInstance(); + Tizen::App::AppId appId = pApp->GetAppId(); + + String packageId = *(static_cast(__applicationData->GetAt(DATA_TYPE_APPLICATION_PACKAGE_ID))); + + InputMethodManager* pInputMethodManager = InputMethodManager::GetInstance(); + + InputMethodInfo* pInputMethodInfo = pInputMethodManager->GetActiveInputMethodInfoN(); + Tizen::App::AppId currentActiveImeAppId = pInputMethodInfo->GetAppId(); + + if(pInputMethodInfo) + { + delete pInputMethodInfo; + } + + String pkgId = PackageManager::GetPackageIdByAppId(currentActiveImeAppId); + + if (packageId.Equals(pkgId, false)) + { + return true; + } + else + { + return false; + } +} + +result +ManageApplicationInfoForm::SetDefaultIme(void) +{ + result r = E_SUCCESS; + + InputMethodManager* pInputMethodManager = InputMethodManager::GetInstance(); + IList* pInputMethodInfoList = pInputMethodManager->GetInputMethodInfoListN(); + if (pInputMethodInfoList == null) + { + return E_FAILURE; + } + + InputMethodInfo* pInputMethodInfo = null; + pInputMethodInfo = static_cast(pInputMethodInfoList->GetAt(0)); + r = pInputMethodManager->SetInputMethod(pInputMethodInfo->GetAppId());//change to default ime + + pInputMethodInfoList->RemoveAll(); + delete pInputMethodInfoList; + + return r; +} diff --git a/src/StNfcPredefinedItemForm.cpp b/src/StNfcPredefinedItemForm.cpp index daff046..ac540e5 100644 --- a/src/StNfcPredefinedItemForm.cpp +++ b/src/StNfcPredefinedItemForm.cpp @@ -214,7 +214,15 @@ NfcPredefinedItemForm::CreateItem(int groupIndex, int itemIndex, int itemWidth) __pNfcPredefinedItemPresentationModelInstance = NfcPredefinedItemPresentationModel::GetInstance(); __pNfcPredefinedItemPresentationModelInstance->InitReservedPushCandidatesList(); __pReservedPushCandidatesAppIdList = __pNfcPredefinedItemPresentationModelInstance->GetAllListReservedPushCandidatesAppIdList(); - if(__pReservedPushCandidatesAppIdList == null && __pReservedPushCandidatesAppIdList->GetCount() == 0) + if(__pReservedPushCandidatesAppIdList == null) + { + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null); + delete pItem; + return null; + } + else if(__pReservedPushCandidatesAppIdList->GetCount() == 0) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); @@ -358,7 +366,14 @@ NfcPredefinedItemForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::G __pNfcPredefinedItemPresentationModelInstance = NfcPredefinedItemPresentationModel::GetInstance(); __pNfcPredefinedItemPresentationModelInstance->InitReservedPushCandidatesList(); __pReservedPushCandidatesAppIdList = __pNfcPredefinedItemPresentationModelInstance->GetAllListReservedPushCandidatesAppIdList(); - if(__pReservedPushCandidatesAppIdList == null && __pReservedPushCandidatesAppIdList->GetCount() == 0) + if(__pReservedPushCandidatesAppIdList == null) + { + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null); + return; + } + else if (__pReservedPushCandidatesAppIdList->GetCount() == 0) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); diff --git a/src/StPrivacyForm.cpp b/src/StPrivacyForm.cpp index f9c0717..178641b 100644 --- a/src/StPrivacyForm.cpp +++ b/src/StPrivacyForm.cpp @@ -42,6 +42,10 @@ PrivacyForm::PrivacyForm(void) , __privacyPackageList(null) , __pLabelArrayList(null) { + for(int i = 0; i < 50; i++) + { + __pLabel[i] = null; + } } PrivacyForm::~PrivacyForm(void) @@ -370,19 +374,19 @@ PrivacyForm::CreateItem(int groupIndex, int itemIndex, int itemWidth) labelName.Clear(); labelName = L"LABEL_SUB_"; labelName.Append(itemIndex); - Label* pSecondLabel = new (std::nothrow) Label(); - pSecondLabel->Construct(itemSubRectangle, itemSubText); - pSecondLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); - pSecondLabel->SetTextVerticalAlignment(ALIGNMENT_TOP); - pSecondLabel->SetTextConfig(FONT_SIZE_SUB_TEXT, LABEL_TEXT_STYLE_NORMAL); - pSecondLabel->SetTextColor(COLOR_SUB_TEXT); - pSecondLabel->AddTouchEventListener(*this); - pSecondLabel->SetName(labelName); - __pLabelArrayList->Add(pSecondLabel); - pItem->AddControl(pSecondLabel); - relativeLayout.SetMargin(*pSecondLabel, itemSubRectangle.x, 0, 0, 0); - relativeLayout.SetRelation(*pSecondLabel, pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT); - relativeLayout.SetRelation(*pSecondLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT); + __pLabel[itemIndex] = new (std::nothrow) Label(); + __pLabel[itemIndex]->Construct(itemSubRectangle, itemSubText); + __pLabel[itemIndex]->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + __pLabel[itemIndex]->SetTextVerticalAlignment(ALIGNMENT_TOP); + __pLabel[itemIndex]->SetTextConfig(FONT_SIZE_SUB_TEXT, LABEL_TEXT_STYLE_NORMAL); + __pLabel[itemIndex]->SetTextColor(COLOR_SUB_TEXT); + __pLabel[itemIndex]->AddTouchEventListener(*this); + __pLabel[itemIndex]->SetName(labelName); + //__pLabelArrayList->Add(pSecondLabel); + pItem->AddControl(__pLabel[itemIndex]); + relativeLayout.SetMargin(*__pLabel[itemIndex], itemSubRectangle.x, 0, 0, 0); + relativeLayout.SetRelation(*__pLabel[itemIndex], pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT); + relativeLayout.SetRelation(*__pLabel[itemIndex], pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT); pItem->AddKeyEventListener(*this); AppLog("Exit group[%d] index[%d]", groupIndex, itemIndex); @@ -746,15 +750,13 @@ PrivacyForm::SetLabelColor(Tizen::Base::String sourceName, const unsigned int co source.Reverse(); source.IndexOf(L"_", 0, index); source.SubString(0, index, temp_number); + temp_number.Reverse(); Integer::Parse(temp_number, index); - Label* pLabel = null; - - pLabel = static_cast (__pLabelArrayList->GetAt(index)); - if (pLabel != null) + AppLog("index = %d", index); + if(index > 0 && index < GetPackageListCount()) { - AppLog("Enter setting %ls", pLabel->GetName().GetPointer()); - pLabel->SetTextColor(color); - pLabel->Invalidate(false); + __pLabel[index]->SetTextColor(color); + __pLabel[index]->Invalidate(false); } AppLog("EXIT"); } diff --git a/src/StRegionForm.cpp b/src/StRegionForm.cpp index 0b1d8d3..20477a7 100644 --- a/src/StRegionForm.cpp +++ b/src/StRegionForm.cpp @@ -65,14 +65,14 @@ LocaleRegionForm::CreateFooter(void) void LocaleRegionForm::CreateTableView(void) { - Rectangle bounds = GetClientAreaBounds(); - Rectangle tableViewBounds = bounds; + FloatRectangle bounds = GetClientAreaBoundsF(); + FloatRectangle tableViewBounds = bounds; tableViewBounds.y = Y_TABLE_VIEW_AREA; tableViewBounds.height = (bounds.height - tableViewBounds.y); __pTableView = new (std::nothrow) GroupedTableView(); - __pTableView->Construct(tableViewBounds, true, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT); + __pTableView->Construct(CoordinateSystem::AlignToDevice(tableViewBounds), true, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT); __pTableView->SetItemProvider(this); AddControl(__pTableView); @@ -169,14 +169,14 @@ LocaleRegionForm::GetLocaleList(void) void LocaleRegionForm::CreateSearchBar(void) { - Rectangle bounds = GetClientAreaBounds(); - Rectangle searchbarBounds = bounds; + FloatRectangle bounds = GetClientAreaBoundsF(); + FloatRectangle searchbarBounds = bounds; searchbarBounds.y = 0; searchbarBounds.height = H_SEARCH_BAR; __pSearchBar = new (std::nothrow) SearchBar(); - __pSearchBar->Construct(searchbarBounds, true, KEYPAD_ACTION_SEARCH); + __pSearchBar->Construct(CoordinateSystem::AlignToDevice(searchbarBounds), true, KEYPAD_ACTION_SEARCH); __pSearchBar->SetGuideText(ResourceManager::GetString(L"IDS_COM_BODY_SEARCH")); __pSearchBar->AddSearchBarEventListener(*this); __pSearchBar->AddTextEventListener(*this); @@ -304,7 +304,7 @@ LocaleRegionForm::CreateItem(int groupIndex, int itemIndex, int itemWidth) { AppLogDebug("group[%d] index[%d]", groupIndex, itemIndex); - Rectangle itemMainRectangle; + FloatRectangle itemMainRectangle; TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL; String* pKey = null; String itemMainText; @@ -336,11 +336,11 @@ LocaleRegionForm::CreateItem(int groupIndex, int itemIndex, int itemWidth) RelativeLayout relativeLayout; relativeLayout.Construct(); - pItem->Construct(relativeLayout, Dimension(itemWidth, H_GROUP_ITEM_DEFAULT), style); + pItem->Construct(relativeLayout, CoordinateSystem::AlignToDevice(FloatDimension(itemWidth, H_GROUP_ITEM_DEFAULT)), style); pItem->SetBackgroundColor(COLOR_BG_GROUP_ITEM_DEFAULT); pLabel = new (std::nothrow) Label(); - pLabel->Construct(itemMainRectangle, itemMainText); + pLabel->Construct(CoordinateSystem::AlignToDevice(FloatRectangle(itemMainRectangle)), itemMainText); pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); pLabel->SetTextConfig(FontSize, LABEL_TEXT_STYLE_NORMAL); pLabel->SetTextColor(COLOR_MAIN_TEXT); diff --git a/src/StTimeZoneForm.cpp b/src/StTimeZoneForm.cpp index adef56f..c79b498 100644 --- a/src/StTimeZoneForm.cpp +++ b/src/StTimeZoneForm.cpp @@ -182,6 +182,7 @@ TimeZoneForm::OnInitializing(void) __pSearchBar->AddTextEventListener(*this); __pSearchBar->AddKeypadEventListener(*this); __pSearchBar->SetContentAreaSize(Dimension(0, 0)); + __pSearchBar->AddFocusEventListener(*this); AddControl(__pSearchBar); @@ -461,6 +462,8 @@ TimeZoneForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTab return; } key.Append(pData->GetRegionData() + L"/" + pData->GetCountryData()); + SetFocus(); + __pSearchBar->HideKeypad(); if (SettingInfo::SetValue(SETTING_INFO_KEY_LOCALE_TIME_ZONE, key) == E_SUCCESS) { __pSearchBar->HideKeypad(); @@ -756,3 +759,16 @@ TimeZoneData::GetGMTData(void) const { return _timeZoneGMT; } + +void +TimeZoneForm::OnFocusLost(const Tizen::Ui::Control& source) +{ + AppLog("Enter"); + __pSearchBar->HideKeypad(); +} + +void +TimeZoneForm::OnFocusGained(const Tizen::Ui::Control& source) +{ + AppLog("Enter"); +} -- 2.7.4