Nabi issue resolution for RC13
authorGAURAV JAIN <gaurav.j3@samsung.com>
Wed, 9 Oct 2013 14:29:22 +0000 (19:59 +0530)
committerGAURAV JAIN <gaurav.j3@samsung.com>
Wed, 9 Oct 2013 14:29:22 +0000 (19:59 +0530)
Change-Id: Ie764ab06b9b761d874bbe6675734ea7dcb0695a4
Signed-off-by: GAURAV JAIN <gaurav.j3@samsung.com>
25 files changed:
inc/MsgMessageComposePanel.h
inc/MsgSpamSettingsAddBlockNumber.h
inc/MsgSpamSettingsAddBlockWord.h
inc/MsgTypes.h
res/eng-US.xml
res/screen-density-xhigh/M01_play_btn_next_press_highlight.png [new file with mode: 0644]
res/screen-density-xhigh/M01_play_btn_pause_press_highlight.png [new file with mode: 0644]
res/screen-density-xhigh/M01_play_btn_play_press_highlight.png [new file with mode: 0644]
res/screen-density-xhigh/M01_play_btn_previous_press_highlight.png [new file with mode: 0644]
res/screen-density-xhigh/M01_play_btn_volume_press_highlight.png [new file with mode: 0644]
res/screen-size-normal/IDL_MMS_DETAIL_FORM.xml
src/MsgAttachListPanel.cpp
src/MsgAttachmentSavePopup.cpp
src/MsgBitmapUtility.cpp
src/MsgCommonUtil.cpp
src/MsgComposerForm.cpp
src/MsgConversationData.cpp
src/MsgConversationForm.cpp
src/MsgMessageComposePanel.cpp
src/MsgMessagesApp.cpp
src/MsgMmsDetailForm.cpp
src/MsgOptionPopup.cpp
src/MsgRecipientPanel.cpp
src/MsgSpamSettingsAddBlockNumber.cpp
src/MsgSpamSettingsAddBlockWord.cpp

index 57c3012..154de7a 100644 (file)
@@ -191,6 +191,7 @@ private:
        int __sizeForTwoLine;
        int __heightChangePerLine;
        bool __isListVisible;
+       bool __restrictedModeOkSelected;
        Tizen::Base::Runtime::Timer* __pDelayTimer;
 };
 
index a36dbaf..d30bf3f 100644 (file)
@@ -120,7 +120,7 @@ private:
        void SaveSpamFilter(SpamFilterType filterType);
        void LoadCurrentSettings(void);
        void AccessibilityFont(void);
-       bool IsDuplicate(const Tizen::Base::String& filterText);
+       bool IsUnique();
 
 private:
        Tizen::Ui::Controls::GroupedTableView* __pGroupedTableView;
@@ -135,6 +135,7 @@ private:
        int __itemHeight;
        int __titleHeight;
        Tizen::Ui::Controls::Popup* __pSendFailedPopup;
+       int __formtype;
 
 };
 
index 7ee4b26..36af531 100644 (file)
@@ -97,6 +97,7 @@ private:
        int __fontSize;
        int __itemHeight;
        int __titleHeight;
+       Tizen::Ui::Controls::Popup* __pErrorMessagePopup;
 
 };
 
index 4257308..a2e0c4e 100644 (file)
@@ -134,7 +134,9 @@ enum MessageIconType
        MSG_ICON_SAVE_ATTACHMENT_PRESSED,
        MSG_ICON_SMIL_VOLUME,
        MSG_ICON_SMIL_PLAY,
+       MSG_ICON_SMIL_PLAY_HIGHLIGHT,
        MSG_ICON_SMIL_PAUSE,
+       MSG_ICON_SMIL_PAUSE_HIGHLIGHT,
        MSG_ICON_SMIL_NEXT,
        MSG_ICON_SMIL_PREVIOUS,
        MSG_ICON_MORE,
@@ -159,6 +161,7 @@ enum MessageIconType
        MSG_ICON_SIP_CLOSE_PRESS,
        MSG_ICON_NO_CONTENTS_BROKEN,
        MSG_ICON_CONTACT,
+       MSG_ICON_CONTACT_PRESS,
 };
 
 enum FormType
@@ -457,6 +460,7 @@ enum RequestType
        REQUEST_DELETE_AUDIO,
        REQUEST_REFRESH_SPAMFILTERFILST,
        REQUEST_HIDE_CONTEXTMENU,
+       REQUEST_CREATE_DRAFT_MESSAGE,
        REQUEST_ENABLE_MORE_BUTTON,
        REQUEST_DISABLE_MORE_BUTTON,
 };
index 9dfbff7..396da69 100644 (file)
     <text id="IDS_ST_BODY_VOLUME">Volume</text>
     <text id="IDS_COM_POP_UNKNOWN_ERROR_OCCURRED">Unknown error occurred</text>
     <text id="IDS_MSGF_BODY_INVALID_RECIPIENTS">Invalid recipients</text>
-    <text id="IDS_MSGF_BODY_CENTRE_PD">center %d</text>
+    <text id="IDS_MSGF_BODY_CENTRE_PD">Center %d</text>
     <text id="IDS_MSGF_BODY_SETBLOCK_EXACTLY_THE_SAME_AS">Exactly the same as</text>
     <text id="IDS_MSGC_POP_INSERT_SIM_CARD_TO_ACCESS_NETWORK_SERVICES_MESSAGE_WILL_BE_SAVED_IN_OUTBOX">Insert a SIM card to send messages. The message will be saved in Outbox.</text>
     <text id="IDS_MSGF_BODY_DELIVERY_REPORT">Delivery report</text>
diff --git a/res/screen-density-xhigh/M01_play_btn_next_press_highlight.png b/res/screen-density-xhigh/M01_play_btn_next_press_highlight.png
new file mode 100644 (file)
index 0000000..ef47bfc
Binary files /dev/null and b/res/screen-density-xhigh/M01_play_btn_next_press_highlight.png differ
diff --git a/res/screen-density-xhigh/M01_play_btn_pause_press_highlight.png b/res/screen-density-xhigh/M01_play_btn_pause_press_highlight.png
new file mode 100644 (file)
index 0000000..fc24bde
Binary files /dev/null and b/res/screen-density-xhigh/M01_play_btn_pause_press_highlight.png differ
diff --git a/res/screen-density-xhigh/M01_play_btn_play_press_highlight.png b/res/screen-density-xhigh/M01_play_btn_play_press_highlight.png
new file mode 100644 (file)
index 0000000..f66b53e
Binary files /dev/null and b/res/screen-density-xhigh/M01_play_btn_play_press_highlight.png differ
diff --git a/res/screen-density-xhigh/M01_play_btn_previous_press_highlight.png b/res/screen-density-xhigh/M01_play_btn_previous_press_highlight.png
new file mode 100644 (file)
index 0000000..ce7edd0
Binary files /dev/null and b/res/screen-density-xhigh/M01_play_btn_previous_press_highlight.png differ
diff --git a/res/screen-density-xhigh/M01_play_btn_volume_press_highlight.png b/res/screen-density-xhigh/M01_play_btn_volume_press_highlight.png
new file mode 100644 (file)
index 0000000..0edd322
Binary files /dev/null and b/res/screen-density-xhigh/M01_play_btn_volume_press_highlight.png differ
index 35a2ede..dab326d 100644 (file)
@@ -3,7 +3,7 @@
        This XML file was automatically generated by UiBuilder - do not modify by hand.
 -->
 <!DOCTYPE Scene SYSTEM "UIForm.dtd">
