Fixed jira issues (N_SE-32819, 30809, 33000, 32678, 32940)
authorDongseok JANG <dongseok.jang@samsung.com>
Mon, 8 Apr 2013 10:02:53 +0000 (19:02 +0900)
committerDongseok JANG <dongseok.jang@samsung.com>
Mon, 8 Apr 2013 17:04:27 +0000 (02:04 +0900)
Change-Id: I3487e3d6bd51581783e26c911baab62c5a9e0cc7
Signed-off-by: Dongseok JANG <dongseok.jang@samsung.com>
inc/CtContactEditorForm.h
res/screen-size-normal/IDL_GROUP_SELECTOR_FORM.xml
src/CtContactDetailsForm.cpp
src/CtContactEditorForm.cpp
src/CtGroupListEditorPanel.cpp
src/CtGroupListPanel.cpp

index 3b7f051..3bb2595 100644 (file)
@@ -142,6 +142,7 @@ private:
        Tizen::Ui::Controls::TableViewItem* GetInputFieldN(int groupIndex, int itemIndex, int itemWidth, Tizen::Ui::Controls::EditFieldStyle style, const Tizen::Base::String& titleText, const Tizen::Base::String& guideText, const Tizen::Base::String& text = L"", bool isDeleteButton = false);
        result DeleteInputField(int groupIndex, int itemIndex);
        void SetThumbnailControls(Tizen::Ui::Controls::TableViewItem& item, bool isUpdated = false);
+       void SetNameFields(Tizen::Ui::Controls::TableViewItem& item);
 
        void AddHorizontalDivider(Tizen::Ui::Controls::TableViewItem* pItem, int positionY, int width);
        void AddVerticalDivider(Tizen::Ui::Controls::TableViewItem* pItem, int positionX, int positionY);
index b3b44b1..ccf2ad2 100644 (file)
@@ -3,13 +3,12 @@
        This XML file was automatically generated by UiBuilder - do not modify by hand.
 -->
 <!DOCTYPE Scene SYSTEM "UIForm.dtd">
-
-<Scene Bversion="3.0.0.201212051713" Dversion="20120315">
+<Scene Bversion="2.0.0.201304041646" Dversion="20120315">
     <LogicalCoordinate>720</LogicalCoordinate>
     <Form id="IDL_GROUP_SELECTOR_FORM">
-        <property backgroundColor="" backgroundColorOpacity="100" orientation="Portrait" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
-        <layout mode="Portrait" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="NONE"/>
-        <layout mode="Landscape" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="NONE"/>
+        <property backgroundColor="" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Portrait" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+        <layout mode="Portrait" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
+        <layout mode="Landscape" style="FORM_STYLE_INDICATOR|FORM_STYLE_HEADER|FORM_STYLE_FOOTER" type="LAYOUT_RELATIVE"/>
     </Form>
     <Footer>
         <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false"/>
         <property backgroundBitmapPath="" color="" colorOpacity="100" descriptionText="" descriptionTextColor="" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" headerStyle="HEADER_STYLE_TITLE" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" titleIconPath="" titleText="::IDS_PB_HEADER_SELECT_GROUP" titleTextColor=""/>
         <itemSet/>
     </Header>
-    <Label id="IDC_LABEL" parent="IDL_GROUP_SELECTOR_FORM">
-        <property backgroundBitmapPath="" backgroundColor="#444444" backgroundColorOpacity="100" horizontalAlign="ALIGN_LEFT" text="::IDS_COM_POP_SELECTED" textColor="#FFFFFF" textSize="32" textStyle="LABEL_TEXT_STYLE_BOLD" verticalAlign="ALIGN_MIDDLE"/>
-        <layout height="48" mode="Portrait" width="720" x="0" y="963"/>
-        <layout height="52" mode="Landscape" width="533" x="190" y="411"/>
-    </Label>
     <ListView id="IDC_LISTVIEW" parent="IDL_GROUP_SELECTOR_FORM">
-        <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" bitmapPathOfEmptyList="" colorOfEmptyListText="" fastScroll="false" itemDivider="true" itemDividerColor="" sweepEnabled="false" textOfEmptyList="::IDS_PB_HEADER_NO_GROUP"/>
-        <layout height="963" mode="Portrait" width="720" x="0" y="0"/>
-        <layout height="124" mode="Landscape" width="730" x="218" y="205"/>
+        <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" bitmapPathOfEmptyList="" colorOfEmptyListText="" fastScroll="false" itemDivider="true" itemDividerColor="" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" sweepEnabled="false" textOfEmptyList="::IDS_PB_HEADER_NO_GROUP"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="963.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="124.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="730.0" x="218.0" y="205.0"/>
     </ListView>
+    <Label id="IDC_LABEL" parent="IDL_GROUP_SELECTOR_FORM">
+        <property backgroundBitmapPath="" backgroundColor="#444444" backgroundColorOpacity="100" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="::IDS_COM_POP_SELECTED" textColor="#FFFFFF" textSize="32.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+        <layout bottomRelation="IDL_GROUP_SELECTOR_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="48.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="963.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="190.0" y="411.0"/>
+    </Label>
 </Scene>
index 74fdb54..a5c940c 100644 (file)
@@ -1581,7 +1581,17 @@ ContactDetailsForm::LaunchAppControl(const Tizen::App::AppId& appId, const Tizen
        }
        else if (appId.Equals(String(PROVIDER_ID_MESSAGE)) && operationId.Equals(String(OPERATION_ID_COMPOSE)))
        {
-               extraData.Add(new (std::nothrow) String(INPUT_KEY_MESSAGE_TO), new (std::nothrow) String(value));
+               String recipientAddress;
+
+               if (value.IsEmpty())
+               {
+                       recipientAddress.Append(__pPresentationModel->GetValue(DETAIL_PROPERTY_DEFAULT_PHONE_NUMBER));
+               }
+               else
+               {
+                       recipientAddress.Append(value);
+               }
+               extraData.Add(new (std::nothrow) String(INPUT_KEY_MESSAGE_TO), new (std::nothrow) String(recipientAddress));
                extraData.Add(new (std::nothrow) String(INPUT_KEY_MESSAGE_TYPE), new (std::nothrow) String(INPUT_TYPE_SMS));
        }
        else if (appId.Equals(String(PROVIDER_ID_FILEMANAGER)) && operationId.Equals(String(OPERATION_ID_PICK)))
index 83e4948..f1dd1be 100644 (file)
@@ -501,7 +501,7 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio
                                __pCurrentFocusedItem = null;
                        }
 
