diff options
Diffstat (limited to 'setting/src/email-view-account-setup.c')
-rwxr-xr-x | setting/src/email-view-account-setup.c | 67 |
1 files changed, 47 insertions, 20 deletions
diff --git a/setting/src/email-view-account-setup.c b/setting/src/email-view-account-setup.c index d7acf20..e1b8664 100755 --- a/setting/src/email-view-account-setup.c +++ b/setting/src/email-view-account-setup.c @@ -35,6 +35,8 @@ static int _check_null_field(struct viewdata *vd); static int _check_preset_null_field(struct viewdata *vd); static int _check_preset_isp_name(char *addr, int isp_type); static void _read_all_entries(struct viewdata *vd); +/*static void _set_help_string(Evas_Object *eo, struct viewdata *vd);*/ +static void _set_domain_string(struct viewdata *vd); static void _next_cb(void *data, Evas_Object *obj, void *event_info); static void _save_cb(void *data, Evas_Object *obj, void *event_info); @@ -42,8 +44,8 @@ static void _manual_cb(void *data, Evas_Object *obj, void *event_info); static void _back_cb(void *data, Evas_Object *obj, void *event_info); static void _check1_clicked_cb(void *data, Evas_Object *obj, void *event_info); static void _check2_clicked_cb(void *data, Evas_Object *obj, void *event_info); -static void _check1_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info); -static void _check2_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info); +static void _check1_clicked_cb2(void *data, Evas_Object *obj, const char *emission, const char *source); +static void _check2_clicked_cb2(void *data, Evas_Object *obj, const char *emission, const char *source); static Eina_Bool _after_validation_cb(void *data); static void _popup_ok_cb(void *data, Evas_Object *obj, void *event_info); @@ -224,6 +226,10 @@ static int _create(struct viewdata *vd) g_vd = vd; ugd->wds_account_creation = 0; + if (vd->ugd->account_info != OTHERS) { + _set_domain_string(vd); + } + _create_view(vd); vd->refresh = 1; @@ -405,9 +411,10 @@ static void _create_view(struct viewdata *vd) char *desc = g_strdup(_("IDS_EMAIL_BODY_SEND_EMAIL_FROM_THIS_ACCOUNT_BY_DEFAULT")); Evas_Object *label1 = elm_label_add(checkbox_set); - char *text = g_strconcat("<color=#838B8BFF><font_size=30><align=left>", + char *text = g_strconcat("<color=#838B8BFF><font_size=32><align=left>", desc, "</align></font_size></color>", NULL); - evas_object_event_callback_add(label1, EVAS_CALLBACK_MOUSE_UP, _check1_clicked_cb2, (void *)vd); + edje_object_signal_callback_add(elm_layout_edje_get(checkbox_set), + "elm,action,text1_clicked", "elm", _check1_clicked_cb2, (void *)vd); elm_object_text_set(label1, text); evas_object_show(label1); g_free(desc); @@ -416,9 +423,10 @@ static void _create_view(struct viewdata *vd) desc = g_strdup(_("IDS_EMAIL_BODY_SHOW_PASSWORD")); Evas_Object *label2 = elm_label_add(checkbox_set); - text = g_strconcat("<color=#838B8BFF><font_size=30><align=left>", + text = g_strconcat("<color=#838B8BFF><font_size=32><align=left>", desc, "</align></font_size></color>", NULL); - evas_object_event_callback_add(label2, EVAS_CALLBACK_MOUSE_UP, _check2_clicked_cb2, (void *)vd); + edje_object_signal_callback_add(elm_layout_edje_get(checkbox_set), + "elm,action,text2_clicked", "elm", _check2_clicked_cb2, (void *)vd); elm_object_text_set(label2, text); evas_object_show(label2); g_free(desc); @@ -432,17 +440,6 @@ static void _create_view(struct viewdata *vd) evas_object_size_hint_weight_set(button_set, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_show(button_set); - desc = g_strdup(N_("Setup POP3 or IMAP4?")); - Evas_Object *label3 = elm_label_add(button_set); - text = g_strconcat("<color=#838B8BFF><font_size=30><align=left>", - desc, "</align></font_size></color>", NULL); - - elm_object_text_set(label3, text); - evas_object_show(label3); - g_free(desc); - g_free(text); - elm_object_part_content_set(button_set, "text", label3); - Evas_Object *btn = elm_button_add(button_set); elm_object_text_set(btn, _("IDS_EMAIL_BODY_MANUAL_SETUP")); evas_object_smart_callback_add(btn, "clicked", _manual_cb, (void *)vd); @@ -734,6 +731,26 @@ static void _read_all_entries(struct viewdata *vd) } } +static void _set_domain_string(struct viewdata *vd) +{ + debug_log(""); + EmailSettingUGD *ugd = vd->ugd; + struct priv_data *p; + p = vd->priv; + + if (ugd->account_info == HOTMAIL) { + p->str_email_address = g_strdup("@hotmail.com"); + } else if (ugd->account_info == YAHOOMAIL) { + p->str_email_address = g_strdup("@yahoo.com"); + } else if (ugd->account_info == GMAIL) { + p->str_email_address = g_strdup("@gmail.com"); + } else if (ugd->account_info == AOL) { + p->str_email_address = g_strdup("@aol.com"); + } else { + debug_log("Unknown account type"); + } +} + static void _next_cb(void *data, Evas_Object *obj, void *event_info) { debug_log(""); @@ -1047,7 +1064,7 @@ static void _check1_clicked_cb(void *data, Evas_Object *obj, void *event_info) p->set_default_account = 0; } -static void _check1_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info) +static void _check1_clicked_cb2(void *data, Evas_Object *obj, const char *emission, const char *source) { debug_log(""); struct viewdata *vd = (struct viewdata *)data; @@ -1088,7 +1105,7 @@ static void _check2_clicked_cb(void *data, Evas_Object *obj, void *event_info) elm_entry_password_set(p->entry_password, EINA_TRUE); } -static void _check2_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info) +static void _check2_clicked_cb2(void *data, Evas_Object *obj, const char *emission, const char *source) { debug_log(""); struct viewdata *vd = (struct viewdata *)data; @@ -1533,10 +1550,20 @@ static Evas_Object *_gl_ef_content_get_cb(void *data, Evas_Object *obj, const ch if (p->str_email_address) elm_entry_entry_set(p->entry_email_address, p->str_email_address); - if (ugd->account_info != OTHERS && p->icon_get_cnt2 == 2) { + if (ugd->account_info != OTHERS && p->icon_get_cnt2 == 2 && + strcmp(ugd->start_view_type, EMAIL_BUNDLE_VAL_VIEW_ACCOUNT_ADD) != 0) { + p->clicked_object = p->entry_email_address; + evas_object_show(p->entry_email_address); + elm_object_focus_set(p->entry_email_address, EINA_TRUE); + elm_entry_cursor_begin_set(p->entry_email_address); + } + + if (ugd->account_info != OTHERS && p->icon_get_cnt2 == 3 && + strcmp(ugd->start_view_type, EMAIL_BUNDLE_VAL_VIEW_ACCOUNT_ADD) == 0) { p->clicked_object = p->entry_email_address; evas_object_show(p->entry_email_address); elm_object_focus_set(p->entry_email_address, EINA_TRUE); + elm_entry_cursor_begin_set(p->entry_email_address); } return p->ef_email_address; |