-<Scene Bversion="2.0.0.201306251414" Dversion="20120315">
+<Scene Bversion="2.0.0.201310021637" Dversion="20120315">
     <LogicalCoordinate>720</LogicalCoordinate>
     <Form id="IDL_MMS_DETAIL_FORM">
         <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"/>
     </Header>
     <Panel id="IDC_PLAY_CONTROLS_PANEL" parent="IDL_MMS_DETAIL_FORM">
         <property backgroundColor="#4D4D4D" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
-        <layout bottomRelation="IDL_MMS_DETAIL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="216.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="" type="NONE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="810.0"/>
+        <layout bottomRelation="IDL_MMS_DETAIL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="216.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="" type="NONE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="908.0"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.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="" type="NONE" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="90.0" y="418.0"/>
     </Panel>
     <Button id="IDC_VOLUME_BUTTON" parent="IDC_PLAY_CONTROLS_PANEL">
-        <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="M01_play_btn_volume_press.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="M01_play_btn_volume_press.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="20.0" verticalAlign="ALIGN_MIDDLE"/>
+        <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="M01_play_btn_volume_press.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="M01_play_btn_volume_press_highlight.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="20.0" verticalAlign="ALIGN_MIDDLE"/>
         <layout height="74.0" mode="Portrait" width="74.0" x="32.0" y="100.0"/>
         <layout height="356.0" mode="Landscape" width="78.0" x="4.0" y="0.0"/>
     </Button>
     <Button id="IDC_NEXT_BUTTON" parent="IDC_PLAY_CONTROLS_PANEL">
-        <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="M01_play_btn_next_press.png" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="M01_play_btn_next_press.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="M01_play_btn_next_press.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+        <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="M01_play_btn_next_press_highlight.png" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="M01_play_btn_next_press.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="M01_play_btn_next_press_highlight.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
         <layout height="74.0" mode="Portrait" width="74.0" x="466.0" y="100.0"/>
         <layout height="356.0" mode="Landscape" width="78.0" x="14.0" y="0.0"/>
     </Button>
         <layout height="356.0" mode="Landscape" width="78.0" x="14.0" y="0.0"/>
     </Button>
     <Button id="IDC_PREVIOUS_BUTTON" parent="IDC_PLAY_CONTROLS_PANEL">
-        <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="M01_play_btn_previous_press.png" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="M01_play_btn_previous_press.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="M01_play_btn_previous_press.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+        <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="M01_play_btn_previous_press.png" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="M01_play_btn_previous_press.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="M01_play_btn_previous_press_highlight.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
         <layout height="74.0" mode="Portrait" width="74.0" x="178.0" y="100.0"/>
         <layout height="356.0" mode="Landscape" width="78.0" x="14.0" y="0.0"/>
     </Button>
     <Progress id="IDC_PROGRESS" parent="IDC_PLAY_CONTROLS_PANEL">
-        <property accessibilityHint="" backgroundColor="" barBackgroundColor="" barColor="#FFFFFF" leftText="" max="20" min="0" rightText="" showValueState="true" value="0"/>
+        <property accessibilityHint="" backgroundColor="" barBackgroundColor="" barColor="" leftText="" max="20" min="0" rightText="" showValueState="true" value="0"/>
         <layout height="65.0" mode="Portrait" style="PROGRESS_STYLE_NONE" width="524.0" x="100.0" y="30.0"/>
         <layout height="356.0" mode="Landscape" style="PROGRESS_STYLE_NONE" width="144.0" x="39.0" y="0.0"/>
     </Progress>
index fb96a12..a12e45c 100644 (file)
@@ -383,32 +383,41 @@ AttachListPanel::OnGroupedTableViewGroupItemStateChanged(GroupedTableView& table
                return;\r
        }\r
 \r
-       String msg;\r
-       result r(E_FAILURE);\r
-       for (int attachFileNumber = 0; attachFileNumber < __pAttachFileArray->GetCount(); attachFileNumber++)\r
+       long long allocatedMemory = 0;\r
+       allocatedMemory = CommonUtil::GetAvailableMemory();\r
+       if(allocatedMemory < MIN_MEMORY)\r
        {\r
-               AttachMentsObject* pAttachment = (AttachMentsObject*) __pAttachFileArray->GetAt(attachFileNumber);\r
-               if (pAttachment && !pAttachment->GetAttachmentPath().IsEmpty())\r
-               {\r
-                       String destFile = CommonUtil::GetDownloadFilePath(pAttachment->GetAttachmentPath());\r
-                       AppLogDebug("Source File: %S, Destination File: %S", pAttachment->GetAttachmentPath().GetPointer(), destFile.GetPointer());\r
-                       r = File::Copy(pAttachment->GetAttachmentPath(), destFile, false);\r
-               }\r
-       }\r
-       if (r == E_SUCCESS)\r
-       {\r
-               String downloadFileDir = Environment::GetMediaPath() + IDS_DOWNLOADS ;\r
-               RequestId rqstId;\r
-               ContentManager::ScanDirectory(downloadFileDir,true, null, rqstId);\r
-               Application::GetInstance()->GetAppResource()->GetString(L"IDS_MSGF_POP_SAVED_IN_MY_FILES", msg);\r
+               CommonUtil::ShowInfoPopup(L"Low Memory. Can not save attachments. Please delete some files", IDS_BLANK, MSGBOX_STYLE_NONE, 3000);\r
        }\r
        else\r
        {\r
-               AppLogDebug("Error in copying file to destination - %s ",GetErrorMessage(r));\r
-       }\r
-       if (msg.GetLength())\r
-       {\r
-               CommonUtil::ShowMessageNotification(msg);\r
+               String msg;\r
+               result r(E_FAILURE);\r
+               for (int attachFileNumber = 0; attachFileNumber < __pAttachFileArray->GetCount(); attachFileNumber++)\r
+               {\r
+                       AttachMentsObject* pAttachment = (AttachMentsObject*) __pAttachFileArray->GetAt(attachFileNumber);\r
+                       if (pAttachment && !pAttachment->GetAttachmentPath().IsEmpty())\r
+                       {\r
+                               String destFile = CommonUtil::GetDownloadFilePath(pAttachment->GetAttachmentPath());\r
+                               AppLogDebug("Source File: %S, Destination File: %S", pAttachment->GetAttachmentPath().GetPointer(), destFile.GetPointer());\r
+                               r = File::Copy(pAttachment->GetAttachmentPath(), destFile, false);\r
+                       }\r
+               }\r
+               if (r == E_SUCCESS)\r
+               {\r
+                       String downloadFileDir = Environment::GetMediaPath() + IDS_DOWNLOADS ;\r
+                       RequestId rqstId;\r
+                       ContentManager::ScanDirectory(downloadFileDir,true, null, rqstId);\r
+                       Application::GetInstance()->GetAppResource()->GetString(L"IDS_MSGF_POP_SAVED_IN_MY_FILES", msg);\r
+               }\r
+               else\r
+               {\r
+                       AppLogDebug("Error in copying file to destination - %s ",GetErrorMessage(r));\r
+               }\r
+               if (msg.GetLength())\r
+               {\r
+                       CommonUtil::ShowMessageNotification(msg);\r
+               }\r
        }\r
        __isButtonClicked = false;\r
        AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));\r
