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_ */
return;
}
+ __currentFocusedItem.Clear();
if (__pPresentationModel->GetCategoryCount() > 0)
{
IList* pCategoryList = __pPresentationModel->GetAssignedCategoryIdListN();
return;
}
+ __currentFocusedItem.Clear();
result r = LaunchAppControl(PROVIDER_ID_FILEMANAGER, OPERATION_ID_PICK);
TryReturnVoid(r == E_SUCCESS, "[%s] Unable to launch appcontrol", GetErrorMessage(r));
}
TryReturnVoid(pContactsApp != null, "Unable to get ContactsApp instance.");
InitializeDetailItemList();
+ __pFavoriteButton = null;
+ __pClearButton = null;
__pTableView->UpdateTableView();
if (__currentFocusedItem == Integer::ToString(IDA_FAVORITE_BUTTON))
__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)
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
{
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;
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);
}
__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);
__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);
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
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)
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;
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()))
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);
}
String groupNameString;
int contactCount = 0;
String contactCountString;
- Bitmap* pThumbnail = null;
bool isNotAssinged = false;
int adjustedNameWidth;
Dimension countSize;
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)
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;