ug_data->update_button = elm_button_add(ug_data->navi_bar);
elm_object_style_set(ug_data->update_button, "naviframe/title/default");
Evas_Object *update_icon = elm_icon_add(ug_data->update_button);
- elm_icon_file_set(update_icon, CONTROLBAR_ICON_UPDATE, NULL);
- elm_icon_resizable_set(update_icon, 1, 1);
+ elm_image_file_set(update_icon, CONTROLBAR_ICON_UPDATE, NULL);
+ elm_image_resizable_set(update_icon, 1, 1);
evas_object_image_smooth_scale_set(update_icon, 0);
elm_object_content_set(ug_data->update_button, update_icon);
evas_object_smart_callback_add(ug_data->update_button, "clicked", _update_all_account_cb, ug_data);
ug_data->update_button = elm_button_add(ug_data->navi_bar);
elm_object_style_set(ug_data->update_button, "naviframe/title_icon");
Evas_Object *update_icon = elm_icon_add(ug_data->update_button);
- elm_icon_file_set(update_icon, CONTROLBAR_ICON_UPDATE, NULL);
- elm_icon_resizable_set(update_icon, 1, 1);
+ elm_image_file_set(update_icon, CONTROLBAR_ICON_UPDATE, NULL);
+ elm_image_resizable_set(update_icon, 1, 1);
evas_object_image_smooth_scale_set(update_icon, 0);
elm_object_content_set(ug_data->update_button, update_icon);
evas_object_smart_callback_add(ug_data->update_button, "clicked", _update_all_account_cb, ug_data);
// 2line title text
elm_object_part_text_set(ug_data->navi_title_ly, "txt_title", _("IDS_EMAIL_HEADER_FOLDERS"));
if (ug_data->account_id == 0) {
- elm_icon_file_set(ug_data->sp_icon, NULL, NULL);
+ elm_image_file_set(ug_data->sp_icon, NULL, NULL);
elm_object_part_text_set(ug_data->navi_title_ly, "txt_sub", _("IDS_EMAIL_HEADER_ALL_ACCOUNTS"));
}
else{
email_account_t *account;
email_get_account(ug_data->account_id, WITHOUT_OPTION, &account);
- elm_icon_file_set(ug_data->sp_icon, account->logo_icon_path, NULL);
+ elm_image_file_set(ug_data->sp_icon, account->logo_icon_path, NULL);
elm_object_part_text_set(ug_data->navi_title_ly, "txt_sub", account->account_name);
if (!strcmp(part, "elm.icon") || !strcmp(part, "elm.icon.1"))
{
Evas_Object *icon = elm_icon_add(obj);
- elm_icon_file_set(icon, FOLDER_ICON_PLUS_FOLDER_LIST, NULL);
+ elm_image_file_set(icon, FOLDER_ICON_PLUS_FOLDER_LIST, NULL);
evas_object_smart_callback_add(icon, "clicked", _folder_icon_clicked_cb, data);
evas_object_propagate_events_set(icon, EINA_FALSE);
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
if (!strcmp(part, "elm.icon") || !strcmp(part, "elm.icon.1"))
{
Evas_Object *icon = elm_icon_add(obj);
- elm_icon_file_set(icon, FOLDER_ICON_FOLDER_LIST, NULL);
+ elm_image_file_set(icon, FOLDER_ICON_FOLDER_LIST, NULL);
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
return icon;
{
Evas_Object *icon = elm_icon_add(obj);
- elm_icon_file_set(icon, alist->account_info->logo_icon_path, NULL);
+ elm_image_file_set(icon, alist->account_info->logo_icon_path, NULL);
debug_log("logo_icon_path:%s", alist->account_info->logo_icon_path);
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
elm_genlist_item_expanded_set(item_data->it, !expanded);
if (expanded) {
- elm_icon_file_set(obj, FOLDER_ICON_PLUS_FOLDER_LIST, NULL);
+ elm_image_file_set(obj, FOLDER_ICON_PLUS_FOLDER_LIST, NULL);
} else {
- elm_icon_file_set(obj, FOLDER_ICON_MINUS_FOLDER_LIST, NULL);
+ elm_image_file_set(obj, FOLDER_ICON_MINUS_FOLDER_LIST, NULL);
}
}
if (!strcmp(part, "elm.icon"))
{
Evas_Object *icon = elm_icon_add(obj);
- elm_icon_file_set(icon, ACCOUNT_ICON_ALLACCOUNT, NULL);
+ elm_image_file_set(icon, ACCOUNT_ICON_ALLACCOUNT, NULL);
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
return icon;
}
if (!strcmp(part, "elm.icon"))
{
Evas_Object *icon = elm_icon_add(obj);
- elm_icon_file_set(icon, ACCOUNT_ICON_ADDACCOUNT, NULL);
+ elm_image_file_set(icon, ACCOUNT_ICON_ADDACCOUNT, NULL);
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
return icon;
}
{
Evas_Object *icon = elm_icon_add(obj);
- elm_icon_file_set(icon, alist->account_info->logo_icon_path, NULL);
+ elm_image_file_set(icon, alist->account_info->logo_icon_path, NULL);
debug_log("logo_icon_path:%s", alist->account_info->logo_icon_path);
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
err = email_get_account_list(&_account, &count);
if (err != EMAIL_ERROR_NONE) {
debug_critical("fail to get account list - err(%d)", err);
+ email_free_account(&_account, 1);
return FALSE;
}
int total_size = 0;
if (EINA_TRUE == ugd->has_body_html) {
- debug_log("attachment_inline_item_list count : %d", eina_list_count(ugd->attachment_inline_item_list));
+ debug_log("attachment_inline_item_list count : %d", eina_list_count(ugd->attachment_inline_item_list));
if (eina_list_count(ugd->attachment_inline_item_list) > 0) {
Eina_List *list = ugd->attachment_inline_item_list;
Eina_List *l = NULL;
email_attachment_data_t *attachment_data = NULL;
-
+
Eina_List *inline_list = NULL;
-
+
EINA_LIST_FOREACH(list, l, attachment_data) {
if (attachment_data != NULL) {
if (attachment_data->attachment_path != NULL) {
debug_log("Inline image : %s", attachment_data->attachment_path);
- inline_list = eina_list_append(inline_list, attachment_data->attachment_path);
+ inline_list = eina_list_append(inline_list, attachment_data->attachment_path);
}
}
}
debug_log("file path : %s", filePath);
- if (strncmp(type, ATTACHMENT_MEDIA_IMAGE, 5) == 0 || strncmp(type, ATTACHMENT_MEDIA_VIDEO, 5) == 0) {
+ if (strncmp(type, ATTACHMENT_MEDIA_IMAGE, 5) == 0) {
+ strncpy(thumb_path, filePath, MAX_ATTACHMENT_FILE_LEN);
+ } else if (strncmp(type, ATTACHMENT_MEDIA_VIDEO, 5) == 0) {
int err = _composer_attachment_make_ethumb(filePath, thumb_path);
if (err != COMPOSER_ERROR_NONE)
free(type);
type = NULL;
}
-
if (temp) {
free(temp);
temp = NULL;
int _composer_attachment_make_ethumb(const char *source, char *target)
{
- debug_log("");
-
-/* debug_log("file path: %s", source);
- efreet_mime_init();
- char *type = (char *)efreet_mime_type_get(ecore_file_file_get(source));
- char *mime_type = g_strdup(type);
- debug_log("mime type: %s", mime_type);
- efreet_mime_shutdown();
-
- if (mime_type) {
- if (strncmp(mime_type, "image", 5) == 0) {
- strncpy(target, source, MAX_ATTACHMENT_FILE_LEN);
-#endif
- } else if (strncmp(mime_type, "video", 5) == 0) {*/
- metadata_extractor_h metadata = NULL;
- int ret = METADATA_EXTRACTOR_ERROR_NONE;
- char *video_width = NULL;
- char *video_height = NULL;
- char *video_track_cnt = NULL;
- void *video_thumbnail = NULL;
- int video_thumbnail_len = 0;
- int video_w = 0;
- int video_h = 0;
-
- ret = metadata_extractor_create(&metadata);
- debug_log("metadata_extractor_create: %d", ret);
- if (!metadata) {
- debug_log("metadata extractor create failed");
- return COMPOSER_ERROR_ETHUMB_FAIL;
- }
+ debug_enter();
+
+ metadata_extractor_h metadata = NULL;
+ int ret = METADATA_EXTRACTOR_ERROR_NONE;
+ char *video_width = NULL;
+ char *video_height = NULL;
+ char *video_track_cnt = NULL;
+ void *video_thumbnail = NULL;
+ int video_thumbnail_len = 0;
+ int video_w = 0;
+ int video_h = 0;
+
+ ret = metadata_extractor_create(&metadata);
+ debug_log("metadata_extractor_create: %d", ret);
+ if (!metadata) {
+ debug_log("metadata extractor create failed");
+ return COMPOSER_ERROR_ETHUMB_FAIL;
+ }
- ret = metadata_extractor_set_path(metadata, source);
- debug_log("metadata_extractor_set_path: %d", ret);
-
- ret = metadata_extractor_get_metadata(metadata, METADATA_VIDEO_WIDTH, &video_width);
- debug_log("metadata_extractor_get_metadata: %d [video_width:%s]", ret, video_width);
- ret = metadata_extractor_get_metadata(metadata, METADATA_VIDEO_HEIGHT, &video_height);
- debug_log("metadata_extractor_get_metadata: %d [video_height:%s]", ret, video_height);
- ret = metadata_extractor_get_metadata(metadata, METADATA_HAS_VIDEO, &video_track_cnt);
- debug_log("metadata_extractor_get_metadata: %d [video_track_cnt:%s]", ret, video_track_cnt);
-
- ret = metadata_extractor_get_frame(metadata, &video_thumbnail, &video_thumbnail_len);
- debug_log("metadata_extractor_get_frame: %d (video_thumbnail_len:%d)", ret, video_thumbnail_len);
-
- if (video_thumbnail) {
- int mm_ret = 0;
- char filename[MAX_ATTACHMENT_FILE_LEN] = { 0, };
- char *file_name = NULL;
- char *file_ext = NULL;
-
- email_parse_get_filename_n_ext_from_path(source, &file_name, &file_ext);
- snprintf(filename, sizeof(filename), "%s%s%s%s", EMAIL_TMP_FOLDER"/", file_name, file_ext, ".jpg");
- g_free(file_name);
- g_free(file_ext);
-
- if (video_width)
- video_w = atoi(video_width);
- if (video_height)
- video_h = atoi(video_height);
- mm_ret = image_util_encode_jpeg(video_thumbnail,
- video_w, video_h,
- IMAGE_UTIL_COLORSPACE_RGB888, 70, filename);
-
- if (ecore_file_exists(filename)) {
- strncpy(target, filename, MAX_ATTACHMENT_FILE_LEN);
- debug_log("file : %s, thumb_path : %s", source, target);
- }
- g_free(video_thumbnail);
- }
+ ret = metadata_extractor_set_path(metadata, source);
+ debug_log("metadata_extractor_set_path: %d", ret);
+
+ ret = metadata_extractor_get_metadata(metadata, METADATA_VIDEO_WIDTH, &video_width);
+ debug_log("metadata_extractor_get_metadata: %d [video_width:%s]", ret, video_width);
+ ret = metadata_extractor_get_metadata(metadata, METADATA_VIDEO_HEIGHT, &video_height);
+ debug_log("metadata_extractor_get_metadata: %d [video_height:%s]", ret, video_height);
+ ret = metadata_extractor_get_metadata(metadata, METADATA_HAS_VIDEO, &video_track_cnt);
+ debug_log("metadata_extractor_get_metadata: %d [video_track_cnt:%s]", ret, video_track_cnt);
+
+ ret = metadata_extractor_get_frame(metadata, &video_thumbnail, &video_thumbnail_len);
+ debug_log("metadata_extractor_get_frame: %d (video_thumbnail_len:%d)", ret, video_thumbnail_len);
+
+ if (video_thumbnail) {
+ int mm_ret = 0;
+ char filename[MAX_ATTACHMENT_FILE_LEN] = { 0, };
+ char *file_name = NULL;
+ char *file_ext = NULL;
+
+ email_parse_get_filename_n_ext_from_path(source, &file_name, &file_ext);
+ snprintf(filename, sizeof(filename), "%s%s%s%s", EMAIL_TMP_FOLDER"/", file_name, file_ext, ".jpg");
+ g_free(file_name);
+ g_free(file_ext);
+
+ if (video_width)
+ video_w = atoi(video_width);
+ if (video_height)
+ video_h = atoi(video_height);
+ mm_ret = image_util_encode_jpeg(video_thumbnail,
+ video_w, video_h,
+ IMAGE_UTIL_COLORSPACE_RGB888, 70, filename);
+
+ if (ecore_file_exists(filename)) {
+ strncpy(target, filename, MAX_ATTACHMENT_FILE_LEN);
+ debug_log("file : %s, thumb_path : %s", source, target);
+ }
+ g_free(video_thumbnail);
+ }
- if (video_width)
- g_free(video_width);
- if (video_height)
- g_free(video_height);
- if (video_track_cnt)
- g_free(video_track_cnt);
+ if (video_width)
+ g_free(video_width);
+ if (video_height)
+ g_free(video_height);
+ if (video_track_cnt)
+ g_free(video_track_cnt);
- ret = metadata_extractor_destroy(metadata);
- debug_log("metadata_extractor_destroy: %d", ret);
-/* }
- }
+ ret = metadata_extractor_destroy(metadata);
+ debug_log("metadata_extractor_destroy: %d", ret);
- g_free(mime_type);
-*/
return COMPOSER_ERROR_NONE;
}
}
tokens = g_strsplit(url + 7, "/", -1);
-
+
email_attachment_data_t *attachment_data = (email_attachment_data_t *)calloc(1, sizeof(email_attachment_data_t));
attachment_data->account_id = ugd->account_info->account_id;
attachment_data->attachment_id = 0;
attachment_data->mail_id = 0;
attachment_data->save_status = 1;
attachment_data->attachment_mime_type = NULL;
- debug_log("attachment_name = %s, attachment_path = %s", attachment_data->attachment_name, attachment_data->attachment_path);
+ debug_log("attachment_name = %s, attachment_path = %s", attachment_data->attachment_name, attachment_data->attachment_path);
ugd->attachment_inline_item_list = eina_list_append(ugd->attachment_inline_item_list, attachment_data);
g_strfreev(tokens);
}
else
elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
}
+
+ if (!elm_entry_is_empty(obj))
+ elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
}
static void _focused_cb(void *data, Evas_Object *obj, void *event_info) // Focused callback will show X marked button and hide guidetext.
ugd->selected_entry = ugd->body_ewkview;
evas_object_focus_set(ugd->body_ewkview, EINA_TRUE);
- ugd->focus_status = COMPOSER_FOCUS_STATUS_NONE; // focus handling when rte is clicked
+ ugd->focus_status = COMPOSER_FOCUS_STATUS_NONE;
_composer_attachment_contract_items(ugd);
elm_layout_sizing_eval(ugd->c_layout);
nCount++;
}
}
- }
+ }
}
ugd->new_mail_info->mail_data->flags_draft_field = 1;
snprintf(recp_string, sizeof(recp_string), "<font_size=36><color=#000000>%s%s</color></font_size>", _("IDS_EMAIL_BODY_FROM"), ":");
elm_object_text_set(ugd->from_mbe, recp_string);
}
+ return;
case UG_EVENT_REGION_CHANGE:
case UG_EVENT_LOW_MEMORY:
case UG_EVENT_LOW_BATTERY:
}
return COMPOSER_ERROR_NONE;
-
} else {
if (operation == NULL) { /* ug called by ug_create */
debug_log("ug called by ug_create");
char folder_icon_path[1024] = { 0, };
Evas_Object *ic = elm_icon_add(obj);
snprintf(folder_icon_path, sizeof(folder_icon_path), IMGDIR "/U01_icon_folder.png");
- elm_icon_file_set(ic, folder_icon_path, NULL);
- elm_icon_resizable_set(ic, 0, 0);
+ elm_image_file_set(ic, folder_icon_path, NULL);
+ elm_image_resizable_set(ic, 0, 0);
evas_object_image_smooth_scale_set(ic, 0);
evas_object_show(ic);
{
case EMAIL_FLAG_TASK_STATUS_CLEAR:
ld->followup_flag = EMAIL_FLAG_TASK_STATUS_ACTIVE;
- elm_icon_file_set(ld->flag_ic, IMGDIR "/M02_email_Flag_Active.png", NULL);
+ elm_image_file_set(ld->flag_ic, IMGDIR "/M02_email_Flag_Active.png", NULL);
break;
case EMAIL_FLAG_TASK_STATUS_ACTIVE:
ld->followup_flag = EMAIL_FLAG_TASK_STATUS_COMPLETE;
- elm_icon_file_set(ld->flag_ic, IMGDIR "/M02_email_Flag_Complete.png", NULL);
+ elm_image_file_set(ld->flag_ic, IMGDIR "/M02_email_Flag_Complete.png", NULL);
break;
case EMAIL_FLAG_TASK_STATUS_COMPLETE:
ld->followup_flag = EMAIL_FLAG_TASK_STATUS_CLEAR;
- elm_icon_file_set(ld->flag_ic, IMGDIR "/M02_email_Flag_Clear.png", NULL);
+ elm_image_file_set(ld->flag_ic, IMGDIR "/M02_email_Flag_Clear.png", NULL);
break;
default :
debug_log("mail item has no followup flag");
} else if(!g_strcmp0(source, "elm.icon.2")){
if(ld->priority == EMAIL_OPTION_PRIORITY_HIGH) {
icon = elm_icon_add(obj);
- elm_icon_file_set(icon, IMGDIR "/M02_email_icon_priority.png", NULL);
- elm_icon_resizable_set(icon, 0, 0);
+ elm_image_file_set(icon, IMGDIR "/M02_email_icon_priority.png", NULL);
+ elm_image_resizable_set(icon, 0, 0);
evas_object_image_smooth_scale_set(icon, 0);
evas_object_show(icon);
return (void *)icon;
} else if(ld->reply_flag) {
icon = elm_icon_add(obj);
- elm_icon_file_set(icon, IMGDIR "/M02_email_icon_reply.png", NULL);
- elm_icon_resizable_set(icon, 0, 0);
+ elm_image_file_set(icon, IMGDIR "/M02_email_icon_reply.png", NULL);
+ elm_image_resizable_set(icon, 0, 0);
evas_object_image_smooth_scale_set(icon, 0);
evas_object_show(icon);
return (void *)icon;
} else if (ld->forward_flag) {
icon = elm_icon_add(obj);
- elm_icon_file_set(icon, IMGDIR "/M02_email_icon_forward.png", NULL);
- elm_icon_resizable_set(icon, 0, 0);
+ elm_image_file_set(icon, IMGDIR "/M02_email_icon_forward.png", NULL);
+ elm_image_resizable_set(icon, 0, 0);
evas_object_image_smooth_scale_set(icon, 0);
evas_object_show(icon);
return (void *)icon;
if(ld->is_attachment == true)
{
icon = elm_icon_add(obj);
- elm_icon_file_set(icon, IMGDIR "/M02_email_icon_attach.png", NULL);
+ elm_image_file_set(icon, IMGDIR "/M02_email_icon_attach.png", NULL);
evas_object_size_hint_min_set(icon, 35, 35);
evas_object_show(icon);
elm_box_pack_start(box, icon);
{
if(ld->priority == EMAIL_OPTION_PRIORITY_HIGH) {
Evas_Object *ic = elm_icon_add(obj);
- elm_icon_file_set(ic, IMGDIR "/M02_email_icon_priority.png", NULL);
- elm_icon_resizable_set(ic, 0, 0);
+ elm_image_file_set(ic, IMGDIR "/M02_email_icon_priority.png", NULL);
+ elm_image_resizable_set(ic, 0, 0);
evas_object_image_smooth_scale_set(ic, 0);
evas_object_show(ic);
return (void *)ic;
if(ld->item)
edje_object_signal_emit((Evas_Object *)elm_genlist_item_object_get(ld->item), "elm,state,priority", "elm");
Evas_Object *ic = elm_icon_add(obj);
- elm_icon_file_set(ic, IMGDIR "/M02_email_icon_priority.png", NULL);
- elm_icon_resizable_set(ic, 0, 0);
+ elm_image_file_set(ic, IMGDIR "/M02_email_icon_priority.png", NULL);
+ elm_image_resizable_set(ic, 0, 0);
evas_object_image_smooth_scale_set(ic, 0);
evas_object_show(ic);
return (void *)ic;
}
break;
}
- elm_icon_file_set(mailbox_ugd->sp_icon, ICON_TITLE_ALL_ACC, NULL);
+ elm_image_file_set(mailbox_ugd->sp_icon, ICON_TITLE_ALL_ACC, NULL);
elm_object_part_text_set(mailbox_ugd->navi_title_ly, "txt_sub", _("IDS_EMAIL_HEADER_ALL_ACCOUNTS"));
}
else {
int err = 0;
err = email_get_account(mailbox_ugd->account_id, EMAIL_ACC_GET_OPT_DEFAULT, &account);
if (err == EMAIL_ERROR_NONE) {
- elm_icon_file_set(mailbox_ugd->sp_icon, account->logo_icon_path, NULL);
+ elm_image_file_set(mailbox_ugd->sp_icon, account->logo_icon_path, NULL);
}
elm_object_part_text_set(mailbox_ugd->navi_title_ly, "txt_sub", mailbox_ugd->user_email);
if (account) {
- elm_icon_file_set(mailbox_ugd->sp_icon, account->logo_icon_path, NULL);
+ elm_image_file_set(mailbox_ugd->sp_icon, account->logo_icon_path, NULL);
email_free_account(&account, 1);
}
}
//searchbar category button
mailbox_ugd->searchby_button = elm_button_add(searchbar_layout);
Evas_Object *searchby_icon = elm_icon_add(mailbox_ugd->searchby_button);
- elm_icon_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_all_press.png", NULL);
- elm_icon_resizable_set(searchby_icon, 0, 0);
+ elm_image_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_all_press.png", NULL);
+ elm_image_resizable_set(searchby_icon, 0, 0);
evas_object_image_smooth_scale_set(searchby_icon, 0);
elm_object_content_set(mailbox_ugd->searchby_button, searchby_icon);
evas_object_smart_callback_add(mailbox_ugd->searchby_button, "clicked", _searchby_clicked_cb, mailbox_ugd);
Evas_Object* icon;
icon = elm_icon_add(mailbox_ugd->searchby_ctx_popup);
- elm_icon_file_set(icon, IMGDIR "/M02_email_icon_popup_all.png", NULL);
+ elm_image_file_set(icon, IMGDIR "/M02_email_icon_popup_all.png", NULL);
elm_ctxpopup_item_append(mailbox_ugd->searchby_ctx_popup, dgettext("sys_string", "IDS_COM_BODY_ALL"), icon, _searchby_ctxpopup_cb, mailbox_ugd);
icon = elm_icon_add(mailbox_ugd->searchby_ctx_popup);
- elm_icon_file_set(icon, IMGDIR "/M02_email_icon_popup_title.png", NULL);
+ elm_image_file_set(icon, IMGDIR "/M02_email_icon_popup_title.png", NULL);
elm_ctxpopup_item_append(mailbox_ugd->searchby_ctx_popup, dgettext("sys_string", "IDS_COM_BODY_DETAILS_TITLE"), icon, _searchby_ctxpopup_cb, mailbox_ugd);
icon = elm_icon_add(mailbox_ugd->searchby_ctx_popup);
- elm_icon_file_set(icon, IMGDIR "/M02_email_icon_popup_sender.png", NULL);
+ elm_image_file_set(icon, IMGDIR "/M02_email_icon_popup_sender.png", NULL);
if ((mailbox_ugd->mailbox_type == EMAIL_MAILBOX_TYPE_SENTBOX)
|| (mailbox_ugd->mailbox_type == EMAIL_MAILBOX_TYPE_OUTBOX)
}
icon = elm_icon_add(mailbox_ugd->searchby_ctx_popup);
- elm_icon_file_set(icon, IMGDIR "/M02_email_icon_popup_date.png", NULL);
+ elm_image_file_set(icon, IMGDIR "/M02_email_icon_popup_date.png", NULL);
elm_ctxpopup_item_append(mailbox_ugd->searchby_ctx_popup, _("IDS_EMAIL_OPT_DATE"), icon, _searchby_ctxpopup_cb, mailbox_ugd);
icon = elm_icon_add(mailbox_ugd->searchby_ctx_popup);
- elm_icon_file_set(icon, IMGDIR "/M02_email_icon_popup_advanced.png", NULL);
+ elm_image_file_set(icon, IMGDIR "/M02_email_icon_popup_advanced.png", NULL);
elm_ctxpopup_item_append(mailbox_ugd->searchby_ctx_popup, _("IDS_EMAIL_OPT_ADVANCED"), icon, _searchby_ctxpopup_cb, mailbox_ugd);
_move_searchby_ctxpopup(mailbox_ugd->searchby_ctx_popup, obj);
if (search_type == EMAIL_SEARCH_ALL) // All
{
- elm_icon_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_all_press.png", NULL);
+ elm_image_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_all_press.png", NULL);
}
else if (search_type == EMAIL_SEARCH_SUBJECT) // SUBJECT
{
- elm_icon_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_title_press.png", NULL);
+ elm_image_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_title_press.png", NULL);
}
else if (search_type == EMAIL_SEARCH_FROM || search_type == EMAIL_SEARCH_TO) // FROM or Recipient(TO)
{
- elm_icon_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_sender_press.png", NULL);
+ elm_image_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_sender_press.png", NULL);
}
else if (search_type == EMAIL_SEARCH_DATE) // Date
{
- elm_icon_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_date_press.png", NULL);
+ elm_image_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_date_press.png", NULL);
}
else if (search_type == EMAIL_SEARCH_ADVANCED) // Advanced
{
- elm_icon_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_advanced_press.png", NULL);
+ elm_image_file_set(searchby_icon, IMGDIR"/M02_email_icon_popup_advanced_press.png", NULL);
}
- elm_icon_resizable_set(searchby_icon, 0, 0);
+ elm_image_resizable_set(searchby_icon, 0, 0);
evas_object_image_smooth_scale_set(searchby_icon, 0);
elm_object_content_set(mailbox_ugd->searchby_button, searchby_icon);
if (oh_opened)
{
- elm_icon_file_set(mailbox_ugd->title_arrow, ICON_CLOSE, NULL);
+ elm_image_file_set(mailbox_ugd->title_arrow, ICON_CLOSE, NULL);
elm_object_item_data_set(nf_it, (void *) (!oh_opened));
}
mailbox_ugd->folder_button = elm_button_add(mailbox_ugd->navi_bar);
elm_object_style_set(mailbox_ugd->folder_button, "naviframe/title_icon");
Evas_Object *folder_icon = elm_icon_add(mailbox_ugd->folder_button);
- elm_icon_file_set(folder_icon, ICON_FOLDERS, NULL);
- elm_icon_resizable_set(folder_icon, 1, 1);
+ elm_image_file_set(folder_icon, ICON_FOLDERS, NULL);
+ elm_image_resizable_set(folder_icon, 1, 1);
evas_object_image_smooth_scale_set(folder_icon, 0);
elm_object_content_set(mailbox_ugd->folder_button, folder_icon);
evas_object_smart_callback_add(mailbox_ugd->folder_button, "clicked", _folder_cb, mailbox_ugd);
mailbox_ugd->update_button = elm_button_add(mailbox_ugd->navi_bar);
elm_object_style_set(mailbox_ugd->update_button, "naviframe/title_icon");
Evas_Object *update_icon = elm_icon_add(mailbox_ugd->update_button);
- elm_icon_file_set(update_icon, ICON_UPDATE, NULL);
- elm_icon_resizable_set(update_icon, 1, 1);
+ elm_image_file_set(update_icon, ICON_UPDATE, NULL);
+ elm_image_resizable_set(update_icon, 1, 1);
evas_object_image_smooth_scale_set(update_icon, 0);
elm_object_content_set(mailbox_ugd->update_button, update_icon);
evas_object_smart_callback_add(mailbox_ugd->update_button, "clicked", _update_toolbar_clicked_cb, mailbox_ugd);
mailbox_ugd->sp_icon = elm_icon_add(mailbox_ugd->navi_title_ly);
evas_object_show(mailbox_ugd->sp_icon);
elm_object_part_content_set(mailbox_ugd->navi_title_ly, "sub_left_icon", mailbox_ugd->sp_icon);
- elm_icon_file_set(mailbox_ugd->sp_icon, ICON_TITLE_ALL_ACC, NULL);
+ elm_image_file_set(mailbox_ugd->sp_icon, ICON_TITLE_ALL_ACC, NULL);
// add expand/collapse icon
mailbox_ugd->title_arrow = elm_icon_add(mailbox_ugd->navi_title_ly);
evas_object_show(mailbox_ugd->title_arrow);
elm_object_part_content_set(mailbox_ugd->navi_title_ly, "sub_right_icon", mailbox_ugd->title_arrow);
- elm_icon_file_set(mailbox_ugd->title_arrow, ICON_CLOSE, NULL);
+ elm_image_file_set(mailbox_ugd->title_arrow, ICON_CLOSE, NULL);
_create_controlbar(mailbox_ugd);
if (oh_opened)
{
- elm_icon_file_set(mailbox_ugd->title_arrow, ICON_CLOSE, NULL);
+ elm_image_file_set(mailbox_ugd->title_arrow, ICON_CLOSE, NULL);
destroy_account_cb(mailbox_ugd->ug_account, mailbox_ugd);
elm_object_item_data_set(nf_it, (void *) (!oh_opened));
}
{
if (mailbox_ugd->view_type != EMAIL_VIEW_EDIT && mailbox_ugd->view_type != EMAIL_VIEW_SEARCH)
{
- elm_icon_file_set(mailbox_ugd->title_arrow, ICON_OPEN, NULL);
+ elm_image_file_set(mailbox_ugd->title_arrow, ICON_OPEN, NULL);
_account_cb(data, obj, NULL);
elm_object_item_data_set(nf_it, (void *) (!oh_opened));
}
if (mailbox_ugd->mode == EMAIL_MAILBOX_MODE_ALL) {
- elm_icon_file_set(mailbox_ugd->sp_icon, ICON_TITLE_ALL_ACC, NULL);
+ elm_image_file_set(mailbox_ugd->sp_icon, ICON_TITLE_ALL_ACC, NULL);
switch(mailbox_ugd->mailbox_type)
{
email_account_t *account;
email_get_account(mailbox_ugd->account_id, 0, &account);
if (account) {
- elm_icon_file_set(mailbox_ugd->sp_icon, account->logo_icon_path, NULL);
+ elm_image_file_set(mailbox_ugd->sp_icon, account->logo_icon_path, NULL);
email_free_account(&account, 1);
}
}
Name: org.tizen.email
Summary: Native email application
-Version: 0.0.13
+Version: 0.0.14
Release: 1
Group: devel
License: Flora
debug_log("email_get_attachment_data_list - err (%d)", err);
if (err == EMAIL_ERROR_NONE) {
+ if (!email_check_dir_exist(DIR_DEFAULT_MEDIA_PHONE"/Saved Email")) {
+ int nErr = -1;
+ nErr = mkdir(DIR_DEFAULT_MEDIA_PHONE"/Saved Email", 0755);
+ debug_log("errno: %d", nErr);
+ if (nErr == -1) {
+ debug_log("Eml file folder creation failed");
+ return -1;
+ }
+ } else
+ debug_log("Eml file folder already exists.");
+
+ char *subject = elm_entry_utf8_to_markup(ug_data->property->subject);
+ if (!g_strcmp0(subject, "")) {
+ g_free(subject);
+ subject = g_strdup(_("IDS_EMAIL_BODY_NO_SUBJECT"));
+ }
+
+ tzset(); /* MUST BE. */
+
+ time_t now_time = time(NULL);
+
+ struct tm *dummy = localtime(&now_time);
+ struct tm now_tm;
+ memcpy(&now_tm, dummy, sizeof(struct tm));
+
+ char date[9] = { 0, };
+ if (now_tm.tm_mon + 1 < 10 && now_tm.tm_mday < 10)
+ snprintf(date, sizeof(date), "%d0%d0%d", now_tm.tm_year + 1900, now_tm.tm_mon + 1, now_tm.tm_mday);
+ else if (now_tm.tm_mon + 1 < 10 && now_tm.tm_mday >= 10)
+ snprintf(date, sizeof(date), "%d0%d%d", now_tm.tm_year + 1900, now_tm.tm_mon + 1, now_tm.tm_mday);
+ else if (now_tm.tm_mon + 1 >= 10 && now_tm.tm_mday < 10)
+ snprintf(date, sizeof(date), "%d%d0%d", now_tm.tm_year + 1900, now_tm.tm_mon + 1, now_tm.tm_mday);
+ else
+ snprintf(date, sizeof(date), "%d%d%d", now_tm.tm_year + 1900, now_tm.tm_mon + 1, now_tm.tm_mday);
+ debug_log("date(%s)", date);
+
char file_name[MAX_PATH_LEN] = { 0, };
- snprintf(file_name, sizeof(file_name), "%s_%d_%d.%s", DIR_DEFAULT_MEDIA_PHONE"/Downloads/email", ug_data->account_id, ug_data->mail_id, "eml");
+ snprintf(file_name, sizeof(file_name), "%s/%s_%d_%d_%s.%s", DIR_DEFAULT_MEDIA_PHONE"/Saved Email", subject, ug_data->account_id, ug_data->mail_id, date, "eml");
char *output_file_path = g_strdup(file_name);
debug_log("output_file_path(%s)", file_name, output_file_path);
debug_log("email_write_mime_file - err(%d)", err);
g_free(output_file_path);
+ g_free(subject);
}
if (mail_t) {
static void _ctxpopup_detail_contact_cb(void *data, Evas_Object *obj, void *event_info)
{
- debug_log("");
+ debug_log("data(%s)", data);
if (data == NULL || _g_ug_data == NULL) {
debug_log("data is NULL");
return;