From d4031d244344ce654af51c0b74a50bbd30c60ecf Mon Sep 17 00:00:00 2001 From: chitta ranjan Date: Fri, 14 Jun 2013 20:10:02 +0900 Subject: [PATCH] NABI issues fixed: 41292, 41263, 41256, 41241, 41231, 41183, 41160, 41515, 41363, 41157, 41137, 41594, 41550, 41410, 41348, 41333, 41183, 41177,41160, 41587, 41150, 41159 Change-Id: Iea3db37a44662f533fb7814b90a5f3981269a1fd Signed-off-by: chitta ranjan --- inc/CtContactListPanel.h | 4 +++ src/CtContactDetailsForm.cpp | 2 ++ src/CtContactEditorForm.cpp | 69 ++++++++++++++++++++++++++++++--------- src/CtContactListPanel.cpp | 28 ++++++++++------ src/CtFavoriteListEditorPanel.cpp | 10 +++--- src/CtGroupEditorForm.cpp | 4 +++ src/CtGroupSelectorForm.cpp | 3 +- 7 files changed, 87 insertions(+), 33 deletions(-) diff --git a/inc/CtContactListPanel.h b/inc/CtContactListPanel.h index 514cdcc..6f69653 100644 --- a/inc/CtContactListPanel.h +++ b/inc/CtContactListPanel.h @@ -40,6 +40,7 @@ class ContactListPanel , public Tizen::Ui::ITextEventListener , public Tizen::Ui::ITouchEventListener , public Tizen::Ui::Controls::IFastScrollListener + , public Tizen::Ui::IFocusEventListener , public Tizen::Ui::Controls::IGroupedListViewItemEventListener , public Tizen::Ui::Controls::IGroupedListViewItemProvider , public Tizen::Ui::Controls::IListViewItemEventListener @@ -81,6 +82,9 @@ public: virtual void OnFastScrollIndexSelected (Tizen::Ui::Control& source, Tizen::Base::String& index); + virtual void OnFocusGained(const Tizen::Ui::Control& source); + virtual void OnFocusLost(const Tizen::Ui::Control& source); + virtual void OnTextValueChanged(const Tizen::Ui::Control& source); virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source); diff --git a/src/CtContactDetailsForm.cpp b/src/CtContactDetailsForm.cpp index cdbe56a..232d179 100644 --- a/src/CtContactDetailsForm.cpp +++ b/src/CtContactDetailsForm.cpp @@ -374,6 +374,8 @@ ContactDetailsForm::OnActionPerformed(const Tizen::Ui::Control& source, int acti break; case IDA_INVALID_FILE_POPUP_CLOSE: { + __pInvalidFilePopup->SetShowState(false); + ContactsApp* pContactsApp = static_cast(ContactsApp::GetInstance()); result r = AppControlProviderManager::GetInstance()->SendAppControlResult(pContactsApp->GetRequestId(), APP_CTRL_RESULT_FAILED, null); diff --git a/src/CtContactEditorForm.cpp b/src/CtContactEditorForm.cpp index 35513d0..89ea0a2 100644 --- a/src/CtContactEditorForm.cpp +++ b/src/CtContactEditorForm.cpp @@ -50,6 +50,7 @@ static const int IDA_BUTTON_EXPANDABLE = 24; static const int IDA_BUTTON_MORE_INFO = 25; static const int IDA_BUTTON_BIRTHDAY_CLEAR = 26; static const int IDA_BUTTON_DEFAULT_PHONE_NUMBER = 27; +static const int IDA_BUTTON_RINGTONE_CLEAR = 28; static const int IDA_CONTEXT_MENU_ITEM_JOB_TITLE = 31; static const int IDA_CONTEXT_MENU_ITEM_DEPARTMENT = 32; static const int IDA_CONTEXT_MENU_ITEM_INSTANT_MESSENGER = 33; @@ -79,6 +80,8 @@ static const wchar_t* IDB_BUTTON_CAMERA = L"C02_caller_id_icon_camera.png"; static const wchar_t* IDB_BUTTON_CAMERA_PRESSED = L"C02_caller_id_icon_camera_press.png"; static const wchar_t* IDB_BUTTON_DROPBOX = L"C02_button_icon_dropbox.png"; static const wchar_t* IDB_THUMBNAIL_BACKGROUND = L"C02_created_photo_bg.png"; +static const wchar_t* IDB_DETAILS_RESET_NORMAL = L"00_button_refresh.png"; +static const wchar_t* IDB_DETAILS_RESET_PRESSED = L"00_button_refresh_press.png"; static const wchar_t* INPUT_DATA_SELECTION_MODE_SINGLE = L"single"; static const wchar_t* INPUT_KEY_SELECTION_MODE = L"http://tizen.org/appcontrol/data/selection_mode"; @@ -99,6 +102,7 @@ static const int W_DIVIDER = 1; static const int H_EMPTY_SPACE = 32; static const int H_EXPANDED_NAME_FIELDS = 672; static const int H_BUTTON = 74; +static const int H_ICON_BUTTON = 74; static const int W_THUMBNAIL = 360; static const int W_TITLE_LABEL = 170; static const int X_MORE_INFORMATION_BUTTON = 60; @@ -132,6 +136,7 @@ static const int Y_SAVE_CONTACT_BUTTON = 132; static const int H_SAVE_CONTACT_BUTTON = 74; static const int W_SAVE_CONTACT_BUTTON = 318; static const int W_POPUP_ITEM_GAP = 20; +static const int X_REFRESH_BUTTON_MARGIN = 88; static const int FONT_SIZE_SAVE_CONTACT_CONFIRM = 42; static const int FONT_SIZE_SAVE_CONTACT_BUTTON = 36; @@ -533,21 +538,8 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio { case IDA_ACTION_BAR_SAVE: { - long long avialableMemory = 0; result r = E_SUCCESS; - String key(RUNTIMEINFO_INTERNAL_MEMORY_KEY); - - r = RuntimeInfo::GetValue(key, avialableMemory); - if(avialableMemory == 0) - { - int modalResult = 0; - MessageBox memoryFullMessageBox; - memoryFullMessageBox.Construct(L"", ResourceManager::GetString(L"IDS_EMAIL_POP_DEVICE_STORAGE_FULL"), MSGBOX_STYLE_NONE, 1000); - memoryFullMessageBox.ShowAndWait(modalResult); - return; - } - r = SaveContactData(); if (r != E_SUCCESS) @@ -800,6 +792,12 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio } } break; + case IDA_BUTTON_RINGTONE_CLEAR: + { + __pPresentationModel->SetValue(DETAIL_PROPERTY_RINGTONE, L"", 0); + __pTableView->RefreshItem(TABLE_VIEW_GROUP_RINGTONE_FIELD_INDEX, 2, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + } + break; default: break; } @@ -1504,14 +1502,14 @@ ContactEditorForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls break; case TABLE_VIEW_NOTE_FIELD_INDEX: { - Control* pNoteField = pItem->GetControl(0); - + Control* pNoteField = pItem->GetControl(1); + Control* pNoteLabel = pItem->GetControl(0); if (pNoteField == null) { return; } - pItem->SetSize(pItem->GetWidth(), pNoteField->GetHeight()); + pItem->SetSize(pItem->GetWidth(), pNoteLabel->GetHeight() + pNoteField->GetHeight()); } break; default: @@ -2202,6 +2200,27 @@ ContactEditorForm::GetRingtoneField(int itemWidth) pLabelRingToneName->SetTextColor(Color(COLOR_RINGTONE)); pRingtoneItem->AddControl(pLabelRingToneName); + Button* pClearButton = new (std::nothrow) Button(); + pClearButton->Construct(Rectangle(itemWidth - X_REFRESH_BUTTON_MARGIN, (pRingtoneItem->GetHeight() - H_ICON_BUTTON) / 2, H_ICON_BUTTON, H_ICON_BUTTON)); + pClearButton->SetActionId(IDA_BUTTON_RINGTONE_CLEAR); + pClearButton->AddActionEventListener(*this); + + Bitmap* pReset = ResourceManager::GetBitmapN(IDB_DETAILS_RESET_NORMAL); + if (pReset != null) + { + pClearButton->SetNormalBitmap(Point(0, 0), *pReset); + delete pReset; + } + pReset = ResourceManager::GetBitmapN(IDB_DETAILS_RESET_PRESSED); + if (pReset != null) + { + pClearButton->SetPressedBitmap(Point(0, 0), *pReset); + delete pReset; + } + + pRingtoneItem->AddControl(pClearButton); + pRingtoneItem->SetIndividualSelectionEnabled(pClearButton, true); + return pRingtoneItem; } @@ -2581,6 +2600,24 @@ ContactEditorForm::SaveContactData(bool isSaved) { result r = E_SUCCESS; + if (isSaved == true) + { + long long avialableMemory = 0; + result r = E_SUCCESS; + + String key(RUNTIMEINFO_INTERNAL_MEMORY_KEY); + + r = RuntimeInfo::GetValue(key, avialableMemory); + if (avialableMemory == 0) + { + int modalResult = 0; + MessageBox memoryFullMessageBox; + memoryFullMessageBox.Construct(L"", ResourceManager::GetString(L"IDS_EMAIL_POP_DEVICE_STORAGE_FULL"), MSGBOX_STYLE_NONE, 1000); + memoryFullMessageBox.ShowAndWait(modalResult); + return E_FAILURE; + } + } + r = SaveNameFields(); for (int i = 0; i < __pPhoneNumberFieldItem->GetCount(); i++) diff --git a/src/CtContactListPanel.cpp b/src/CtContactListPanel.cpp index e1d81c3..e0dfb52 100644 --- a/src/CtContactListPanel.cpp +++ b/src/CtContactListPanel.cpp @@ -174,6 +174,7 @@ ContactListPanel::OnInitializing(void) __pSearchBar->Construct(Rectangle(0, 0, clientBounds.width, H_SEARCHBAR)); __pSearchBar->SetGuideText(ResourceManager::GetString(L"IDS_COM_BODY_SEARCH")); __pSearchBar->AddSearchBarEventListener(*this); + __pSearchBar->AddFocusEventListener(*this); __pSearchBar->AddTextEventListener(*this); __pSearchBar->AddKeypadEventListener(*this); __pSearchBar->SetContentAreaSize(Dimension(0, 0)); @@ -1066,6 +1067,23 @@ ContactListPanel::OnFastScrollIndexSelected (Tizen::Ui::Control& source, Tizen:: } void +ContactListPanel::OnFocusGained(const Tizen::Ui::Control& source) +{ + if (source.Equals(*__pSearchBar)) + { + if (__pListView->GetShowState() == true) + { + __pListView->UpdateList(); + } + } +} + +void +ContactListPanel::OnFocusLost(const Tizen::Ui::Control& source) +{ +} + +void ContactListPanel::ShowContactValuePopup(int groupIndex, int itemIndex) { delete __pMultipleContactValuePopup; @@ -1183,11 +1201,6 @@ ContactListPanel::OnKeypadOpened(Tizen::Ui::Control& source) pForm->SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, false); __isKeypadOpened = true; - - if(__pListView->GetShowState() == true) - { - __pListView->UpdateList(); - } } void @@ -1208,11 +1221,6 @@ ContactListPanel::OnKeypadClosed(Tizen::Ui::Control& source) __changedSceneId = IDSCN_CONTACT_LIST; } - - if(__pListView->GetShowState() == true && __pSearchBar->GetMode() != SEARCH_BAR_MODE_INPUT) - { - __pListView->UpdateList(); - } } void diff --git a/src/CtFavoriteListEditorPanel.cpp b/src/CtFavoriteListEditorPanel.cpp index 44cd120..bf6ac3c 100644 --- a/src/CtFavoriteListEditorPanel.cpp +++ b/src/CtFavoriteListEditorPanel.cpp @@ -275,13 +275,13 @@ FavoriteListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& pre __pPresentationModel->InitializeFavoriteList(pContactsApp->GetReturnType()); + FooterItem footerItemDone; + footerItemDone.Construct(IDA_FOOTER_DONE); + footerItemDone.SetText(ResourceManager::GetString(L"IDS_COM_SK_DONE")); + pFooter->AddItem(footerItemDone); + if (__pPresentationModel->GetFavoriteCount() > 0) { - FooterItem footerItemDone; - footerItemDone.Construct(IDA_FOOTER_DONE); - footerItemDone.SetText(ResourceManager::GetString(L"IDS_COM_SK_DONE")); - pFooter->AddItem(footerItemDone); - bool isChecked = false; int favoriteCount = __pPresentationModel->GetFavoriteCount(); for (int index = 0; index < favoriteCount; index++) diff --git a/src/CtGroupEditorForm.cpp b/src/CtGroupEditorForm.cpp index 4ea53a8..e77b6e7 100644 --- a/src/CtGroupEditorForm.cpp +++ b/src/CtGroupEditorForm.cpp @@ -444,6 +444,7 @@ GroupEditorForm::CreateItem(int itemIndex, int itemWidth) pButtonAdd->SetShowState(false); } pItem->SetBackgroundColor(COLOR_TABLE_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL); + pItem->SetBackgroundColor(COLOR_TABLE_BG, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED); } else if (itemIndex == 1) { @@ -755,6 +756,9 @@ GroupEditorForm::OnKeypadActionPerformed(Tizen::Ui::Control& source, Tizen::Ui:: void GroupEditorForm::OnKeypadBoundsChanged(Tizen::Ui::Control& source) { + Rectangle clientBounds = GetClientAreaBounds(); + + __pTableView->SetSize(clientBounds.width, clientBounds.height); } void diff --git a/src/CtGroupSelectorForm.cpp b/src/CtGroupSelectorForm.cpp index 0789c1e..fa5df88 100644 --- a/src/CtGroupSelectorForm.cpp +++ b/src/CtGroupSelectorForm.cpp @@ -331,8 +331,7 @@ GroupSelectorForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& lis int itemCount = listView.GetItemCount(); for(int count = 0; count < itemCount; count++) { - - if(__pGroupListPresentationModel->IsContactInCategory(*__pGroupIdList, index) != listView.IsItemChecked(index)) + if(__pGroupListPresentationModel->IsContactInCategory(*__pGroupIdList, count) != listView.IsItemChecked(count)) { modifiedItems++; } -- 2.7.4