@@ -424,30 +433,39 @@ AttachListPanel::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView,
                return;\r
        }\r
 \r
-       String msg;\r
-       result r(E_FAILURE);\r
-       AppLogDebug("Save");\r
-       AttachMentsObject* pAttachment = (AttachMentsObject*) __pAttachFileArray->GetAt(itemIndex);\r
-       if (pAttachment && !pAttachment->GetAttachmentPath().IsEmpty())\r
+       long long allocatedMemory = 0;\r
+       allocatedMemory = CommonUtil::GetAvailableMemory();\r
+       if(allocatedMemory < MIN_MEMORY)\r
        {\r
-               String destFile = CommonUtil::GetDownloadFilePath(pAttachment->GetAttachmentPath());\r
-               AppLogDebug("Source File: %S, Destination File: %S", pAttachment->GetAttachmentPath().GetPointer(), destFile.GetPointer());\r
-               r = File::Copy(pAttachment->GetAttachmentPath(), destFile, false);\r
-       }\r
-       if (r == E_SUCCESS)\r
-       {\r
-               String downloadFileDir = Environment::GetMediaPath() + IDS_DOWNLOADS ;\r
-               RequestId rqstId;\r
-               ContentManager::ScanDirectory(downloadFileDir,true, null, rqstId);\r
-               Application::GetInstance()->GetAppResource()->GetString(L"IDS_MSGF_POP_SAVED_IN_MY_FILES", msg);\r
+               CommonUtil::ShowInfoPopup(L"Low Memory. Can not save attachments. Please delete some files", IDS_BLANK, MSGBOX_STYLE_NONE, 3000);\r
        }\r
        else\r
        {\r
-               AppLogDebug("Error in copying file to destination - %s ",GetErrorMessage(r));\r
-       }\r
-       if (msg.GetLength())\r
-       {\r
-               CommonUtil::ShowMessageNotification(msg);\r
+               String msg;\r
+               result r(E_FAILURE);\r
+               AppLogDebug("Save");\r
+               AttachMentsObject* pAttachment = (AttachMentsObject*) __pAttachFileArray->GetAt(itemIndex);\r
+               if (pAttachment && !pAttachment->GetAttachmentPath().IsEmpty())\r
+               {\r
+                       String destFile = CommonUtil::GetDownloadFilePath(pAttachment->GetAttachmentPath());\r
+                       AppLogDebug("Source File: %S, Destination File: %S", pAttachment->GetAttachmentPath().GetPointer(), destFile.GetPointer());\r
+                       r = File::Copy(pAttachment->GetAttachmentPath(), destFile, false);\r
+               }\r
+               if (r == E_SUCCESS)\r
+               {\r
+                       String downloadFileDir = Environment::GetMediaPath() + IDS_DOWNLOADS ;\r
+                       RequestId rqstId;\r
+                       ContentManager::ScanDirectory(downloadFileDir,true, null, rqstId);\r
+                       Application::GetInstance()->GetAppResource()->GetString(L"IDS_MSGF_POP_SAVED_IN_MY_FILES", msg);\r
+               }\r
+               else\r
+               {\r
+                       AppLogDebug("Error in copying file to destination - %s ",GetErrorMessage(r));\r
+               }\r
+               if (msg.GetLength())\r
+               {\r
+                       CommonUtil::ShowMessageNotification(msg);\r
+               }\r
        }\r
        __isButtonClicked = false;\r
        AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));\r
index e1c9a1e..e93d8a5 100644 (file)
@@ -312,7 +312,17 @@ AttachementSavePopup::OnActionPerformed(const Control& source, int actionId)
        case IDA_SAVE:\r
        {\r
                Popup::SetShowState(false);\r
-               SaveSelectedAttachments();\r
+\r
+               long long allocatedMemory = 0;\r
+               allocatedMemory = CommonUtil::GetAvailableMemory();\r
+               if (allocatedMemory < MIN_MEMORY)\r
+               {\r
+                       CommonUtil::ShowInfoPopup(L"Low Memory. Can not save attachments. Please delete some files", IDS_BLANK, MSGBOX_STYLE_NONE, 3000);\r
+               }\r
+               else\r
+               {\r
+                       SaveSelectedAttachments();\r
+               }\r
                ExitPopup();\r
        }\r
        break;\r
index 1e26fc3..6706e40 100644 (file)
@@ -409,6 +409,14 @@ BitmapUtility::GetIconN(MessageIconType iconType, const Dimension& size)
                pngFile.Append("M01_play_btn_pause_press.png");\r
                break;\r
 \r
+       case MSG_ICON_SMIL_PLAY_HIGHLIGHT:\r
+               pngFile.Append("M01_play_btn_play_press_highlight.png");\r
+               break;\r
+\r
+       case MSG_ICON_SMIL_PAUSE_HIGHLIGHT:\r
+               pngFile.Append("M01_play_btn_pause_press_highlight.png");\r
+               break;\r
+\r
        case MSG_ICON_SMIL_NEXT:\r
                pngFile.Append("M01_play_btn_next_press.png");\r
                break;\r
@@ -501,6 +509,10 @@ BitmapUtility::GetIconN(MessageIconType iconType, const Dimension& size)
                pngFile.Append("M01_contact_default_image.png");\r
                break;\r
 \r