-                       __pTableView->UpdateTableView();
+                       __pTableView->RefreshItem(TABLE_VIEW_NAME_FIELD_INDEX, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
 
                        Rectangle clientBounds = GetClientAreaBounds();
                        __pTableView->SetSize(clientBounds.width, clientBounds.height);
@@ -558,8 +558,7 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio
 
                        ChangeNameFieldStatus();
 
-                       __pTableView->ScrollToItem(TABLE_VIEW_THUMBNAIL_FIELD_INDEX, -1);
-                       __pTableView->UpdateTableView();
+                       __pTableView->RefreshItem(TABLE_VIEW_NAME_FIELD_INDEX, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
                        __pTableView->ScrollToItem(TABLE_VIEW_NAME_FIELD_INDEX, 0);
                }
                break;
@@ -570,8 +569,7 @@ ContactEditorForm::OnActionPerformed(const Tizen::Ui::Control& source, int actio
 
                        ChangeNameFieldStatus();
 
-                       __pTableView->ScrollToItem(TABLE_VIEW_THUMBNAIL_FIELD_INDEX, -1);
-                       __pTableView->UpdateTableView();
+                       __pTableView->RefreshItem(TABLE_VIEW_NAME_FIELD_INDEX, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
                        __pTableView->ScrollToItem(TABLE_VIEW_NAME_FIELD_INDEX, 0);
                }
                break;
@@ -1255,6 +1253,13 @@ ContactEditorForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls
                        pItem->Invalidate(true);
                }
                break;
+       case TABLE_VIEW_NAME_FIELD_INDEX:
+               {
+                       pItem->RemoveAllControls();
+                       SetNameFields(*pItem);
+                       Invalidate(true);
+               }
+           break;
        case TABLE_VIEW_GROUP_RINGTONE_FIELD_INDEX:
                {
                        String valueString;
@@ -1338,6 +1343,19 @@ ContactEditorForm::GetThumbnailField(int itemWidth)
 Tizen::Ui::Controls::TableViewItem*
 ContactEditorForm::GetNameFields(int itemWidth)
 {
+       __pNameFieldItem = new (std::nothrow) TableViewItem();
+       __pNameFieldItem->Construct(Dimension(itemWidth, H_ITEM));
+       __pNameFieldItem->SetBackgroundColor(Color(0), TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
+
+       SetNameFields(*__pNameFieldItem);
+
+       return __pNameFieldItem;
+}
+
+void
+ContactEditorForm::SetNameFields(Tizen::Ui::Controls::TableViewItem& item)
+{
+       int itemWidth = item.GetWidth();
        int itemHeight = H_ITEM;
 
        if (__isExpandable == true)
@@ -1355,9 +1373,7 @@ ContactEditorForm::GetNameFields(int itemWidth)
                }
        }
 
-       __pNameFieldItem = new (std::nothrow) TableViewItem();
-       __pNameFieldItem->Construct(Dimension(itemWidth, itemHeight), TABLE_VIEW_ANNEX_STYLE_NORMAL);
-       __pNameFieldItem->SetBackgroundColor(Color(0), TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
+       item.SetSize(itemWidth, itemHeight);
 
        Rectangle itemBounds(W_ITEM_GAP, 0, itemWidth - (W_ITEM_GAP * 3) - H_BUTTON, H_ITEM);
 
@@ -1372,7 +1388,7 @@ ContactEditorForm::GetNameFields(int itemWidth)
                pFirstName->SetText(__pPresentationModel->GetValue(DETAIL_PROPERTY_FIRST_NAME));
                pFirstName->AddTextEventListener(*this);
 
-               __pNameFieldItem->AddControl(*pFirstName);
+               item.AddControl(*pFirstName);
 
                itemBounds.y += pFirstName->GetHeight();
                EditField* pMiddleName = new (std::nothrow) EditField();
@@ -1383,7 +1399,7 @@ ContactEditorForm::GetNameFields(int itemWidth)
                pMiddleName->SetName(ResourceManager::GetString(L"IDS_PB_BODY_MIDDLE_NAME"));
                pMiddleName->SetText(__pPresentationModel->GetValue(DETAIL_PROPERTY_MIDDLE_NAME));
 
-               __pNameFieldItem->AddControl(*pMiddleName);
+               item.AddControl(*pMiddleName);
 
                itemBounds.y += pMiddleName->GetHeight();
                EditField* pLastName = new (std::nothrow) EditField();
@@ -1395,7 +1411,7 @@ ContactEditorForm::GetNameFields(int itemWidth)
                pLastName->SetText(__pPresentationModel->GetValue(DETAIL_PROPERTY_LAST_NAME));
                pLastName->AddTextEventListener(*this);
 
-               __pNameFieldItem->AddControl(*pLastName);
+               item.AddControl(*pLastName);
 
                itemBounds.y += pLastName->GetHeight();
                EditField* pSuffix = new (std::nothrow) EditField();
@@ -1406,7 +1422,7 @@ ContactEditorForm::GetNameFields(int itemWidth)
                pSuffix->SetName(ResourceManager::GetString(L"IDS_PB_BODY_SUFFIX"));
                pSuffix->SetText(__pPresentationModel->GetValue(DETAIL_PROPERTY_NAME_SUFFIX));
 
-               __pNameFieldItem->AddControl(*pSuffix);
+               item.AddControl(*pSuffix);
 
                itemBounds.y += pSuffix->GetHeight();
                EditField* pNickName = new (std::nothrow) EditField();
@@ -1417,7 +1433,7 @@ ContactEditorForm::GetNameFields(int itemWidth)
                pNickName->SetName(ResourceManager::GetString(L"IDS_PB_BODY_NICKNAME"));
                pNickName->SetText(__pPresentationModel->GetValue(DETAIL_PROPERTY_NICK_NAME));
 
-               __pNameFieldItem->AddControl(*pNickName);
+               item.AddControl(*pNickName);
 
                itemBounds.y += pNickName->GetHeight();
                if (__isJobTitleEnabled == true)
@@ -1430,7 +1446,7 @@ ContactEditorForm::GetNameFields(int itemWidth)
                        pJobTitle->SetName(ResourceManager::GetString(L"IDS_PB_BODY_JOB_TITLE"));
                        pJobTitle->SetText(__pPresentationModel->GetValue(DETAIL_PROPERTY_JOB_TITLE));
 
-                       __pNameFieldItem->AddControl(*pJobTitle);
+                       item.AddControl(*pJobTitle);
 
                        itemBounds.y += pJobTitle->GetHeight();
                }
@@ -1445,7 +1461,7 @@ ContactEditorForm::GetNameFields(int itemWidth)
                        pDepartment->SetName(ResourceManager::GetString(L"IDS_PB_BODY_DEPARTMENT"));
                        pDepartment->SetText(__pPresentationModel->GetValue(DETAIL_PROPERTY_DEPARTMENT));
 
-                       __pNameFieldItem->AddControl(*pDepartment);
+                       item.AddControl(*pDepartment);
 
                        itemBounds.y += pDepartment->GetHeight();
                }
@@ -1458,7 +1474,7 @@ ContactEditorForm::GetNameFields(int itemWidth)
                pCompanyName->SetName(ResourceManager::GetString(L"IDS_PB_BODY_COMPANY"));
                pCompanyName->SetText(__pPresentationModel->GetValue(DETAIL_PROPERTY_COMPANY));
 
-               __pNameFieldItem->AddControl(*pCompanyName);
+               item.AddControl(*pCompanyName);
        }
        else
        {
@@ -1483,7 +1499,7 @@ ContactEditorForm::GetNameFields(int itemWidth)
                        pName->AppendText(CHARACTER_SPACE + lastName);
                }
 
