diff options
Diffstat (limited to 'composer')
-rwxr-xr-x | composer/CMakeLists.txt | 3 | ||||
-rwxr-xr-x | composer/include/email-composer-type.h | 2 | ||||
-rwxr-xr-x | composer/include/email-composer.h | 1 | ||||
-rwxr-xr-x | composer/src/email-composer-attachment.c | 2 | ||||
-rwxr-xr-x | composer/src/email-composer-callback.c | 35 | ||||
-rwxr-xr-x | composer/src/email-composer-contents.c | 7 | ||||
-rwxr-xr-x | composer/src/email-composer-predictive-search.c | 3 | ||||
-rwxr-xr-x | composer/src/email-composer-recipient.c | 1 | ||||
-rwxr-xr-x | composer/src/email-composer-util.c | 27 | ||||
-rwxr-xr-x | composer/src/email-composer.c | 116 |
10 files changed, 129 insertions, 68 deletions
diff --git a/composer/CMakeLists.txt b/composer/CMakeLists.txt index 42aa49f..4d8b6dd 100755 --- a/composer/CMakeLists.txt +++ b/composer/CMakeLists.txt @@ -49,10 +49,9 @@ ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") ADD_DEFINITIONS("-DDEBUG") ADD_DEFINITIONS("-D_TEMPORARY_FIX_FOR_ROTATION_") ADD_DEFINITIONS("-D_POPUP_WITH_LIST") -##ADD_DEFINITIONS("-D_ALWAYS_CC_MYSELF") +ADD_DEFINITIONS("-D_ALWAYS_CC_MYSELF") ADD_DEFINITIONS("-D_CC_BCC") ##ADD_DEFINITIONS("-D_LAUNCH_APP") -##ADD_DEFINITIONS("-D_NO_ACCOUNT") ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} email-common ${CMAKE_LDFLAGS} ${pkgs-composer_LDFLAGS}) diff --git a/composer/include/email-composer-type.h b/composer/include/email-composer-type.h index 457c72d..0c72425 100755 --- a/composer/include/email-composer-type.h +++ b/composer/include/email-composer-type.h @@ -153,7 +153,7 @@ typedef enum { typedef enum { COMPOSER_FOCUS_STATUS_NONE = 1 << 0, - COMPOSER_FOCUS_STATUS_ATTACHMENT_REMOVED = 1 << 1, + COMPOSER_FOCUS_STATUS_SELECTED = 1 << 1, COMPOSER_FOCUS_STATUS_ON_PAUSE = 1 << 2, COMPOSER_FOCUS_STATUS_MAX = 1 << 3, } COMPOSER_FOCUS_STATUS_TYPE; diff --git a/composer/include/email-composer.h b/composer/include/email-composer.h index 28e9b93..dc4b1fd 100755 --- a/composer/include/email-composer.h +++ b/composer/include/email-composer.h @@ -144,6 +144,7 @@ struct ug_data { bool b_bcc_ps_open; bool ps_on; bool is_mbe_selected; + bool is_recipient_duplicated; /* Multibutton Entry */ Evas_Object *to_mbe_entry; diff --git a/composer/src/email-composer-attachment.c b/composer/src/email-composer-attachment.c index 66e6556..e0176e7 100755 --- a/composer/src/email-composer-attachment.c +++ b/composer/src/email-composer-attachment.c @@ -595,7 +595,6 @@ Evas_Object *_composer_attachment_make_thumbnail(EmailComposerUGD *ugd, char *fi debug_log("file path : %s", filePath); if (strncmp(type, ATTACHMENT_MEDIA_IMAGE, 5) == 0 || strncmp(type, ATTACHMENT_MEDIA_VIDEO, 5) == 0) { - int err = _composer_attachment_make_ethumb(filePath, thumb_path); if (err != COMPOSER_ERROR_NONE) @@ -995,7 +994,6 @@ static void _composer_attachment_delete_all_icon_clicked_cb(void *data, Evas_Obj } if (ugd->selected_entry == ugd->body_ewkview) { - ugd->focus_status = COMPOSER_FOCUS_STATUS_ATTACHMENT_REMOVED; // focus to body _composer_mbe_set_focus(ugd); } } diff --git a/composer/src/email-composer-callback.c b/composer/src/email-composer-callback.c index cb54ec5..dfafbd4 100755 --- a/composer/src/email-composer-callback.c +++ b/composer/src/email-composer-callback.c @@ -460,8 +460,6 @@ void _composer_mbe_focused_cb(void *data, Evas_Object *obj, void *event_info) elm_object_focus_set(ugd->cc_mbe, EINA_FALSE); else if (EINA_TRUE == elm_object_focus_get(ugd->bcc_mbe)) elm_object_focus_set(ugd->bcc_mbe, EINA_FALSE); - - evas_object_focus_set(ugd->body_ewkview, EINA_TRUE); } } } @@ -510,12 +508,17 @@ Eina_Bool _composer_mbe_verified_item_cb(Evas_Object *obj, const char *item_labe if (item_data) { debug_log("Normally Added"); - return EINA_TRUE; } debug_log("item_label = %s", item_label); + debug_log("is_recipient_duplicated:%d", ugd->is_recipient_duplicated); + if (ugd->is_recipient_duplicated == TRUE) { + ugd->is_recipient_duplicated = FALSE; + return EINA_FALSE; + } + if (_composer_is_valid_email(item_label)) { EmailRecpInfo *ri = (EmailRecpInfo *) calloc(1, sizeof(EmailRecpInfo)); ri->selected_email_idx = 0; @@ -720,12 +723,14 @@ void _composer_mbe_popup_move_to_to_cb(void *data, Evas_Object *obj, void *event } Elm_Object_Item *item = elm_multibuttonentry_selected_item_get(mbe); - if (item) - { + if (item) { ri = (EmailRecpInfo *) elm_object_item_data_get(item); if (ri) { elm_object_item_del(item); - elm_multibuttonentry_item_append(ugd->to_mbe, ri->email_list[ri->selected_email_idx].email_addr, NULL, ri); + if (ri->display_name) + elm_multibuttonentry_item_append(ugd->to_mbe, ri->display_name, NULL, ri); + else + elm_multibuttonentry_item_append(ugd->to_mbe, ri->email_list[ri->selected_email_idx].email_addr, NULL, ri); } else { debug_log("ri is NULL"); @@ -781,12 +786,14 @@ void _composer_mbe_popup_move_to_cc_cb(void *data, Evas_Object *obj, void *event } Elm_Object_Item *item = elm_multibuttonentry_selected_item_get(mbe); - if (item) - { + if (item) { ri = (EmailRecpInfo *) elm_object_item_data_get(item); if (ri) { elm_object_item_del(item); - elm_multibuttonentry_item_append(ugd->cc_mbe, ri->email_list[ri->selected_email_idx].email_addr, NULL, ri); + if (ri->display_name) + elm_multibuttonentry_item_append(ugd->cc_mbe, ri->display_name, NULL, ri); + else + elm_multibuttonentry_item_append(ugd->cc_mbe, ri->email_list[ri->selected_email_idx].email_addr, NULL, ri); } else { debug_log("ri is NULL"); @@ -842,12 +849,14 @@ void _composer_mbe_popup_move_to_bcc_cb(void *data, Evas_Object *obj, void *even } Elm_Object_Item *item = elm_multibuttonentry_selected_item_get(mbe); - if (item) - { + if (item) { ri = (EmailRecpInfo *) elm_object_item_data_get(item); if (ri) { elm_object_item_del(item); - elm_multibuttonentry_item_append(ugd->bcc_mbe, ri->email_list[ri->selected_email_idx].email_addr, NULL, ri); + if (ri->display_name) + elm_multibuttonentry_item_append(ugd->bcc_mbe, ri->display_name, NULL, ri); + else + elm_multibuttonentry_item_append(ugd->bcc_mbe, ri->email_list[ri->selected_email_idx].email_addr, NULL, ri); } else { debug_log("ri is NULL"); @@ -1259,8 +1268,6 @@ Eina_Bool _composer_mbe_create_change_addr_list(void *data) ugd->change_addr_noti = _composer_create_noti(ugd, false, _("IDS_EMAIL_OPT_CHANGE_EMAIL_ADDRESS_ABB"), NULL, 1, dgettext("sys_string", "IDS_COM_SK_CANCEL"), NULL, 0.0, _composer_mbe_change_addr_response_cb); - elm_object_focus_set(ugd->change_addr_noti, EINA_TRUE); - #ifdef _POPUP_WITH_LIST elm_object_style_set(ugd->change_addr_noti, "min_menustyle"); #else diff --git a/composer/src/email-composer-contents.c b/composer/src/email-composer-contents.c index ec0e0bd..442c321 100755 --- a/composer/src/email-composer-contents.c +++ b/composer/src/email-composer-contents.c @@ -84,9 +84,6 @@ static void _focused_cb(void *data, Evas_Object *obj, void *event_info) // Focus } else { if (ugd->selected_entry == ugd->body_ewkview) { elm_object_focus_set(ugd->subject_entry, EINA_FALSE); - - ugd->focus_status = COMPOSER_FOCUS_STATUS_NONE; - evas_object_focus_set(ugd->body_ewkview, EINA_TRUE); } } } @@ -421,8 +418,6 @@ static void _composer_webkit_unfocused_cb(void *data, Evas *e, Evas_Object *obj, if (ewk_view_script_execute(ugd->body_ewkview, COMPOSER_JS_SET_UNFOCUS, _composer_script_executed_cb, 0) == EINA_FALSE) debug_log("COMPOSER_JS_SET_UNFOCUS failed."); #endif - if (ewk_view_script_execute(ugd->body_ewkview, "deleteImgLayer()", _composer_script_executed_cb, 0) == EINA_FALSE) - debug_log("deleteImgLayer() failed."); } } @@ -571,7 +566,7 @@ static void _composer_webview_contextmenu_customize_cb(void *data, Evas_Object * count = ewk_context_menu_item_count(contextmenu); - for (i = 0 ; i < count ; i++) { + for (i = 0; i < count; i++) { Ewk_Context_Menu_Item_Tag menu_item_tag = EWK_CONTEXT_MENU_ITEM_TAG_NO_ACTION; menu_item = ewk_context_menu_nth_item_get(contextmenu, i); if (EWK_CONTEXT_MENU_ITEM_TYPE_ACTION != ewk_context_menu_item_type_get(menu_item)) diff --git a/composer/src/email-composer-predictive-search.c b/composer/src/email-composer-predictive-search.c index bd7a67a..8cd4ebb 100755 --- a/composer/src/email-composer-predictive-search.c +++ b/composer/src/email-composer-predictive-search.c @@ -557,6 +557,7 @@ static void _composer_ps_list_sel(void *data, Evas_Object *obj, void *event_info if (ugd->selected_entry == ugd->to_mbe_entry) { if (_composer_check_recipient_is_duplicated(ugd, ugd->to_mbe, ri)) { + ugd->is_recipient_duplicated = TRUE; if (ugd->composer_noti) { evas_object_del(ugd->composer_noti); ugd->composer_noti = NULL; @@ -593,6 +594,7 @@ static void _composer_ps_list_sel(void *data, Evas_Object *obj, void *event_info elm_entry_entry_set(ugd->to_mbe_entry, ""); } else if (ugd->selected_entry == ugd->cc_mbe_entry) { if (_composer_check_recipient_is_duplicated(ugd, ugd->cc_mbe, ri)) { + ugd->is_recipient_duplicated = TRUE; if (ugd->composer_noti) { evas_object_del(ugd->composer_noti); ugd->composer_noti = NULL; @@ -629,6 +631,7 @@ static void _composer_ps_list_sel(void *data, Evas_Object *obj, void *event_info elm_entry_entry_set(ugd->cc_mbe_entry, ""); } else if (ugd->selected_entry == ugd->bcc_mbe_entry) { if (_composer_check_recipient_is_duplicated(ugd, ugd->bcc_mbe, ri)) { + ugd->is_recipient_duplicated = TRUE; if (ugd->composer_noti) { evas_object_del(ugd->composer_noti); ugd->composer_noti = NULL; diff --git a/composer/src/email-composer-recipient.c b/composer/src/email-composer-recipient.c index 3980268..0ed5faf 100755 --- a/composer/src/email-composer-recipient.c +++ b/composer/src/email-composer-recipient.c @@ -22,6 +22,7 @@ #include "email-composer-util.h" #include "email-composer-predictive-search.h" + static void _composer_mbe_register_mbe_entry_callback(Evas_Object *parent, EmailComposerUGD *ugd); static void _composer_mbe_register_mbe_callback(Evas_Object *parent, EmailComposerUGD *ugd); static Evas_Object *_composer_mbe_create_mbe(Evas_Object *parent, COMPOSER_RECIPIENT_TYPE_E recp_type, EmailComposerUGD *ugd); diff --git a/composer/src/email-composer-util.c b/composer/src/email-composer-util.c index 8bb3215..bceb935 100755 --- a/composer/src/email-composer-util.c +++ b/composer/src/email-composer-util.c @@ -1818,9 +1818,7 @@ void _composer_add_to_address(EmailComposerUGD *ugd) Eina_Bool overflow_flag = TRUE; Eina_Bool invalid_address_flag = FALSE; -#ifdef _NO_ACCOUNT char *from_addr = NULL; -#endif if (ugd->existing_mail_info->mail_data != NULL && ugd->existing_mail_info->mail_data->full_address_from != NULL && (ugd->composer_type == RUN_COMPOSER_REPLY || ugd->composer_type == RUN_COMPOSER_REPLY_ALL)) { @@ -1921,15 +1919,10 @@ void _composer_add_to_address(EmailComposerUGD *ugd) debug_log("display_name = %s, email_address = %s", ri->display_name, ri->email_list[0].email_addr); debug_log("email_addr = %s", ri->email_list[0].email_addr); -#ifdef _NO_ACCOUNT debug_log("account.email_addr = %s", ugd->account_info->account->user_email_address); debug_log("from_addr = %s", from_addr); - if (g_strcmp0(ri->email_list[0].email_addr, ugd->account_info->account->user_email_address) != 0 || ugd->composer_type != RUN_COMPOSER_REPLY_ALL) -#else - if (ugd->composer_type != RUN_COMPOSER_REPLY_ALL) -#endif - { + if (g_strcmp0(ri->email_list[0].email_addr, ugd->account_info->account->user_email_address) != 0 || ugd->composer_type != RUN_COMPOSER_REPLY_ALL) { if (!_composer_check_recipient_is_duplicated(ugd, ugd->to_mbe, ri)) { if (!_composer_is_valid_email(ri->email_list[0].email_addr)) { @@ -2473,7 +2466,7 @@ void _composer_make_html_body(EmailComposerUGD *ugd) s = (char *)malloc(s_len); if (!s) { - debug_assert("memory allocation failed"); + debug_error("memory allocation failed"); if (ri->display_name) { free(ri->display_name); ri->display_name = NULL; @@ -2585,7 +2578,7 @@ void _composer_make_html_body(EmailComposerUGD *ugd) } strncpy(szMetaViewportInfo, HTML_META_INFORMATION, TEMP_BUFFER_SIZE); -#ifdef _NO_ACCOUNT + if (ugd->composer_type != RUN_COMPOSER_EDIT && (ugd->account_info->account->options).add_signature) { char signature_text[128] = { 0, }; @@ -2597,15 +2590,7 @@ void _composer_make_html_body(EmailComposerUGD *ugd) } else { full_text = g_strconcat(szMetaViewportInfo, text_for_original_info, html_text_for_body, NULL); } -#else - if (ugd->composer_type != RUN_COMPOSER_EDIT) { - char signature_text[128] = { 0, }; - snprintf(signature_text, sizeof(signature_text), "<br><br>%s<br><br>", DEFAULT_SIGNATURE); - full_text = g_strconcat(szMetaViewportInfo, text_for_original_info, html_text_for_body, signature_text, NULL); - } else { - full_text = g_strconcat(szMetaViewportInfo, text_for_original_info, html_text_for_body, NULL); - } -#endif + debug_log("text_for_original_info: %s", text_for_original_info); debug_log("html_text_for_body: %s", html_text_for_body); @@ -3226,6 +3211,8 @@ void _composer_noti_response_cb(void *data, Evas_Object *obj, void *event_info) EmailComposerUGD *ugd = (EmailComposerUGD *)data; + elm_object_tree_focus_allow_set(ugd->c_layout, EINA_TRUE); // block the focus not to open IME. + Evas_Object *mbe = NULL; if (ugd->selected_entry == ugd->to_mbe_entry) { @@ -3408,7 +3395,7 @@ Eina_Bool _composer_mbe_set_focus(void *data) debug_log("selected_entry = %x, to_mbe_entry = %x, cc_mbe_entry = %x, bcc_mbe_entry = %x, subject_entry = %x, body_ewkview = %x", ugd->selected_entry, ugd->to_mbe_entry, ugd->cc_mbe_entry, ugd->bcc_mbe_entry, ugd->subject_entry, ugd->body_ewkview); - if (ugd->selected_entry == ugd->to_mbe_entry) { + if ((ugd->selected_entry == ugd->to_mbe_entry) || (ugd->selected_entry == NULL)) { debug_log("TO MBE ENTRY FOCUS!!!"); elm_object_focus_set(ugd->to_mbe, EINA_TRUE); } else if (ugd->selected_entry == ugd->cc_mbe_entry) { diff --git a/composer/src/email-composer.c b/composer/src/email-composer.c index f00ddcd..ba8ae0a 100755 --- a/composer/src/email-composer.c +++ b/composer/src/email-composer.c @@ -175,13 +175,12 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h data, void * debug_log("def account_id = %d", ugd->account_info->account_id); -#ifdef _NO_ACCOUNT ugd->eComposerErrorType = _composer_get_account_list(ugd); if (ugd->eComposerErrorType == COMPOSER_ERROR_NO_ACCOUNT_LIST) { return ugd->main_layout; } -#endif + ugd->has_body_html = EINA_TRUE; ugd->saved_html_path = g_strconcat(EMAIL_TMP_FOLDER, SAVE_HTML_FILE_NAME, NULL); @@ -961,6 +960,7 @@ static void _composer_init_data(void *data) ugd->cc_added = false; ugd->bcc_added = false; ugd->isRotated = false; + ugd->is_recipient_duplicated = false; ugd->temporary_fix_for_rotation = false; ugd->is_main_scroller_scrolling = false; @@ -1386,10 +1386,16 @@ static int _composer_pre_parse_bundle(EmailComposerUGD *ugd, service_h data) debug_log("service_get_extra_data: %d", ret); debug_log("argv[0]:%s", argv[0]); } -#ifdef _NO_ACCOUNT + + int ret; + char *operation = NULL; + ret = service_get_operation(data, &operation); + debug_log("service_get_operation: %d", ret); + debug_log("operation = %s", operation); + if (email_engine_get_default_account(&ugd->account_info->account_id) == false) return COMPOSER_ERROR_NO_DEFAULT_ACCOUNT; -#endif + if (argv[0]) { debug_log("argv[0] = %s", argv[0]); @@ -1397,22 +1403,39 @@ static int _composer_pre_parse_bundle(EmailComposerUGD *ugd, service_h data) debug_log("composer type = %d", ugd->composer_type); if (ugd->composer_type == RUN_COMPOSER_EXTERNAL) { - int ret; - ret = service_get_extra_data(data, EMAIL_BUNDLE_KEY_TO, (char **)&argv[1]); - debug_log("service_get_extra_data: %d", ret); - debug_log("to:%s", argv[1]); - ret = service_get_extra_data(data, EMAIL_BUNDLE_KEY_CC, (char **)&argv[2]); - debug_log("service_get_extra_data: %d", ret); - debug_log("cc:%s", argv[2]); - ret = service_get_extra_data(data, EMAIL_BUNDLE_KEY_BCC, (char **)&argv[3]); - debug_log("service_get_extra_data: %d", ret); - debug_log("bcc:%s", argv[3]); - ret = service_get_extra_data(data, EMAIL_BUNDLE_KEY_SUBJECT, (char **)&argv[4]); - debug_log("service_get_extra_data: %d", ret); - debug_log("subject:%s", argv[4]); - ret = service_get_extra_data(data, EMAIL_BUNDLE_KEY_BODY, (char **)&argv[5]); - debug_log("service_get_extra_data: %d", ret); - debug_log("body:%s", argv[5]); + if (operation == NULL) { /* ug called by ug_create */ + ret = service_get_extra_data(data, EMAIL_BUNDLE_KEY_TO, (char **)&argv[1]); + debug_log("service_get_extra_data: %d", ret); + debug_log("to:%s", argv[1]); + ret = service_get_extra_data(data, EMAIL_BUNDLE_KEY_CC, (char **)&argv[2]); + debug_log("service_get_extra_data: %d", ret); + debug_log("cc:%s", argv[2]); + ret = service_get_extra_data(data, EMAIL_BUNDLE_KEY_BCC, (char **)&argv[3]); + debug_log("service_get_extra_data: %d", ret); + debug_log("bcc:%s", argv[3]); + ret = service_get_extra_data(data, EMAIL_BUNDLE_KEY_SUBJECT, (char **)&argv[4]); + debug_log("service_get_extra_data: %d", ret); + debug_log("subject:%s", argv[4]); + ret = service_get_extra_data(data, EMAIL_BUNDLE_KEY_BODY, (char **)&argv[5]); + debug_log("service_get_extra_data: %d", ret); + debug_log("body:%s", argv[5]); + } else { /* ug called by appcontrol request */ + ret = service_get_extra_data(data, SERVICE_DATA_TO, (char **)&argv[1]); + debug_log("service_get_extra_data: %d", ret); + debug_log("to:%s", argv[1]); + ret = service_get_extra_data(data, SERVICE_DATA_CC, (char **)&argv[2]); + debug_log("service_get_extra_data: %d", ret); + debug_log("cc:%s", argv[2]); + ret = service_get_extra_data(data, SERVICE_DATA_BCC, (char **)&argv[3]); + debug_log("service_get_extra_data: %d", ret); + debug_log("bcc:%s", argv[3]); + ret = service_get_extra_data(data, SERVICE_DATA_SUBJECT, (char **)&argv[4]); + debug_log("service_get_extra_data: %d", ret); + debug_log("subject:%s", argv[4]); + ret = service_get_extra_data(data, SERVICE_DATA_TEXT, (char **)&argv[5]); + debug_log("service_get_extra_data: %d", ret); + debug_log("body:%s", argv[5]); + } } else { int ret; ret = service_get_extra_data(data, EMAIL_BUNDLE_KEY_ACCOUNT_ID, (char **)&argv[1]); @@ -1464,7 +1487,6 @@ static int _composer_pre_parse_bundle(EmailComposerUGD *ugd, service_h data) } if (argv[4] != NULL && strlen(argv[4]) != 0) ugd->new_mail_info->mail_data->subject = g_strdup(argv[4]); - if (argv[5] != NULL && strlen(argv[5]) != 0) { ugd->new_mail_info->mail_data->file_path_plain = g_strdup(argv[5]); ugd->new_mail_info->mail_data->body_download_status = 1; @@ -1494,9 +1516,57 @@ static int _composer_pre_parse_bundle(EmailComposerUGD *ugd, service_h data) return COMPOSER_ERROR_NONE; } else { - debug_log("Invaild argument!!"); + if (operation == NULL) { /* ug called by ug_create */ + debug_log("Invaild argument!!"); + return COMPOSER_ERROR_INVALID_ARG; + } else { /* ug called by appcontrol request */ + + /* default run type: RUN_COMPOSER_EXTERNAL */ + ugd->composer_type = RUN_COMPOSER_EXTERNAL; - return COMPOSER_ERROR_INVALID_ARG; + int ret; + ret = service_get_extra_data(data, SERVICE_DATA_TO, (char **)&argv[1]); + debug_log("service_get_extra_data: %d", ret); + debug_log("to:%s", argv[1]); + ret = service_get_extra_data(data, SERVICE_DATA_CC, (char **)&argv[2]); + debug_log("service_get_extra_data: %d", ret); + debug_log("cc:%s", argv[2]); + ret = service_get_extra_data(data, SERVICE_DATA_BCC, (char **)&argv[3]); + debug_log("service_get_extra_data: %d", ret); + debug_log("bcc:%s", argv[3]); + ret = service_get_extra_data(data, SERVICE_DATA_SUBJECT, (char **)&argv[4]); + debug_log("service_get_extra_data: %d", ret); + debug_log("subject:%s", argv[4]); + ret = service_get_extra_data(data, SERVICE_DATA_TEXT, (char **)&argv[5]); + debug_log("service_get_extra_data: %d", ret); + debug_log("body:%s", argv[5]); + + if (argv[1] != NULL && strlen(argv[1]) != 0) { + ugd->new_mail_info->mail_data->full_address_to = _composer_parse_recipients_arg(ugd, argv[1]); + } + if (argv[2] != NULL && strlen(argv[2]) != 0) { + ugd->new_mail_info->mail_data->full_address_cc = _composer_parse_recipients_arg(ugd, argv[2]); + } + if (argv[3] != NULL && strlen(argv[3]) != 0) { + ugd->new_mail_info->mail_data->full_address_bcc = _composer_parse_recipients_arg(ugd, argv[3]); + } + if (argv[4] != NULL && strlen(argv[4]) != 0) + ugd->new_mail_info->mail_data->subject = g_strdup(argv[4]); + if (argv[5] != NULL && strlen(argv[5]) != 0) { + ugd->new_mail_info->mail_data->file_path_plain = g_strdup(argv[5]); + ugd->new_mail_info->mail_data->body_download_status = 1; + } + + ugd->save_drafts = 1; + + int i; + for (i = 0; i < 7;i++) { + if (argv[i]) + g_free(argv[i]); + } + + return COMPOSER_ERROR_NONE; + } } } |