-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);
-}
-