static void _create_more_ctxpopup(EmailViewerUGD *ug_data);
static void _delete_evas_objects(EmailViewerUGD *ug_data);
-static void _launch_vcs_editor(EmailViewerUGD *ug_data);
-
/* callback functions */
static void _back_cb(void *data, Evas_Object *obj, void *event_info);
static void _prev_mail_cb(void *data, Evas_Object *obj, void *event_info);
static void _reply_all_cb(void *data, Evas_Object *obj, void *event_info);
static void _reply_option_cb(void *data, Evas_Object *obj, void *event_info);
static void _forward_cb(void *data, Evas_Object *obj, void *event_info);
-static void _add_to_calendar_cb(void *data, Evas_Object *obj, void *event_info);
static void _resend_cb(void *data, Evas_Object *obj, void *event_info);
static void _delete_cb(void *data, Evas_Object *obj, void *event_info);
static void _move_cb(void *data, Evas_Object *obj, void *event_info);
static void _ctxpopup_detail_contact_cb(void *data, Evas_Object *obj, void *event_info);
static void _ctxpopup_send_email_cb(void *data, Evas_Object *obj, void *event_info);
static void _ctxpopup_add_contact_cb(void *data, Evas_Object *obj, void *event_info);
-static void _ctxpopup_cutlink_update_contact_cb(void *data, Evas_Object *obj, void *event_info);
-static void _ctxpopup_select_contact_mode_email_cb(void *data, Evas_Object *obj, void *event_info);
static void _ctxpopup_add_block_rule_cb(void *data, Evas_Object *obj, void *event_info);
static void _popup_waiting_response_cb(void *data, Evas_Object *obj, void *event_info);
static void _popup_response_cb(void *data, Evas_Object *obj, void *event_info);
elm_ctxpopup_item_append(ug_data->con_popup, dgettext("sys_string", "IDS_COM_BODY_MOVE"), NULL, _move_cb, ug_data);
elm_ctxpopup_item_append(ug_data->con_popup, _("IDS_EMAIL_OPT_SAVE_EMAIL_ABB"), NULL, _save_email_cb, ug_data);
elm_ctxpopup_item_append(ug_data->con_popup, _("IDS_EMAIL_OPT_VIEW_CONTACT"), NULL, _ctxpopup_detail_contact_cb, g_strdup(index));
- elm_ctxpopup_item_append(ug_data->con_popup, _("IDS_EMAIL_OPT_ADD_TO_CALENDAR"), NULL, _add_to_calendar_cb, ug_data);
ug_data->more_ctx_block_item = elm_ctxpopup_item_append(ug_data->con_popup, _("IDS_EMAIL_OPT_BLOCK"), NULL, _ctxpopup_add_block_rule_cb, prop->sender);
_delete_contacts_list(contact_list_item);
elm_ctxpopup_item_append(ug_data->con_popup, dgettext("sys_string", "IDS_COM_BODY_MOVE"), NULL, _move_cb, ug_data);
elm_ctxpopup_item_append(ug_data->con_popup, _("IDS_EMAIL_OPT_SAVE_EMAIL_ABB"), NULL, _save_email_cb, ug_data);
- elm_ctxpopup_item_append(ug_data->con_popup, dgettext("sys_string", "IDS_COM_OPT_ADD_TO_CONTACTS"), NULL, _ctxpopup_select_contact_mode_email_cb, prop->sender);
- elm_ctxpopup_item_append(ug_data->con_popup, _("IDS_EMAIL_OPT_ADD_TO_CALENDAR"), NULL, _add_to_calendar_cb, ug_data);
+ elm_ctxpopup_item_append(ug_data->con_popup, dgettext("sys_string", "IDS_COM_OPT_ADD_TO_CONTACTS"), NULL, _ctxpopup_add_contact_cb, prop->sender);
ug_data->more_ctx_block_item = elm_ctxpopup_item_append(ug_data->con_popup, _("IDS_EMAIL_OPT_BLOCK"), NULL, _ctxpopup_add_block_rule_cb, prop->sender);
}
debug_log("service_destroy: %d", ret);
}
-static void _launch_vcs_editor(EmailViewerUGD *ug_data)
-{
- debug_log("");
-
- if (!ug_data) {
- debug_log("ug_data is NULL");
- return;
- }
-
- char account_id[MAX_STR_LEN] = { 0, };
- char mail_id[MAX_STR_LEN] = { 0, };
-
- EmailViewerProp *prop = ug_data->property;
-
- int ret;
- service_h service = NULL;
-
- ret = service_create(&service);
- debug_log("service_create: %d", ret);
- if (!service) {
- debug_log("service create failed");
- return;
- }
-
- snprintf(account_id, sizeof(account_id), "%d", prop->account_id);
- snprintf(mail_id, sizeof(mail_id), "%d", prop->mail_id);
-
- ret = service_add_extra_data(service, EMAIL_BUNDLE_KEY_CALENDAR_EDIT_ACCOUNT_ID, account_id);
- debug_log("service_add_extra_data: %d", ret);
- ret = service_add_extra_data(service, EMAIL_BUNDLE_KEY_CALENDAR_EDIT_MAIL_ID, mail_id);
- debug_log("service_add_extra_data: %d", ret);
- ret = service_add_extra_data(service, EMAIL_BUNDLE_KEY_CALENDAR_EDIT_SRC_BOX, prop->src_box);
- debug_log("service_add_extra_data: %d", ret);
- ret = service_add_extra_data(service, EMAIL_BUNDLE_KEY_CALENDAR_EDIT_INDEX, EMAIL_BUNDLE_VAL_CALENDAR_EDIT_INDEX);
- debug_log("service_add_extra_data: %d", ret);
- ret = service_add_extra_data(service, EMAIL_BUNDLE_KEY_CALENDAR_EDIT_NOTE, prop->subject);
- debug_log("service_add_extra_data: %d", ret);
-
- ug_data->ug_calendar_edit = create_ug(UG_NAME_CALENDAR_EDIT, service, ug_data);
-
- ret = service_destroy(service);
- debug_log("service_destroy: %d", ret);
-}
-
static void _back_cb(void *data, Evas_Object *obj, void *event_info)
{
debug_log("");
_launch_composer(ug_data, RUN_COMPOSER_FORWARD);
}
-static void _add_to_calendar_cb(void *data, Evas_Object *obj, void *event_info)
-{
- debug_log("");
-
- if (data == NULL)
- return;
-
- EmailViewerUGD *ug_data = (EmailViewerUGD *)data;
-
- if (ug_data->con_popup) {
- evas_object_del(ug_data->con_popup);
- ug_data->con_popup = NULL;
- }
-
- _launch_vcs_editor(ug_data);
-}
-
static void _resend_cb(void *data, Evas_Object *obj, void *event_info)
{
debug_log("");
debug_log("service_destroy: %d", ret);
}
-static void _ctxpopup_cutlink_update_contact_cb(void *data, Evas_Object *obj, void *event_info)
-{
- debug_log("");
- if (!data || !_g_ug_data) {
- debug_log("data is NULL");
- return;
- }
-
- char tmp[MAX_STR_LEN] = { 0, };
- EmailViewerUGD *ug_data = _g_ug_data;
-
- if (ug_data->con_popup == NULL) {
- debug_log("con_popup is NULL");
- return;
- }
-
- if (ug_data->con_popup) {
- evas_object_del(ug_data->con_popup);
- ug_data->con_popup = NULL;
- }
-
- int ret;
- service_h service = NULL;
-
- ret = service_create(&service);
- debug_log("service_create: %d", ret);
- if (!service) {
- debug_log("service create failed");
- return;
- }
-
- if (ug_data->create_contact_arg == CONTACTUI_REQ_ADD_PHONE_NUMBER) {
- snprintf(tmp, sizeof(tmp), "%d", CT_UG_REQUEST_ADD_WITH_NUM);
- ret = service_add_extra_data(service, CT_UG_BUNDLE_TYPE, tmp);
- debug_log("service_add_extra_data: %d", ret);
- ret = service_add_extra_data(service, CT_UG_BUNDLE_NUM, (char *)data);
- debug_log("service_add_extra_data: %d", ret);
- }
- if (ug_data->create_contact_arg == CONTACTUI_REQ_ADD_EMAIL) {
- snprintf(tmp, sizeof(tmp), "%d", CT_UG_REQUEST_ADD_WITH_EMAIL);
- ret = service_add_extra_data(service, CT_UG_BUNDLE_TYPE, tmp);
- debug_log("service_add_extra_data: %d", ret);
- ret = service_add_extra_data(service, CT_UG_BUNDLE_EMAIL, (char *)data);
- debug_log("service_add_extra_data: %d", ret);
- }
- if (ug_data->create_contact_arg == CONTACTUI_REQ_ADD_URL) {
- snprintf(tmp, sizeof(tmp), "%d", CT_UG_REQUEST_ADD_WITH_WEB);
- ret = service_add_extra_data(service, CT_UG_BUNDLE_TYPE, tmp);
- debug_log("service_add_extra_data: %d", ret);
- ret = service_add_extra_data(service, CT_UG_BUNDLE_WEB, (char *)data);
- debug_log("service_add_extra_data: %d", ret);
- }
-
- ug_data->ug_contacts_search = create_ug(UG_CONTACTS_LIST, service, ug_data);
-
- ret = service_destroy(service);
- debug_log("service_destroy: %d", ret);
-}
-
-static void _ctxpopup_select_contact_mode_email_cb(void *data, Evas_Object *obj, void *event_info)
-{
- debug_log("");
- if (!data || !_g_ug_data) {
- debug_log("data is NULL");
- return;
- }
-
- EmailViewerUGD *ug_data = _g_ug_data;
- Evas_Coord x, y;
-
- if (ug_data->con_popup) {
- evas_object_del(ug_data->con_popup);
- ug_data->con_popup = NULL;
- }
-
- ug_data->con_popup = elm_ctxpopup_add(ug_data->navi_bar);
- if (ug_data->con_popup == NULL) {
- debug_log("cannot create context popup");
- return;
- }
-
- ug_data->create_contact_arg = CONTACTUI_REQ_ADD_EMAIL;
- ug_data->update_contact_type = CONTACTUI_REQ_ADD_EMAIL;
-
- elm_ctxpopup_item_append(ug_data->con_popup, dgettext("sys_string", "IDS_COM_OPT_CREATE_CONTACT"), NULL, _ctxpopup_add_contact_cb, data);
- elm_ctxpopup_item_append(ug_data->con_popup, _("IDS_EMAIL_OPT_UPDATE_EXISTING"), NULL, _ctxpopup_cutlink_update_contact_cb, data);
-
- evas_pointer_canvas_xy_get(ug_data->evas, &x, &y);
- evas_object_move(ug_data->con_popup, x, y);
- evas_object_show(ug_data->con_popup);
-}
-
static void _ctxpopup_add_block_rule_cb(void *data, Evas_Object *obj, void *event_info)
{
debug_log("");
ug_data->ctx_block_item = elm_ctxpopup_item_append(ug_data->con_popup, _("IDS_EMAIL_OPT_BLOCK"), NULL, _ctxpopup_add_block_rule_cb, addrs_info->address);
_delete_contacts_list(contact_list_item);
} else {
- elm_ctxpopup_item_append(ug_data->con_popup, dgettext("sys_string", "IDS_COM_OPT_ADD_TO_CONTACTS"), NULL, _ctxpopup_select_contact_mode_email_cb, addrs_info->address);
+ elm_ctxpopup_item_append(ug_data->con_popup, dgettext("sys_string", "IDS_COM_OPT_ADD_TO_CONTACTS"), NULL, _ctxpopup_add_contact_cb, addrs_info->address);
elm_ctxpopup_item_append(ug_data->con_popup, _("IDS_EMAIL_OPT_SEND_EMAIL"), NULL, _ctxpopup_send_email_cb, addrs_info->address);
ug_data->ctx_block_item = elm_ctxpopup_item_append(ug_data->con_popup, _("IDS_EMAIL_OPT_BLOCK"), NULL, _ctxpopup_add_block_rule_cb, addrs_info->address);
}