+       case MSG_ICON_CONTACT_PRESS:\r
+               pngFile.Append("M01_contact_default_image_press.png");\r
+               break;\r
+\r
        default:\r
                if (iconType >= MSG_ICON_PROGRESS_01 && iconType <= MSG_ICON_PROGRESS_30)\r
                {\r
index 093fc48..6dd0fdd 100644 (file)
@@ -837,8 +837,8 @@ CommonUtil::GetTitleHeight(FormType formType)
                itemHeight = 60;\r
                break;\r
 \r
-       case 34:\r
-               itemHeight = 55;\r
+       case 36:\r
+               itemHeight = 50;\r
                break;\r
 \r
        default:\r
@@ -871,7 +871,7 @@ CommonUtil::GetHeightAdjustment(int fontSize)
                adjustHeight = 0;\r
                break;\r
 \r
-       case 34:\r
+       case 36:\r
                adjustHeight = 0;\r
                break;\r
 \r
index 611aa5f..2ec8ae7 100644 (file)
@@ -794,7 +794,7 @@ ComposerForm::ShowMoreContextMenu(const Control& source)
        {
                __pMoreContextMenu->SetFocusable(true);
                __pMoreContextMenu->AddActionEventListener(*this);
-               //SetFocus();
+               SetFocus();
                //SendUserEvent(REQUEST_SET_FOCUS_TO_FORM, null);
                __pMoreContextMenu->SetShowState(true);
                __pMoreContextMenu->Show();
@@ -1387,7 +1387,7 @@ ComposerForm::GetHeightAdjustmentForComposePanel(int fontSize)
        switch (fontSize)
        {
        case 98:
-               adjustHeight = 60;
+               adjustHeight = 64;
                break;
 
        case 81:
index 6e2ef76..46cc8d4 100644 (file)
@@ -452,6 +452,23 @@ ConversationData::InitMessageBody(msg_struct_t pMessageInfo)
                r = ( MSG_TYPE_SMS == __messageType ? E_FAILURE : E_SUCCESS);
                __messageBody.Append(IDS_BLANK_SPACE);
        }
+
+       __messageBody.Trim();
+
+       if(__messageBody.IsEmpty())
+       {
+               if(strlen(pMsgText) > 0)
+               {
+                       __messageBody.Insert(IDS_BLANK_SPACE,0);
+               }
+               else
+               {
+                       if (MSG_TYPE_MMS == __messageType)
+                       {
+                               Application::GetInstance()->GetAppResource()->GetString(L"IDS_MSGF_BODY_NO_SUBJECT", __messageBody);
+                       }
+               }
+       }
        AppLogDebug("Fetching message body = [%S] err = [%d]", __messageBody.GetPointer(), (int) err);
        delete[] pMsgText;
 
index 5500a8c..4f15994 100644 (file)
@@ -485,7 +485,7 @@ ConversationForm::OnSceneActivatedN(const SceneId& previousSceneId,
        {
                SetEnabled(true);
        }
-       SetFocus();
+
        if (pArgs)
        {
                if (pArgs->GetCount() == 1)
@@ -531,6 +531,7 @@ ConversationForm::OnSceneActivatedN(const SceneId& previousSceneId,
                }
        }
        __pConvMessageList->UpdateTableView();
+       SetFocus();
        int lastGroupIndex = __pConvMessageList->GetGroupCount() - 1;
        int listItemCount = __pConvMessageList->GetItemCountAt(lastGroupIndex);
        if (lastGroupIndex >= 0 && listItemCount > 0)
@@ -895,6 +896,7 @@ ConversationForm::OnActionPerformed(const Control& source, int actionId)
                        {
                                CreateDraftMessage();   // Save to draft
                        }
+                       SetFocus();
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_MMS_PREVIEW, SCENE_TRANSITION_ANIMATION_TYPE_NONE), pArgList);
                        delete pComposeData;
                }
@@ -1770,6 +1772,12 @@ ConversationForm::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
        }
        break;
 
+       case REQUEST_CREATE_DRAFT_MESSAGE:
+       {
+               CreateDraftMessage();
+       }
+       break;
+
        default:
                break;
 
@@ -2049,7 +2057,7 @@ ConversationForm::ShowContactList(void)
                height = __pContactDetails->GetCount() * H_LIST_ITEM_128PX;
        }
        Rectangle rect = GetClientAreaBounds();
-       __pList->Construct(Rectangle(MARGIN_10PX * 5, 0, W_POPUP_CONTROL, height), true, SCROLL_STYLE_FADE_OUT);
+       __pList->Construct(Rectangle(MARGIN_10PX * 5, -1, W_POPUP_CONTROL, height), true, SCROLL_STYLE_FADE_OUT);
        __pList->SetBackgroundColor(Color::GetColor(COLOR_ID_WHITE));
 
        __pList->AddListViewItemEventListener(*__pConContactList);
index c4fe06d..b1168c0 100644 (file)
@@ -109,6 +109,7 @@ MessageComposePanel::MessageComposePanel(void)
        , __sizeForTwoLine(122)
        , __heightChangePerLine(51)
        , __isListVisible(false)
+       , __restrictedModeOkSelected(false)
        , __pDelayTimer(null)
 {
        // Empty implementation
@@ -467,7 +468,7 @@ MessageComposePanel::InsertFileToPage(const String& selectFilepath)
                        return MSG_RESPONSE_INVALID_MEDIA_TYPE;
 
                }
-               else if (creationMode == MSG_CREATION_MODE_WARNING )
+               else if (creationMode == MSG_CREATION_MODE_WARNING && !__restrictedModeOkSelected)
                {
                        String strMessage;
                        Application::GetInstance()->GetAppResource()->GetString(L"IDS_MSGF_POP_RESTRICTED_CONTENT_TYPE_ATTACH_ANYWAY_Q", strMessage);
@@ -491,6 +492,12 @@ MessageComposePanel::InsertFileToPage(const String& selectFilepath)
                        }
                                break;
 
+                       case MSGBOX_RESULT_OK:
+                       {
+                               __restrictedModeOkSelected = true;
+                       }
+                               break;
+
                        default:
                                break;
 
@@ -501,6 +508,7 @@ MessageComposePanel::InsertFileToPage(const String& selectFilepath)
                int percent = __remainSizeBytes * 100 / fileSizeBytes;
                if (percent < 10 && !__moreThan10PagesRequested)
                {
+                       __restrictedModeOkSelected = false;
                        ShowSizeErrorPopup();
                        // Low quality.
                        AppLog("Too low space, not enough size to attach");
@@ -1189,6 +1197,12 @@ MessageComposePanel::OnResponseReceived(const AppId& appId, const String& operat
                        ProcessNextFileComposeQueue();
                }
        }
+       if (appControlResult != APP_CTRL_RESULT_SUCCEEDED)
+       {
+               String errorMessage;
+               Application::GetInstance()->GetAppResource()->GetString(L"IDS_MSGF_POP_ATTACH_FAIL", errorMessage);
+               CommonUtil::ShowMessageNotification(errorMessage);
+       }
        if (appControlResult == APP_CTRL_RESULT_CANCELED)
        {
                AppLogDebug("Appcontrol operation canceled");
@@ -2104,7 +2118,9 @@ MessageComposePanel::ClearText(bool setFocusToLastPage)
 
        if(setFocusToLastPage)
        {
-               SetFocusToLastPage(); // To avoid keypad hiding
+               //SetFocusToLastPage(); // To avoid keypad hiding
+               RequestId requestId = REQUEST_FOCUS_TO_LAST_PAGE;
+               SendUserEvent(requestId, null);
        }
        // Reset subject panel
        Panel* pSubjectPanel = static_cast<Panel*>(__pScrollPanel->GetControl(L"IDC_PANEL_SUBJECT"));
@@ -2671,6 +2687,7 @@ MessageComposePanel::ProcessNextFileComposeQueue(void)
 //             RequestId rqstId = REQUEST_FOCUS_TO_LAST_PAGE;
 //             SendUserEvent(rqstId, null);
                //}
+               __restrictedModeOkSelected = false;
                RequestId rqstId = REQUEST_CHECK_COMPOSE_STATE;
                SendUserEvent(rqstId, null);
        }
