NABI issues fixed: 41292, 41263, 41256, 41241, 41231, 41183, 41160, 41515, 41363...
authorchitta ranjan <chitta.rs@samsung.com>
Fri, 14 Jun 2013 11:10:02 +0000 (20:10 +0900)
committerHongryeol Gil <hr.gil@samsung.com>
Fri, 14 Jun 2013 11:49:49 +0000 (20:49 +0900)
Change-Id: Iea3db37a44662f533fb7814b90a5f3981269a1fd
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
inc/CtContactListPanel.h
src/CtContactDetailsForm.cpp
src/CtContactEditorForm.cpp
src/CtContactListPanel.cpp
src/CtFavoriteListEditorPanel.cpp
src/CtGroupEditorForm.cpp
src/CtGroupSelectorForm.cpp

index 514cdcc..6f69653 100644 (file)
@@ -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);
 
index cdbe56a..232d179 100644 (file)
@@ -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*>(ContactsApp::GetInstance());
 
                        result r = AppControlProviderManager::GetInstance()->SendAppControlResult(pContactsApp->GetRequestId(), APP_CTRL_RESULT_FAILED, null);
index 35513d0..89ea0a2 100644 (file)
@@ -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++)
index e1d81c3..e0dfb52 100644 (file)
@@ -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
index 44cd120..bf6ac3c 100644 (file)
@@ -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++)
index 4ea53a8..e77b6e7 100644 (file)
@@ -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
index 0789c1e..fa5df88 100644 (file)
@@ -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++;
                }