int __volumeLevel;\r
bool __isLaunchedAsForward;\r
bool __isTypeAlreadyMms;\r
-\r
+ bool __isOverlapping; // message compose panel and recipient panel\r
+ int __sizeToReduce;\r
+ int __isDraftMessage;\r
};\r
\r
#endif //_MSG_COMPOSE_FORM_H_\r
REQUEST_MSGCOMPOSEPANEL_BUTTON_STATE,
REQUEST_HEADER_BUTTON_STATE,
REQUEST_HIDE_RECIPIENT_LIST,
+ REQUEST_SET_MAXIMUM_SIZE,
};
enum SpamFilterType
break;\r
\r
case MSG_ICON_SIP_CLOSE:\r
- pngFile.Append("M01_input_close.png");\r
+ pngFile.Append("00_icon_SIP_close_ef.png");\r
break;\r
\r
case MSG_ICON_SIP_CLOSE_PRESS:\r
- pngFile.Append("M01_input_close.png");\r
+ pngFile.Append("00_icon_SIP_close.png");\r
break;\r
\r
default:\r
, __volumeLevel(-1)
, __isLaunchedAsForward(false)
, __isTypeAlreadyMms(false)
+ , __isOverlapping(false)
+ , __isDraftMessage(false)
{
//Empty implementation
}
delete __pDurationPopup;
__pDurationPopup = null;
}
- // Set Focus to editor.
-// if (__pRecipientPanel->GetRecipientCount() > 0)
-// {
-// __pMsgComposePanel->SetFocusToLastPage();
-// }
-// else
-// {
-// __pRecipientPanel->SetFocus();
-// }
+ }
+ break;
+
+ case REQUEST_SET_MAXIMUM_SIZE:
+ {
+ if(__pRecipientPanel && __pMsgComposePanel)
+ {
+ Rectangle clientArea = GetClientAreaBounds();
+ __pMsgComposePanel->SetMaximumSize(Dimension(__pMsgComposePanel->GetWidth(), clientArea.height - __pRecipientPanel->GetHeight()));
+ if(__pMsgComposePanel->GetHeight() == __pMsgComposePanel->GetMaximumSize().height)
+ {
+ __isOverlapping = true;
+ }
+ }
}
break;
const SceneId& currentSceneId, IList* pArgs)
{
AppLogDebug("ENTER");
-
+ SetFocus();
__pRecipientPanel->SetFocus();
// Set editor text based on font settings
__pDraftMessageEntry = (MessageData*) pArgs->GetAt(1);
pArgs->RemoveAt(1);
LoadDraftMessage();
+ __isDraftMessage = true;
}
break;
}
ComposerForm::OnSizeIncrease(const Control& control)
{
AppLogDebug("ENTER");
-
Rectangle clientArea = GetClientAreaBounds();
int panelHeight = __pMsgComposePanel->GetDisplayHeight();
if (__pRecipientPanel->Equals(control))
{
//Check if compose panel overlap with recipient panel
- int recipientPanelEndPosY = __pRecipientPanel->GetY() + __pRecipientPanel->GetHeight();
+ int recipientPanelEndPosY = __pRecipientPanel->GetY() + __pRecipientPanel->GetHeight() + 1;
int composePanelPosY = __pMsgComposePanel->GetY();
+ __isOverlapping = (recipientPanelEndPosY == composePanelPosY);
if (recipientPanelEndPosY > composePanelPosY)
{
- int sizeToReduce = recipientPanelEndPosY - composePanelPosY;
+ __isOverlapping = true;
+ __sizeToReduce = recipientPanelEndPosY - composePanelPosY;
__pMsgComposePanel->SetBounds(Rectangle(__pMsgComposePanel->GetX(), recipientPanelEndPosY,
- __pMsgComposePanel->GetWidth(), (panelHeight - sizeToReduce)));
+ __pMsgComposePanel->GetWidth(), (panelHeight - __sizeToReduce)));
+ __pMsgComposePanel->Invalidate(true);
}
}
else if (__pMsgComposePanel->Equals(control))
{
Point currentPosition = __pMsgComposePanel->GetPosition();
- __pMsgComposePanel->SetBounds(Rectangle(currentPosition.x, clientArea.height - panelHeight,
+ int recipientPanelEndPosY = __pRecipientPanel->GetY() + __pRecipientPanel->GetHeight() + 1;
+ int composePanelPosY = __pMsgComposePanel->GetY();
+ if (recipientPanelEndPosY > composePanelPosY)
+ {
+ // last page is not getting focus. That is why this if condition. Ideally this if cond not required.
+ // Have to find a way out of this.
+ __pMsgComposePanel->SetBounds(Rectangle(currentPosition.x, recipientPanelEndPosY,
+ __pMsgComposePanel->GetWidth(), panelHeight)); // doubtful about this code
+ }
+ else
+ {
+ __pMsgComposePanel->SetBounds(Rectangle(currentPosition.x, clientArea.height - panelHeight,
__pMsgComposePanel->GetWidth(), panelHeight));
+ }
__pMsgComposePanel->SetShowState(true);
}
AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
void
ComposerForm::OnSizeDecrease(const Control& control)
{
- AppLogDebug("ENTER");
-
Rectangle clientArea = GetClientAreaBounds();
if (__pRecipientPanel->Equals(control))
{
- // TODO:
+ int recipientPanelEndPosY;
+ if(__isOverlapping)
+ {
+ __isOverlapping = false;
+ recipientPanelEndPosY = __pRecipientPanel->GetY() + __pRecipientPanel->GetHeight() + 1;
+ int sizeToIncrease = __pMsgComposePanel->GetY() - recipientPanelEndPosY;
+ __pMsgComposePanel->SetMaximumSize(Dimension(__pMsgComposePanel->GetWidth(), clientArea.height - __pRecipientPanel->GetHeight()));
+ __pMsgComposePanel->SetBounds(Rectangle(__pMsgComposePanel->GetX(), recipientPanelEndPosY,
+ __pMsgComposePanel->GetWidth(), (__pMsgComposePanel->GetHeight() + sizeToIncrease)));
+ return; // Reason: Set bounds in this if condition and the following condition are doing the same job and which is why the repetition can be avoided in draft composer
+ //form
+ }
+ if(__isDraftMessage)
+ {
+ if(__pMsgComposePanel->GetHeight() >= __pMsgComposePanel->GetMaximumSize().height)
+ {
+ recipientPanelEndPosY = __pRecipientPanel->GetY() + __pRecipientPanel->GetHeight() + 1;
+ int prevMaxHeight = __pMsgComposePanel->GetMaximumSize().height;
+ __pMsgComposePanel->SetMaximumSize(Dimension(__pMsgComposePanel->GetWidth(), clientArea.height - __pRecipientPanel->GetHeight()));
+ int currentMaxHeight = __pMsgComposePanel->GetMaximumSize().height;
+ __pMsgComposePanel->SetBounds(Rectangle(__pMsgComposePanel->GetX(), recipientPanelEndPosY,
+ __pMsgComposePanel->GetWidth(), (__pMsgComposePanel->GetHeight() + (currentMaxHeight - prevMaxHeight))));
+ }
+ }
+ __isOverlapping = (recipientPanelEndPosY == __pMsgComposePanel->GetY());
}
else if (__pMsgComposePanel->Equals(control))
{
{
case IDA_HEADER_BACK:
{
+ __pMsgComposePanel->HideKeypad();
+ __pRecipientPanel->HideKeypad();
MessageComposeData* pComposeData = __pMsgComposePanel->GetMessageComposeDataN();
if (((!pComposeData) && (__pRecipientPanel->IsTextForTokenExist() || __pRecipientPanel->GetRecipientCount() > 0)) ||
((pComposeData) && (__pRecipientPanel->IsTextForTokenExist() || __pRecipientPanel->GetRecipientCount() <= 0)))
}
else
{
- __pMsgComposePanel->HideKeypad();
- __pRecipientPanel->HideKeypad();
if (pComposeData)
{
// Save message to draft
case IDA_DISCARD_MESSAGE_OK:
{
- __pMsgComposePanel->HideKeypad();
- __pRecipientPanel->HideKeypad();
-
DestroyMessagePopup();
// remove draft entry
if (__pDraftMessageEntry)
ArrayList* pAddressList = const_cast<ArrayList*>(__pDraftMessageEntry->GetAddressList());
__pRecipientPanel->SetRecipientList(pAddressList);
// Set Body text.
+
+ if (__pRecipientPanel)
+ {
+ Rectangle rect = GetClientAreaBounds();
+ __pMsgComposePanel->SetMaximumSize(Dimension(__pMsgComposePanel->GetWidth(), rect.height - __pRecipientPanel->GetHeight()));
+ }
__pMsgComposePanel->LoadMessageData(*__pDraftMessageEntry);
}
}
delete pComposeData;
}
- __pMsgComposePanel->SetFocusToLastPage();
+ // TODO: Focus set to last page done from cleartext.
+ //__pMsgComposePanel->SetFocusToLastPage();
__pMsgComposePanel->ClearText(true);
__pMsgComposePanel->Invalidate(true);
r = RemoveControl(*__pAttachCntrl);
__pAttachCntrl = null;
}
- __pExpandEditArea->SetBounds(0, 0, __prevBounds.width, __prevBounds.height);
+ __pExpandEditArea->SetBounds(0, 0, GetWidth(), MIN_COMPOSE_EDITOR_HEIGHT);
SetSize(GetWidth(), __pExpandEditArea->GetHeight());
AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
return r;
pPageInFocus = static_cast<ComposeBaseControl*>(pImageTextPanel->GetControl(0));
}
MediaTextExpandEditArea* pFocusComposePage = static_cast<MediaTextExpandEditArea*>(pPageInFocus);
- if ((pFocusComposePage->IsAudioExist() && mediaType == MEDIA_TYPE_IMAGE) ||
- (pFocusComposePage->IsImageExist() && mediaType == MEDIA_TYPE_AUDIO) ||
+ if ((pFocusComposePage->IsAudioExist() && mediaType == MEDIA_TYPE_IMAGE && !pFocusComposePage->IsImageExist()) ||
+ (pFocusComposePage->IsImageExist() && mediaType == MEDIA_TYPE_AUDIO && !pFocusComposePage->IsAudioExist()) ||
((mediaType == MEDIA_TYPE_VIDEO) && (!pFocusComposePage->IsAudioExist()) && (!pFocusComposePage->IsImageExist()) && (!pFocusComposePage->IsVideoExist())) ||
((mediaType == MEDIA_TYPE_AUDIO) && (!pFocusComposePage->IsAudioExist()) && (!pFocusComposePage->IsVideoExist())) ||
((mediaType == MEDIA_TYPE_IMAGE) && (!pFocusComposePage->IsVideoExist()) && (!pFocusComposePage->IsImageExist())))
switch (modalResult)
{
case MSGBOX_RESULT_CANCEL:
+ {
+ if (__pCompressProgressPopup)
+ {
+ delete __pCompressProgressPopup;
+ __pCompressProgressPopup = null;
+ }
+ SetFocusToLastPage();
return MSG_RESPONSE_INVALID_MEDIA_TYPE;
+ }
break;
default:
MessageComposePanel::LaunchAppControl(RequestType requestType)
{
AppLogDebug("ENTER");
- result r = E_SUCCESS;
+ result r = E_FAILURE;
AppControl* pAppCntl = null;
String* pUriData = null;
pArgList->Add((new (std::nothrow) Integer(false)));
GetParent()->SendUserEvent(REQUEST_HEADER_BUTTON_STATE, pArgList);
- //GetParent()->SendUserEvent(REQUEST_ENABLE_DISABLE_CONTACT_BUTTON, null);
}
AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
return r;
pArgList->Add((new (std::nothrow) Integer(true)));
requestId = REQUEST_HEADER_BUTTON_STATE;
pCurrentForm->SendUserEvent(requestId, pArgList);
+ requestId = REQUEST_SET_MAXIMUM_SIZE;
+ pCurrentForm->SendUserEvent(requestId, null);
}
}
AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
__pMmsTextBox->SetColor(TEXT_BOX_STATUS_DISABLED, GetBackgroundColor());
Color color = __pMmsTextBox->GetTextColor(TEXT_BOX_TEXT_COLOR_NORMAL);
__pMmsTextBox->SetTextColor(TEXT_BOX_TEXT_COLOR_DISABLED, color);
- // TODO: If touch event listener is added scroll do not work.
- __pMmsTextBox->SetShowState(true);
__pMmsTextBox->AddTouchEventListener(*this);
- __pMmsTextBox->SetEnabled(false);
+ __pMmsTextBox->SetShowState(true);
+ __pMmsTextBox->SetEnabled(true);
}
__pGallery = static_cast<Gallery*>(__pScrollPanel->GetControl(L"IDC_GALLERY_MMS_IMAGE"));
__pGallery->SetShowState(false);
{
AppLogDebug("ENTER");
+ if (IsSlideShowPauseState())
+ {
+ UpdatePlayControl();
+ __isSlideShowInPrgress = true;
+ }
__pTimer->Cancel();
if (__currentSlideIndex < (__pMmsSlideData->GetSlideCount() - 1))
{
{
AppLogDebug("ENTER");
+ if (IsSlideShowPauseState())
+ {
+ UpdatePlayControl();
+ __isSlideShowInPrgress = true;
+ }
+
__pTimer->Cancel();
if (__currentSlideIndex > 0)
{
AppLogDebug("ENTER");\r
result r = E_SUCCESS;\r
r = Container::Construct(rectangle);\r
- __pBgBitmap = BitmapUtility::GetInstance()->GetIconN(MSG_ICON_SEARCH_INPUT_BG);\r
+ // Subject edit filed.\r
+ __pEditArea = new (std::nothrow) EditField();\r
+ __pEditArea->Construct(Rectangle(0, 0, rectangle.width, rectangle.height),\r
+ EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);\r
+ __pEditArea->AddFocusEventListener(*this);\r
+ __pEditArea->SetOverlayKeypadCommandButtonVisible(false);\r
+ //__pEditArea->SetGuideText(L"Subject");\r
+ __pEditArea->SetColor(EDIT_STATUS_PRESSED, __pEditArea->GetColor(EDIT_STATUS_NORMAL));\r
+ __pEditArea->SetTextColor(EDIT_TEXT_COLOR_HIGHLIGHTED, __pEditArea->GetTextColor(EDIT_TEXT_COLOR_NORMAL));\r
+ AddControl(*__pEditArea);\r
+ //__pBgBitmap = BitmapUtility::GetInstance()->GetIconN(MSG_ICON_SEARCH_INPUT_BG);\r
+ //Initialize editor background bitmap to avoid flicker\r
+ Rectangle editorBound = __pEditArea->GetBounds();\r
+ __pBgBitmap = new (std::nothrow) Bitmap();\r
+ Canvas* pEditorBgCanvas = new (std::nothrow) Canvas();\r
+ pEditorBgCanvas->Construct(editorBound);\r
+ pEditorBgCanvas->FillRoundRectangle(__pEditArea->GetColor(EDIT_STATUS_NORMAL), editorBound, Dimension(2, 2));\r
+ __pBgBitmap->Construct(*pEditorBgCanvas, editorBound);\r
+ delete pEditorBgCanvas;\r
+\r
// add delete button\r
__pDeleteButton = new (std::nothrow) Button();\r
__pDeleteButton->Construct(Rectangle(rectangle.width - W_ICON_48PX - MARGIN_16PX,\r
AddControl(*__pDeleteButton);\r
delete pPressBitMap;\r
delete pNormalBitMap;\r
- // Subject edit filed.\r
- __pEditArea = new (std::nothrow) EditField();\r
- __pEditArea->Construct(Rectangle(0, 0, rectangle.width, rectangle.height),\r
- EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY);\r
- __pEditArea->AddFocusEventListener(*this);\r
- __pEditArea->SetOverlayKeypadCommandButtonVisible(false);\r
- //__pEditArea->SetGuideText(L"Subject");\r
- __pEditArea->SetColor(EDIT_STATUS_PRESSED, __pEditArea->GetColor(EDIT_STATUS_NORMAL));\r
- __pEditArea->SetTextColor(EDIT_TEXT_COLOR_HIGHLIGHTED, __pEditArea->GetTextColor(EDIT_TEXT_COLOR_NORMAL));\r
- AddControl(*__pEditArea);\r
+\r
AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));\r
return r;\r
}\r
Rectangle(0, 0, rect.width, rect.height));\r
if (__pBgBitmap)\r
{\r
- pCanvas->DrawNinePatchedBitmap(Rectangle(0, 0, rect.width, rect.height), *__pBgBitmap);\r
+ // pCanvas->DrawNinePatchedBitmap(Rectangle(0, 0, rect.width, rect.height), *__pBgBitmap);\r
+ pCanvas->DrawBitmap(Rectangle(0, 0, rect.width, rect.height),\r
+ *__pBgBitmap);\r
+\r
}\r
delete pCanvas;\r
}\r
const wchar_t* IDS_APPCONTROL_PROVIDER_CAMERA = L"tizen.camera";
const wchar_t* IDS_APPCONTROL_PROVIDER_VIDEO = L"tizen.videoplayer";
const wchar_t* IDS_APPCONTROL_PROVIDER_AUDIO = L"tizen.musicplayer";
-const wchar_t* IDS_APPCONTROL_PROVIDER_CALENDAR = L"tizen.events";
+const wchar_t* IDS_APPCONTROL_PROVIDER_CALENDAR = L"tizen.calendar";
const wchar_t* IDS_APPCONTROL_PROVIDER_GALLERY = L"tizen.gallery";
const wchar_t* IDS_APPCONTROL_PROVIDER_MEMO = L"tizen.memo";
const wchar_t* IDS_MESSAGING = L"Messaging";