@@ -2689,7 +2706,7 @@ MessageComposePanel::ProcessNextFileComposeQueue(void)
                }
                delete __pSelectedFilesQueue;
                __pSelectedFilesQueue = null;
-
+               __restrictedModeOkSelected = false;
                //if(IsSizeErrorPopupVisible() == false)
                //{
 //             RequestId rqstId = REQUEST_FOCUS_TO_LAST_PAGE;
index c225ad3..89d1866 100644 (file)
@@ -220,8 +220,9 @@ MessagesApp::OnBackground(void)
                {
                        RequestId requestId = REQUEST_PAUSE_PREVIEW_VIEWER;
                        pCurrentForm->SendUserEvent(requestId, null);
-                       pCurrentForm->SetEnabled(true);
+               //      pCurrentForm->SetEnabled(true);
                        pCurrentForm->Invalidate(true);
+                       pCurrentForm->SetFocus();
                        requestId = REQUEST_ENABLE_CONTROLS;
                        pCurrentForm->SendUserEvent(requestId, null);
                }
@@ -579,6 +580,7 @@ MessagesApp::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
                        ThreadData* pThreadData = pThreadPrModel->GetThreadDataByIdN(threadId);
                        TryReturn(pThreadData != null, ,"pThreadData is null");
                        int totalUnreadcount(0);
+                       pThreadPrModel->GetThreadList(THREAD_LIST_TYPE_THREAD);
                        if (pThreadPrModel->GetCount())
                        {
                                int totalThreadCount = pThreadPrModel->GetCount();
index b064e5b..fed2bad 100644 (file)
@@ -399,6 +399,7 @@ MmsDetailForm::OnInitializing(void)
                        __pMmsTextBox->AddTouchEventListener(*this);
                        __pMmsTextBox->SetShowState(true);
                        __pMmsTextBox->SetEnabled(true);
+                       __pMmsTextBox->SetSize(__pMmsTextBox->GetWidthF(), 0.0);
                }
                __pGallery = static_cast<Gallery*>(__pScrollPanel->GetControl(L"IDC_GALLERY_MMS_IMAGE"));
                __pGallery->SetShowState(false);
@@ -448,12 +449,13 @@ MmsDetailForm::OnInitializing(void)
                        __pPlayPausebutton->AddActionEventListener(*this);
                        __pPlayPausebutton->SetSize(W_PLAYCONTROL_BUTTON, H_PLAYCONTROL_BUTTON);
                        Bitmap* pBitMap = BitmapUtility::GetInstance()->GetIcon(MSG_ICON_SMIL_PLAY);
+                       Bitmap* pBitmapHighlight = BitmapUtility::GetInstance()->GetIcon(MSG_ICON_SMIL_PLAY_HIGHLIGHT, Dimension(W_PLAYCONTROL_BUTTON, H_PLAYCONTROL_BUTTON));
                        if (pBitMap)
                        {
                                pBitMap->Scale(Dimension(W_PLAYCONTROL_BUTTON, H_PLAYCONTROL_BUTTON));
                        }
                        __pPlayPausebutton->SetNormalBackgroundBitmap(*pBitMap);
-                       __pPlayPausebutton->SetPressedBackgroundBitmap(*pBitMap);
+                       __pPlayPausebutton->SetPressedBackgroundBitmap(*pBitmapHighlight);
                }
                __pNextbutton = static_cast<Button*>(__pPlayControlPanel->GetControl(L"IDC_NEXT_BUTTON"));
                if (__pNextbutton)
