NABI_SE Issue Fix 45285 45321 45446 45336
authorkamesh <kamesh.kvss@samsung.com>
Tue, 9 Jul 2013 12:08:45 +0000 (17:38 +0530)
committerkamesh <kamesh.kvss@samsung.com>
Tue, 9 Jul 2013 12:08:45 +0000 (17:38 +0530)
Change-Id: I180a7c1e345b46226a04cde6520731eb7245e9ef

src/CtContactDetailsForm.cpp
src/CtContactEditorForm.cpp
src/CtContactListEditorPanel.cpp
src/CtContactPresentationModel.cpp

index ed871f0..6664b16 100644 (file)
@@ -542,11 +542,6 @@ ContactDetailsForm::InitializeAppControl(Tizen::Base::Collection::IList* pArgs)
                                footerItemEdit.SetText(ResourceManager::GetString(L"IDS_COM_SK_EDIT"));
                                pFooter->AddItem(footerItemEdit);
 
-                               FooterItem footerItemDelete;
-                               footerItemDelete.Construct(IDA_FOOTER_DELETE);
-                               footerItemDelete.SetText(ResourceManager::GetString(L"IDS_COM_SK_DELETE"));
-                               pFooter->AddItem(footerItemDelete);
-
                                __pPresentationModel->AddContactChangeListener(*this);
                        }
                        else
index b62c6a1..b3c66fd 100644 (file)
@@ -138,6 +138,8 @@ 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 Y_EDIT_FIELD_GAP = 5;
+static const int H_EDIT_FIELD_GAP = 10;
 
 static const int FONT_SIZE_SAVE_CONTACT_CONFIRM = 42;
 static const int FONT_SIZE_SAVE_CONTACT_BUTTON = 36;
@@ -1302,9 +1304,13 @@ ContactEditorForm::CreateGroupItem(int groupIndex, int itemWidth)
        {
                groupItemHeight = H_NAMEFIELD_GROUP_ITEM_HEIGHT;
        }
