📄 jprofileuihandler.c
字号:
* FUNCTION
* mmi_ph_exit_edit_selected_profile
* DESCRIPTION
* exit handler for edit profile screen
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_ph_exit_edit_selected_profile(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
history h;
U16 input_buffer_size;
S16 nHistory = 0;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
h.scrnID = SCR_ID_PROF_HDLR_EDIT_PROFILE;
CloseCategory57Screen();
h.entryFuncPtr = mmi_ph_entry_edit_selected_profile;
pfnUnicodeStrcpy((S8*) h.inputBuffer, (S8*) & nHistory);
GetCategory57History(h.guiBuffer);
input_buffer_size = (U16) GetCategory57DataSize();
GetCategory57Data((U8*) h.inputBuffer);
AddNHistory(h, input_buffer_size);
}
/*****************************************************************************
* FUNCTION
* mmi_ph_highlight_inline_item
* DESCRIPTION
* exit handler for edit profile screen
* PARAMETERS
* index [IN] IN this is the index of the inline item in edit profile screen
* RETURNS
* void
*****************************************************************************/
void mmi_ph_highlight_inline_item(S32 index)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if ((index == PH_PROFILE_DATA_ACCOUNT))
{
ChangeLeftSoftkey(STR_GLOBAL_SELECT, NULL);
SetLeftSoftkeyFunction(mmi_ph_prof_list_data_acct, KEY_EVENT_UP);
}
else if ((index == PH_PROFILE_CONN_TYPE))
{
ChangeLeftSoftkey(STR_GLOBAL_SELECT, NULL);
SetLeftSoftkeyFunction(mmi_ph_show_connection_type_options, KEY_EVENT_UP);
}
}
/*****************************************************************************
* FUNCTION
* mmi_ph_prof_list_data_acct
* DESCRIPTION
* LSK handler of Data Account item in Profile Setting inline editor screen.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_ph_prof_list_data_acct(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if ((g_ph_cntx.profile_module == PH_MMS_PROFILE) || (g_ph_cntx.profile_module == PH_MMS_PROV_PROFILE))
{
mmi_dtcnt_select_account(
mmi_ph_prof_callback,
g_ph_title_img_id,
DATA_ACCOUNT_BEARER_GPRS);
}
else
{
mmi_dtcnt_select_account(
mmi_ph_prof_callback,
g_ph_title_img_id,
DATA_ACCOUNT_BEARER_GPRS | DATA_ACCOUNT_BEARER_CSD);
}
}
/*****************************************************************************
* FUNCTION
* mmi_ph_prof_callback
* DESCRIPTION
*
* PARAMETERS
* index [IN]
* RETURNS
* void
*****************************************************************************/
void mmi_ph_prof_callback(U16 index)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (g_ph_cntx.profile_display_p == NULL)
{
g_ph_cntx.profile_display_p =
(ph_show_editable_profile_struct*) jdd_MemAlloc(sizeof(ph_show_editable_profile_struct), 1);
}
g_ph_cntx.profile_display_p->data_account = (U8) index;
if ((g_ph_cntx.profile_module == PH_BROWSER_PROV_PROFILE) || (g_ph_cntx.profile_module == PH_MMS_PROV_PROFILE))
{
ph_data_account_enum data_account;
data_account = mmi_ph_check_data_account_type(g_ph_cntx.profile_display_p->data_account);
if (data_account == PH_DATA_ACCOUNT_CSD)
{
mmi_prov_prof_save_csd_data_acct();
}
else if (data_account == PH_DATA_ACCOUNT_GPRS)
{
mmi_prov_prof_save_gprs_data_acct();
}
}
else
{
if (g_ph_cntx.profile_module == PH_BROWSER_PROFILE)
{
g_ph_wap_profile_p->data_account = g_ph_cntx.profile_display_p->data_account;
mmi_dtcnt_get_account_name(
g_ph_cntx.profile_display_p->data_account,
(S8*) g_ph_cntx.profile_display_p->DataAccountName,
MAX_DATA_ACCOUNT_NAME_LEN);
g_ph_done_flag = 0x01;
DeleteNHistory(1);
GoBackHistory();
}
else if (g_ph_cntx.profile_module == PH_MMS_PROFILE)
{
g_ph_mms_profile_p->data_account = g_ph_cntx.profile_display_p->data_account;
mmi_dtcnt_get_account_name(
g_ph_cntx.profile_display_p->data_account,
(S8*) g_ph_cntx.profile_display_p->DataAccountName,
MAX_DATA_ACCOUNT_NAME_LEN);
g_ph_done_flag = 0x01;
GoBackHistory();
}
/* mmi_dtcnt_get_account_name(
g_ph_cntx.profile_display_p->data_account,
(S8*) g_ph_cntx.profile_display_p->DataAccountName,
MAX_DATA_ACCOUNT_NAME_LEN);
g_ph_done_flag = 0x01;
DeleteNHistory(1);
GoBackHistory();*/
}
}
/*****************************************************************************
* FUNCTION
* mmi_ph_selected_profile_fill_inline_struct
* DESCRIPTION
* This API handles the inline items in the edit profile screen ,like data account,username ,password,conn type.....
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_ph_selected_profile_fill_inline_struct(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
S32 buffer_size = 0;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (g_ph_cntx.profile_display_p == NULL)
{
g_ph_cntx.profile_display_p =
(ph_show_editable_profile_struct*) jdd_MemAlloc(sizeof(ph_show_editable_profile_struct), 1);
}
SetInlineItemActivation((wgui_inline_items + PH_PROFILE_NAME), KEY_LSK, KEY_EVENT_UP);
SetInlineItemActivation((wgui_inline_items + PH_PROFILE_HOMEPAGE), KEY_LSK, KEY_EVENT_UP);
SetInlineItemActivation((wgui_inline_items + PH_PROFILE_DATA_ACCOUNT), INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
SetInlineItemActivation((wgui_inline_items + PH_PROFILE_CONN_TYPE), INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
SetInlineItemActivation((wgui_inline_items + PH_PROFILE_USER_NAME), KEY_LSK, KEY_EVENT_UP);
SetInlineItemActivation((wgui_inline_items + PH_PROFILE_USER_PASSWORD), KEY_LSK, KEY_EVENT_UP);
SetInlineItemCaption((wgui_inline_items + PH_PROFILE_NAME_STR), (U8*) GetString(STR_ID_PROF_HDLR_RENAME_PROFILE));
if (g_ph_cntx.profile_module == PH_BROWSER_PROFILE)
{
SetInlineItemCaption(
(wgui_inline_items + PH_PROFILE_HOMEPAGE_STR),
(U8*) GetString(STR_ID_PROF_HDLR_HOMEPAGE));
}
else if (g_ph_cntx.profile_module == PH_MMS_PROFILE)
{
SetInlineItemCaption(
(wgui_inline_items + PH_PROFILE_HOMEPAGE_STR),
(U8*) GetString(STR_ID_PROF_HDLR_MMSC_URL));
}
SetInlineItemCaption(
(wgui_inline_items + PH_PROFILE_DATA_ACCOUNT_STR),
(U8*) GetString(STR_ID_PROF_HDLR_DATA_ACCOUNT));
SetInlineItemCaption((wgui_inline_items + PH_PROFILE_CONN_TYPE_STR), (U8*) GetString(STR_ID_PROF_HDLR_CONN_TYPE));
SetInlineItemCaption((wgui_inline_items + PH_PROFILE_USER_NAME_STR), (U8*) GetString(STR_ID_PROF_HDLR_USER_NAME));
SetInlineItemCaption(
(wgui_inline_items + PH_PROFILE_USER_PASSWORD_STR),
(U8*) GetString(STR_ID_PROF_HDLR_PASSWORD));
SetInlineItemDisplayOnly(
(wgui_inline_items + PH_PROFILE_DATA_ACCOUNT),
(U8*) g_ph_cntx.profile_display_p->DataAccountName);
if (g_ph_cntx.profile_module == PH_BROWSER_PROFILE)
{
/* profile connection type */
if ((g_ph_wap_profile_p->conn_type == PH_CONN_TYPE_CONNECTION_OREINTED)
|| (g_ph_wap_profile_p->conn_type == PH_CONN_TYPE_CONNECTION_OREINTED_SECURE))
{
SetInlineItemDisplayOnly(
(wgui_inline_items + PH_PROFILE_CONN_TYPE),
(U8*) GetString(STR_ID_PROF_HDLR_CONN_TYPE_CONNECTION));
}
else if (g_ph_wap_profile_p->conn_type == PH_CONN_TYPE_HTTP)
{
SetInlineItemDisplayOnly(
(wgui_inline_items + PH_PROFILE_CONN_TYPE),
(U8*) GetString(STR_ID_PROF_HDLR_CONN_TYPE_HTTP));
}
/* profile name inline item */
buffer_size = NVRAM_WAP_PROFILE_PROFILE_NAME_LEN;
if (g_ph_wap_prof_name_arr_p->nvram_wap_profile_name_array[g_ph_cntx.profile_index].dcs == PH_DCS_ASCII)
{
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* 0 */
AnsiiToUnicodeString(
(S8*) g_ph_cntx.profile_display_p->profile_name,
(S8*) (g_ph_wap_prof_name_arr_p->nvram_wap_profile_name_array[g_ph_cntx.profile_index].profile_name));
}
else if (g_ph_wap_prof_name_arr_p->nvram_wap_profile_name_array[g_ph_cntx.profile_index].dcs == PH_DCS_UCS)
{
UCS2Strcpy(
(S8*) g_ph_cntx.profile_display_p->profile_name,
(S8*) (g_ph_wap_prof_name_arr_p->nvram_wap_profile_name_array[g_ph_cntx.profile_index].profile_name));
}
SetInlineItemFullScreenEdit(
(wgui_inline_items + PH_PROFILE_NAME),
STR_ID_PROF_HDLR_RENAME_PROFILE,
//GetRootTitleIcon(SERVICES_WAP_MENU_ID),
GetRootTitleIcon(g_ph_title_img_id),
(U8*) g_ph_cntx.profile_display_p->profile_name,
buffer_size,
INPUT_TYPE_ALPHANUMERIC_SENTENCECASE | INPUT_TYPE_USE_ENCODING_BASED_LENGTH | INPUT_TYPE_ONE_LESS_CHARACTER);
SetInlineFullScreenEditCustomFunction(
wgui_inline_items + PH_PROFILE_NAME,
mmi_ph_editable_profile_full_screen_edit);
/* profile homepage url inline item */
buffer_size = NVRAM_WAP_PROFILE_HOMEPAGE_URL_LEN;
AnsiiToUnicodeString(
(S8*) g_ph_cntx.profile_display_p->homepage_url,
(S8*) (g_ph_wap_profile_p->homepage_url));
SetInlineItemFullScreenEdit(
(wgui_inline_items + PH_PROFILE_HOMEPAGE),
STR_ID_PROF_HDLR_HOMEPAGE,
//GetRootTitleIcon(SERVICES_WAP_MENU_ID),
GetRootTitleIcon(g_ph_title_img_id),
(U8*) g_ph_cntx.profile_display_p->homepage_url,
buffer_size,
INPUT_TYPE_ALPHANUMERIC_SENTENCECASE | INPUT_TYPE_USE_ONLY_ENGLISH_MODES);
SetInlineFullScreenEditCustomFunction(
wgui_inline_items + PH_PROFILE_HOMEPAGE,
mmi_ph_editable_profile_full_screen_edit);
/* profile username inline item */
buffer_size = NVRAM_WAP_PROFILE_USERNAME_LEN;
AnsiiToUnicodeString((S8*) g_ph_cntx.profile_display_p->username, (S8*) (g_ph_wap_profile_p->username));
SetInlineItemFullScreenEdit(
(wgui_inline_items + PH_PROFILE_USER_NAME),
STR_ID_PROF_HDLR_USER_NAME,
//GetRootTitleIcon(SERVICES_WAP_MENU_ID),
GetRootTitleIcon(g_ph_title_img_id),
(U8*) (g_ph_cntx.profile_display_p->username),
buffer_size,
INPUT_TYPE_ALPHANUMERIC_SENTENCECASE | INPUT_TYPE_USE_ONLY_ENGLISH_MODES);
SetInlineFullScreenEditCustomFunction(
wgui_inline_items + PH_PROFILE_USER_NAME,
mmi_ph_editable_profile_full_screen_edit);
/* profile password inline item */
buffer_size = NVRAM_WAP_PROFILE_PASSWORD_LEN;
AnsiiToUnicodeString((S8*) g_ph_cntx.profile_display_p->password, (S8*) (g_ph_wap_profile_p->password));
SetInlineItemFullScreenEdit(
(wgui_inline_items + PH_PROFILE_USER_PASSWORD),
STR_ID_PROF_HDLR_PASSWORD,
//GetRootTitleIcon(SERVICES_WAP_MENU_ID),
GetRootTitleIcon(g_ph_title_img_id),
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -