JMMSMessageSettings.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:124k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2002
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * jmms_message_settings.C
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * This file contans the ui and NVRAm integration for message settings
- *
- * Author:
- * -------
- * -------
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- #ifndef _MMI_JMMSMMSSETTINGS_C
- #define _MMI_JMMSMMSSETTINGS_C
- /*****************************************************************************
- * Include
- *****************************************************************************/
- #include "MMI_features.h"
- #if (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT))
- #include "PixtelDataTypes.h"
- #include "Unicodexdcl.h"
- #include "HistoryGprot.h"
- #include "GlobalDefs.h"
- #include "SettingProfile.h"
- #include "DebugInitDef.h"
- #include "CommonScreens.h"
- #include "EventsGprot.h"
- #include "wgui_inputs.h"
- #include "wgui_categories.h"
- #include "wgui_categories_inputs.h"
- #include "MainMenuDef.h"
- #include "NVRAMEnum.h"
- #include "NVRAMType.h"
- #include "NVRAMProt.h"
- #include "JMMSExdcl.h"
- #include "JMMSStructs.h"
- /* PMT DARA PROFILE HANDLER 020106 */
- #include "JProfileHandlerTypes.h"
- #include "JProfileHandlerProts.h"
- #include "JMMSConfig.h"
- #include "JMMSMessageSettings.h"
- #include "JMMSCoreAPI.h"
- #include "JMMSDrafts.h"
- #include "JMMSExdcl.h"
- /* /#include "JMMSGdcl.h" */
- #include "JMMSCompose.h"
- #include "JMMSGprot.h"
- #include "JMMSInbox.h"
- #include "JMMSJSRHandler.h"
- #include "JMMSMainMMS.h"
- #include "JMMSMessageSettingsUtils.h"
- #include "JMMSOutbox.h"
- #include "JMMSProtocols.h"
- #include "JMMSPushHandling.h"
- #include "JMMSResEnum.h"
- #include "JMMSSent.h"
- #include "JMMSStoreHandling.h"
- #include "JMMSStructs.h"
- #include "JMMSTemplates.h"
- #include "JMMSUseDetails.h"
- #include "JMMSView.h"
- #include "JMMSWriteMMS.h"
- #include "custom_wap_config.h"
- #include "PrvStoreDataTypes.h"
- #include "PrvStoreHandleInterfaces.h"
- #ifdef __MMI_UNIFIED_MESSAGE__
- #include "UnifiedMessageDef.h"
- #endif
- /*****************************************************************************
- * Define
- *****************************************************************************/
- /*****************************************************************************
- * Typedef
- *****************************************************************************/
- /*****************************************************************************
- * Local Variable
- *****************************************************************************/
- /*****************************************************************************
- * Local Function
- *****************************************************************************/
- /*****************************************************************************
- * Global Variable
- *****************************************************************************/
- static jmms_send_settings_entry_control_enum g_jmms_control = E_ENTRY_FROM_MMS_SETTINGS;
- static U8 g_reply_charging_done = 0; /* /to check whether something done in reply charging screen */
- static U8 g_recieve_filter_done = 0; /* /to check whether something done in filters screen */
- /*****************************************************************************
- * Global Function
- *****************************************************************************/
- extern void set_leading_zero(U8 u8type);
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_highlight_messages_settings
- * DESCRIPTION
- * This function is the highlight handler of message settings
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_highlight_messages_settings(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- SetLeftSoftkeyFunction(mmi_jmms_entry_message_settings, KEY_EVENT_UP);
- SetKeyHandler(mmi_jmms_entry_message_settings, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(mmi_jmms_entry_message_settings, KEY_WAP, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_message_settings_init
- * DESCRIPTION
- * This function init the hilight handlers of message settings menu items.
- * This is called at boot up time
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_message_settings_init(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* mESSAGE sETTINGS options Highlight handlers */
- SetHiliteHandler(MENU_ID_JMMS_MMS_SETTINGS_COMPOSE, mmi_jmms_highlight_compose_setings);
- SetHiliteHandler(MENU_ID_JMMS_MMS_SETTINGS_SENDING, mmi_jmms_highlight_sending_setings);
- SetHiliteHandler(MENU_ID_JMMS_MMS_SETTINGS_RETRIEVAL, mmi_jmms_highlight_retrieval_setings);
- SetHiliteHandler(MENU_ID_JMMS_MMS_SETTINGS_EDIT_PROFILE, mmi_jmms_highlight_edit_profile);
- SetHiliteHandler(MENU_ID_JMMS_MMS_SETTINGS_MEMORY_STATUS, mmi_jmms_highlight_memory_status);
- mmi_jmms_read_nvram_message_settings();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_message_settings
- * DESCRIPTION
- * This function is the entry handler of message settings
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_message_settings(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 gui_buffer; /* Buffer holding history data */
- U16 str_item_list[MAX_SUB_MENUS]; /* Stores the strings id of submenus returned */
- U16 num_item; /* Stores no of children in the submenu */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_JMMS_MESSAGE_SETTINGS, NULL, mmi_jmms_entry_message_settings, NULL);
- gui_buffer = GetCurrGuiBuffer(SCR_ID_JMMS_MESSAGE_SETTINGS);
- num_item = GetNumOfChild(MENU_ID_JMMS_MMS_SETTINGS);
- GetSequenceStringIds(MENU_ID_JMMS_MMS_SETTINGS, str_item_list);
- SetParentHandler(MENU_ID_JMMS_MMS_SETTINGS);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- ShowCategory52Screen(
- STR_ID_JMMS_MMS_SETTINGS,
- GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- num_item,
- str_item_list,
- (U16*) gIndexIconsImageList,
- NULL,
- 0,
- 0,
- gui_buffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_highlight_compose_setings
- * DESCRIPTION
- * This function is the highlight handler of compose message settings
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_highlight_compose_setings(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- SetLeftSoftkeyFunction(mmi_jmms_pre_entry_compose_settings, KEY_EVENT_UP);
- SetKeyHandler(mmi_jmms_pre_entry_compose_settings, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(mmi_jmms_pre_entry_compose_settings, KEY_WAP, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_highlight_sending_setings
- * DESCRIPTION
- * This function is the highlight handler of sending message settings
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_highlight_sending_setings(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- SetLeftSoftkeyFunction(mmi_jmms_pre_entry_sending_settings, KEY_EVENT_UP);
- SetKeyHandler(mmi_jmms_pre_entry_sending_settings, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(mmi_jmms_pre_entry_sending_settings, KEY_WAP, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_highlight_retrieval_setings
- * DESCRIPTION
- * This function is the highlight handler of retrieval message settings
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_highlight_retrieval_setings(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- SetLeftSoftkeyFunction(mmi_jmms_pre_entry_retrieval_settings, KEY_EVENT_UP);
- SetKeyHandler(mmi_jmms_pre_entry_retrieval_settings, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(mmi_jmms_pre_entry_retrieval_settings, KEY_WAP, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_highlight_edit_profile
- * DESCRIPTION
- * This function is the highlight handler of edit profile
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_highlight_edit_profile(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- /* PMT DARA PROFILE HANDLER 020106 */
- SetLeftSoftkeyFunction(mmi_jmms_show_profile_list, KEY_EVENT_UP);
- SetKeyHandler(mmi_jmms_show_profile_list, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(mmi_jmms_show_profile_list, KEY_WAP, KEY_EVENT_DOWN);
- }
- /* PMT DARA PROFILE HANDLER 020106 */
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_show_profile_list
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_show_profile_list(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_ph_pre_entry_show_profile_list_menu(PH_MMS_PROFILE);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_get_profile_title_icon
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- U16 mmi_jmms_get_profile_title_icon(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UNIFIED_MESSAGE__
- return (MENU_ID_UM_MAIN);
- #else
- return (MAIN_MENU_MESSAGES_MENUID);
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_highlight_memory_status
- * DESCRIPTION
- * This function is the highlight handler of memory sttaus item
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_highlight_memory_status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- SetLeftSoftkeyFunction(mmi_jmms_entry_memory_status, KEY_EVENT_UP);
- SetKeyHandler(mmi_jmms_entry_memory_status, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(mmi_jmms_entry_memory_status, KEY_WAP, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_memory_status
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_memory_status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /* PMT VIKAS START 20060325 */
- U8 *guiBuffer;
- S8 tempBuf[20];
- S8 tempBufUnicode[20 * ENCODING_LENGTH];
- S8 spaceBuf[20];
- U8 messageStatusTotal;
- U8 messageStatusUsed;
- int used_space = 0;
- U32 free_space;
- U32 size;
- S32 size_kb;
- S32 size_bytes;
- JDD_FSHANDLE fs_handle;
- JC_CHAR *content_fname = NULL;
- STORAGE_CTX *pStorageHandle = NULL;
- /* /manish incraesing size by 6(100 to 106) bytes as chnaging "Free" by "Free Space" */
- S8 memoryStatus[106 * ENCODING_LENGTH];
- U64 disk_free_space;
- JC_RETCODE eRet = JC_OK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_JMMS_MMS_MESSAGE_STATUS, NULL, mmi_jmms_entry_memory_status, NULL);
- messageStatusTotal = MAX_POSSIBLE_MESSAGES;
- eRet = mmi_jmms_get_total_number_of_messages(&messageStatusUsed);
- if (eRet != JC_OK)
- {
- DisplayPopup((U8*) GetString(STR_GLOBAL_ERROR), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, (U8) ERROR_TONE);
- return;
- }
- // memset(spaceBuf, 0, 20);
- // AnsiiToUnicodeString(spaceBuf, "n");
- // pfnUnicodeStrcpy(memoryStatus, spaceBuf);
- pfnUnicodeStrcpy(memoryStatus, (S8*) GetString(STR_ID_JMMS_SETTINGS_MESSAGE_STATUS_TOTAL));
- memset(spaceBuf, 0, 20);
- AnsiiToUnicodeString(spaceBuf, ": ");
- pfnUnicodeStrcat(memoryStatus, spaceBuf);
- memset(spaceBuf, 0, 20);
- sprintf(tempBuf, "%d/%d", messageStatusUsed, messageStatusTotal);
- AnsiiToUnicodeString(tempBufUnicode, tempBuf);
- pfnUnicodeStrcat(memoryStatus, tempBufUnicode);
- AnsiiToUnicodeString(spaceBuf, "n");
- pfnUnicodeStrcat(memoryStatus, spaceBuf);
- pStorageHandle = (STORAGE_CTX*) g_jmms_context->hStoreHandle;
- if ((jdd_FSInitialize(&fs_handle)) == JC_OK)
- {
- content_fname = (JC_CHAR*) jdd_FSFileNameTranslate(fs_handle, (JC_CHAR*) pStorageHandle->pRootPath);
- jdd_FSDeinitialize(fs_handle);
- }
- if (content_fname != NULL)
- {
- used_space = FS_GetFolderSize(content_fname, FS_COUNT_IN_BYTE, NULL, 0);
- jdd_MemFree(content_fname);
- if (used_space < 0)
- {
- used_space = 0;
- }
- }
- pfnUnicodeStrcat(memoryStatus, (S8*) GetString(STR_ID_JMMS_SETTINGS_MESSAGE_STATUS_USAGE));
- memset(spaceBuf, 0, 20);
- AnsiiToUnicodeString(spaceBuf, ": ");
- pfnUnicodeStrcat(memoryStatus, spaceBuf);
- memset(spaceBuf, 0, 20);
- /* Added a New line after "Used Space:" */
- AnsiiToUnicodeString(spaceBuf, "n");
- pfnUnicodeStrcat(memoryStatus, spaceBuf);
- memset(spaceBuf, 0, 20);
- memset(tempBuf, 0, 20);
- memset(tempBufUnicode, 0, 20 * ENCODING_LENGTH);
- size = used_space;
- size_kb = size / 1024;
- size_bytes = size % 1024;
- if (size_kb >= 1)
- {
- if (size_bytes > 512)
- {
- size_kb++;
- }
- sprintf(tempBuf, "%d ", size_kb);
- AnsiiToUnicodeString(tempBufUnicode, tempBuf);
- pfnUnicodeStrcat(memoryStatus, tempBufUnicode);
- pfnUnicodeStrcat(memoryStatus, (S8*) GetString(STR_ID_JMMS_KB));
- }
- else
- {
- sprintf(tempBuf, "%d ", size);
- AnsiiToUnicodeString(tempBufUnicode, tempBuf);
- pfnUnicodeStrcat(memoryStatus, tempBufUnicode);
- pfnUnicodeStrcat(memoryStatus, (S8*) GetString(STR_ID_JMMS_BYTES));
- }
- disk_free_space = jdd_FSGetMMSFolderFreeSpace();
- /* mmi_jmms_get_free_size_for_mms(&disk_free_space); */
- AnsiiToUnicodeString(spaceBuf, "n");
- pfnUnicodeStrcat(memoryStatus, spaceBuf);
- pfnUnicodeStrcat(memoryStatus, (S8*) GetString(STR_ID_SETTINGS_FREE_SPACE));
- memset(spaceBuf, 0, 20);
- AnsiiToUnicodeString(spaceBuf, ": ");
- pfnUnicodeStrcat(memoryStatus, spaceBuf);
- memset(spaceBuf, 0, 20);
- /* Added a New line after "Free Space:" */
- AnsiiToUnicodeString(spaceBuf, "n");
- pfnUnicodeStrcat(memoryStatus, spaceBuf);
- memset(spaceBuf, 0, 20);
- memset(tempBuf, 0, 20);
- memset(tempBufUnicode, 0, 20 * ENCODING_LENGTH);
- free_space = disk_free_space;
- size = free_space;
- size_kb = size / 1024;
- size_bytes = size % 1024;
- if (size_kb >= 1)
- {
- if (size_bytes > 512)
- {
- size_kb++;
- }
- sprintf(tempBuf, "%d ", size_kb);
- AnsiiToUnicodeString(tempBufUnicode, tempBuf);
- pfnUnicodeStrcat(memoryStatus, tempBufUnicode);
- pfnUnicodeStrcat(memoryStatus, (S8*) GetString(STR_ID_JMMS_KB));
- }
- else
- {
- sprintf(tempBuf, "%d ", size);
- AnsiiToUnicodeString(tempBufUnicode, tempBuf);
- pfnUnicodeStrcat(memoryStatus, tempBufUnicode);
- pfnUnicodeStrcat(memoryStatus, (S8*) GetString(STR_ID_JMMS_BYTES));
- }
- memset(spaceBuf, 0, 20);
- memset(tempBuf, 0, 20);
- memset(tempBufUnicode, 0, 20 * ENCODING_LENGTH);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_JMMS_MMS_MESSAGE_STATUS);
- if ((guiBuffer != NULL) || (g_msg_cntx.MessagesScrnIdDelUptoHistoryNodes == SCR_ID_JMMS_MMS_MESSAGE_STATUS))
- {
- DeleteNScrId(SCR_ID_JMMS_MMS_MESSAGE_STATUS);
- }
- SetMessagesCurrScrnID(SCR_ID_JMMS_MMS_MESSAGE_STATUS);
- SetMessagesScrnIdToDelHistoryNodes(SCR_ID_JMMS_MMS_MESSAGE_STATUS);
- ShowCategory7Screen(
- STR_ID_MESSAGE_SETTINGS_MEMORY_STATUS,
- GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- 0,
- 0,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- (PU8) memoryStatus,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- /* PMT VIKAS END 20060325 */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_pre_entry_compose_settings
- * DESCRIPTION
- * this is pre entry fn for compose settings. Init the inline items for compose settings
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_pre_entry_compose_settings(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 temp_max_no_pages = g_jmms_context->nvram_compose_settings.max_no_pages;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- gui_itoa(
- (S32) g_jmms_context->nvram_compose_settings.default_slide_time,
- (UI_string_type) g_jmms_context->jmms_inline_items.compose_items_list.defualt_slide_time_buffer,
- 10);
- #ifdef __DRM_SUPPORT__
- g_jmms_context->jmms_inline_items.compose_items_list.add_drm = g_jmms_context->nvram_compose_settings.add_drm;
- #endif
- //#ifdef __MMI_MMS_SIGNATURE__
- g_jmms_context->jmms_inline_items.compose_items_list.auto_signature =
- g_jmms_context->nvram_compose_settings.auto_signature;
- //#endif /* __MMI_MMS_SIGNATURE__ */
- g_jmms_context->jmms_inline_items.compose_items_list.best_page_duration =
- g_jmms_context->nvram_compose_settings.best_page_duration;
- g_jmms_context->jmms_inline_items.compose_items_list.creation_mode =
- g_jmms_context->nvram_compose_settings.creation_mode;
- /* HIMANSHU 05122006 START */
- #ifdef __MMI_MMS_MEGA_PIXEL_SUPPORT__
- g_jmms_context->jmms_inline_items.compose_items_list.image_resize_option =
- g_jmms_context->nvram_compose_settings.image_resize_option;
- #endif /* __MMI_MMS_MEGA_PIXEL_SUPPORT__ */
- /* HIMANSHU 05122006 END */
- g_jmms_context->jmms_inline_items.compose_items_list.layout = g_jmms_context->nvram_compose_settings.layout;
- gui_itoa(
- temp_max_no_pages,
- (UI_string_type) g_jmms_context->jmms_inline_items.compose_items_list.max_num_pages_buffer,
- 10);
- mmi_jmms_entry_compose_settings();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_compose_settings
- * DESCRIPTION
- * This is entry fn for compose settings
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_compose_settings(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- U8 *inputBuffer; /* added for inline edit history */
- U16 inputBufferSize; /* added for inline edit history */
- U16 image_list[COMPOSE_INLINE_TOTAL] = {0};
- U8 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_JMMS_COMPOSE_SETTINGS, mmi_jmms_exit_compose_settings, NULL, NULL);
- set_leading_zero(FALSE);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_JMMS_COMPOSE_SETTINGS);
- InitializeCategory57Screen();
- mmi_jmms_compose_fill_inline_struct();
- /* RegisterHighlightHandler(ExecuteCurrHiliteHandler); */
- guiBuffer = GetCurrGuiBuffer(SCR_ID_JMMS_COMPOSE_SETTINGS);
- inputBuffer = GetCurrNInputBuffer(SCR_ID_JMMS_COMPOSE_SETTINGS, &inputBufferSize); /* added for inline edit history */
- if (inputBuffer) /* added for inline edit history */
- {
- SetCategory57Data(wgui_inline_items, COMPOSE_INLINE_TOTAL, inputBuffer); /* sets the data */
- }
- image_list[E_COMPOSE_DEFAULT_SLIDE_TIME_CAPTION] = gIndexIconsImageList[count];
- image_list[E_COMPOSE_LAYOUT_CAPTION] = gIndexIconsImageList[++count];
- #ifdef __DRM_SUPPORT__
- image_list[E_COMPOSE_ADD_DRM_CAPTION] = gIndexIconsImageList[++count];
- #endif
- image_list[E_COMPOSE_CREATION_MODES_CAPTION] = gIndexIconsImageList[++count];
- #ifdef __MMI_MMS_MEGA_PIXEL_SUPPORT__
- image_list[E_COMPOSE_IMAGE_RESIZE_CAPTION] = gIndexIconsImageList[++count];
- #endif /* #ifdef __MMI_MMS_MEGA_PIXEL_SUPPORT__ */
- image_list[E_COMPOSE_MAX_NO_PAGES_CAPTION] = gIndexIconsImageList[++count];
- image_list[E_COMPOSE_BEST_PAGE_DURATION_CAPTION] = gIndexIconsImageList[++count];
- //#ifdef __MMI_MMS_SIGNATURE__
- image_list[E_COMPOSE_AUTO_SIGNATURE_CAPTION] = gIndexIconsImageList[++count];
- image_list[E_COMPOSE_AUTO_SIGNATURE_CONTENT] = IMG_ID_JMMS_WRITE_MESSAGE;
- //#endif /* __MMI_MMS_SIGNATURE__ */
- ShowCategory57Screen(
- STR_ID_MESSAGE_SETTINGS_COMPOSE,
- GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- NULL,
- NULL,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- COMPOSE_INLINE_TOTAL,
- image_list,
- wgui_inline_items,
- 0,
- guiBuffer);
- SetCategory57RightSoftkeyFunctions(mmi_jmms_confirm_save_compose_settings, GoBackHistory);
- if (isInCall() == FALSE)
- SetKeyHandler(mmi_jmms_read_back_auto_sign_content, KEY_END, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_confirm_save_compose_settings
- * DESCRIPTION
- * It checks for default slide time value and auto sign (on/Off). If deafult slide time
- * input 0 then error pop up. If auto sign is on buyt content is empty then also error pop up.
- * If more than 20 slide then also error pop up.Otherwise ask confirmation to save compose settings
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_confirm_save_compose_settings(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U32 temp;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- temp = gui_atoi((UI_string_type) g_jmms_context->jmms_inline_items.compose_items_list.max_num_pages_buffer);
- //PMT VIKAS START 20060325
- //For empty value of slide time and no of slide field.
- if (pfnUnicodeStrncmp
- ((S8*) g_jmms_context->jmms_inline_items.compose_items_list.max_num_pages_buffer, "