-       else if (groupIndex == TABLE_VIEW_NOTE_FIELD_INDEX || groupIndex == TABLE_VIEW_BIRTHDAY_FIELD_INDEX)
+       else if (groupIndex == TABLE_VIEW_BIRTHDAY_FIELD_INDEX)
        {
-               groupItemHeight = 2;
+               groupItemHeight = Y_EDIT_FIELD_GAP;
+       }
+       else if (groupIndex == TABLE_VIEW_NOTE_FIELD_INDEX)
+       {
+               groupItemHeight = H_EDIT_FIELD_GAP;
        }
        else if ((groupIndex > TABLE_VIEW_PHONE_NUMBER_FIELD_INDEX && groupIndex < TABLE_VIEW_GROUP_RINGTONE_FIELD_INDEX) || groupIndex == TABLE_VIEW_MORE_INFORMATION_FIELD_INDEX)
        {
@@ -1628,7 +1634,7 @@ ContactEditorForm::SetNameFields(Tizen::Ui::Controls::TableViewItem& item)
 
        item.SetSize(itemWidth, itemHeight);
 
-       Rectangle itemBounds(W_ITEM_GAP, 0, itemWidth - (W_ITEM_GAP * 3) - H_BUTTON, H_ITEM);
+       Rectangle itemBounds(W_ITEM_GAP, Y_EDIT_FIELD_GAP, itemWidth - (W_ITEM_GAP * 3) - H_BUTTON, H_ITEM - H_EDIT_FIELD_GAP);
 
        if (__isExpandable == true)
        {
@@ -1643,7 +1649,7 @@ ContactEditorForm::SetNameFields(Tizen::Ui::Controls::TableViewItem& item)
 
                item.AddControl(pFirstName);
 
-               itemBounds.y += pFirstName->GetHeight();
+               itemBounds.y += H_ITEM;
                EditField* pMiddleName = new (std::nothrow) EditField();
                pMiddleName->Construct(itemBounds, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);
                pMiddleName->SetGuideText(ResourceManager::GetString(L"IDS_PB_BODY_MIDDLE_NAME"));
@@ -1655,7 +1661,7 @@ ContactEditorForm::SetNameFields(Tizen::Ui::Controls::TableViewItem& item)
 
                item.AddControl(pMiddleName);
 
-               itemBounds.y += pMiddleName->GetHeight();
+               itemBounds.y += H_ITEM;
                EditField* pLastName = new (std::nothrow) EditField();
                pLastName->Construct(itemBounds, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY, false, __pPresentationModel->GetValue(DETAIL_PROPERTY_LAST_NAME).GetLength() + EDIT_FIELD_EXTENDED_LENGTH);
                pLastName->SetGuideText(ResourceManager::GetString(L"IDS_PB_BODY_LAST_NAME"));
@@ -1667,7 +1673,7 @@ ContactEditorForm::SetNameFields(Tizen::Ui::Controls::TableViewItem& item)
 
                item.AddControl(pLastName);
 
-               itemBounds.y += pLastName->GetHeight();
+               itemBounds.y += H_ITEM;
                EditField* pSuffix = new (std::nothrow) EditField();
                pSuffix->Construct(itemBounds, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);
                pSuffix->SetGuideText(ResourceManager::GetString(L"IDS_PB_BODY_SUFFIX"));
@@ -1679,7 +1685,7 @@ ContactEditorForm::SetNameFields(Tizen::Ui::Controls::TableViewItem& item)
 
                item.AddControl(pSuffix);
 
-               itemBounds.y += pSuffix->GetHeight();
+               itemBounds.y += H_ITEM;
                EditField* pNickName = new (std::nothrow) EditField();
                pNickName->Construct(itemBounds, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);
                pNickName->SetGuideText(ResourceManager::GetString(L"IDS_PB_BODY_NICKNAME"));
@@ -1691,7 +1697,7 @@ ContactEditorForm::SetNameFields(Tizen::Ui::Controls::TableViewItem& item)
 
                item.AddControl(pNickName);
 
-               itemBounds.y += pNickName->GetHeight();
+               itemBounds.y += H_ITEM;
                if (__isJobTitleEnabled == true)
                {
                        EditField* pJobTitle = new (std::nothrow) EditField();
@@ -1705,7 +1711,7 @@ ContactEditorForm::SetNameFields(Tizen::Ui::Controls::TableViewItem& item)
 
                        item.AddControl(pJobTitle);
 
-                       itemBounds.y += pJobTitle->GetHeight();
+                       itemBounds.y += H_ITEM;
                }
 
                if (__isDepartmentEnabled == true)
@@ -1721,7 +1727,7 @@ ContactEditorForm::SetNameFields(Tizen::Ui::Controls::TableViewItem& item)
 
                        item.AddControl(pDepartment);
 
-                       itemBounds.y += pDepartment->GetHeight();
+                       itemBounds.y += H_ITEM;
                }
 
                EditField* pCompanyName = new (std::nothrow) EditField();
@@ -1817,7 +1823,7 @@ ContactEditorForm::GetInputFieldN(int groupIndex, int itemIndex, int itemWidth,
        pTableViewItem->SetBackgroundColor(Color(0), TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
 
        EditField* pInputField = new (std::nothrow) EditField();
-       pInputField->Construct(Rectangle(W_ITEM_GAP, 0, itemWidth - (W_ITEM_GAP * 4) - H_BUTTON - W_TYPE_BUTTON, H_ITEM), style, INPUT_STYLE_OVERLAY);
+       pInputField->Construct(Rectangle(W_ITEM_GAP, Y_EDIT_FIELD_GAP, itemWidth - (W_ITEM_GAP * 4) - H_BUTTON - W_TYPE_BUTTON, H_ITEM - H_EDIT_FIELD_GAP), style, INPUT_STYLE_OVERLAY);
        pInputField->SetGuideText(guideText);
        pInputField->SetText(text);
        pInputField->AddKeypadEventListener(*this);
@@ -2220,7 +2226,7 @@ ContactEditorForm::GetNoteField(int itemWidth)
        __pNoteFieldItem->AddControl(pNoteTitle);
 
        ExpandableEditArea* pNoteEditArea = new (std::nothrow) ExpandableEditArea();
-       pNoteEditArea->Construct(Rectangle(0, H_LABEL, itemWidth, H_DOUBLE_LINE_ITEM - H_LABEL), EXPANDABLE_EDIT_AREA_STYLE_NORMAL, EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE);
+       pNoteEditArea->Construct(Rectangle(Y_EDIT_FIELD_GAP, H_LABEL, itemWidth - H_EDIT_FIELD_GAP, H_DOUBLE_LINE_ITEM - H_LABEL - H_EDIT_FIELD_GAP), EXPANDABLE_EDIT_AREA_STYLE_NORMAL, EXPANDABLE_EDIT_AREA_TITLE_STYLE_NONE);
        pNoteEditArea->SetTitleText(ResourceManager::GetString(L"IDS_PB_BODY_NOTE"));
        pNoteEditArea->SetText(__pPresentationModel->GetValue(DETAIL_PROPERTY_NOTE));
        pNoteEditArea->AddExpandableEditAreaEventListener(*this);
@@ -2514,7 +2520,7 @@ ContactEditorForm::SetThumbnailControls(Tizen::Ui::Controls::TableViewItem& item
                int itemWidth = GetBounds().width;
 
                pLabelThumbnail = new (std::nothrow) Label();
-               pLabelThumbnail->Construct(Rectangle((itemWidth - W_THUMBNAIL) / 2, 0, W_THUMBNAIL, W_THUMBNAIL), L"");
+               pLabelThumbnail->Construct(Rectangle((itemWidth - W_THUMBNAIL) / 2, Y_EDIT_FIELD_GAP, W_THUMBNAIL, W_THUMBNAIL - H_EDIT_FIELD_GAP), L"");
 
                item.AddControl(pLabelThumbnail);
 
index 8234be7..8887e54 100644 (file)
@@ -180,7 +180,7 @@ ContactListEditorPanel::OnInitializing(void)
        AddControl(__pSearchBar);
 
        __pSearchListView = new (std::nothrow) GroupedListView();
-       __pSearchListView->Construct(Rectangle(0, H_SEARCHBAR, clientBounds.width, clientBounds.height - H_SEARCHBAR - H_BOTTOM_LABEL), GROUPED_LIST_VIEW_STYLE_INDEXED, true, false);
+       __pSearchListView->Construct(Rectangle(0, H_SEARCHBAR, clientBounds.width, clientBounds.height - H_SEARCHBAR), GROUPED_LIST_VIEW_STYLE_INDEXED, true, false);
        __pSearchListView->SetItemProvider(*__pSearchListEvent);
        __pSearchListView->AddGroupedListViewItemEventListener(*this);
        __pSearchListView->AddTouchEventListener(*this);
@@ -1151,15 +1151,15 @@ ContactListEditorPanel::UpdateBottomLabel(void)
        if (selectedCount > 0)
        {
                __pBottomLabel->SetShowState(true);
-               __pListView->SetSize(__pListView->GetSize().width, pForm->GetClientAreaBounds().height - H_SEARCHBAR - H_SELECT_ALL - H_BOTTOM_LABEL);
-               __pSearchListView->SetSize(__pSearchListView->GetSize().width, pForm->GetClientAreaBounds().height - H_SELECT_ALL - H_BOTTOM_LABEL);
+               __pListView->SetSize(__pListView->GetSize().width, pForm->GetClientAreaBounds().height - __pSearchBar->GetHeight() - __pSelectAll->GetHeight() - H_BOTTOM_LABEL);
+               __pSearchListView->SetSize(__pSearchListView->GetSize().width, pForm->GetClientAreaBounds().height - __pSearchBar->GetHeight());
                pFooter->SetItemEnabled(0, true);
        }
        else
        {
                __pBottomLabel->SetShowState(false);
-               __pListView->SetSize(__pListView->GetSize().width, pForm->GetClientAreaBounds().height - H_SEARCHBAR - H_SELECT_ALL);
-               __pSearchListView->SetSize(__pSearchListView->GetSize().width, pForm->GetClientAreaBounds().height - H_SELECT_ALL);
+               __pListView->SetSize(__pListView->GetSize().width, pForm->GetClientAreaBounds().height - __pSearchBar->GetHeight() - __pSelectAll->GetHeight());
+               __pSearchListView->SetSize(__pSearchListView->GetSize().width, pForm->GetClientAreaBounds().height - __pSearchBar->GetHeight());
                pFooter->SetItemEnabled(0, false);
        }
 
index da1ea8b..63f233a 100644 (file)
@@ -1640,6 +1640,11 @@ ContactPresentationModel::SetEmail(DetailEmailType type, const Tizen::Base::Stri
 {
        result r = E_SUCCESS;
 
+       if (index==0)
+       {
+               __lastRemovedEmailIndex = -1;
+       }
+
        if (value.IsEmpty() == true)
        {
                r = __pContact->RemoveAt(CONTACT_MPROPERTY_ID_EMAILS, index);