-               __pNameFieldItem->AddControl(*pName);
+               item.AddControl(*pName);
        }
 
        Button* pButtonExpand = new (std::nothrow) Button();
@@ -1532,9 +1548,7 @@ ContactEditorForm::GetNameFields(int itemWidth)
                delete pBitmapPressed;
        }
 
-       __pNameFieldItem->AddControl(*pButtonExpand);
-
-       return __pNameFieldItem;
+       item.AddControl(*pButtonExpand);
 }
 
 Tizen::Ui::Controls::TableViewItem*
index aec4cd1..3510fe2 100644 (file)
@@ -356,7 +356,7 @@ GroupListEditorPanel::CreateItem(int groupIndex, int itemIndex, int itemWidth)
        adjustedNameWidth = itemWidth - (TableViewItem::GetAnnexWidth(TABLE_VIEW_ANNEX_STYLE_MARK) + X_LIST_ITEM_TEXT_MARGIN + W_BUTTON_EDIT_GROUP + W_THUMBNAIL + (X_THUMBNAIL_GAP * 2) + (countSize.width + W_ELEMENT_GAP * 2));
        if (groupNameSize.width < adjustedNameWidth)
        {
-               adjustedNameWidth = groupNameSize.width + W_ELEMENT_GAP;
+               adjustedNameWidth = groupNameSize.width + W_ELEMENT_GAP + 1;
        }
 
        Label* pLabelGroupName = new (std::nothrow) Label();
index 917c0de..bf28edf 100644 (file)
@@ -378,9 +378,9 @@ GroupListPanel::CreateItem(int groupIndex, int itemIndex, int itemWidth)
        font.GetTextExtent(groupNameString, groupNameString.GetLength(), groupNameSize);
 
        adjustedNameWidth = itemWidth - (W_THUMBNAIL + (X_TEXT * 2) + (countSize.width + W_ELEMENT_GAP * 2));
-       if (groupNameSize.width < itemWidth - (W_THUMBNAIL + (X_TEXT * 2) + (countSize.width + W_ELEMENT_GAP * 2)))
+       if (groupNameSize.width < adjustedNameWidth)
        {
-               adjustedNameWidth = groupNameSize.width;
+               adjustedNameWidth = groupNameSize.width + 1;
        }
 
        pItem->AddElement(Rectangle(X_TEXT, 0, adjustedNameWidth, H_ITEM), 1, groupNameString, FONT_SIZE_GROUP_NAME, COLOR_ITEM_TEXT_NORMAL, COLOR_ITEM_TEXT_PRESSED, COLOR_ITEM_TEXT_PRESSED, true);