From 3c69b4d6a2ae8ccb5d137a5be9f8fb25ef5a75ac Mon Sep 17 00:00:00 2001 From: Sungbok Park Date: Thu, 21 Feb 2013 06:49:08 +0900 Subject: [PATCH] fix file:// prefix issue in attach file path --- composer/src/email-composer-callback.c | 12 ++++++++++-- composer/src/email-composer.c | 7 +++++++ setting/src/email-view-account-options.c | 4 +--- setting/src/email-view-account-setup.c | 1 - viewer/src/email-viewer.c | 2 +- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/composer/src/email-composer-callback.c b/composer/src/email-composer-callback.c index 0f14fb6..4732915 100755 --- a/composer/src/email-composer-callback.c +++ b/composer/src/email-composer-callback.c @@ -1151,6 +1151,13 @@ Eina_Bool _composer_send_mail_cb(void *data) } if (ugd->send_result == COMPOSER_ERROR_NONE) { +#if 1 + int ret = status_message_post(dgettext("sys_string", "IDS_COM_POP_SENDING")); + if (ret) + debug_log("status_message_post() failed: %d", ret); + + ug_destroy_me(ugd->ug_main); +#else if (ugd->composer_noti) { evas_object_del(ugd->composer_noti); ugd->composer_noti = NULL; @@ -1192,6 +1199,7 @@ Eina_Bool _composer_send_mail_cb(void *data) evas_object_show(ugd->composer_noti); ugd->send_timer = ecore_timer_add(2.0, _composer_send_popup_finish_cb, ugd); +#endif } else { if (ugd->composer_noti) { evas_object_del(ugd->composer_noti); @@ -1201,7 +1209,7 @@ Eina_Bool _composer_send_mail_cb(void *data) _("IDS_EMAIL_POP_UNABLE_TO_SEND_EMAIL"), 0, NULL, NULL, 2.0, _composer_fail_to_send_popup_cb); } - return EINA_TRUE; + return EINA_FALSE; } Eina_Bool _composer_region_show_cb(void *data) @@ -2554,7 +2562,7 @@ void _composer_cbar_send_clicked(void *data, Evas_Object *obj, void *event_info) _composer_download_attachment(ugd); } else { ugd->bSendBtnDisabled = true; - ugd->send_timer = ecore_timer_add(0.5, _composer_send_mail_cb, ugd); + ugd->send_timer = ecore_timer_add(0.1, _composer_send_mail_cb, ugd); } } diff --git a/composer/src/email-composer.c b/composer/src/email-composer.c index 0e0628d..ad2f561 100755 --- a/composer/src/email-composer.c +++ b/composer/src/email-composer.c @@ -1623,6 +1623,13 @@ static void _composer_post_parse_bundle(EmailComposerUGD *ugd, service_h data) if (argv[0] != NULL) { if (!g_str_has_prefix(argv[0], "http://")) { + if (!strncmp(argv[0], "file://", 7)) { + char *filepath = NULL; + filepath = g_strdup(argv[0] + 7); + g_free(argv[0]); + argv[0] = filepath; + } + Eina_List *list = NULL; char tmp_file_path[MAX_PATH_LEN + 1] = { 0, }; char *file_ext = NULL; diff --git a/setting/src/email-view-account-options.c b/setting/src/email-view-account-options.c index f33e040..9b67812 100755 --- a/setting/src/email-view-account-options.c +++ b/setting/src/email-view-account-options.c @@ -19,7 +19,6 @@ static email_account_t *account_data = NULL; static struct viewdata *g_vd = NULL; -static int _g_body_size[10] = {0, 1024/2, 1024, 1024*2, 1024*5, 1024*10, 1024*20, 1024*50, 1024*100, 1024*512}; static int _create(struct viewdata *vd); static int _update(struct viewdata *vd); @@ -1562,9 +1561,8 @@ static void _gl_sig_sel_cb(void *data, Evas_Object *obj, void *event_info) Elm_Object_Item *item = (Elm_Object_Item *)event_info; elm_genlist_item_selected_set(item, EINA_FALSE); - - } + static void _gl_ex_sel_cb(void *data, Evas_Object *obj, void *event_info) { debug_log(""); diff --git a/setting/src/email-view-account-setup.c b/setting/src/email-view-account-setup.c index 7b8a309..a2d2be2 100755 --- a/setting/src/email-view-account-setup.c +++ b/setting/src/email-view-account-setup.c @@ -1049,7 +1049,6 @@ static void _back_cb(void *data, Evas_Object *obj, void *event_info) debug_log(""); struct viewdata *vd = (struct viewdata *)data; - struct priv_data *p = vd->priv; if (vd->ugd->atomic_pop) { debug_log("During atomic poping"); diff --git a/viewer/src/email-viewer.c b/viewer/src/email-viewer.c index 188ce24..2eacfe1 100755 --- a/viewer/src/email-viewer.c +++ b/viewer/src/email-viewer.c @@ -3611,7 +3611,7 @@ static Eina_Bool _save_email_prog_cb(void *data) debug_log("date(%s)", date); char file_name[MAX_PATH_LEN] = { 0, }; - 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"); + 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); -- 2.7.4