修改注意两方面:
1,reminder_buff 的长度:
2,显示内容:
如果需要在提醒中显示Details,请修改长度并在 mmi_tdl_entry_reminder 中添加一段代码,修改后如下:
1,reminder_buff 的长度:
#define MMI_TDL_MAX_REMINDER_NOTE_EN_SIZE \
(MMI_TDL_MAX_NOTE_EN_LEN + MMI_TDL_MAX_REMINDER_PREFIX_EN_LEN + MAX_TDL_LOCATION_SIZE * ENCODING_LENGTH)
2,显示内容:
void mmi_tdl_entry_reminder(void)
{
。。。。。。
if (g_tdl_cntx.reminder_type == SRV_TDL_VCAL_TASK)
{
mmi_ucs2cpy(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_TIME));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
date_string(&g_tdl_cntx.task_reminder.due_time, date_buff, DT_IDLE_SCREEN);
time_string(&g_tdl_cntx.task_reminder.due_time, time_buff, DT_IDLE_SCREEN);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)date_buff);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)time_buff);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_SUBJECT));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)g_tdl_cntx.task_reminder.subject);
memcpy(&alarm, &g_tdl_cntx.task_reminder.alarm, sizeof(srv_tdl_alarm_struct));
//show details
if (0 != mmi_ucs2strlen((S8*)g_tdl_cntx.event_reminder.details))
{
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_DETAILS));//
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*) g_tdl_cntx.event_reminder.details);
}
}
else if (g_tdl_cntx.reminder_type == SRV_TDL_VCAL_EVENT)
{
mmi_tdl_set_fields(SRV_TDL_VCAL_EVENT, g_tdl_cntx.event_reminder.category);
mmi_ucs2cpy(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_TIME));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
date_string(&g_tdl_cntx.event_reminder.start_time, date_buff, DT_IDLE_SCREEN);
time_string(&g_tdl_cntx.event_reminder.start_time, time_buff, DT_IDLE_SCREEN);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)date_buff);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)time_buff);
if (mmi_tdl_get_period_type() == MMI_TDL_FIELD_MASK_ALL_DATE)
{
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"~");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
date_string(&g_tdl_cntx.event_reminder.end_time, (UI_string_type)date_buff, DT_IDLE_SCREEN);
time_string(&g_tdl_cntx.event_reminder.end_time, (UI_string_type)time_buff, DT_IDLE_SCREEN);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)date_buff);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)time_buff);
}
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_SUBJECT));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2ncat(
g_tdl_edit_cntx.reminder_buff,
(S8*)g_tdl_cntx.event_reminder.subject,
MAX_TODO_NOTE_LEN);
memcpy(&alarm, &g_tdl_cntx.event_reminder.alarm, sizeof(srv_tdl_alarm_struct));
if (mmi_tdl_is_field_valid(MMI_TDL_FIELD_MASK_LOCATION) &&
0 != mmi_ucs2strlen((S8*)g_tdl_cntx.event_reminder.location))
{
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_TODO_LOCATION));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*) g_tdl_cntx.event_reminder.location);
}
//show details
if (0 != mmi_ucs2strlen((S8*)g_tdl_cntx.event_reminder.details))
{
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_DETAILS));//
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*) g_tdl_cntx.event_reminder.details);
}
}
note_len = mmi_ucs2strlen(g_tdl_edit_cntx.reminder_buff);
。。。。。。
}
1,reminder_buff 的长度:
2,显示内容:
如果需要在提醒中显示Details,请修改长度并在 mmi_tdl_entry_reminder 中添加一段代码,修改后如下:
1,reminder_buff 的长度:
#define MMI_TDL_MAX_REMINDER_NOTE_EN_SIZE \
(MMI_TDL_MAX_NOTE_EN_LEN + MMI_TDL_MAX_REMINDER_PREFIX_EN_LEN + MAX_TDL_LOCATION_SIZE * ENCODING_LENGTH)
2,显示内容:
void mmi_tdl_entry_reminder(void)
{
。。。。。。
if (g_tdl_cntx.reminder_type == SRV_TDL_VCAL_TASK)
{
mmi_ucs2cpy(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_TIME));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
date_string(&g_tdl_cntx.task_reminder.due_time, date_buff, DT_IDLE_SCREEN);
time_string(&g_tdl_cntx.task_reminder.due_time, time_buff, DT_IDLE_SCREEN);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)date_buff);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)time_buff);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_SUBJECT));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)g_tdl_cntx.task_reminder.subject);
memcpy(&alarm, &g_tdl_cntx.task_reminder.alarm, sizeof(srv_tdl_alarm_struct));
//show details
if (0 != mmi_ucs2strlen((S8*)g_tdl_cntx.event_reminder.details))
{
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_DETAILS));//
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*) g_tdl_cntx.event_reminder.details);
}
}
else if (g_tdl_cntx.reminder_type == SRV_TDL_VCAL_EVENT)
{
mmi_tdl_set_fields(SRV_TDL_VCAL_EVENT, g_tdl_cntx.event_reminder.category);
mmi_ucs2cpy(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_TIME));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
date_string(&g_tdl_cntx.event_reminder.start_time, date_buff, DT_IDLE_SCREEN);
time_string(&g_tdl_cntx.event_reminder.start_time, time_buff, DT_IDLE_SCREEN);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)date_buff);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)time_buff);
if (mmi_tdl_get_period_type() == MMI_TDL_FIELD_MASK_ALL_DATE)
{
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"~");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
date_string(&g_tdl_cntx.event_reminder.end_time, (UI_string_type)date_buff, DT_IDLE_SCREEN);
time_string(&g_tdl_cntx.event_reminder.end_time, (UI_string_type)time_buff, DT_IDLE_SCREEN);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)date_buff);
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)time_buff);
}
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_SUBJECT));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2ncat(
g_tdl_edit_cntx.reminder_buff,
(S8*)g_tdl_cntx.event_reminder.subject,
MAX_TODO_NOTE_LEN);
memcpy(&alarm, &g_tdl_cntx.event_reminder.alarm, sizeof(srv_tdl_alarm_struct));
if (mmi_tdl_is_field_valid(MMI_TDL_FIELD_MASK_LOCATION) &&
0 != mmi_ucs2strlen((S8*)g_tdl_cntx.event_reminder.location))
{
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_TODO_LOCATION));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*) g_tdl_cntx.event_reminder.location);
}
//show details
if (0 != mmi_ucs2strlen((S8*)g_tdl_cntx.event_reminder.details))
{
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_GLOBAL_DETAILS));//
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, GetString(STR_ID_CAL_COLON));
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*)L"\n");
mmi_ucs2cat(g_tdl_edit_cntx.reminder_buff, (S8*) g_tdl_cntx.event_reminder.details);
}
}
note_len = mmi_ucs2strlen(g_tdl_edit_cntx.reminder_buff);
。。。。。。
}