NABI_SE Issue fix 54243 54185 54293 54549 54398 54284 54434 54315 54404 54546 54411
authorkamesh <kamesh.kvss@samsung.com>
Mon, 7 Oct 2013 14:44:36 +0000 (20:14 +0530)
committerkamesh <kamesh.kvss@samsung.com>
Mon, 7 Oct 2013 14:44:36 +0000 (20:14 +0530)
Change-Id: I6b6518eaa2c69d0125e4eec248d65764bc64089a

inc/CtTypes.h
src/CtContactDetailsForm.cpp
src/CtContactEditorForm.cpp
src/CtContactListPanel.cpp
src/CtGroupContactListEditorForm.cpp
src/CtGroupListPanel.cpp
src/CtTypes.cpp

index 6bb99a4..9810a93 100644 (file)
@@ -259,4 +259,6 @@ extern const int FONT_SIZE_SAVE_BUTTON;
 extern const int FONT_SIZE_DELETE_CONFIRM;
 extern const int FONT_SIZE_DELETE_BUTTON;
 
+extern const int BIRTHDAY_MIN_YEAR_DIFF;
+
 #endif /* _CT_TYPES_H_ */
index 8ecc1fb..3b1cafe 100644 (file)
@@ -1581,6 +1581,7 @@ ContactDetailsForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView&
                                return;
                        }
 
+                       __currentFocusedItem.Clear();
                        if (__pPresentationModel->GetCategoryCount() > 0)
                        {
                                IList* pCategoryList = __pPresentationModel->GetAssignedCategoryIdListN();
@@ -1604,6 +1605,7 @@ ContactDetailsForm::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView&
                                return;
                        }
 
+                       __currentFocusedItem.Clear();
                        result r = LaunchAppControl(PROVIDER_ID_FILEMANAGER, OPERATION_ID_PICK);
                        TryReturnVoid(r == E_SUCCESS, "[%s] Unable to launch appcontrol", GetErrorMessage(r));
                }
@@ -1832,6 +1834,8 @@ ContactDetailsForm::OnContactsChanged(void)
                TryReturnVoid(pContactsApp != null, "Unable to get ContactsApp instance.");
 
                InitializeDetailItemList();
+               __pFavoriteButton = null;
+               __pClearButton = null;
                __pTableView->UpdateTableView();
 
                if (__currentFocusedItem == Integer::ToString(IDA_FAVORITE_BUTTON))
@@ -1841,20 +1845,6 @@ ContactDetailsForm::OnContactsChanged(void)
                                __pFavoriteButton->SetFocus();
                        }
                }
-               else if (__currentFocusedItem == Integer::ToString(DETAIL_PROPERTY_GROUP))
-               {
-                       if (__pGroupsItem != null)
-                       {
-                               __pGroupsItem->SetFocus();
-                       }
-               }
-               else if (__currentFocusedItem == Integer::ToString(DETAIL_PROPERTY_RINGTONE))
-               {
-                       if (__pRingtoneItem != null)
-                       {
-                               __pRingtoneItem->SetFocus();
-                       }
-               }
                else if (__currentFocusedItem == Integer::ToString(IDA_BUTTON_RINGTONE_CLEAR))
                {
                        if (__pClearButton != null)
@@ -1911,6 +1901,18 @@ ContactDetailsForm::LaunchAppControl(const Tizen::App::AppId& appId, const Tizen
                if (value.IsEmpty())
                {
                        recipientAddress.Append(__pPresentationModel->GetValue(DETAIL_PROPERTY_DEFAULT_PHONE_NUMBER));
+                       int index = -1;
+                       recipientAddress.IndexOf(DELIMITER_SEMICOLON, 0, index);
+                       if (index >= 0)
+                       {
+                               recipientAddress.SubString(0, index, recipientAddress);
+                       }
+                       index = -1;
+                       recipientAddress.IndexOf(DELIMITER_COMMA, 0, index);
+                       if (index >= 0)
+                       {
+                               recipientAddress.SubString(0, index, recipientAddress);
+                       }
                }
                else
                {
index 6118184..901dbd9 100644 (file)
@@ -136,7 +136,6 @@ static const int NAME_FIELD_ITEM_COUNT = 1;
 static const int EDIT_FIELD_EXTENDED_LENGTH = 100;
 
 static const int MESSAGE_BOX_TIMEOUT_MS = 300000;
-static const int BIRTHDAY_MIN_YEAR_DIFF = 100;
 
 static const int DEFAULT_EXPAND_NAME_FIELD_COUNT = 6;
 
@@ -2207,6 +2206,12 @@ ContactEditorForm::GetBirthdayField(int itemWidth)
        max = currentDate.GetYear();
        pBirthday->SetYearRange(max - BIRTHDAY_MIN_YEAR_DIFF, max);
 
+       if (birthdayDate.GetYear() < (currentDate.GetYear() - BIRTHDAY_MIN_YEAR_DIFF))
+       {
+               birthdayDate.SetValue(currentDate.GetYear() - BIRTHDAY_MIN_YEAR_DIFF, birthdayDate.GetMonth(), birthdayDate.GetDay());
+               __pPresentationModel->SetBirthday(birthdayDate);
+       }
+
        TableViewItem* pBirthdayItem = new (std::nothrow) TableViewItem();
        pBirthdayItem->Construct(Dimension(itemWidth, H_ITEM), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        pBirthdayItem->SetBackgroundColor(COLOR_THUMBNAIL_BACKGROUND, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
@@ -2296,7 +2301,7 @@ ContactEditorForm::GetNoteField(int itemWidth)
        }
 
        __pNoteFieldItem = new (std::nothrow) TableViewItem();
-       __pNoteFieldItem->Construct(Dimension(itemWidth, H_DOUBLE_LINE_ITEM + pContactsApp->GetListItemSingleLineHeight()), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+       __pNoteFieldItem->Construct(Dimension(itemWidth, pContactsApp->GetListItemSingleLineHeight() + Y_EDIT_FIELD_GAP), TABLE_VIEW_ANNEX_STYLE_NORMAL);
        __pNoteFieldItem->SetBackgroundColor(COLOR_THUMBNAIL_BACKGROUND, TABLE_VIEW_ITEM_DRAWING_STATUS_NORMAL);
        __pNoteFieldItem->SetBackgroundColor(COLOR_THUMBNAIL_BACKGROUND, TABLE_VIEW_ITEM_DRAWING_STATUS_PRESSED);
 
@@ -2309,7 +2314,7 @@ ContactEditorForm::GetNoteField(int itemWidth)
        __pNoteFieldItem->AddControl(pNoteTitle);
 
        ExpandableEditArea* pNoteEditArea = new (std::nothrow) ExpandableEditArea();
-       pNoteEditArea->Construct(Rectangle(Y_EDIT_FIELD_GAP, H_LABEL, itemWidth - H_EDIT_FIELD_GAP, H_DOUBLE_LINE_ITEM + pContactsApp->GetListItemSingleLineHeight() - H_LABEL - H_EDIT_FIELD_GAP), 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, pContactsApp->GetListItemSingleLineHeight() - H_LABEL + Y_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);
@@ -3807,6 +3812,34 @@ ContactEditorForm::OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen
 void
 ContactEditorForm::OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
 {
+       Panel* pPanel = null;
+
+       if (source.GetName().Equals(GROUP_STYLE_PANEL, true))
+       {
+               pPanel = static_cast<Panel*>(&(const_cast<Control&>(source)));
+       }
+       else if (source.GetName().Equals(GROUP_LABEL_TITLE, true) || source.GetName().Equals(GROUP_LABEL_VALUE, true))
+       {
+               pPanel = static_cast<Panel*>(source.GetParent());
+       }
+
+       if (pPanel != null)
+       {
+               pPanel->SetBackgroundColor(COLOR_THUMBNAIL_BACKGROUND);
+
+               Label* pLabelValue = static_cast<Label*>(pPanel->GetControl(GROUP_LABEL_VALUE, true));
+               pLabelValue->SetTextColor(Color(COLOR_ITEM_VALUE));
+
+               Label* pLabelTitle = static_cast<Label*>(pPanel->GetControl(GROUP_LABEL_TITLE, true));
+               pLabelTitle->SetTextColor(COLOR_ITEM_TITLE);
+
+               pPanel->Invalidate(true);
+       }
+
+       if (__isScrollOccurred || source.Contains(currentPosition) == false)
+       {
+               return;
+       }
 }
 
 void
index 4a0d3d9..7e2c212 100644 (file)
@@ -243,25 +243,32 @@ ContactListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int action
        Form* pForm = dynamic_cast<Form*>(GetParent());
        AppAssert(pForm);
 
-       if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
-       {
-               __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
-       }
-
        switch (actionId)
        {
        case IDA_HEADER_CONTACTS:
                {
+                       if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
+                       {
+                               __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
+                       }
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTACT_LIST));
                }
                break;
        case IDA_HEADER_GROUPS:
                {
+                       if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
+                       {
+                               __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
+                       }
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_GROUP_LIST));
                }
                break;
        case IDA_HEADER_FAVORITES:
                {
+                       if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
+                       {
+                               __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
+                       }
                        if (pContactsApp->GetOperationId() == OPERATION_ID_PICK)
                        {
                                if (pContactsApp->GetSelectionMode() == APP_CONTROL_SELECTION_MODE_SINGLE)
@@ -281,6 +288,10 @@ ContactListPanel::OnActionPerformed(const Tizen::Ui::Control& source, int action
                break;
        case IDA_FOOTER_CREATE:
                {
+                       if (__pSearchBar->GetMode() == SEARCH_BAR_MODE_INPUT)
+                       {
+                               __pSearchBar->SetMode(SEARCH_BAR_MODE_NORMAL);
+                       }
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTACT_EDITOR, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
                }
                break;
@@ -733,6 +744,18 @@ ContactListPanel::OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::
                        if (!(__pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex).IsEmpty()))
                        {
                                String phoneNumber = __pPresentationModel->GetDefaultPhoneNumber(groupIndex, itemIndex);
+                               int index = -1;
+                               phoneNumber.IndexOf(DELIMITER_SEMICOLON, 0, index);
+                               if (index >= 0)
+                               {
+                                       phoneNumber.SubString(0, index, phoneNumber);
+                               }
+                               index = -1;
+                               phoneNumber.IndexOf(DELIMITER_COMMA, 0, index);
+                               if (index >= 0)
+                               {
+                                       phoneNumber.SubString(0, index, phoneNumber);
+                               }
                                LaunchAppControl(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE, phoneNumber, INPUT_TYPE_SMS);
                        }
                        else if (!(__pPresentationModel->GetDefaultEmail(groupIndex, itemIndex).IsEmpty()))
index f53262f..c640ef7 100644 (file)
@@ -1168,6 +1168,19 @@ GroupContactListEditorForm::LaunchAppControl(void)
                while (pMapEnum->MoveNext() == E_SUCCESS)
                {
                        String* pValue = static_cast<String*> (pMapEnum->GetValue());
+                       int index = -1;
+                       pValue->IndexOf(DELIMITER_SEMICOLON, 0, index);
+                       if (index >= 0)
+                       {
+                               pValue->SubString(0, index, *pValue);
+                       }
+                       index = -1;
+                       pValue->IndexOf(DELIMITER_COMMA, 0, index);
+                       if (index >= 0)
+                       {
+                               pValue->SubString(0, index, *pValue);
+                       }
+
                        toValue.Append(*pValue);
                        toValue.Append(DELIMITER_COMMA);
                }
index bf91c21..1a4f1be 100644 (file)
@@ -373,7 +373,6 @@ GroupListPanel::CreateItem(int groupIndex, int itemIndex, int itemWidth)
        String groupNameString;
        int contactCount = 0;
        String contactCountString;
-       Bitmap* pThumbnail = null;
        bool isNotAssinged = false;
        int adjustedNameWidth;
        Dimension countSize;
@@ -413,11 +412,15 @@ GroupListPanel::CreateItem(int groupIndex, int itemIndex, int itemWidth)
        pItem->AddElement(Rectangle(X_TEXT, 0, adjustedNameWidth, pContactsApp->GetListItemSingleLineHeight()), 1, groupNameString, pContactsApp->GetFontSize(), COLOR_ITEM_TEXT_NORMAL, COLOR_ITEM_TEXT_PRESSED, COLOR_ITEM_TEXT_PRESSED, true);
        pItem->AddElement(Rectangle(X_TEXT + adjustedNameWidth + W_ELEMENT_GAP, 0, countSize.width + 1, pContactsApp->GetListItemSingleLineHeight()), 2, contactCountString, pContactsApp->GetFontSize(), COLOR_ITEM_TEXT_NORMAL, COLOR_ITEM_TEXT_PRESSED, COLOR_ITEM_TEXT_PRESSED, true);
 
-       pThumbnail = __pPresentationModel->GetThumbnailN(itemIndex);
-       if (pThumbnail != null)
+       if (contactCount > 0)
        {
-               pItem->AddElement(Rectangle(itemWidth - W_THUMBNAIL - X_TEXT, (pContactsApp->GetListItemSingleLineHeight() - H_THUMBNAIL)/2, W_THUMBNAIL, H_THUMBNAIL), 0, *pThumbnail);
-               delete pThumbnail;
+               Bitmap* pThumbnail = null;
+               pThumbnail = __pPresentationModel->GetThumbnailN(itemIndex);
+               if (pThumbnail != null)
+               {
+                       pItem->AddElement(Rectangle(itemWidth - W_THUMBNAIL - X_TEXT, (pContactsApp->GetListItemSingleLineHeight() - H_THUMBNAIL)/2, W_THUMBNAIL, H_THUMBNAIL), 0, *pThumbnail);
+                       delete pThumbnail;
+               }
        }
 
        if (pContactsApp->GetOperationId().IsEmpty() == false)
index 4444e88..d9a659d 100644 (file)
@@ -144,3 +144,5 @@ const int FONT_SIZE_SAVE_CONFIRM = 42;
 const int FONT_SIZE_SAVE_BUTTON = 36;
 const int FONT_SIZE_DELETE_CONFIRM = 42;
 const int FONT_SIZE_DELETE_BUTTON = 36;
+
+const int BIRTHDAY_MIN_YEAR_DIFF = 100;