@@ -695,6 +697,7 @@ MmsDetailForm::OnActionPerformed(const Control& source, int actionId)
        case IDA_MMSDETAIL_FORM_HEADER_TITLEITEM:
        {
                PauseSlideShow();
+               SetFocus();
                String strText;
                bool showRecpList(true);
                const MessageData* pMessageData = __pMmsSlideData->GetSlideMessageData();
@@ -906,7 +909,7 @@ MmsDetailForm::OnActionPerformed(const Control& source, int actionId)
                allocatedMemory = CommonUtil::GetAvailableMemory();
                if (allocatedMemory < MIN_MEMORY)
                {
-                       CommonUtil::ShowInfoPopup(L"Low Memory. Can not forward message. Please delete some files", IDS_BLANK, MSGBOX_STYLE_NONE);
+                       CommonUtil::ShowInfoPopup(L"Low Memory. Can not forward message. Please delete some files", IDS_BLANK, MSGBOX_STYLE_NONE, 3000);
                }
                else
                {
@@ -1335,6 +1338,7 @@ MmsDetailForm::Clear(void)
        {
                __pMmsTextBox->Clear();
                __pMmsTextBox->SetShowState(false);
+               __pMmsTextBox->SetSize(__pMmsTextBox->GetWidthF(), 0.0);
        }
 
        AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
@@ -1369,6 +1373,12 @@ MmsDetailForm::UpdateSlideText(void)
                slideTextPosition.y = __pOverlay->GetBounds().height + MARGIN_16PX;
        }
        int linecount = __pMmsTextBox->GetLineCount();
+       if (linecount == 0)
+       {
+               __pMmsTextBox->SetSize(__pMmsTextBox->GetWidthF(), 0.0);
+               __pMmsTextBox->Invalidate(true);
+               return;
+       }
        int fontSize = CommonUtil::GetFontSize(MMSDETAILS_FORM);
        int height = 80 + 57 * (linecount - 1);
        if (fontSize == 44)
@@ -1848,20 +1858,23 @@ MmsDetailForm::UpdatePlayControl(void)
 {
        AppLogDebug("ENTER");
        Bitmap* pBitMap = null;
+       Bitmap* pBitmapHighlight = null;
        if (__isSlideShowInPrgress)
        {
                pBitMap = BitmapUtility::GetInstance()->GetIcon(MSG_ICON_SMIL_PAUSE, Dimension(W_PLAYCONTROL_BUTTON, H_PLAYCONTROL_BUTTON));
+               pBitmapHighlight = BitmapUtility::GetInstance()->GetIcon(MSG_ICON_SMIL_PAUSE_HIGHLIGHT, Dimension(W_PLAYCONTROL_BUTTON, H_PLAYCONTROL_BUTTON));
                __pPlayPausebutton->SetActionId(IDA_PAUSE);
        }
        else
        {
                pBitMap = BitmapUtility::GetInstance()->GetIcon(MSG_ICON_SMIL_PLAY, Dimension(W_PLAYCONTROL_BUTTON, H_PLAYCONTROL_BUTTON));
+               pBitmapHighlight = BitmapUtility::GetInstance()->GetIcon(MSG_ICON_SMIL_PLAY_HIGHLIGHT, Dimension(W_PLAYCONTROL_BUTTON, H_PLAYCONTROL_BUTTON));
                __pPlayPausebutton->SetActionId(IDA_PLAY);
        }
        if (pBitMap)
        {
                __pPlayPausebutton->SetNormalBackgroundBitmap(*pBitMap);
-               __pPlayPausebutton->SetPressedBackgroundBitmap(*pBitMap);
+               __pPlayPausebutton->SetPressedBackgroundBitmap(*pBitmapHighlight);
                __pPlayPausebutton->Invalidate(true);
        }
        int slideCount(__pMmsSlideData->GetSlideCount());
@@ -2355,18 +2368,25 @@ MmsDetailForm::OnKeyReleased(Tizen::Ui::Control& source, const Tizen::Ui::KeyEve
 
        case KEY_ENTER:
        {
-               if (__pPlayControlPanel->GetShowState())
+               if(__pMessageDetailsPopup && __pMessageDetailsPopup->GetShowState())
                {
-                       __pPlayControlPanel->SetShowState(false);
-                       __pTimerForControlBar->Cancel();
+                       break;
                }
                else
                {
-                       __pPlayControlPanel->SetShowState(true);
-                       __pTimerForControlBar->Cancel();
-                       if (__isSlideShowInPrgress)
+                       if (__pPlayControlPanel->GetShowState())
                        {
-                               __pTimerForControlBar->Start(TIME_INTERVAL * 3);
+                               __pPlayControlPanel->SetShowState(false);
+                               __pTimerForControlBar->Cancel();
+                       }
+                       else
+                       {
+                               __pPlayControlPanel->SetShowState(true);
+                               __pTimerForControlBar->Cancel();
+                               if (__isSlideShowInPrgress)
+                               {
+                                       __pTimerForControlBar->Start(TIME_INTERVAL * 3);
+                               }
                        }
                }
        }
index b11e14a..8070c00 100644 (file)
@@ -278,18 +278,24 @@ OptionPopup::OnListViewItemStateChanged(ListView& listView, int index, int eleme
                                        {\r
                                                CommonUtil::ShowInfoPopup(L"Low Memory. Can not forward message. Please delete some files", IDS_BLANK, MSGBOX_STYLE_NONE, 3000);\r
                                                delete pMsgData;\r
+                                               RequestId requestId = REQUEST_DESTROY_OPTION_POPUP;\r
+                                               __pParentCnt.SendUserEvent(requestId, null);\r
                                        }\r
                                        else\r
                                        {\r
                                                CommonUtil::ForwardMessage(pMsgData);\r
                                                RequestId requestId = REQUEST_DESTROY_OPTION_POPUP;\r
                                                __pParentCnt.SendUserEvent(requestId, null);\r
+                                               requestId = REQUEST_CREATE_DRAFT_MESSAGE;\r
+                                               __pParentCnt.SendUserEvent(requestId, null);\r
                                        }\r
                                }\r
                                else\r
                                {\r
+                                       RequestId  requestId = REQUEST_CREATE_DRAFT_MESSAGE;\r
+                                       __pParentCnt.SendUserEvent(requestId, null);\r
                                        CommonUtil::ForwardMessage(pMsgData);\r
-                                       RequestId requestId = REQUEST_DESTROY_OPTION_POPUP;\r
+                                       requestId = REQUEST_DESTROY_OPTION_POPUP;\r
                                        __pParentCnt.SendUserEvent(requestId, null);\r
                                }\r
                        }\r
index e9bc30a..9aa8284 100644 (file)
@@ -97,10 +97,13 @@ RecipientPanel::Construct(const Rectangle& rectangle)
        r = Panel::Construct(L"IDL_RECIPIENT_PANEL");
        __pContactButton = (Button*) GetControl(L"IDC_CONTACT_BUTTON");
        Bitmap* pPressBitmap = BitmapUtility::GetInstance()->GetIcon(MSG_ICON_CONTACT);
+       Bitmap* pHighlightPressBitmap = BitmapUtility::GetInstance()->GetIcon(MSG_ICON_CONTACT_PRESS);
        if (pPressBitmap)
        {
-               pPressBitmap->Scale(Dimension(68, 64));
-               __pContactButton->SetNormalBitmap(Point(2, 4), *pPressBitmap);
+               pPressBitmap->Scale(Dimension(64, 62));
+               __pContactButton->SetNormalBitmap(Point(4, 5), *pPressBitmap);
+pHighlightPressBitmap->Scale(Dimension(68, 64));
+       __pContactButton->SetPressedBitmap(Point(2, 4), *pHighlightPressBitmap);
        }
        __pContactButton->SetActionId(IDA_CONTACTS);
        __pContactButton->AddActionEventListener(*this);
@@ -802,8 +805,8 @@ RecipientPanel::OnExpandableEditAreaLineAdded(ExpandableEditArea& source,
 {
        AppLogDebug("ENTER");
        AppLogDebug("recipient panel height : %d %d",GetHeight(),source.GetHeight());
-       Dimension curSize = GetSize();
-       curSize.height = source.GetHeight() + MARGIN_28PX * 2;
+       FloatDimension curSize = GetSizeF();
+       curSize.height = source.GetHeightF() + MARGIN_28PX * 2;
        ScrollPanel* pScrollPanel = static_cast<ScrollPanel*>(GetControl(L"IDC_SCROLLPANEL1"));
        pScrollPanel->SetSize(source.GetSizeF());
        SetSize(curSize);
@@ -819,10 +822,10 @@ RecipientPanel::OnExpandableEditAreaLineRemoved(ExpandableEditArea& source,
 {
        AppLogDebug("ENTER");
        AppLogDebug("recipient panel height : %d %d",GetHeight(),source.GetHeight());
-       Dimension curSize = GetSize();
-       curSize.height = source.GetHeight() + MARGIN_28PX * 2;
+       FloatDimension curSize = GetSizeF();
+       curSize.height = source.GetHeightF() + MARGIN_28PX * 2;
        ScrollPanel* pScrollPanel = static_cast<ScrollPanel*>(GetControl(L"IDC_SCROLLPANEL1"));
-       pScrollPanel->SetSize(source.GetSize());
+       pScrollPanel->SetSize(source.GetSizeF());
        SetSize(curSize);
        __pSizeChangeListener->OnSizeDecrease(*this);
        AppLogDebug("recipient panel height : %d %d",GetHeight(),source.GetHeight());
@@ -837,8 +840,8 @@ RecipientPanel::OnBoundsChanged(const Rectangle& oldRect, const Rectangle& newRe
        //AppLogDebug("recipient panel height : %d",GetHeight());
        if (__pExpandEditArea)
        {
-               __pExpandEditArea->SetSize(Dimension(__pExpandEditArea->GetWidth(),
-                                                                                        __pExpandEditArea->GetHeight()));
+               __pExpandEditArea->SetSize(FloatDimension(__pExpandEditArea->GetWidthF(),
+                                                                                        __pExpandEditArea->GetHeightF()));
        }
        if (__pContactButton)
        {
index 37d297c..b1a1791 100644 (file)
@@ -41,6 +41,11 @@ using namespace Tizen::Ui;
 using namespace Tizen::Ui::Controls;
 using namespace Tizen::Ui::Scenes;
 
+enum SpamFormType
+{
+       SPAM_ADD_WORD,
+       SPAM_EDIT_WORD
+};
 
 SpamSettingsFormAddBlockNumber::SpamSettingsFormAddBlockNumber(void)
        : __pGroupedTableView (null)
@@ -48,12 +53,13 @@ SpamSettingsFormAddBlockNumber::SpamSettingsFormAddBlockNumber(void)
        , __pEditField (null)
        , __isBlockNumberExisting(false)
        , __currentBlockedNumberCriteriaIndex(-1)
-       , __selectedMatchCriteriaIndex(0)
+       , __selectedMatchCriteriaIndex(-1)
        , __editSpamFilterIndex(-1)
        , __fontSize(FONT_MAIN_TEXT_SIZE_NORMAL)
        , __itemHeight(H_LIST_ITEM_128PX)
        , __titleHeight(H_TITLE_LINE)
        , __pSendFailedPopup (null)
+       , __formtype(-1)
 {
 
 }
@@ -224,6 +230,7 @@ SpamSettingsFormAddBlockNumber::OnSceneActivatedN(const SceneId& previousSceneId
        {
                if (pArgs->GetCount() > 0 && pFilterList)
                {
+                       __formtype = SPAM_EDIT_WORD;
                        String strText;
                        Integer* pInteger = static_cast<Integer*>(pArgs->GetAt(0));
                        __editSpamFilterIndex = pInteger->ToInt();
@@ -242,6 +249,11 @@ SpamSettingsFormAddBlockNumber::OnSceneActivatedN(const SceneId& previousSceneId
                pArgs->RemoveAll(true);
                delete pArgs;
        }
+       else
+       {
+               __formtype = SPAM_ADD_WORD;
+               __selectedMatchCriteriaIndex = 0;
+       }
        LoadCurrentSettings();
        AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
        return;
@@ -346,22 +358,21 @@ SpamSettingsFormAddBlockNumber::OnActionPerformed(const Control& source, int act
        case IDA_SAVE_REJECT_NUMBER:
        {
                String editFieldText = __pEditField->GetText();
-               if(!CommonUtil::IsValidPhoneNumber(editFieldText))
+               if (__selectedMatchCriteriaIndex == 0)
                {
-                       String displayMessage;
-                       if(__pEditField->HasFocus() == false)
+                       if(!CommonUtil::IsValidPhoneNumber(editFieldText))
                        {
-                               __pEditField->SetFocus();
+                               String displayMessage;
+                               __pEditField->Clear();
+                               GetFooter()->SetItemEnabled(0, __pEditField->GetTextLength() > 0);
+                               GetFooter()->Invalidate(true);
+                               Application::GetInstance()->GetAppResource()->GetString(L"IDS_MSG_POP_INVALID_SENDER", displayMessage);
+                               displayMessage.Append(IDS_COLON);
+                               displayMessage.Append(IDS_BLANK_SPACE);
+                               displayMessage.Append(editFieldText);
+                               DisplayErrorPopup(displayMessage);
+                               return;
                        }
-                       __pEditField->Clear();
-                       GetFooter()->SetItemEnabled(0, __pEditField->GetTextLength() > 0);
-                       GetFooter()->Invalidate(true);
-                       Application::GetInstance()->GetAppResource()->GetString(L"IDS_MSG_POP_INVALID_SENDER", displayMessage);
-                       displayMessage.Append(IDS_COLON);
-                       displayMessage.Append(IDS_BLANK_SPACE);
-                       displayMessage.Append(editFieldText);
-                       DisplayErrorPopup(displayMessage);
-                       return;
                }
                char* pPhoneNumber = CommonUtil::ConvertStringToPointerCharArrayN(editFieldText);
                int size = (int) strlen(pPhoneNumber);
@@ -393,6 +404,10 @@ SpamSettingsFormAddBlockNumber::OnActionPerformed(const Control& source, int act
        case IDA_MSG_SEND_FAILED:
        {
                __pSendFailedPopup->SetShowState(false);
+               if(__pEditField->HasFocus() == false)
+               {
+                       __pEditField->SetFocus();
+               }
        }
        break;
 
@@ -457,15 +472,15 @@ SpamSettingsFormAddBlockNumber::SaveSpamFilter(SpamFilterType filterType)
        {
                if(SPAM_FILTER_TYPE_BLOCK_NUMBER == filterType)
                {
-                       String displayMessage;
+                       //String displayMessage;
                        if(__pEditField)
                        {
                                __pEditField->Clear();
                        }
                        GetFooter()->SetItemEnabled(0, false);
                        GetFooter()->Invalidate(true);
-                       Application::GetInstance()->GetAppResource()->GetString(L"IDS_BLOCK_MSG_INFO_STRING", displayMessage);
-                       DisplayErrorPopup(displayMessage);
+                       //Application::GetInstance()->GetAppResource()->GetString(L"IDS_BLOCK_MSG_INFO_STRING", displayMessage);
+                       DisplayErrorPopup(L"Messages from this number already blocked");
                        return;
                }
        }
@@ -653,7 +668,7 @@ SpamSettingsFormAddBlockNumber::CreateMatchCriteriaSettingItemsN(int groupIndex,
        {
                Label* pSettingName = new (std::nothrow) Label();
 
-               pSettingName->Construct(Rectangle(0, MARGIN_4PX / 2, itemWidth, itemHeight - MARGIN_4PX), settingItem.GetName());
+               pSettingName->Construct(Rectangle(0, MARGIN_4PX / 2, itemWidth - MARGIN_42PX, itemHeight - MARGIN_4PX), settingItem.GetName());
                pSettingName->SetName(IDS_LIST_MAIN_TEXT);
                pSettingName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
                pSettingName->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
@@ -752,6 +767,10 @@ SpamSettingsFormAddBlockNumber::HandleSpamMatchCriteriaItemSelection(int groupIn
                                pFooter->SetItemEnabled(0,result && __pEditField->GetTextLength() > 0);
                        }
                }
+               else
+               {
+                       pFooter->SetItemEnabled(0, IsUnique() && __pEditField->GetTextLength() > 0);
+               }
                pFooter->Invalidate(true);
        }
 
@@ -814,6 +833,13 @@ SpamSettingsFormAddBlockNumber::CheckedRadioGroupItem(int groupIndex, int itemIn
        int prvGroupItemCount = __pSettingItemsArray->GetItemCount(groupIndex - 1) - 1;
        __pGroupedTableView->RefreshItem(groupIndex - 1, prvGroupItemCount, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
 
+       Footer* pFooter = GetFooter();
+       if (pFooter)
+       {
+               pFooter->SetItemEnabled(0, IsUnique());
+               pFooter->Invalidate(true);
+       }
+
        AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
        return;
 }
@@ -904,7 +930,7 @@ SpamSettingsFormAddBlockNumber::OnTextValueChanged(const Control& source)
                }
                else
                {
-                       pFooter->SetItemEnabled(0,IsDuplicate(editText));
+                       pFooter->SetItemEnabled(0,IsUnique());
                }
                pFooter->Invalidate(true);
        }
@@ -912,10 +938,11 @@ SpamSettingsFormAddBlockNumber::OnTextValueChanged(const Control& source)
 }
 
 bool
-SpamSettingsFormAddBlockNumber::IsDuplicate(const String& filterText)
+SpamSettingsFormAddBlockNumber::IsUnique()
 {
        AppLogDebug("ENTER");
 
+       String filterText = __pEditField->GetText();
        if(!filterText.GetLength())
                return false;
 
@@ -929,7 +956,9 @@ SpamSettingsFormAddBlockNumber::IsDuplicate(const String& filterText)
                {
                        if (filterText.CompareTo(pSettingPrModel->GetSpamFilterList()->GetFilterText(index - 1, SPAM_FILTER_TYPE_BLOCK_NUMBER)) == 0)
                        {
-                               return false;
+                               __currentBlockedNumberCriteriaIndex = pFilterList->GetFilterType(index - 1, SPAM_FILTER_TYPE_BLOCK_NUMBER) - 1;
+                               if(__currentBlockedNumberCriteriaIndex == __selectedMatchCriteriaIndex)
+                                       return false;
                        }
                }
        }
@@ -945,19 +974,22 @@ SpamSettingsFormAddBlockNumber::OnFocusGained(const Control& source)
 
        if (&source == __pEditField)
        {
-               String editText = __pEditField->GetText();
-               Footer* pFooter = GetFooter();
-               if (pFooter)
+               if(__formtype == SPAM_EDIT_WORD)
                {
-                       pFooter->SetItemEnabled(0,editText.GetLength() > 0);
-                               if(__isBlockNumberExisting)
-                               {
-                                       bool result = __pEditField->GetTextLength();
-                                       result = result && (!__currentBlockedNumber.Equals(editText,false) || __currentBlockedNumberCriteriaIndex != __selectedMatchCriteriaIndex);
-                                       pFooter->SetItemEnabled(0, result);
-                               }
+                       String editText = __pEditField->GetText();
+                       Footer* pFooter = GetFooter();
+                       if (pFooter)
+                       {
+                               pFooter->SetItemEnabled(0,editText.GetLength() > 0);
+                                       if(__isBlockNumberExisting)
+                                       {
+                                               bool result = __pEditField->GetTextLength();
+                                               result = result && (!__currentBlockedNumber.Equals(editText,false) || __currentBlockedNumberCriteriaIndex != __selectedMatchCriteriaIndex);
+                                               pFooter->SetItemEnabled(0, result);
+                                       }
 
-                       pFooter->Invalidate(true);
+                               pFooter->Invalidate(true);
+                       }
                }
        }
 
@@ -1045,6 +1077,7 @@ SpamSettingsFormAddBlockNumber::OnResponseReceived(const AppId& appId, const Str
                                                else
                                                {
                                                        pFooter->SetItemEnabled(0, (pPhoneNumber->GetLength() > 0));
+                                                       pFooter->SetItemEnabled(0, IsUnique());
                                                }
                                                pFooter->Invalidate(true);
                                        }
index f0d0cfd..a2b46b8 100644 (file)
@@ -48,6 +48,7 @@ SpamSettingsFormAddBlockWord::SpamSettingsFormAddBlockWord(void)
        , __fontSize(FONT_MAIN_TEXT_SIZE_NORMAL)
        , __itemHeight(H_LIST_ITEM_128PX)
        , __titleHeight(H_TITLE_LINE)
+       , __pErrorMessagePopup(null)
 {
 
 }
@@ -271,13 +272,24 @@ SpamSettingsFormAddBlockWord::OnActionPerformed(const Control& source, int actio
                        int size = (int) strlen(pPhoneNumber);
                        if (size > 40)
                        {
-                               int modalResult;
-                               MessageBox messageBox;
-                               String msgText;
-                               Application::GetInstance()->GetAppResource()->GetString(L"IDS_DB_POP_MAXIMUM_NUMBER_OF_CHARACTERS_EXCEEDED_DELETE_SOME_CHARACTERS", msgText);
-
-                               messageBox.Construct(IDS_BLANK, msgText, MSGBOX_STYLE_OK, 300000);
-                               messageBox.ShowAndWait(modalResult);
+//                             int modalResult;
+//                             MessageBox messageBox;
+                       String msgText;
+                       Application::GetInstance()->GetAppResource()->GetString(L"IDS_DB_POP_MAXIMUM_NUMBER_OF_CHARACTERS_EXCEEDED_DELETE_SOME_CHARACTERS", msgText);
+//
+//                             messageBox.Construct(IDS_BLANK, msgText, MSGBOX_STYLE_OK, 300000);
+//                             messageBox.ShowAndWait(modalResult);
+
+                               __pErrorMessagePopup = new (std::nothrow) Popup();
+                               __pErrorMessagePopup->Construct(L"IDL_MSG_INFO_POPUP");
+                               //__pErrorMessagePopup->SetPropagatedKeyEventListener(this);
+                               Button* pOkDelete = static_cast<Button*>(__pErrorMessagePopup->GetControl(L"IDC_BUTTON1"));
+                               TextBox* pTextBox = static_cast<TextBox*>(__pErrorMessagePopup->GetControl(L"IDC_TEXTBOX1"));
+                               pTextBox->SetText(msgText);
+                               pTextBox->SetAutoLinkMask(0);
+                               pOkDelete->SetActionId(IDA_CLOSE_MESSAGE_POPUP);
+                               pOkDelete->AddActionEventListener(*this);
+                               __pErrorMessagePopup->Show();
                                __pEditField->SetFocus();
                        }
                        else if (!editFieldText.IsEmpty())
@@ -314,6 +326,16 @@ SpamSettingsFormAddBlockWord::OnActionPerformed(const Control& source, int actio
                }
                break;
 
+               case IDA_CLOSE_MESSAGE_POPUP:
+               {
+                       if (__pErrorMessagePopup)
+                       {
+                               __pErrorMessagePopup->SetShowState(false);
+                               delete __pErrorMessagePopup;
+                               __pErrorMessagePopup = null;
+                       }
+               }
+               break;
        }
        AppLogDebug("EXIT: %s", GetErrorMessage(GetLastResult()));
 }